Merge branch 'upstream'
authorBdale Garbee <bdale@gag.com>
Wed, 22 Oct 2008 16:12:03 +0000 (18:12 +0200)
committerBdale Garbee <bdale@gag.com>
Wed, 22 Oct 2008 16:12:03 +0000 (18:12 +0200)
Conflicts:

AUTHORS
ChangeLog
Makefile.am
Makefile.in
NEWS
ReleaseNotes
acinclude.m4
aclocal.m4
amandad-src/Makefile.am
amandad-src/Makefile.in
amandad-src/amandad.c
amandad-src/amandad.h
amandad-src/amandad_util.c
amplot/Makefile.am
amplot/Makefile.in
amplot/amplot.sh
autogen
changer-src/Makefile.am
changer-src/Makefile.in
changer-src/chg-disk.sh
changer-src/chg-lib.sh.in
changer-src/chg-manual.sh.in
changer-src/chg-mtx.sh
changer-src/chg-multi.sh
changer-src/chg-null.sh
changer-src/chg-scsi-chio.c
changer-src/chg-scsi.c
changer-src/chg-zd-mtx.sh
changer-src/scsi-aix.c
changer-src/scsi-bsd.c
changer-src/scsi-cam.c
changer-src/scsi-changer-driver.c
changer-src/scsi-chio.c
changer-src/scsi-hpux.c
changer-src/scsi-hpux_new.c
changer-src/scsi-irix.c
changer-src/scsi-linux.c
changer-src/scsi-solaris.c
changer-src/sense.c
client-src/Makefile.am
client-src/Makefile.in
client-src/amandates.c
client-src/calcsize.c
client-src/client_util.c
client-src/client_util.h
client-src/getfsent.c
client-src/killpgrp.c
client-src/noop.c
client-src/rundump.c
client-src/runtar.c
client-src/selfcheck.c
client-src/sendbackup-dump.c
client-src/sendbackup-gnutar.c
client-src/sendbackup.c
client-src/sendsize.c
client-src/versionsuffix.c
common-src/Makefile.am
common-src/Makefile.in
common-src/alloc.c
common-src/amanda.h
common-src/amfeatures.c
common-src/amflock-test.c
common-src/amflock.c
common-src/arglist.h
common-src/bsd-security.c
common-src/bsdtcp-security.c
common-src/bsdudp-security.c
common-src/clock.c
common-src/clock.h
common-src/columnar.h
common-src/conffile.c
common-src/conffile.h
common-src/debug.c
common-src/dgram.c
common-src/dgram.h
common-src/error.c
common-src/event.c
common-src/event.h
common-src/file.c
common-src/fileheader.c
common-src/fileheader.h
common-src/genversion.c
common-src/krb4-security.c
common-src/krb5-security.c
common-src/match.c
common-src/memmove.c
common-src/packet.c
common-src/packet.h
common-src/pipespawn.c
common-src/protocol.c
common-src/regerror.c
common-src/rsh-security.c
common-src/security-util.c
common-src/security-util.h
common-src/security.c
common-src/security.h
common-src/ssh-security.c
common-src/statfs.c
common-src/stream.c
common-src/stream.h
common-src/strstr.c
common-src/tapelist.c
common-src/tapelist.h
common-src/tapelist.h~HEAD
common-src/token.c
common-src/token.h
common-src/util.c
common-src/util.h
common-src/version.c
common-src/versuff.c
config/Makefile.in
config/acinclude.m4i
config/config.guess
config/config.h.in
config/config.rpath
config/config.sub
config/depcomp
config/gnulib/absolute-header.m4
config/gnulib/extensions.m4
config/gnulib/getaddrinfo.m4
config/gnulib/gnulib-cache.m4
config/gnulib/gnulib-comp.m4
config/gnulib/lock.m4
config/gnulib/netinet_in_h.m4
config/gnulib/snprintf.m4
config/gnulib/socklen.m4
config/gnulib/string_h.m4
config/gnulib/sys_socket_h.m4
config/gnulib/vasnprintf.m4
config/gnulib/wint_t.m4
config/install-sh
config/libtool.m4
config/ltmain.sh
config/missing
config/mkinstalldirs
configure
configure.in
contrib/set_prod_link.pl
debian/copyright
docs/Makefile.am
docs/Makefile.in
dumper-src/Makefile.am
dumper-src/Makefile.in
example/Makefile.am
example/Makefile.in
example/amanda-client.conf.in
example/amanda.conf.in
example/chg-mcutil.conf
gnulib/Makefile.am
gnulib/Makefile.in
gnulib/alloca_.h
gnulib/getaddrinfo.c
gnulib/printf-args.c
gnulib/printf-args.h
gnulib/printf-parse.c
gnulib/printf-parse.h
gnulib/regenerate/getaddrinfo-cygwin.patch
gnulib/regenerate/no-error.patch
gnulib/regenerate/regenerate
gnulib/snprintf.c
gnulib/stdbool_.h
gnulib/string_.h
gnulib/vasnprintf.c
gnulib/vasnprintf.h
man/Makefile.am
man/Makefile.in
man/amadmin.8
man/amaespipe.8
man/amanda-client.conf.5
man/amanda.8
man/amanda.conf.5
man/amcheck.8
man/amcheckdb.8
man/amcleanup.8
man/amcrypt-ossl-asym.8
man/amcrypt-ossl.8
man/amcrypt.8
man/amdd.8
man/amdump.8
man/amfetchdump.8
man/amflush.8
man/amgetconf.8
man/amlabel.8
man/ammt.8
man/amoverview.8
man/amplot.8
man/amrecover.8
man/amreport.8
man/amrestore.8
man/amrmtape.8
man/amstatus.8
man/amtape.8
man/amtapetype.8
man/amtoc.8
man/amverify.8
man/amverifyrun.8
man/xml-source/amadmin.8.xml
man/xml-source/amaespipe.8.xml
man/xml-source/amanda-client.conf.5.xml
man/xml-source/amanda.8.xml
man/xml-source/amanda.conf.5.xml
man/xml-source/amcheck.8.xml
man/xml-source/amcheckdb.8.xml
man/xml-source/amcleanup.8.xml
man/xml-source/amcrypt-ossl-asym.8.xml
man/xml-source/amcrypt-ossl.8.xml
man/xml-source/amcrypt.8.xml
man/xml-source/amdd.8.xml
man/xml-source/amdump.8.xml
man/xml-source/amfetchdump.8.xml
man/xml-source/amflush.8.xml
man/xml-source/amgetconf.8.xml
man/xml-source/amlabel.8.xml
man/xml-source/ammt.8.xml
man/xml-source/amoverview.8.xml
man/xml-source/amplot.8.xml
man/xml-source/amrecover.8.xml
man/xml-source/amreport.8.xml
man/xml-source/amrestore.8.xml
man/xml-source/amrmtape.8.xml
man/xml-source/amstatus.8.xml
man/xml-source/amtape.8.xml
man/xml-source/amtapetype.8.xml
man/xml-source/amtoc.8.xml
man/xml-source/amverify.8.xml
man/xml-source/amverifyrun.8.xml
oldrecover-src/Makefile.am
oldrecover-src/Makefile.in
oldrecover-src/amrecover.c
oldrecover-src/display_commands.c
oldrecover-src/extract_list.c
oldrecover-src/help.c
oldrecover-src/set_commands.c
oldrecover-src/uparse.c
oldrecover-src/uparse.y
oldrecover-src/uscan.c
oldrecover-src/uscan.l
recover-src/Makefile.am
recover-src/Makefile.in
recover-src/amrecover.c
recover-src/amrecover.h
recover-src/display_commands.c
recover-src/extract_list.c
recover-src/help.c
recover-src/set_commands.c
recover-src/uparse.c
recover-src/uparse.h
recover-src/uparse.y
recover-src/uscan.c
recover-src/uscan.l
restore-src/Makefile.am
restore-src/Makefile.in
restore-src/amfetchdump.c
restore-src/amidxtaped.c
restore-src/amrestore.c
restore-src/restore.c
restore-src/restore.h
server-src/Makefile.am
server-src/Makefile.in
server-src/amadmin.c
server-src/amcheck.c
server-src/amcleanup.sh.in
server-src/amcleanupdisk.c
server-src/amdump.sh
server-src/amflush.c
server-src/amfreetapes.sh.in
server-src/amindex.c
server-src/amindexd.c
server-src/amlabel.c
server-src/amlogroll.c
server-src/amoverview.pl.in
server-src/amstatus.pl.in
server-src/amtape.c
server-src/amtrmidx.c
server-src/amtrmlog.c
server-src/amverify.sh
server-src/amverifyrun.sh.in
server-src/changer.c
server-src/chunker.c
server-src/cmdline.c
server-src/cmdline.h
server-src/disk_history.c
server-src/disk_history.h
server-src/diskfile.c
server-src/diskfile.h
server-src/driver.c
server-src/driverio.c
server-src/driverio.h
server-src/dumper.c
server-src/find.c
server-src/find.h
server-src/getconf.c
server-src/holding.c
server-src/holding.h
server-src/infofile.c
server-src/infofile.h
server-src/logfile.c
server-src/logfile.h
server-src/planner.c
server-src/reporter.c
server-src/server_util.c
server-src/server_util.h
server-src/tapefile.c
server-src/tapefile.h
server-src/taper.c
server-src/taperscan.c
server-src/taperscan.h
tape-src/Makefile.am
tape-src/Makefile.in
tape-src/amdd.c
tape-src/ammt.c
tape-src/output-file.c
tape-src/output-rait.c
tape-src/output-tape.c
tape-src/tapeio.c
tape-src/tapeio.h
tape-src/tapetype.c

59 files changed:
1  2 
ChangeLog
Makefile.in
amandad-src/Makefile.in
amandad-src/amandad.c
amandad-src/amandad.h
amplot/Makefile.in
amplot/amplot.sh
changer-src/Makefile.in
changer-src/chg-lib.sh.in
changer-src/scsi-aix.c
changer-src/scsi-chio.c
client-src/Makefile.in
client-src/amandates.c
client-src/getfsent.c
client-src/killpgrp.c
client-src/selfcheck.c
client-src/sendbackup-gnutar.c
client-src/sendbackup.c
client-src/sendsize.c
common-src/Makefile.am
common-src/Makefile.in
common-src/amanda.h
common-src/amflock.c
common-src/genversion.c
config/Makefile.am
config/Makefile.in
config/config.h.in
config/config.sub
configure
example/Makefile.in
gnulib/regenerate/getaddrinfo-cygwin.patch
gnulib/regenerate/no-error.patch
gnulib/regenerate/regenerate
man/Makefile.in
recover-src/Makefile.in
recover-src/amrecover.c
recover-src/uscan.c
restore-src/Makefile.in
restore-src/amidxtaped.c
server-src/Makefile.in
server-src/amcheck.c
server-src/amlabel.c
server-src/amtape.c
server-src/amtrmidx.c
server-src/amtrmlog.c
server-src/amverify.sh
server-src/disk_history.c
server-src/diskfile.c
server-src/driver.c
server-src/dumper.c
server-src/find.c
server-src/getconf.c
server-src/holding.c
server-src/infofile.c
server-src/logfile.c
server-src/planner.c
server-src/reporter.c
server-src/taper.c
tape-src/Makefile.in

diff --combined ChangeLog
index fbba979bcf8e7110cd49ef1200d6476b11d988f7,e671971a8cdbcfc14a817bad211e0b90a74e51a6..271276c8ecb795b1f7ba7b027c5060947cdc3580
+++ b/ChangeLog
- 2007-06-06  Jean-Louis Martineau <martineau@zmanda.com>
-       * Amanda 2.5.2p1 released.
+ 2008-08-22  Jean-Louis Martineau <martineau@zmanda.com>
+       * configure.in, packaging/deb/rules,
+         packaging/deb/buildpkg, packaging/rpm/buildpkg,
+         packaging/rpm/amanda.spec: Change release to 2.6.0p2
+       * NEWS: News in 2.6.0p2
+ 2008-08-22  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/amglue/bigint.c: add #include "stdint.h"
+ 2008-08-22  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amadmin.c (tape): Correctly print next tape to use.
+       * server-src/tapefile.c (print_new_tapes): New function to print new
+                                                  tapes.
+       * server-src/tapefile.h (print_new_tapes): Prototype.
+       * server-src/reporter.c: Correctly print next tape to use.
+ 2008-08-22  Dustin J. Mitchell <dustin@zmanda.com>
+       Thanks to Stefan G. Weichinger <sgw@amanda.org>
+       * server-src/taper.c: check errors from device, and handle them by
+         either requesting a new tape or just using the next tape in the
+         changer
+ 2008-08-22  Olivier Nicole <on@cs.ait.ac.th>
+       * changer-src/chg-disk.sh: replace == with =
+ 2008-08-22  Dustin J. Mitchell <dustin@zmanda.com>
+       * changer-src/chg-lib.sh.in: fix sed invocation for BSD's sed
+ 2008-08-22  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/reporter.c: Fix computation of compression ratio.
+ 2008-08-21  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/krb5-security.c: Fix security_seterror use.
+ 2008-08-21  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/queueing.c: Fix compiler warning.
+ 2008-08-19  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in: check for getgrgid_r and getpwuid_r
+       * common-src/security-util.c: conditionalize on checks
+ 2008-08-18  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/version.h: remove #include of config.h
+       * device-src/vfs-device.c: #include amanda.h first
+ 2008-08-15  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/debug.c: include backtraces on fatal errors
+       * config/amanda/debugging.m4: look for glibc's backtrace support
+       * configure.in: ditto
+ 2008-08-05 Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/amanda.spec:  Merged fixes from trunk .spec for
+         parsing redhat-release for fedora versions correctly.
+ 2008-08-04 Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/amanda.spec:  add %{tarver} macro and set the correct
+         minimum version per distro (Thanks to Jesse Angell for the rhel4 tip)
+ 2008-07-30  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/Amanda/Changer.pm perl/Amanda/Cmdline.swg
+         perl/Amanda/Config.swg perl/Amanda/DB/Catalog.pm
+         perl/Amanda/Device.swg perl/Amanda/Logfile.swg 
+         perl/Amanda/Util.swg: POD cleanup
+       * perl/Makefile.am: new files, rules to make HTML
+       * perl/amperl.css: CSS file for online POD
+       * perl/make_html.pl: make online POD
+ 2008-07-30  Dustin J. Mitchell <dustin@zmanda.com>
+       * man/Makefile.am man/amanda.css man/index.php man/xslt/html.xsl.in:
+         new files for HTML output
+       * man/xslt/man.xsl.in: substitute XSLT_VERS
+       * man/xml-source/amanda-devices.7.xml: tweaks
+       * man/xml-source/amanda.8.xml: tweaks
+       * man/xml-source/amanda.conf.5.xml: tweaks
+       * man/xml-source/amgetconf.8.xml: tweaks
+       * man/xml-source/amtoc.8.xml: tweaks
+ 2008-07-30 Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/amanda.spec: removed activate-devpay from %files section
+ 2008-07-30 Dan Locks <dwlocks@zmanda.com>
+       * device-src/s3.c: Merged changes from 968 to work around a libcurl bug.
+       * config/amanda/s3-device.m4: Same
+ 2008-07-30  Dustin J. Mitchell <dustin@zmanda.com>
+       * installcheck/Amanda_Config.pl: add + to avoid perl-5.6.0 parsing bug
+       * installcheck/amgetconf.pl: ditto
+ 2008-07-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/sendsize.c: remove cruft causing compile errors on HP/UX
+ 2008-07-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/tests/semaphore-test.c: move function call out of
+         variable initialization
+ 2008-07-25 Dan Locks <dwlocks@zmanda.com>
+       * packaging/deb/control: added alternative dependency of libssl0.9.8 for
+         Ubuntu 8.x builds.  Added build dependencies for debhelper, fakeroot,
+         libcurl-dev, libssl-dev.  Updated server and client dependency for curl
+         to libcurl3
+ 2008-07-23  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/conffile.c: fix handling for config overwrites of
+         non-string parameters
+ 2008-07-17  Jean-Louis Martineau <martineau@zmanda.com>
+       * amandad-src/amandad.c: amandad must be run by root for krb5 auth.
+ 200i-07-14 Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/amanda.spec: fix distribution detection, add
+       activate-devpay to server files list
+ 2008-07-11  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/rait-device.c: fix RAIT file numbers; don't pass
+         block-size-related properties down to child devices (we set the block
+         size in find_block_size); don't use union_robust for checking whether
+         labels changed, as it causes spurious failures
+ 2008-07-11  Dustin J. Mitchell <dustin@zmanda.com>
+       Thanks to Stefan G. Weichinger <sgw@amanda.org>
+       * device-src/tape-*.c: return DEVICE_ERROR|VOLUME_MISSING on EIO while
+         checking tape_is_tape_device
+       * changer-src/chg-lib.sh.in: keep waiting for a device if it *might*
+         be busy or offline
+ 2008-07-09  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/rait-device.c: rewrite g_ptr_array_union_robust to
+         correctly detect and handle child device failures
+ 2008-07-09  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/Amanda/Logfile.swg: POD tweaks
+ 2008-07-06 Dan Locks <dwlocks@zmanda.com>
+       * packaging/deb/amanda-backup-server.postrm
+         packaging/deb/amanda-backup-client.postrm: removed unused
+         code
+       * packaging/deb/postrm: fixed typo in deluser command
+       * packaging/deb/rules: added specific preinst and postrm scripts for
+         client and server.
+ 2008-07-04 Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/buildpkg: add lines to copy rpms to root of the build dir.
+ 2008-06-30  Ian Turner <ian@zmanda.com>
+       * device-src/rait-device.c: Fix a memory corruption issue on the last
+         block of a file.
+       * device-src/rait-device.c: Track file numbers properly when child
+         devices change them (that is, in rait_device_start_file() and
+         rait_device_seek_file()).
+ 2008-06-27  Ian Turner <ian@zmanda.com>
+       * device-src/rait-device.c (rait_device_start): Check for consistent
+         volume label on all child devices, otherwise fail
+ 2008-06-27  Ian Turner <ian@zmanda.com>
+       * device-src/rait-device.c: Silence a compiler warning.
+ 2008-06-27  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/rait-device.c: hack around glib bug in versions <2.10.2
+ 2008-06-09  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/conffile.c: don't complain about a missing client conf
+         file, as the complaint interferes with the network communication
+         ("invalid size: could not open conf file")
+ 2008-06-06  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/*: bugfixes backported from trunk r1087
+         - device_read_block returns an int, not a gboolean, and sets in_file
+           = FALSE on EOF
+         - tape device only requires a label in READ and APPEND modes
+         - tape device isn't opened until start or read_label
+         - rait sets self->file correctly in start
+         - rait compares child devices' labels and times correctly
+         - vfs correctly chains up in property_get
+         - vfs sets self->file correctly in start with ACCESS_APPEND
+ 2008-06-03  Jean-Louis Martineau <martineau@zmanda.com>
+       * man/xml-source/amdump.8.xml, man/xml-source/amreport.8.xml,
+         man/xml-source/amcheck.8.xml, man/xml-source/amflush.8.xml,
+         man/xml-source/amstatus.8.xml: Add "EXIT CODE" section".
+ 2008-05-30  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/security-util.c: Remove unneeded pointer cast.
+       * common-src/stream.c: Fix compiler error.
  
- 2007-06-06  Jean-Louis Martineau <martineau@zmanda.com>
-       * restore-src/restore.c: accept all header with size >= DISK_BLOCK_BYTES
+ 2008-05-30  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/amanda.h, common-src/bsd-security.c,
+         common-src/bsdtcp-security.c, common-src/bsdudp-security.c,
+         common-src/dgram.c, common-src/dgram.h, common-src/krb5-security.c,
+         common-src/security-util.c, common-src/security-util.h,
+         common-src/sockaddr-util.c, common-src/sockaddr-util.h,
+         common-src/stream.c, common-src/util.c, common-src/util.h,
+         restore-src/amidxtaped.c, server-src/amindexd.c: add sockaddr_union,
+         change all relevant functions to use it, to avoid aliasing violations
+ 2008-05-29  Orion Poplawski <orion@cora.nwra.com>
+       * device-src/tests/semaphore-test.c: fix call to amanda_thread_init
+       * device-src/tests/vfs_test.c: fix call to amanda_thread_init
+       * server-src/chunker.c: fix buffer overrun
+ 2008-05-29  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/conffile.c (client_keytab): Remove "DEVICE-PROPERTY".
+ 2008-05-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/rait-device.c: rait-device returns correct size when
+         blocksize is too small
+ 2008-05-25  Jean-Louis Martineau <martineau@zmanda.com>
+       * changer-src/chg-zd-mtx.sh: Fix logging.
+ 2008-05-25  Jean-Louis Martineau <martineau@zmanda.com>
+         * packaging/rpm/amanda.spec: Fix output message.
+ 2008-05-21  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/driver.c: Fix quoting of diskname.
+ 2008-05-20  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in config/amanda/socklen_t_equiv.m4: detect the type (not
+         necessarily socklen_t used by getpeername et al.
+       * amandad-src/amandad.c server-src/amindexd.c restore-src/amidxtaped.c
+         common-src/util.c common-src/bsdtcp-security.c common-src/amanda.h
+         common-src/krb5-security.c common-src/dgram.c common-src/stream.c:
+         use the type instead of socklen_t
+ 2008-05-14  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/amhpfixdevs.sh client-src/Makefile.am
+         client-src/amsinixfixdevs.sh config/amanda/devprefix.m4:
+         permanently remove amsinixfixdevs and amhpfixdevs
+ 2008-05-16  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/conffile.c: Fix conf_parserror use.
+ 2008-05-13 Dan Locks <dwlocks@zmanda.com>
+       * packaging/deb/buildpkg: modified build script to create unsigned
+         packages
+ 2008-05-12  Jean-Louis Martineau <martineau@zmanda.com>
+         Patch by Orion Poplawski
+       * server-src/planner.c: Warn about overwrite of last level 1, and
+         force backup of level 1 if overwrite on this run.
+ 2008-05-12  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/dumper.c server-src/server_util.c
+         server-src/infofile.c server-src/amtrmlog.c common-src/debug.c
+         common-src/file.c: Always call mkpdir without the 02000 bit set,
+         as it is not needed and causes problems on MacOS X.
+ 2008-05-08  Jean-Louis Martineau <martineau@zmanda.com>
+       * packaging/deb/buildpkg packaging/rpm/buildpkg: AMVER=amanda-2.6.0p1
+       * packaging/deb/changelog: amanda (2.6.0p1-1)
+       * packaging/deb/rules: AMVER=2.6.0p1
+       * packaging/rpm/amanda.spec: amanda_version 2.6.0p1, amanda_release 1
+       * NEWS: Update for 2.6.0p1
+       * configure.in: AM_INIT_AUTOMAKE(amanda, "2.6.0p1")
+ 2008-05-08  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/conffile.c: Define default tapetype.
+ 2008-05-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/conffile.c: Check the tapetype is defined.
+ 2008-05-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/tape-device.c: Allow user to set "read_buffer_size"
+                                   property.
+       * restore-src/amrestore.c: Don't limit blocksize to
+                                  --with-maxtapeblocksize.
+       * common-src/conffile.c: Increase readblocksize to blocksize.
+         blocksize and readblocksize can be bigger than
+         --with-maxtapeblocksize.
+ 2008-05-02 Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/amanda.spec:  Replace ${ with %{ where applicable.
+ 2008-04-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/security-util.c: Typo.
+ 2008-04-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/driver.c: Always sent a FAILED to taper if dumper failed.
+ 2008-04-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/planner.c: Fix vstrextend use.
+ 2008-04-16  Dan Locks <dwlocks@zmanda.com>
+       * Fixes to debian package reported by daniel_P
+       * packaging/deb/preinst: remove spaces near ${amanda_group}
+       * packaging/deb/amanda-backup-server.dirs
+         packaging/deb/amanda-backup-client.dirs: added var/amanda and
+         usr/share/lintian/overrides
+       * packaging/deb/rules: added logic to find PERLSITELIB and append that
+         to amanda-backup-server.install, removed broken brace expansion
+       * packaging/deb/buildpkg: removed extraneous configure step
+       * packaging/deb/amanda-backup-server.postinst: added check for correct
+         permissions on /tmp/amanda
+         
+ 2008-04-16  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amadmin.c: Improve message.
+       * man/xml-source/amanda.conf.5.xml: Fix man page.
+       * server-src/planner.c: Fix DS_INCRONLY and FORCE_FULL
+ 2008-04-16  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/amanda/dumpers.m4: continue searching for gnutar if we
+         find a binary claiming to be gnu tar that is not.  This gets
+         around serious breakage on Ubuntu, where star is installed as
+         /bin/gnutar, but /bin/tar is actually GNU Tar.
+ 2008-04-15  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/file.c(mk1dir): fix reversed conditional to handle 
+         a race condition
+ 2008-04-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/debug.c (debug_logging_handler, debug_printf): Don't print
+         msg_timestamp() to stderr.
+ 2008-04-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/find.c (dumps_match_dumpspecs): New function to only keep
+         dumps that match a dumpspecs, using it simplify amfetchdump.
+       * server-src/find.h (dumps_match_dumpspecs): Prototype.
+       * restore-src/amrestore.c: Add a first_restored_file to
+         search_a_tape(), to allow restore ot stop after the first image.
+       * restore-src/restore.c: Set first_restored_file, it was never set,
+         it's needed to stop after the first image.
+       * restore-src/restore.c (restore_from_tapelist): break if piping to
+         stdout.
+       * restore-src/amfetchdump.c: Use dumps_match_dumpspecs.
+       * restore-src/amfetchdump.c: If -p, the keep only one dump.
+       * perl/Amanda/Logfile.swg (dumps_match_dumpspecs): New prototype.
+       * perl/Amanda/Cmdline.swg: cmdline_parse_dumpspecs.
+       * perl/amglue/dumpspecs.swg: Map dumpspecs to perl.
+       * perl/Makefile.am (AMGLUE_SWG): Add amglue/dumpspecs.swg.
+ 2008-04-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * tape-src/tapetype.c: Initialize an default config.
+ 2008-04-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c (connect_portrange, connect_port, bind_portrange):
+         Return the latest errno reported.
+ 2008-04-04  Jean-Louis Martineau <martineau@zmanda.com>
+       * man/xml-source/*.xml: Use ulink tag to link to wiki.zmanda.com.
+ 2008-04-04  Jean-Louis Martineau <martineau@zmanda.com>
+       * restore-src/restore.c: Check last_header->type != F_UNKNOWN.
+ 2008-03-31  Dan Locks <dwlocks@zmanda.com>
+       * packaging/deb/buildpkg
+         packaging/rpm/buildpkg: added -p to cp to preserve file timestamps.
+ 2008-03-31  Dan Locks <dwlocks@zmanda.com>
+       * packaging/Makefile.am: add deb subdirectory.
+ 2008-03-27  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/activate-devpay.c (parse_commandline): Always return.
+ 2008-03-25  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/readline.m4: Don't add READLINE_LIBS to LIBS.
+       * oldrecover-src/Makefile.am (LDAAD): Add READLINE_LIBS.
+       * recover-src/Makefile.am (LDAAD): Add READLINE_LIBS.
+       * config/amanda/swig.m4: AM_CONDITIONAL(WANT_CYGWIN_COPY_PERL_DLL)
+       * config/amanda/swig.m4: Add library to PERLEXTLIBS on cygwin.
+       * config/amanda/syshacks.m4: Add '-no-undefined' to AMANDA_ADD_LDFLAGS.
+       * amandad-src/Makefile.am,
+       * client-src/Makefile.am, device-src/Makefile.am,
+         server-src/Makefile.am, server-src/server_util.c,
+         tape-src/Makefile.am: Add library to many *_LIBADD.
+       * perl/Makefile.am (install-data-hook): Copy cygwin ddl if
+         WANT_CYGWIN_COPY_PERL_DLL.
+ 2008-03-25  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/reporter.c: Check difference between origsize and outsize
+         to find if the image is compressed.
+ 2008-03-25  Jean-Louis Martineau <martineau@zmanda.com>
+       Greg Troxel reported the bug and possible solution.
+       * common-src/stream.c (stream_server): New family argument, it is used
+                                              to create the socket.
+       * common-src/stream.h (stream_server): New prototype.
+       * server-src/chunker.c, server-src/taper.c: Call stream_server with
+         family of 'localhost', it's the name dumper use to contact them.
+       * restore-src/amidxtaped.c: Call stream_server with AF_INET.
+       * common-src/bsd-security.c, common-src/security-util.c: Call
+         stream_server with family of incoming packet.
+ 2008-03-25  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/security-util.c (show_stat_info): Use getpwuid_r
+                                                      and getgrgid_r.
+ 2008-03-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/amanda/swig.m4: fix the fix to the fix for FreeBSD systems'
+         peculiar linking of threading libraries.
+ 2008-03-20  Dan Locks <dwlocks@zmanda.com>
+       * packaging/deb/control: removed grep dependency
+       * packaging/deb/amanda-backup-client.postinst 
+         packaging/deb/amanda-backup-server.postinst 
+         packaging/deb/amanda-backup-server.postrm
+         packaging/deb/amanda-backup-client.postrm:  removed call to
+         ldconfig to satisfy lintian
+       * packaging/deb/amanda-backup-server.lintian
+         packaging/deb/amanda-backup-client.lintian: sorted and added new
+         overrides
+       * packaging/deb/amanda-backup-client.dirs: removed var/amanda
+ 2008-03-18  Jean-Louis Martineau <martineau@zmanda.com>
+       * Amanda 2.6.0 released.
+       * configure.in: AM_INIT_AUTOMAKE(amanda, "2.6.0")
+       * packaging/rpm/amanda.spec: %define amanda_version 2.6.0
+       * packaging/rpm/buildpkg: AMVER=amanda-2.6.0
+ 2008-03-17  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/diskfile.c: Correctly check if two hosts map to the same
+                                name.
+ 2008-03-14  Dan Locks <dwlocks@zmanda.com>
+       * packaging/deb/*: Initial debian package release.  This package is 
+         based on Bdale Garbee's work as the official debian maintainer for 
+         amanda.
+ 2008-03-13  Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/amanda.spec: changed the PKG_CONFIG_PATH macro so that
+         it works with rpm versions earlier than 4.4
+ 2008-03-12  Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/buildpkg: made the script quieter, simplified its
+         usage by creating the required tarball on the fly.
+       * packaging/rpm/amanda.spec: fixed a number of complaints from rpmlint,
+         added --quiet to the configure invocation
+ 2008-03-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/tests/semaphore-test.c,
+         device-src/tests/vfs_test.c: Call amanda_thread_init(NULL).
+ 2008-03-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * Amanda 2.6.0b3 released.
+       * configure.in: AM_INIT_AUTOMAKE(amanda, "2.6.0b3")
+       * packaging/rpm/amanda.spec: %define amanda_version 2.6.0b3
+       * packaging/rpm/buildpkg: AMVER=amanda-2.6.0b3
+ 2008-03-06  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/Makefile.am: dest=$(amlibexecdir).
+ 2008-03-06  Jean-Louis Martineau <martineau@zmanda.com>
+       * changer-src/Makefile.am: Rename SCRIPTSDATA to SCRIPTS_INCLUDE,
+                                  Add chg-lib.sh.in to EXTRA_DIST.
+       * dumper-src/Makefile.am: Rename SCRIPTSDATA to SCRIPTS_INCLUDE,
+                                 Add generic-dumper.pl to EXTRA_DIST.
+       * common-src/Makefile.am: Add amanda-sh-lib.sh to SCRIPTS_INCLUDE,
+                                 Add amanda-sh-lib.sh.in to EXTRA_DIST.
+ 2008-03-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * changer-src/Makefile.am: Move chg-lib.sh to SCRIPTSDATA.
+       * dumper-src/Makefile.am: Move generic-dumper to SCRIPTSDATA.
+ 2008-03-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/swig.m4: Check for *freebsd[123456]*
+ 2008-03-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * changer-src/chg-scsi-chio.c: Compile fix.
+       * changer-src/scsi-chio.c: Compile fix.
+       * config/amanda/changer.m4: Check for linux/chio.h
+ 2008-03-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * packaging/rpm/amanda.spec: Give CFLAGS after ./configure
+ 2008-03-05  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/amanda/swig.m4: With many thanks to John E. Hein
+         <jhein@timing.com>, fix the comment and make the change committed
+         yesterday apply to all FreeBSD < 7.0.
+ 2008-03-05  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/amanda/summary.m4: quote all warning messages that will be
+         included in heredocs, to avoid spurious interpretation of backquotes
+ 2008-03-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * packaging/rpm/amanda.spec: Add %{PERLSITELIB} in %files sections.
+ 2008-03-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * restore-src/amidxtaped: Use default config if amrecover doesn't send                         a config name.  (amoldrecover doesn't send a config).
+       * restore-src/restore.c: amrecover from 2.4.5 doesn't send the filenum,          so desired_tape->numfiles == 0.
+         If amidxtaped is launched directly from xinetd, then
+         flags->pipe_to_fd == STDOUT_FILENO, but this test should only
+         succeed for amrestore of amfetchdump.
+ 2008-03-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/tape-device.c: Set d_self->is_eof to FALSE.
+ 2008-03-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/Makefile.am config/amanda/swig.m4: add a special case for
+         FreeBSD-6.2: include -lpthread in the linking of each perl
+         extension, because libgthread does not pull in libpthread as
+         it does on other platforms.
+ 2008-03-03  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/security-util.c: getnameinfo return != 0 on error.
+ 2008-03-03  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/dumpers.m4: Typo.
+ 2008-03-03  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/tests/vfs_test.c: Fix ignoring
+         return value of 'pipe', declared with attribute warn_unused_result.
+ 2008-02-29  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/amanda.h: add <stdint.h>
+ 2008-02-29  Dustin J. Mitchell <dustin@zmanda.com>
+       * installcheck/Amanda_Config.pl: fix Amanda_Config's use of the
+         missing Amanda::Tests
+ 2008-02-29  Dustin J. Mitchell <dustin@zmanda.com>
+       * installcheck/Makefile.am: remove Amconfig.pm from EXTRA_DIST, as it
+         is a generated file.
+ 2008-02-28  Dustin J. Mitchell <dustin@zmanda.com>
+       Thanks to John E. Hein <jhein@timing.com> for identifying this problem
+       * installcheck/Amanda_Config.pl: use a properly-sized constant to
+         check parsing of large configuration values
+ 2008-02-28  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amindexd.c: Compute maxpart, call clean_dump.
+       * server-src/disk_history.h (DUMP_ITEM): Add maxpart field.
+       * server-src/disk_history.h (add_dump): New prototype,
+                                               add maxpart argument.
+       * server-src/disk_history.c (add_dump): Remove a DUMP_ITEM if the
+                                       previous part is not already added.
+       * server-src/disk_history.c (clean_dump): New function to remove
+                                       DUMP_ITEM if all part are not added.
+       * common-src/tapelist.h (tapelist_t): Add partnum field.
+       * common-src/tapelist.h (append_to_tapelist): New prototype,
+                                                     add partnum argument.
+       * common-src/tapelist.c (append_to_tapelist): New partnum argument.
+       * restore-src/amfetchdump.c: Use new append_to_tapelist prototype.
+ 2008-02-27  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/find.c: Use sort_key in switch statement.
+ 2008-02-26  Jean-Louis Martineau <martineau@zmanda.com>
+       * NEWS, ReleaseNotes: Document --with-amlibdir.
+       * config/amanda/dirs.m4: Add AS_HELP_STRING for --without-amlibdir and
+                               --without-amlibexecdir,
+                               Set AMPERLLIB to $amlibdir/perl.
+ 2008-02-26  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/Makefile.am config/amanda/dirs.m4 config/amanda/summary.m4:
+         add --with-amperldir, --without-amperldir, and install perl modules
+         in Perl's installsitearch by default; thanks to Orion Poplawski
+         <orion@cora.nwra.com> for help and suggestions.
+ 2008-02-26  Jean-Louis Martineau <martineau@zmanda.com>
+       * client-src/getfsent.c: Don't fail if stat of mount point fail.
+ 2008-02-26  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c: Don't log a note if CLIENT_LOGIN == dumpuser for
+                            RUNNING_AS_DUMPUSER_PREFERRED.
+ 2008-02-25  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/reporter.c: Report size of data on holding disk.
+ 2008-02-20  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/dirs.m4: Add --with-amlibdir and --with-amlibexecdir.
+       * NEWS, ReleaseNotes: Document it.
+ 2008-02-20  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amcheck.c, server-src/dumper.c,
+         server-src/planner.c: Call waitpid to cleanup defunct process.
+ 2008-02-20  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/tape-posix.c: keep ioctl error message in
+         debug log
+ 2008-02-19  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/device.c, device-src/null-device.c,
+         device-src/s3.c, device-src/tape-device.c,
+         device-src/queueing.h, device-src/s3.h,
+         device-src/vfs-device.c, device-src/rait-device.c,
+         server-src/taper-source-test.c, server-src/server_util.c,
+         server-src/taper-disk-port-source.c, perl/Amanda/Device.swg,
+         perl/amglue/integers.swg, restore-src/restore.c,
+         common-src/glib-util.c: Fix solaris compiler warning.
+ 2008-02-19  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c (quote_string): Quote single quote (').
+       * server-src/find.c:Correctly compute length of diskname.
+ 2008-02-15  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in config/amanda/progs.m4 config/amanda/flags.m4:
+         use AC_PROG_EGREP instead of the Amanda version
+       * server-src/find.c: fix compiler warning on Solaris 8
+ 2008-02-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * packaging/rpm/amanda.spec: Fix typo.
+ 2008-02-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * oldrecover-src/Makefile.am: Build all files in the build directory.
+       * recover-src/Makefile.am: Build all files in the build directory.
+       * config/amanda/config.m4: Use $srcdir to buld common-src/svn-info.h
+       * configure.in: execute AMANDA_GET_SVN_INFO after AC_OUTPUT because
+         AC_OUTPUT create the common-src directory.
+ 2008-02-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amadmin.c: Use 'long long' and '%lld' to sscanf.
+       * file server-src/infofile.c: Use %jd to print intmax_t value.
+       * file server-src/driver.c: Use 'long long' and '%lld' to sscanf.
+ 2008-02-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amdump.sh: Don't use 'date -d', use sed.
+ 2008-02-13  Dan Locks <dwlocks@zmanda.com>
+         * packaging/rpm/amanda.spec: added a check for PKG_CONFIG_PATH in the
+           build environment as well as if provided on rpmbuild commandline.
+           Conditionalized this var to handle cross compiling on FC8.
+ 2008-02-12  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/dumper.c: Fail if no header or no data.
+ 2008-02-12  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amstatus.pl: Report failure if dumper succeed and
+                                 chunker failed.
+ 2008-02-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * NEWS, ReleaseNotes: Add notes about rsh/ssh and amandad_path.
+ 2008-02-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * Amanda 2.6.0b2 released.
+       * configure.in: AM_INIT_AUTOMAKE(amanda, "2.6.0b2")
+       * packaging/rpm/amanda.spec: %define amanda_version 2.6.0b2
+       * packaging/rpm/buildpkg: AMVER=amanda-2.6.0b2
+ 2008-02-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * recover-src/amrecover.c: Use tapedev from server if it is not set
+                                  in amanda.client.conf
+       * example/amanda-client.conf.in: Document it.
+ 2008-02-07  Jean-Louis Martineau <martineau@zmanda.com>
+         * device-src/tape-device.c (tape_device_init): Init min_block_size
+           and fixed_block_size to 32768.
+ 2008-02-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/tape-posix.c (tape_is_ready): Don't use GMT_ONLINE.
+ 2008-02-07  Dustin J. Mitchell <dustin@zmanda.com>
+       * man/xml-source/amcheckdump.8.xml: add -o option
+       * man/Makefile.am: build amcheckdump manpage
+       * server-src/amdevcheck.pl: tweak @ARGV parsing
+       * server-src/amcheckdump.pl installcheck/Installcheck/Run.pm
+         installcheck/amcheckdump.pl: significant rewrite to catch more errors
+         and not loop for ever on some errors.
+ 2008-02-01  Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/amanda.spec: added amdumpcheck.8.gz to the %files list
+         for both client and server, removed amplot from client, added missing
+         directory %{SYSCONFDIR}/amanda
+ 2008-01-29  Dan Locks <dwlocks@zmanda.com>
+       * packaging/rpm/amanda.spec: changed %{SYSCONFDIR} to %{LOCALSTATEDIR}
+         where amanda/amandates is concerned.  also added %{LOCALSTATEDIR} to
+         the %files list.
+ 2008-01-29  Dan Locks <dwlocks@zmanda.com>
+       * man/xml-src/*: added wiki.zmanda.com to "see also" section of all
+         man pages.
+ 2008-01-29  Jean-Louis Martineau <martineau@zmanda.com>
+       * client-src/sendbackup.c: Check for g_options.
+       * client-src/sendsize.c: Check for g_options.
+       * client-src/selfcheck.c: Check for g_options.
+       * amandad-src/amandad_util.c (free_g_options): Check g_options != NULL.
+ 2008-01-28  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amstatus.pl: Fix "Use of uninitialized value in string".
+ 2008-01-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * installcheck/Amanda_Config.pl common-src/conffile.c: uppercase
+         displayunit, and add a unit test to be sure.
+ 2008-01-28  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amstatus.pl: handle lowercase displayunit.
+ 2008-01-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in config/amanda/ipv6.m4 common-src/amanda.h: check
+         for netinet/in.h and in_port_t, and define the latter if
+         necessary.  Thanks to Craig Dewick <cdewick@lios.apana.org.au>
+         for the suggestion.
+ 2008-01-28  Paddy Sreenivasan <paddy@zmanda.com>
+       * man/xml-source/amanda.8.xml: Update amanda(8) to reflect 2.6.0
+         status
+ 2008-01-28  Jean-Louis Martineau <martineau@zmanda.com>
+       * amandad-src/amandad.c: Send service stderr to amandad debug file,
+         Wait for service termination and send error message to server.
+ 2008-01-28  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/device.c: Set PROPERTY_BLOCK_SIZE with a G_TYPE_INT
+                              Set PROPERTY_READ_BUFFER_SIZE with a G_TYPE_UINT
+ 2008-01-22  Dustin J. Mitchell <dustin@zmanda.com>
+       * man/Makefile.am man/xml-source/amcheckdump.8.xml: new manpage
+       * server-src/amcheckdump.pl: fix usage message
+ 2008-01-22  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in config/amanda/userid.m4: add --with-single-userid
+ 2008-01-22  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/amglue/amglue.h perl/amglue/bigint.c: Include integer limits
+         for all amglue files where they are missing from glib headers
+ 2008-01-22  Dustin J. Mitchell <dustin@zmanda.com>
+       * installcheck/Makefile.am: condition installchecks on the selected
+         components
+ 2008-01-22  Dustin J. Mitchell <dustin@zmanda.com>
+       * installcheck/Makefile.am Makefile.am: distribute
+         installcheck/Installcheck scripts, make sure enough parameters
+         are passed along to distcheck for it to succeed, and also clean
+         up properly after tests are run.
+ 2008-01-22  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/amanda/dumpers.m4: eliminate strange warning when
+         --without-smbclient is given
+ 2008-01-16  Dustin J. Mitchell <dustin@zmanda.com>
+       * installcheck/Makefile.am: Require user to specify
+         CLOBBER_MY_CONFIG=OK when running installchecks
+ 2008-01-16  Jean-Louis Martineau <martineau@zmanda.com>
+       * packaging/rpm/amanda.spec: Don't set PKG_CONFIG_PATH.
+ 2008-01-16  Jean-Louis Martineau <martineau@zmanda.com>
+       * oldrecover-src/extract_list.c, client-src/sendbackup.c,
+         client-src/sendsize.c, client-src/selfcheck.c,
+         recover-src/extract_list.c, server-src/changer.c,
+         server-src/amflush.c, server-src/driverio.c,
+         common-src/pipespawn.c: Call safe_fd before exec*.
+ 2008-01-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * packaging/rpm/amanda.spec: Remove build_host.
+ 2008-01-15  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/Amanda/Types.swg perl/Amanda/Config.swg perl/Amanda/Device.swg
+         perl/amglue/integers.swg: fix typos and compiler warnings
+ 2008-01-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * packaging/Makefile.am: New file.
+       * packaging/README: New file.
+       * packaging/rpm/buildpkg: New file.
+       * packaging/rpm/amanda.spec: New file.
+       * configure.in
+       * config/amanda/dirs.m4 (AMANDA_WITH_DUMPERDIR): Give a warning if used.
+       * config/amanda/dirs.m4 (AMANDA_EXPAND_DIRS): Expand DUMPER_DIR to
+                                        ${amlibexecdir}/application
+       * Makefile.am (SUBDIRS): Add packaging.
+       * amanda.spec: Remove file.
+ 2008-01-15  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/Makefile.am (AM_CFLAGS): Set to $(AMANDA_WARNING_CFLAGS)
+       * device-src/tape-device.c, device-src/tape-posix.c,
+         device-src/vfs-device.c: include "util.h"
+       * device-src/rait-device.c: fix compiler warning.
+ 2008-01-14  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/amglue/bigint.c: fix the range-checking mechanics for large
+         integers, since the precompiler seems to get confused by large
+         constants.
+ 2008-01-14  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/amanda/krb5-security.m4: abort configure run if krb5
+         is requested by libraries aren't found
+ 2008-01-13  Dustin J. Mitchell <dustin@zmanda.com>
+       * man/xml-source/amanda.conf.5.xml: use &#215; instead of &times;
+ 2008-01-11  Paddy Sreenivasan <paddy@zmanda.com>
+       * device-src/Makefile.am: Don't install queueing.h and device.h
+ 2008-01-11  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/Amanda/Config.swg perl/Amanda/Debug.swg: complete documentation
+ 2008-01-11  Jean-Louis Martineau <martineau@zmanda.com>
+       * amandad-src/Makefile.am: Install amandad in $libexecdir/amanda
+       * installcheck/amgetconf.pl: usetimestamps defaults to yes.
+       * NEWS, ReleaseNotes: Notes about make installcheck.
+ 2008-01-11  Jean-Louis Martineau <martineau@zmanda.com>
+       * NEWS: Add amcryptsimple, amgpgcrypt, amserverconfig and amaddclient.
+       * ReleaseNotes: Ditto.
+ 2008-01-11  Jean-Louis Martineau <martineau@zmanda.com>
+       * ReleaseNotes: Update for amanda-2.6.0
+       * News: Update for amanda-2.6.0
+       * configure.in: AM_INIT_AUTOMAKE(amanda, "2.6.0b1")
+       * Makefile.am (pkgdata_DATA): Add NEWS, ChangeLog and amanda.spec
+       * amanda.spec: %{!?amanda_version: %define amanda_version 2.6.0b1}
+ 2008-01-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/conffile.c (usetimestamps): Default ot yes.
+       * man/xml-source/amanda.conf.5.xml (usetimestamps): Document it.
+ 2008-01-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amverifyrun.sh, server-src/amverify.sh,
+         tape-src/ammt.c, tape-src/amdd.c: Write deprecated message.
+ 2008-01-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/defaults.m4: Set amandates to $localstatedir/amanda/amandate
+ 2008-01-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amfreetapes.sh: Use amlibexecdir.
+ 2008-01-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/dirs.m4: Set amlibexecdir to $libexecdir/amanda.
+       * amandad-src/amandad.c, amplot/amplot.sh,
+         amplot/Makefile.am, changer-src/chg-chs.sh,
+         changer-src/chg-disk.sh, changer-src/chg-juke.sh,
+         changer-src/chg-lib.sh.in, changer-src/chg-manual.sh,
+         changer-src/chg-mcutil.sh, changer-src/chg-mtx.sh,
+         changer-src/chg-multi.sh, changer-src/chg-null.sh,
+         changer-src/chg-rait.sh, changer-src/chg-rth.pl,
+         changer-src/chg-zd-mtx.sh, changer-src/Makefile.am,
+         client-src/Makefile.am, client-src/patch-system.sh,
+         client-src/selfcheck.c, client-src/sendbackup-dump.c,
+         client-src/sendbackup-gnutar.c, client-src/sendsize.c,
+         common-src/amaespipe.sh, common-src/amanda-sh-lib.sh.in,
+         common-src/amcrypt-ossl-asym.sh, common-src/amcrypt-ossl.sh,
+         common-src/amcrypt.sh, common-src/genversion.c,
+         common-src/local-security.c, common-src/Makefile.am,
+         common-src/rsh-security.c, common-src/ssh-security.c,
+         dumper-src/amgtar.pl, example/xinetd.amandaclient,
+         example/xinetd.amandaserver, installcheck/amgetconf.pl,
+         perl/Amanda/Changer.pm, perl/Amanda/Paths.pm.in,
+         restore-src/Makefile.am, server-src/amcheck.c,
+         server-src/amcheckdb.sh, server-src/amcleanup.sh,
+         server-src/amdump.sh, server-src/amflush.c,
+         server-src/amoverview.pl, server-src/amrmtape.sh,
+         server-src/amverifyrun.sh, server-src/amverify.sh,
+         server-src/changer.c, server-src/driver.c,
+         server-src/getconf.c, server-src/Makefile.am,
+         tape-src/Makefile.am: Use amlibexecdir.
+ 2008-01-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/flags.m4 (AMANDA_STATIC_FLAGS):
+         Set AMANDA_STATIC_LDFLAGS to '-static' if set.
+       * configure.in: Call AMANDA_STATIC_FLAGS.
+       * amandad-src/Makefile.am, changer-src/Makefile.am,
+         client-src/Makefile.am, common-src/Makefile.am,
+         dumper-src/Makefile.am, oldrecover-src/Makefile.am,
+         recover-src/Makefile.am, restore-src/Makefile.am,
+         server-src/Makefile.am,
+         tape-src/Makefile.am(AM_LDFLAGS): Set to AMANDA_STATIC_LDFLAGS.
+ 2008-01-09  Jean-Louis Martineau <martineau@zmanda.com>
+       * configure.in (AC_CONFIG_FILES): Add example/template.d/amanda-S3.conf
+       * example/Makefile.am (dist_template_DATA): Add
+                                                   template.d/amanda-S3.conf
+ 2008-01-09  Jean-Louis Martineau <martineau@zmanda.com>
+       * changer-src/scsi-solaris.c: Cleanup.
+ 2008-01-09  Ian Turner <ian@zmanda.com>
+       * changer-src/chg-zd-mtx.sh.in: Don't write a corrupt changerfile
+         when a tape has no barcode label.
+ 2008-01-08  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amcheckdump.pl: call critical() rather than
+         using die().
+ 2008-01-08  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amcheckdump.pl: Parse 'amflush: starttime' and
+                                    'planner: timestamp' line.
+       * server-src/amflush.c: Print correct starttime line.
+ 2008-01-08  Ian Turner <ian@zmanda.com>
+       Most of this work was done by Dustin J. Mitchell
+       <dustin@zmanda.com>, with contributions by Ian Turner <ian@zmanda.com>.
+       * example/template.d/amanda-S3.conf.in: Example configuration
+         using Amazon S3.
+       * device-src/device.c: Register the S3 device.
+       * device-src/tests/get-activation-key.pl: Tool to retrieve 
+         a DevPay activation key.
+       * device-src/s3-device.c, device-src/s3-device.h: S3 device driver.
+       * device-src/s3.c, device-src/s3.h: Network support for S3 driver.
+       * device-src/property.c, device-src/property.h: Register S3
+         authentication properties.
+       * device-src/activate-devpay.c: Tool to convert a devpay 
+         activation key into user tokens.
+       * device-src/Makefile.am: Support all these new files.
+       * configure.in: Check S3 prerequesites.
+       * config/amanda/s3-device.m4: Check if the S3 device should be
+         built.
+       * config/amanda/libs.m4: Code to check for libcurl version and
+         features.
+       * common-src/util.c: Use libcurl header.
+ 2008-01-08  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amcheckdump.pl: call critical() rather than
+         using die().
+ 2008-01-08  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/local-security.c: New 'local' security driver.
+       * common-src/security.c (drivers): Add local_security_driver
+       * common-src/Makefile.am (libamanda_la_SOURCES): Add local-security.c
+       * man/xml-source/amanda.conf.5.xml,
+         man/xml-source/amanda-client.conf.5.xml,
+         example/amanda-client.conf.in,
+         example/template.d/dumptypes: Document 'local' security driver.
+ 2008-01-08  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amcheckdump.pl perl/Amanda/Util.swg: don't use
+         the C safe_fd, which kills the Perl debugger; just check
+         that fd's 0-2 are open
+ 2008-01-08  Dustin J. Mitchell <dustin@zmanda.com>
+       * perl/Amanda/Types.swg perl/Makefile.am: add new Amanda::Types module
+       to contain data structures common to several other modules.
+       * perl/Amanda/Device.swg: move dumpfile_t to Amanda::Types
+       * installcheck/Amanda_Types.pl installcheck/Makefile.am: simple tests
+         for the new module
+       * common-src/fileheader.c common-src/fileheader.h: build_header
+         now takes a precise size, not a minimum.
+ 2008-01-08  Jean-Louis Martineau <martineau@zmanda.com>
+       * recover-src/amrecover.c: Call apply_config_overwrites before
+                                  config_init(CONFIG_INIT_EXPLICIT_NAME ...)
+ 2008-01-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c (strquotedstr, hexdump): Remove function.
+       * common-src/util.h (strquotedstr, hexdump): Remove prototype.
+       * common-src/fileheader.c (strquotedstr, hexdump): Add function.
+       * common-src/fileheader.c (strquotedstr): Fix.
+ 2008-01-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * perl/Amanda/Changer.pm: Use Amanda::Config::get_config_dir().
+ 2008-01-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/automake/scripts.am: Don't set CHECK_PERL.
+       * changer-src/Makefile.am: Set CHECK_PERL.
+       * client-src/Makefile.am: Set CHECK_PERL.
+       * dumper-src/Makefile.am: Set CHECK_PERL.
+       * common-src/Makefile.am: Set CHECK_PERL.
+ 2008-01-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/krb5-security.c: Fix argument to resolve_hostname.
+       * config/amanda/krb4-security.m4: Check .a or .so lib.
+       * config/amanda/krb5-security.m4: Check .a or .so lib.
+ 2008-01-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/Makefile.am: Merge typo.
+       * example/Makefile.am: Merge Typo.
+ 2007-12-27  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in config/amanda/printf.m4: remove unused
+         configure checks
+ 2007-12-27  Paddy Sreenivasan <paddy@zmanda.com>
+       * server-src/reporter.c: Check for NULL mailto
+ 2007-12-27  Satya Ganga <gsat@zmanda.com>
+       * server-src/amserverconfig.pl: holding disk will be created
+         only if we have at least 1G free space in the Amanda home dir
+ 2007-12-27  Ian Turner <ian@zmanda.com>
+       * server-src/taperscan.c server-src/taper.c: only print error_message
+         if it is non-NULL
+ 2007-12-27  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amrmtape.sh: remove @DB_EXT@, which no longer
+         exists (since 2007-10-09).
+ 2007-12-26  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amverify.sh: fix multiple non-portable shell
+         techniques
+ 2007-12-23  Dustin J. Mitchell <dustin@zmanda.com>
+       Large-scale merge of perl interface to Amanda, along with
+       a fleet of related changes.  Patch authors are given for
+       changes not made by Dustin.
+       * perl/Makefile.am config/amanda/swig.m4: use
+         ExtUtils::Embed::perl_inc() to get the include directory
+         and let Amanda's compiler/linker flags and libtool take
+         care of the rest
+       * perl/Amanda/Config.swg: use accessors for config_name, 
+         config_filename, and config_dir 
+       * server-src/amcheckdump.pl server-src/amdevcheck.pl
+         perl/Amanda/Util.swg installcheck/Amanda_Config.pl: use
+         new accessors
+       * perl/Amanda/Util.swg common-src/amanda.h: use a .-relative
+         path in two #include directives to avoid accidentally 
+         including perl's headers of the same name; this is a temporary
+         hack until a larger-scale overhaul of Amanda's headers is done.
+       * config/amanda/swig.m4: error out if shared libraries are disabled
+       * server-src/amcheckdump.pl: Use timestamp from latest
+         amdump.1 or amflush.1 log file.  (Jean-Louis Martineau
+         <martineau@zmanda.com>)
+       * server-src/amcheckdump.pl: Output partnum.  (Jean-Louis
+         Martineau <martineau@zmanda.com>)
+       * server-src/amcheckdump.pl: Add a '/' after the config name.
+       (Jean-Louis Martineau <martineau@zmanda.com>)
+       * perl/Amanda/Logfile.swg perl/Amanda/Device.swg perl/Makefile.am
+         perl/amglue/integers.swg perl/amglue/amglue.h
+         perl/amglue/amglue.swg perl/amglue/glib.swg
+         perl/amglue/bigint.c: Always use Math::BigInt to convert numeric 
+         quantities from C to Perl, to avoid integer overflow and automatic
+         promotion to double.
+       * perl/Amanda/Debug.swg client-src/versionsuffix.c
+         common-src/util.c common-src/util.h common-src/debug.c
+         common-src/debug.h common-src/conffile.c
+         common-src/conffile.h common-src/file.c common-src/file.h:
+         - move get_/set_pname to util.c
+         - rename RunningAsWho to running_as_flags
+         - cache original cwd before changing it in safe_cd, and use the
+           cached value in conffile
+       * server-src/logfile.c: call set_logerror in open_log
+       * client-src/runtar.c common-src/debug.c common-src/amanda.h
+         common-src/file.c common-src/file.h: replace client_uid,
+         client_gid globals with functions, to eliminate the need
+         for initialization
+       * server-src/logfile.c: Update warning about globals
+       * server-src/find.c: Update search_logfile to possibly search
+         all tapes in a logfile. Also, other miscellaneous
+         refactoring.  (Ian Turner <ian@zmanda.com>)
+       * server-src/find.h: Document new interface.
+       * server-src/amindexd.c, server-src/amadmin.c,
+         server-src/amtrmidx.c, restore-src/amfetchdump.c: Use new
+         find_dump interface.
+       * common-src/util.c, common-src/util.h: New function
+         compare_possibly_null_strings, which is like strcmp() but
+         orders NULL pointers before non-null strings.
+       * Makefile.am: reflect BINARY_OWNER into distcheck-triggered
+         ./configure
+       * common-src/conffile.c common-src/conffile.h: completely
+         new API, almost complete rewrite
+       * common-src/columnar.c common-src/columnar.h
+         common-src/Makefile.am: new files, extracted from
+         conffile.[ch]
+       * oldrecover-src/amrecover.c oldrecover-src/extract_list.c
+         changer-src/chg-scsi-chio.c changer-src/chg-scsi.c
+         client-src/sendbackup.c client-src/sendsize.c
+         client-src/selfcheck.c amandad-src/amandad.c
+         device-src/device.c recover-src/amrecover.c
+         recover-src/extract_list.c server-src/diskfile.h
+         server-src/logfile.c server-src/amlogroll.c
+         server-src/amindexd.c server-src/amcheck.c
+         server-src/dumper.c server-src/planner.c
+         server-src/chunker.c server-src/amadmin.c
+         server-src/amtape.c server-src/amcleanupdisk.c
+         server-src/getconf.c server-src/amflush.c
+         server-src/amtrmlog.c server-src/driverio.c
+         server-src/holding.c server-src/driverio.h
+         server-src/driver.c server-src/reporter.c server-src/taper.c
+         server-src/find.c server-src/amindex.c server-src/amtrmidx.c
+         server-src/diskfile.c server-src/amlabel.c
+         perl/Amanda/Config.swg config/amanda/defaults.m4
+         restore-src/amidxtaped.c restore-src/amrestore.c
+         restore-src/restore.c restore-src/amfetchdump.c
+         common-src/util.h common-src/glib-util.c tape-src/tapeio.c
+         common-src/amanda.h tape-src/tapeio.h: use new conffile API
+       * installcheck/Makefile.am installcheck/Amconfig.pm.in
+         installcheck/Installdirs.pm.in installcheck/Amanda_Config.pl
+         installcheck/Amanda_Changer.pl installcheck/Amanda_Cmdline.pl
+         installcheck/Amanda_Logfile.pl installcheck/amcheckdump.pl
+         installcheck/amdevcheck.pl installcheck/amgetconf.pl:
+         new unit tests for new modules, applications
+       * server-src/amdevcheck.pl server-src/amcheckdump.pl: new pure-
+         Perl applications; amcheckdump.pl is by Ian Turner
+         <ian@zmanda.com>
+       * perl/Amanda perl/Makefile.am perl/Amanda/Paths.pm.in
+         perl/Amanda/Logfile.swg perl/Amanda/Changer.pm
+         perl/Amanda/Config.swg perl/Amanda/Debug.swg
+         perl/Amanda/Tapefile.swg perl/Amanda/Cmdline.swg
+         perl/Amanda/Util.swg perl/Amanda/Device.swg: new directory
+         containing perl interfaces to Amanda modules
+       * perl/amglue perl/amglue/integers.swg perl/amglue/amglue.h
+         perl/amglue/exports.swg perl/amglue/ghashtable.c
+         perl/amglue/amglue.swg perl/amglue/constants.swg
+         perl/amglue/glib.swg perl/amglue/bigint.c: functions and
+         macros to glue Amanda to perl
+ 2007-12-21  Satya Ganga <gsat@zmanda.com>
+       * server-src/amserverconfig.pl: correct holding disk size
+         validation logic so that it works on solaris too
+ 2007-12-21  Satya Ganga <gsat@zmanda.com>
+       * server-src/amserverconfig.pl: amserverconfig needs to create a empty
+         changer.conf file
+ 2007-12-21  Jean-Louis Martineau <martineau@zmanda.com>
+       Bug reported by Tim Bunnell.
+       * client-src/getfsent.c (dev2rdev): Do it only for block device.
+ 2007-12-21  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/taper.c: Unquote holding_disk_file.
+ 2007-12-20  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/debug.h: fix (cosmetic, but confusing) typo
+ 2007-12-19  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c (quote_string): Quote ':'.
+ 2007-12-19  Ian Turner <ian@zmanda.com>
+       * server-src/taper.c: Don't crash if there is a problem writing a
+         brand new tape.
+ 2007-12-19  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/planner.c: Correctly set planner_timestamp if
+                               usetimestamps is set to no.
+ 2007-12-18  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/driverio.c (childstr): Check dumper->chunker.
+ 2007-12-14  Ian Turner <ian@zmanda.com>
+       * device-src/tape-device.c: Try to open tape devices as O_NONBLOCK
+         at first; if the device is not ready, we will let the changer script
+         retry, instead of having the kernel do it for us.
+       * device-src/tape-ops.h, device-src/tape-aix.c,
+         device-src/tape-uware.c, device-src/tape-xenix.c,
+         device-src/tape-posix.c: Add new tape_is_ready() function.
+ 2007-12-14  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/dumpers.m4: Don't set STAR in AMANDA_PROG_SAMBA_CLIENT.
+ 2007-12-14  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/find.c (search_logfile): Parse taper result line before
+                                             merging part_find.
+ 2007-12-14  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/find.c (find_log): Result should not have duplicate
+                                       logfile.
+ 2007-12-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amstatus.pl: Parse NEW-TAPE line
+       * server-src/taper.c: Add the handle in NEW-TAPE result.
+       * server-src/driver.c: Check number of arguments in NEW-TAPE result.
+ 2007-12-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/progs.m4: Define AMLINT To 'echo;false' to no lint
+                                 are found.
+ 2007-12-10  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/bsdudp-security.c: Loop over all address until a bind
+                                       is successful.
+       * common-src/bsd-security.c: Loop over all address until a bind
+                                    is successful.
+       * common-src/stream.c: Loop over all address until a connect is
+                              successful.
+ 2007-12-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amindexd.c: Don't use duplicate part.
+ 2007-12-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * restore-src/amfetchdump.c: Don't use duplicate part.
+ 2007-12-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/holding.c (holding_get_all_datestamps): Don't add
+         duplicate datestamp.
+ 2007-12-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amcheck.c: Don't complain about correct unlabeled
+                               volumes.
+ 2007-12-06  Jean-Louis Martineau <martineau@zmanda.com>
+       * client-src/sendbackup.c, client-src/sendsize.c,
+         client-src/selfcheck.c, client-src/calcsize.c,
+         amandad-src/amandad.c, device-src/device.c,
+         device-src/vfs-device.c, server-src/changer.c,
+         server-src/dumper.c, server-src/planner.c,
+         server-src/chunker.c, server-src/server_util.c,
+         server-src/taperscan.c, server-src/driver.c,
+         server-src/taper.c, server-src/find.c,
+         server-src/diskfile.c, common-src/pipespawn.c,
+         common-src/util.c, common-src/conffile.c: Fix memory leak.
+ 2007-12-06  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/find.c (search_logfile): Parse PARTPARTIAL line.
+ 2007-12-06  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/taper.c: Use g_strdup if pointer can be NULL.
+ 2007-12-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/taperscan.c: Don't output the latest changer result.
+ 2007-12-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c (resolve_hostname): Take a new socktype argument.
+       * common-src/util.h (resolve_hostname): New prototype.
+       * common-src/bsd-security.c, common-src/bsdtcp-security.c,
+         common-src/bsdudp-security.c, common-src/krb5-security.c,
+         common-src/rsh-security.c, common-src/security-util.c,
+         common-src/ssh-security.c, common-src/stream.c,
+         recover-src/set_commands.c, server-src/amcheck.c,
+         server-src/dumper.c: Call resolve_hostname with socktype argument.
+ 2007-12-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c (resolve_hostname): Don't return V4MAPPED address.
+       * common-src/amanda.h (AI_V4MAPPED, AI_ALL): Don't define.
+ 2007-12-04  Ian Turner <ian@zmanda.com>
+       * server-src/taperscan.c, server-src/taperscan.h: Support persistence
+         between invocations of taper_scan(), so that you can get second-best
+         and further tapes.
+       * server-src/amcheck.c, server-src/amtape.c: Use the new taperscan 
+         interface.
+       * server-src/taper.c: Do the right thing if there is an error writing
+         the tape label.
+ 2007-12-04  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amtape.c: Correctly output the result of taper scan.
+ 2007-12-04  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amcheck.c, server-src/dumper.c
+         server-src/planner.c: Don't crash is securoty driver is not found.
+ 2007-12-04  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/changer.c: Print better message if the changer script
+                               has no output.
+ 2007-12-03  Jean-Louis Martineau <martineau@zmanda.com>
+       * man/xml-source/amserverconfig.8.xml: Fix indentation.
+ 2007-11-30  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/taper-mem-port-source.c, server-src/taper-file-source.c
+         server-src/taper.c: Cast guint64 to uintmax_t and use %ju to print.
+ 2007-11-30  Jean-Louis Martineau <martineau@zmanda.com>
+       * man/xml-source/amanda.conf.5.xml: Improve documentation.
+       * example/amanda.conf.in: Ditto.
+ 2007-11-30  Jean-Louis Martineau <martineau@zmanda.com>
+        * server-src/server_util.c (cmdstr): Remove SPLIT-NEEDNEXT
+                                             and SPLIT-CONTINUE
+        * server-src/server_util.h (cmd_t): Remove SPLIT_NEEDNEXT
+                                            and SPLIT_CONTINUE.
+        * server-src/taper.c: Send part_kbyte in PARTDONE result.
+        * server-src/amstatus.pl: Parse part_kbyte in PARTDONE result line.
+                                  Parse REQUEST-NEW_TAPE line.
+        * common-src/conffile.h: CONF_FLUSH_THRESHOLD_DUMPED,
+                               CONF_FLUSH_THRESHOLD_SCHEDULE, CONF_TAPERFLUSH.
+        * common-src/conffile.c: CNF_FLUSH_THRESHOLD_DUMPED,
+                                 CNF_FLUSH_THRESHOLD_SCHEDULE, CNF_TAPERFLUSH.
+        * server-src/driverio.h: Add Many globals.
+        * server-src/driver.c: Split runq in runq and directq.
+                               Implement flush-threshold-*/taperflush.
+        * example/amanda.conf.in: Example for flush-threshold-* and taperflush.
+        * man/xml-source/amanda.conf.5.xml: Document flush-threshold-*
+                                          and taperflush.
+ 2007-11-30  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/taperscan.c: Fix output formating.
+ 2007-11-30  Jean-Louis Martineau <martineau@zmanda.com>
+       * recover-src/set_commands.c: Add a terminating '/' in cd_regex.
+                                     Never add it in cd_dir.
+ 2007-11-30  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/automake/scripts.am: Build of the scripts also depend on
+                                     $(top_builddir)/config.status
+ 2007-11-30  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amdump.sh: Pass a --startime argument to planner.
+       * server-src/planner.c: Get the --starttime command line argument.
+ 2007-11-30  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amstatus.pl: New --locale-independent-date-format option.
+       * man/xml-source/amstatus.8.xml: Document it.
+       * server-src/amflush.c: Output a "starttime-locale-independent" line.
+       * server-src/amdump.sh: Output a "starttime-locale-independent" line.
+ 2007-11-30  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/find.c: Remove seen_chunk_of function.
+ 2007-11-28  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/macro-archive/docbook-dtd.m4: Check return code of 5.
+ 2007-11-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * installcheck/Amconfig.pm.in: fix quoting error leading to
+       directories named '"'
+ 2007-11-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/file.c: only chown new directories when running as root
+ 2007-11-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/automake/installperms.am: strip directory names from build
+         filenames when setting permissions; fixes errors from examples/
+         install
+ 2007-11-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * man/Makefile.am: Allow installs, but not tarballs, without
+         manpages
+ 2007-11-27  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/planner.c: Check dp->todo before using (est)->dp.
+ 2007-11-27  Jean-Louis Martineau <martineau@zmanda.com>
+       * device-src/device.c (default_device_start): Overwrite label only
+                                                     if mode == ACCESS_WRITE.
+ 2007-11-20  Ian Turner <ian@zmanda.com>
+       * device-src/device.c, device-src/device.h
+         device-src/tape-device.c, device-src/rait-device.c: Change API
+         semantics with respect to label reading. This patch makes it
+         possible to open and read a volume with properties while only
+         reading its label once. Thanks to Jean-Louis Martineau
+         <martineau@zmanda.com> for suggesting this change.
+ 2007-11-20  Ian Turner <ian@zmanda.com>
+       * device-src/vfs-device.c: Be more thourough about updating volume
+         usage statistics.
+ 2007-11-20  Ian Turner <ian@zmanda.com>
+       * changer-src/chg-lib.sh.in: Use a more robust check for MT path.
+       * server-src/amverify.sh.in: Use amrestore instead of amdd/ammt.
+ 2007-11-09  Ian Turner <ian@zmanda.com>
+       * server-src/taperscan.c: Fix a memory allocation bug and be a little
+         more paranoid.
+ 2007-11-06  Ian Turner <ian@zmada.com>
+       * server-src/taperscan.c: Print a proper message if there is
+         only one flag from device_read_label().
+ 2007-11-26  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in config/amanda/config.m4 common-src/genversion.c
+         common-src/Makefile.am: explicitly generate svn info at configure
+         time, rather than relying on svn keywords
+ 2007-11-26  Ian Turner <ian@zmanda.com>
+       * server-src/Makefile.am: Move amdevcheck from libexec/ to sbin/.
+         Thanks to Satya Ganga <gsat@zmanda.com> for noticing this problem.
+       
+ 2007-11-26  John Franks <jrfranks@zmanda.com>
+       * common-src/debug.c    For cygwin builds: change to
+         close and reopen log file handle on successful rename.
+         This is to ensure that Windows has no possibility of
+         preventing access to the original file name if processes
+         collide.
+               
+ 2007-11-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amflush.c: Send config option (-o) to child process.
+ 2007-11-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/planner.c: Don't set est(dp)->state before testing it.
+ 2007-11-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/readline.m4: Include termcap, curses or ncurese in LIBS.
+ 2007-11-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/diskfile.c (match_disklist): Fix for disk not found.
+ 2007-11-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/driver.c: Don't release taper_ev_read in
+                                start_degraded_mode.
+ 2007-11-20  Paddy Sreenivasan <paddy@zmanda.com>
+         * amanda.spec: Added calls to Zmanda
+       * example/amanda-client.conf.in: Switch to bsdtcp
+ 2007-11-14  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amstatus.pl: Handle taper FAILED message.
+ 2007-11-14  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/amanda/userid.m4: Use $enableval in AC_ARG_ENABLE.
+ 2007-11-07  Paddy Sreenivasan <paddy@zmanda.com>
+       * server-src/amserverconfig.pl server-src/amaddclient.pl: 
+           new configuration tools
+       * common-src/amgpgcrypt.pl common-src/amcryptsimple.pl: 
+           new encryption plugins
+       * man/xml-source/amaddclient.8.xml man/xml-source/amgpgcrypt.8.xml 
+           man/xml-source/amcryptsimple.8.xml 
+         man/xml-source/amserverconfig.8.xml: man pages for new tools
+       * example/template.d/* - Configuration file templates
+       * example/amanda-client.conf.in: Updated amanda configuration file
+       * example/Makefile.am man/Makefile.am server-src/Makefile.am
+           common-src/Makefile.am: Added amserverconfig, amaddclient, 
+           amgpgcrypt and amcryptsimple
+       * device-src/Makefile.am: Fixed libamdevice version
+       * configure.in: Added template files
+         * amanda.spec: Updated spec file for new utilities
+ 2007-11-01  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/automake/installperms.am: new method of specifying
+         permissions on installed files
+       * config/amanda/userid.m4 configure.in: add --disable-installperms
+         to disable any permsisions settings (useful for packaging builds)
+       * oldrecover-src/Makefile.am example/Makefile.am
+         changer-src/Makefile.am amplot/Makefile.am
+         client-src/Makefile.am amandad-src/Makefile.am man/Makefile.am
+         dumper-src/Makefile.am recover-src/Makefile.am
+         server-src/Makefile.am restore-src/Makefile.am
+         Makefile.am support/Makefile.am common-src/Makefile.am
+         tape-src/Makefile.am: use installperms.am
+ 2007-11-01  Dustin J. Mitchell <dustin@zmanda.com>
+       Suggested by Jon LaBadie
+       * config/automake/precompile.am: new rule to make
+         precompiler output files; useful for debugging
+       * */Makefile.am: include precompile.am
+ 2007-11-01  Jean-Louis Martineau <martineau@zmanda.com>
+       * AUTHORS: Add Dustin J. Mitchell.
+ 2007-10-31  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * most C files, amanda.h: Switch to using the g_printf family, which
+         supports a consistent set of %-conversions, including the 'z'
+         (size_t) and 'j' (intmax_t) size specifiers.  Convert various
+         printf format strings accordingly.
+ 2007-10-31  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/genversion.c common-src/Makefile.am: fix BUILD_REV
+         and BUILD_BRANCH to work even when packages are built from
+         distribution tarballs
+ 2007-10-31  Ian Turner <ian@zmanda.com>
+       * server-src/taperscan.c: Don't segfault if there is an error opening
+         a device during taperscan.
+ 2007-10-30  Dustin J. Mitchell <dustin@zmanda.com>
+       * docs autogen INSTALL UPGRADING configure.in 
+         DEVELOPING Makefile.am: remove docs/ directory in favor of
+         manpages and online reference; most docs/* were outdated
+ 2007-10-29  Dustin J. Mitchell <dustin@zmanda.com>
+       * changer-src/chg-zd-mtx.sh: fix typo
+ 2007-10-29  Ian Turner <ian@zmanda.com>
+       * restore-src/restore.c: Don't mention slot numbers when running
+         without a changer.
+ 2007-10-29  Ian Turner <ian@zmanda.com>
+       * man/xml-source/amfetchdump.8.xml: Remove documentation for
+         amfetchdump -i.
+ 2007-10-26  Dustin J. Mitchell <dustin@zmanda.com>
+       Add support for post-install tests, which can be more thorough than
+       unit tests.
+       * configure.in Makefile.am installcheck/*: new directory
+       * installcheck/amgetconf.pl: test some of amgetconf's functionality
+       * docs/developing.txt: notes on various test mechanisms
+       * config/automake/scripts.am: add CHECK_PERL_FLAGS
+       * common-src/debug.c: only try to chown debug files if running as root
+ 2007-10-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/mkinstalldirs config/depcomp config/config.guess
+         config/ltmain.sh config/config.sub config/missing
+         config/install-sh config/ylwrap: update files with automake-1.10, 
+         libtool-1.5.24
+       * autogen: don't call automake with --add-missing, as it stomps all
+         over the working copy
+ 2007-10-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * gnulib/* config/*: updated to latest gnulib
+       * gnulib/regenerate/regenerate: update gnulib date
+       * gnulib/regenerate/getaddrinfo-cygwin.patch: update to patch new
+         getaddrinfo.c
+       * device-src/tests/vfs_test.c: mkdtemp.h no longer exists
+ 2007-10-24  Jean-Louis Martineau <martineau@zmanda.com>
+       * client-src/Makefile.am: Remove duplicate entry for
+                                 libamclient_la_SOURCES.
+ 2007-10-23  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/automake/scripts.am: rules to build (substitute) scripts
+       * config/automake/vars.am: define empty variables for later appending
+       * config/automake/check-perl.am config/automake/check-shell.pm:
+         removed
+       * changer-src/Makefile.am amplot/Makefile.am client-src/Makefile.am
+         dumper-src/Makefile.am server-src/Makefile.am 
+         common-src/Makefile.am: Use new include files
+       * configure.in: remove now-unnecessary AC_CONFIG_FILES
+       * *.sh.in *.pl.in *.awk.in: renamed
+ 2007-10-20  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/reporter.c: Always call sort_disks.
+ 2007-10-20  Jean-Louis Martineau <martineau@zmanda.com>
+       * man/xml-source/amanda.conf.5.xml: Correctly document portrange.
+       * common-src/conffile.c: Fix portrange.
+ 2007-10-20  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/conffile.c: Allow reserved-udp-port and reserved-tcp-port
+                                in amanda-client.conf.
+ 2007-10-17  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/amanda.h: remove amflock cruft
+ 2007-10-16  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/amanda/defaults.m4: Change EXAMPLE_TAPEDEV to use the 'tape:'
+       syntax, and to indicate "you need to change this!" more explicitly
+ 2007-10-16  Ian Turner <ian@zmanda.com>
+       * common-src/glib-util.c: Allow use of units in parsing GValues; in
+         particular, this allows use of units when specifying device
+         properties in the configuration file.
+       * common-src/conffile.c, common-src/conffile.h: Make unit suffixes
+         available outside of conffile.c.
+ 2007-10-16  Ian Turner <ian@zmanda.com>
+       * device-src/device.c: Fix a compilation error in
+         device_set_startup_properties_from_config().
+ 2007-10-16  Ian Turner <ian@zmanda.com>
+       * man/xml-source/amanda.conf.5.xml, server-src/taper.c,
+         common-src/conffile.c, common-src/conffile.h: Add new
+         configuration directive device_output_buffer_size to replace
+         tapebufs.
+ 2007-10-15  Ian Turner <ian@zmanda.com>
+       * device-src/device.c: Don't complain about problems setting
+         MAX_VOLUME_USAGE; do complain about problems setting
+         READ_BUFFER_SIZE.
+ 2007-10-16  Jean-Louis Martineau <martineau@zmanda.com>
+       * client-src/sendbackup-gnutar.c: Use GNUTAR.
+ 2007-10-15  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/device.c: do not fall back to tape:/foo if the tape
+         device is not available (WANT_TAPE_DEVICE is not set)
+ 2007-10-12  Dustin J. Mitchell <dustin@zmanda.com>
+       * changer-src/chg-mtx.sh.in changer-src/chg-zd-mtx.sh.in
+         changer-src/chg-multi.sh.in: add missing definition of prefix
+ 2007-10-12  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/protocol.c (s_repwait): return PA_FINISH on P_NAK.
+ 2007-10-11  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/amanda/tape.m4: fix typo (have_MTIOCTOP -> HAVE_MTIOCTOP)
+ 2007-10-10  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/amflock-test.c common-src/amflock-lnlock.c: don't use
+         AMANDA_TMPDIR during build-time testing
+ 2007-09-14  Dustin J. Mitchell <dustin@zmanda.com>
+       * recover-src/uscan.l recover-src/extract_list.c 
+         recover-src/uparse.y recover-src/amrecover.h 
+         recover-src/help.c recover-src/set_commands.c: deprecate
+         'settape', add 'setdevice'
+       * man/xml-source/amrecover.8.xml: corresponding doc update
+       * example/amanda.conf.in: update comments in example config, 
+         change default value of amrecover_changer from the confusing
+         "/dev/null"
+ 2007-10-09  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/amflock-test.c: lock files in the cwd, rather than /tmp,
+         and pay attention to errors from unlink()
+ 2007-10-09  Dustin J. Mitchell <dustin@zmanda.com>
+       * gnulib/regenerate/regenerate gnulib/mkdtemp.c gnulib/mkdtemp.h
+         gnulib/gettimeofday.c gnulib/sys_time_.h gnulib/tempname.c
+         gnulib/tempname.h gnulib/stat_.h gnulib/Makefile.am
+         device-src/tests/vfs_test.c config/gnulib/mkdtemp.m4
+         config/gnulib/sys_time_h.m4 config/gnulib/tempname.m4
+         config/gnulib/gnulib-comp.m4 config/gnulib/sys_stat_h.m4
+         config/gnulib/gnulib-cache.m4 config/gnulib/gettimeofday.m4:
+         add 'mkdtemp' gnulib module, use it in vfs_test.c
+ 2007-10-09  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c (portable_readdir): Don't use reentrant function.
+ 2007-10-08  Dustin J. Mitchell <dustin@zmanda.com>
+       * autogen configure.in config/macro-archive/*.m4
+         config/amanda/*.m4 config/libtool/*.m4: move most autoconf
+         checks to macros in .m4 files.  Hilights of changes along the way:
+         - use AC_REQUIRES to enforce check ordering
+         - Add a post-configure summary of important results
+         - use AM_CONDITIONAL to control conditional compilation of whole
+           files, instead of preprocessor macros
+         - correct spelling of PRINCIPLE -> PRINCIPAL
+         - remove support for dbmalloc (we use valgrind, coverity, etc. now)
+         - remove support for infofiles in anything but text format
+         - change DONT_SUID_ROOT to !WANT_SETUID_ROOT
+         - remove unused --with-broken-fsf
+         - remove multiple unused function and header checks, the defines
+           from which do not appear in any source file
+         - remove LTLIBOBJS cruft based on
+           http://www.delorie.com/gnu/docs/autoconf/autoconf_165.html
+         - remove unused LTALLOCA definition based on
+           http://www.delorie.com/gnu/docs/libtool/libtool_30.html
+         - use autoconf macro archive's
+           AC_DEFINE_DIR to expand $prefix, etc. in directory variables
+         - do not *require* --with-{user,group}; this allows 'make distcheck'
+           to run successfully
+       * docs/developing.txt: describe how to update gnulib, libtool, and
+         gettext
+       * po/reautopoint.patch po/reautopoint: script to update gettext,
+         parallel to gnulib/regenerate/regenerate
+       * amandad-src/amandad.c changer-src/scsi-aix.c
+         changer-src/scsi-bsd.c changer-src/scsi-cam.c
+         changer-src/scsi-changer-driver.c changer-src/scsi-chio.c
+         changer-src/scsi-hpux.c changer-src/scsi-hpux_new.c
+         changer-src/scsi-irix.c changer-src/scsi-linux.c
+         changer-src/scsi-proto.c changer-src/scsi-solaris.c
+         changer-src/sense.c client-src/calcsize.c client-src/getfsent.c
+         client-src/selfcheck.c client-src/sendbackup.c
+         client-src/sendsize.c common-src/alloc.c common-src/amanda.h
+         common-src/conffile.c common-src/debug.c common-src/file.c
+         common-src/genversion.c common-src/krb4-security.c
+         common-src/writev.c device-src/tape-posix.c server-src/amadmin.c
+         server-src/amcheck.c server-src/amlabel.c server-src/amlogroll.c
+         server-src/amtape.c server-src/amtrmidx.c server-src/amtrmlog.c
+         server-src/changer.c server-src/chunker.c server-src/diskfile.c
+         server-src/driver.c server-src/dumper.c server-src/getconf.c
+         server-src/infofile.c server-src/infofile.h server-src/planner.c
+         server-src/reporter.c tape-src/output-tape.c: changes corresponding
+         to simplifications and fixes in autoconf
+       * gnulib/regenerate/no-error.patch gnulib/regenerate/regenerate: no
+         need to create gnulib.m4i anymore
+ 2007-10-08  Kevin Till <ktill@zmanda.com>  (merged by dustin@zmanda.com)
+       * example/amanda.conf.in: add segate LTO tapetype
+ 2007-10-08  Paddy Sreenivasan <paddy@zmanda.com>
+       * changer-src/chg-lib.sh.in
+         changer-src/chg-null.sh.in changer-src/chg-disk.sh.in
+         changer-src/chg-juke.sh.in changer-src/chg-rait.sh.in
+         changer-src/chg-chs.sh.in changer-src/chg-mcutil.sh.in
+         amplot/amplot.sh.in client-src/patch-system.sh.in
+         server-src/amcheckdb.sh.in server-src/amverifyrun.sh.in
+         server-src/amrmtape.sh.in server-src/amverify.sh.in
+         server-src/amfreetapes.sh.in server-src/amcleanup.sh.in
+         server-src/amdump.sh.in common-src/amanda-sh-lib.sh.in
+         common-src/amcrypt-ossl-asym.sh.in common-src/amcrypt.sh.in
+         common-src/amaespipe.sh.in common-src/Makefile.am
+         common-src/amcrypt-ossl.sh.in: move amanda-sh-lib.sh from
+         $libexecdir/amanda to just $libexecdir
+ 2007-10-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/tests/Makefile.am device-src/tests/vfs_test.c: add a test
+         for the vfs device
+       * device-src/property.c device-src/vfs-device.c: add
+         PROPERTY_FREE_SPACE
+ 2007-10-04  Dan Locks <dwlocks@zmanda.com>
+       * amanda.spec: add .spec file Zmanda uses for community builds
+       
+ 2007-10-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/device.c device-src/Makefile.am configure.in: add
+         WANT_TAPE_DEVICE conditional, for machines that have no tape
+         support whatsoever (Mac OS X)
+ 2007-10-03  Dan Locks <dwlocks@zmanda.com>
+       * configure.in: Added /opt/local/bin AC_PATH_PROG(PKG_CONFIG.. for 
+         mac osx and macports
+ 2007-10-03  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/driver.c: Go in degraded mode after out of tape.
+ 2007-10-02  Jean-Louis Martineau <martineau@zmanda.com>
+       * man/xml-source/amanda.conf.5.xml: Fix indentation.
+ 2007-10-02  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amcheck.c: Fix typo in merge found by
+         martineau@zmanda.com
+ 2007-10-01  Ian Turner <ian@zmanda.com>
+       * device-src/rait-device.c, device-src/queueing.c,
+         device-src/tests/device_test.c, device-src/device.h,
+         device-src/device.c: Remove device_is_eof() function in favor of
+         accessing is_eof member directly.
+ 2007-10-01  Dustin J. Mitchell <dustin@zmanda.com>
+       Coverity bug #237
+       * amandad-src/amandad.c: fix a use-after-free
+ 2007-10-01  Ian Turner <ian@zmanda.com>
+       * device-src/device.c: Automatically register the CANONICAL_NAME
+         property for all devices.
+ 2007-10-01  Ian Turner <ian@zmanda.com>
+       * device-src/tape-posix.c: Use MTEOD on systems that have it but not
+         MTEOM.
+ 2007-10-01  Ian Turner <ian@zmanda.com>
+       * device-src/device.c, device-src/vfs-device.c,
+         device-src/rait-device.c: Use g_strdup() instead of strdup().
+ 2007-10-01  Ian Turner <ian@zmanda.com>
+       * changer-src/chg-lib.sh.in: Fix some compilation problems on
+         Solaris 10.
+ 2007-09-25  Dan Locks <dwlocks@zmanda.com>
+       * common-src/util.c: cast uid_t to long long for printf formatting
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * oldrecover-src/Makefile.am changer-src/Makefile.am
+         client-src/Makefile.am amandad-src/Makefile.am
+         recover-src/Makefile.am server-src/Makefile.am
+         restore-src/Makefile.am common-src/Makefile.am
+         tape-src/Makefile.am: replace -I../config with 
+         -I$(top_builddir)/config
+       * device-src/tests/Makefile.am: Replace -I.. with 
+         -I$(top_srcdir)/device-src
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/sendsize.c: change "smbclient" to SAMBA_CLIENT to allow
+         configurable name
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/amflock-flock.c common-src/amflock-posix.c
+         common-src/amflock-lockf.c common-src/amflock-lnlock.c
+         common-src/amflock.c: use G_GNUC_UNUSED to avoid compiler
+         warnings
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/amanda.h common-src/file.h: move declaration of 
+         canonicalize_pathname to file.h
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/util.c common-src/util.h: only check euid==uid
+         if not RUNNING_AS_UID_ONLY; set_root_privs() checks that euid=0
+       * client-src/runstar.c client-src/noop.c client-src/runtar.c
+         client-src/sendbackup.c client-src/killpgrp.c
+         client-src/sendsize.c client-src/selfcheck.c
+         client-src/rundump.c amandad-src/amandad.c
+         server-src/amlogroll.c server-src/amindexd.c
+         server-src/amcheck.c server-src/dumper.c server-src/planner.c
+         server-src/chunker.c server-src/amadmin.c server-src/amtape.c
+         server-src/amcleanupdisk.c server-src/amflush.c
+         server-src/amtrmlog.c server-src/amdevcheck.c
+         server-src/driver.c server-src/reporter.c server-src/taper.c
+         server-src/amtrmidx.c server-src/amlabel.c
+         restore-src/amidxtaped.c restore-src/amfetchdump.c:
+         remove RUNNING_WITHOUT_SETUID and change RUNNING_AS_SETUID_ROOT
+         to RUNNING_AS_UID_ONLY (with corresponding checks for root-ness)
+       * client-src/calcsize.c: drop root privs immediately, and only
+         regain them for stat() and opendir() operations
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/property.c device-src/property.h: create VERBOSE property
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/device.h device-src/queueing.h: expand comments
+       * tape-src/output-rait.h tape-src/output-null.c 
+         tape-src/output-null.h tape-src/output-file.c 
+         tape-src/output-file.h tape-src/output-tape.c 
+         tape-src/output-tape.h tape-src/output-rait.c: add deprecation
+         comment
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * changer-src/chg-zd-mtx.sh.in: Don't pass stripped device names back
+         to Amanda.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * changer-src/chg-mtx.sh.in, changer-src/chg-manual.sh.in,
+         changer-src/chg-zd-mtx.sh.in, changer-src/chg-juke.sh.in,
+         changer-src/chg-chs.sh.in, changer-src/chg-multi.sh.in: Don't use
+         ammt for anything; use system mt and only for device operations that
+         require it.
+       * changer-src/chg-lib.sh.in: Support for above change.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/tape-device.c: Fix a border case bug where
+         tape_device_robust_read() would abort when called with a buffer
+         exactly equal to the minimum read size.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/tape-device.c: Use g_strdup() instead of strdup().
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/vfs-device.h, device-src/fd-device.c,
+         device-src/tape-device.c, device-src/Makefile.am,
+         device-src/fd-device.h, device-src/tape-device.h,
+         device-src/vfs-device.c: Delete the FdDevice and make TapeDevice
+         and VfsDevice direct descendants of Device. Also, correct all
+         reading and writing of volume and part labels for both drivers.
+       * server-src/amcheck.c: Unlabeled tapes are OK, at least with
+         label_new_tapes_option.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/taperscan.c: Fix the order of arguments to
+         scan_read_label(). Patch by Dustin J. Mitchell <dustin@zmanda.com>.
+ 2007-09-25  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * restore-src/restore.c: Change "no tapedev specified" message.
+ 2007-09-25  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/amtape.c: changer_label should be called only on success.
+ 2007-09-25  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * restore-src/restore.c: init cur_tapedev.
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * gnulib/regenerate/regenerate gnulib/* config/gnulib/*: add
+         gnulib module 'fsusage'
+       * common-src/statfs-test.c common-src/statfs.c
+         common-src/statfs.h common-src/Makefile.am: remove old statfs
+       * client-src/selfcheck.c client-src/calcsize.c
+         server-src/amcheck.c server-src/driver.c: use fsusage instead of
+         statfs
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * common-src/alloc.c: Do away with debug_amfree(), which makes invalid
+         assumptions about the way system malloc() works.
+       * common-src/amanda.h: Update definition of amtable_free() accordingly.
+ 2007-09-25  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/amadmin.c: Allow 'f' sort order.
+       * server-src/find.c: Fix parsing of log files.
+       * server-src/find.h (DEFAULT_SORT_ORDER): Set to "hkdlpbf".
+ 2007-09-25  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/driverio.h (sched_t): Split attempted in dump_attempted
+                                          and taper_attempted.
+       * server-src/driver.c: Split attempted in dump_attempted
+                              and taper_attempted.
+       * server-src/driver.c (file_taper_result): Retry dump if INPUT-ERROR.
+ 2007-09-25  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/dumper.c (add_msg_data): Remove bogus handling of "
+                                             in mesg stream.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/taper-file-source.c: If there's a problem reading the
+         holding disk, log the error as we get it from the OS.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/taper-source.c, server-src/taper.c: Do the right thing
+         if the connection to dumper is severed before we recieve a header.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/taper-source.c, server-src/taper-source.h,
+         server-src/taper-source-test.c, server-src/taper-port-source.c,
+         server-src/taper-port-source.h: Don't have TaperPortSource track
+         the control FD, and make it responsible for closing the data FD.
+       * server-src/taper.c: ditto, plus close control socket correctly.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/vfs-device.c: Fix a bug where all VFS device volumes
+         were thought unlabeled. Also do the right thing when there are
+         extra files in the VFS volume directory.
+       * server-src/amlabel.c: Fail if there is a problem re-reading the
+         volume label.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/device.c: Set the device name before reading the label.
+       * device-src/fd-device.c: An invalid header indicates an unlabeled
+         volume, not a volume error.
+       * device-src/taper-device.c: Insufficient buffer space causes
+         ENOMEM, not ENOSPC, at least on Linux.
+       * server-src/amlabel.c: Correctly handle the case where
+         device_read_label() returns exactly 1 set bit.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/taper-source.c, server-src/taper-disk-port-source.c,
+         server-src/taper.c: Be careful not to use strings from getcwd()
+         past the next invocation of getcwd().
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/vfs-device.c: Use old VFS device specification.
+ 2007-09-25  Ian Turner <ian@zmanad.com> (merged by dustin@zmanda.com)
+       * server-src/amlabel.c: Don't dump core on successful labeling.
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/tests/semaphore-test.c device-src/tests/Makefile.am:
+         test semaphore module
+       * device-src/semaphore.c: bugfixes, optimizations
+       * device-src/semaphore.h: inline documentation
+ 2007-09-25  Nikhil Bandiwadekar <nikhil@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/driver.c: Added quoting to directory name while logging
+           in statistics section
+       * server-src/reporter.c: Handled quoted string for directory name in
+           statistics section
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/device.c, device-src/device.h, device-src/s3-device.c,
+         device-src/fd-device.c, device-src/tape-device.c,
+         device-src/vfs-device.c, device-src/rait-device.c: Implement new,
+         more nuanced device_read_label() interface.
+       * server-src/amcheck.c, server-src/amtape.c, server-src/taperscan.c,
+         server-src/amlabel.c, restore-src/amrestore.c,
+         restore-src/restore.c: Use new interface.
+       * common-src/glib-util.c, common-src/glib-util.h: New Flags->string
+         interface.
+       * server-src/amdevcheck.c: New tool to check device/volume status.
+       * man/xml-source/amdevcheck.8.xml: Document it.
+       * server-src/Makefile.am: Add amdevcheck
+       * man/Makefile.am: Add amdevcheck.8
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/s3-device.c: adjust glib logging calls to match debug.h's
+         definitions.
+       * common-src/debug.c: typo
+       * common-src/debug.h: add definitions for g_info() and g_debug() if
+         they are missing
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       Thanks to Pavel Pragin <ppragin@zmanda.com> for finding these issues.
+       * server-src/amtape.c: Update the changer database in 'amtape update'.
+         Thanks to Dustin J. Mitchell <dustin@zmanda.com> for this fix.
+       * server-src/taperscan.c: Update the changer database during the
+         taper scan algorithm.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       Thanks to Jean-Louis Martineau <martineau@zmanda.com> for these fixes:
+       * server-src/dumper.c: Log packet to debug file.
+       * server-src/planner.c: Improve quoting.
+       * server-src/driver.c: Don't call free_serial if we still need it.
+       * server-src/driver.c: Wait for dumper result if taper fail.
+       * server-src/amstatus.pl.in: Improve parsing of initial schedule.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/tape-device.c: Use the right default block size for
+         reading.
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/vfs-device.c: add forgotten device_add_property() call
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/taper.c: Remove an erroneous assertion. Thanks to
+         Jean-Louis Martineau <martineau@zmanda.com> for noticing this issue.
+ 2007-09-25  Patch by Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/driverio.h server-src/driver.c: Record
+         information from first PARTDONE result.  Remove duplicate
+         update_info_dumper.  Call update_info_taper as needed.
+ 2007-09-25  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * restore-src/restore.c: Don't send text to prompt_out if amidxtaped.
+ 2007-09-25  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * restore-src/amfetchdump.c: Fix a bug where amfetchdump will never
+                                    try to use the changer.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * restore-src/amfetchdump.c: Fix a bug where amfetchdump will
+         still try to use the changer even with the -d parameter.
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * man/xml-source/amadmin.8.xml server-src/amadmin.c: add an
+         'outd' column to 'amadmin CONF holding list -l', indicating
+         an "outdated" dump, and a '-d' option to list only outdated
+         holding disk files.  Outdated dumps are described in the
+         amadmin documentation.
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/sendsize.c configure.in server-src/getconf.c
+         restore-src/amrestore.c restore-src/amfetchdump.c
+         common-src/util.c common-src/genversion.c common-src/util.h
+         common-src/debug.c common-src/error.c common-src/amanda.h
+         common-src/Makefile.am:
+         - support the glib logging infrastructure by feeding messages
+           into debug logs
+         - merge the error module into the debug module
+         - document debug.h with verbose comments
+         - call g_critical() for error() and g_error() for errordump()
+         - remove double dgettext() call in debug_printf
+         - remove --without-debugging (so debugging is always on)
+         - remove mostly unused debug prefix support
+         - remove onerror(), replacing its few uses with alternatives
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/tests/device_test.c configure.in
+         recover-src/extract_list.c recover-src/uparse.y
+         server-src/amlogroll.c server-src/dumper.c server-src/reporter.c
+         common-src/conffile.c common-src/amanda.h common-src/getcwd.c
+         common-src/getcwd.h common-src/Makefile.am: Replace calls
+         to safe_getcwd with calls to g_get_current_dir(), which
+         has the same signature and semantics.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * restore-src/restore.c: Fix a bug where amfetchdump would not
+         restore anything when given the -p option. Thanks to Jean-Louis
+         Martineau <martineau@zmanda.com> for help in the development of
+         this patch.
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * man/xml-source/amanda.conf.5.xml: note that includefile can
+         take relative paths
+       * server-src/amcleanupdisk.c: fix local variable shadowing 
+         config_dir
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/holding.c (holding_walk_file): amfree(filename).
+ 2007-09-25  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * man/Makefile.am: fixes for conditional compiles
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * common-src/conffile.c: Clean up some bad warning suppression and
+         obselete unused code.
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * example/config.site man/xml-source/amanda.conf.5.xml
+         device-src/device.c device-src/device.h device-src/property.c
+         device-src/fd-device.c device-src/tape-device.c
+         device-src/property.h device-src/tape-device.h
+         device-src/tape-ops.h server-src/amcheck.c server-src/amtape.c
+         server-src/taperscan.c server-src/taper.c server-src/amlabel.c
+         restore-src/amrestore.c restore-src/restore.c:
+         This patch adds a new property READ_BUFFER_SIZE which is used
+         only by the tape device. The VFS device still uses BLOCK_SIZE
+         for reading; other devices don't need the property.
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amcheck.c: remove debugging message
+       * device-src/tape-posix.c: fix compilation
+         errors when MTCOMPRESSION is not defined
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * Makefile.am config/Makefile.am config/ax_create_stdint_h.m4i
+         autogen configure.in: remove AX_CREATE_STDINT_H
+       * configure.in: add system-specific glib configuration
+       * changer-src/scsi-cam.c device-src/device.c
+         device-src/device.h device-src/tests/device_test.c
+         device-src/rait-device.c server-src/amcheck.c
+         server-src/taper.c server-src/amlabel.c
+         restore-src/amrestore.c restore-src/restore.c
+         common-src/glib-util.c common-src/security-util.c
+         common-src/amanda.h common-src/krb4-security.c:
+         replace references to stdint types and defines with glib
+         equivalents
+ 2007-09-25  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/s3.c, device-src/tape-device.c,
+         device-src/rait-device.c: Fix a number of compiler warnings, some
+         legimate, others not. Thanks to Dustin J. Mitchell
+         <dustin@zmanda.com> and Jean-Louis Martineau <martineau@zmanda.com>
+         for help identifying warnings that need fixing.
+ 2007-09-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * man/xml-source/amcleanup.8.xml server-src/amcleanupdisk.c
+         server-src/amcleanup.sh.in: add -v option for verbose output
+       * server-src/holding.c server-src/holding.h: rewrite 
+         implementation of the holding API to use functors
+       * server-src/driver.c: modifications to holding API changes
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/device.c: Suppress a compiler warning.
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/device.h, device-src/device.c, device-src/fd-device.c,
+         device-src/tape-device.c, device-src/vfs-device.c,
+         device-src/rait-device.c: Update the seek_file API skip missing
+         files. Thanks to Dustin J. Mitchell <dustin@zmanda.com> and
+         Jean-Louis Martineau <martineau@zmanda.com> for help with this patch.
+       * restore-src/restore.c: Use the new API.
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * client-src/Makefile.am, device-src/tests/Makefile.am,
+         device-src/Makefile.am, configure.in, common-src/Makefile.am,
+         tape-src/Makefile.am: Use AM_CFLAGS and LDFLAGS when
+         compiling. These changes by Dustin J. Mitchell <dustin@zmanda.com>.
+       * device-src/device.c, device-src/null-device.c,
+         device-src/device.c, device-src/queueing.c, device-src/property.c,
+         device-src/fd-device.c, device-src/s3-device.c,
+         device-src/semaphore.h, device-src/property.h,
+         device-src/vfs-device.c: Fix compiler warnings revealed by above
+         change. Thanks to Jean-Louis Martineau Jean-Louis Martineau
+         <martineau@zmanda.com> for help with these fixes.
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * restore-src/restore.c restore-src/restore.h:
+       Allow NULLs in arguments to dump_match(); make it a static
+       function.
  
- 2007-06-06  Jean-Louis Martineau <martineau@zmanda.com>
-       * NEWS: Change in 2.5.2p1.
-       * configure.in: AM_INIT_AUTOMAKE(amanda, 2.5.2p1).
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/device.c device-src/vfs-device.h
+         device-src/rait-device.h device-src/device.h
+         device-src/null-device.c device-src/tape-aix.c
+         device-src/tape-uware.c device-src/null-device.h
+         device-src/tape-xenix.c device-src/queueing.c
+         device-src/semaphore.c device-src/property.c
+         device-src/fd-device.c device-src/tape-device.c 
+         device-src/queueing.h device-src/semaphore.h
+         device-src/property.h device-src/tape-posix.c
+         device-src/fd-device.h device-src/tape-device.h
+         device-src/vfs-device.c device-src/rait-device.c
+         device-src/tape-ops.h common-src/glib-util.c
+         common-src/glib-util.h: restrict to GPLv2
+ 2007-09-24  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * Correct Cygwin build errors:
+         common-src/Makefile.am
+         common-src/amanda.h
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/cmdline.c server-src/planner.c server-src/amadmin.c
+         server-src/amcleanupdisk.c server-src/amflush.c
+         server-src/holding.c server-src/holding.h server-src/driver.c
+         server-src/find.c common-src/glib-util.c common-src/glib-util.h:
+         remove 'verbose' flag, remove holding directories from API (they 
+         will be gone soon anyway), and rework the holding module to use 
+         glib data structures
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * gnulib/regenerate/regenerate gnulib/Makefile.am
+         device-src/tests/Makefile.am device-src/Makefile.am
+         server-src/taper-mem-port-source.c server-src/taper.c
+         config/gnulib/gnulib-comp.m4 config/gnulib/gnulib-cache.m4
+         config/gnulib.m4i common-src/physmem.c common-src/physmem.h
+         common-src/amanda.h common-src/base64.c common-src/Makefile.am
+         common-src/base64.h: move base64, physmem into gnulib and set
+         device API to include libgnu.
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/Makefile.am: remove redundant use of EXTRA_DIST
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/device.c device-src/tests/device_test.c
+         device-src/rait-device.c server-src/amcheck.c
+         server-src/amtape.c server-src/taperscan.c server-src/taper.c
+         server-src/amlabel.c restore-src/restore.c: device_open() no
+         longer free()s the device name it is given.
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * restore-src/restore.c: fix uninitialized value error
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/changer.c server-src/amindexd.c
+         restore-src/amidxtaped.c common-src/debug.c common-src/amanda.h
+         common-src/alloc.c: fix support for builds without --with-debugging
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * device-src/tests/queue_test.c: simplify signal handling to
+         be more portable
+ 2007-09-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/cmdline.c server-src/cmdline.h:
+         Optionally parse datestamps and levels
+       * server-src/amadmin.c: pass flags to cmdline functions
+       * server-src/find.c restore-src/amidxtaped.c
+         restore-src/amrestore.c restore-src/restore.c
+         restore-src/restore.h restore-src/amfetchdump.c:
+         Use cmdline module in amrestore, amidxtaped, and amfetchdump
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * restore-src/amrestore.c: Fix a segmentation fault that occurs
+         when the user specifies hostname, diskname, and date. Thanks to
+         Jean-Louis Martineau <martineau@zmanda.com> for finding and 
+         fixing this bug.
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/device.c (device_set_startup_properties_from_config):
+         Use tapetype parameters as well as device_property directives.
+       * device-src/device.h: ditto.
+       * common-src/conffile.c: Use a new macro DEFAULT_TAPE_LENGTH
+         as default tapetype length.
+       * common-src/conffile.h: ditto.
+       * restore-src/amrestore.c: Use new interface to
+         devic_set_startup_properties_from_config().
+       * restore-src/restore.c: ditto.
+       * server-src/amcheck.c: ditto.
+       * server-src/amlabel.c: ditto.
+       * server-src/amtape.c: ditto.
+       * server-src/taper.c: ditto.
+       * server-src/taperscan.c: ditto.
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/amcheck.c: Return 0 if everything is good with the
+         tape. Thanks to Dustin Mitchell <dustin@zmanda.com> for 
+         reporting this issue, and to Jean-Louis Martineau 
+         <martineau@zmanda.com> for suggesting the form of the fix.
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/restore.c: Only restore files matching requested
+         disknames. Report and patch by Jean-Louis Martineau
+         <martineau@zmanda.com>.
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/restore.c: Drop some globals, use data types
+         responsibly.
+       
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/taper.c: Be slightly more rigorous in sanity-checking
+         the expected number of splits.
+       * server-src/taper-file-source.c: Correctly predict the number
+         of splits.
+       
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * device-src/vfs-device.c: Accept device names without a
+         terminating '/'.
+       
+ 2007-09-24  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       Merge in new Device API. Thanks to Jean-Louis and Dustin for their
+       code contributions to this patch.
+ 2007-09-20  Dustin J. Mitchell <dustin@zmanda.com>
+       * oldrecover-src/extract_list.c recover-src/extract_list.c: 
+         change stralloc2 to newstralloc2 to avoid possible memory
+         leak (coverity bug #214)
+ 2007-09-17  Jean-Louis Martineau <martineau@zmanda.com>
+       * client-src/client_util.c: Parse kencrypt in option string.
+       * client-src/sendbackup.c: Send KENCRYPT keyword in REP packet.
+       * client-src/client_util.h: Add kencrypt field in option_t.
+       * amandad-src/amandad.c: Enable kencrypt.
+       * server-src/dumper.c: Enable kencrypt.
+       * common-src/security.h (accept): New prototype, add conf_fn and datap.
+       * common-src/bsdtcp-security.c (bsdtcp_accept): Use new param.
+       * common-src/ssh-security.c (ssh_connect): Set rh->rc->conf_fn and
+                                                  rh->rc->datap
+       * common-src/security-util.c (sec_accept): Set rc->conf_fn and
+                                                  rc->datap
+       * common-src/amanda.h (kencrypt_type): New enum.
+       * common-src/bsdudp-security.c (bsdudp_accept): Use new param.
+       * common-src/security-util.h (sec_accept): New prototype.
+       * common-src/krb5-security.c: encryption enabled based on kencrypt.
+       * common-src/bsd-security.c (bsd_accept):  Use new param.
+ 2007-09-14  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/util.c common-src/util.h: add euid checks to
+         check_running_as
+       * client-src/runstar.c client-src/noop.c client-src/runtar.c
+         client-src/sendbackup.c client-src/killpgrp.c
+         client-src/sendsize.c client-src/selfcheck.c
+         client-src/rundump.c client-src/calcsize.c
+         amandad-src/amandad.c configure.in server-src/amlogroll.c
+         server-src/amindexd.c server-src/dumper.c server-src/planner.c
+         server-src/chunker.c server-src/amadmin.c server-src/amtape.c
+         server-src/amcleanupdisk.c server-src/amflush.c
+         server-src/amtrmlog.c server-src/amdevcheck.c
+         server-src/driver.c server-src/reporter.c server-src/taper.c
+         server-src/amtrmidx.c server-src/amlabel.c
+         restore-src/amidxtaped.c restore-src/amfetchdump.c: use them
+       * common-src/krb5-security.c: remove unused variable
+ 2007-09-14  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/getconf.c: Don't check running_as in amgetconf, as
+         it may not have a configuration file (e.g., for build params)
+ 2007-09-12  Dustin J. Mitchell <dustin@zmanda.com>
+       Bug identified by Satya Ganga <gsat@zmanda.com>
+       * common-src/util.c: handle bad call to check_running_as correctly
+ 2007-09-11  Dustin J. Mitchell <dustin@zmanda.com>
+       Bug reported by Bill Bartlett; patch by Jean-Louis Martineau
+       <martineau@zmanda.com>
+       * common-src/statfs.c: fix error in available-space calculations
+ 2007-09-10  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amcheck.c: quiet compiler warnings when SINGLE_USERID is
+         defined
+ 2007-09-10  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in: change FORCE_USERID to CHECK_USERID, add SINGLE_USERID
+         (when all of Amanda runs as the same userid) and WANT_SETUID_CLIENT
+         (clint binaries should be setuid-root), currently only used on
+         Cygwin.
+       * common-src/util.c common-src/util.h: utility functions for userid
+         checks and manipulations
+       * oldrecover-src/amrecover.c client-src/runstar.c
+         client-src/noop.c client-src/runtar.c client-src/sendbackup.c
+         client-src/killpgrp.c client-src/sendsize.c
+         client-src/selfcheck.c client-src/rundump.c
+         client-src/calcsize.c amandad-src/amandad.c
+         recover-src/amrecover.c server-src/amlogroll.c
+         server-src/amindexd.c server-src/amcheck.c server-src/dumper.c
+         server-src/planner.c server-src/chunker.c server-src/amadmin.c
+         server-src/amtape.c server-src/amcleanupdisk.c
+         server-src/getconf.c server-src/amflush.c server-src/amtrmlog.c
+         server-src/amdevcheck.c server-src/driver.c
+         server-src/reporter.c server-src/taper.c server-src/amdump.sh.in
+         server-src/amtrmidx.c server-src/amlabel.c common-src/genversion.c 
+         restore-src/amidxtaped.c restore-src/amfetchdump.c
+         common-src/bsdtcp-security.c common-src/bsdudp-security.c
+         common-src/krb5-security.c common-src/krb4-security.c
+         common-src/bsd-security.c: use utility functions to check userids.
+ 2007-09-07  Dustin J. Mitchell <dustin@zmanda.com>
+       Change by Paul Bijnens
+       * man/xml-source/amanda.conf.5.xml: Clarify 'etimeout'
+ 2007-09-07  Dustin J. Mitchell <dustin@zmanda.com>
+       * gnulib/regenerate/no-error.patch gnulib/Makefile.am: remove
+         spurious sign-compare warnings from gnulib
+ 2007-09-05  Dustin J. Mitchell <dustin@zmanda.com>
+       Bug identified downstream in Debian packaging
+       * changer-src/chg-null.sh.in: fix typo
+ 2007-08-29  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/genversion.c common-src/Makefile.am: add subversion revision 
+         and branch info to 'amadmin x version'
+ 2007-08-23  Dustin J. Mitchell <dustin@zmanda.com>
+       sf bug #1775316 reported by joerg <altix@users.sourceforge.net>
+       * configure.in: use 'sed' instead of shell substitutions to C-quote
+         ssh arguments
+ 2007-08-22  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/Makefile.am: adjust dependencies so that 'make dist' can
+         run without a 'make all'
+ 2007-08-20  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/sendbackup-gnutar.c client-src/sendsize.c: use
+         sanitized, canonicalized, and quoted filenames where necessary
+       * server-src/driver.c: quote diskname in logfile
+       * common-src/amanda.h common-src/file.c: Add ':' to the list
+         of characters sanitised when constructing filenames from
+         disknames; add canonicalize_pathname()
+ 2007-08-14  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/amanda.h common-src/util.h: move readline headers
+         out of amanda.h and into util.h, since the corresponding
+         functions are in util.c
+       * common-src/util.c: comments
+       * configure.in: check for both headers and libraries and define
+         HAVE_READLINE if both are found; add new --with-readline
+         to require readline and --without-readline to not search
+         for it at all.
+       * oldrecover-src/Makefile.am recover-src/Makefile.am: remove explicit
+         use of READLINE_LIBS
+ 2007-08-09  Dustin J. Mitchell <dustin@zmanda.com>
+       Patch by C R Ritson <c.r.ritson@newcastle.ac.uk>
+       * server-src/amverifyrun.sh.in: "lock" the logfile by creating a 
+         symlink.
+ 2007-08-06  Dustin J. Mitchell <dustin@zmanda.com>
+       * example/DLT-A4.ps example/Makefile.am: add new template contributed
+         by Terry Burton <tez@terryburton.co.uk>.
+ 2007-08-01  Dustin J. Mitchell <dustin@zmanda.com>
+       Patch by Satya Ganga <gsat@zmanda.com>
+       * server-src/amcleanup.sh.in: shell-compatibility fixes for bash-2.03
+         (Solaris 8)
+ 2007-07-31  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/statfs-test.c common-src/statfs.c common-src/statfs.h
+         common-src/Makefile.am: Add a statfs-test to make sure that
+         statfs works on target systems.
+ 2007-07-27  Ian Turner <ian@zmanda.com>
+       * restore-src/amfetchdump.c: Check for required arguments in
+         all cases.
+ 2007-07-27  Dustin J. Mitchell <dustin@zmanda.com>
+       * config/automake/check-perl.am: new automake fragment to check perl scripts
+       * config/automake/check-shell.am: new automake fragment to check shell scripts
+       * configure.in changer-src/Makefile.am client-src/Makefile.am dumper-src/Makefile.am
+         server-src/Makefile.am common-src/Makefile.am: use new checks
+       * changer-src/chg-lib.sh.in: add newline for Solaris's 'bash'
+       * changer-src/chg-chs.sh.in changer-src/chg-mcutil.sh.in: fix errors found by
+         new checks
+ 2007-07-26  Ian Turner <ian@zmanda.com>
+       * restore-src/restore.c: If tpchanger is not defined, then (duh)
+         don't use the changer. This patch by Jean-Louis Martineau 
+         <martineau@zmanda.com>.
+ 2007-07-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * changer-src/chg-lib.sh.in common-src/amanda-sh-lib.sh.in
+         configure.in common-src/Makefile.am: new general-purpose
+         shell-script library
+       * configure.in: check for prog 'gettext'
+       * changer-src/chg-null.sh.in
+         changer-src/chg-manual.sh.in changer-src/chg-disk.sh.in
+         changer-src/chg-juke.sh.in changer-src/chg-rait.sh.in
+         changer-src/chg-chs.sh.in changer-src/chg-mcutil.sh.in
+         amplot/amplot.sh.in client-src/patch-system.sh.in
+         server-src/amcheckdb.sh.in server-src/amverifyrun.sh.in
+         server-src/amrmtape.sh.in server-src/amverify.sh.in
+         server-src/amfreetapes.sh.in server-src/amcleanup.sh.in
+         server-src/amdump.sh.in common-src/amcrypt-ossl-asym.sh.in
+         common-src/amcrypt.sh.in common-src/amaespipe.sh.in
+         common-src/amcrypt-ossl.sh.in: use new library to function
+         correctly even when gettext is missing.
+ 2007-07-23  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/conffile.c: Set MaxWidth for numerical value
+       * server-src/reporter.c: Calculate the size if a numerical value.
+ 2007-07-20  Jean-Louis Martineau <martineau@zmanda.com>
+         Patch by Dimitri Gorokhovik
+         * changer-src/chg-multi.sh.in: Typo.
+ 2007-07-18  Ian Turner <ian@zmanda.com> (merged by dustin@zmanda.com)
+       * changer-src/chg-lib.sh.in, changer-src/chg-zd-mtx.sh.in: Correctly
+         accept the use of tape:/dev/nst0 notation in chg-zd-mtx.
+ 2007-07-18  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/reporter.c: fix reporting of STRANGE messages
+ 2007-07-16  Dustin J. Mitchell <dustin@zmanda.com>
+       * changer-src/chg-zd-mtx.sh.in: check for validity of 'mt' and 'mtx'
+         binaries early, and produce appropriate error messages
+ 2007-07-13  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in: add /usr/sfw/bin to SYSPATH for Solaris 10
+ 2007-07-13  Jean-Louis Martineau <martineau@zmanda.com>
+       * changer-src/chg-lib.sh.in: Remoce duplicate amdd, add ammt.
+ 2007-07-12  Dustin J. Mitchell <dustin@zmanda.com>
+       * autogen config/Makefile.am config/ax_compare_version.m4i
+         Makefile.am: new m4 file
+       * config/docbook-xslt-min.m4i config/docbook-dtd.m4i
+         config/docbook-xslt.m4i: major bug fixing
+ 2007-07-11  Dustin J. Mitchell <dustin@zmanda.com>
+       * recover-src/amrecover.c recover-src/extract_list.c: Add detailed
+         logging of the amrecover user conversation.
+ 2007-07-11  Jean-Louis Martineau <martineau@zmanda.com>
+       Patch by Paul Bijnens
+       * changer-src/chg-multi.sh.in: Typo.
+ 2007-07-10  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in: an empty 'MAILER' is no longer an error, just a
+         warning
+       * changer-src/chg-manual.sh.in changer-src/chg-scsi-chio.c
+         changer-src/chg-scsi.c server-src/amverify.sh.in
+         server-src/getconf.c common-src/genversion.c: conditionalize
+         references to MAILER, to handle the situation when it is not
+         set.
+ 2007-07-09  Dustin J. Mitchell <dustin@zmanda.com>
+       Documentation patch as suggested by Chris Hoogendyk and Olivier
+       Nicole.
+       * man/xml-source/amanda.8.xml: add better documentation about the 
+         -o command-line option for configuration override.
+ 2007-07-09  Jean-Louis Martineau <martineau@zmanda.com>
+       * restore-src/restore.c: Don't do superfluous fsf,
+                                improve error handling.
+ 2007-07-05  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amadmin.c: correct misalignment of 'amadmin x balance'
+         output, as reported by Stefan G. Weichinger <sgw@amanda.org>.
+ 2007-07-03  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/amanda.h common-src/amflock.c: remove unused 
+         CONFIGURE_TEST conditionals
+ 2007-06-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/security-util.c: Change authorization error message to
+       "Please add the line "HOST USER SERVICE" to AMANDAHOSTS on the client"
+       as suggested by Paddy Sreenivasan <paddy@zmanda.com>.
+ 2007-06-28  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in common-src/amflock-flock.c
+         common-src/amflock-posix.c common-src/amanda.h
+         common-src/amflock-lockf.c common-src/amflock-test.c
+         common-src/amflock-lnlock.c common-src/amflock.c
+         common-src/amflock.h common-src/Makefile.am:
+         refactor file locking support into multiple implementations,
+         only test for availability (not functionality) at configure
+         time, and add a 'make check' test script.  Fixes a bug reported
+         by Paul Crittenden.  Chris Hoogendyk, Jon LaBadie, and Jean-Louis
+         Martineau helped track it down.
+ 2007-06-27  Dustin J. Mitchell <dustin@zmanda.com>
+       * autogen config/ax_create_stdint_h.m4i config/acinclude.m4i
+         Makefile.am: use updated version of ax_create_stdint_h.m4
+         from http://autoconf-archive.cryp.to/ax_create_stdint_h.html.
+         Original by Guido U. Draheim <guidod@gmx.de>, patched locally
+         to avoid spurious "command not found" on Solaris 10.
+       * config/Makefile.am: add ax_create_stdint_h.m4i
+ 2007-06-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/cmdline.c server-src/cmdline.h server-src/taperscan.c
+         server-src/taperscan.h config/docbook-dtd.m4i
+         config/docbook-xslt-min.m4i config/docbook-xslt.m4i
+         config/xsltproc.m4i common-src/sockaddr-util.c
+         common-src/sockaddr-util.h common-src/amaespipe.sh.in:
+         restrict to GPLv2
+ 2007-06-25  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/sendbackup.c client-src/killpgrp.c
+         client-src/sendsize.c client-src/selfcheck.c
+         server-src/amcheck.c server-src/reporter.c common-src/util.c
+         common-src/util.h common-src/security-util.c: add str_exit_status()
+         to interpret the status resulting from wait(), use it throughout
+         the codebase.
+ 2007-06-20  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/planner.c common-src/bsdudp-security.c
+         common-src/krb5-security.c common-src/bsd-security.c:
+         remove dead/unused code
+ 2007-06-20  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/sendsize.c: call dbfn(), not debug_fn()
+       * common-src/amanda.h: make dbfn() return a meaningful string
+         when debugging is disabled
+ 2007-06-19  Dustin J. Mitchell <dustin@zmanda.com>
+       * tape-src/tapetype.c: close and re-open tape after rewind
+         (patch from Franz Fischer <amanda@franz-fischer.de>, modified
+         by Jean-Louis Martineau <martineau@zmanda.com>)
  
  2007-06-06  Jean-Louis Martineau <martineau@zmanda.com>
-       * configure.in: Fix check backup is not from gnutar.
+         * restore-src/restore.c: accept all header with size >= DISK_BLOCK_BYTES
  
- 2007-06-04  Jean-Louis Martineau <martineau@zmanda.com>
-       Original patch by franz Fischer
-       * tape-src/tapetype.c: close and open after a rewind.
+ 2007-06-18  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amstatus.pl.in: Set and use chunk_time.
  
- 2007-06-04  Jean-Louis Martineau <martineau@zmanda.com>
-       * common-src/krb5-security.c, common-src/bsdtcp-security.c,
-         common-src/security-util.c: Check return code of getnameinfo.
+ 2007-06-07  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amcleanupdisk.c: don't try to clean up holding disks
+         if they are empty.
+ 2007-06-06  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/sendbackup.c: remove bogus check for unknown program
+ 2007-06-07  Jean-Louis Martineau <martineau@zmanda.com>
+       Christopher McCrory found the cause of the problem.
+       * server-src/find.c: Send ouput to stderr.
+ 2007-06-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * configure.in: detect GNU tar's 'backup' and ignore it.  Thanks
+         to Jeanna Geier <jeanna@webteam.net> for spotting this.
+ 2007-06-05  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/util.c: Don't use -w flags for od execution.
+ 2007-06-05  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/selfcheck.c: fix formatting typo
+       * common-src/security.h: fix prototypes in comments
+       * common-src/security-util.c common-src/util.c: fix 
+         vstralloc errors
+       * common-src/debug.c common-src/amanda.h: remove 
+         debug_prefix_time
+       * changer-src/scsi-linux.c changer-src/chg-scsi-chio.c
+         changer-src/scsi-cam.c client-src/calcsize.c
+         recover-src/amrecover.c server-src/driver.c
+         client-src/sendbackup-gnutar.c server-src/find.c
+         server-src/diskfile.c : format string / i18n tweaks
+       * common-src/amcrypt-ossl.sh.in: fix shell quoting
+ 2007-06-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * changer-src/sense.c server-src/driver.c server-src/reporter.c
+         server-src/amadmin.c server-src/amtape.c common-src/amanda.h:
+         use T_() instead of _T() as the macro flagging static strings
+         in need of translation; fixes compilation error on Mac OS X, where
+         _T is defined in the system headers.
+ 2007-06-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * changer-src/chg-zd-mtx.sh.in changer-src/chg-multi.sh.in:
+         use chg-lib.sh fully, fix i18n problems.
+ 2007-06-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/krb5-security.c common-src/bsdtcp-security.c
+         common-src/security-util.c: check results from getnameinfo()
+         correctly
+ 2007-06-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amstatus.pl.in: use perl flags -Tw
+ 2007-06-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/debug.c common-src/error.c: fix compilation errors
+         on strict platforms.
  
  2007-06-04  Jean-Louis Martineau <martineau@zmanda.com>
-       * server-src/amstatus.pl.in: Perl argument are '-Tw'.
+       * common-src/bsd-security.c common-src/bsdudp-security.c: 
+         Make bsd, bsdudp open an IPv4 and an IPv6 socket; fixes bug reported
+         by Marc Muehlfeld.
  
  2007-06-04  Dustin J. Mitchell <dustin@zmanda.com>
-       * server-src/holding.c: Forgotten ==0 in strcmp().
+       * oldrecover-src/Makefile.am changer-src/Makefile.am
+         amplot/Makefile.am client-src/Makefile.am
+         amandad-src/Makefile.am dumper-src/Makefile.am
+         recover-src/Makefile.am restore-src/Makefile.am
+         tape-src/Makefile.am: add quotes to allow spaces in user
+         and group names
  
- 2007-05-31  Jean-Louis Martineau <martineau@zmanda.com>
-       * configure.in: Check backup is not from gnutar.
+ 2007-06-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * changer-src/chg-scsi.c: use long int for tape sleep time
+       * client-src/selfcheck.c: error out if no calcsize program is found
+       * server-src/amindexd.c: run 'sort' in the C locale
+       * server-src/amcheck.c: flag localhost not resolving as an error
+       * server-src/diskfile.c: improve error handling
+       * common-src/amcrypt.sh.in common-src/amcrypt-ossl-asym.sh.in
+         common-src/amcrypt-ossl.sh.in: search /opt/csw/bin for openssl
+         binaries; improve error handling
  
- 2007-05-31  Jean-Louis Martineau <martineau@zmanda.com>
-       * recover-src/set_commands.c (cd_dir): Validate regex.
+ 2007-06-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/planner.c server-src/amcleanupdisk.c
+         server-src/amflush.c server-src/holding.c server-src/holding.h:
+         do not assume anything about the names of holding
+         directories; use holding disk files themselves to discover
+         dump time/datestamps
  
- 2007-05-30  Jean-Louis Martineau <martineau@zmanda.com>
-       * common-src/krb5-security.c: Use keytab_name.
-       * server-src/holding.c: Remove unused date_matches variable.
+ 2007-06-04  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/krb5-security.c: Typo.
  
- 2007-05-30  Jean-Louis Martineau <martineau@zmanda.com>
-       * server-src/amstatus.pl.in: Set and use chunk_time.
+ 2007-06-01  Ian Turner <ian@zmanda.com>
+       * restore-src/restore.c: Set flags->fsf = 0 by default.
  
- 2007-05-30  Jean-Louis Martineau <martineau@zmanda.com>
-       * common-src/util.c: Don't use -w flags for od execution.
+ 2007-05-29  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/driver.c: Check dumper->down.
+       * server-src/dumper.c (sendbackup_response): Only call
+         security_close_connection if pkt != NULL.
+ 2007-05-29  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amstatus.pl.in: Use compressed size.
  
  2007-05-29  Jean-Louis Martineau <martineau@zmanda.com>
        * server-src/planner.c: Don't report overwrite if no label.
  2007-05-29  Jean-Louis Martineau <martineau@zmanda.com>
        * changer-src/chg-manual.sh.in: Don't reset the slot to 0 on eject.
  
- 2007-05-25  Jean-Louis Martineau <martineau@zmanda.com>
-       * server-src/amstatus.pl.in: Put all flags in one arguments.
+ 2007-05-25  Kevin Till <ktill@zmanda.com>
+       * example/amanda.conf.in: ditto
+       * man/xml-source/amanda.conf.5.xml: ditto
+       * common-src/conffile.c: ditto
+ 2007-05-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * changer-src/scsi-changer-driver.c changer-src/scsi-cam.c
+         client-src/sendbackup.c client-src/selfcheck.c
+         recover-src/extract_list.c server-src/amindexd.c
+         server-src/amcheck.c server-src/driver.c server-src/dumper.c
+         server-src/planner.c server-src/amadmin.c server-src/diskfile.c
+         contrib/set_prod_link.pl common-src/krb5-security.c
+         common-src/bsd-security.c common-src/security-util.c
+         common-src/conffile.c common-src/bsdudp-security.c:
+         trivial changes to add _(), etc. -- harmonization of branch
+         divergence caused by manual resolution of merge conflicts
+ 2007-05-24  Satya Ganga <gsat@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/amcleanup.sh.in: rewrite to find all the active
+       process/children for a given configuration
+ 2007-05-24  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * common-src/fileheader.c:
+         Remove ".exe" extension from program name is tape header.
+ 2007-05-24  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * config/gettext-macros/gettext.m4
+       config/gettext-macros/inttypes-pri.m4:
+         Change name gl_HEADER_INTTYPES_H to gl_AC_HEADER_INTTYPES_H
+ 2007-05-24  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in: add configure.in recognition for Mac OS X
+ 2007-05-24  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * configure.in: IPV6 on cygwin only partially works.
+               Force WORKING_IPV6 to false.
+ 2007-05-24  Kevin Till <ktill@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/driver.c: use amanda text domain in driver
+ 2007-05-24  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * config/libtool.m4i:
+               Fix to pass loader variables correctly on Solaris systems
+               with a gcc that does not use -static or -shared.
+ 2007-05-24  Kevin Till <ktill@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/amstatus.pl.in: parse directory and holding_disk_dir with
+         space correctly
+ 2007-05-24  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * client-src/sendbackup.c client-src/sendsize.c client-src/sendbackup-star.c
+         configure.in server-src/amindexd.c server-src/taper.c server-src/diskfile.c
+         config/acinclude.m4i common-src/amanda.h common-src/util.c
+         common-src/security-util.c:
+               Fix compilation problems using GCC on solaris.
+ 2007-05-24  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/reporter.c: Split FAILED and STRANGE section.
+ 2007-05-23  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * common-src/conffile.c: Fix windows compilation warning.
+ 2007-05-23  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * po/Makefile.am changer-src/scsi-changer-driver.c changer-src/sense.c
+         client-src/unctime.c server-src/amadmin.c server-src/amtape.c
+         server-src/driver.c server-src/reporter.c common-src/amanda.h
+         tape-src/tapeio.h tape-src/tapetype.c:
+               Change _() gettext macro to call gettext()
+               Create _T() to allow gettext translation of static strings.
+       * common-src/security.c:  Create larger buffers for error messages.
+ 2007-05-23  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * configure.in: Prevent annoying lint usage message from
+         being displayed in configure console output.
+ 2007-05-23  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * autogen:
+               Fix problem of not generating po/Makefile.in on fresh checkout.
+       * server-src/logfile.c:
+               Always output to logfile in "C" locale.
+       * amandad-src/amandad.c changer-src/chg-scsi-chio.c
+         changer-src/chg-scsi.c client-src/calcsize.c client-src/getfsent.c
+         client-src/killpgrp.c client-src/noop.c client-src/rundump.c
+         client-src/runstar.c client-src/runtar.c client-src/selfcheck.c
+         client-src/sendbackup.c client-src/sendsize.c
+         client-src/versionsuffix.c common-src/amfeatures.c
+         common-src/amflock.c common-src/file.c common-src/genversion.c
+         common-src/statfs.c common-src/token.c oldrecover-src/amrecover.c
+         recover-src/amrecover.c restore-src/amfetchdump.c
+         restore-src/amidxtaped.c restore-src/amrestore.c server-src/amadmin.c
+         server-src/amcheck.c server-src/amcleanupdisk.c server-src/amflush.c
+         server-src/amindexd.c server-src/amlabel.c server-src/amlogroll.c
+         server-src/amtape.c server-src/amtrmidx.c server-src/amtrmlog.c
+         server-src/chunker.c server-src/diskfile.c server-src/driver.c
+         server-src/dumper.c server-src/getconf.c server-src/infofile.c
+         server-src/planner.c server-src/reporter.c server-src/taper.c
+         tape-src/amdd.c tape-src/ammt.c tape-src/tapeio.c tape-src/tapetype.c:
+               Change back to always run in "C" locale.
+ 2007-05-23  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * changer-src/chg-manual.sh.in: Fix quoting; fix gettext usage.
+ 2007-05-23  John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * configure.in:
+               New gettext routines.
+       * server-src/amcheckdb.sh.in server-src/amcleanup.sh.in
+         server-src/amverifyrun.sh.in server-src/amrmtape.sh.in
+         server-src/amverify.sh.in server-src/amdump.sh.in
+         server-src/amfreetapes.sh.in amplot/amplot.sh.in
+         changer-src/chg-mtx.sh.in changer-src/chg-null.sh.in
+         changer-src/chg-manual.sh.in changer-src/chg-zd-mtx.sh.in
+         changer-src/chg-disk.sh.in changer-src/chg-juke.sh.in
+         changer-src/chg-rait.sh.in changer-src/chg-scsi.c
+         changer-src/chg-chs.sh.in changer-src/chg-multi.sh.in
+         changer-src/chg-mcutil.sh.in client-src/patch-system.sh.in
+         common-src/amcrypt.sh.in common-src/amaespipe.sh.in
+         common-src/amcrypt-ossl-asym.sh.in common-src/amcrypt-ossl.sh.in:
+               Internationalize shell messages
+       * autogen config/gettext-macros/nls.m4
+         config/gettext-macros/lib-link.m4:
+               Update for autoconf version 2.6 autogen
+       * oldrecover-src/amrecover.c recover-src/amrecover.c
+         server-src/amflush.c server-src/logfile.c server-src/amtrmlog.c
+         server-src/amlogroll.c server-src/amindexd.c server-src/amcheck.c
+         server-src/driver.c server-src/dumper.c server-src/chunker.c
+         server-src/planner.c server-src/reporter.c server-src/amadmin.c
+         server-src/amtape.c server-src/taper.c server-src/server_util.c
+         client-src/versionsuffix.c client-src/runtar.c
+         server-src/amtrmidx.c server-src/amcleanupdisk.c
+         server-src/getconf.c server-src/diskfile.c
+         changer-src/chg-scsi-chio.c client-src/noop.c server-src/infofile.c
+         server-src/amlabel.c client-src/sendbackup.c client-src/getfsent.c
+         client-src/killpgrp.c client-src/sendsize.c client-src/selfcheck.c
+         client-src/rundump.c client-src/calcsize.c restore-src/amidxtaped.c
+         restore-src/amrestore.c restore-src/amfetchdump.c Makefile.am
+         amandad-src/amandad.c common-src/genversion.c common-src/debug.c
+         common-src/error.c common-src/statfs.c common-src/amflock.c
+         common-src/file.c common-src/token.c common-src/security-util.c
+         common-src/conffile.c common-src/amanda.h common-src/amfeatures.c
+         tape-src/ammt.c tape-src/amdd.c tape-src/tapeio.c
+         tape-src/tapetype.c:
+               Use amanda domain for LC_MESSAGES.
+ 2007-05-22  Maitreyee Karmarkar <maitreyee@zmanda.com> (merged by dustin@zmanda.com)
+       * server-src/amcheck.c : Changed some amcheck messages
+       * common-src/conffile.c : Changed some amcheck messages
+       
+ 2007-05-22  Maitreyee Karmarkar <maitreyee@zmanda.com> (merged by dustin@zmanda.com)
+       * client-src/selfcheck.c, server-src/changer.c, server-src/amcheck.c,
+         server-src/taperscan.c, server-src/diskfile.c,
+         common-src/conffile.c:
+         Change in some amcheck error messages
+ 2007-05-22   John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * common-src/krb5-security.c common-src/security-util.c
+         server-src/taper.c server-src/taperscan.c:
+               Fix botched *vstrallocf conversions.
+       * oldrecover-src/extract_list.c server-src/amlogroll.c
+         server-src/chunker.c server-src/driver.c server-src/dumper.c
+         server-src/getconf.c server-src/holding.c server-src/planner.c
+         server-src/reporter.c server-src/taper.c:
+               Add errno text when printing getcwd() error message.
+ 2007-05-22  Kevin Till <ktill@zmanda.com> (merged by dustin@zmanda.com)
+       * configure.in: move crypt scripts to common-src since they are needed
+         by both server and client
+       * common-src/Makefile.am: ditto
+       * server-src/Makefile.am: ditto
  
- 2007-05-23  Jean-Louis Martineau <martineau@zmanda.com>
-       * common-src/util.c: Fix missing NULL in vstralloc call.
+ 2007-05-17   John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * configure.in oldrecover-src/amrecover.c
+         oldrecover-src/extract_list.c oldrecover-src/display_commands.c
+         oldrecover-src/help.c oldrecover-src/set_commands.c
+         recover-src/amrecover.c recover-src/extract_list.c
+         recover-src/display_commands.c recover-src/help.c
+         recover-src/set_commands.c server-src/amflush.c
+         server-src/changer.c server-src/taperscan.c server-src/logfile.c
+         server-src/amtrmlog.c server-src/driverio.c
+         server-src/amlogroll.c server-src/tapefile.c
+         server-src/amindexd.c server-src/driver.c server-src/amcheck.c
+         server-src/dumper.c server-src/chunker.c server-src/planner.c
+         server-src/reporter.c server-src/server_util.c
+         server-src/amadmin.c server-src/amtape.c server-src/taper.c
+         server-src/amcleanupdisk.c server-src/find.c
+         server-src/amtrmidx.c server-src/getconf.c
+         server-src/diskfile.c server-src/infofile.c
+         server-src/amlabel.c changer-src/scsi-linux.c
+         changer-src/chg-scsi-chio.c changer-src/scsi-chio.c
+         changer-src/scsi-hpux.c changer-src/scsi-changer-driver.c
+         changer-src/scsi-cam.c changer-src/chg-scsi.c
+         changer-src/scsi-bsd.c changer-src/scsi-irix.c
+         changer-src/scsi-solaris.c changer-src/sense.c
+         changer-src/scsi-aix.c changer-src/scsi-hpux_new.c
+         autogen client-src/unctime.c client-src/versionsuffix.c
+         client-src/noop.c client-src/client_util.c client-src/runtar.c
+         client-src/sendbackup-gnutar.c client-src/getfsent.c
+         client-src/sendbackup.c client-src/sendbackup-dump.c
+         client-src/killpgrp.c client-src/sendsize.c
+         client-src/selfcheck.c client-src/rundump.c
+         client-src/calcsize.c client-src/amandates.c
+         restore-src/amidxtaped.c restore-src/amrestore.c
+         restore-src/restore.c restore-src/amfetchdump.c Makefile.am
+         amandad-src/amandad_util.c amandad-src/amandad.c
+         common-src/rsh-security.c common-src/pipespawn.c
+         common-src/security.c common-src/krb5-security.c
+         common-src/util.c common-src/genversion.c
+         common-src/bsdtcp-security.c common-src/debug.c
+         common-src/fileheader.c common-src/dgram.c
+         common-src/stream.c common-src/match.c
+         common-src/protocol.c common-src/ssh-security.c
+         common-src/statfs.c common-src/krb4-security.c
+         common-src/amflock.c common-src/bsd-security.c
+         common-src/file.c common-src/token.c common-src/event.c
+         common-src/security-util.c common-src/conffile.c
+         common-src/amanda.h common-src/bsdudp-security.c
+         common-src/alloc.c common-src/clock.c common-src/amfeatures.c
+         tape-src/ammt.c tape-src/amdd.c tape-src/output-file.c
+         tape-src/tapeio.c tape-src/tapeio.h tape-src/output-tape.c
+         tape-src/tapetype.c tape-src/output-rait.c:
+         o First stage of internationalization.
+           - Add GNU gettext to configuration.
+           - Add _() macro to flag translatable strings and modify
+             code to use it.  Macros like SSIZE_T_FMT are included in
+             this call, even though xgettext will not parse them; this
+             will be fixed later.
+           - Add plural() function for selecting singular or plural form
+             of string and modify code to use it.
+           - Add amanda.po target to Makefile.
  
- 2007-05-23  Jean-Louis Martineau <martineau@zmanda.com>
-       * server-src/amstatus.pl.in: Use compressed size.
+ 2007-05-17  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amcheck.c: Remove bogus amfree(newtapefile).
  
- 2007-05-23  Jean-Louis Martineau <martineau@zmanda.com>
-       * server-src/driver.c: Check dumper->down.
-       * server-src/dumper.c (sendbackup_response): Only call
-         security_close_connection if pkt != NULL.
+ 2007-05-17  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amcheck.c: Check all tapelist filename.
  
- 2007-05-23  Jean-Louis Martineau <martineau@zmanda.com>
-       * server-src/find.c: Send ouput to stderr.
+ 2007-05-17  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/dumper.c (read_datafd): Reset timeout after the write.
  
  2007-05-17  Jean-Louis Martineau <martineau@zmanda.com>
        * amplot/amplot.sh.in: Remove function keyword.
        * changer-src/chg-multi.sh.in: Remove function keyword.
        * changer-src/chg-zd-mtx.sh.in: Remove function keyword.
  
- 2007-05-16  Jean-Louis Martineau <martineau@zmanda.com>
-       * server-src/dumper.c (read_datafd): Reset timeout after the write.
- 2007-05-15  Jean-Louis Martineau <martineau@zmanda.com>
-       * client-src/sendsize.c: Set qlist before using it.
- 2007-05-15  Jean-Louis Martineau <martineau@zmanda.com>
-       * server-src/amadmin.c, server-src/cmdline.c,
-         server-src/find.c: Call holding_get_files will NULL date_list.
-       * server-src/holding.c (holding_get_directories_per_disk): New
-         date_list param, scan only the date_list directories.
-       * server-src/holding.c (holding_get_directories): New
-         date_list param.
-       * server-src/holding.c (holding_get_files): New
-         date_list param.
-       * server-src/holding.c (holding_get_files_for_flush): Don't loop over
-         date.
-       * server-src/holding.h (holding_get_directories,
-         holding_get_files): New prototype.
- 2007-05-14  Jean-Louis Martineau <martineau@zmanda.com>
-       * common-src/bsd-security.c: Open an IPv4 and an IPv6 socket.
-       * common-src/bsdudp-security.c: Open an IPv4 and an IPv6 socket.
- 2007-05-11  Jean-Louis Martineau <martineau@zmanda.com>
-       * server-src/amcrypt-ossl-asym.sh.in: Use CLIENT_LOGIN.
-       * server-src/amcrypt-ossl.sh.in: Use CLIENT_LOGIN.
- 2007-05-10  Jean-Louis Martineau <martineau@zmanda.com>
-       * util.c (cmp_sockaddr): Fix compilation.
- 2007-05-10  Jean-Louis Martineau <martineau@zmanda.com>
-       * util.c (cmp_sockaddr): un-map V4mapped address before comparison.
-       * common-src/security-util.c: add debugging.
- 2007-05-08  Jean-Louis Martineau <martineau@zmanda.com>
+ 2007-05-17  Jean-Louis Martineau <martineau@zmanda.com>
        * server-src/diskfile.c: Fix double free.
  
- 2007-05-07  Jean-Louis Martineau <martineau@zmanda.com>
-       * common-src/alloc.c (debug_vstrallocf): Remove file and line.
-       * common-src/amanda.h (vstrallocf): Change define.
- 2007-05-07  Jean-Louis Martineau <martineau@zmanda.com>
+ 2007-05-17  Jean-Louis Martineau <martineau@zmanda.com>
        * common-src/amanda.h: define sockaddr_storage and ss_family.
        * common-src/amanda.h: define INET_ADDRSTRLEN.
        * config/acinclude.m4i (AC_SOCKADDR_STORAGE): New macro.
        * configure.in: AC_SOCKADDR_STORAGE.
  
- 2007-05-07  Jean-Louis Martineau <martineau@zmanda.com>
+ 2007-05-17  Jean-Louis Martineau <martineau@zmanda.com>
        * common-src/amanda.h: Define AI_V4MAPPED and AI_ALL.
  
- 2007-05-07  Jean-Louis Martineau <martineau@zmanda.com>
-       * common-src/bsd-security.c, common-src/bsdtcp-security.c,
-         common-src/bsdudp-security.c, common-src/krb5-security.c,
-         common-src/stream.c, server-src/amcheck.c,
-         server-src/dumper.c: Retry getaddrinfo with ai_flags = AI_CANONNAME
+ 2007-05-17  Jean-Louis Martineau <martineau@zmanda.com>
+       * util.c (cmp_sockaddr): un-map V4mapped address before comparison.
+       * common-src/security-util.c: add debugging.
+ 2007-05-17  Dustin J. Mitchell <dustin@zmanda.com> (merged by dustin@zmanda.com)
+       * common-src/amanda.h: fix typo (missing 'extern') in erroutput_type
+ 2007-05-16    John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * oldrecover-src/amrecover.c oldrecover-src/extract_list.c
+         oldrecover-src/display_commands.c oldrecover-src/set_commands.c
+         recover-src/amrecover.c recover-src/extract_list.c
+         recover-src/display_commands.c recover-src/set_commands.c
+         server-src/changer.c server-src/taperscan.c
+         server-src/amtrmlog.c server-src/amindexd.c server-src/driver.c
+         server-src/amcheck.c server-src/dumper.c server-src/chunker.c
+         server-src/planner.c server-src/reporter.c server-src/taper.c
+         server-src/amtrmidx.c changer-src/scsi-linux.c
+         changer-src/chg-scsi-chio.c changer-src/scsi-chio.c
+         changer-src/scsi-hpux.c changer-src/scsi-cam.c
+         changer-src/scsi-changer-driver.c changer-src/chg-scsi.c
+         changer-src/scsi-bsd.c changer-src/scsi-irix.c
+         changer-src/scsi-solaris.c changer-src/sense.c
+         changer-src/scsi-aix.c changer-src/scsi-hpux_new.c
+         client-src/client_util.c client-src/runtar.c
+         client-src/sendbackup-gnutar.c client-src/sendbackup.c
+         client-src/sendbackup-dump.c client-src/killpgrp.c
+         client-src/sendsize.c client-src/selfcheck.c
+         client-src/rundump.c client-src/calcsize.c
+         client-src/amandates.c restore-src/amidxtaped.c
+         restore-src/restore.c amandad-src/amandad_util.c
+         amandad-src/amandad.c common-src/rsh-security.c
+         common-src/sockaddr-util.c common-src/pipespawn.c
+         common-src/security.c common-src/krb5-security.c
+         common-src/util.c common-src/util.h common-src/bsdtcp-security.c
+         common-src/tapelist.c common-src/debug.c common-src/fileheader.c
+         common-src/error.c common-src/dgram.c common-src/stream.c
+         common-src/protocol.c common-src/ssh-security.c
+         common-src/krb4-security.c common-src/bsd-security.c
+         common-src/event.c common-src/security-util.c
+         common-src/conffile.c common-src/amanda.h
+         common-src/bsdudp-security.c common-src/security-util.h
+         common-src/alloc.c tape-src/output-file.c tape-src/tapeio.c
+         tape-src/output-tape.c:
+               - Change dbprintf() to use __VA_ARGS__. (Remove extra parens)
+               - Prepend program name and nano second accuracy time stamp
+                 to each line in debug file.
+               - Emove any resulting duplicate timestamps from functions that
+                 inserted them in each dbprintf() line.
+               - Fix dballoc compilation.
+               - Fix dbmalloc compilation.
+               - Fix amfree() to report file and line # of amfree line during
+                 errors.
+               - Add vstrallocf() and newvstrallocf() functions. These are
+                 the same as vstralloc() and newvstralloc() except they use
+                 printf style format strings.  (Required to eliminate
+                 untranslateable string concatenations in messages.)
+               - Change files to use *allocf() functions where it seemed
+                 appropriate..
+               - Fix kerberos 4 compilation.
+               - Fix kerberos 5 compilation.
+ 2007-05-16  Jean-Louis Martineau <martineau@zmanda.com> (merged by dustin@zmanda.com)
+       * common-src/debug.c (debug_rename): Fix for cygwin: rename
+         will not overwrite an existing file
+ 2007-05-15   John Franks <jrfranks@zmanda.com> (merged by dustin@zmanda.com)
+       * client-src/sendbackup.c common-src/dgram.c common-src/event.c
+         server-src/changer.c server-src/driverio.c:
+               Cast FD_SETSIZE to int to avoid compilation problems.
+ 2007-05-15   Kevin Till <ktill@zmanda.com> (merged by dustin@zmanda.com)
+       * common-src/debug.c: dbrename patch by Jean-Louis Martineau to
+         unlink the target of the rename operation before renaming.
+ 2007-05-15  Dustin J. Mitchell <dustin@zmanda.com>
+       * client-src/sendsize.c: fix parsing of include/excludes for 
+         old clients
+ 2007-05-11  Jean-Louis Martineau <martineau@zmanda.com>
+       * server-src/amcrypt-ossl-asym.sh.in: Use CLIENT_LOGIN.
+       * server-src/amcrypt-ossl.sh.in: Use CLIENT_LOGIN.
+ 2007-05-08  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/krb5-security.c: Fix compilation.
+ 2007-05-09    Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/stream.c: add errno's to stream_client_internal
+ 2007-05-09    Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amadmin.c server-src/infofile.c
+         common-src/security-util.c common-src/krb5-security.c:
+         fix type-punning warnings
+ 2007-05-09    Dustin J. Mitchell <dustin@zmanda.com>
+       * recover-src/set_commands.c server-src/amcheck.c
+         server-src/dumper.c common-src/rsh-security.c
+         common-src/krb5-security.c common-src/util.c common-src/util.h
+         common-src/bsdtcp-security.c common-src/stream.c
+         common-src/ssh-security.c common-src/bsd-security.c
+         common-src/security-util.c common-src/bsdudp-security.c
+         common-src/security-util.h: Add IPv6-savvy resolve_hostname() and use it
+         everywhere
+ 2007-05-08  Jean-Louis Martineau <martineau@zmanda.com>
+       * config/Makefile.am (EXTRA_DIST): Add docbook-dtd.m4i,
+         docbook-xslt.m4i, docbook-xslt-min.m4i and xsltproc.m4i.
  
  2007-05-07  Jean-Louis Martineau <martineau@zmanda.com>
        * common-src/stream.c: pass correct sockaddr size to bind()
  
  2007-05-07  Pieter Bowman <bowman@math.utah.edu>
        * common-src/file.c: reverse the order of chown/chmod to correctly
-                            create temporary files.
+         create temporary files.
+ 2007-05-07  Jean-Louis Martineau <martineau@zmanda.com>
+       * common-src/krb5-security.c: Fix compilation.
+ 2007-05-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/cmdline.c server-src/holding.c server-src/holding.h
+         server-src/amadmin.c server-src/amcleanupdisk.c: remove 
+         holding_file_read_header()
+ 2007-05-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * common-src/sockaddr-util.h common-src/bsdtcp-security.c common-src/security-util.c
+         common-src/krb5-security.c common-src/stream.c: add and use a copy_sockaddr() macro
+ 2007-05-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * configure.in common-src/rsh-security.c common-src/bsdtcp-security.c
+         common-src/ssh-security.c common-src/bsdudp-security.c
+         common-src/krb5-security.c common-src/krb4-security.c common-src/bsd-security.c
+         common-src/Makefile.am: use AM_CONDITIONAL to select security modules to compile
+ 2007-05-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * autogen man/Makefile.am configure.in config/acinclude.m4i
+         config/docbook-xslt-min.m4i config/docbook-dtd.m4i config/docbook-xslt.m4i
+         config/xsltproc.m4i Makefile.am: detect xsltproc, docbook xslt, and docbook
+         dtd versions better, to ensure proper creation of manpages.
+ 2007-05-04  Dustin J. Mitchell <dustin@zmanda.com>
+       * server-src/amindexd.c common-src/sockaddr-util.c common-src/sockaddr-util.h
+         common-src/util.c common-src/security-util.c common-src/amanda.h
+         common-src/dgram.c common-src/stream.c common-src/Makefile.am: add new
+         sockaddr-util.[ch] containing sockaddr-related functions.
+ 2007-05-04  Jean-Louis Martineau <martineau@zmanda.com>
+       * configure.in: AM_INIT_AUTOMAKE(amanda, 2.5.3alpha)
  
  2007-05-03  Jean-Louis Martineau <martineau@zmanda.com>
        * docs/*.txt: Update from xml-docs.
  2007-01-23  Jean-Louis Martineau <martineau@zmanda.com>
        * common-src/security-util.c (tcpm_recv_token): Check size < 0.
  
  2007-01-23  Jean-Louis Martineau <martineau@zmanda.com>
        * server-src/diskfile.c: Check duplicate DLE with match_host and
                                 match_disk.
  
  2006-02-03  Ian Turner <ian@zmanda.com>
        * server-src/amadmin.c (main): Don't free conf_tapelist too 
--        early. Thanks to Cédric Lucantis
++        early. Thanks to CÃ\83©dric Lucantis
          <cedric-lucantis@users.sourceforge.net> for the patch.
  
  2006-02-02 Kevin Till <ktill@zmanda.com>
        * server-src/amverify.sh.in: Wait until device becomes ready after
        rewinding.
  
--1999-06-15  Björn Brezger <Bjoern.Brezger@uni-konstanz.de>, Alexandre Oliva  <oliva@dcc.unicamp.br>
++1999-06-15  Björn Brezger <Bjoern.Brezger@uni-konstanz.de>, Alexandre Oliva  <oliva@dcc.unicamp.br>
  
        * client-src/calcsize.c (ROUND): Rewrite, it was broken.
        Reported by Erik Lindahl <erik@theophys.kth.se>
  
        * example/Makefile.am (EXTRA_DIST): add DIN-A4.ps
  
--1998-08-07  Günter Felkel  <G.Felkel@edelmann.de>
++1998-08-07  Günter Felkel  <G.Felkel@edelmann.de>
  
        * example/DIN-A4.ps: new file
  
@@@ -15054,7 -17912,7 +17912,7 @@@ Version 2.4.0p
        -Rob Riggs <rob@devilsthumb.com>
  
        pass kerberos encryption switch to client.
--      -Fredrik Jönsson <fjo@nada.kth.se>
++      -Fredrik Jönsson <fjo@nada.kth.se>
  
        rename afree to amfree, to work around IRIX 6.4's afree.
        -oliva, reported Stephan P. Martin <smartin@schlund.de>
diff --combined Makefile.in
index 1679e3c85ebad42c0fbe63692dd1361a305afe06,ac65c5e70b58582f2b4528d9c6bab7b0a7345be2..209160d9e65c442d15c199c51d1b0ce0fefcf2c5
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  @SET_MAKE@
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = .
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -39,61 -35,140 +35,140 @@@ host_triplet = @host
  target_triplet = @target@
  subdir = .
  DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS \
-       ChangeLog INSTALL NEWS
+       $(srcdir)/Makefile.in $(top_srcdir)/configure \
+       $(top_srcdir)/example/template.d/advanced.conf.in \
+       $(top_srcdir)/example/template.d/amanda-S3.conf.in \
+       $(top_srcdir)/example/template.d/amanda-harddisk.conf.in \
+       $(top_srcdir)/example/template.d/amanda-single-tape.conf.in \
+       $(top_srcdir)/example/template.d/amanda-tape-changer.conf.in \
+       AUTHORS ChangeLog INSTALL NEWS
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
-  configure.lineno configure.status.lineno
+  configure.lineno config.status.lineno
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
  CONFIG_HEADER = $(top_builddir)/config/config.h
- CONFIG_CLEAN_FILES =
+ CONFIG_CLEAN_FILES = example/template.d/amanda-S3.conf \
+       example/template.d/advanced.conf \
+       example/template.d/amanda-harddisk.conf \
+       example/template.d/amanda-single-tape.conf \
+       example/template.d/amanda-tape-changer.conf
  SOURCES =
  DIST_SOURCES =
  RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  am__vpath_adj = case $$p in \
      $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@@ -103,11 -178,14 +178,14 @@@ am__strip_dir = `echo $$p | sed -e 's|^
  am__installdirs = "$(DESTDIR)$(pkgdatadir)"
  pkgdataDATA_INSTALL = $(INSTALL_DATA)
  DATA = $(pkgdata_DATA)
+ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive       \
+   distclean-recursive maintainer-clean-recursive
  ETAGS = etags
  CTAGS = ctags
  DIST_SUBDIRS = gnulib config common-src amandad-src tape-src \
-       client-src dumper-src server-src changer-src restore-src \
-       recover-src oldrecover-src amplot man docs example
+       client-src dumper-src device-src server-src changer-src \
+       restore-src recover-src oldrecover-src amplot perl po man \
+       example packaging installcheck
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  distdir = $(PACKAGE)-$(VERSION)
  top_distdir = $(distdir)
@@@ -119,15 -197,14 +197,15 @@@ DIST_ARCHIVES = $(distdir).tar.g
  GZIP_ENV = --best
  distuninstallcheck_listfiles = find . -type f -print
  distcleancheck_listfiles = find . -type f -print
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -135,14 -212,19 +213,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -153,20 -235,19 +237,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -180,60 -261,169 +263,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -243,10 -433,24 +437,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -257,24 -461,58 +465,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -286,59 -524,46 +528,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -347,34 -572,37 +576,37 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
  AUTOMAKE_OPTIONS = 1.4 foreign
- ACINCLUDE_M4 = $(srcdir)/acinclude.m4
- ACINCLUDE_M4I = $(srcdir)/config/acinclude.m4i
- LIBTOOL_M4I = $(srcdir)/config/libtool.m4i
- GNULIB_M4I = $(srcdir)/config/gnulib.m4i
- ACINCLUDE_M4_DEPS = $(GNULIB_M4I) $(ACINCLUDE_M4I) $(LIBTOOL_M4I)
+ ACLOCAL_AMFLAGS = --force -I . -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive
  @WANT_CLIENT_TRUE@CLIENT_SUBDIRS = client-src dumper-src
  @WANT_TAPE_TRUE@TAPE_SUBDIRS = tape-src
- @WANT_SERVER_TRUE@SERVER_SUBDIRS = server-src changer-src
+ @WANT_SERVER_TRUE@SERVER_SUBDIRS = device-src server-src changer-src
  @WANT_RESTORE_TRUE@RESTORE_SUBDIRS = restore-src
  @WANT_RECOVER_TRUE@RECOVER_SUBDIRS = recover-src oldrecover-src
  @WANT_AMPLOT_TRUE@PLOT_SUBDIRS = amplot
@@@ -390,11 -618,18 +622,18 @@@ SUBDIRS = 
        $(RESTORE_SUBDIRS) \
        $(RECOVER_SUBDIRS) \
        $(PLOT_SUBDIRS) \
-       man docs example
+       perl \
+       po \
+       man \
+       example \
+       packaging \
+       installcheck
  
  pkgdata_DATA = \
-       ReleaseNotes                    \
-       COPYRIGHT
+       ReleaseNotes    \
+       COPYRIGHT       \
+       NEWS            \
+       ChangeLog
  
  EXTRA_DIST = $(SNAPSHOT_STAMP) \
        $(pkgdata_DATA)                 \
        contrib/gsc/ucfggsc.c           \
        patches/regex-3.6alpha.patch    \
        patches/samba-largefs.patch     \
-       patches/tar-1.12.patch
+       patches/tar-1.12.patch          \
+       UPGRADING                       \
+       DEVELOPING
  
  CONFIG_STATUS = config.status
+ # ensure that configure gets the right arguments for distcheck; this keeps the
+ # user/group through to the distcheck, rather than defaulting back to 'amanda'.
+ DISTCHECK_CONFIGURE_FLAGS = --with-user=$(CLIENT_LOGIN) --with-group=$(SETUID_GROUP) --with-owner=$(BINARY_OWNER) --disable-installperms --without-force-uid --with-tmpdir=$(AMANDA_TMPDIR) SINGLE_USERID=yes
  all: all-recursive
  
  .SUFFIXES:
@@@ -456,6 -697,16 +701,16 @@@ $(top_srcdir)/configure:  $(am__configu
        cd $(srcdir) && $(AUTOCONF)
  $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+ example/template.d/amanda-S3.conf: $(top_builddir)/config.status $(top_srcdir)/example/template.d/amanda-S3.conf.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+ example/template.d/advanced.conf: $(top_builddir)/config.status $(top_srcdir)/example/template.d/advanced.conf.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+ example/template.d/amanda-harddisk.conf: $(top_builddir)/config.status $(top_srcdir)/example/template.d/amanda-harddisk.conf.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+ example/template.d/amanda-single-tape.conf: $(top_builddir)/config.status $(top_srcdir)/example/template.d/amanda-single-tape.conf.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+ example/template.d/amanda-tape-changer.conf: $(top_builddir)/config.status $(top_srcdir)/example/template.d/amanda-tape-changer.conf.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
  
  mostlyclean-libtool:
        -rm -f *.lo
@@@ -465,10 -716,9 +720,9 @@@ clean-libtool
  
  distclean-libtool:
        -rm -f libtool
- uninstall-info-am:
  install-pkgdataDATA: $(pkgdata_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
+       test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
        @list='$(pkgdata_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@@ -515,8 -765,7 +769,7 @@@ $(RECURSIVE_TARGETS)
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
  
- mostlyclean-recursive clean-recursive distclean-recursive \
- maintainer-clean-recursive:
+ $(RECURSIVE_CLEAN_TARGETS):
        @failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
@@@ -618,24 -867,22 +871,22 @@@ distclean-tags
  
  distdir: $(DISTFILES)
        $(am__remove_distdir)
-       mkdir $(distdir)
-       $(mkdir_p) $(distdir)/amplot $(distdir)/changer-src $(distdir)/client-src $(distdir)/common-src $(distdir)/config/gnulib $(distdir)/contrib $(distdir)/contrib/gsc $(distdir)/dumper-src $(distdir)/example $(distdir)/patches $(distdir)/server-src
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       test -d $(distdir) || mkdir $(distdir)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
        list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
            distdir=`$(am__cd) $(distdir) && pwd`; \
            top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$top_distdir" \
                distdir="$$distdir/$$subdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
                distdir) \
              || exit 1; \
          fi; \
        -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r $(distdir)
  dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@@ -742,7 -991,7 +995,7 @@@ distcheck: dis
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
  distuninstallcheck:
        @cd $(distuninstallcheck_dir) \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@@ -767,7 -1016,7 +1020,7 @@@ all-am: Makefile $(DATA
  installdirs: installdirs-recursive
  installdirs-am:
        for dir in "$(DESTDIR)$(pkgdatadir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
  install: install-recursive
  install-exec: install-exec-recursive
@@@ -815,12 -1064,20 +1068,20 @@@ info-am
  
  install-data-am: install-pkgdataDATA
  
+ install-dvi: install-dvi-recursive
  install-exec-am:
  
+ install-html: install-html-recursive
  install-info: install-info-recursive
  
  install-man:
  
+ install-pdf: install-pdf-recursive
+ install-ps: install-ps-recursive
  installcheck-am:
  
  maintainer-clean: maintainer-clean-recursive
@@@ -841,30 -1098,28 +1102,28 @@@ ps: ps-recursiv
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-pkgdataDATA
- uninstall-info: uninstall-info-recursive
- .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
-       check-am clean clean-generic clean-libtool clean-recursive \
-       ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
-       dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
-       distclean-generic distclean-libtool distclean-recursive \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-pkgdataDATA \
-       install-strip installcheck installcheck-am installdirs \
-       installdirs-am maintainer-clean maintainer-clean-generic \
-       maintainer-clean-recursive mostlyclean mostlyclean-generic \
-       mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
-       tags tags-recursive uninstall uninstall-am uninstall-info-am \
-       uninstall-pkgdataDATA
+ uninstall-am: uninstall-pkgdataDATA
  
+ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+       install-strip
+ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am am--refresh check check-am clean clean-generic \
+       clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+       dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
+       distclean distclean-generic distclean-libtool distclean-tags \
+       distcleancheck distdir distuninstallcheck dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-pkgdataDATA install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags tags-recursive uninstall uninstall-am \
+       uninstall-pkgdataDATA
  
- $(ACINCLUDE_M4): $(ACINCLUDE_M4_DEPS)
-       @-rm -f $@
-       @cat $(ACINCLUDE_M4_DEPS) > $@
  
  libtool: $(LIBTOOL_DEPS)
        $(SHELL) ./config.status --recheck
diff --combined amandad-src/Makefile.in
index 9ea0a5c0563d3ce9175b1bdc9852950e6ac0fcf1,489ef144308d37a014c2d70c60213a66828e8ec3..09c562137135732c2d56a9584ab4a01e25b54baa
@@@ -1,8 -1,8 +1,8 @@@
 -# Makefile.in generated by automake 1.10 from Makefile.am.
 +# Makefile.in generated by automake 1.9.6 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 -# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 +# 2003, 2004, 2005  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for Amanda client programs.
  
+ # vim:ft=automake
+ #
+ # Adjust post-install permissions settings.  This rule works off two
+ # specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data. 
+ # Each is a whitespace-separated list of commands, all of which are either
+ # a variable assignment or a filename.  Three variables are available:
+ #
+ #  - dest= sets the destination directory to e.g., $(sbindir)
+ #  - chown= controls changes in ownership; value is first argument to chown
+ #  - chmod= controls changes in permissions; value is first argument to chmod
+ #
+ # As a special case, chown=amanda is taken as equivalent to 
+ # chown=$(BINARY_OWNER):$(SETUID_GROUP), which may otherwise have problems with
+ # whitespace in the user/group names.
+ # 
+ # when a filename is seen, the currently active variables are applied.
+ #
+ # Note that scripts are data, not executables!
+ #
+ # EXAMPLE
+ #
+ # sbin_PROGRAMS = foo bar bing
+ # libexec_PROGRAMS = pro gram
+ # sbin_SCRIPTS = sk ript
+ # INSTALLPERMS_exec = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             foo bar \
+ #     chmod=u+s,o-rwx \
+ #             bing
+ #     dest=$(libexecdir) chmod= \
+ #             $(libexec_PROGRAMS)
+ # INSTALLPERMS_data = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             $(sbin_SCRIPTS)
+ #
+ # This whole operation is not required when making builds for packaging,
+ # and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+ # AM_CONDITIONAL.
+ # vim:ft=automake
  
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -41,48 -78,119 +78,119 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
- libexec_PROGRAMS = amandad$(EXEEXT)
- subdir = amandad-src
  DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in
+       $(srcdir)/Makefile.in \
+       $(top_srcdir)/config/automake/installperms.am \
+       $(top_srcdir)/config/automake/precompile.am
+ amlibexec_PROGRAMS = amandad$(EXEEXT)
+ subdir = amandad-src
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@@ -94,14 -202,17 +202,17 @@@ am__vpath_adj = case $$p in 
      *) f=$$p;; \
    esac;
  am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
- am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)"
- libLTLIBRARIES_INSTALL = $(INSTALL)
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libamandad_la_LIBADD =
+ am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)"
amlibLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(amlib_LTLIBRARIES)
+ libamandad_la_DEPENDENCIES = ../common-src/libamanda.la
  am_libamandad_la_OBJECTS = amandad_util.lo
  libamandad_la_OBJECTS = $(am_libamandad_la_OBJECTS)
- libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
- PROGRAMS = $(libexec_PROGRAMS)
+ libamandad_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(libamandad_la_LDFLAGS) $(LDFLAGS) -o $@
+ amlibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+ PROGRAMS = $(amlibexec_PROGRAMS)
  amandad_SOURCES = amandad.c
  amandad_OBJECTS = amandad.$(OBJEXT)
  amandad_LDADD = $(LDADD)
@@@ -109,32 -220,32 +220,32 @@@ amandad_DEPENDENCIES = ../common-src/li
        libamandad.$(LIB_EXTENSION) \
        ../common-src/libamanda.$(LIB_EXTENSION) \
        ../gnulib/libgnu.$(LIB_EXTENSION)
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
+ DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
  am__depfiles_maybe = depfiles
  COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  CCLD = $(CC)
- LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
  SOURCES = $(libamandad_la_SOURCES) amandad.c
  DIST_SOURCES = $(libamandad_la_SOURCES) amandad.c
  HEADERS = $(noinst_HEADERS)
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
- ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -142,14 -253,19 +253,19 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
- AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -160,20 -276,19 +276,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -187,60 -302,169 +302,169 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
- LL_FMT = @LL_FMT@
- LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -250,10 -474,24 +474,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -264,24 -502,58 +502,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -293,59 -565,46 +565,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -354,36 -613,49 +613,49 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ # sed expression to strip leading directories from a filename; this converts e.g.,
+ # src/foo/bar.so to bar.so.
+ strip_leading_dirs = s|^.*/||
  INCLUDES = -I$(top_builddir)/common-src \
                -I$(top_srcdir)/common-src \
                -I$(top_srcdir)/gnulib
  
+ AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
  LINT = @AMLINT@
  LINTFLAGS = @AMLINTFLAGS@
- lib_LTLIBRARIES = libamandad.la
amlib_LTLIBRARIES = libamandad.la
  LIB_EXTENSION = la
- @WANT_RUNTIME_PSEUDO_RELOC_TRUE@AM_LDFLAGS = -Wl,-enable-runtime-pseudo-reloc
  libamandad_la_SOURCES = amandad_util.c
  libamandad_la_LDFLAGS = -release $(VERSION)
+ libamandad_la_LIBADD = ../common-src/libamanda.la
  noinst_HEADERS = amandad.h
  
  ###
@@@ -397,11 -669,19 +669,19 @@@ LDADD = ../common-src/libamanda.$(LIB_E
        ../common-src/libamanda.$(LIB_EXTENSION) \
        ../gnulib/libgnu.$(LIB_EXTENSION)
  
+ INSTALLPERMS_exec = \
+       dest=$(amlibexecdir) chown=amanda \
+               $(amlibexec_PROGRAMS)
+ INSTALLPERMS_data = \
+       dest=$(amlibexecdir) chown=amanda \
+               $(amlibexec_SCRIPTS)
  all: all-am
  
  .SUFFIXES:
  .SUFFIXES: .c .lo .o .obj
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -430,66 -710,66 +710,66 @@@ $(top_srcdir)/configure:  $(am__configu
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
- install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
            f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           echo " $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(amlibdir)/$$f'"; \
+           $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(amlibdir)/$$f"; \
          else :; fi; \
        done
  
- uninstall-libLTLIBRARIES:
+ uninstall-amlibLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(amlibdir)/$$p'"; \
+         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(amlibdir)/$$p"; \
        done
  
- clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ clean-amlibLTLIBRARIES:
+       -test -z "$(amlib_LTLIBRARIES)" || rm -f $(amlib_LTLIBRARIES)
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
          test "$$dir" != "$$p" || dir=.; \
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
  libamandad.la: $(libamandad_la_OBJECTS) $(libamandad_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libamandad_la_LDFLAGS) $(libamandad_la_OBJECTS) $(libamandad_la_LIBADD) $(LIBS)
- install-libexecPROGRAMS: $(libexec_PROGRAMS)
+       $(libamandad_la_LINK) -rpath $(amlibdir) $(libamandad_la_OBJECTS) $(libamandad_la_LIBADD) $(LIBS)
+ install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
             || test -f $$p1 \
          ; then \
            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(amlibexecdir)/$$f" || exit 1; \
          else :; fi; \
        done
  
- uninstall-libexecPROGRAMS:
+ uninstall-amlibexecPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
        done
  
- clean-libexecPROGRAMS:
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ clean-amlibexecPROGRAMS:
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
  amandad$(EXEEXT): $(amandad_OBJECTS) $(amandad_DEPENDENCIES) 
        @rm -f amandad$(EXEEXT)
-       $(LINK) $(amandad_LDFLAGS) $(amandad_OBJECTS) $(amandad_LDADD) $(LIBS)
+       $(LINK) $(amandad_OBJECTS) $(amandad_LDADD) $(LIBS)
  
  mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@@ -501,22 -781,22 +781,22 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amandad_util.Plo@am__quote@
  
  .c.o:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c $<
  
  .c.obj:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
  
  .c.lo:
- @am__fastdepCC_TRUE@  if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@@ -527,10 -807,6 +807,6 @@@ mostlyclean-libtool
  clean-libtool:
        -rm -rf .libs _libs
  
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@@ -580,22 -856,21 +856,21 @@@ distclean-tags
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
@@@ -610,8 -885,8 +885,8 @@@ check-am: all-a
  check: check-am
  all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
  installdirs:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
  install: install-am
  install-exec: install-exec-am
@@@ -637,16 -912,18 +912,18 @@@ distclean-generic
  maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+ @WANT_INSTALLPERMS_FALSE@install-exec-hook:
+ @WANT_INSTALLPERMS_FALSE@install-data-hook:
  clean: clean-am
  
- clean-am: clean-generic clean-libLTLIBRARIES clean-libexecPROGRAMS \
+ clean-am: clean-amlibLTLIBRARIES clean-amlibexecPROGRAMS clean-generic \
        clean-libtool mostlyclean-am
  
  distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
  
  dvi: dvi-am
  
@@@ -658,16 -935,26 +935,26 @@@ info: info-a
  
  info-am:
  
- install-data-am:
+ install-data-am: install-amlibLTLIBRARIES
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
  
- install-exec-am: install-libLTLIBRARIES install-libexecPROGRAMS
+ install-exec-am: install-amlibexecPROGRAMS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
  
+ install-html: install-html-am
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -688,43 -975,94 +975,94 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
-       uninstall-libexecPROGRAMS
- .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libLTLIBRARIES clean-libexecPROGRAMS clean-libtool ctags \
-       distclean distclean-compile distclean-generic \
-       distclean-libtool distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-exec-hook \
-       install-info install-info-am install-libLTLIBRARIES \
-       install-libexecPROGRAMS install-man install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-compile \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-info-am \
-       uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS
- install-exec-hook:
-       @list="$(libexec_PROGRAMS) $(libexec_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
+ uninstall-am: uninstall-amlibLTLIBRARIES uninstall-amlibexecPROGRAMS
+ .MAKE: install-am install-data-am install-exec-am install-strip
+ .PHONY: CTAGS GTAGS all all-am check check-am clean \
+       clean-amlibLTLIBRARIES clean-amlibexecPROGRAMS clean-generic \
+       clean-libtool ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-amlibLTLIBRARIES install-amlibexecPROGRAMS \
+       install-data install-data-am install-data-hook install-dvi \
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-amlibLTLIBRARIES \
+       uninstall-amlibexecPROGRAMS
+ @WANT_INSTALLPERMS_TRUE@installperms-exec:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_exec)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on executables"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@installperms-data:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_data)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on data"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@install-exec-hook: installperms-exec
+ @WANT_INSTALLPERMS_TRUE@install-data-hook: installperms-data
+ # A rule to make precompiler output from C files.  This is not used during
+ # ordinary builds, but but can very useful in debugging problems on strange
+ # architectures.  With this rule, we can ask users to 'make foo.i' and send
+ # the result to us.
+ #
+ # It touches some automake internals ($COMPILE), but since it's not
+ # build-critical, that's OK.
+ %.i : %.c
+       $(COMPILE) -E -o $@ $<
  
  lint:
-       @ for p in $(libexec_PROGRAMS); do                                      \
+       @ for p in $(amlibexec_PROGRAMS); do                                    \
                f="$$p.c $(libamandad_la_SOURCES)";                             \
                (cd ../common-src; make listlibsrc);                            \
                f="$$f "`cat ../common-src/listlibsrc.output`;                  \
                (cd ../server-src; make listlibsrc);                            \
                f="$$f "`cat ../server-src/listlibsrc.output`;                  \
                echo $(LINT) $$f;                                               \
-               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config        \
+               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config   \
                    $(INCLUDES) $$f;                                            \
                if [ $$? -ne 0 ]; then                                          \
                    exit 1;                                                     \
diff --combined amandad-src/amandad.c
index f04d4e3f1508095441b1d0a7ef35ce86beec410c,430f2b7f6a5a33990c396891725f6a1f8f171e92..c5e057f716c77b32d92363babee3d91b75eed659
@@@ -48,9 -48,9 +48,9 @@@
  #define       REP_TIMEOUT     (6*60*60)       /* secs for service to reply */
  #define       ACK_TIMEOUT     10              /* XXX should be configurable */
  
 -#define amandad_debug(i, ...) do {    \
 +#define amandad_debug(i,x) do {               \
        if ((i) <= debug_amandad) {     \
 -              dbprintf(__VA_ARGS__);  \
 +              dbprintf(x);            \
        }                               \
  } while (0)
  
@@@ -133,20 -133,10 +133,21 @@@ static struct 
      TAILQ_HEAD_INITIALIZER(serviceq.tailq), 0
  };
  
 +/*
 + * Data for dbmalloc to check for memory leaks
 + */
 +#ifdef USE_DBMALLOC
 +static struct {
 +    struct {
 +      unsigned long size, hist;
 +    } start, end;
 +} dbmalloc_info;
 +#endif
 +
  static int wait_30s = 1;
  static int exit_on_qlength = 1;
  static char *auth = NULL;
+ static kencrypt_type amandad_kencrypt = KENCRYPT_NONE;
  
  int main(int argc, char **argv);
  
@@@ -171,31 -161,11 +172,11 @@@ static struct active_service *service_n
  static void service_delete(struct active_service *);
  static int writebuf(struct active_service *, const void *, size_t);
  static ssize_t do_sendpkt(security_handle_t *handle, pkt_t *pkt);
- static void child_signal(int signal);
+ static char *amandad_get_security_conf (char *, void *);
  
  static const char *state2str(state_t);
  static const char *action2str(action_t);
  
- /*
-  * Harvests defunct processes...
-  */
- static void
- child_signal(
-     int               signal)
- {
-     pid_t     rp;
-     (void)signal;     /* Quite compiler warning */
-     /*
-      * Reap and child status and promptly ignore since we don't care...
-      */
-     do {
-       rp = waitpid(-1, NULL, WNOHANG);
-     } while (rp > 0);
- }
  int
  main(
      int               argc,
      int in, out;
      const security_driver_t *secdrv;
      int no_exit = 0;
-     struct sigaction act, oact;
      char *pgm = "amandad";            /* in case argv[0] is not set */
  #if defined(USE_REUSEADDR)
      const int on = 1;
      int r;
  #endif
-     char *conffile;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(-1, 0);
      safe_cd();
      dbopen(DBG_SUBDIR_AMANDAD);
  
      if(argv == NULL) {
-       error("argv == NULL\n");
+       error(_("argv == NULL\n"));
        /*NOTREACHED*/
      }
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
-     /* Tell me when a child exits or dies... */
-     act.sa_handler = child_signal;
-     sigemptyset(&act.sa_mask);
-     act.sa_flags = 0;
-     if(sigaction(SIGCHLD, &act, &oact) != 0) {
-       error("error setting SIGCHLD handler: %s", strerror(errno));
-       /*NOTREACHED*/
-     }
+     config_init(CONFIG_INIT_CLIENT, NULL);
  
-     conffile = vstralloc(CONFIG_DIR, "/", "amanda-client.conf", NULL);
-     if (read_clientconf(conffile) > 0) {
-       error("error reading conffile: %s", conffile);
-       /*NOTREACHED*/
+     if (geteuid() == 0) {
+       check_running_as(RUNNING_AS_ROOT);
+       initgroups(CLIENT_LOGIN, get_client_gid());
+       setgid(get_client_gid());
+       setegid(get_client_gid());
+       seteuid(get_client_uid());
+     } else {
+       check_running_as(RUNNING_AS_CLIENT_LOGIN);
      }
-     amfree(conffile);
- #ifdef USE_DBMALLOC
-     dbmalloc_info.start.size = malloc_inuse(&dbmalloc_info.start.hist);
- #endif
  
      erroutput_type = (ERR_INTERACTIVE|ERR_SYSLOG);
  
- #ifdef FORCE_USERID
-     /* we'd rather not run as root */
-     if (geteuid() == 0) {
-       if(client_uid == (uid_t) -1) {
-           error("error [cannot find user %s in passwd file]\n", CLIENT_LOGIN);
-           /*NOTREACHED*/
-       }
-       initgroups(CLIENT_LOGIN, client_gid);
-       setgid(client_gid);
-       setegid(client_gid);
-       seteuid(client_uid);
-     }
- #endif        /* FORCE_USERID */
      /*
       * ad-hoc argument parsing
       *
            secdrv = security_getdriver(argv[i]);
            auth = argv[i];
            if (secdrv == NULL) {
-               error("no driver for security type '%s'\n", argv[i]);
+               error(_("no driver for security type '%s'\n"), argv[i]);
                  /*NOTREACHED*/
            }
            continue;
            in = out = socket(AF_INET, SOCK_DGRAM, 0);
  #endif
            if (in < 0) {
-               error("can't create dgram socket: %s\n", strerror(errno));
+               error(_("can't create dgram socket: %s\n"), strerror(errno));
                /*NOTREACHED*/
            }
  #ifdef USE_REUSEADDR
            r = setsockopt(in, SOL_SOCKET, SO_REUSEADDR,
-               (void *)&on, (socklen_t)sizeof(on));
+               (void *)&on, (socklen_t_equiv)sizeof(on));
            if (r < 0) {
-               dbprintf(("%s: amandad: setsockopt(SO_REUSEADDR) failed: %s\n",
-                         debug_prefix_time(NULL),
-                         strerror(errno)));
+               dbprintf(_("amandad: setsockopt(SO_REUSEADDR) failed: %s\n"),
+                         strerror(errno));
            }
  #endif
  
            sin.sin_addr.s_addr = INADDR_ANY;
            sin.sin_port = (in_port_t)htons((in_port_t)atoi(argv[i]));
  #endif
-           if (bind(in, (struct sockaddr *)&sin, (socklen_t)sizeof(sin)) < 0) {
-               error("can't bind to port %d: %s\n", atoi(argv[i]),
+           if (bind(in, (struct sockaddr *)&sin, (socklen_t_equiv)sizeof(sin)) < 0) {
+               error(_("can't bind to port %d: %s\n"), atoi(argv[i]),
                    strerror(errno));
                /*NOTREACHED*/
            }
            struct sockaddr_in sin;
  #endif
            int sock;
-           socklen_t n;
+           socklen_t_equiv n;
  
            argv[i] += strlen("-tcp=");
  #ifdef WORKING_IPV6
            sock = socket(AF_INET, SOCK_STREAM, 0);
  #endif
            if (sock < 0) {
-               error("can't create tcp socket: %s\n", strerror(errno));
+               error(_("can't create tcp socket: %s\n"), strerror(errno));
                /*NOTREACHED*/
            }
  #ifdef USE_REUSEADDR
            r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
-               (void *)&on, (socklen_t)sizeof(on));
+               (void *)&on, (socklen_t_equiv)sizeof(on));
            if (r < 0) {
-               dbprintf(("%s: amandad: setsockopt(SO_REUSEADDR) failed: %s\n",
-                         debug_prefix_time(NULL),
-                         strerror(errno)));
+               dbprintf(_("amandad: setsockopt(SO_REUSEADDR) failed: %s\n"),
+                         strerror(errno));
            }
  #endif
  #ifdef WORKING_IPV6
            sin.sin_addr.s_addr = INADDR_ANY;
            sin.sin_port = (in_port_t)htons((in_port_t)atoi(argv[i]));
  #endif
-           if (bind(sock, (struct sockaddr *)&sin, (socklen_t)sizeof(sin)) < 0) {
-               error("can't bind to port %d: %s\n", atoi(argv[i]),
+           if (bind(sock, (struct sockaddr *)&sin, (socklen_t_equiv)sizeof(sin)) < 0) {
+               error(_("can't bind to port %d: %s\n"), atoi(argv[i]),
                    strerror(errno));
                /*NOTREACHED*/
            }
            listen(sock, 10);
-           n = (socklen_t)sizeof(sin);
+           n = (socklen_t_equiv)sizeof(sin);
            in = out = accept(sock, (struct sockaddr *)&sin, &n);
        }
        /*
                    if (strcmp(services[j].name, argv[i]) == 0)
                        break;
                if (j == (int)NSERVICES) {
-                   dbprintf(("%s: %s: invalid service\n",
-                             debug_prefix_time(NULL), argv[i]));
+                   dbprintf(_("%s: invalid service\n"), argv[i]);
                    exit(1);
                }
                services[j].active = 1;
        secdrv = security_getdriver("BSD");
        auth = "bsd";
        if (secdrv == NULL) {
-           error("no driver for default security type 'BSD'\n");
+           error(_("no driver for default security type 'BSD'\n"));
            /*NOTREACHED*/
        }
      }
        exit_on_qlength = 1;
      }
  
+     if (getuid() == 0) {
+       if (strcasecmp(auth, "krb5") != 0) {
+           error(_("Amanda must be run as user '%s' when using '%s' authetication"),
+                 CLIENT_LOGIN, auth);
+       }
+     } else {
+       if (strcasecmp(auth, "krb5") == 0) {
+           error(_("Amanda must be run as user 'root' when using 'krb5' authetication"));
+       }
+     }
      /* initialize */
  
      startclock();
  
-     dbprintf(("%s: version %s\n", get_pname(), version()));
+     dbprintf(_("version %s\n"), version());
      for (i = 0; version_info[i] != NULL; i++) {
-       dbprintf(("%s: %s", debug_prefix_time(NULL), version_info[i]));
+       dbprintf("    %s", version_info[i]);
      }
  
      if (! (argc >= 1 && argv != NULL && argv[0] != NULL)) {
-       dbprintf(("%s: WARNING: argv[0] not defined: check inetd.conf\n",
-                 debug_prefix_time(NULL)));
+       dbprintf(_("WARNING: argv[0] not defined: check inetd.conf\n"));
+     }
+     /* krb5 require the euid to be 0 */
+     if (strcasecmp(auth, "krb5") == 0) {
+       seteuid((uid_t)0);
      }
  
      /*
       * Schedule to call protocol_accept() when new security handles
       * are created on stdin.
       */
-     security_accept(secdrv, in, out, protocol_accept);
+     security_accept(secdrv, amandad_get_security_conf, in, out, protocol_accept, NULL);
  
      /*
       * Schedule an event that will try to exit every 30 seconds if there
@@@ -529,15 -497,6 +508,6 @@@ exit_check
      if (no_exit)
        return;
  
- #ifdef USE_DBMALLOC
-     dbmalloc_info.end.size = malloc_inuse(&dbmalloc_info.end.hist);
-     if (dbmalloc_info.start.size != dbmalloc_info.end.size) {
-       malloc_list(dbfd(), dbmalloc_info.start.hist,
-           dbmalloc_info.end.hist);
-     }
- #endif
      dbclose();
      exit(0);
  }
@@@ -570,8 -529,7 +540,7 @@@ protocol_accept
       * If pkt is NULL, then there was a problem with the new connection.
       */
      if (pkt == NULL) {
-       dbprintf(("%s: accept error: %s\n",
-           debug_prefix_time(NULL), security_geterror(handle)));
+       dbprintf(_("accept error: %s\n"), security_geterror(handle));
        pkt_init(&pkt_out, P_NAK, "ERROR %s\n", security_geterror(handle));
        do_sendpkt(handle, &pkt_out);
        amfree(pkt_out.body);
        return;
      }
  
-     dbprintf(("%s: accept recv %s pkt:\n<<<<<\n%s>>>>>\n",
-       debug_prefix_time(NULL), pkt_type2str(pkt->type), pkt->body));
+     dbprintf(_("accept recv %s pkt:\n<<<<<\n%s>>>>>\n"),
+       pkt_type2str(pkt->type), pkt->body);
  
      /*
       * If this is not a REQ packet, just forget about it.
       */
      if (pkt->type != P_REQ) {
-       dbprintf(("%s: received unexpected %s packet:\n<<<<<\n%s>>>>>\n\n",
-           debug_prefix_time(NULL), pkt_type2str(pkt->type), pkt->body));
+       dbprintf(_("received unexpected %s packet:\n<<<<<\n%s>>>>>\n\n"),
+           pkt_type2str(pkt->type), pkt->body);
        security_close(handle);
        return;
      }
        if (services[i].active == 1 && strcmp(services[i].name, service) == 0)
            break;
      if (i == (int)NSERVICES) {
-       dbprintf(("%s: %s: invalid service\n",
-           debug_prefix_time(NULL), service));
-       pkt_init(&pkt_out, P_NAK, "ERROR %s: invalid service, add '%s' as argument to amandad\n", service, service);
+       dbprintf(_("%s: invalid service\n"), service);
+       pkt_init(&pkt_out, P_NAK, _("ERROR %s: invalid service, add '%s' as argument to amandad\n"), service, service);
        goto send_pkt_out;
      }
  
-     service_path = vstralloc(libexecdir, "/", service, versionsuffix(), NULL);
+     service_path = vstralloc(amlibexecdir, "/", service, versionsuffix(), NULL);
      if (access(service_path, X_OK) < 0) {
-       dbprintf(("%s: can't execute %s: %s\n",
-           debug_prefix_time(NULL), service_path, strerror(errno)));
+       dbprintf(_("can't execute %s: %s\n"), service_path, strerror(errno));
            pkt_init(&pkt_out, P_NAK,
-                    "ERROR execute access to \"%s\" denied\n",
+                    _("ERROR execute access to \"%s\" denied\n"),
                     service_path);
        goto send_pkt_out;
      }
        as = TAILQ_NEXT(as, tq)) {
            if (strcmp(as->cmd, service_path) == 0 &&
                strcmp(as->arguments, arguments) == 0) {
-                   dbprintf(("%s: %s %s: already running, acking req\n",
-                       debug_prefix_time(NULL), service, arguments));
+                   dbprintf(_("%s %s: already running, acking req\n"),
+                       service, arguments);
                    pkt_init_empty(&pkt_out, P_ACK);
                    goto send_pkt_out_no_delete;
            }
       * create a new service instance, and send the arguments down
       * the request pipe.
       */
-     dbprintf(("%s: creating new service: %s\n%s\n",
-       debug_prefix_time(NULL), service, arguments));
+     dbprintf(_("creating new service: %s\n%s\n"), service, arguments);
      as = service_new(handle, service_path, arguments);
      if (writebuf(as, arguments, strlen(arguments)) < 0) {
        const char *errmsg = strerror(errno);
-       dbprintf(("%s: error sending arguments to %s: %s\n",
-           debug_prefix_time(NULL), service, errmsg));
-       pkt_init(&pkt_out, P_NAK, "ERROR error writing arguments to %s: %s\n",
+       dbprintf(_("error sending arguments to %s: %s\n"), service, errmsg);
+       pkt_init(&pkt_out, P_NAK, _("ERROR error writing arguments to %s: %s\n"),
            service, errmsg);
        goto send_pkt_out;
      }
      return;
  
  badreq:
-     pkt_init(&pkt_out, P_NAK, "ERROR invalid REQ\n");
-     dbprintf(("%s: received invalid %s packet:\n<<<<<\n%s>>>>>\n\n",
-       debug_prefix_time(NULL), pkt_type2str(pkt->type), pkt->body));
+     pkt_init(&pkt_out, P_NAK, _("ERROR invalid REQ\n"));
+     dbprintf(_("received invalid %s packet:\n<<<<<\n%s>>>>>\n\n"),
+       pkt_type2str(pkt->type), pkt->body);
  
  send_pkt_out:
      if(as)
@@@ -713,26 -667,22 +678,22 @@@ state_machine
      state_t curstate;
      pkt_t nak;
  
-     amandad_debug(1, ("%s: state_machine: %p entering\n",
-                     debug_prefix_time(NULL), as));
+     amandad_debug(1, _("state_machine: %p entering\n"), as);
      for (;;) {
        curstate = as->state;
-       amandad_debug(1, ("%s: state_machine: %p curstate=%s action=%s\n",
-                         debug_prefix_time(NULL), as,
-                         state2str(curstate), action2str(action)));
+       amandad_debug(1, _("state_machine: %p curstate=%s action=%s\n"), as,
+                         state2str(curstate), action2str(action));
        retaction = (*curstate)(as, action, pkt);
-       amandad_debug(1, ("%s: state_machine: %p curstate=%s returned %s (nextstate=%s)\n",
-                         debug_prefix_time(NULL),
+       amandad_debug(1, _("state_machine: %p curstate=%s returned %s (nextstate=%s)\n"),
                          as, state2str(curstate), action2str(retaction),
-                         state2str(as->state)));
+                         state2str(as->state));
  
        switch (retaction) {
        /*
         * State has queued up and is now blocking on input.
         */
        case A_PENDING:
-           amandad_debug(1, ("%s: state_machine: %p leaving (A_PENDING)\n",
-                             debug_prefix_time(NULL), as));
+           amandad_debug(1, _("state_machine: %p leaving (A_PENDING)\n"), as);
            return;
  
        /*
         * Send a nak, and return.
         */
        case A_SENDNAK:
-           dbprintf(("%s: received unexpected %s packet\n",
-               debug_prefix_time(NULL), pkt_type2str(pkt->type)));
-           dbprintf(("<<<<<\n%s----\n\n", pkt->body));
-           pkt_init(&nak, P_NAK, "ERROR unexpected packet type %s\n",
+           dbprintf(_("received unexpected %s packet\n"),
+               pkt_type2str(pkt->type));
+           dbprintf(_("<<<<<\n%s----\n\n"), pkt->body);
+           pkt_init(&nak, P_NAK, _("ERROR unexpected packet type %s\n"),
                pkt_type2str(pkt->type));
            do_sendpkt(as->security_handle, &nak);
            amfree(nak.body);
            security_recvpkt(as->security_handle, protocol_recv, as, -1);
-           amandad_debug(1, ("%s: state_machine: %p leaving (A_SENDNAK)\n",
-                             debug_prefix_time(NULL), as));
+           amandad_debug(1, _("state_machine: %p leaving (A_SENDNAK)\n"), as);
            return;
  
        /*
         * Service is done.  Remove it and finish.
         */
        case A_FINISH:
+           amandad_debug(1, _("state_machine: %p leaving (A_FINISH)\n"), as);
            service_delete(as);
-           amandad_debug(1, ("%s: state_machine: %p leaving (A_FINISH)\n",
-                             debug_prefix_time(NULL), as));
            return;
  
        default:
@@@ -792,8 -740,8 +751,8 @@@ s_sendack
  
      pkt_init_empty(&ack, P_ACK);
      if (do_sendpkt(as->security_handle, &ack) < 0) {
-       dbprintf(("%s: error sending ACK: %s\n",
-           debug_prefix_time(NULL), security_geterror(as->security_handle)));
+       dbprintf(_("error sending ACK: %s\n"),
+           security_geterror(as->security_handle));
        amfree(ack.body);
        return (A_FINISH);
      }
@@@ -826,8 -774,14 +785,14 @@@ s_repwait
      action_t                  action,
      pkt_t *                   pkt)
  {
-     ssize_t n;
-     char *repbuf_temp;
+     ssize_t   n;
+     char     *repbuf_temp;
+     char     *what;
+     char     *msg;
+     int       code = 0;
+     int       t;
+     int       pid;
+     amwait_t  retstat;
  
      /*
       * We normally shouldn't receive any packets while waiting
         * and go back and wait for more data.
         */
        if (pkt->type == P_REQ) {
-           dbprintf(("%s: received dup P_REQ packet, ACKing it\n",
-               debug_prefix_time(NULL)));
+           dbprintf(_("received dup P_REQ packet, ACKing it\n"));
            amfree(as->rep_pkt.body);
            pkt_init_empty(&as->rep_pkt, P_ACK);
            do_sendpkt(as->security_handle, &as->rep_pkt);
  
      if (action == A_TIMEOUT) {
        amfree(as->rep_pkt.body);
-       pkt_init(&as->rep_pkt, P_NAK, "ERROR timeout on reply pipe\n");
-       dbprintf(("%s: %s timed out waiting for REP data\n",
-           debug_prefix_time(NULL), as->cmd));
+       pkt_init(&as->rep_pkt, P_NAK, _("ERROR timeout on reply pipe\n"));
+       dbprintf(_("%s timed out waiting for REP data\n"), as->cmd);
        do_sendpkt(as->security_handle, &as->rep_pkt);
        return (A_FINISH);
      }
      } while ((n < 0) && ((errno == EINTR) || (errno == EAGAIN)));
      if (n < 0) {
        const char *errstr = strerror(errno);
-       dbprintf(("%s: read error on reply pipe: %s\n",
-                 debug_prefix_time(NULL), errstr));
+       dbprintf(_("read error on reply pipe: %s\n"), errstr);
        amfree(as->rep_pkt.body);
-       pkt_init(&as->rep_pkt, P_NAK, "ERROR read error on reply pipe: %s\n",
+       pkt_init(&as->rep_pkt, P_NAK, _("ERROR read error on reply pipe: %s\n"),
                 errstr);
        do_sendpkt(as->security_handle, &as->rep_pkt);
        return (A_FINISH);
      }
+     /* If end of service, wait for process status */
+     if (n == 0) {
+       t = 0;
+       pid = waitpid(as->pid, &retstat, WNOHANG);
+       while (t<5 && pid == 0) {
+           sleep(1);
+           t++;
+           pid = waitpid(as->pid, &retstat, WNOHANG);
+       }
+       if (pid > 0) {
+           what = NULL;
+           if (! WIFEXITED(retstat)) {
+               what = _("signal");
+               code = WTERMSIG(retstat);
+           } else if (WEXITSTATUS(retstat) != 0) {
+               what = _("code");
+               code = WEXITSTATUS(retstat);
+           }
+           if (what) {
+               dbprintf(_("service %s failed: pid %u exited with %s %d\n"),
+                        (as->cmd)?as->cmd:_("??UNKONWN??"),
+                        (unsigned)as->pid,
+                        what, code);
+               msg = vstrallocf(
+                    _("ERROR service %s failed: pid %u exited with %s %d\n"),
+                    (as->cmd)?as->cmd:_("??UNKONWN??"), (unsigned)as->pid,
+                    what, code);
+               if (as->repbufsize + strlen(msg) >= (as->bufsize - 1)) {
+                       as->bufsize *= 2;
+                       repbuf_temp = alloc(as->bufsize);
+                       memcpy(repbuf_temp, as->repbuf, as->repbufsize + 1);
+                       amfree(as->repbuf);
+                       as->repbuf = repbuf_temp;
+               }
+               strcpy(as->repbuf + as->repbufsize, msg);
+               as->repbufsize += strlen(msg);
+           }
+       }
+     }
      /*
       * If we got some data, go back and wait for more, or EOF.  Nul terminate
       * the buffer first.
@@@ -953,7 -946,12 +957,12 @@@ s_processrep
       * We need to map these to security streams and pass them back
       * to the amanda server.  If the handle is -1, then we don't map.
       */
-     repbuf = stralloc(as->repbuf);
+     if (strncmp_const(as->repbuf,"KENCRYPT\n") == 0) {
+         amandad_kencrypt = KENCRYPT_WILL_DO;
+       repbuf = stralloc(as->repbuf + 9);
+     } else {
+       repbuf = stralloc(as->repbuf);
+     }
      amfree(as->rep_pkt.body);
      pkt_init_empty(&as->rep_pkt, P_REP);
      tok = strtok(repbuf, " ");
@@@ -1046,18 -1044,15 +1055,15 @@@ s_ackwait
            as->state = s_sendrep;
            return (A_CONTINUE);
        }
-       dbprintf(("%s: timeout waiting for ACK for our REP\n",
-           debug_prefix_time(NULL)));
+       dbprintf(_("timeout waiting for ACK for our REP\n"));
        return (A_FINISH);
      }
-     amandad_debug(1, ("%s: received ACK, now opening streams\n",
-                     debug_prefix_time(NULL)));
+     amandad_debug(1, _("received ACK, now opening streams\n"));
  
      assert(action == A_RECVPKT);
  
      if (pkt->type == P_REQ) {
-       dbprintf(("%s: received dup P_REQ packet, resending REP\n",
-                 debug_prefix_time(NULL)));
+       dbprintf(_("received dup P_REQ packet, resending REP\n"));
        as->state = s_sendrep;
        return (A_CONTINUE);
      }
      if (pkt->type != P_ACK)
        return (A_SENDNAK);
  
+     if (amandad_kencrypt == KENCRYPT_WILL_DO) {
+       amandad_kencrypt = KENCRYPT_YES;
+     }
      /*
       * Got the ack, now open the pipes
       */
        if (dh->netfd == NULL)
            continue;
        if (security_stream_accept(dh->netfd) < 0) {
-           dbprintf(("%s: stream %td accept failed: %s\n",
-               debug_prefix_time(NULL),
-               dh - &as->data[0], security_geterror(as->security_handle)));
+           dbprintf(_("stream %td accept failed: %s\n"),
+               dh - &as->data[0], security_geterror(as->security_handle));
            security_stream_close(dh->netfd);
            dh->netfd = NULL;
            continue;
       * If no pipes are open, then we're done.  Otherwise, just start running.
       * The event handlers on all of the pipes will take it from here.
       */
-     amandad_debug(1, ("%s: at end of s_ackwait, npipes is %d\n",
-                     debug_prefix_time(NULL), npipes));
+     amandad_debug(1, _("at end of s_ackwait, npipes is %d\n"), npipes);
      if (npipes == 0)
        return (A_FINISH);
      else {
@@@ -1165,17 -1162,17 +1173,17 @@@ protocol_recv
  
      switch (status) {
      case S_OK:
-       dbprintf(("%s: received %s pkt:\n<<<<<\n%s>>>>>\n",
-           debug_prefix_time(NULL), pkt_type2str(pkt->type), pkt->body));
+       dbprintf(_("received %s pkt:\n<<<<<\n%s>>>>>\n"),
+           pkt_type2str(pkt->type), pkt->body);
        state_machine(as, A_RECVPKT, pkt);
        break;
      case S_TIMEOUT:
-       dbprintf(("%s: timeout\n", debug_prefix_time(NULL)));
+       dbprintf(_("timeout\n"));
        state_machine(as, A_TIMEOUT, NULL);
        break;
      case S_ERROR:
-       dbprintf(("%s: receive error: %s\n",
-           debug_prefix_time(NULL), security_geterror(as->security_handle)));
+       dbprintf(_("receive error: %s\n"),
+           security_geterror(as->security_handle));
        break;
      }
  }
@@@ -1203,7 -1200,7 +1211,7 @@@ process_readnetfd
       * Process has died.
       */
      if (n < 0) {
-       pkt_init(&nak, P_NAK, "A ERROR data descriptor %d broken: %s\n",
+       pkt_init(&nak, P_NAK, _("A ERROR data descriptor %d broken: %s\n"),
            dh->fd_read, strerror(errno));
        goto sendnak;
      }
      }
      if (security_stream_write(dh->netfd, as->databuf, (size_t)n) < 0) {
        /* stream has croaked */
-       pkt_init(&nak, P_NAK, "ERROR write error on stream %d: %s\n",
+       pkt_init(&nak, P_NAK, _("ERROR write error on stream %d: %s\n"),
            security_stream_id(dh->netfd),
            security_stream_geterror(dh->netfd));
        goto sendnak;
@@@ -1256,8 -1253,7 +1264,7 @@@ process_writenetfd
      dh = cookie;
  
      if (dh->fd_write <= 0) {
-       dbprintf(("%s: process_writenetfd: dh->fd_write <= 0\n",
-           debug_prefix_time(NULL)));
+       dbprintf(_("process_writenetfd: dh->fd_write <= 0\n"));
      } else if (size > 0) {
        fullwrite(dh->fd_write, buf, (size_t)size);
        security_stream_read(dh->netfd, process_writenetfd, dh);
@@@ -1299,8 -1295,8 +1306,8 @@@ allocstream
      /* allocate a stream from the security layer and return */
      dh->netfd = security_stream_server(as->security_handle);
      if (dh->netfd == NULL) {
-       dbprintf(("%s: couldn't open stream to server: %s\n",
-           debug_prefix_time(NULL), security_geterror(as->security_handle)));
+       dbprintf(_("couldn't open stream to server: %s\n"),
+           security_geterror(as->security_handle));
        return (-1);
      }
  
@@@ -1334,18 -1330,18 +1341,18 @@@ service_new
      /* a plethora of pipes */
      for (i = 0; i < DATA_FD_COUNT + 1; i++) {
        if (pipe(data_read[i]) < 0) {
-           error("pipe: %s\n", strerror(errno));
+           error(_("pipe: %s\n"), strerror(errno));
            /*NOTREACHED*/
        }
        if (pipe(data_write[i]) < 0) {
-           error("pipe: %s\n", strerror(errno));
+           error(_("pipe: %s\n"), strerror(errno));
            /*NOTREACHED*/
        }
      }
  
      switch(pid = fork()) {
      case -1:
-       error("could not fork service %s: %s\n", cmd, strerror(errno));
+       error(_("could not fork service %s: %s\n"), cmd, strerror(errno));
        /*NOTREACHED*/
      default:
        /*
         * The child.  Put our pipes in their advertised locations
         * and start up.
         */
- #ifdef FORCE_USERID
-       seteuid((uid_t)0);
-       setuid(client_uid);
- #endif
  
        /*
         * The data stream is stdin in the new process
         */
          if (dup2(data_read[0][0], 0) < 0) {
-           error("dup %d to %d failed: %s\n", data_read[0][0], 0,
+           error(_("dup %d to %d failed: %s\n"), data_read[0][0], 0,
                strerror(errno));
            /*NOTREACHED*/
        }
         * The reply stream is stdout
         */
          if (dup2(data_write[0][1], 1) < 0) {
-           error("dup %d to %d failed: %s\n", data_write[0][1], 1,
+           error(_("dup %d to %d failed: %s\n"), data_write[0][1], 1,
                strerror(errno));
        }
          aclose(data_write[0][0]);
                  data_read[i + 1][1] <= DATA_FD_OFFSET + DATA_FD_COUNT*2 - 1) {
                newfd = dup(data_read[i + 1][1]);
                if(newfd == -1)
-                   error("Can't dup out off DATA_FD range");
+                   error(_("Can't dup out off DATA_FD range"));
                data_read[i + 1][1] = newfd;
            }
            while(data_write[i + 1][0] >= DATA_FD_OFFSET &&
                  data_write[i + 1][0] <= DATA_FD_OFFSET + DATA_FD_COUNT*2 - 1) {
                newfd = dup(data_write[i + 1][0]);
                if(newfd == -1)
-                   error("Can't dup out off DATA_FD range");
+                   error(_("Can't dup out off DATA_FD range"));
                data_write[i + 1][0] = newfd;
            }
        }
         */
        for (i = 0; i < DATA_FD_COUNT; i++) {
            if (dup2(data_read[i + 1][1], i*2 + DATA_FD_OFFSET) < 0) {
-               error("dup %d to %d failed: %s\n", data_read[i + 1][1],
+               error(_("dup %d to %d failed: %s\n"), data_read[i + 1][1],
                    i + DATA_FD_OFFSET, strerror(errno));
            }
            aclose(data_read[i + 1][1]);
  
            if (dup2(data_write[i + 1][0], i*2 + 1 + DATA_FD_OFFSET) < 0) {
-               error("dup %d to %d failed: %s\n", data_write[i + 1][0],
+               error(_("dup %d to %d failed: %s\n"), data_write[i + 1][0],
                    i + DATA_FD_OFFSET, strerror(errno));
            }
            aclose(data_write[i + 1][0]);
        }
  
        /* close all unneeded fd */
+       close(STDERR_FILENO);
+       debug_dup_stderr_to_debug();
        safe_fd(DATA_FD_OFFSET, DATA_FD_COUNT*2);
-       close(2);
  
        execle(cmd, cmd, "amandad", auth, (char *)NULL, safe_env());
-       error("could not exec service %s: %s\n", cmd, strerror(errno));
+       error(_("could not exec service %s: %s\n"), cmd, strerror(errno));
        /*NOTREACHED*/
      }
      return NULL;
@@@ -1509,9 -1502,8 +1513,8 @@@ service_delete
      int i;
      struct datafd_handle *dh;
  
-     amandad_debug(1, ("%s: closing service: %s\n",
-                     debug_prefix_time(NULL),
-                     (as->cmd)?as->cmd:"??UNKONWN??"));
+     amandad_debug(1, _("closing service: %s\n"),
+                     (as->cmd)?as->cmd:_("??UNKONWN??"));
  
      assert(as != NULL);
  
@@@ -1604,8 -1596,8 +1607,8 @@@ do_sendpkt
      security_handle_t *       handle,
      pkt_t *           pkt)
  {
-     dbprintf(("%s: sending %s pkt:\n<<<<<\n%s>>>>>\n",
-       debug_prefix_time(NULL), pkt_type2str(pkt->type), pkt->body));
+     dbprintf(_("sending %s pkt:\n<<<<<\n%s>>>>>\n"),
+       pkt_type2str(pkt->type), pkt->body);
      if (handle)
        return security_sendpkt(handle, pkt);
      else
@@@ -1636,7 -1628,7 +1639,7 @@@ state2str
      for (i = 0; i < (int)(sizeof(states) / sizeof(states[0])); i++)
        if (state == states[i].state)
            return (states[i].str);
-     return ("INVALID STATE");
+     return (_("INVALID STATE"));
  }
  
  /*
@@@ -1666,5 -1658,25 +1669,25 @@@ action2str
      for (i = 0; i < (int)(sizeof(actions) / sizeof(actions[0])); i++)
        if (action == actions[i].action)
            return (actions[i].str);
-     return ("UNKNOWN ACTION");
+     return (_("UNKNOWN ACTION"));
+ }
+ static char *
+ amandad_get_security_conf(
+     char *      string,
+     void *      arg)
+ {
+     (void)arg;      /* Quiet unused parameter warning */
+     if (!string || !*string)
+       return(NULL);
+     if (strcmp(string, "kencrypt")==0) {
+       if (amandad_kencrypt == KENCRYPT_YES)
+           return ("yes");
+       else
+           return (NULL);
+     }
+     return(NULL);
  }
diff --combined amandad-src/amandad.h
index 471f73cd3d1549f895f03de0f2b65eb994b8162f,471f73cd3d1549f895f03de0f2b65eb994b8162f..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,56 -1,56 +1,0 @@@
--/*
-- * Amanda, The Advanced Maryland Automatic Network Disk Archiver
-- * Copyright (c) 1991-1998 University of Maryland at College Park
-- * All Rights Reserved.
-- *
-- * 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 U.M. not be used in advertising or
-- * publicity pertaining to distribution of the software without specific,
-- * written prior permission.  U.M. makes no representations about the
-- * suitability of this software for any purpose.  It is provided "as is"
-- * without express or implied warranty.
-- *
-- * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
-- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
-- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-- *
-- * Authors: the Amanda Development Team.  Its members are listed in a
-- * file named AUTHORS, in the root directory of this distribution.
-- */
--/* 
-- * $Id: amandad.h,v 1.5 2006/07/19 17:46:07 martinea Exp $
-- *
-- */
--
--#ifndef AMANDAD_UTIL_H
--#define AMANDAD_UTIL_H
--
--#include "amanda.h"
--#include "amfeatures.h"
--#include "sl.h"
--#include "util.h"             /* for bstrncmp() */
--
--#define DATA_FD_COUNT   3               /* number of general-use pipes */
--#define DATA_FD_OFFSET  50  
--
--typedef struct g_option_s {
--    char *str;
--    am_feature_t *features;
--    char *hostname;
--    char *auth;
--    int maxdumps;
--    char *config;
--} g_option_t;
--
--
--void init_g_options(g_option_t *g_options);
--g_option_t *parse_g_options(char *str, int verbose);
--void free_g_options(g_option_t *);
--
--#endif
diff --combined amplot/Makefile.in
index a0c2eda6918db2e468f1b1b1f18ffb396a51ef41,f2e6b09beb74962be2b2a1f73160bb717f86626e..12179cb653c72f53cd8830c83857d3cc4cdf449d
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for amplot.
  
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # simple include file to pre-define variables which are then +='d by other
+ # scripts in this directory.
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # SYNOPSIS:
+ #
+ # Automake magic to handle the various tasks of building scripts.  Scripts can
+ # be built down to extensionless executables (e.g., foo.pl -> foo), or to 
+ # files with the usual extension (foo-lib.sh.in -> foo.sh).
+ #
+ # Files which support it are syntax-checked when the user invokes 'make check'.
+ #
+ # All *target* filenames must be listed in SCRIPTS_SHELL, SCRIPTS_PERL, and 
+ # SCRIPTS_AWK to support 'make check', 'make dist', and 'make distclean'.
+ #
+ # USAGE:
+ #
+ #   include $(top_srcdir)/config/automake/vars.am
+ #   include $(top_srcdir)/config/automake/scripts.am
+ #   ...
+ #   SCRIPTS_PERL = fooscript barscript perl-lib.pl perlmod.pm
+ #   SCRIPTS_SHELL = shell1 shell2 sh-lib.sh
+ #   SCRIPTS_AWK = talk balk chalk awk-lib.awk
+ #
+ # with the corresponding files in the repository:
+ #
+ #   fooscript.pl barscript.pl perl-lib.pl.in perlmod.pm.in
+ #   shell1.sh shell2.sh sh-lib.sh.in
+ #   talk.awk balk.awk chalk.awk awk-lib.awk.in
+ #
+ # by default, all shell and perl scripts are syntax checked.  If this is
+ # a problem (for example, perl scripts depending on Amanda extension 
+ # modules), then assign to CHECK_{PERL,SHELL} the list of files you wish
+ # to be checked (which can be empty).
+ #
+ # To add extra flags to the perl checks (e.g., to add new -I flags), set
+ # CHECK_PERL_FLAGS.
+ # Implementation note:
+ #
+ # This file uses config.status to substitute @foo@ in those scripts while
+ # converting them. It also adds the executable bits (a+x) to extensionless
+ # files.  The substitution works even though the files are not listed in 
+ # configure.in
+ # vim:ft=automake
+ #
+ # Adjust post-install permissions settings.  This rule works off two
+ # specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data. 
+ # Each is a whitespace-separated list of commands, all of which are either
+ # a variable assignment or a filename.  Three variables are available:
+ #
+ #  - dest= sets the destination directory to e.g., $(sbindir)
+ #  - chown= controls changes in ownership; value is first argument to chown
+ #  - chmod= controls changes in permissions; value is first argument to chmod
+ #
+ # As a special case, chown=amanda is taken as equivalent to 
+ # chown=$(BINARY_OWNER):$(SETUID_GROUP), which may otherwise have problems with
+ # whitespace in the user/group names.
+ # 
+ # when a filename is seen, the currently active variables are applied.
+ #
+ # Note that scripts are data, not executables!
+ #
+ # EXAMPLE
+ #
+ # sbin_PROGRAMS = foo bar bing
+ # libexec_PROGRAMS = pro gram
+ # sbin_SCRIPTS = sk ript
+ # INSTALLPERMS_exec = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             foo bar \
+ #     chmod=u+s,o-rwx \
+ #             bing
+ #     dest=$(libexecdir) chmod= \
+ #             $(libexec_PROGRAMS)
+ # INSTALLPERMS_data = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             $(sbin_SCRIPTS)
+ #
+ # This whole operation is not required when making builds for packaging,
+ # and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+ # AM_CONDITIONAL.
+ # vim:ft=automake
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -40,52 -159,124 +159,124 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
- subdir = amplot
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/amcat.awk.in $(srcdir)/amplot.sh.in
+       $(top_srcdir)/config/automake/installperms.am \
+       $(top_srcdir)/config/automake/precompile.am \
+       $(top_srcdir)/config/automake/scripts.am \
+       $(top_srcdir)/config/automake/vars.am
+ subdir = amplot
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
  CONFIG_HEADER = $(top_builddir)/config/config.h
- CONFIG_CLEAN_FILES = amcat.awk amplot.sh
+ CONFIG_CLEAN_FILES =
  am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amplotdir)"
  sbinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
  SCRIPTS = $(sbin_SCRIPTS)
@@@ -100,15 -291,14 +291,15 @@@ am__strip_dir = `echo $$p | sed -e 's|^
  amplotDATA_INSTALL = $(INSTALL_DATA)
  DATA = $(amplot_DATA)
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -116,14 -306,19 +307,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -134,20 -329,19 +331,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -161,60 -355,169 +357,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -224,10 -527,24 +531,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -238,24 -555,58 +559,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -267,59 -618,46 +622,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -328,37 -666,66 +670,66 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
- SUFFIXES = .sh
- sbin_SCRIPTS = amplot
- amplot_DATA = amcat.awk amplot.awk amplot.g amplot.gp
- amplotdir = $(libexecdir)
- EXTRA_DIST = amplot.awk               amplot.g
- CLEANFILES = amplot.gp.new
- DISTCLEANFILES = amplot.gp amplot
- all: all-am
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUFFIXES = 
+ EXTRA_DIST = amplot.awk amplot.g
+ BUILT_SOURCES = 
+ MOSTLYCLEANFILES = 
+ # config.status leaves config.log files around
+ CLEANFILES = config.log amplot.gp.new
+ # and we'll need to clean up our generated files for distclean
+ DISTCLEANFILES = $(SCRIPTS_SHELL) $(SCRIPTS_PERL) $(SCRIPTS_AWK) \
+       amplot.gp
+ MAINTAINERCLEANFILES = 
+ # syntax-check shell scripts on 'make check'
+ CHECK_SHELL = $(SCRIPTS_SHELL)
+ # sed expression to strip leading directories from a filename; this converts e.g.,
+ # src/foo/bar.so to bar.so.
+ strip_leading_dirs = s|^.*/||
+ SCRIPTS_SHELL = amplot
+ SCRIPTS_AWK = amcat.awk
+ sbin_SCRIPTS = $(SCRIPTS_SHELL)
+ amplotdir = $(amlibexecdir)
+ amplot_DATA = $(SCRIPTS_AWK) amplot.awk amplot.g amplot.gp
+ INSTALLPERMS_data = \
+       dest=$(amplotdir) chown=amanda $(amplot_DATA) \
+       dest=$(sbindir) chown=amanda $(sbin_SCRIPTS)
+ all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
  
  .SUFFIXES:
- .SUFFIXES: .sh
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ .SUFFIXES: 
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -387,13 -754,9 +758,9 @@@ $(top_srcdir)/configure:  $(am__configu
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
- amcat.awk: $(top_builddir)/config.status $(srcdir)/amcat.awk.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amplot.sh: $(top_builddir)/config.status $(srcdir)/amplot.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  install-sbinSCRIPTS: $(sbin_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
+       test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
        @list='$(sbin_SCRIPTS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          if test -f $$d$$p; then \
@@@ -416,13 -779,9 +783,9 @@@ mostlyclean-libtool
  
  clean-libtool:
        -rm -rf .libs _libs
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
  install-amplotDATA: $(amplot_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(amplotdir)" || $(mkdir_p) "$(DESTDIR)$(amplotdir)"
+       test -z "$(amplotdir)" || $(MKDIR_P) "$(DESTDIR)$(amplotdir)"
        @list='$(amplot_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@@ -445,22 -804,21 +808,21 @@@ CTAGS
  
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
            || exit 1; \
          fi; \
        done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
  check-am: all-am
- check: check-am
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+ check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
  all-am: Makefile $(SCRIPTS) $(DATA)
  installdirs:
        for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amplotdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
- install: install-am
+ install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
  install-exec: install-exec-am
  install-data: install-data-am
  uninstall: uninstall-am
@@@ -493,6 -857,7 +861,7 @@@ install-strip
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
  
  clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@@ -504,13 -869,17 +873,17 @@@ distclean-generic
  maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ @WANT_INSTALLPERMS_FALSE@install-exec-hook:
+ @WANT_INSTALLPERMS_FALSE@install-data-hook:
  clean: clean-am
  
  clean-am: clean-generic clean-libtool mostlyclean-am
  
  distclean: distclean-am
        -rm -f Makefile
- distclean-am: clean-am distclean-generic distclean-libtool
+ distclean-am: clean-am distclean-generic
  
  dvi: dvi-am
  
@@@ -526,14 -895,22 +899,22 @@@ install-data-am: install-amplotDAT
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-data-hook
  
+ install-dvi: install-dvi-am
  install-exec-am: install-sbinSCRIPTS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
  
+ install-html: install-html-am
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -552,51 -929,160 +933,160 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-amplotDATA uninstall-info-am \
-       uninstall-sbinSCRIPTS
+ uninstall-am: uninstall-amplotDATA uninstall-sbinSCRIPTS
  
- .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-amplotDATA install-data install-data-am \
-       install-data-hook install-exec install-exec-am \
-       install-exec-hook install-info install-info-am install-man \
+ .MAKE: install-am install-data-am install-exec-am install-strip
+ .PHONY: all all-am check check-am check-local clean clean-generic \
+       clean-libtool dist-hook distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-amplotDATA install-data \
+       install-data-am install-data-hook install-dvi install-dvi-am \
+       install-exec install-exec-am install-exec-hook install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
        install-sbinSCRIPTS install-strip installcheck installcheck-am \
        installdirs maintainer-clean maintainer-clean-generic \
        mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
        ps ps-am uninstall uninstall-am uninstall-amplotDATA \
-       uninstall-info-am uninstall-sbinSCRIPTS
- .sh:
-                       cat $< > $@
-                       chmod a+x $@
- amplot.gp:            amplot.g
-                       cat $(srcdir)/amplot.g > amplot.gp.new
-                       echo "pause -1;" >> amplot.gp.new
-                       rm -f amplot.gp
-                       mv amplot.gp.new amplot.gp
- install-exec-hook:
-       @list="$(sbin_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
+       uninstall-sbinSCRIPTS
+ # Perl
+ %: %.pl $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.pl: %.pl.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ %.pm: %.pm.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Shell
+ %: %.sh $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.sh: %.sh.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Awk
+ %: %.awk $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.awk: %.awk.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # syntax-check perl scripts on 'make check'
+ check-perl: $(CHECK_PERL)
+       @CHECK_PERL="$(CHECK_PERL)"; \
+       if test -n "$(PERL)"; then \
+               for perlobj in $$CHECK_PERL; do \
+                       $(PERL) $(CHECK_PERL_FLAGS) -c -w -T $$perlobj || exit 1; \
+               done; \
+       fi
+ check-local: check-perl
+ check-shell: $(CHECK_SHELL)
+       @CHECK_SHELL="$(CHECK_SHELL)"; \
+       if test -n "$$CHECK_SHELL"; then \
+               if test -n "$(BASH)"; then \
+                       for shobj in $$CHECK_SHELL; do \
+                               if $(BASH) -n $$shobj; then \
+                                       echo "$$shobj syntax OK"; \
+                               else \
+                                       echo "$$shobj syntax error"; \
+                                       exit 1; \
+                               fi; \
+                       done; \
+               else \
+                       echo "No 'bash' available -- cannot syntax-check shell scripts"; \
+               fi; \
+       fi
+ check-local: check-shell
+ # make sure that the sources for all shell and perl scripts get included
+ # in the distribution
+ dist-scripts:
+       SCRIPTS_PERL="$(SCRIPTS_PERL)"; SCRIPTS_SHELL="$(SCRIPTS_SHELL)"; SCRIPTS_AWK="$(SCRIPTS_AWK)"; \
+       for script in $$SCRIPTS_PERL; do \
+               test -f $(srcdir)/$${script}.pl && { cp -p $(srcdir)/$${script}.pl $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL; do \
+               test -f $(srcdir)/$${script}.sh && { cp -p $(srcdir)/$${script}.sh $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.awk && { cp -p $(srcdir)/$${script}.awk $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL $$SCRIPTS_PERL $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.in && { cp -p $(srcdir)/$${script}.in $(distdir)/ || exit 1; } \
+       done; \
+       true
+ dist-hook: dist-scripts
+ @WANT_INSTALLPERMS_TRUE@installperms-exec:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_exec)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on executables"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@installperms-data:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_data)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on data"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@install-exec-hook: installperms-exec
+ @WANT_INSTALLPERMS_TRUE@install-data-hook: installperms-data
+ # A rule to make precompiler output from C files.  This is not used during
+ # ordinary builds, but but can very useful in debugging problems on strange
+ # architectures.  With this rule, we can ask users to 'make foo.i' and send
+ # the result to us.
+ #
+ # It touches some automake internals ($COMPILE), but since it's not
+ # build-critical, that's OK.
+ %.i : %.c
+       $(COMPILE) -E -o $@ $<
  
- install-data-hook:
-       @list="$(amplot_DATA)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(libexecdir)/$$p; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-         done
+ amplot.gp: amplot.g
+       cat $(srcdir)/amplot.g > amplot.gp.new
+       echo "pause -1;" >> amplot.gp.new
+       rm -f amplot.gp
+       mv amplot.gp.new amplot.gp
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
  # Otherwise a system limit (for SysV at least) may be exceeded.
  .NOEXPORT:
diff --combined amplot/amplot.sh
index fe47bcc1c52cb95bb9bd5ac1feb9b2d9c769bc35,fe47bcc1c52cb95bb9bd5ac1feb9b2d9c769bc35..cfbe3f9cd64adee4b8443709e60f22e09ad1bb65
@@@ -48,7 -48,7 +48,8 @@@ confdir=@CONFIG_DIR
  PATH="$PATH:/usr/sbin:/sbin:/usr/ucb"
  export PATH
  
--# we use a different version of the compression variable than amanda itself.
++AWK=@AWK@
++GNUPLOT=@GNUPLOT@
  COMPRESS=@AMPLOT_COMPRESS@
  
  # Function to check that awk can do command-line variable
diff --combined changer-src/Makefile.in
index a1617971abd79e54e5b5d9daadd7b021758869c7,fb70087469307b02e1ab7d10e345d7f16506b73b..6c5552c922f0c7654fcbaa9019f7c99c848e7060
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for Amanda tape changer programs.
  
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # simple include file to pre-define variables which are then +='d by other
+ # scripts in this directory.
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # SYNOPSIS:
+ #
+ # Automake magic to handle the various tasks of building scripts.  Scripts can
+ # be built down to extensionless executables (e.g., foo.pl -> foo), or to 
+ # files with the usual extension (foo-lib.sh.in -> foo.sh).
+ #
+ # Files which support it are syntax-checked when the user invokes 'make check'.
+ #
+ # All *target* filenames must be listed in SCRIPTS_SHELL, SCRIPTS_PERL, and 
+ # SCRIPTS_AWK to support 'make check', 'make dist', and 'make distclean'.
+ #
+ # USAGE:
+ #
+ #   include $(top_srcdir)/config/automake/vars.am
+ #   include $(top_srcdir)/config/automake/scripts.am
+ #   ...
+ #   SCRIPTS_PERL = fooscript barscript perl-lib.pl perlmod.pm
+ #   SCRIPTS_SHELL = shell1 shell2 sh-lib.sh
+ #   SCRIPTS_AWK = talk balk chalk awk-lib.awk
+ #
+ # with the corresponding files in the repository:
+ #
+ #   fooscript.pl barscript.pl perl-lib.pl.in perlmod.pm.in
+ #   shell1.sh shell2.sh sh-lib.sh.in
+ #   talk.awk balk.awk chalk.awk awk-lib.awk.in
+ #
+ # by default, all shell and perl scripts are syntax checked.  If this is
+ # a problem (for example, perl scripts depending on Amanda extension 
+ # modules), then assign to CHECK_{PERL,SHELL} the list of files you wish
+ # to be checked (which can be empty).
+ #
+ # To add extra flags to the perl checks (e.g., to add new -I flags), set
+ # CHECK_PERL_FLAGS.
+ # Implementation note:
+ #
+ # This file uses config.status to substitute @foo@ in those scripts while
+ # converting them. It also adds the executable bits (a+x) to extensionless
+ # files.  The substitution works even though the files are not listed in 
+ # configure.in
+ # vim:ft=automake
+ #
+ # Adjust post-install permissions settings.  This rule works off two
+ # specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data. 
+ # Each is a whitespace-separated list of commands, all of which are either
+ # a variable assignment or a filename.  Three variables are available:
+ #
+ #  - dest= sets the destination directory to e.g., $(sbindir)
+ #  - chown= controls changes in ownership; value is first argument to chown
+ #  - chmod= controls changes in permissions; value is first argument to chmod
+ #
+ # As a special case, chown=amanda is taken as equivalent to 
+ # chown=$(BINARY_OWNER):$(SETUID_GROUP), which may otherwise have problems with
+ # whitespace in the user/group names.
+ # 
+ # when a filename is seen, the currently active variables are applied.
+ #
+ # Note that scripts are data, not executables!
+ #
+ # EXAMPLE
+ #
+ # sbin_PROGRAMS = foo bar bing
+ # libexec_PROGRAMS = pro gram
+ # sbin_SCRIPTS = sk ript
+ # INSTALLPERMS_exec = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             foo bar \
+ #     chmod=u+s,o-rwx \
+ #             bing
+ #     dest=$(libexecdir) chmod= \
+ #             $(libexec_PROGRAMS)
+ # INSTALLPERMS_data = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             $(sbin_SCRIPTS)
+ #
+ # This whole operation is not required when making builds for packaging,
+ # and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+ # AM_CONDITIONAL.
+ # vim:ft=automake
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -40,118 -160,210 +160,211 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
- libexec_PROGRAMS = $(am__EXEEXT_2)
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/config/automake/installperms.am \
+       $(top_srcdir)/config/automake/precompile.am \
+       $(top_srcdir)/config/automake/scripts.am \
+       $(top_srcdir)/config/automake/vars.am
+ amlibexec_PROGRAMS = $(am__EXEEXT_2)
  EXTRA_PROGRAMS = $(am__EXEEXT_1)
+ @WANT_SCSI_AIX_TRUE@am__append_1 = scsi-aix.c
+ @WANT_SCSI_HPUX_NEW_TRUE@am__append_2 = scsi-hpux_new.c
+ @WANT_SCSI_IRIX_TRUE@am__append_3 = scsi-irix.c
+ @WANT_SCSI_LINUX_TRUE@am__append_4 = scsi-linux.c
+ @WANT_SCSI_SOLARIS_TRUE@am__append_5 = scsi-solaris.c
+ @WANT_SCSI_BSD_TRUE@am__append_6 = scsi-bsd.c
+ @WANT_SCSI_CAM_TRUE@am__append_7 = scsi-cam.c
+ @WANT_SCSI_HPUX_TRUE@am__append_8 = scsi-hpux.c
+ @WANT_SCSI_CHIO_TRUE@am__append_9 = scsi-chio.c
  subdir = changer-src
- DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/chg-chio.pl.in $(srcdir)/chg-chs.sh.in \
-       $(srcdir)/chg-disk.sh.in $(srcdir)/chg-iomega.pl.in \
-       $(srcdir)/chg-juke.sh.in $(srcdir)/chg-lib.sh.in \
-       $(srcdir)/chg-manual.sh.in $(srcdir)/chg-mcutil.sh.in \
-       $(srcdir)/chg-mtx.sh.in $(srcdir)/chg-multi.sh.in \
-       $(srcdir)/chg-null.sh.in $(srcdir)/chg-rait.sh.in \
-       $(srcdir)/chg-rth.pl.in $(srcdir)/chg-zd-mtx.sh.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
  CONFIG_HEADER = $(top_builddir)/config/config.h
- CONFIG_CLEAN_FILES = chg-manual.sh chg-multi.sh chg-mtx.sh chg-chs.sh \
-       chg-rth.pl chg-chio.pl chg-zd-mtx.sh chg-juke.sh chg-rait.sh \
-       chg-null.sh chg-mcutil.sh chg-disk.sh chg-iomega.pl chg-lib.sh
- @WANT_CHIO_SCSI_TRUE@am__EXEEXT_1 = chg-scsi-chio$(EXEEXT)
+ CONFIG_CLEAN_FILES =
+ @WANT_CHG_SCSI_CHIO_TRUE@am__EXEEXT_1 = chg-scsi-chio$(EXEEXT)
  @WANT_CHG_SCSI_TRUE@am__EXEEXT_2 = chg-scsi$(EXEEXT)
- am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(libexecdir)"
- libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
- PROGRAMS = $(libexec_PROGRAMS)
- am__objects_1 = chg-scsi.$(OBJEXT) scsi-aix.$(OBJEXT) \
-       scsi-changer-driver.$(OBJEXT) scsi-hpux_new.$(OBJEXT) \
-       scsi-irix.$(OBJEXT) scsi-linux.$(OBJEXT) \
-       scsi-solaris.$(OBJEXT) scsi-bsd.$(OBJEXT) scsi-cam.$(OBJEXT) \
-       sense.$(OBJEXT)
- am_chg_scsi_OBJECTS = $(am__objects_1)
+ am__installdirs = "$(DESTDIR)$(amlibexecdir)" \
+       "$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(amlibexecdir)"
+ amlibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+ PROGRAMS = $(amlibexec_PROGRAMS)
+ am__chg_scsi_SOURCES_DIST = libscsi.h scsi-defs.h chg-scsi.c \
+       scsi-changer-driver.c sense.c scsi-aix.c scsi-hpux_new.c \
+       scsi-irix.c scsi-linux.c scsi-solaris.c scsi-bsd.c scsi-cam.c
+ @WANT_SCSI_AIX_TRUE@am__objects_1 = scsi-aix.$(OBJEXT)
+ @WANT_SCSI_HPUX_NEW_TRUE@am__objects_2 = scsi-hpux_new.$(OBJEXT)
+ @WANT_SCSI_IRIX_TRUE@am__objects_3 = scsi-irix.$(OBJEXT)
+ @WANT_SCSI_LINUX_TRUE@am__objects_4 = scsi-linux.$(OBJEXT)
+ @WANT_SCSI_SOLARIS_TRUE@am__objects_5 = scsi-solaris.$(OBJEXT)
+ @WANT_SCSI_BSD_TRUE@am__objects_6 = scsi-bsd.$(OBJEXT)
+ @WANT_SCSI_CAM_TRUE@am__objects_7 = scsi-cam.$(OBJEXT)
+ am__objects_8 = chg-scsi.$(OBJEXT) scsi-changer-driver.$(OBJEXT) \
+       sense.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
+       $(am__objects_3) $(am__objects_4) $(am__objects_5) \
+       $(am__objects_6) $(am__objects_7)
+ am_chg_scsi_OBJECTS = $(am__objects_8)
  chg_scsi_OBJECTS = $(am_chg_scsi_OBJECTS)
  chg_scsi_LDADD = $(LDADD)
  am__DEPENDENCIES_1 =
- chg_scsi_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../server-src/libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
- am__objects_2 = chg-scsi-chio.$(OBJEXT) scsi-hpux.$(OBJEXT) \
-       scsi-chio.$(OBJEXT)
- am_chg_scsi_chio_OBJECTS = $(am__objects_2)
+ chg_scsi_DEPENDENCIES = ../common-src/libamanda.la \
+       ../tape-src/libamtape.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
+ am__chg_scsi_chio_SOURCES_DIST = libscsi.h chg-scsi-chio.c scsi-hpux.c \
+       scsi-chio.c
+ @WANT_SCSI_HPUX_TRUE@am__objects_9 = scsi-hpux.$(OBJEXT)
+ @WANT_SCSI_CHIO_TRUE@am__objects_10 = scsi-chio.$(OBJEXT)
+ am__objects_11 = chg-scsi-chio.$(OBJEXT) $(am__objects_9) \
+       $(am__objects_10)
+ am_chg_scsi_chio_OBJECTS = $(am__objects_11)
  chg_scsi_chio_OBJECTS = $(am_chg_scsi_chio_OBJECTS)
  chg_scsi_chio_LDADD = $(LDADD)
- chg_scsi_chio_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../server-src/libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
- libexecSCRIPT_INSTALL = $(INSTALL_SCRIPT)
- SCRIPTS = $(libexec_SCRIPTS)
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
+ chg_scsi_chio_DEPENDENCIES = ../common-src/libamanda.la \
+       ../tape-src/libamtape.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
+ amlibexecSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+ SCRIPTS = $(amlibexec_SCRIPTS)
+ DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
  am__depfiles_maybe = depfiles
  COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  CCLD = $(CC)
- LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
  SOURCES = $(chg_scsi_SOURCES) $(chg_scsi_chio_SOURCES)
- DIST_SOURCES = $(chg_scsi_SOURCES) $(chg_scsi_chio_SOURCES)
+ DIST_SOURCES = $(am__chg_scsi_SOURCES_DIST) \
+       $(am__chg_scsi_chio_SOURCES_DIST)
+ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+ am__vpath_adj = case $$p in \
+     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+     *) f=$$p;; \
+   esac;
+ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+ amlibexecDATA_INSTALL = $(INSTALL_DATA)
+ DATA = $(amlibexec_DATA)
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -159,14 -371,19 +372,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -177,20 -394,19 +396,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -204,60 -420,169 +422,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -267,10 -592,24 +596,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -281,24 -620,58 +624,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -310,59 -683,46 +687,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -371,43 -731,84 +735,84 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUFFIXES = 
+ EXTRA_DIST = chg-lib.sh.in scsi-proto.c
+ BUILT_SOURCES = 
+ MOSTLYCLEANFILES = 
+ # config.status leaves config.log files around
+ CLEANFILES = config.log
+ # and we'll need to clean up our generated files for distclean
+ DISTCLEANFILES = $(SCRIPTS_SHELL) $(SCRIPTS_PERL) $(SCRIPTS_AWK)
+ MAINTAINERCLEANFILES = 
+ # syntax-check shell scripts on 'make check'
+ CHECK_SHELL = $(SCRIPTS_SHELL)
+ # sed expression to strip leading directories from a filename; this converts e.g.,
+ # src/foo/bar.so to bar.so.
+ strip_leading_dirs = s|^.*/||
  INCLUDES = -I$(top_builddir)/common-src \
                -I$(top_srcdir)/common-src   \
-               -I$(top_srcdir)/server-src   \
                -I$(top_srcdir)/tape-src     \
                -I$(top_srcdir)/gnulib
  
- LINT = @AMLINT@
- LINTFLAGS = @AMLINTFLAGS@
- LIB_EXTENSION = la
- @WANT_CHIO_SCSI_TRUE@CHIO_SCSI = chg-scsi-chio
+ AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ LINT = $(AMLINT)
+ LINTFLAGS = $(AMLINTFLAGS)
+ @WANT_CHG_SCSI_CHIO_TRUE@CHIO_SCSI = chg-scsi-chio
  @WANT_CHG_SCSI_TRUE@CHG_SCSI = chg-scsi
- libexec_SCRIPTS = chg-manual  chg-multi       chg-mtx         \
-                       chg-rth         chg-chs         chg-chio        \
-                       chg-zd-mtx      chg-juke        chg-rait        \
-                       chg-null        chg-mcutil      chg-disk        \
-                       chg-iomega  chg-lib.sh
+ CHECK_PERL = \
+               chg-chio \
+               chg-iomega \
+               chg-rth
  
- CLEANFILES = $(libexec_SCRIPTS)
+ SCRIPTS_PERL = $(CHECK_PERL)
+ SCRIPTS_SHELL = \
+               chg-manual \
+               chg-multi \
+               chg-mtx \
+               chg-chs \
+               chg-zd-mtx \
+               chg-juke \
+               chg-rait \
+               chg-null \
+               chg-mcutil \
+               chg-disk
+ SCRIPTS_INCLUDE = \
+               chg-lib.sh
+ amlibexec_SCRIPTS = $(SCRIPTS_PERL) $(SCRIPTS_SHELL)
+ amlibexec_DATA = $(SCRIPTS_INCLUDE)
  
  ###
  # Because libamanda includes routines (e.g. regex) provided by some system
  # need to list libamanda twice here, first to override the system library
  # routines, and second to pick up any references in the other libraries.
  ###
- LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../server-src/libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION)   \
-       ../gnulib/libgnu.$(LIB_EXTENSION) \
+ LDADD = ../common-src/libamanda.la \
+       ../tape-src/libamtape.la \
+       ../common-src/libamanda.la \
+       ../gnulib/libgnu.la \
        $(READLINE_LIBS)
  
- SUFFIXES = .pl .sh
- chg_scsi_CSRC = chg-scsi.c scsi-aix.c scsi-changer-driver.c           \
-               scsi-hpux_new.c scsi-irix.c scsi-linux.c scsi-solaris.c \
-               scsi-bsd.c scsi-cam.c sense.c 
+ chg_scsi_CSRC = chg-scsi.c scsi-changer-driver.c sense.c \
+       $(am__append_1) $(am__append_2) $(am__append_3) \
+       $(am__append_4) $(am__append_5) $(am__append_6) \
+       $(am__append_7)
  chg_scsi_SOURCES = libscsi.h scsi-defs.h $(chg_scsi_CSRC)
- chg_scsi_chio_CSRC = chg-scsi-chio.c scsi-hpux.c scsi-chio.c
+ chg_scsi_chio_CSRC = chg-scsi-chio.c $(am__append_8) $(am__append_9)
  chg_scsi_chio_SOURCES = libscsi.h $(chg_scsi_chio_CSRC)
- EXTRA_DIST = scsi-proto.c
- all: all-am
+ INSTALLPERMS_exec = \
+       chown=amanda \
+       dest=$(sbindir) $(sbin_PROGRAMS) \
+       dest=$(amlibexecdir) $(amlibexec_PROGRAMS) 
+ INSTALLPERMS_data = \
+       chown=amanda \
+       dest=$(sbindir) $(sbin_SCRIPTS) \
+       dest=$(amlibexecdir) $(amlibexec_SCRIPTS) $(amlibexec_DATA)
+ all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
  
  .SUFFIXES:
- .SUFFIXES: .pl .sh .c .lo .o .obj
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ .SUFFIXES: .c .lo .o .obj
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -464,86 -873,58 +877,58 @@@ $(top_srcdir)/configure:  $(am__configu
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
- chg-manual.sh: $(top_builddir)/config.status $(srcdir)/chg-manual.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-multi.sh: $(top_builddir)/config.status $(srcdir)/chg-multi.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-mtx.sh: $(top_builddir)/config.status $(srcdir)/chg-mtx.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-chs.sh: $(top_builddir)/config.status $(srcdir)/chg-chs.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-rth.pl: $(top_builddir)/config.status $(srcdir)/chg-rth.pl.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-chio.pl: $(top_builddir)/config.status $(srcdir)/chg-chio.pl.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-zd-mtx.sh: $(top_builddir)/config.status $(srcdir)/chg-zd-mtx.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-juke.sh: $(top_builddir)/config.status $(srcdir)/chg-juke.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-rait.sh: $(top_builddir)/config.status $(srcdir)/chg-rait.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-null.sh: $(top_builddir)/config.status $(srcdir)/chg-null.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-mcutil.sh: $(top_builddir)/config.status $(srcdir)/chg-mcutil.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-disk.sh: $(top_builddir)/config.status $(srcdir)/chg-disk.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-iomega.pl: $(top_builddir)/config.status $(srcdir)/chg-iomega.pl.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- chg-lib.sh: $(top_builddir)/config.status $(srcdir)/chg-lib.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
             || test -f $$p1 \
          ; then \
            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(amlibexecdir)/$$f" || exit 1; \
          else :; fi; \
        done
  
- uninstall-libexecPROGRAMS:
+ uninstall-amlibexecPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
        done
  
- clean-libexecPROGRAMS:
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ clean-amlibexecPROGRAMS:
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
  chg-scsi$(EXEEXT): $(chg_scsi_OBJECTS) $(chg_scsi_DEPENDENCIES) 
        @rm -f chg-scsi$(EXEEXT)
-       $(LINK) $(chg_scsi_LDFLAGS) $(chg_scsi_OBJECTS) $(chg_scsi_LDADD) $(LIBS)
+       $(LINK) $(chg_scsi_OBJECTS) $(chg_scsi_LDADD) $(LIBS)
  chg-scsi-chio$(EXEEXT): $(chg_scsi_chio_OBJECTS) $(chg_scsi_chio_DEPENDENCIES) 
        @rm -f chg-scsi-chio$(EXEEXT)
-       $(LINK) $(chg_scsi_chio_LDFLAGS) $(chg_scsi_chio_OBJECTS) $(chg_scsi_chio_LDADD) $(LIBS)
- install-libexecSCRIPTS: $(libexec_SCRIPTS)
+       $(LINK) $(chg_scsi_chio_OBJECTS) $(chg_scsi_chio_LDADD) $(LIBS)
+ install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
-       @list='$(libexec_SCRIPTS)'; for p in $$list; do \
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_SCRIPTS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          if test -f $$d$$p; then \
            f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(libexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
-           $(libexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(libexecdir)/$$f"; \
+           echo " $(amlibexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+           $(amlibexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(amlibexecdir)/$$f"; \
          else :; fi; \
        done
  
- uninstall-libexecSCRIPTS:
+ uninstall-amlibexecSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(libexec_SCRIPTS)'; for p in $$list; do \
+       @list='$(amlibexec_SCRIPTS)'; for p in $$list; do \
          f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
        done
  
  mostlyclean-compile:
@@@ -567,22 -948,22 +952,22 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sense.Po@am__quote@
  
  .c.o:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c $<
  
  .c.obj:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
  
  .c.lo:
- @am__fastdepCC_TRUE@  if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@@ -592,10 -973,23 +977,23 @@@ mostlyclean-libtool
  
  clean-libtool:
        -rm -rf .libs _libs
+ install-amlibexecDATA: $(amlibexec_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(amlibexecDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         $(amlibexecDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(amlibexecdir)/$$f"; \
+       done
  
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
+ uninstall-amlibexecDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(amlibexec_DATA)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
+       done
  
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@@ -646,22 -1040,21 +1044,21 @@@ distclean-tags
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
            || exit 1; \
          fi; \
        done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
  check-am: all-am
- check: check-am
- all-am: Makefile $(PROGRAMS) $(SCRIPTS)
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+ check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+ all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
  installdirs:
-       for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(libexecdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(amlibexecdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
- install: install-am
+ install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
  install-exec: install-exec-am
  install-data: install-data-am
  uninstall: uninstall-am
@@@ -694,26 -1093,32 +1097,32 @@@ install-strip
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
  
  clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
  
  distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
  
  maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ @WANT_INSTALLPERMS_FALSE@install-exec-hook:
+ @WANT_INSTALLPERMS_FALSE@install-data-hook:
  clean: clean-am
  
- clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-am: clean-amlibexecPROGRAMS clean-generic clean-libtool \
        mostlyclean-am
  
  distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
  
  dvi: dvi-am
  
@@@ -726,15 -1131,26 +1135,26 @@@ info: info-a
  info-am:
  
  install-data-am:
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
  
- install-exec-am: install-libexecPROGRAMS install-libexecSCRIPTS
+ install-exec-am: install-amlibexecDATA install-amlibexecPROGRAMS \
+       install-amlibexecSCRIPTS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
  
+ install-html: install-html-am
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -755,53 -1171,161 +1175,161 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-libexecPROGRAMS \
-       uninstall-libexecSCRIPTS
- .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libexecPROGRAMS clean-libtool ctags distclean \
-       distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-exec \
-       install-exec-am install-exec-hook install-info install-info-am \
-       install-libexecPROGRAMS install-libexecSCRIPTS install-man \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am \
-       uninstall-info-am uninstall-libexecPROGRAMS \
-       uninstall-libexecSCRIPTS
- .pl:
-                       cat $< > $@
-                       chmod a+x $@
-                       -test -z "$(PERL)" || $(PERL) -c $@
- .sh:
-                       cat $< > $@
-                       chmod a+x $@
- install-exec-hook:
-       @list="$(sbin_PROGRAMS) $(sbin_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
-       @list="$(libexec_PROGRAMS) $(libexec_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
+ uninstall-am: uninstall-amlibexecDATA uninstall-amlibexecPROGRAMS \
+       uninstall-amlibexecSCRIPTS
+ .MAKE: install-am install-data-am install-exec-am install-strip
+ .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-amlibexecPROGRAMS clean-generic clean-libtool ctags \
+       dist-hook distclean distclean-compile distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-amlibexecDATA \
+       install-amlibexecPROGRAMS install-amlibexecSCRIPTS \
+       install-data install-data-am install-data-hook install-dvi \
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-amlibexecDATA \
+       uninstall-amlibexecPROGRAMS uninstall-amlibexecSCRIPTS
+ # Perl
+ %: %.pl $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.pl: %.pl.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ %.pm: %.pm.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Shell
+ %: %.sh $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.sh: %.sh.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Awk
+ %: %.awk $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.awk: %.awk.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # syntax-check perl scripts on 'make check'
+ check-perl: $(CHECK_PERL)
+       @CHECK_PERL="$(CHECK_PERL)"; \
+       if test -n "$(PERL)"; then \
+               for perlobj in $$CHECK_PERL; do \
+                       $(PERL) $(CHECK_PERL_FLAGS) -c -w -T $$perlobj || exit 1; \
+               done; \
+       fi
+ check-local: check-perl
+ check-shell: $(CHECK_SHELL)
+       @CHECK_SHELL="$(CHECK_SHELL)"; \
+       if test -n "$$CHECK_SHELL"; then \
+               if test -n "$(BASH)"; then \
+                       for shobj in $$CHECK_SHELL; do \
+                               if $(BASH) -n $$shobj; then \
+                                       echo "$$shobj syntax OK"; \
+                               else \
+                                       echo "$$shobj syntax error"; \
+                                       exit 1; \
+                               fi; \
+                       done; \
+               else \
+                       echo "No 'bash' available -- cannot syntax-check shell scripts"; \
+               fi; \
+       fi
+ check-local: check-shell
+ # make sure that the sources for all shell and perl scripts get included
+ # in the distribution
+ dist-scripts:
+       SCRIPTS_PERL="$(SCRIPTS_PERL)"; SCRIPTS_SHELL="$(SCRIPTS_SHELL)"; SCRIPTS_AWK="$(SCRIPTS_AWK)"; \
+       for script in $$SCRIPTS_PERL; do \
+               test -f $(srcdir)/$${script}.pl && { cp -p $(srcdir)/$${script}.pl $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL; do \
+               test -f $(srcdir)/$${script}.sh && { cp -p $(srcdir)/$${script}.sh $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.awk && { cp -p $(srcdir)/$${script}.awk $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL $$SCRIPTS_PERL $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.in && { cp -p $(srcdir)/$${script}.in $(distdir)/ || exit 1; } \
+       done; \
+       true
+ dist-hook: dist-scripts
+ @WANT_INSTALLPERMS_TRUE@installperms-exec:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_exec)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on executables"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@installperms-data:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_data)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on data"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@install-exec-hook: installperms-exec
+ @WANT_INSTALLPERMS_TRUE@install-data-hook: installperms-data
+ # A rule to make precompiler output from C files.  This is not used during
+ # ordinary builds, but but can very useful in debugging problems on strange
+ # architectures.  With this rule, we can ask users to 'make foo.i' and send
+ # the result to us.
+ #
+ # It touches some automake internals ($COMPILE), but since it's not
+ # build-critical, that's OK.
+ %.i : %.c
+       $(COMPILE) -E -o $@ $<
  
  lint:
-       @ for p in $(libexec_PROGRAMS) $(EXTRA_PROGRAMS); do                    \
+       @ for p in $(amlibexec_PROGRAMS) $(EXTRA_PROGRAMS); do                  \
                f="$$p.c $(libamandad_la_SOURCES)";                             \
                (cd ../common-src; make listlibsrc);                            \
                f="$$f "`cat ../common-src/listlibsrc.output`;                  \
                (cd ../tape-src; make listlibsrc);                              \
                f="$$f "`cat ../tape-src/listlibsrc.output`;                    \
                echo $(LINT) $$f;                                               \
-               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config        \
+               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config   \
                    $(INCLUDES) $$f;                                            \
                if [ $$? -ne 0 ]; then                                          \
                    exit 1;                                                     \
index 2df29bf0d1ab7b833f7ddfdd16da6395ade04166,791154c70243ce2cb8ea3b4d8ff9d09a73c18c77..0e383e67b8358e7d50227e703d2b0af68bfaac91
@@@ -17,53 -17,125 +17,144 @@@ MTF=@MT_FILE_FLAG
  # No user-level customization should be required beyond this point.
  ################################################################################
  
 +####
 +# Set up paths, including PATH for finding amanda executables
 +
 +PATH="$PATH:@sbindir@:@libexecdir@"
  prefix="@prefix@"
  exec_prefix="@exec_prefix@"
  sbindir="@sbindir@"
  libexecdir="@libexecdir@"
 -amlibexecdir="@amlibexecdir@"
 -. "${amlibexecdir}/amanda-sh-lib.sh"
 +
 +####
 +# Gettext
 +
 +#+
 +# Function to:
 +#    Simplify gettext usage by allowing printf format
 +#    strings for translators, use _() identifier for
 +#    xgettext extraction similar to "C" usage and
 +#    collapsing "printf `gettext fmt` ...", which is
 +#    used everywhere, into one function.
 +#-
 +_() {
 +      fmt=`gettext -d amanda "$1"`
 +      shift
 +      printf "$fmt" $*
 +}
  
  ####
  # Eponymous functions to access various amanda apps
+ # TODO: move to amanda-sh-lib.sh
  
  if test "@USE_VERSION_SUFFIXES@" = "yes"; then
      amgetconf() {
          "${sbindir}/amgetconf-@VERSION@" "${@}"
      }
-     ammt() {
-         "${sbindir}/ammt-@VERSION@" "${@}"
-     }
-     amdd() {
-         "${sbindir}/amdd-@VERSION@" "${@}"
+     amdevcheck() {
+         "${sbindir}/amdevcheck-@VERSION@" "${@}"
      }
  else
      amgetconf() {
          "${sbindir}/amgetconf" "${@}"
      }
-     amdd() {
-         "${sbindir}/amdd" "${@}"
-     }
-     amdd() {
-         "${sbindir}/amdd" "${@}"
+     amdevcheck() {
+         "${sbindir}/amdevcheck" "${@}"
      }
  fi
+ # This function tries to find a useable mt binary. If a fully-qualified path
+ # was provided at configure time or via a config file, we check that it
+ # exists and is executable. If an incomplete path was specified (e.g., "mt"),
+ # we ask the shell to search the path. Returns 0 on success, 1 on failure.
+ try_find_mt() {
+     # Only do this once.
+     if test -n $mt_found; then
+         return 0
+     fi
+     if test -z $MT; then
+         MT=mt
+     fi
+     if "`echo $MT | dd bs=1 count=1`" = "/"; then
+         if ! test -f "${MT}"; then
+             echo `_ "mt binary at '%s' not found" "$MTX"`
+             return 1
+         fi
+         if ! test -x "${MT}"; then
+             echo `_ "mt binary at '%s' is not executable" "$MTX"`
+             return 1
+         fi
+     else
+         # try running it to see if the shell can find it
+         "$MT" >/dev/null 2>/dev/null
+         if test $? -eq 127 -o $? -eq 126; then
+             echo `_ "Could not run mt binary at '%s'" "$MTX"`
+             return 1
+         fi
+     fi
+     mt_found=yes
+     return 0
+ }
+ # This function strips the tape: from the front of device names.
+ # Capture its output with ``.
+ tape_device_filename() {
+     # Easy (?) to express this in Perl.
+     perl -e '$ARGV[0] =~ /^(?:([^:]+):)?(.*)$/;
+              print $2 if ($1 || "tape") eq "tape"' "$1"
+ }
+ # Runs amdevcheck to find out if a particular device is usable. Finds the
+ # config name based on pwd, so run it from the config directory. The sole
+ # argument should be the device name to check. Note that amdevcheck can FP
+ # on device status, since some devices can't differentiate between device
+ # problems and an unlabeled volume.
+ amdevcheck_status() {
+     amdevcheck_message=
+     local amdevcheck_config_dir=`pwd`
+     local amdevcheck_config_name=`basename $amdevcheck_config_dir`
+     local amdevcheck_output=`amdevcheck $amdevcheck_config_name $@`
+     local amdevcheck_status=$?
+     test "$amdevcheck_status" -ne 0 && return 0
+     # extract any messages
+     amdevcheck_message=`echo "$amdevcheck_output" | sed '/^MESSAGE /{s/^MESSAGE //;p;}; d'`
+     # Return 1 if it's possible that the device is offline or busy; if the device cannot
+     # distinguish this state from an error condition, then our caller will just have to
+     # time out
+     if echo "$amdevcheck_output" | $EGREP "VOLUME_MISSING" > /dev/null; then
+       return 1
+     else
+       return 0
+     fi
+ }
+ # This attempts to eject a device using whatever system tools are available.
+ # At the moment, that means mt for tapes, and nothing otherwise, but might
+ # be extended at some later time.
+ try_eject_device() {
+     if echo "$1" | grep -e '^tape:' > /dev/null; then
+         try_eject_device_tape="`echo \"$1\" | cut -b6-`"
+     elif echo "$1" | grep -v : > /dev/null; then
+         try_eject_device_tape="$1"
+     else
+         try_eject_device_tape=
+     fi
+     if test -n "$try_eject_device_tape"; then
+         if try_find_mt; then
+             $MT $MTF "$try_eject_device_tape" eject
+         fi
+     else
+         # Technically we failed to eject the device, but we presume that's
+         # because it doesn't require ejection.
+         return 0
+     fi
+ }
diff --combined changer-src/scsi-aix.c
index 5e0dba86f44fa1aa1c4979d0d13e15c6292c8ef0,b768c7396cb1a396b79c24ff12bbbee735b7b618..5e523df727af4ee68d77da328310912363997fc5
@@@ -34,8 -34,6 +34,8 @@@
  
  #include <amanda.h>
  
 +#ifdef HAVE_AIX_LIKE_SCSI
 +
  #include <scsi-defs.h>
  
  #ifdef HAVE_SYS_TYPES_H
@@@ -133,7 -131,7 +133,7 @@@ int SCSI_OpenDevice(int ip
             pDev[ip].inquiry = NULL;
             return(1);
         } else {
-        dbprintf(("SCSI_OpenDevice %s failed\n", pDev[ip].dev));
+        dbprintf(_("SCSI_OpenDevice %s failed\n"), pDev[ip].dev);
           return(0);
         }
      } else {
@@@ -313,17 -311,17 +313,17 @@@ int SCSI_ExecuteCommand(int DeviceFD
                 DecodeExtSense(&ExtendedRequestSense, "SCSI_ExecuteCommand:", debug_file);
                 bcopy(&ExtendedRequestSense, RequestSenseBuf, RequestSenseLength);
                */
-               dbprintf(("ioctl on %d return %d\n", pDev[DeviceFD].fd, Result));
-               dbprintf(("ret: %d errno: %d (%s)\n", Result, errno, ""));
-               dbprintf(("data_length:     %d\n", ds.data_length));
-               dbprintf(("buffer:          0x%X\n", ds.buffer));
-               dbprintf(("timeout_value:   %d\n", ds.timeout_value));
-               dbprintf(("status_validity: %d\n", ds.status_validity));
-               dbprintf(("scsi_bus_status: 0x%X\n", ds.scsi_bus_status));
-               dbprintf(("adapter_status:  0x%X\n", ds.adapter_status));
-               dbprintf(("adap_q_status:   0x%X\n", ds.adap_q_status));
-               dbprintf(("q_tag_msg:       0x%X\n", ds.q_tag_msg));
-               dbprintf(("flags:           0X%X\n", ds.flags));
+               dbprintf(_("ioctl on %d return %d\n"), pDev[DeviceFD].fd, Result);
+               dbprintf(_("ret: %d errno: %d (%s)\n"), Result, errno, "");
+               dbprintf(_("data_length:     %d\n"), ds.data_length);
+               dbprintf(_("buffer:          0x%X\n"), ds.buffer);
+               dbprintf(_("timeout_value:   %d\n"), ds.timeout_value);
+               dbprintf(_("status_validity: %d\n"), ds.status_validity);
+               dbprintf(_("scsi_bus_status: 0x%X\n"), ds.scsi_bus_status);
+               dbprintf(_("adapter_status:  0x%X\n"), ds.adapter_status);
+               dbprintf(_("adap_q_status:   0x%X\n"), ds.adap_q_status);
+               dbprintf(_("q_tag_msg:       0x%X\n"), ds.q_tag_msg);
+               dbprintf(_("flags:           0X%X\n"), ds.flags);
                return(SCSI_ERROR);
              }
          }
@@@ -349,10 -347,10 +349,10 @@@ int SCSI_Scan(void
      {
        for (lun = 0; lun < 7; lun++)
          {
-           printf("Target:Lun %d:%d\n", target,lun);
+           g_printf(_("Target:Lun %d:%d\n"), target,lun);
            if (ioctl(fd, SCIOSTART, IDLUN(target, lun)) == -1) {
              if (errno == EINVAL) {
-               printf("is in use\n");
+               g_printf(_("is in use\n"));
                isbusy = 1;
              } else {
                return(1);
            si.inquiry_ptr = (char *)&buf;
            if (ioctl(fd, SCIOINQU, &si) == -1)
              {
-               printf("SCIOINQU: %s\n", strerror(errno));
+               g_printf("SCIOINQU: %s\n", strerror(errno));
              } else {
                dump_hex(&buf, 255, DEBUG_INFO, SECTION_SCSI);
                type = buf[0] & 0x1lf;
                buf[8+28] = 0;
-               printf("%-28s|Device Type %d\n",buf[8], type);
+               g_printf(_("%-28s|Device Type %d\n"),buf[8], type);
              }
            if (!isbusy && ioctl(fd, SCIOSTOP, IDLUN(target, lun)) == -1)
              return(1);
@@@ -405,7 -403,6 +405,6 @@@ int ScanBus(int print
    return(-1);
  }
  
- #endif
  /*
   * Local variables:
   * indent-tabs-mode: nil
diff --combined changer-src/scsi-chio.c
index 87c6157e824efad237911615d295e877f710bb07,32c3dbb9d5d4d8160fd7c58c143aaf8f6a3568a7..d597b5e6535df03979bfc8e91a6f6447eaaa874d
@@@ -7,15 -7,12 +7,16 @@@
   *    Author: Eric Schnoebelen, eric@cirr.com
   *    based on work by: Larry Pyeatt,  pyeatt@cs.colostate.edu 
   *    Copyright: 1997, 1998 Eric Schnoebelen
-  *            
+  *
+  *    Patch: Michael Enkelis, michaele@mxim.com)
   */
  
  #include "config.h"
  #include "amanda.h"
 +#include "scsi-defs.h"
 +
 +#if (defined(HAVE_CHIO_H) || defined(HAVE_SYS_CHIO_H)) \
 +    && !defined(HAVE_CAMLIB_H)
  
  #include <sys/types.h>
  #include <sys/ioctl.h>
   * and possibly change all the ioctl() calls in this program.  
   */
  
- #if defined(HAVE_CHIO_H)
- #  include <chio.h>
- #else /* HAVE_SYS_CHIO_H must be defined */
- #  include <sys/chio.h>
- #endif
+ #if defined(HAVE_LINUX_CHIO_H)
+ #  include <linux/chio.h>
+ #else
+ # if defined(HAVE_CHIO_H)
+ #   include <chio.h>
+ # else /* HAVE_SYS_CHIO_H must be defined */
+ #   include <sys/chio.h>
+ # endif       /* HAVE_CHIO_H */
+ #endif  /* HAVE_LINUX_CHIO_H */
  
  char *modname = "@(#)" __FILE__ 
                ": SCSI support library for the chio(2) interface @(#)";
   */
  static struct changer_params changer_info;
  static int changer_info_init = 0;
- static int get_changer_info(fd)
+ int GetCurrentSlot(int fd, int drive);
+ int GetDeviceStatus (char *tapedev);
+ int OpenDevice (char *tapedev);
+ int CloseDevice (char *device, int DeviceFD);
+ int Tape_Ready1 ( char *tapedev , int wait);
+ int isempty(int fd, int slot);
+ int find_empty(int fd, int start, int count);
+ int get_clean_state(char *tapedev);
+ int get_slot_count(int fd);
+ int get_drive_count(int fd);
+ int eject_tape(char *tapedev);
+ int drive_loaded(int fd, int drivenum);
+ int unload(int fd, int drive, int slot);
+ int load(int fd, int drive, int slot);
+ static int get_changer_info(int fd)
  {
  int rc = 0;
  
@@@ -64,6 -79,8 +83,8 @@@ int GetCurrentSlot(int fd, int drive
      int slot;
      int i, rc;
  
+     (void)drive;
      get_changer_info(fd);
  
      ces.ces_type = CHET_ST;
  
      rc = ioctl(fd, CHIOGSTATUS, &ces);
      if (rc) {
-       dbprintf(("%s: changer status query failed: 0x%x %s\n",
-                       get_pname(), rc,strerror(errno)));
+       dbprintf(_("changer status query failed: 0x%x %s\n"), rc, strerror(errno));
        return -1;
      }
      for (slot = 0; slot < changer_info.cp_nslots; slot++)
      {
        i = ces.ces_data[slot] & CESTATUS_FULL;
-       dbprintf(("\tGetCurrentSlot slot %d = %d\n", slot, i));
+       dbprintf(_("\tGetCurrentSlot slot %d = %d\n"), slot, i);
        if (!i)
              return(slot);
      }
+     return -1;
  }
  
- int get_clean_state(int changerfd, char *changerdev, char *dev)
+ int get_clean_state(char *tapedev)
  {
-     return 0;
+ int rc;
+ #if defined(BUILTIN)
+     rc = 0;
+ #else
+ #define GMT_CLN(x)    ((x) & 0x00008000)
+     rc = ( GMT_CLN(GetDeviceStatus(tapedev)) );
+ #endif        /* BUILTIN */
+     return rc;
  }
- void eject_tape(char *tape)
+ int eject_tape(char *tapedev)
  /* This function ejects the tape from the drive */
  {
  int mtfd;
  struct mtop mt_com;
  
-     if ((mtfd = open(tape, O_RDWR)) < 0) {
-         dbprintf(("eject_tape : failed\n"));
-         perror(tape);
+     if ( (mtfd = OpenDevice(tapedev) ) < 0) {
+         dbprintf(_("eject_tape : failed\n"));
+         perror(tapedev);
          exit(2);
      }
      mt_com.mt_op = MTOFFL;
      If the drive already ejected the tape due an error, or because it
      was a cleaning tape, threre can be an error, which we should ignore 
  
-        perror(tape);
+        perror(tapedev);
         exit(2);
  */
      }
-     close(mtfd);
+     return(CloseDevice(tapedev, mtfd));
  }
  
  
@@@ -133,8 -155,7 +159,7 @@@ int type=CHET_ST
  
      rc = ioctl(fd, CHIOGSTATUS, &ces);
      if (rc) {
-       dbprintf(("%s: changer status query failed: 0x%x %s\n",
-                       get_pname(), rc,strerror(errno)));
+       dbprintf(_("changer status query failed: 0x%x %s\n"), rc,strerror(errno));
        return -1;
      }
  
@@@ -153,6 -174,9 +178,9 @@@ struct changer_element_status  ces
  int                            i,rc;
  int type=CHET_ST;
  
+     (void)start;
+     (void)count;
      get_changer_info(fd);
  
      ces.ces_type = type;
  
      rc = ioctl(fd,CHIOGSTATUS,&ces);
      if (rc) {
-       dbprintf(("%s: changer status query failed: 0x%x %s\n",
-                       get_pname(), rc, strerror(errno)));
+       dbprintf(_("changer status query failed: 0x%x %s\n"), rc, strerror(errno));
        return -1;
      }
  
@@@ -188,8 -211,7 +215,7 @@@ int type=CHET_DT
  
      rc = ioctl(fd, CHIOGSTATUS, &ces);
      if (rc) {
-       dbprintf(("%s: drive status query failed: 0x%x %s\n",
-                       get_pname(), rc, strerror(errno)));
+       dbprintf(_("drive status query failed: 0x%x %s\n"), rc, strerror(errno));
        return -1;
      }
  
@@@ -208,7 -230,7 +234,7 @@@ int unload(int fd, int drive, int slot
  struct changer_move  move;
  int rc;
  
-     dbprintf(("unload : fd = %d, drive = %d, slot =%d\n",fd, drive, slot));
+     dbprintf(_("unload : fd = %d, drive = %d, slot =%d\n"),fd, drive, slot);
  
      move.cm_fromtype = CHET_DT;
      move.cm_fromunit = drive;
  
      rc = ioctl(fd, CHIOMOVE, &move);
      if (rc){
-       dbprintf(("%s: drive unload failed (MOVE): 0x%x %s\n",
-               get_pname(), rc, strerror(errno)));
+       dbprintf(_("drive unload failed (MOVE): 0x%x %s\n"), rc, strerror(errno));
        return(-2);
      }
      return 0;
@@@ -234,7 -255,7 +259,7 @@@ int load(int fd, int drive, int slot
  struct changer_move  move;
  int rc;
  
-     dbprintf(("load : fd = %d, drive = %d, slot =%d\n",fd, drive, slot));
+     dbprintf(_("load : fd = %d, drive = %d, slot =%d\n"),fd, drive, slot);
  
      move.cm_fromtype = CHET_ST;
      move.cm_fromunit = slot;
  
      rc = ioctl(fd,CHIOMOVE,&move);
      if (rc){
-       dbprintf(("%s: drive load failed (MOVE): 0x%x %s\n",
-               get_pname(), rc, strerror(errno)));
+       dbprintf(_("drive load failed (MOVE): 0x%x %s\n"), rc, strerror(errno));
        return(-2);
      }
      return(0);
@@@ -257,8 -277,7 +281,7 @@@ int rc
  
      rc = get_changer_info(fd);
      if (rc) {
-         dbprintf(("%s: slot count query failed: 0x%x %s\n", 
-                       get_pname(), rc, strerror(errno)));
+         dbprintf(_("slot count query failed: 0x%x %s\n"), rc, strerror(errno));
          return -1;
      }
  
@@@ -271,8 -290,7 +294,7 @@@ int rc
  
      rc = get_changer_info(fd);
      if (rc) {
-         dbprintf(("%s: drive count query failed: 0x%x %s\n",
-                       get_pname(), rc, strerror(errno)));
+         dbprintf(_("drive count query failed: 0x%x %s\n"), rc, strerror(errno));
          return -1;
      }
  
  }
  
  /* This function should ask the drive if it is ready */
- int Tape_Ready ( char *tapedev , int wait)
+ int Tape_Ready1 ( char *tapedev , int wait)
+ #if defined(BUILTIN)
  {
    FILE *out=NULL;
    int cnt=0;
    return 0;
  }
  
+ #else
+ {
+   int cnt=0;
+   dbprintf(_("Tape_Ready1 : wait for BOT : max %d seconds\n"),wait);
+   /* loop on status BOT */
+   while ((cnt < wait)) {
+     if ( GMT_BOT(GetDeviceStatus(tapedev)) ) {
+      break;
+     }
+     /* dbprintf(("Tape_Ready1 : cnt %d\n",cnt)); */
+     cnt++;
+     sleep(1);
+   }
+   if (cnt >= wait) {
+    dbprintf(_("Tape_Ready1 : BOT not found : %d seconds\n"),cnt);
+    return(-1);
+   } else {
+    dbprintf(_("Tape_Ready1 : BOT : %d seconds\n"),cnt);
+   return 0;
+   }
+ }
+ #endif        /* BUILTIN */
+ int GetDeviceStatus (char *tapedev)
+ {
+   struct mtget status;
+   int mtfd, rc;
+   mtfd = OpenDevice(tapedev);
+   ioctl (mtfd, MTIOCGET, (char *)&status);
+   CloseDevice(tapedev, mtfd);
+   rc = status.mt_gstat;
+   return rc;
+ }
  int OpenDevice (char *tapedev)
  {
    int DeviceFD;
  
    DeviceFD = open(tapedev, O_RDWR);
-   return(DeviceFD);
+   return DeviceFD;
  }
  
  int CloseDevice (char *device, int DeviceFD)
  {
-    int ret;
+    int rc;
  
-    dbprintf(("%s: CloseDevice(%s)\n", device, get_pname()));
-    ret = close(DeviceFD);
+    dbprintf(_("CloseDevice(%s)\n"), device);
+    rc = close(DeviceFD);
  
-    return ret;
+    return rc;
  }
  
- #endif
  /*
   * Local variables:
   * indent-tabs-mode: nil
diff --combined client-src/Makefile.in
index b797c1b0fed9b7d0796619af41356adeb56747ff,e830366671f9fb0578c9b67a9f881ea817a70cd3..9a1d00316f83bddf4427178d238291ad2e53f0b3
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for Amanda client programs.
  
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # simple include file to pre-define variables which are then +='d by other
+ # scripts in this directory.
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # SYNOPSIS:
+ #
+ # Automake magic to handle the various tasks of building scripts.  Scripts can
+ # be built down to extensionless executables (e.g., foo.pl -> foo), or to 
+ # files with the usual extension (foo-lib.sh.in -> foo.sh).
+ #
+ # Files which support it are syntax-checked when the user invokes 'make check'.
+ #
+ # All *target* filenames must be listed in SCRIPTS_SHELL, SCRIPTS_PERL, and 
+ # SCRIPTS_AWK to support 'make check', 'make dist', and 'make distclean'.
+ #
+ # USAGE:
+ #
+ #   include $(top_srcdir)/config/automake/vars.am
+ #   include $(top_srcdir)/config/automake/scripts.am
+ #   ...
+ #   SCRIPTS_PERL = fooscript barscript perl-lib.pl perlmod.pm
+ #   SCRIPTS_SHELL = shell1 shell2 sh-lib.sh
+ #   SCRIPTS_AWK = talk balk chalk awk-lib.awk
+ #
+ # with the corresponding files in the repository:
+ #
+ #   fooscript.pl barscript.pl perl-lib.pl.in perlmod.pm.in
+ #   shell1.sh shell2.sh sh-lib.sh.in
+ #   talk.awk balk.awk chalk.awk awk-lib.awk.in
+ #
+ # by default, all shell and perl scripts are syntax checked.  If this is
+ # a problem (for example, perl scripts depending on Amanda extension 
+ # modules), then assign to CHECK_{PERL,SHELL} the list of files you wish
+ # to be checked (which can be empty).
+ #
+ # To add extra flags to the perl checks (e.g., to add new -I flags), set
+ # CHECK_PERL_FLAGS.
+ # Implementation note:
+ #
+ # This file uses config.status to substitute @foo@ in those scripts while
+ # converting them. It also adds the executable bits (a+x) to extensionless
+ # files.  The substitution works even though the files are not listed in 
+ # configure.in
+ # vim:ft=automake
+ #
+ # Adjust post-install permissions settings.  This rule works off two
+ # specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data. 
+ # Each is a whitespace-separated list of commands, all of which are either
+ # a variable assignment or a filename.  Three variables are available:
+ #
+ #  - dest= sets the destination directory to e.g., $(sbindir)
+ #  - chown= controls changes in ownership; value is first argument to chown
+ #  - chmod= controls changes in permissions; value is first argument to chmod
+ #
+ # As a special case, chown=amanda is taken as equivalent to 
+ # chown=$(BINARY_OWNER):$(SETUID_GROUP), which may otherwise have problems with
+ # whitespace in the user/group names.
+ # 
+ # when a filename is seen, the currently active variables are applied.
+ #
+ # Note that scripts are data, not executables!
+ #
+ # EXAMPLE
+ #
+ # sbin_PROGRAMS = foo bar bing
+ # libexec_PROGRAMS = pro gram
+ # sbin_SCRIPTS = sk ript
+ # INSTALLPERMS_exec = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             foo bar \
+ #     chmod=u+s,o-rwx \
+ #             bing
+ #     dest=$(libexecdir) chmod= \
+ #             $(libexec_PROGRAMS)
+ # INSTALLPERMS_data = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             $(sbin_SCRIPTS)
+ #
+ # This whole operation is not required when making builds for packaging,
+ # and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+ # AM_CONDITIONAL.
+ # vim:ft=automake
  
  
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -42,171 -161,231 +161,231 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
- libexec_PROGRAMS = noop$(EXEEXT) calcsize$(EXEEXT) killpgrp$(EXEEXT) \
+ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in \
+       $(top_srcdir)/config/automake/installperms.am \
+       $(top_srcdir)/config/automake/precompile.am \
+       $(top_srcdir)/config/automake/scripts.am \
+       $(top_srcdir)/config/automake/vars.am
+ amlibexec_PROGRAMS = noop$(EXEEXT) calcsize$(EXEEXT) killpgrp$(EXEEXT) \
        rundump$(EXEEXT) runtar$(EXEEXT) selfcheck$(EXEEXT) \
        sendbackup$(EXEEXT) sendsize$(EXEEXT) versionsuffix$(EXEEXT)
+ @WANT_SAMBA_TRUE@am__append_1 = findpass.c
  EXTRA_PROGRAMS = $(am__EXEEXT_1)
+ @WANT_SETUID_CLIENT_TRUE@am__append_2 = dest=$(amlibexecdir) chown=root chmod=u+s,o-rwx \
+ @WANT_SETUID_CLIENT_TRUE@             calcsize killpgrp rundump runtar
  subdir = client-src
- DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/patch-system.sh.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
  CONFIG_HEADER = $(top_builddir)/config/config.h
- CONFIG_CLEAN_FILES = patch-system.sh
+ CONFIG_CLEAN_FILES =
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  am__vpath_adj = case $$p in \
      $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
      *) f=$$p;; \
    esac;
  am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
- am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" \
-       "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"
- libLTLIBRARIES_INSTALL = $(INSTALL)
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libamclient_la_LIBADD =
+ am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" \
+       "$(DESTDIR)$(amlibexecdir)"
amlibLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(amlib_LTLIBRARIES)
+ libamclient_la_DEPENDENCIES = ../common-src/libamanda.la
  am__libamclient_la_SOURCES_DIST = amandates.c getfsent.c unctime.c \
        client_util.c findpass.c
  @WANT_SAMBA_TRUE@am__objects_1 = findpass.lo
  am_libamclient_la_OBJECTS = amandates.lo getfsent.lo unctime.lo \
        client_util.lo $(am__objects_1)
  libamclient_la_OBJECTS = $(am_libamclient_la_OBJECTS)
+ libamclient_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(libamclient_la_LDFLAGS) $(LDFLAGS) -o $@
  am__EXEEXT_1 = getfsent$(EXEEXT)
- libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
- PROGRAMS = $(libexec_PROGRAMS)
amlibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+ PROGRAMS = $(amlibexec_PROGRAMS)
  calcsize_SOURCES = calcsize.c
  calcsize_OBJECTS = calcsize.$(OBJEXT)
  calcsize_LDADD = $(LDADD)
- calcsize_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ calcsize_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  am_getfsent_OBJECTS = getfsent.test.$(OBJEXT)
  getfsent_OBJECTS = $(am_getfsent_OBJECTS)
  getfsent_LDADD = $(LDADD)
- getfsent_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ getfsent_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  killpgrp_SOURCES = killpgrp.c
  killpgrp_OBJECTS = killpgrp.$(OBJEXT)
  killpgrp_LDADD = $(LDADD)
- killpgrp_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ killpgrp_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  noop_SOURCES = noop.c
  noop_OBJECTS = noop.$(OBJEXT)
  noop_LDADD = $(LDADD)
- noop_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ noop_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  rundump_SOURCES = rundump.c
  rundump_OBJECTS = rundump.$(OBJEXT)
  rundump_LDADD = $(LDADD)
- rundump_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ rundump_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  runtar_SOURCES = runtar.c
  runtar_OBJECTS = runtar.$(OBJEXT)
  runtar_LDADD = $(LDADD)
- runtar_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ runtar_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  selfcheck_SOURCES = selfcheck.c
  selfcheck_OBJECTS = selfcheck.$(OBJEXT)
  selfcheck_LDADD = $(LDADD)
- selfcheck_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ selfcheck_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  am_sendbackup_OBJECTS = sendbackup.$(OBJEXT) sendbackup-dump.$(OBJEXT) \
        sendbackup-gnutar.$(OBJEXT)
  sendbackup_OBJECTS = $(am_sendbackup_OBJECTS)
  sendbackup_LDADD = $(LDADD)
- sendbackup_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ sendbackup_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  sendsize_SOURCES = sendsize.c
  sendsize_OBJECTS = sendsize.$(OBJEXT)
  sendsize_LDADD = $(LDADD)
- sendsize_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ sendsize_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  versionsuffix_SOURCES = versionsuffix.c
  versionsuffix_OBJECTS = versionsuffix.$(OBJEXT)
  versionsuffix_LDADD = $(LDADD)
- versionsuffix_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
- libexecSCRIPT_INSTALL = $(INSTALL_SCRIPT)
- sbinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
- SCRIPTS = $(libexec_SCRIPTS) $(sbin_SCRIPTS)
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
+ versionsuffix_DEPENDENCIES = ../common-src/libamanda.la libamclient.la \
+       ../amandad-src/libamandad.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
+ amlibexecSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+ SCRIPTS = $(amlibexec_SCRIPTS)
+ DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
  am__depfiles_maybe = depfiles
  COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  CCLD = $(CC)
- LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
  SOURCES = $(libamclient_la_SOURCES) calcsize.c $(getfsent_SOURCES) \
        killpgrp.c noop.c rundump.c runtar.c selfcheck.c \
        $(sendbackup_SOURCES) sendsize.c versionsuffix.c
@@@ -217,15 -396,14 +396,15 @@@ HEADERS = $(noinst_HEADERS
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -233,14 -411,19 +412,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -251,20 -434,19 +436,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -278,60 -460,169 +462,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -341,10 -632,24 +636,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -355,24 -660,58 +664,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -384,59 -723,46 +727,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -445,43 -771,68 +775,68 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUFFIXES = 
+ EXTRA_DIST = 
+ BUILT_SOURCES = 
+ MOSTLYCLEANFILES = 
+ # config.status leaves config.log files around
+ CLEANFILES = config.log *.test.c
+ # and we'll need to clean up our generated files for distclean
+ DISTCLEANFILES = $(SCRIPTS_SHELL) $(SCRIPTS_PERL) $(SCRIPTS_AWK)
+ MAINTAINERCLEANFILES = 
+ # syntax-check shell scripts on 'make check'
+ CHECK_SHELL = $(SCRIPTS_SHELL)
+ # sed expression to strip leading directories from a filename; this converts e.g.,
+ # src/foo/bar.so to bar.so.
+ strip_leading_dirs = s|^.*/||
  INCLUDES = -I$(top_builddir)/common-src \
                -I$(top_srcdir)/common-src   \
                -I$(top_srcdir)/amandad-src  \
                -I$(top_srcdir)/gnulib
  
- LINT = @AMLINT@
- LINTFLAGS = @AMLINTFLAGS@
- lib_LTLIBRARIES = libamclient.la
- LIB_EXTENSION = la
- sbin_SCRIPTS = @CLIENT_SCRIPTS_OPT@
- libexec_SCRIPTS = patch-system
- @WANT_SAMBA_TRUE@samba_sources = findpass.c
- @WANT_RUNTIME_PSEUDO_RELOC_TRUE@AM_LDFLAGS = -Wl,-enable-runtime-pseudo-reloc
- libamclient_la_SOURCES = amandates.c          getfsent.c      \
-                       unctime.c               client_util.c   \
-                       $(samba_sources)
+ AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ LINT = $(AMLINT)
+ LINTFLAGS = $(AMLINTFLAGS)
+ amlib_LTLIBRARIES = libamclient.la
+ amlibexec_SCRIPTS = patch-system
+ CHECK_PERL = $(sbin_SCRIPTS)
+ SCRIPTS_PERL = $(CHECK_PERL)
+ SCRIPTS_SHELL = $(amlibexec_SCRIPTS)
+ libamclient_la_SOURCES = amandates.c getfsent.c unctime.c \
+       client_util.c $(am__append_1)
  libamclient_la_LDFLAGS = -release $(VERSION)
+ libamclient_la_LIBADD = ../common-src/libamanda.la
  
  ###
  # Because libamanda includes routines (e.g. regex) provided by some system
  # need to list libamanda twice here, first to override the system library
  # routines, and second to pick up any references in the other libraries.
  ###
- LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamclient.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ LDADD = ../common-src/libamanda.la \
+       libamclient.la \
+       ../amandad-src/libamandad.la \
+       ../common-src/libamanda.la \
+       ../gnulib/libgnu.la
  
- SUFFIXES = .sh .pl
  
  # these are used for testing only:
  TEST_PROGS = getfsent
- CLEANFILES = *.test.c patch-system
- EXTRA_SCRIPTS = amhpfixdevs           amsinixfixdevs
- DISTCLEANFILES = $(EXTRA_SCRIPTS)
- EXTRA_DIST = amhpfixdevs.sh           amsinixfixdevs.sh
  sendbackup_SOURCES = sendbackup.c             sendbackup.h      \
                        sendbackup-dump.c       sendbackup-gnutar.c
  
  noinst_HEADERS = amandates.h  getfsent.h      \
                        findpass.h      client_util.h
  
+ INSTALLPERMS_exec = chown=amanda dest=$(amlibexecdir) \
+       $(amlibexec_PROGRAMS) $(am__append_2)
+ INSTALLPERMS_data = chown=amanda \
+       dest=$(sbindir) $(sbin_SCRIPTS) \
+       dest=$(amlibexecdir) $(amlibexec_SCRIPTS)
  getfsent_SOURCES = getfsent.test.c
- all: all-am
+ all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
  
  .SUFFIXES:
- .SUFFIXES: .sh .pl .c .lo .o .obj
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ .SUFFIXES: .c .lo .o .obj
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -543,132 -896,111 +900,111 @@@ $(top_srcdir)/configure:  $(am__configu
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
- patch-system.sh: $(top_builddir)/config.status $(srcdir)/patch-system.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
            f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           echo " $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(amlibdir)/$$f'"; \
+           $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(amlibdir)/$$f"; \
          else :; fi; \
        done
  
- uninstall-libLTLIBRARIES:
+ uninstall-amlibLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(amlibdir)/$$p'"; \
+         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(amlibdir)/$$p"; \
        done
  
- clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ clean-amlibLTLIBRARIES:
+       -test -z "$(amlib_LTLIBRARIES)" || rm -f $(amlib_LTLIBRARIES)
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
          test "$$dir" != "$$p" || dir=.; \
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
  libamclient.la: $(libamclient_la_OBJECTS) $(libamclient_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libamclient_la_LDFLAGS) $(libamclient_la_OBJECTS) $(libamclient_la_LIBADD) $(LIBS)
- install-libexecPROGRAMS: $(libexec_PROGRAMS)
+       $(libamclient_la_LINK) -rpath $(amlibdir) $(libamclient_la_OBJECTS) $(libamclient_la_LIBADD) $(LIBS)
+ install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
             || test -f $$p1 \
          ; then \
            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(amlibexecdir)/$$f" || exit 1; \
          else :; fi; \
        done
  
- uninstall-libexecPROGRAMS:
+ uninstall-amlibexecPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
        done
  
- clean-libexecPROGRAMS:
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ clean-amlibexecPROGRAMS:
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
  calcsize$(EXEEXT): $(calcsize_OBJECTS) $(calcsize_DEPENDENCIES) 
        @rm -f calcsize$(EXEEXT)
-       $(LINK) $(calcsize_LDFLAGS) $(calcsize_OBJECTS) $(calcsize_LDADD) $(LIBS)
+       $(LINK) $(calcsize_OBJECTS) $(calcsize_LDADD) $(LIBS)
  getfsent$(EXEEXT): $(getfsent_OBJECTS) $(getfsent_DEPENDENCIES) 
        @rm -f getfsent$(EXEEXT)
-       $(LINK) $(getfsent_LDFLAGS) $(getfsent_OBJECTS) $(getfsent_LDADD) $(LIBS)
+       $(LINK) $(getfsent_OBJECTS) $(getfsent_LDADD) $(LIBS)
  killpgrp$(EXEEXT): $(killpgrp_OBJECTS) $(killpgrp_DEPENDENCIES) 
        @rm -f killpgrp$(EXEEXT)
-       $(LINK) $(killpgrp_LDFLAGS) $(killpgrp_OBJECTS) $(killpgrp_LDADD) $(LIBS)
+       $(LINK) $(killpgrp_OBJECTS) $(killpgrp_LDADD) $(LIBS)
  noop$(EXEEXT): $(noop_OBJECTS) $(noop_DEPENDENCIES) 
        @rm -f noop$(EXEEXT)
-       $(LINK) $(noop_LDFLAGS) $(noop_OBJECTS) $(noop_LDADD) $(LIBS)
+       $(LINK) $(noop_OBJECTS) $(noop_LDADD) $(LIBS)
  rundump$(EXEEXT): $(rundump_OBJECTS) $(rundump_DEPENDENCIES) 
        @rm -f rundump$(EXEEXT)
-       $(LINK) $(rundump_LDFLAGS) $(rundump_OBJECTS) $(rundump_LDADD) $(LIBS)
+       $(LINK) $(rundump_OBJECTS) $(rundump_LDADD) $(LIBS)
  runtar$(EXEEXT): $(runtar_OBJECTS) $(runtar_DEPENDENCIES) 
        @rm -f runtar$(EXEEXT)
-       $(LINK) $(runtar_LDFLAGS) $(runtar_OBJECTS) $(runtar_LDADD) $(LIBS)
+       $(LINK) $(runtar_OBJECTS) $(runtar_LDADD) $(LIBS)
  selfcheck$(EXEEXT): $(selfcheck_OBJECTS) $(selfcheck_DEPENDENCIES) 
        @rm -f selfcheck$(EXEEXT)
-       $(LINK) $(selfcheck_LDFLAGS) $(selfcheck_OBJECTS) $(selfcheck_LDADD) $(LIBS)
+       $(LINK) $(selfcheck_OBJECTS) $(selfcheck_LDADD) $(LIBS)
  sendbackup$(EXEEXT): $(sendbackup_OBJECTS) $(sendbackup_DEPENDENCIES) 
        @rm -f sendbackup$(EXEEXT)
-       $(LINK) $(sendbackup_LDFLAGS) $(sendbackup_OBJECTS) $(sendbackup_LDADD) $(LIBS)
+       $(LINK) $(sendbackup_OBJECTS) $(sendbackup_LDADD) $(LIBS)
  sendsize$(EXEEXT): $(sendsize_OBJECTS) $(sendsize_DEPENDENCIES) 
        @rm -f sendsize$(EXEEXT)
-       $(LINK) $(sendsize_LDFLAGS) $(sendsize_OBJECTS) $(sendsize_LDADD) $(LIBS)
+       $(LINK) $(sendsize_OBJECTS) $(sendsize_LDADD) $(LIBS)
  versionsuffix$(EXEEXT): $(versionsuffix_OBJECTS) $(versionsuffix_DEPENDENCIES) 
        @rm -f versionsuffix$(EXEEXT)
-       $(LINK) $(versionsuffix_LDFLAGS) $(versionsuffix_OBJECTS) $(versionsuffix_LDADD) $(LIBS)
- install-libexecSCRIPTS: $(libexec_SCRIPTS)
+       $(LINK) $(versionsuffix_OBJECTS) $(versionsuffix_LDADD) $(LIBS)
+ install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
-       @list='$(libexec_SCRIPTS)'; for p in $$list; do \
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_SCRIPTS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          if test -f $$d$$p; then \
            f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(libexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
-           $(libexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(libexecdir)/$$f"; \
+           echo " $(amlibexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+           $(amlibexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(amlibexecdir)/$$f"; \
          else :; fi; \
        done
  
- uninstall-libexecSCRIPTS:
+ uninstall-amlibexecSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(libexec_SCRIPTS)'; for p in $$list; do \
+       @list='$(amlibexec_SCRIPTS)'; for p in $$list; do \
          f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
-       done
- install-sbinSCRIPTS: $(sbin_SCRIPTS)
-       @$(NORMAL_INSTALL)
-       test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
-       @list='$(sbin_SCRIPTS)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(sbinSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
-           $(sbinSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(sbindir)/$$f"; \
-         else :; fi; \
-       done
- uninstall-sbinSCRIPTS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(sbin_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(sbindir)/$$f"; \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
        done
  
  mostlyclean-compile:
@@@ -696,22 -1028,22 +1032,22 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versionsuffix.Po@am__quote@
  
  .c.o:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c $<
  
  .c.obj:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
  
  .c.lo:
- @am__fastdepCC_TRUE@  if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@@ -722,10 -1054,6 +1058,6 @@@ mostlyclean-libtool
  clean-libtool:
        -rm -rf .libs _libs
  
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@@ -775,22 -1103,21 +1107,21 @@@ distclean-tags
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
            || exit 1; \
          fi; \
        done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
  check-am: all-am
- check: check-am
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+ check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
  all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(HEADERS)
  installdirs:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(amlibexecdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
- install: install-am
+ install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
  install-exec: install-exec-am
  install-data: install-data-am
  uninstall: uninstall-am
@@@ -823,6 -1156,7 +1160,7 @@@ install-strip
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
  
  clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@@ -834,16 -1168,20 +1172,20 @@@ distclean-generic
  maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ @WANT_INSTALLPERMS_FALSE@install-exec-hook:
+ @WANT_INSTALLPERMS_FALSE@install-data-hook:
  clean: clean-am
  
- clean-am: clean-generic clean-libLTLIBRARIES clean-libexecPROGRAMS \
+ clean-am: clean-amlibLTLIBRARIES clean-amlibexecPROGRAMS clean-generic \
        clean-libtool mostlyclean-am
  
  distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
  
  dvi: dvi-am
  
@@@ -855,17 -1193,26 +1197,26 @@@ info: info-a
  
  info-am:
  
- install-data-am:
+ install-data-am: install-amlibLTLIBRARIES
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
  
- install-exec-am: install-libLTLIBRARIES install-libexecPROGRAMS \
-       install-libexecSCRIPTS install-sbinSCRIPTS
+ install-dvi: install-dvi-am
+ install-exec-am: install-amlibexecPROGRAMS install-amlibexecSCRIPTS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
  
+ install-html: install-html-am
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -886,72 -1233,166 +1237,166 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
-       uninstall-libexecPROGRAMS uninstall-libexecSCRIPTS \
-       uninstall-sbinSCRIPTS
- .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libLTLIBRARIES clean-libexecPROGRAMS clean-libtool ctags \
-       distclean distclean-compile distclean-generic \
-       distclean-libtool distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-exec-hook \
-       install-info install-info-am install-libLTLIBRARIES \
-       install-libexecPROGRAMS install-libexecSCRIPTS install-man \
-       install-sbinSCRIPTS install-strip installcheck installcheck-am \
-       installdirs maintainer-clean maintainer-clean-generic \
-       mostlyclean mostlyclean-compile mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
-       uninstall-am uninstall-info-am uninstall-libLTLIBRARIES \
-       uninstall-libexecPROGRAMS uninstall-libexecSCRIPTS \
-       uninstall-sbinSCRIPTS
- .pl:
-                       cat $< > $@
-                       chmod a+x $@
-                       -test -z "$(PERL)" || $(PERL) -c $@
- .sh:
-                       cat $< > $@
-                       chmod a+x $@
- install-exec-hook:
-       @list="$(sbin_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
-       @list="$(libexec_PROGRAMS) $(libexec_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
- @WANT_SETUID_CLIENT_TRUE@     @list="calcsize killpgrp rundump runtar"; \
- @WANT_SETUID_CLIENT_TRUE@     for p in $$list; do \
- @WANT_SETUID_CLIENT_TRUE@             if echo "$(libexec_PROGRAMS)" | grep $$p >/dev/null 2>&1; then \
- @WANT_SETUID_CLIENT_TRUE@                     pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
- @WANT_SETUID_CLIENT_TRUE@                     echo chown root $$pa; \
- @WANT_SETUID_CLIENT_TRUE@                     chown root $$pa; \
- @WANT_SETUID_CLIENT_TRUE@                     echo chmod u+s,o-rwx $$pa; \
- @WANT_SETUID_CLIENT_TRUE@                     chmod u+s,o-rwx $$pa; \
- @WANT_SETUID_CLIENT_TRUE@             else true; \
- @WANT_SETUID_CLIENT_TRUE@             fi; \
- @WANT_SETUID_CLIENT_TRUE@     done
+ uninstall-am: uninstall-amlibLTLIBRARIES uninstall-amlibexecPROGRAMS \
+       uninstall-amlibexecSCRIPTS
+ .MAKE: install-am install-data-am install-exec-am install-strip
+ .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-amlibLTLIBRARIES clean-amlibexecPROGRAMS clean-generic \
+       clean-libtool ctags dist-hook distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-amlibLTLIBRARIES install-amlibexecPROGRAMS \
+       install-amlibexecSCRIPTS install-data install-data-am \
+       install-data-hook install-dvi install-dvi-am install-exec \
+       install-exec-am install-exec-hook install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-amlibLTLIBRARIES \
+       uninstall-amlibexecPROGRAMS uninstall-amlibexecSCRIPTS
+ # Perl
+ %: %.pl $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.pl: %.pl.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ %.pm: %.pm.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Shell
+ %: %.sh $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.sh: %.sh.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Awk
+ %: %.awk $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.awk: %.awk.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # syntax-check perl scripts on 'make check'
+ check-perl: $(CHECK_PERL)
+       @CHECK_PERL="$(CHECK_PERL)"; \
+       if test -n "$(PERL)"; then \
+               for perlobj in $$CHECK_PERL; do \
+                       $(PERL) $(CHECK_PERL_FLAGS) -c -w -T $$perlobj || exit 1; \
+               done; \
+       fi
+ check-local: check-perl
+ check-shell: $(CHECK_SHELL)
+       @CHECK_SHELL="$(CHECK_SHELL)"; \
+       if test -n "$$CHECK_SHELL"; then \
+               if test -n "$(BASH)"; then \
+                       for shobj in $$CHECK_SHELL; do \
+                               if $(BASH) -n $$shobj; then \
+                                       echo "$$shobj syntax OK"; \
+                               else \
+                                       echo "$$shobj syntax error"; \
+                                       exit 1; \
+                               fi; \
+                       done; \
+               else \
+                       echo "No 'bash' available -- cannot syntax-check shell scripts"; \
+               fi; \
+       fi
+ check-local: check-shell
+ # make sure that the sources for all shell and perl scripts get included
+ # in the distribution
+ dist-scripts:
+       SCRIPTS_PERL="$(SCRIPTS_PERL)"; SCRIPTS_SHELL="$(SCRIPTS_SHELL)"; SCRIPTS_AWK="$(SCRIPTS_AWK)"; \
+       for script in $$SCRIPTS_PERL; do \
+               test -f $(srcdir)/$${script}.pl && { cp -p $(srcdir)/$${script}.pl $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL; do \
+               test -f $(srcdir)/$${script}.sh && { cp -p $(srcdir)/$${script}.sh $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.awk && { cp -p $(srcdir)/$${script}.awk $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL $$SCRIPTS_PERL $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.in && { cp -p $(srcdir)/$${script}.in $(distdir)/ || exit 1; } \
+       done; \
+       true
+ dist-hook: dist-scripts
+ @WANT_INSTALLPERMS_TRUE@installperms-exec:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_exec)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on executables"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@installperms-data:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_data)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on data"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@install-exec-hook: installperms-exec
+ @WANT_INSTALLPERMS_TRUE@install-data-hook: installperms-data
+ # A rule to make precompiler output from C files.  This is not used during
+ # ordinary builds, but but can very useful in debugging problems on strange
+ # architectures.  With this rule, we can ask users to 'make foo.i' and send
+ # the result to us.
+ #
+ # It touches some automake internals ($COMPILE), but since it's not
+ # build-critical, that's OK.
+ %.i : %.c
+       $(COMPILE) -E -o $@ $<
  
  lint:
-       @ for p in $(libexec_PROGRAMS); do                                      \
+       @ for p in $(amlibexec_PROGRAMS); do                                    \
                f="$$p.c $(libamclient_la_SOURCES)";                            \
                (cd ../common-src; make listlibsrc);                            \
                f="$$f "`cat ../common-src/listlibsrc.output`;                  \
                echo $(LINT) $$f;                                               \
-               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config        \
+               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config   \
                    $(INCLUDES) $$f;                                            \
                if [ $$? -ne 0 ]; then                                          \
                    exit 1;                                                     \
diff --combined client-src/amandates.c
index 23e1c7df05a8c958b28b3ef6aadbfb475789f5b0,abbef3626c19d5a40deb41586cc20733b0b0f63d..12da1f5b6dc0ba773107f0982bac86cfa71fb561
@@@ -26,7 -26,7 +26,7 @@@
  /*
   * $Id: amandates.c,v 1.21 2006/07/25 18:35:21 martinea Exp $
   *
 - * manage amandates file, that mimics /etc/dumpdates, but stores
 + * manage amandates file, that mimics /var/lib/dumpdates, but stores
   * GNUTAR dates
   */
  
@@@ -102,7 -102,7 +102,7 @@@ start_amandates
        rc = amroflock(fileno(amdf), amandates_file);
  
      if(rc == -1) {
-       error("could not lock %s: %s", amandates_file, strerror(errno));
+       error(_("could not lock %s: %s"), amandates_file, strerror(errno));
        /*NOTREACHED*/
      }
  
      }
  
      if(ferror(amdf)) {
-       error("reading %s: %s", amandates_file, strerror(errno));
+       error(_("reading %s: %s"), amandates_file, strerror(errno));
        /*NOTREACHED*/
      }
  
@@@ -157,7 -157,7 +157,7 @@@ finish_amandates(void
  
      if(updated) {
        if(readonly) {
-           error("updated amandates after opening readonly");
+           error(_("updated amandates after opening readonly"));
            /*NOTREACHED*/
        }
  
            for(level = 0; level < DUMP_LEVELS; level++) {
                if(amdp->dates[level] == EPOCH) continue;
                qname = quote_string(amdp->name);
-               fprintf(amdf, "%s %d %ld\n",
+               g_fprintf(amdf, "%s %d %ld\n",
                        qname, level, (long) amdp->dates[level]);
                amfree(qname);
            }
      }
  
      if(amfunlock(fileno(amdf), g_amandates_file) == -1) {
-       error("could not unlock %s: %s", g_amandates_file, strerror(errno));
+       error(_("could not unlock %s: %s"), g_amandates_file, strerror(errno));
        /*NOTREACHED*/
      }
      if (fclose(amdf) == EOF) {
-       error("error [closing %s: %s]", g_amandates_file, strerror(errno));
+       error(_("error [closing %s: %s]"), g_amandates_file, strerror(errno));
        /*NOTREACHED*/
      }
      amdf = NULL;
@@@ -258,8 -258,8 +258,8 @@@ enter_record
      if(level < 0 || level >= DUMP_LEVELS || dumpdate < amdp->dates[level]) {
        qname = quote_string(name);
        /* this is not allowed, but we can ignore it */
-         dbprintf(("amandates botch: %s lev %d: new dumpdate %ld old %ld\n",
-                 qname, level, (long) dumpdate, (long) amdp->dates[level]));
+         dbprintf(_("amandates botch: %s lev %d: new dumpdate %ld old %ld\n"),
+                 qname, level, (long) dumpdate, (long) amdp->dates[level]);
        amfree(qname);
        return;
      }
@@@ -284,8 -284,8 +284,8 @@@ amandates_updateone
      if(level < 0 || level >= DUMP_LEVELS || dumpdate < amdp->dates[level]) {
        /* this is not allowed, but we can ignore it */
        qname = quote_string(name);
-       dbprintf(("amandates updateone: %s lev %d: new dumpdate %ld old %ld",
-                 name, level, (long) dumpdate, (long) amdp->dates[level]));
+       dbprintf(_("amandates updateone: %s lev %d: new dumpdate %ld old %ld"),
+                 name, level, (long) dumpdate, (long) amdp->dates[level]);
        amfree(qname);
        return;
      }
@@@ -312,7 -312,7 +312,7 @@@ import_dumpdates
  
      devname = amname_to_devname(amdp->name);
  
 -    if((dumpdf = fopen("/etc/dumpdates", "r")) == NULL) {
 +    if((dumpdf = fopen("/var/lib/dumpdates", "r")) == NULL) {
        amfree(devname);
        return;
      }
diff --combined client-src/getfsent.c
index 03e68d8c3e23678e27681f3a1e48540b6383ba24,6f0f2752e46e3ace5e7a8a43fe0a909d2b5d8a1b..496c4e19f5b806275e6ec76375a32c985f6280d0
@@@ -30,6 -30,7 +30,7 @@@
   */
  
  #include "amanda.h"
+ #include "util.h"
  
  #ifdef TEST
  #  include <stdio.h>
@@@ -85,7 -86,7 +86,7 @@@ get_fstab_nextentry
      fsent->mntopts = xmntopts = newstralloc(xmntopts, sys_fsent->fs_opts);
  #else
  #if defined(_AIX)
-     fsent->fstype  = xfstype  = newstralloc(xfstype,  "unknown");
+     fsent->fstype  = xfstype  = newstralloc(xfstype,  _("unknown"));
      fsent->mntopts = xmntopts = newstralloc(xmntopts, sys_fsent->fs_type);
  #else
      fsent->fstype  = xfstype  = newstralloc(xfstype,  sys_fsent->fs_vfstype);
@@@ -433,7 -434,7 +434,7 @@@ dev2rdev
    char *s;
    int ch;
  
-   if(stat(name, &st) == 0 && S_ISCHR(st.st_mode)) {
+   if(stat(name, &st) == 0 && !S_ISBLK(st.st_mode)) {
      /*
       * If the input is already a character device, just return it.
       */
@@@ -538,9 -539,8 +539,8 @@@ search_fstab
  
      amfree(rdev);
  
-     if(fsent->mntdir != NULL &&
-        (smnt = stat(fsent->mntdir, &mntstat)) == -1)
-       continue;
+     if(fsent->mntdir != NULL)
+        smnt = stat(fsent->mntdir, &mntstat);
  
      if(fsent->fsname != NULL) {
        sfs = stat(fsent->fsname, &fsstat);
@@@ -634,7 -634,7 +634,7 @@@ print_entry
      generic_fsent_t * fsent)
  {
  #define nchk(s)       ((s)? (s) : "<NULL>")
-     printf("%-20.20s %-14.14s %-7.7s %4d %5d %s\n",
+     g_printf("%-20.20s %-14.14s %-7.7s %4d %5d %s\n",
           nchk(fsent->fsname), nchk(fsent->mntdir), nchk(fsent->fstype),
           fsent->freq, fsent->passno, nchk(fsent->mntopts));
  }
@@@ -647,8 -647,15 +647,15 @@@ main
      generic_fsent_t fsent;
      char *s;
      char *name = NULL;
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(-1, 0);
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
 +    malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +
      if(!open_fstab()) {
-       fprintf(stderr, "getfsent_test: could not open fstab\n");
+       g_fprintf(stderr, _("getfsent_test: could not open fstab\n"));
        return 1;
      }
  
-     printf("getfsent (%s)\n",GETFSENT_TYPE);
-     printf("l/r fsname               mntdir         fstype  freq pass# mntopts\n");
+     g_printf("getfsent (%s)\n",GETFSENT_TYPE);
+     g_printf("l/r fsname               mntdir         fstype  freq pass# mntopts\n");
      while(get_fstab_nextentry(&fsent)) {
-       printf("%c  ",is_local_fstype(&fsent)? 'l' : 'r');
+       g_printf("%c  ",is_local_fstype(&fsent)? 'l' : 'r');
        print_entry(&fsent);
      }
-     printf("--------\n");
+     g_printf("--------\n");
  
      close_fstab();
  
      name = newstralloc(name, "/usr");
      if(search_fstab(name, &fsent, 1) || search_fstab(name, &fsent, 0)) {
-       printf("Found %s mount for %s:\n",
-              is_local_fstype(&fsent)? "local" : "remote", name);
+       g_printf(_("Found %s mount for %s:\n"),
+              is_local_fstype(&fsent)? _("local") : _("remote"), name);
        print_entry(&fsent);
      }
      else 
-       printf("Mount for %s not found\n", name);
+       g_printf(_("Mount for %s not found\n"), name);
  
      name = newstralloc(name, "/");
      if(search_fstab(name, &fsent, 1) || search_fstab(name, &fsent, 0)) {
-       printf("Found %s mount for %s:\n",
-              is_local_fstype(&fsent)? "local" : "remote", name);
+       g_printf(_("Found %s mount for %s:\n"),
+              is_local_fstype(&fsent)? _("local") : _("remote"), name);
        print_entry(&fsent);
      }
      else 
-       printf("Mount for %s not found\n", name);
+       g_printf(_("Mount for %s not found\n"), name);
  
      name = newstralloc(name, "/");
      s = amname_to_fstype(name);
-     printf("fstype of `%s': %s\n", name, s);
+     g_printf(_("fstype of `%s': %s\n"), name, s);
      amfree(s);
      name = newstralloc(name, "/dev/root");
      s = amname_to_fstype(name);
-     printf("fstype of `%s': %s\n", name, s);
+     g_printf(_("fstype of `%s': %s\n"), name, s);
      amfree(s);
      name = newstralloc(name, "/usr");
      s = amname_to_fstype(name);
-     printf("fstype of `%s': %s\n", name, s);
+     g_printf(_("fstype of `%s': %s\n"), name, s);
      amfree(s);
      name = newstralloc(name, "c0t3d0s0");
      s = amname_to_fstype(name);
-     printf("fstype of `%s': %s\n", name, s);
+     g_printf(_("fstype of `%s': %s\n"), name, s);
      amfree(s);
  
      name = newstralloc(name, "/tmp/foo");
      s = amname_to_devname(name);
-     printf("device of `%s': %s\n", name, s);
+     g_printf(_("device of `%s': %s\n"), name, s);
      amfree(s);
      s = amname_to_dirname(name);
-     printf("dirname of `%s': %s\n", name, s);
+     g_printf(_("dirname of `%s': %s\n"), name, s);
      amfree(s);
      s = amname_to_fstype(name);
-     printf("fstype of `%s': %s\n", name, s);
+     g_printf(_("fstype of `%s': %s\n"), name, s);
      amfree(s);
  
      name = newstralloc(name, "./foo");
      s = amname_to_devname(name);
-     printf("device of `%s': %s\n", name, s);
+     g_printf(_("device of `%s': %s\n"), name, s);
      amfree(s);
      s = amname_to_dirname(name);
-     printf("dirname of `%s': %s\n", name, s);
+     g_printf(_("dirname of `%s': %s\n"), name, s);
      amfree(s);
      s = amname_to_fstype(name);
-     printf("fstype of `%s': %s\n", name, s);
+     g_printf(_("fstype of `%s': %s\n"), name, s);
      amfree(s);
  
      while (--argc > 0) {
        name = newstralloc(name, *++argv);
        s = amname_to_devname(name);
-       printf("device of `%s': %s\n", name, s);
+       g_printf(_("device of `%s': %s\n"), name, s);
        amfree(s);
        s = amname_to_dirname(name);
-       printf("dirname of `%s': %s\n", name, s);
+       g_printf(_("dirname of `%s': %s\n"), name, s);
        amfree(s);
        s = amname_to_fstype(name);
-       printf("fstype of `%s': %s\n", name, s);
+       g_printf(_("fstype of `%s': %s\n"), name, s);
        amfree(s);
      }
  
      amfree(name);
  
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
      return 0;
  }
  
diff --combined client-src/killpgrp.c
index e2b983d7b89cb2bcfa784fb4af315ba854fc080d,d7472943dcc961b8437a7ce1faa7bebc0fb3c9b7..3749e328413084e35be1170689acb9a4b80da5d7
@@@ -35,6 -35,7 +35,7 @@@
   */
  #include "amanda.h"
  #include "version.h"
+ #include "util.h"
  
  #ifdef HAVE_GETPGRP
  #ifdef GETPGRP_VOID
@@@ -51,13 -52,24 +52,24 @@@ int main(int argc, char **argv)
  static void term_kill_soft(int sig);
  static void term_kill_hard(int sig);
  
- int main(
-     int argc,
-     char **argv)
+ int
+ main(
+     int               argc,
+     char **   argv)
  {
      int ch;
+     char *exitstr;
      amwait_t status;
  
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
      safe_fd(-1, 0);
      safe_cd();
  
  
      dbopen(DBG_SUBDIR_CLIENT);
      if (argc < 2) {
-       error("%s: Need at least 2 arguments\n", debug_prefix_time(NULL));
+       error("Need at least 2 arguments\n");
        /*NOTREACHED*/
      }
-     dbprintf(("%s: version %s\n", debug_prefix_time(NULL), version()));
-     dbprintf(("config: %s\n", argv[1]));
+     dbprintf(_("version %s\n"), version());
+     dbprintf(_("config: %s\n"), argv[1]);
      if (strcmp(argv[1], "NOCONFIG") != 0)
        dbrename(argv[1], DBG_SUBDIR_CLIENT);
  
-     if(client_uid == (uid_t) -1) {
-       error("error [cannot find user %s in passwd file]", CLIENT_LOGIN);
-       /*NOTREACHED*/
-     }
- #ifdef FORCE_USERID
-     if (getuid() != client_uid) {
-       error("error [must be invoked by %s]", CLIENT_LOGIN);
+ #ifdef WANT_SETUID_CLIENT
+     check_running_as(RUNNING_AS_CLIENT_LOGIN | RUNNING_AS_UID_ONLY);
+     if (!become_root()) {
+       error(_("error [%s could not become root (is the setuid bit set?)]\n"), get_pname());
        /*NOTREACHED*/
      }
-     if (geteuid() != 0) {
-       error("error [must be setuid root]");
-       /*NOTREACHED*/
-     }
- #endif        /* FORCE_USERID */
- #if !defined (DONT_SUID_ROOT)
-     setuid(0);
+ #else
+     check_running_as(RUNNING_AS_CLIENT_LOGIN);
  #endif
  
      if (AM_GETPGRP() != getpid()) {
-       error("error [must be the process group leader]");
+       error(_("error [must be the process group leader]"));
        /*NOTREACHED*/
      }
  
 +    /* Consume any extranious input */
      signal(SIGTERM, term_kill_soft);
  
+     /* Consume any extranious input */
      do {
        ch = getchar();
        /* wait until EOF */
        if (wait(&status) != -1)
            break;
        if (errno != EINTR) {
-           error("error [wait() failed: %s]", strerror(errno));
+           error(_("error [wait() failed: %s]"), strerror(errno));
            /*NOTREACHED*/
        }
      }
+     exitstr = str_exit_status("child", status);
+     dbprintf("%s\n", exitstr);
+     amfree(exitstr);
  
      /*@ignore@*/
-     dbprintf(("child process exited with status %d\n", WEXITSTATUS(status)));
-     return WEXITSTATUS(status);
+     return WIFEXITED(status)?WEXITSTATUS(status):1;
      /*@end@*/
  }
  
@@@ -139,10 -142,10 +143,10 @@@ static void term_kill_soft
       * First, try to kill the dump process nicely.  If it ignores us
       * for three seconds, hit it harder.
       */
-     dbprintf(("sending SIGTERM to process group %ld\n", (long) dumppid));
+     dbprintf(_("sending SIGTERM to process group %ld\n"), (long) dumppid);
      killerr = kill(-dumppid, SIGTERM);
      if (killerr == -1) {
-       dbprintf(("kill failed: %s\n", strerror(errno)));
+       dbprintf(_("kill failed: %s\n"), strerror(errno));
      }
  }
  
@@@ -154,12 -157,12 +158,12 @@@ static void term_kill_hard
  
      (void)sig;        /* Quiet unused parameter warning */
  
-     dbprintf(("it won\'t die with SIGTERM, but SIGKILL should do\n"));
-     dbprintf(("do\'t expect any further output, this will be suicide\n"));
+     dbprintf(_("It won\'t die with SIGTERM, but SIGKILL should do.\n"));
+     dbprintf(_("Don't expect any further output, this will be suicide.\n"));
      killerr = kill(-dumppid, SIGKILL);
      /* should never reach this point, but so what? */
      if (killerr == -1) {
-       dbprintf(("kill failed: %s\n", strerror(errno)));
-       dbprintf(("waiting until child terminates\n"));
+       dbprintf(_("kill failed: %s\n"), strerror(errno));
+       dbprintf(_("waiting until child terminates\n"));
      }
  }
diff --combined client-src/selfcheck.c
index 90eb69c6d066f9cf75897b6471f1d0b235c22cd0,8787a8245f40c0a055d6e7f8197662d10e4e8ad5..aad687228802900b101307a1d3c4977664659613
@@@ -31,7 -31,7 +31,7 @@@
   */
  
  #include "amanda.h"
- #include "statfs.h"
+ #include "fsusage.h"
  #include "version.h"
  #include "getfsent.h"
  #include "amandates.h"
  #include "findpass.h"
  #endif
  
 +#define selfcheck_debug(i,x) do {     \
 +      if ((i) <= debug_selfcheck) {   \
 +          dbprintf(x);                \
 +      }                               \
 +} while (0)
 +
  int need_samba=0;
  int need_rundump=0;
  int need_dump=0;
@@@ -103,16 -97,20 +103,20 @@@ main
      char *optstr = NULL;
      char *err_extra = NULL;
      char *s, *fp;
-     char *conffile;
      option_t *options;
      int ch;
- #if defined(USE_DBMALLOC)
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
- #endif
  
      /* initialize */
  
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
      safe_fd(-1, 0);
      safe_cd();
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
 +#if defined(USE_DBMALLOC)
 +    malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +#endif
 +
      erroutput_type = (ERR_INTERACTIVE|ERR_SYSLOG);
      dbopen(DBG_SUBDIR_CLIENT);
      startclock();
-     dbprintf(("%s: version %s\n", get_pname(), version()));
+     dbprintf(_("version %s\n"), version());
  
      if(argc > 2 && strcmp(argv[1], "amandad") == 0) {
        amandad_auth = stralloc(argv[2]);
      }
  
-     conffile = vstralloc(CONFIG_DIR, "/", "amanda-client.conf", NULL);
-     if (read_clientconf(conffile) > 0) {
-       printf("ERROR [reading conffile: %s]\n", conffile);
-       error("error reading conffile: %s", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
+     config_init(CONFIG_INIT_CLIENT, NULL);
+     check_running_as(RUNNING_AS_CLIENT_LOGIN);
  
      our_features = am_init_feature_set();
      our_feature_string = am_feature_to_string(our_features);
                g_options->hostname[MAX_HOSTNAME_LENGTH] = '\0';
            }
  
-           printf("OPTIONS ");
+           g_printf("OPTIONS ");
            if(am_has_feature(g_options->features, fe_rep_options_features)) {
-               printf("features=%s;", our_feature_string);
+               g_printf("features=%s;", our_feature_string);
            }
            if(am_has_feature(g_options->features, fe_rep_options_hostname)) {
-               printf("hostname=%s;", g_options->hostname);
+               g_printf("hostname=%s;", g_options->hostname);
            }
-           printf("\n");
+           g_printf("\n");
            fflush(stdout);
  
            if (g_options->config) {
-               conffile = vstralloc(CONFIG_DIR, "/", g_options->config, "/",
-                                    "amanda-client.conf", NULL);
-               if (read_clientconf(conffile) > 0) {
-                   printf("ERROR [reading conffile: %s]\n", conffile);
-                   error("error reading conffile: %s", conffile);
-                   /*NOTREACHED*/
-               }
-               amfree(conffile);
+               /* overlay this configuration on the existing (nameless) configuration */
+               config_init(CONFIG_INIT_CLIENT | CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_OVERLAY,
+                           g_options->config);
  
-               dbrename(g_options->config, DBG_SUBDIR_CLIENT);
+               dbrename(config_name, DBG_SUBDIR_CLIENT);
            }
  
            continue;
            goto err;                           /* bad syntax */
        }
        amfree(disk);
+       amfree(qamdevice);
        amfree(amdevice);
      }
+     if (g_options == NULL) {
+       printf(_("ERROR [Missing OPTIONS line in selfcheck input]\n"));
+       error(_("Missing OPTIONS line in selfcheck input\n"));
+       /*NOTREACHED*/
+     }
  
      check_overall();
  
      amfree(our_feature_string);
      am_release_feature_set(our_features);
      our_features = NULL;
-     am_release_feature_set(g_options->features);
-     g_options->features = NULL;
-     amfree(g_options->str);
-     amfree(g_options->hostname);
-     amfree(g_options);
- #if defined(USE_DBMALLOC)
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       extern int dbfd;
-       malloc_list(dbfd(), malloc_hist_1, malloc_hist_2);
-     }
- #endif
+     free_g_options(g_options);
  
      dbclose();
      return 0;
  
   err:
-     printf("ERROR [BOGUS REQUEST PACKET]\n");
-     dbprintf(("%s: REQ packet is bogus%s%s\n",
-             debug_prefix_time(NULL),
+     g_printf(_("ERROR [BOGUS REQUEST PACKET]\n"));
+     dbprintf(_("REQ packet is bogus%s%s\n"),
              err_extra ? ": " : "",
-             err_extra ? err_extra : ""));
+             err_extra ? err_extra : "");
      dbclose();
      return 1;
  }
@@@ -366,7 -342,7 +352,7 @@@ check_options
  
        need_calcsize=1;
        if (calcprog == NULL) {
-           printf("ERROR [no program name for calcsize]\n");
+           g_printf(_("ERROR [no program name for calcsize]\n"));
        } else {
            myprogram = calcprog;
        }
        need_gnutar=1;
          if(amdevice[0] == '/' && amdevice[1] == '/') {
            if(options->exclude_file && options->exclude_file->nb_element > 1) {
-               printf("ERROR [samba support only one exclude file]\n");
+               g_printf(_("ERROR [samba support only one exclude file]\n"));
            }
            if(options->exclude_list && options->exclude_list->nb_element > 0 &&
               options->exclude_optional==0) {
-               printf("ERROR [samba does not support exclude list]\n");
+               g_printf(_("ERROR [samba does not support exclude list]\n"));
            }
            if(options->include_file && options->include_file->nb_element > 0) {
-               printf("ERROR [samba does not support include file]\n");
+               g_printf(_("ERROR [samba does not support include file]\n"));
            }
            if(options->include_list && options->include_list->nb_element > 0 &&
               options->include_optional==0) {
-               printf("ERROR [samba does not support include list]\n");
+               g_printf(_("ERROR [samba does not support include list]\n"));
            }
            need_samba=1;
        }
  
      if(strcmp(myprogram,"DUMP") == 0) {
        if(options->exclude_file && options->exclude_file->nb_element > 0) {
-           printf("ERROR [DUMP does not support exclude file]\n");
+           g_printf(_("ERROR [DUMP does not support exclude file]\n"));
        }
        if(options->exclude_list && options->exclude_list->nb_element > 0) {
-           printf("ERROR [DUMP does not support exclude list]\n");
+           g_printf(_("ERROR [DUMP does not support exclude list]\n"));
        }
        if(options->include_file && options->include_file->nb_element > 0) {
-           printf("ERROR [DUMP does not support include file]\n");
+           g_printf(_("ERROR [DUMP does not support include file]\n"));
        }
        if(options->include_list && options->include_list->nb_element > 0) {
-           printf("ERROR [DUMP does not support include list]\n");
+           g_printf(_("ERROR [DUMP does not support include list]\n"));
        }
  #ifdef USE_RUNDUMP
        need_rundump=1;
      }
      if(options->auth && amandad_auth) {
        if(strcasecmp(options->auth, amandad_auth) != 0) {
-           fprintf(stdout,"ERROR [client configured for auth=%s while server requested '%s']\n",
+           g_fprintf(stdout,_("ERROR [client configured for auth=%s while server requested '%s']\n"),
                    amandad_auth, options->auth);
+           if(strcmp(options->auth, "ssh") == 0)  {    
+               g_fprintf(stderr, _("ERROR [The auth in ~/.ssh/authorized_keys "
+                                 "should be \"--auth=ssh\", or use another auth "
+                                 " for the DLE]\n"));
+           }
+           else {
+               g_fprintf(stderr, _("ERROR [The auth in the inetd/xinetd configuration "
+                                 " must be the same as the DLE]\n"));
+           }           
        }
      }
  }
@@@ -518,18 -503,19 +513,19 @@@ check_disk
      char *qamdevice = quote_string(amdevice);
      char *qdevice = NULL;
      FILE *toolin;
-     char number[NUM_STR_SIZE];
  
      (void)level;      /* Quiet unused parameter warning */
  
-     dbprintf(("%s: checking disk %s\n", debug_prefix_time(NULL), qdisk));
+     dbprintf(_("checking disk %s\n"), qdisk);
  
      if(strcmp(myprogram,"CALCSIZE") == 0) {
        if(amdevice[0] == '/' && amdevice[1] == '/') {
-           err = vstralloc("Can't use CALCSIZE for samba estimate,",
-                           " use CLIENT: ",
-                           amdevice,
-                           NULL);
+           err = vstrallocf(_("Can't use CALCSIZE for samba estimate, use CLIENT: %s"),
+                           amdevice);
+           goto common_exit;
+       }
+       if (calcprog == NULL) {
+           err = _("no program for calcsize");
            goto common_exit;
        }
        myprogram = calcprog;
            size_t pwtext_len;
            pid_t checkpid;
            amwait_t retstat;
-           char number[NUM_STR_SIZE];
            pid_t wpid;
-           int ret, sig, rc;
+           int rc;
            char *line;
            char *sep;
            FILE *ferr;
  
            parsesharename(amdevice, &share, &subdir);
            if (!share) {
-               err = stralloc2("cannot parse for share/subdir disk entry ", amdevice);
+               err = vstrallocf(_("cannot parse for share/subdir disk entry %s"), amdevice);
                goto common_exit;
            }
            if ((subdir) && (SAMBA_VERSION < 2)) {
-               err = vstralloc("subdirectory specified for share '",
-                               amdevice,
-                               "' but samba not v2 or better",
-                               NULL);
+               err = vstrallocf(_("subdirectory specified for share '%s' but, samba is not v2 or better"),
+                               amdevice);
                goto common_exit;
            }
            if ((user_and_password = findpass(share, &domain)) == NULL) {
-               err = stralloc2("cannot find password for ", amdevice);
+               err = vstrallocf(_("cannot find password for %s"), amdevice);
                goto common_exit;
            }
            lpass = strlen(user_and_password);
            if ((pwtext = strchr(user_and_password, '%')) == NULL) {
-               err = stralloc2("password field not \'user%pass\' for ", amdevice);
+               err = vstrallocf(_("password field not \'user%%pass\' for %s"), amdevice);
                goto common_exit;
            }
            *pwtext++ = '\0';
            pwtext_len = (size_t)strlen(pwtext);
            amfree(device);
            if ((device = makesharename(share, 0)) == NULL) {
-               err = stralloc2("cannot make share name of ", share);
+               err = vstrallocf(_("cannot make share name of %s"), share);
                goto common_exit;
            }
  
            if ((nullfd = open("/dev/null", O_RDWR)) == -1) {
-               err = stralloc2("Cannot access /dev/null : ", strerror(errno));
+               err = vstrallocf(_("Cannot access /dev/null : %s"), strerror(errno));
                goto common_exit;
            }
  
            /*@ignore@*/
            if ((pwtext_len > 0)
              && fullwrite(passwdfd, pwtext, (size_t)pwtext_len) < 0) {
-               err = vstralloc("password write failed: ",
-                               amdevice,
-                               ": ",
-                               strerror(errno),
-                               NULL);
+               err = vstrallocf(_("password write failed: %s: %s"),
+                               amdevice, strerror(errno));
                aclose(passwdfd);
                goto common_exit;
            }
            aclose(passwdfd);
            ferr = fdopen(checkerr, "r");
            if (!ferr) {
-               printf("ERROR [Can't fdopen: %s]\n", strerror(errno));
-               error("Can't fdopen: %s", strerror(errno));
+               g_printf(_("ERROR [Can't fdopen: %s]\n"), strerror(errno));
+               error(_("Can't fdopen: %s"), strerror(errno));
                /*NOTREACHED*/
            }
            sep = "";
            afclose(ferr);
            checkerr = -1;
            rc = 0;
+           sep = "";
            while ((wpid = wait(&retstat)) != -1) {
-               if (WIFSIGNALED(retstat)) {
-                   ret = 0;
-                   rc = sig = WTERMSIG(retstat);
-               } else {
-                   sig = 0;
-                   rc = ret = WEXITSTATUS(retstat);
-               }
-               if (rc != 0) {
-                   strappend(err, sep);
-                   if (ret == 0) {
-                       strappend(err, "got signal ");
-                       ret = sig;
-                   } else {
-                       strappend(err, "returned ");
-                   }
-                   snprintf(number, (size_t)sizeof(number), "%d", ret);
-                   strappend(err, number);
+               if (!WIFEXITED(retstat) || WEXITSTATUS(retstat) != 0) {
+                   char *exitstr = str_exit_status("smbclient", retstat);
+                   err = newvstralloc(err, err, sep, exitstr);
+                   sep = "\n";
+                   amfree(exitstr);
+                   rc = 1;
                }
            }
            if (errdos != 0 || rc != 0) {
-               err = newvstralloc(err,
-                                  "samba access error: ",
-                                  amdevice,
-                                  ": ",
-                                  extra_info ? extra_info : "",
-                                  err,
-                                  NULL);
-               amfree(extra_info);
+               if (extra_info) {
+                   err = newvstrallocf(err,
+                                  _("samba access error: %s: %s %s"),
+                                  amdevice, extra_info, err);
+                   amfree(extra_info);
+               } else {
+                   err = newvstrallocf(err, _("samba access error: %s: %s"),
+                                  amdevice, err);
+               }
            }
  #else
-           err = stralloc2("This client is not configured for samba: ", qdisk);
+           err = vstrallocf(_("This client is not configured for samba: %s"),
+                       qdisk);
  #endif
            goto common_exit;
        }
        device = amname_to_dirname(amdevice);
      } else if (strcmp(myprogram, "DUMP") == 0) {
        if(amdevice[0] == '/' && amdevice[1] == '/') {
-           err = vstralloc("The DUMP program cannot handle samba shares,",
-                           " use GNUTAR: ",
-                           qdisk,
-                           NULL);
+           err = vstrallocf(
+                 _("The DUMP program cannot handle samba shares, use GNUTAR: %s"),
+                 qdisk);
            goto common_exit;
        }
  #ifdef VDUMP                                                          /* { */
        bsu = backup_support_option(program, g_options, disk, amdevice);
  
        if (pipe(property_pipe) < 0) {
-           err = vstralloc("pipe failed: ", strerror(errno), NULL);
+           err = vstrallocf(_("pipe failed: %s"), strerror(errno));
            goto common_exit;
        }
        fflush(stdout);fflush(stderr);
        
        switch (backup_api_pid = fork()) {
        case -1:
-           err = vstralloc("fork failed: ", strerror(errno), NULL);
+           err = vstrallocf(_("fork failed: %s"), strerror(errno));
            goto common_exit;
  
        case 0: /* child */
                argvchild[j++] = NULL;
                dup2(property_pipe[0], 0);
                aclose(property_pipe[1]);
+               safe_fd(-1, 0);
                execve(cmd,argvchild,safe_env());
-               printf("ERROR [Can't execute %s: %s]\n", cmd, strerror(errno));
+               g_printf(_("ERROR [Can't execute %s: %s]\n"), cmd, strerror(errno));
                exit(127);
            }
        default: /* parent */
                aclose(property_pipe[0]);
                toolin = fdopen(property_pipe[1],"w");
                if (!toolin) {
-                   err = vstralloc("Can't fdopen: ", strerror(errno), NULL);
+                   err = vstrallocf(_("Can't fdopen: %s"), strerror(errno));
                    goto common_exit;
                }
                output_tool_property(toolin, options);
                fclose(toolin);
                if (waitpid(backup_api_pid, &status, 0) < 0) {
                    if (!WIFEXITED(status)) {
-                       snprintf(number, SIZEOF(number), "%d",
-                                (int)WTERMSIG(status));
-                       err = vstralloc("Tool exited with signal ", number,
-                                       NULL);
+                       err = vstrallocf(_("Tool exited with signal %d"),
+                                        WTERMSIG(status));
                    } else if (WEXITSTATUS(status) != 0) {
-                       snprintf(number, SIZEOF(number), "%d",
-                                (int)WEXITSTATUS(status));
-                       err = vstralloc("Tool exited with status ", number,
-                                       NULL);
+                       err = vstrallocf(_("Tool exited with status %d"),
+                                        WEXITSTATUS(status));
                    } else {
-                       err = stralloc("waitpid returned negative value");
+                       err = vstrallocf(_("waitpid returned negative value"));
                    }
                    goto common_exit;
                }
      }
  
      qdevice = quote_string(device);
-     dbprintf(("%s: device %s\n", debug_prefix_time(NULL), qdevice));
+     dbprintf(_("device %s\n"), qdevice);
  
      /* skip accessability test if this is an AFS entry */
      if(strncmp_const(device, "afs:") != 0) {
        access_type = "access";
  #endif
        if(access_result == -1) {
-           err = vstralloc("could not ", access_type, " ", qdevice,
-                       " (", qdisk, "): ", strerror(errno), NULL);
+           err = vstrallocf(_("Could not access %s (%s): %s"),
+                       qdevice, qdisk, strerror(errno));
        }
  #ifdef CHECK_FOR_ACCESS_WITH_OPEN
        aclose(access_result);
@@@ -841,20 -810,19 +820,19 @@@ common_exit
      amfree(domain);
  
      if(err) {
-       printf("ERROR [%s]\n", err);
-       dbprintf(("%s: %s\n", debug_prefix_time(NULL), err));
+       g_printf(_("ERROR [%s]\n"), err);
+       dbprintf(_("%s\n"), err);
        amfree(err);
      } else {
-       printf("OK %s\n", qdisk);
-       dbprintf(("%s: disk %s OK\n", debug_prefix_time(NULL), qdisk));
-       printf("OK %s\n", qamdevice);
-       dbprintf(("%s: amdevice %s OK\n",
-                 debug_prefix_time(NULL), qamdevice));
-       printf("OK %s\n", qdevice);
-       dbprintf(("%s: device %s OK\n", debug_prefix_time(NULL), qdevice));
+       g_printf("OK %s\n", qdisk);
+       dbprintf(_("disk %s OK\n"), qdisk);
+       g_printf("OK %s\n", qamdevice);
+       dbprintf(_("amdevice %s OK\n"), qamdevice);
+       g_printf("OK %s\n", qdevice);
+       dbprintf(_("device %s OK\n"), qdevice);
      }
      if(extra_info) {
-       dbprintf(("%s: extra info: %s\n", debug_prefix_time(NULL), extra_info));
+       dbprintf(_("extra info: %s\n"), extra_info);
        amfree(extra_info);
      }
      amfree(qdisk);
@@@ -876,7 -844,7 +854,7 @@@ check_overall(void
  
      if( need_runtar )
      {
-       cmd = vstralloc(libexecdir, "/", "runtar", versionsuffix(), NULL);
+       cmd = vstralloc(amlibexecdir, "/", "runtar", versionsuffix(), NULL);
        check_file(cmd,X_OK);
        check_suid(cmd);
        amfree(cmd);
  
      if( need_rundump )
      {
-       cmd = vstralloc(libexecdir, "/", "rundump", versionsuffix(), NULL);
+       cmd = vstralloc(amlibexecdir, "/", "rundump", versionsuffix(), NULL);
        check_file(cmd,X_OK);
        check_suid(cmd);
        amfree(cmd);
  #ifdef DUMP
        check_file(DUMP, X_OK);
  #else
-       printf("ERROR [DUMP program not available]\n");
+       g_printf(_("ERROR [DUMP program not available]\n"));
  #endif
      }
  
  #ifdef RESTORE
        check_file(RESTORE, X_OK);
  #else
-       printf("ERROR [RESTORE program not available]\n");
+       g_printf(_("ERROR [RESTORE program not available]\n"));
  #endif
      }
  
  #ifdef VDUMP
        check_file(VDUMP, X_OK);
  #else
-       printf("ERROR [VDUMP program not available]\n");
+       g_printf(_("ERROR [VDUMP program not available]\n"));
  #endif
      }
  
  #ifdef VRESTORE
        check_file(VRESTORE, X_OK);
  #else
-       printf("ERROR [VRESTORE program not available]\n");
+       g_printf(_("ERROR [VRESTORE program not available]\n"));
  #endif
      }
  
  #ifdef XFSDUMP
        check_file(XFSDUMP, F_OK);
  #else
-       printf("ERROR [XFSDUMP program not available]\n");
+       g_printf(_("ERROR [XFSDUMP program not available]\n"));
  #endif
      }
  
  #ifdef XFSRESTORE
        check_file(XFSRESTORE, X_OK);
  #else
-       printf("ERROR [XFSRESTORE program not available]\n");
+       g_printf(_("ERROR [XFSRESTORE program not available]\n"));
  #endif
      }
  
  #ifdef VXDUMP
        check_file(VXDUMP, X_OK);
  #else
-       printf("ERROR [VXDUMP program not available]\n");
+       g_printf(_("ERROR [VXDUMP program not available]\n"));
  #endif
      }
  
  #ifdef VXRESTORE
        check_file(VXRESTORE, X_OK);
  #else
-       printf("ERROR [VXRESTORE program not available]\n");
+       g_printf(_("ERROR [VXRESTORE program not available]\n"));
  #endif
      }
  
  #ifdef GNUTAR
        check_file(GNUTAR, X_OK);
  #else
-       printf("ERROR [GNUTAR program not available]\n");
+       g_printf(_("ERROR [GNUTAR program not available]\n"));
  #endif
        need_amandates = 1;
        gnutar_list_dir = getconf_str(CNF_GNUTAR_LIST_DIR);
      if( need_calcsize ) {
        char *cmd;
  
-       cmd = vstralloc(libexecdir, "/", "calcsize", versionsuffix(), NULL);
+       cmd = vstralloc(amlibexecdir, "/", "calcsize", versionsuffix(), NULL);
  
        check_file(cmd, X_OK);
  
  #ifdef SAMBA_CLIENT
        check_file(SAMBA_CLIENT, X_OK);
  #else
-       printf("ERROR [SMBCLIENT program not available]\n");
+       g_printf(_("ERROR [SMBCLIENT program not available]\n"));
  #endif
        testfd = open("/etc/amandapass", R_OK);
        if (testfd >= 0) {
            if(fstat(testfd, &buf) == 0) {
                if ((buf.st_mode & 0x7) != 0) {
-                   printf("ERROR [/etc/amandapass is world readable!]\n");
+                   g_printf(_("ERROR [/etc/amandapass is world readable!]\n"));
                } else {
-                   printf("OK [/etc/amandapass is readable, but not by all]\n");
+                   g_printf(_("OK [/etc/amandapass is readable, but not by all]\n"));
                }
            } else {
-               printf("OK [unable to stat /etc/amandapass: %s]\n",
+               g_printf(_("OK [unable to stat /etc/amandapass: %s]\n"),
                       strerror(errno));
            }
            aclose(testfd);
        } else {
-           printf("ERROR [unable to open /etc/amandapass: %s]\n",
+           g_printf(_("ERROR [unable to open /etc/amandapass: %s]\n"),
                   strerror(errno));
        }
      }
        check_file(COMPRESS_PATH, X_OK);
  
      if (need_dump || need_xfsdump ) {
-       if (check_file_exist("/var/lib/dumpdates")) {
-           check_file("/var/lib/dumpdates",
+       if (check_file_exist("/etc/dumpdates")) {
+           check_file("/etc/dumpdates",
  #ifdef USE_RUNDUMP
                       F_OK
  #else
        } else {
  #ifndef USE_RUNDUMP
            if (access("/etc", R_OK|W_OK) == -1) {
-               printf("ERROR [dump will not be able to create the /etc/dumpdates file: %s]\n", strerror(errno));
+               g_printf(_("ERROR [dump will not be able to create the /etc/dumpdates file: %s]\n"), strerror(errno));
            }
  #endif
        }
      check_space(AMANDA_DBGDIR, (off_t)64);    /* for amandad i/o */
  #endif
  
-     check_space("/var/lib", (off_t)64);       /* for /var/lib/dumpdates writing */
+     check_space("/etc", (off_t)64);           /* for /etc/dumpdates writing */
  }
  
  static void
@@@ -1050,19 -1018,29 +1028,29 @@@ check_space
      char *    dir,
      off_t     kbytes)
  {
-     generic_fs_stats_t statp;
+     struct fs_usage fsusage;
      char *quoted = quote_string(dir);
+     intmax_t kb_avail;
+     if(get_fs_usage(dir, NULL, &fsusage) == -1) {
+       g_printf(_("ERROR [cannot get filesystem usage for %s: %s]\n"), quoted, strerror(errno));
+       amfree(quoted);
+       return;
+     }
+     /* do the division first to avoid potential integer overflow */
+     kb_avail = fsusage.fsu_bavail / 1024 * fsusage.fsu_blocksize;
  
-     if(get_fs_stats(dir, &statp) == -1) {
-       printf("ERROR [cannot statfs %s: %s]\n", quoted, strerror(errno));
-     } else if(statp.avail < kbytes) {
-       printf("ERROR [dir %s needs " OFF_T_FMT "KB, only has "
-               OFF_T_FMT "KB available.]\n", quoted,
-               (OFF_T_FMT_TYPE)kbytes,
-               (OFF_T_FMT_TYPE)statp.avail);
+     if (fsusage.fsu_bavail_top_bit_set || fsusage.fsu_bavail == 0) {
+       g_printf(_("ERROR [dir %s needs %lldKB, has nothing available.]\n"), quoted,
+               (long long)kbytes);
+     } else if (kb_avail < kbytes) {
+       g_printf(_("ERROR [dir %s needs %lldKB, only has %lldKB available.]\n"), quoted,
+               (long long)kbytes,
+               (long long)kb_avail);
      } else {
-       printf("OK %s has more than " OFF_T_FMT " KB available.\n",
-               quoted, (OFF_T_FMT_TYPE)kbytes);
+       g_printf(_("OK %s has more than %lldKB available.\n"),
+               quoted, (long long)kbytes);
      }
      amfree(quoted);
  }
@@@ -1085,9 -1063,9 +1073,9 @@@ check_access
        noun = "access", adjective = "accessible";
  
      if(access(filename, mode) == -1)
-       printf("ERROR [can not %s %s: %s]\n", noun, quoted, strerror(errno));
+       g_printf(_("ERROR [can not %s %s: %s]\n"), noun, quoted, strerror(errno));
      else
-       printf("OK %s %s\n", quoted, adjective);
+       g_printf(_("OK %s %s\n"), quoted, adjective);
      amfree(quoted);
  }
  
@@@ -1116,7 -1094,7 +1104,7 @@@ check_file
      if(!stat(filename, &stat_buf)) {
        if(!S_ISREG(stat_buf.st_mode)) {
            quoted = quote_string(filename);
-           printf("ERROR [%s is not a file]\n", quoted);
+           g_printf(_("ERROR [%s is not a file]\n"), quoted);
            amfree(quoted);
        }
      }
@@@ -1135,7 -1113,7 +1123,7 @@@ check_dir
      if(!stat(dirname, &stat_buf)) {
        if(!S_ISDIR(stat_buf.st_mode)) {
            quoted = quote_string(dirname);
-           printf("ERROR [%s is not a directory]\n", quoted);
+           g_printf(_("ERROR [%s is not a directory]\n"), quoted);
            amfree(quoted);
        }
      }
@@@ -1148,21 -1126,20 +1136,20 @@@ static voi
  check_suid(
      char *    filename)
  {
- /* The following is only valid for real Unixs */
- #ifndef IGNORE_UID_CHECK
+ #ifndef SINGLE_USERID
      struct stat stat_buf;
      char *quoted = quote_string(filename);
  
      if(!stat(filename, &stat_buf)) {
        if(stat_buf.st_uid != 0 ) {
-           printf("ERROR [%s is not owned by root]\n", quoted);
+           g_printf(_("ERROR [%s is not owned by root]\n"), quoted);
        }
        if((stat_buf.st_mode & S_ISUID) != S_ISUID) {
-           printf("ERROR [%s is not SUID root]\n", quoted);
+           g_printf(_("ERROR [%s is not SUID root]\n"), quoted);
        }
      }
      else {
-       printf("ERROR [can not stat %s]\n", quoted);
+       g_printf(_("ERROR [can not stat %s]\n"), quoted);
      }
      amfree(quoted);
  #else
index d9c5e2001d2b350d3c3f18fbff2fb89a5505c0d3,c11b55c5a65947ea1984fba7b4ab7274c3f7aa54..7e1a2a889cbfd3275d1da02e33891c8d41eff9bd
@@@ -65,8 -65,7 +65,8 @@@ static amregex_t re_table[] = 
    /* samba may produce these output messages */
    AM_NORMAL_RE("^[Aa]dded interface"),
    AM_NORMAL_RE("^session request to "),
 -  AM_NORMAL_RE("^tar: dumped [0-9][0-9]* (tar )?files"),
 +  AM_NORMAL_RE("^ *tar: dumped [0-9][0-9]* (tar )?files"),
 +  AM_NORMAL_RE("^Domain="),
  
  #if SAMBA_VERSION < 2
    AM_NORMAL_RE("^doing parameter"),
@@@ -74,6 -73,7 +74,6 @@@
    AM_NORMAL_RE("^adding IPC"),
    AM_NORMAL_RE("^Opening"),
    AM_NORMAL_RE("^Connect"),
 -  AM_NORMAL_RE("^Domain="),
    AM_NORMAL_RE("^max"),
    AM_NORMAL_RE("^security="),
    AM_NORMAL_RE("^capabilities"),
@@@ -141,6 -141,7 +141,7 @@@ start_backup
      int               mesgf,
      int               indexf)
  {
+     char tmppath[PATH_MAX];
      int dumpin, dumpout, compout;
      char *cmd = NULL;
      char *indexcmd = NULL;
      char *error_pn = NULL;
      char *compopt  = NULL;
      char *encryptopt = skip_argument;
-     char *quoted;
+     char *tquoted;
+     char *fquoted;
      char *qdisk;
      int infd, outfd;
      ssize_t nb;
      error_pn = stralloc2(get_pname(), "-smbclient");
  
      qdisk = quote_string(disk);
-     dbprintf(("%s: start: %s:%s lev %d\n",
-             get_pname(), host, qdisk, level));
+     dbprintf(_("start: %s:%s lev %d\n"), host, qdisk, level);
  
-     fprintf(stderr, "%s: start [%s:%s level %d]\n",
+     g_fprintf(stderr, _("%s: start [%s:%s level %d]\n"),
            get_pname(), host, qdisk, level);
  
       /*  apply client-side encryption here */
           encpid = pipespawn(options->clnt_encrypt, STDIN_PIPE,
                        &compout, &dataf, &mesgf, 
                        options->clnt_encrypt, encryptopt, NULL);
-          dbprintf(("%s: pid %ld: %s\n",
-                 debug_prefix_time("-gnutar"), (long)encpid, options->clnt_encrypt));
+          dbprintf(_("gnutar: pid %ld: %s\n"), (long)encpid, options->clnt_encrypt);
      } else {
         compout = dataf;
         encpid = -1;
        comppid = pipespawn(COMPRESS_PATH, STDIN_PIPE,
                            &dumpout, &compout, &mesgf,
                            COMPRESS_PATH, compopt, NULL);
-       dbprintf(("%s: pid %ld: %s",
-                 debug_prefix_time("-gnutar"), (long)comppid, COMPRESS_PATH));
+       dbprintf(_("gnutar: pid %ld: %s"), (long)comppid, COMPRESS_PATH);
        if(compopt != skip_argument) {
-           dbprintf((" %s", compopt));
+           dbprintf(_("pid %ld: %s %s\n"),
+                       (long)comppid, COMPRESS_PATH, compopt);
+       } else {
+           dbprintf(_("pid %ld: %s\n"), (long)comppid, COMPRESS_PATH);
        }
-       dbprintf(("\n"));
       } else if (options->compress == COMP_CUST) {
          compopt = skip_argument;
        comppid = pipespawn(options->clntcompprog, STDIN_PIPE,
                            &dumpout, &compout, &mesgf,
                            options->clntcompprog, compopt, NULL);
-       dbprintf(("%s: pid %ld: %s",
-                 debug_prefix_time("-gnutar-cust"), (long)comppid, options->clntcompprog));
        if(compopt != skip_argument) {
-           dbprintf((" %s", compopt));
+           dbprintf(_("pid %ld: %s %s\n"),
+                    (long)comppid, options->clntcompprog, compopt);
+       } else {
+           dbprintf(_("pid %ld: %s\n"), (long)comppid, options->clntcompprog);
        }
-       dbprintf(("\n"));
      } else {
        dumpout = compout;
        comppid = -1;
      if (gnutar_list_dir) {
        char *basename = NULL;
        char number[NUM_STR_SIZE];
-       char *s;
-       int ch;
        char *inputname = NULL;
        int baselevel;
+       char *sdisk = sanitise_filename(disk);
  
        basename = vstralloc(gnutar_list_dir,
                             "/",
                             host,
-                            disk,
+                            sdisk,
                             NULL);
-       /*
-        * The loop starts at the first character of the host name,
-        * not the '/'.
-        */
-       s = basename + strlen(gnutar_list_dir) + 1;
-       while((ch = *s++) != '\0') {
-           if(ch == '/')
-               s[-1] = '_';
-       }
+       amfree(sdisk);
  
-       snprintf(number, SIZEOF(number), "%d", level);
+       g_snprintf(number, SIZEOF(number), "%d", level);
        incrname = vstralloc(basename, "_", number, ".new", NULL);
        unlink(incrname);
  
        infd = -1;
        while (infd == -1) {
            if (--baselevel >= 0) {
-               snprintf(number, SIZEOF(number), "%d", baselevel);
+               g_snprintf(number, SIZEOF(number), "%d", baselevel);
                inputname = newvstralloc(inputname,
                                         basename, "_", number, NULL);
            } else {
                int save_errno = errno;
                char *qname = quote_string(inputname);
  
-               dbprintf(("%s: error opening '%s': %s\n",
-                         debug_prefix_time("-gnutar"),
+               dbprintf(_("gnutar: error opening '%s': %s\n"),
                          qname,
-                         strerror(save_errno)));
+                         strerror(save_errno));
                if (baselevel < 0) {
-                   error("error [opening '%s': %s]", qname, strerror(save_errno));
+                   error(_("error [opening '%s': %s]"), qname, strerror(save_errno));
                    /*NOTREACHED*/
                }
                amfree(qname);
         * Copy the previous listed incremental file to the new one.
         */
        if ((outfd = open(incrname, O_WRONLY|O_CREAT, 0600)) == -1) {
-           error("error [opening '%s': %s]", incrname, strerror(errno));
+           error(_("error [opening '%s': %s]"), incrname, strerror(errno));
            /*NOTREACHED*/
        }
  
        while ((nb = read(infd, &buf, SIZEOF(buf))) > 0) {
            if (fullwrite(outfd, &buf, (size_t)nb) < nb) {
-               error("error [writing to '%s': %s]", incrname,
+               error(_("error [writing to '%s': %s]"), incrname,
                       strerror(errno));
                /*NOTREACHED*/
            }
        }
  
        if (nb < 0) {
-           error("error [reading from '%s': %s]", inputname, strerror(errno));
+           error(_("error [reading from '%s': %s]"), inputname, strerror(errno));
            /*NOTREACHED*/
        }
  
        if (close(infd) != 0) {
-           error("error [closing '%s': %s]", inputname, strerror(errno));
+           error(_("error [closing '%s': %s]"), inputname, strerror(errno));
            /*NOTREACHED*/
        }
        if (close(outfd) != 0) {
-           error("error [closing '%s': %s]", incrname, strerror(errno));
+           error(_("error [closing '%s': %s]"), incrname, strerror(errno));
            /*NOTREACHED*/
        }
  
-       dbprintf(("%s: doing level %d dump as listed-incremental",
-                 debug_prefix_time("-gnutar"), level));
+       tquoted = quote_string(incrname);
        if(baselevel >= 0) {
-           quoted = quote_string(inputname);
-           dbprintf((" from '%s'", quoted));
-           amfree(quoted);
+           fquoted = quote_string(inputname);
+           dbprintf(_("doing level %d dump as listed-incremental from '%s' to '%s'\n"),
+                    level, fquoted, tquoted);
+           amfree(fquoted);
+       } else {
+           dbprintf(_("doing level %d dump as listed-incremental to '%s'\n"),
+                    level, tquoted);
        }
-       quoted = quote_string(incrname);
-       dbprintf((" to '%s'\n", quoted));
-       amfree(quoted);
+       amfree(tquoted);
        amfree(inputname);
        amfree(basename);
      }
  
      amandates_file = getconf_str(CNF_AMANDATES);
      if(!start_amandates(amandates_file, 0)) {
-       error("error [opening %s: %s]", amandates_file, strerror(errno));
+       error(_("error [opening %s: %s]"), amandates_file, strerror(errno));
        /*NOTREACHED*/
      }
  
      free_amandates();
  
      gmtm = gmtime(&prev_dumptime);
-     snprintf(dumptimestr, SIZEOF(dumptimestr),
+     g_snprintf(dumptimestr, SIZEOF(dumptimestr),
                "%04d-%02d-%02d %2d:%02d:%02d GMT",
                gmtm->tm_year + 1900, gmtm->tm_mon+1, gmtm->tm_mday,
                gmtm->tm_hour, gmtm->tm_min, gmtm->tm_sec);
  
-     dbprintf(("%s: doing level %d dump from date: %s\n",
-             debug_prefix_time("-gnutar"), level, dumptimestr));
+     dbprintf(_("gnutar: doing level %d dump from date: %s\n"),
+             level, dumptimestr);
  
      dirname = amname_to_dirname(amdevice);
  
            amfree(subdir);
            set_pname(error_pn);
            amfree(error_pn);
-           error("cannot parse disk entry %s for share/subdir", qdisk);
+           error(_("cannot parse disk entry %s for share/subdir"), qdisk);
            /*NOTREACHED*/
        }
        if ((subdir) && (SAMBA_VERSION < 2)) {
            amfree(subdir);
            set_pname(error_pn);
            amfree(error_pn);
-           error("subdirectory specified for share %s but samba not v2 or better", qdisk);
+           error(_("subdirectory specified for share %s but samba not v2 or better"), qdisk);
            /*NOTREACHED*/
        }
        if ((user_and_password = findpass(share, &domain)) == NULL) {
            }
            set_pname(error_pn);
            amfree(error_pn);
-           error("error [invalid samba host or password not found?]");
+           error(_("error [invalid samba host or password not found?]"));
            /*NOTREACHED*/
        }
        lpass = strlen(user_and_password);
            }
            set_pname(error_pn);
            amfree(error_pn);
-           error("password field not \'user%%pass\' for %s", qdisk);
+           error(_("password field not \'user%%pass\' for %s"), qdisk);
            /*NOTREACHED*/
        }
        *pwtext++ = '\0';
            }
            set_pname(error_pn);
            amfree(error_pn);
-           error("error [can't make share name of %s]", share);
+           error(_("error [can't make share name of %s]"), share);
            /*NOTREACHED*/
        }
  
            strappend(taropt, "a");
        }
  
-       dbprintf(("%s: backup of %s", debug_prefix_time("-gnutar"), sharename));
        if (subdir) {
-           dbprintf(("/%s",subdir));
+           dbprintf(_("gnutar: backup of %s/%s\n"), sharename, subdir);
+       } else {
+           dbprintf(_("gnutar: backup of %s\n"), sharename);
        }
-       dbprintf(("\n"));
  
        program->backup_name = program->restore_name = SAMBA_CLIENT;
        cmd = stralloc(program->backup_name);
            amfree(user_and_password);
            set_pname(error_pn);
            amfree(error_pn);
-           error("error [password write failed: %s]", strerror(save_errno));
+           error(_("error [password write failed: %s]"), strerror(save_errno));
            /*NOTREACHED*/
        }
        memset(user_and_password, '\0', lpass);
  
        my_argv = alloc(SIZEOF(char *) * (22 + (nb_exclude*2)+(nb_include*2)));
  
-       cmd = vstralloc(libexecdir, "/", "runtar", versionsuffix(), NULL);
+       cmd = vstralloc(amlibexecdir, "/", "runtar", versionsuffix(), NULL);
        info_tapeheader();
  
        start_index(options->createindex, dumpout, mesgf, indexf, indexcmd);
            my_argv[i++] = g_options->config;
        else
            my_argv[i++] = "NOCONFIG";
-       my_argv[i++] = "gtar";
+ #ifdef GNUTAR
+       my_argv[i++] = GNUTAR;
+ #else
+       my_argv[i++] = "tar";
+ #endif
        my_argv[i++] = "--create";
        my_argv[i++] = "--file";
        my_argv[i++] = "-";
        my_argv[i++] = "--directory";
-       my_argv[i++] = dirname;
+       canonicalize_pathname(dirname, tmppath);
+       my_argv[i++] = tmppath;
        my_argv[i++] = "--one-file-system";
        if (gnutar_list_dir && incrname) {
            my_argv[i++] = "--listed-incremental";
        amfree(file_include);
        amfree(my_argv);
      }
-     dbprintf(("%s: %s: pid %ld\n",
-             debug_prefix_time("-gnutar"),
-             cmd,
-             (long)dumppid));
+     dbprintf(_("gnutar: %s: pid %ld\n"), cmd, (long)dumppid);
  
      amfree(qdisk);
      amfree(dirname);
@@@ -624,7 -618,7 +618,7 @@@ end_backup
            nodotnew = stralloc(incrname);
            nodotnew[strlen(nodotnew)-4] = '\0';
            if (rename(incrname, nodotnew)) {
-               fprintf(stderr, "%s: warning [renaming %s to %s: %s]\n"
+               g_fprintf(stderr, _("%s: warning [renaming %s to %s: %s]\n")
                        get_pname(), incrname, nodotnew, strerror(errno));
            }
            amfree(nodotnew);
        }
  
          if(!start_amandates(amandates_file, 1)) {
-           fprintf(stderr, "%s: warning [opening %s: %s]", get_pname(),
+           g_fprintf(stderr, _("%s: warning [opening %s: %s]"), get_pname(),
                    amandates_file, strerror(errno));
        }
        else {
diff --combined client-src/sendbackup.c
index 9cfa39732d122407a17560461fb5338ea52fe63f,9f26dafe2e2d3ccf02db171a2da62cc57d227b12..2e91c9b74acd936f20fdaff1f27e430698297e8f
@@@ -40,9 -40,9 +40,9 @@@
  #include "version.h"
  #include "conffile.h"
  
- #define sendbackup_debug(i,x) do {    \
+ #define sendbackup_debug(i, ...) do { \
        if ((i) <= debug_sendbackup) {  \
-           dbprintf(x);                \
+           dbprintf(__VA_LIST__);      \
        }                               \
  } while (0)
  
@@@ -193,16 -193,22 +193,23 @@@ main
      char *line = NULL;
      char *err_extra = NULL;
      char *s;
 +    char *conffile;
      int i;
      int ch;
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
      FILE *toolin;
      int status;
  
      /* initialize */
  
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
      safe_fd(DATA_FD_OFFSET, DATA_FD_COUNT*2);
  
      safe_cd();
      /* Don't die when interrupt received */
      signal(SIGINT, SIG_IGN);
  
-     malloc_size_1 = malloc_inuse(&malloc_hist_1);
      if(argc > 1 && strcmp(argv[1],"-t") == 0) {
        interactive = 1;
        argc--;
      erroutput_type = (ERR_INTERACTIVE|ERR_SYSLOG);
      dbopen(DBG_SUBDIR_CLIENT);
      startclock();
-     dbprintf(("%s: version %s\n", get_pname(), version()));
+     dbprintf(_("Version %s\n"), version());
  
      if(argc > 2 && strcmp(argv[1], "amandad") == 0) {
        amandad_auth = stralloc(argv[2]);
      our_features = am_init_feature_set();
      our_feature_string = am_feature_to_string(our_features);
  
-     conffile = vstralloc(CONFIG_DIR, "/", "amanda-client.conf", NULL);
-     if (read_clientconf(conffile) > 0) {
-       error("error reading conffile: %s", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
+     config_init(CONFIG_INIT_CLIENT, NULL);
+     check_running_as(RUNNING_AS_CLIENT_LOGIN);
  
      if(interactive) {
        /*
         * programs on the tape host are set up.  The index service is
         * run and goes to stdout.
         */
-       fprintf(stderr, "%s: running in interactive test mode\n", get_pname());
+       g_fprintf(stderr, _("%s: running in interactive test mode\n"), get_pname());
        fflush(stderr);
      }
  
        if (line[0] == '\0')
            continue;
        if(interactive) {
-           fprintf(stderr, "%s> ", get_pname());
+           g_fprintf(stderr, "%s> ", get_pname());
            fflush(stderr);
        }
        if(strncmp_const(line, "OPTIONS ") == 0) {
            }
  
            if (g_options->config) {
-               conffile = vstralloc(CONFIG_DIR, "/", g_options->config, "/",
-                                    "amanda-client.conf", NULL);
-               if (read_clientconf(conffile) > 0) {
-                   error("error reading conffile: %s", conffile);
-                   /*NOTREACHED*/
-               }
-               amfree(conffile);
+               /* overlay this configuration on the existing (nameless) configuration */
+               config_init(CONFIG_INIT_CLIENT | CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_OVERLAY,
+                           g_options->config);
  
-               dbrename(g_options->config, DBG_SUBDIR_CLIENT);
+               dbrename(config_name, DBG_SUBDIR_CLIENT);
            }
            continue;
        }
  
        if (prog != NULL) {
-           err_extra = "multiple requests";
+           err_extra = _("multiple requests");
            goto err;
        }
  
-       dbprintf(("  sendbackup req: <%s>\n", line));
+       dbprintf(_("  sendbackup req: <%s>\n"), line);
        s = line;
        ch = *s++;
  
        skip_whitespace(s, ch);                 /* find the program name */
        if(ch == '\0') {
-           err_extra = "no program name";
+           err_extra = _("no program name");
            goto err;                           /* no program name */
        }
        prog = s - 1;
  
        skip_whitespace(s, ch);                 /* find the disk name */
        if(ch == '\0') {
-           err_extra = "no disk name";
+           err_extra = _("no disk name");
            goto err;                           /* no disk name */
        }
  
  
        skip_whitespace(s, ch);                 /* find the device or level */
        if (ch == '\0') {
-           err_extra = "bad level";
+           err_extra = _("bad level");
            goto err;
        }
  
        }
                                                /* find the level number */
        if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) {
-           err_extra = "bad level";
+           err_extra = _("bad level");
            goto err;                           /* bad level */
        }
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);                 /* find the dump date */
        if(ch == '\0') {
-           err_extra = "no dumpdate";
+           err_extra = _("no dumpdate");
            goto err;                           /* no dumpdate */
        }
        amfree(dumpdate);
  
        skip_whitespace(s, ch);                 /* find the options keyword */
        if(ch == '\0') {
-           err_extra = "no options";
+           err_extra = _("no options");
            goto err;                           /* no options */
        }
        if(strncmp_const_skip(s - 1, "OPTIONS ", s, ch) != 0) {
-           err_extra = "no OPTIONS keyword";
+           err_extra = _("no OPTIONS keyword");
            goto err;                           /* no options */
        }
        skip_whitespace(s, ch);                 /* find the options string */
        if(ch == '\0') {
-           err_extra = "bad options string";
+           err_extra = _("bad options string");
            goto err;                           /* no options */
        }
        amfree(stroptions);
        stroptions = stralloc(s - 1);
      }
      amfree(line);
+     if (g_options == NULL) {
+       printf(_("ERROR [Missing OPTIONS line in sendbackup input]\n"));
+       error(_("Missing OPTIONS line in sendbackup input\n"));
+       /*NOTREACHED*/
+     }
  
      if (prog       == NULL ||
        disk       == NULL ||
        amdevice   == NULL ||
        dumpdate   == NULL ||
        stroptions == NULL) {
-       err_extra = "no valid sendbackup request";
+       err_extra = _("no valid sendbackup request");
        goto err;
      }
        
-     dbprintf(("  parsed request as: program `%s'\n", prog));
-     dbprintf(("                     disk `%s'\n", qdisk));
-     dbprintf(("                     device `%s'\n", qamdevice));
-     dbprintf(("                     level %d\n", level));
-     dbprintf(("                     since %s\n", dumpdate));
-     dbprintf(("                     options `%s'\n", stroptions));
+     dbprintf(_("  Parsed request as: program `%s'\n"), prog);
+     dbprintf(_("                     disk `%s'\n"), qdisk);
+     dbprintf(_("                     device `%s'\n"), qamdevice);
+     dbprintf(_("                     level %d\n"), level);
+     dbprintf(_("                     since %s\n"), dumpdate);
+     dbprintf(_("                     options `%s'\n"), stroptions);
  
      if(program_is_backup_api==1) {
        /* check that the backup_api exist */
            }
        }
        if (programs[i] == NULL) {
-           dbprintf(("ERROR [%s: unknown program %s]\n", get_pname(), prog));
-           error("ERROR [%s: unknown program %s]", get_pname(), prog);
+           dbprintf(_("ERROR [%s: unknown program %s]\n"), get_pname(), prog);
+           error(_("ERROR [%s: unknown program %s]"), get_pname(), prog);
            /*NOTREACHED*/
        }
        program = programs[i];
  
      if(options->auth && amandad_auth) {
        if(strcasecmp(options->auth, amandad_auth) != 0) {
-           printf("ERROR [client configured for auth=%s while server requested '%s']\n",
+           g_printf(_("ERROR [client configured for auth=%s while server requested '%s']\n"),
                   amandad_auth, options->auth);
            exit(-1);
        }
      }
  
-     printf("CONNECT DATA %d MESG %d INDEX %d\n",
+     if (options->kencrypt) {
+       g_printf("KENCRYPT\n");
+     }
+     g_printf(_("CONNECT DATA %d MESG %d INDEX %d\n"),
           DATA_FD_OFFSET, DATA_FD_OFFSET+1,
           indexfd == -1 ? -1 : DATA_FD_OFFSET+2);
-     printf("OPTIONS ");
+     g_printf(_("OPTIONS "));
      if(am_has_feature(g_options->features, fe_rep_options_features)) {
-       printf("features=%s;", our_feature_string);
+       g_printf("features=%s;", our_feature_string);
      }
      if(am_has_feature(g_options->features, fe_rep_options_hostname)) {
-       printf("hostname=%s;", g_options->hostname);
+       g_printf("hostname=%s;", g_options->hostname);
      }
      if(am_has_feature(g_options->features, fe_rep_options_sendbackup_options)) {
-       printf("%s", optionstr(options));
+       g_printf("%s", optionstr(options));
      }
-     printf("\n");
+     g_printf("\n");
      fflush(stdout);
      if (freopen("/dev/null", "w", stdout) == NULL) {
-       dbprintf(("%s: error redirecting stdout to /dev/null: %s\n",
-           debug_prefix_time(NULL), strerror(errno)));
+       dbprintf(_("Error redirecting stdout to /dev/null: %s\n"),
+                strerror(errno));
          exit(1);
      }
  
      if(interactive) {
        if((datafd = open("/dev/null", O_RDWR)) < 0) {
-       s = strerror(errno);
-       error("ERROR [%s: open of /dev/null for debug data stream: %s]\n",
-                 get_pname(), s);
+       error(_("ERROR [open of /dev/null for debug data stream: %s]\n"),
+               strerror(errno));
        /*NOTREACHED*/
        }
        mesgfd = 2;
        backup_support_option_t *bsu;
  
        if (pipe(property_pipe) < 0) {
-           error("Can't create pipe: %s",strerror(errno));
+           error(_("Can't create pipe: %s"),strerror(errno));
            /*NOTREACHED*/
        }
        bsu = backup_support_option(prog, g_options, disk, amdevice);
        case 0:
            aclose(property_pipe[1]);
            if(dup2(property_pipe[0], 0) == -1) {
-               error("Can't dup2: %s",strerror(errno));
+               error(_("Can't dup2: %s"),strerror(errno));
                /*NOTREACHED*/
            }
            if(dup2(datafd, 1) == -1) {
-               error("Can't dup2: %s",strerror(errno));
+               error(_("Can't dup2: %s"),strerror(errno));
                /*NOTREACHED*/
            }
            if(dup2(mesgfd, 2) == -1) {
-               error("Can't dup2: %s",strerror(errno));
+               error(_("Can't dup2: %s"),strerror(errno));
                /*NOTREACHED*/
            }
            if(indexfd != 0) {
                if(dup2(indexfd, 3) == -1) {
-                   error("Can't dup2: %s",strerror(errno));
+                   error(_("Can't dup2: %s"),strerror(errno));
                    /*NOTREACHED*/
                }
                fcntl(indexfd, F_SETFD, 0);
                fcntl(3, F_SETFD, 0);
+               safe_fd(3, 1);
+           } else {
+               safe_fd(-1, 0);
            }
            cmd = vstralloc(DUMPER_DIR, "/", prog, NULL);
            i=0;
            argvchild[i++] = amdevice;
            if (level <= bsu->max_level) {
                argvchild[i++] = "--level";
-               snprintf(levelstr,19,"%d",level);
+               g_snprintf(levelstr,19,"%d",level);
                argvchild[i++] = levelstr;
            }
            if (indexfd != 0 && bsu->index_line == 1) {
                argvchild[i++] = "--record";
            }
            argvchild[i] = NULL;
-           dbprintf(("%s: running \"%s", get_pname(), cmd));
-           for(j=1;j<i;j++) dbprintf((" %s",argvchild[j]));
-           dbprintf(("\"\n"));
+           dbprintf(_("%s: running \"%s"), get_pname(), cmd);
+           for(j=1;j<i;j++) dbprintf(" %s",argvchild[j]);
+           dbprintf(_("\"\n"));
            backup_api_info_tapeheader(mesgfd, prog, options);
            execve(cmd, argvchild, safe_env());
            exit(1);
            aclose(property_pipe[0]);
            toolin = fdopen(property_pipe[1],"w");
            if (!toolin) {
-               error("Can't fdopen: %s", strerror(errno));
+               error(_("Can't fdopen: %s"), strerror(errno));
                /*NOTREACHED*/
            }
            output_tool_property(toolin, options);
            fclose(toolin);
            break;
        case -1:
-           error("%s: fork returned: %s", get_pname(), strerror(errno));
+           error(_("%s: fork returned: %s"), get_pname(), strerror(errno));
        }
        amfree(bsu);
        if (waitpid(backup_api_pid, &status, 0) < 0) {
            if (!WIFEXITED(status)) {
-               dbprintf(("Tool exited with signal %d", WTERMSIG(status)));
+               dbprintf(_("Tool exited with signal %d"), WTERMSIG(status));
            } else if (WEXITSTATUS(status) != 0) {
-               dbprintf(("Tool exited with status %d", WEXITSTATUS(status)));
+               dbprintf(_("Tool exited with status %d"), WEXITSTATUS(status));
            } else {
-               dbprintf(("waitpid returned negative value"));
+               dbprintf(_("waitpid returned negative value"));
            }
        }
       }
        if(!interactive) {
            /* redirect stderr */
            if(dup2(mesgfd, 2) == -1) {
-               dbprintf(("%s: error redirecting stderr to fd %d: %s\n",
-                         debug_prefix_time(NULL), mesgfd, strerror(errno)));
+               dbprintf(_("Error redirecting stderr to fd %d: %s\n"),
+                        mesgfd, strerror(errno));
                dbclose();
                exit(1);
            }
   
        if(pipe(mesgpipe) == -1) {
            s = strerror(errno);
-           dbprintf(("error [opening mesg pipe: %s]\n", s));
-           error("error [opening mesg pipe: %s]", s);
+           dbprintf(_("error [opening mesg pipe: %s]\n"), s);
+           error(_("error [opening mesg pipe: %s]"), s);
        }
  
        program->start_backup(g_options->hostname, disk, amdevice, level,
                              dumpdate, datafd, mesgpipe[1], indexfd);
-       dbprintf(("%s: started backup\n", debug_prefix_time(NULL)));
+       dbprintf(_("Started backup\n"));
        parse_backup_messages(mesgpipe[0]);
-       dbprintf(("%s: parsed backup messages\n", debug_prefix_time(NULL)));
+       dbprintf(_("Parsed backup messages\n"));
      }
  
      amfree(prog);
      amfree(our_feature_string);
      am_release_feature_set(our_features);
      our_features = NULL;
-     am_release_feature_set(g_options->features);
-     g_options->features = NULL;
-     amfree(g_options->hostname);
-     amfree(g_options->str);
-     amfree(g_options);
+     free_g_options(g_options);
  
      dbclose();
  
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
      return 0;
  
   err:
-     printf("FORMAT ERROR IN REQUEST PACKET\n");
-     dbprintf(("%s: REQ packet is bogus%s%s\n",
-             debug_prefix_time(NULL),
+     g_printf(_("FORMAT ERROR IN REQUEST PACKET\n"));
+     dbprintf(_("REQ packet is bogus%s%s\n"),
              err_extra ? ": " : "",
-             err_extra ? err_extra : ""));
+             err_extra ? err_extra : "");
      dbclose();
      return 1;
  }
@@@ -683,8 -680,6 +681,6 @@@ check_status
      char *thiserr = NULL;
      char *str, *strX;
      int ret, sig, rc;
-     char number[NUM_STR_SIZE];
-     char numberpid[NUM_STR_SIZE];
  
      str = childstr(pid);
  
         * but the failure is noted.
         */
        if(ret != 0) {
-           fprintf(stderr, "? index %s returned %d\n", str, ret);
+           g_fprintf(stderr, _("? index %s returned %d\n"), str, ret);
            rc = 0;
        }
        indexpid = -1;
        return 0;                               /* normal exit */
      }
  
 +    snprintf(numberpid, SIZEOF(number), "%d", (int)pid);
      if(ret == 0) {
-       snprintf(number, SIZEOF(number), "%d", sig);
-       thiserr = vstralloc(strX, "(", numberpid, ") ", str, " got signal ", number, NULL);
+       thiserr = vstrallocf(_("%s (%d) %s got signal %d"), strX, (int)pid, str,
+                            sig);
      } else {
-       snprintf(number, SIZEOF(number), "%d", ret);
-       thiserr = vstralloc(strX, "(", numberpid, ") ", str, " returned ", number, NULL);
+       thiserr = vstrallocf(_("%s (%d) %s returned %d"), strX, (int)pid, str, ret);
      }
  
      if(errorstr) {
-       strappend(errorstr, ", ");
-       strappend(errorstr, thiserr);
+       errorstr =  newvstrallocf(errorstr, "%s, %s", errorstr, thiserr);
        amfree(thiserr);
      } else {
        errorstr = thiserr;
  void
  info_tapeheader(void)
  {
-     fprintf(stderr, "%s: info BACKUP=%s\n", get_pname(), program->backup_name);
+     g_fprintf(stderr, "%s: info BACKUP=%s\n", get_pname(), program->backup_name);
  
-     fprintf(stderr, "%s: info RECOVER_CMD=", get_pname());
+     g_fprintf(stderr, "%s: info RECOVER_CMD=", get_pname());
      if (options->compress == COMP_FAST || options->compress == COMP_BEST)
-       fprintf(stderr, "%s %s |", UNCOMPRESS_PATH,
+       g_fprintf(stderr, "%s %s |", UNCOMPRESS_PATH,
  #ifdef UNCOMPRESS_OPT
                UNCOMPRESS_OPT
  #else
  #endif
                );
  
-     fprintf(stderr, "%s -xpGf - ...\n", program->restore_name);
+     g_fprintf(stderr, "%s -xpGf - ...\n", program->restore_name);
  
      if (options->compress == COMP_FAST || options->compress == COMP_BEST)
-       fprintf(stderr, "%s: info COMPRESS_SUFFIX=%s\n",
+       g_fprintf(stderr, "%s: info COMPRESS_SUFFIX=%s\n",
                        get_pname(), COMPRESS_SUFFIX);
  
-     fprintf(stderr, "%s: info end\n", get_pname());
+     g_fprintf(stderr, "%s: info end\n", get_pname());
  }
  
  void
@@@ -808,26 -800,26 +802,26 @@@ backup_api_info_tapeheader
  {
      char line[1024];
  
-     snprintf(line, 1024, "%s: info BACKUP=DUMPER\n", get_pname());
+     g_snprintf(line, 1024, "%s: info BACKUP=DUMPER\n", get_pname());
      if (fullwrite(mesgfd, line, strlen(line)) != (ssize_t)strlen(line)) {
-       dbprintf(("error writing to mesgfd socket: %s", strerror(errno)));
+       dbprintf(_("error writing to mesgfd socket: %s"), strerror(errno));
        return;
      }
  
-     snprintf(line, 1024, "%s: info DUMPER=%s\n", get_pname(), prog);
+     g_snprintf(line, 1024, "%s: info DUMPER=%s\n", get_pname(), prog);
      if (fullwrite(mesgfd, line, strlen(line)) != (ssize_t)strlen(line)) {
-       dbprintf(("error writing to mesgfd socket: %s", strerror(errno)));
+       dbprintf(_("error writing to mesgfd socket: %s"), strerror(errno));
        return;
      }
  
-     snprintf(line, 1024, "%s: info RECOVER_CMD=", get_pname());
+     g_snprintf(line, 1024, "%s: info RECOVER_CMD=", get_pname());
      if (fullwrite(mesgfd, line, strlen(line)) != (ssize_t)strlen(line)) {
-       dbprintf(("error writing to mesgfd socket: %s", strerror(errno)));
+       dbprintf(_("error writing to mesgfd socket: %s"), strerror(errno));
        return;
      }
  
      if (options->compress) {
-       snprintf(line, 1024, "%s %s |", UNCOMPRESS_PATH,
+       g_snprintf(line, 1024, "%s %s |", UNCOMPRESS_PATH,
  #ifdef UNCOMPRESS_OPT
                 UNCOMPRESS_OPT
  #else
  #endif
                 );
        if (fullwrite(mesgfd, line, strlen(line)) != (ssize_t)strlen(line)) {
-           dbprintf(("error writing to mesgfd socket: %s", strerror(errno)));
+           dbprintf(_("error writing to mesgfd socket: %s"), strerror(errno));
            return;
        }
      }
-     snprintf(line, 1024, "%s -f... -\n", prog);
+     g_snprintf(line, 1024, "%s -f... -\n", prog);
      if (fullwrite(mesgfd, line, strlen(line)) != (ssize_t)strlen(line)) {
-       dbprintf(("error writing to mesgfd socket: %s", strerror(errno)));
+       dbprintf(_("error writing to mesgfd socket: %s"), strerror(errno));
        return;
      }
  
      if (options->compress) {
-       snprintf(line, 1024, "%s: info COMPRESS_SUFFIX=%s\n",
+       g_snprintf(line, 1024, "%s: info COMPRESS_SUFFIX=%s\n",
                 get_pname(), COMPRESS_SUFFIX);
        if (fullwrite(mesgfd, line, strlen(line)) != (ssize_t)strlen(line)) {
-           dbprintf(("error writing to mesgfd socket: %s", strerror(errno)));
+           dbprintf(_("error writing to mesgfd socket: %s"), strerror(errno));
            return;
        }
      }
  
-     snprintf(line, 1024, "%s: info end\n", get_pname());
+     g_snprintf(line, 1024, "%s: info end\n", get_pname());
      if (fullwrite(mesgfd, line, strlen(line)) != (ssize_t)strlen(line)) {
-       dbprintf(("error writing to mesgfd socket: %s", strerror(errno)));
+       dbprintf(_("error writing to mesgfd socket: %s"), strerror(errno));
        return;
      }
  }
@@@ -872,17 -864,16 +866,16 @@@ pipefork
      int inpipe[2];
      pid_t pid;
  
-     dbprintf(("%s: forking function %s in pipeline\n",
-       debug_prefix_time(NULL), fname));
+     dbprintf(_("Forking function %s in pipeline\n"), fname);
  
      if(pipe(inpipe) == -1) {
-       error("error [open pipe to %s: %s]", fname, strerror(errno));
+       error(_("error [open pipe to %s: %s]"), fname, strerror(errno));
        /*NOTREACHED*/
      }
  
      switch(pid = fork()) {
      case -1:
-       error("error [fork %s: %s]", fname, strerror(errno));
+       error(_("error [fork %s: %s]"), fname, strerror(errno));
        /*NOTREACHED*/
      default:  /* parent process */
        aclose(inpipe[0]);      /* close input side of pipe */
        aclose(inpipe[1]);      /* close output side of pipe */
  
        if(dup2(inpipe[0], 0) == -1) {
-           error("error [fork %s: dup2(%d, in): %s]",
+           error(_("error [fork %s: dup2(%d, in): %s]"),
                  fname, inpipe[0], strerror(errno));
            /*NOTRACHED*/
        }
        if(dup2(stdoutfd, 1) == -1) {
-           error("error [fork %s: dup2(%d, out): %s]",
+           error(_("error [fork %s: dup2(%d, out): %s]"),
                  fname, stdoutfd, strerror(errno));
            /*NOTRACHED*/
        }
        if(dup2(stderrfd, 2) == -1) {
-           error("error [fork %s: dup2(%d, err): %s]",
+           error(_("error [fork %s: dup2(%d, err): %s]"),
                  fname, stderrfd, strerror(errno));
            /*NOTRACHED*/
        }
@@@ -931,7 -922,7 +924,7 @@@ parse_backup_messages
      }
  
      if(errno) {
-       error("error [read mesg pipe: %s]", strerror(errno));
+       error(_("error [read mesg pipe: %s]"), strerror(errno));
        /*NOTREACHED*/
      }
  
        }
      }
      if (dumppid != -1) {
-       dbprintf(("%s: Sending SIGHUP to dump process %d\n",
-                 debug_prefix_time(NULL), (int)dumppid));
+       dbprintf(_("Sending SIGHUP to dump process %d\n"),
+                 (int)dumppid);
        if(dumppid != -1) {
            if(kill(dumppid, SIGHUP) == -1) {
-               dbprintf(("%s: Can't send SIGHUP to %d: %s\n",
-                         debug_prefix_time(NULL), (int)dumppid,
-                         strerror(errno)));
+               dbprintf(_("Can't send SIGHUP to %d: %s\n"),
+                         (int)dumppid,
+                         strerror(errno));
            }
        }
        sleep(5);
        }
      }
      if (dumppid != -1) {
-       dbprintf(("%s: Sending SIGKILL to dump process %d\n",
-                 debug_prefix_time(NULL), (int)dumppid));
+       dbprintf(_("Sending SIGKILL to dump process %d\n"),
+                 (int)dumppid);
        if(dumppid != -1) {
            if(kill(dumppid, SIGKILL) == -1) {
-               dbprintf(("%s: Can't send SIGKILL to %d: %s\n",
-                         debug_prefix_time(NULL), (int)dumppid,
-                         strerror(errno)));
+               dbprintf(_("Can't send SIGKILL to %d: %s\n"),
+                         (int)dumppid,
+                         strerror(errno));
            }
        }
        sleep(5);
      }
  
      if(errorstr) {
-       error("error [%s]", errorstr);
+       error(_("error [%s]"), errorstr);
        /*NOTREACHED*/
      } else if(dump_size == -1) {
-       error("error [no backup size line]");
+       error(_("error [no backup size line]"));
        /*NOTREACHED*/
      }
  
      program->end_backup(goterror);
  
-     fprintf(stderr, "%s: size %ld\n", get_pname(), dump_size);
-     fprintf(stderr, "%s: end\n", get_pname());
+     g_fprintf(stderr, _("%s: size %ld\n"), get_pname(), dump_size);
+     g_fprintf(stderr, _("%s: end\n"), get_pname());
  }
  
  
@@@ -1061,13 -1052,12 +1054,12 @@@ process_dumpline
        startchr = '!';
        break;
      }
-     dbprintf(("%s: %3d: %7s(%c): %s\n",
-             debug_prefix_time(NULL),
+     dbprintf("%3d: %7s(%c): %s\n",
              rp->srcline,
              type,
              startchr,
-             str));
-     fprintf(stderr, "%c %s\n", startchr, str);
+             str);
+     g_fprintf(stderr, "%c %s\n", startchr, str);
  }
  
  
@@@ -1101,13 -1091,11 +1093,11 @@@ save_fd
    while (*fd >= 0 && *fd < min) {
      int newfd = dup(*fd);
      if (newfd == -1)
-       dbprintf(("%s: unable to save file descriptor [%s]\n",
-       debug_prefix_time(NULL), strerror(errno)));
+       dbprintf(_("Unable to save file descriptor [%s]\n"), strerror(errno));
      *fd = newfd;
    }
    if (origfd != *fd)
-     dbprintf(("%s: dupped file descriptor %i to %i\n",
-       debug_prefix_time(NULL), origfd, *fd));
+     dbprintf(_("Dupped file descriptor %i to %i\n"), origfd, *fd);
  }
  
  void
@@@ -1126,19 -1114,19 +1116,19 @@@ start_index
      return;
  
    if (pipe(pipefd) != 0) {
-     error("creating index pipe: %s", strerror(errno));
+     error(_("creating index pipe: %s"), strerror(errno));
      /*NOTREACHED*/
    }
  
    switch(indexpid = fork()) {
    case -1:
-     error("forking index tee process: %s", strerror(errno));
+     error(_("forking index tee process: %s"), strerror(errno));
      /*NOTREACHED*/
  
    default:
      aclose(pipefd[0]);
      if (dup2(pipefd[1], input) == -1) {
-       error("dup'ping index tee output: %s", strerror(errno));
+       error(_("dup'ping index tee output: %s"), strerror(errno));
        /*NOTREACHED*/
      }
      aclose(pipefd[1]);
    dup2(index, 1);
    dup2(mesg, 2);
    dup2(input, 3);
-   for(index = 4; index < FD_SETSIZE; index++) {
+   for(index = 4; index < (int)FD_SETSIZE; index++) {
      if (index != dbfd()) {
        close(index);
      }
    }
  
    if ((pipe_fp = popen(cmd, "w")) == NULL) {
-     error("couldn't start index creator [%s]", strerror(errno));
+     error(_("couldn't start index creator [%s]"), strerror(errno));
      /*NOTREACHED*/
    }
  
-   dbprintf(("%s: started index creator: \"%s\"\n",
-     debug_prefix_time(NULL), cmd));
+   dbprintf(_("Started index creator: \"%s\"\n"), cmd);
    while(1) {
      char buffer[BUFSIZ], *ptr;
      ssize_t bytes_read;
      } while ((bytes_read < 0) && ((errno == EINTR) || (errno == EAGAIN)));
  
      if (bytes_read < 0) {
-       error("index tee cannot read [%s]", strerror(errno));
+       error(_("index tee cannot read [%s]"), strerror(errno));
        /*NOTREACHED*/
      }
  
         * just as we waited for write() to complete.
         */
        if (errno != EPIPE) {
-           dbprintf(("%s: index tee cannot write to index creator [%s]\n",
-                           debug_prefix_time(NULL), strerror(errno)));
+           dbprintf(_("Index tee cannot write to index creator [%s]\n"),
+                           strerror(errno));
        }
      } else {
        bytes_written += just_written;
      bytes_written = 0;
      just_written = fullwrite(3, ptr, (size_t)bytes_read);
      if (just_written < 0) {
-       error("index tee cannot write [%s]", strerror(errno));
+       error(_("index tee cannot write [%s]"), strerror(errno));
        /*NOTREACHED*/
      } else {
        bytes_written += just_written;
    /* finished */
    /* check the exit code of the pipe and moan if not 0 */
    if ((exitcode = pclose(pipe_fp)) != 0) {
-     dbprintf(("%s: index pipe returned %d\n",
-       debug_prefix_time(NULL), exitcode));
+     char *exitstr = str_exit_status("Index pipe", exitcode);
+     dbprintf("%s\n", exitstr);
+     amfree(exitstr);
    } else {
-     dbprintf(("%s: index created successfully\n", debug_prefix_time(NULL)));
+     dbprintf(_("Index created successfully\n"));
    }
    pipe_fp = NULL;
  
diff --combined client-src/sendsize.c
index aec977e13d65b5649614f7d4d71174bfd33a0eb6,4a335b7bdfb4a0ddf25d6ad5ea15666533d8219d..8c64f63ac1563ebac01affcedd07486bc79520a0
  #include "findpass.h"
  #endif
  
- #define sendsize_debug(i,x) do {      \
+ #define sendsize_debug(i, ...) do {   \
        if ((i) <= debug_sebdsize) {    \
-           dbprintf(x);                \
+           dbprintf(__VA_ARGS__);      \
        }                               \
  } while (0)
  
  #ifdef HAVE_SETPGID
  #  define SETPGRP     setpgid(getpid(), getpid())
  #  define SETPGRP_FAILED() do {                                               \
-     dbprintf(("setpgid(%ld,%ld) failed: %s\n",                                \
-             (long)getpid(), (long)getpid(), strerror(errno)));        \
+     dbprintf(_("setpgid(%ld,%ld) failed: %s\n"),                              \
+             (long)getpid(), (long)getpid(), strerror(errno)); \
  } while(0)
  
  #else /* () line 0 */
  #if defined(SETPGRP_VOID)
  #  define SETPGRP     setpgrp()
  #  define SETPGRP_FAILED() do {                                               \
-     dbprintf(("setpgrp() failed: %s\n", strerror(errno)));            \
+     dbprintf(_("setpgrp() failed: %s\n"), strerror(errno));           \
  } while(0)
  
  #else
  #  define SETPGRP     setpgrp(0, getpid())
  #  define SETPGRP_FAILED() do {                                               \
-     dbprintf(("setpgrp(0,%ld) failed: %s\n",                          \
-             (long)getpid(), strerror(errno)));                        \
+     dbprintf(_("setpgrp(0,%ld) failed: %s\n"),                                \
+             (long)getpid(), strerror(errno));                 \
  } while(0)
  
  #endif
@@@ -144,19 -144,23 +144,23 @@@ main
      char *qlist = NULL;
      char *amdevice = NULL;
      char *qamdevice = NULL;
-     char *conffile;
      char *amandates_file;
      int   amandates_read = 0;
- #if defined(USE_DBMALLOC)
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
- #endif
  
      (void)argc;       /* Quiet unused parameter warning */
      (void)argv;       /* Quiet unused parameter warning */
  
      /* initialize */
  
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
      safe_fd(-1, 0);
      safe_cd();
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
 +#if defined(USE_DBMALLOC)
 +    malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +#endif
 +
      erroutput_type = (ERR_INTERACTIVE|ERR_SYSLOG);
      dbopen(DBG_SUBDIR_CLIENT);
      startclock();
-     dbprintf(("%s: version %s\n", get_pname(), version()));
+     dbprintf(_("version %s\n"), version());
  
      our_features = am_init_feature_set();
      our_feature_string = am_feature_to_string(our_features);
  
-     set_debug_prefix_pid(getpid());
+     config_init(CONFIG_INIT_CLIENT, NULL);
  
-     conffile = vstralloc(CONFIG_DIR, "/", "amanda-client.conf", NULL);
-     if (read_clientconf(conffile) > 0) {
-       error("error reading conffile: %s", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
+     check_running_as(RUNNING_AS_CLIENT_LOGIN);
  
      /* handle all service requests */
  
                g_options->hostname[MAX_HOSTNAME_LENGTH] = '\0';
            }
  
-           printf("OPTIONS ");
+           g_printf("OPTIONS ");
            if(am_has_feature(g_options->features, fe_rep_options_features)) {
-               printf("features=%s;", our_feature_string);
+               g_printf("features=%s;", our_feature_string);
            }
            if(am_has_feature(g_options->features, fe_rep_options_maxdumps)) {
-               printf("maxdumps=%d;", g_options->maxdumps);
+               g_printf("maxdumps=%d;", g_options->maxdumps);
            }
            if(am_has_feature(g_options->features, fe_rep_options_hostname)) {
-               printf("hostname=%s;", g_options->hostname);
+               g_printf("hostname=%s;", g_options->hostname);
            }
-           printf("\n");
+           g_printf("\n");
            fflush(stdout);
  
            if (g_options->config) {
-               conffile = vstralloc(CONFIG_DIR, "/", g_options->config, "/",
-                                    "amanda-client.conf", NULL);
-               if (read_clientconf(conffile) > 0) {
-                   error("error reading conffile: %s", conffile);
-                   /*NOTREACHED*/
-               }
-               amfree(conffile);
+               /* overlay this configuration on the existing (nameless) configuration */
+               config_init(CONFIG_INIT_CLIENT | CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_OVERLAY,
+                           g_options->config);
  
-               dbrename(g_options->config, DBG_SUBDIR_CLIENT);
+               dbrename(config_name, DBG_SUBDIR_CLIENT);
            }
  
            continue;
  
        skip_whitespace(s, ch);                 /* find the program name */
        if(ch == '\0') {
-           err_extra = stralloc("no program name");
+           err_extra = stralloc(_("no program name"));
            goto err;                           /* no program name */
        }
        prog = s - 1;
        if(strncmp_const(prog, "CALCSIZE") == 0) {
            skip_whitespace(s, ch);             /* find the program name */
            if(ch == '\0') {
-               err_extra = stralloc("no program name");
+               err_extra = stralloc(_("no program name"));
                goto err;
            }
            calcprog = s - 1;
  
        skip_whitespace(s, ch);                 /* find the disk name */
        if(ch == '\0') {
-           err_extra = stralloc("no disk name");
+           err_extra = stralloc(_("no disk name"));
            goto err;                           /* no disk name */
        }
  
  
        skip_whitespace(s, ch);                 /* find the device or level */
        if (ch == '\0') {
-           err_extra = stralloc("bad level");
+           err_extra = stralloc(_("bad level"));
            goto err;
        }
        if(!isdigit((int)s[-1])) {
  
                                                /* find the level number */
        if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) {
-           err_extra = stralloc("bad level");
+           err_extra = stralloc(_("bad level"));
            goto err;                           /* bad level */
        }
        if (level < 0 || level >= DUMP_LEVELS) {
-           err_extra = stralloc("bad level");
+           err_extra = stralloc(_("bad level"));
            goto err;
        }
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);                 /* find the dump date */
        if(ch == '\0') {
-           err_extra = stralloc("no dumpdate");
+           err_extra = stralloc(_("no dumpdate"));
            goto err;                           /* no dumpdate */
        }
        dumpdate = s - 1;
        skip_whitespace(s, ch);                 /* find the spindle */
        if(ch != '\0') {
            if(sscanf(s - 1, "%d", &spindle) != 1) {
-               err_extra = stralloc("bad spindle");
+               err_extra = stralloc(_("bad spindle"));
                goto err;                       /* bad spindle */
            }
            skip_integer(s, ch);
                                append_sl(options->include_list, qlist);
                            amfree(qlist);
                        } else {
-                           err_extra = vstralloc("Invalid parameter (",
-                               s-1, ")", NULL);
+                           err_extra = vstrallocf(_("Invalid parameter (%s)"), s-1);
                            goto err;           /* should have gotten to end */
                        }
                        skip_quoted_string(s, ch);
        amfree(qamdevice);
      }
      if (g_options == NULL) {
-       error("Missing OPTIONS line in sendsize input\n");
+       printf(_("ERROR [Missing OPTIONS line in sendsize input]\n"));
+       error(_("Missing OPTIONS line in sendsize input\n"));
        /*NOTREACHED*/
      }
      amfree(line);
        if(need_wait) {
            pid_t child_pid;
            amwait_t child_status;
-           int exit_code;
  
            need_wait = 0;
-           dbprintf(("%s: waiting for any estimate child: %d running\n",
-                     debug_prefix_time(NULL), dumpsrunning));
+           dbprintf(_("waiting for any estimate child: %d running\n"),
+                     dumpsrunning);
            child_pid = wait(&child_status);
            if(child_pid == -1) {
-               error("wait failed: %s", strerror(errno));
+               error(_("wait failed: %s"), strerror(errno));
                /*NOTREACHED*/
            }
-           if(WIFSIGNALED(child_status)) {
-               dbprintf(("%s: child %ld terminated with signal %d\n",
-                         debug_prefix_time(NULL),
-                         (long) child_pid, WTERMSIG(child_status)));
-           } else {
-               exit_code = WEXITSTATUS(child_status);
-               if(exit_code == 0) {
-                   dbprintf(("%s: child %ld terminated normally\n",
-                             debug_prefix_time(NULL), (long) child_pid));
-               } else {
-                   dbprintf(("%s: child %ld terminated with code %d\n",
-                             debug_prefix_time(NULL),
-                             (long) child_pid, exit_code));
-               }
+           if (!WIFEXITED(child_status) || WEXITSTATUS(child_status) != 0) {
+               char *child_name = vstrallocf(_("child %ld"), (long)child_pid);
+               char *child_status_str = str_exit_status(child_name, child_status);
+               dbprintf("%s\n", child_status_str);
+               amfree(child_status_str);
+               amfree(child_name);
            }
            /*
             * Find the child and mark it done.
             */
                }
            }
            if(est == NULL) {
-               dbprintf(("%s: unexpected child %ld\n",
-                         debug_prefix_time(NULL), (long)child_pid));
+               dbprintf(_("unexpected child %ld\n"), (long)child_pid);
            } else {
                est->done = 1;
                est->child = 0;
        } else {
            done = 0;
            if((est->child = fork()) == 0) {
-               set_debug_prefix_pid(getpid());
                calc_estimates(est);            /* child does the estimate */
                exit(0);
            } else if(est->child == -1) {
-               error("calc_estimates fork failed: %s", strerror(errno));
+               error(_("calc_estimates fork failed: %s"), strerror(errno));
                /*NOTREACHED*/
            }
            dumpsrunning++;                     /* parent */
      amfree(our_feature_string);
      am_release_feature_set(our_features);
      our_features = NULL;
-     am_release_feature_set(g_options->features);
-     g_options->features = NULL;
-     amfree(g_options->hostname);
-     amfree(g_options->str);
-     amfree(g_options);
- #if defined(USE_DBMALLOC)
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(dbfd(), malloc_hist_1, malloc_hist_2);
-     }
- #endif
+     free_g_options(g_options);
  
      dbclose();
      return 0;
   err:
-     printf("FORMAT ERROR IN REQUEST PACKET\n");
-     dbprintf(("%s: REQ packet is bogus%s%s\n",
-             debug_prefix_time(NULL),
-             err_extra ? ": " : "",
-             err_extra ? err_extra : ""));
-     amfree(err_extra);
+     g_printf(_("FORMAT ERROR IN REQUEST PACKET\n"));
+     if (err_extra) {
+       dbprintf(_("REQ packet is bogus: %s\n"), err_extra);
+       amfree(err_extra);
+     } else {
+       dbprintf(_("REQ packet is bogus\n"));
+     }
      dbclose();
      return 1;
  }
@@@ -674,9 -645,8 +649,8 @@@ voi
  calc_estimates(
      disk_estimates_t *        est)
  {
-     dbprintf(("%s: calculating for amname %s, dirname %s, spindle %d\n",
-             debug_prefix_time(NULL),
-             est->qamname, est->qdirname, est->spindle));
+     dbprintf(_("calculating for amname %s, dirname %s, spindle %d\n"),
+             est->qamname, est->qdirname, est->spindle);
        
      if(est->program_is_backup_api ==  1)
        backup_api_calc_estimate(est);
  #endif
  #ifdef SAMBA_CLIENT
          if (est->amdevice[0] == '/' && est->amdevice[1] == '/')
-           dbprintf(("%s: Can't use CALCSIZE for samba estimate: %s %s\n",
-                     debug_prefix_time(NULL),
-                     est->qamname, est->qdirname));
+           dbprintf(_("Can't use CALCSIZE for samba estimate: %s %s\n"),
+                     est->qamname, est->qdirname);
          else
  #endif
            generic_calc_estimates(est);
  
-     dbprintf(("%s: done with amname %s dirname %s spindle %d\n",
-             debug_prefix_time(NULL),
-             est->qamname, est->qdirname, est->spindle));
+     dbprintf(_("done with amname %s dirname %s spindle %d\n"),
+             est->qamname, est->qdirname, est->spindle);
  }
  
  /*
@@@ -738,23 -706,22 +710,22 @@@ backup_api_calc_estimate
  
      for(level = 0; level < DUMP_LEVELS; level++) {
        if (est->est[level].needestimate) {
-           dbprintf(("%s: getting size via backup-api for %s %s level %d\n",
-                     debug_prefix_time(NULL), est->qamname, est->qamdevice,
-                     level));
+           dbprintf(_("getting size via application API for %s %s level %d\n"),
+                     est->qamname, est->qamdevice, level);
            size = getsize_backup_api(est->program, est->amname, est->amdevice,
                                      level, est->options,
                                      est->est[level].dumpsince, &errmsg);
  
            amflock(1, "size");
  
-           printf("%s %d SIZE " OFF_T_FMT "\n", est->qamname, level,
-                  (OFF_T_FMT_TYPE)size);
+           g_printf(_("%s %d SIZE %lld\n"), est->qamname, level,
+                  (long long)size);
            if (errmsg && errmsg[0] != '\0') {
                if(am_has_feature(g_options->features,
                                  fe_rep_sendsize_quoted_error)) {
                    qerrmsg = quote_string(errmsg);
-                   dbprintf(("errmsg is %s\n", errmsg));
-                   printf("%s %d ERROR %s\n",
+                   dbprintf(_("errmsg is %s\n"), errmsg);
+                   g_printf(_("%s %d ERROR %s\n"),
                           est->qamname, level, qerrmsg);
                    amfree(qerrmsg);
                }
@@@ -774,6 -741,7 +745,7 @@@ generic_calc_estimates
  {
      int pipefd = -1, nullfd = -1;
      char *cmd;
+     char *cmdline;
      char *my_argv[DUMP_LEVELS*2+22];
      char number[NUM_STR_SIZE];
      int i, level, my_argc;
      char *match_expr;
      amwait_t wait_status;
      char *errmsg = NULL, *qerrmsg;
+     char tmppath[PATH_MAX];
  
-     cmd = vstralloc(libexecdir, "/", "calcsize", versionsuffix(), NULL);
+     cmd = vstralloc(amlibexecdir, "/", "calcsize", versionsuffix(), NULL);
  
      my_argc = 0;
  
      my_argv[my_argc++] = stralloc(est->calcprog);
  
      my_argv[my_argc++] = stralloc(est->amname);
-     my_argv[my_argc++] = stralloc(est->dirname);
+     canonicalize_pathname(est->dirname, tmppath);
+     my_argv[my_argc++] = stralloc(tmppath);
  
  
      if(est->options->exclude_file)
      }
      start_time = curclock();
  
-     dbprintf(("%s: running cmd: %s", debug_prefix_time(NULL), my_argv[0]));
-     for(i=0; i<my_argc; ++i)
-       dbprintf((" %s", my_argv[i]));
+     cmdline = stralloc(my_argv[0]);
+     for(i = 1; i < my_argc; i++)
+       cmdline = vstrextend(&cmdline, " ", my_argv[i], NULL);
+     dbprintf(_("running: \"%s\"\n"), cmdline);
+     amfree(cmdline);
  
      for(level = 0; level < DUMP_LEVELS; level++) {
        if(est->est[level].needestimate) {
-           snprintf(number, SIZEOF(number), "%d", level);
+           g_snprintf(number, SIZEOF(number), "%d", level);
            my_argv[my_argc++] = stralloc(number); 
-           dbprintf((" %s", number));
-           snprintf(number, SIZEOF(number),
+           dbprintf(" %s", number);
+           g_snprintf(number, SIZEOF(number),
                        "%ld", (long)est->est[level].dumpsince);
            my_argv[my_argc++] = stralloc(number); 
-           dbprintf((" %s", number));
+           dbprintf(" %s", number);
        }
      }
      my_argv[my_argc] = NULL;
-     dbprintf(("\n"));
+     dbprintf("\n");
  
      fflush(stderr); fflush(stdout);
  
      if ((nullfd = open("/dev/null", O_RDWR)) == -1) {
-       errmsg = vstrallocf("Cannot access /dev/null : %s",
+       errmsg = vstrallocf(_("Cannot access /dev/null : %s"),
                            strerror(errno));
-       dbprintf(("%s\n", errmsg));
+       dbprintf("%s\n", errmsg);
        goto common_exit;
      }
  
  
      dumpout = fdopen(pipefd,"r");
      if (!dumpout) {
-       error("Can't fdopen: %s", strerror(errno));
+       error(_("Can't fdopen: %s"), strerror(errno));
        /*NOTREACHED*/
      }
-     match_expr = vstralloc(est->qamname," %d SIZE " OFF_T_FMT, NULL);
+     match_expr = vstralloc(est->qamname," %d SIZE %lld", NULL);
      for(size = (off_t)-1; (line = agets(dumpout)) != NULL; free(line)) {
-       OFF_T_FMT_TYPE size_ = (OFF_T_FMT_TYPE)0;
+       long long size_ = (long long)0;
        if (line[0] == '\0')
            continue;
        if(sscanf(line, match_expr, &level, &size_) == 2) {
-           printf("%s\n", line); /* write to amandad */
-           dbprintf(("%s: estimate size for %s level %d: " OFF_T_FMT " KB\n",
-                     debug_prefix_time(NULL),
+           g_printf("%s\n", line); /* write to amandad */
+           dbprintf(_("estimate size for %s level %d: %lld KB\n"),
                      est->qamname,
                      level,
-                     size_));
+                     size_);
        }
        size = (off_t)size_;
      }
      amfree(match_expr);
  
-     dbprintf(("%s: waiting for %s %s child (pid=%d)\n",
-             debug_prefix_time(NULL), my_argv[0], est->qamdevice, calcpid));
+     dbprintf(_("waiting for %s %s child (pid=%d)\n"),
+             my_argv[0], est->qamdevice, (int)calcpid);
      waitpid(calcpid, &wait_status, 0);
      if (WIFSIGNALED(wait_status)) {
-       errmsg = vstrallocf("%s terminated with signal %d: see %s",
+       errmsg = vstrallocf(_("%s terminated with signal %d: see %s"),
                            "calcsize", WTERMSIG(wait_status),
-                           debug_fn());
+                           dbfn());
      } else if (WIFEXITED(wait_status)) {
        if (WEXITSTATUS(wait_status) != 0) {
-           errmsg = vstrallocf("%s exited with status %d: see %s",
+           errmsg = vstrallocf(_("%s exited with status %d: see %s"),
                                "calcsize", WEXITSTATUS(wait_status),
-                               debug_fn());
+                               dbfn());
        } else {
            /* Normal exit */
        }
      } else {
-       errmsg = vstrallocf("%s got bad exit: see %s",
-                            "calcsize", debug_fn());
+       errmsg = vstrallocf(_("%s got bad exit: see %s"),
+                            "calcsize", dbfn());
      }
-     dbprintf(("%s: after %s %s wait: child pid=%d status=%d\n",
-             debug_prefix_time(NULL), my_argv[0], est->qamdevice,
-             calcpid, WEXITSTATUS(wait_status)));
+     dbprintf(_("after %s %s wait: child pid=%d status=%d\n"),
+             my_argv[0], est->qamdevice,
+             (int)calcpid, WEXITSTATUS(wait_status));
  
-     dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
-     dbprintf(("%s: estimate time for %s: %s\n",
-             debug_prefix_time(NULL),
+     dbprintf(_(".....\n"));
+     dbprintf(_("estimate time for %s: %s\n"),
              est->qamname,
-             walltime_str(timessub(curclock(), start_time))));
+             walltime_str(timessub(curclock(), start_time)));
  
  common_exit:
      if (errmsg && errmsg[0] != '\0') {
        if(am_has_feature(g_options->features, fe_rep_sendsize_quoted_error)) {
            qerrmsg = quote_string(errmsg);
-           dbprintf(("errmsg is %s\n", errmsg));
-           printf("%s %d ERROR %s\n",
+           dbprintf(_("errmsg is %s\n"), errmsg);
+           g_printf("%s %d ERROR %s\n",
                    est->qamname, 0, qerrmsg);
            amfree(qerrmsg);
        }
@@@ -942,21 -912,21 +916,21 @@@ dump_calc_estimates
  
      for(level = 0; level < DUMP_LEVELS; level++) {
        if(est->est[level].needestimate) {
-           dbprintf(("%s: getting size via dump for %s level %d\n",
-                     debug_prefix_time(NULL), est->qamname, level));
+           dbprintf(_("getting size via dump for %s level %d\n"),
+                     est->qamname, level);
            size = getsize_dump(est->amname, est->amdevice,
                                level, est->options, &errmsg);
  
            amflock(1, "size");
  
-           printf("%s %d SIZE " OFF_T_FMT "\n",
-                  est->qamname, level, (OFF_T_FMT_TYPE)size);
+           g_printf(_("%s %d SIZE %lld\n"),
+                  est->qamname, level, (long long)size);
            if (errmsg && errmsg[0] != '\0') {
                if(am_has_feature(g_options->features,
                                  fe_rep_sendsize_quoted_error)) {
                    qerrmsg = quote_string(errmsg);
-                   dbprintf(("errmsg is %s\n", errmsg));
-                   printf("%s %d ERROR %s\n",
+                   dbprintf(_("errmsg is %s\n"), errmsg);
+                   g_printf("%s %d ERROR %s\n",
                           est->qamname, level, qerrmsg);
                    amfree(qerrmsg);
                }
@@@ -980,21 -950,21 +954,21 @@@ smbtar_calc_estimates
  
      for(level = 0; level < DUMP_LEVELS; level++) {
        if(est->est[level].needestimate) {
-           dbprintf(("%s: getting size via smbclient for %s level %d\n",
-                     debug_prefix_time(NULL), est->qamname, level));
+           dbprintf(_("getting size via smbclient for %s level %d\n"),
+                     est->qamname, level);
            size = getsize_smbtar(est->amname, est->amdevice, level,
                                  est->options, &errmsg);
  
            amflock(1, "size");
  
-           printf("%s %d SIZE " OFF_T_FMT "\n",
-                  est->qamname, level, (OFF_T_FMT_TYPE)size);
+           g_printf(_("%s %d SIZE %lld\n"),
+                  est->qamname, level, (long long)size);
            if (errmsg && errmsg[0] != '\0') {
                if(am_has_feature(g_options->features,
                                  fe_rep_sendsize_quoted_error)) {
                    qerrmsg = quote_string(errmsg);
-                   dbprintf(("errmsg is %s\n", errmsg));
-                   printf("%s %d ERROR %s\n",
+                   dbprintf(_("errmsg is %s\n"), errmsg);
+                   g_printf("%s %d ERROR %s\n",
                           est->qamname, level, qerrmsg);
                    amfree(qerrmsg);
                }
@@@ -1019,22 -989,22 +993,22 @@@ gnutar_calc_estimates
  
      for(level = 0; level < DUMP_LEVELS; level++) {
        if (est->est[level].needestimate) {
-           dbprintf(("%s: getting size via gnutar for %s level %d\n",
-                     debug_prefix_time(NULL), est->qamname, level));
+           dbprintf(_("getting size via gnutar for %s level %d\n"),
+                     est->qamname, level);
            size = getsize_gnutar(est->amname, est->amdevice, level,
                                  est->options, est->est[level].dumpsince,
                                  &errmsg);
  
            amflock(1, "size");
  
-           printf("%s %d SIZE " OFF_T_FMT "\n",
-                  est->qamname, level, (OFF_T_FMT_TYPE)size);
+           g_printf(_("%s %d SIZE %lld\n"),
+                  est->qamname, level, (long long)size);
            if (errmsg && errmsg[0] != '\0') {
                if(am_has_feature(g_options->features,
                                  fe_rep_sendsize_quoted_error)) {
                    qerrmsg = quote_string(errmsg);
-                   dbprintf(("errmsg is %s\n", errmsg));
-                   printf("%s %d ERROR %s\n",
+                   dbprintf(_("errmsg is %s\n"), errmsg);
+                   g_printf(_("%s %d ERROR %s\n"),
                           est->qamname, level, qerrmsg);
                    amfree(qerrmsg);
                }
  typedef struct regex_s {
      char *regex;
      int scale;
- } regex_t;
+ } regex_scale_t;
  
  /*@ignore@*/
- regex_t re_size[] = {
+ regex_scale_t re_size[] = {
  #ifdef DUMP
      {"  DUMP: estimated -*[0-9][0-9]* tape blocks", 1024},
      {"  DUMP: [Ee]stimated [0-9][0-9]* blocks", 512},
@@@ -1117,7 -1087,7 +1091,7 @@@ getsize_dump
      char       *disk,
      char       *amdevice,
      int               level,
-     option_t   *options,
+     option_t   *options G_GNUC_UNUSED,
      char      **errmsg)
  {
      int pipefd[2], nullfd, stdoutfd, killctl[2];
      int is_rundump = 1;
  #endif
  
-     (void)options;    /* Quiet unused parameter warning */
-     (void)getsize_smbtar;     /* Quiet unused parameter warning */
-     snprintf(level_str, SIZEOF(level_str), "%d", level);
+     g_snprintf(level_str, SIZEOF(level_str), "%d", level);
  
      device = amname_to_devname(amdevice);
      qdevice = quote_string(device);
      fstype = amname_to_fstype(amdevice);
  
-     dbprintf(("%s: calculating for device %s with %s\n",
-             debug_prefix_time(NULL), qdevice, fstype));
+     dbprintf(_("calculating for device %s with %s\n"),
+             qdevice, fstype);
  
-     cmd = vstralloc(libexecdir, "/rundump", versionsuffix(), NULL);
+     cmd = vstralloc(amlibexecdir, "/rundump", versionsuffix(), NULL);
      rundump_cmd = stralloc(cmd);
      if (g_options->config)
          config = g_options->config;
      else
          config = "NOCONFIG";
      if ((stdoutfd = nullfd = open("/dev/null", O_RDWR)) == -1) {
-       *errmsg = vstrallocf("getsize_dump could not open /dev/null: %s",
+       *errmsg = vstrallocf(_("getsize_dump could not open /dev/null: %s"),
                             strerror(errno));
-       dbprintf(("%s\n", *errmsg));
+       dbprintf("%s\n", *errmsg);
        amfree(cmd);
        amfree(rundump_cmd);
        amfree(fstype);
      }
      pipefd[0] = pipefd[1] = killctl[0] = killctl[1] = -1;
      if (pipe(pipefd) < 0) {
-       *errmsg = vstrallocf("getsize_dump could create data pipes: %s",
+       *errmsg = vstrallocf(_("getsize_dump could create data pipes: %s"),
                             strerror(errno));
-       dbprintf(("%s\n", *errmsg));
+       dbprintf("%s\n", *errmsg);
        amfree(cmd);
        amfree(rundump_cmd);
        amfree(fstype);
  #endif                                                        /* } */
      {
        name = stralloc(" (xfsdump)");
-       dbprintf(("%s: running \"%s%s -F -J -l %s - %s\"\n",
-                 debug_prefix_time(NULL), cmd, name, level_str, qdevice));
+       dbprintf(_("running \"%s%s -F -J -l %s - %s\"\n"),
+                 cmd, name, level_str, qdevice);
      }
      else
  #endif                                                        /* } */
        is_rundump = 0;
  #endif
        dumpkeys = vstralloc(level_str, "s", "f", NULL);
-       dbprintf(("%s: running \"%s%s %s 1048576 - %s\"\n",
-                 debug_prefix_time(NULL), cmd, name, dumpkeys, qdevice));
+       dbprintf(_("running \"%s%s %s 1048576 - %s\"\n"),
+                 cmd, name, dumpkeys, qdevice);
      }
      else
  #endif                                                        /* } */
        device = amname_to_dirname(amdevice);
        qdevice = quote_string(device);
        dumpkeys = vstralloc(level_str, "b", "f", NULL);
-       dbprintf(("%s: running \"%s%s %s 60 - %s\"\n",
-                 debug_prefix_time(NULL), cmd, name, dumpkeys, qdevice));
+       dbprintf(_("running \"%s%s %s 60 - %s\"\n"),
+                 cmd, name, dumpkeys, qdevice);
      }
      else
  #endif                                                        /* } */
  
  # ifdef AIX_BACKUP                                    /* { */
        dumpkeys = vstralloc("-", level_str, "f", NULL);
-       dbprintf(("%s: running \"%s%s %s - %s\"\n",
-                 debug_prefix_time(NULL), cmd, name, dumpkeys, qdevice));
+       dbprintf(_("running \"%s%s %s - %s\"\n"),
+                 cmd, name, dumpkeys, qdevice);
  # else                                                        /* } { */
  #  ifdef HAVE_DUMP_ESTIMATE
  #    define PARAM_DUMP_ESTIMATE HAVE_DUMP_ESTIMATE
  #  endif
  
  #  ifdef HAVE_HONOR_NODUMP                            /* { */
-       dbprintf(("%s: running \"%s%s %s 0 1048576 - %s\"\n",
-                 debug_prefix_time(NULL), cmd, name, dumpkeys, qdevice));
+       dbprintf(_("running \"%s%s %s 0 1048576 - %s\"\n"),
+                 cmd, name, dumpkeys, qdevice);
  #  else                                                       /* } { */
-       dbprintf(("%s: running \"%s%s %s 1048576 - %s\"\n",
-                 debug_prefix_time(NULL), cmd, name, dumpkeys, qdevice));
+       dbprintf(_("running \"%s%s %s 1048576 - %s\"\n"),
+                 cmd, name, dumpkeys, qdevice);
  #  endif                                              /* } */
  # endif                                                       /* } */
      }
      else
  #endif                                                        /* } */
      {
-       error("no dump program available");
+       error(_("no dump program available"));
        /*NOTREACHED*/
      }
  
      if (pipe(killctl) < 0) {
-       dbprintf(("%s: Could not create pipe: %s\n",
-               debug_prefix_time(NULL), strerror(errno)));
+       dbprintf(_("Could not create pipe: %s\n"), strerror(errno));
        /* Message will be printed later... */
        killctl[0] = killctl[1] = -1;
      }
      start_time = curclock();
      switch(dumppid = fork()) {
      case -1:
-       *errmsg = vstrallocf("cannot fork for killpgrp: %s",
+       *errmsg = vstrallocf(_("cannot fork for killpgrp: %s"),
                             strerror(errno));
-       dbprintf(("%s\n", *errmsg));
+       dbprintf("%s\n", *errmsg);
        amfree(dumpkeys);
        amfree(cmd);
        amfree(rundump_cmd);
        if(SETPGRP == -1)
            SETPGRP_FAILED();
        else if (killctl[0] == -1 || killctl[1] == -1)
-           dbprintf(("%s: Trying without killpgrp\n", debug_prefix_time(NULL)));
+           dbprintf(_("Trying without killpgrp\n"));
        else {
            switch(fork()) {
            case -1:
-               dbprintf(("%s: fork failed, trying without killpgrp\n",
-                         debug_prefix_time(NULL)));
+               dbprintf(_("fork failed, trying without killpgrp\n"));
                break;
  
            default:
            {
                char *config;
-               char *killpgrp_cmd = vstralloc(libexecdir, "/killpgrp",
+               char *killpgrp_cmd = vstralloc(amlibexecdir, "/killpgrp",
                                               versionsuffix(), NULL);
-               dbprintf(("%s: running %s\n",
-                         debug_prefix_time(NULL), killpgrp_cmd));
+               dbprintf(_("running %s\n"), killpgrp_cmd);
                dup2(killctl[0], 0);
                dup2(nullfd, 1);
                dup2(nullfd, 2);
                    config = g_options->config;
                else
                    config = "NOCONFIG";
+               safe_fd(-1, 0);
                execle(killpgrp_cmd, killpgrp_cmd, config, (char *)0,
                       safe_env());
-               dbprintf(("%s: cannot execute %s: %s\n",
-                         debug_prefix_time(NULL), killpgrp_cmd, strerror(errno)));
+               dbprintf(_("cannot execute %s: %s\n"),
+                         killpgrp_cmd, strerror(errno));
                exit(-1);
            }
  
            aclose(killctl[0]);
        if (killctl[1] != -1)
            aclose(killctl[1]);
+       safe_fd(-1, 0);
  
  #ifdef XFSDUMP
  #ifdef DUMP
  # endif
  #endif
        {
-           error("exec %s failed or no dump program available: %s",
+           error(_("exec %s failed or no dump program available: %s"),
                  cmd, strerror(errno));
            /*NOTREACHED*/
        }
        aclose(killctl[0]);
      dumpout = fdopen(pipefd[0],"r");
      if (!dumpout) {
-       error("Can't fdopen: %s", strerror(errno));
+       error(_("Can't fdopen: %s"), strerror(errno));
        /*NOTREACHED*/
      }
  
      for(size = (off_t)-1; (line = agets(dumpout)) != NULL; free(line)) {
        if (line[0] == '\0')
            continue;
-       dbprintf(("%s: %s\n", debug_prefix_time(NULL), line));
+       dbprintf("%s\n", line);
        size = handle_dumpline(line);
        if(size > (off_t)-1) {
            amfree(line);
                amfree(line);
            }
            if (line != NULL) {
-               dbprintf(("%s: %s\n", debug_prefix_time(NULL), line));
+               dbprintf("%s\n", line);
            }
            break;
        }
      }
      amfree(line);
  
-     dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
-     dbprintf(("%s: estimate time for %s level %d: %s\n",
-             debug_prefix_time(NULL),
+     dbprintf(".....\n");
+     dbprintf(_("estimate time for %s level %d: %s\n"),
              qdisk,
              level,
-             walltime_str(timessub(curclock(), start_time))));
+             walltime_str(timessub(curclock(), start_time)));
      if(size == (off_t)-1) {
-       *errmsg = vstrallocf("no size line match in %s%s output",
+       *errmsg = vstrallocf(_("no size line match in %s%s output"),
                             cmd, name);
-       dbprintf(("%s: %s for %s\n", debug_prefix_time(NULL),
-                 *errmsg, qdisk));
+       dbprintf(_("%s for %s\n"),
+                 *errmsg, qdisk);
  
-       dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
-       dbprintf(("%s: Run %s%s manually to check for errors\n",
-                   debug_prefix_time(NULL), cmd, name));
+       dbprintf(".....\n");
+       dbprintf(_("Run %s%s manually to check for errors\n"),
+                   cmd, name);
      } else if(size == (off_t)0 && level == 0) {
-       dbprintf(("%s: possible %s%s problem -- is \"%s\" really empty?\n",
-                 debug_prefix_time(NULL), cmd, name, disk));
-       dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
+       dbprintf(_("possible %s%s problem -- is \"%s\" really empty?\n"),
+                 cmd, name, disk);
+       dbprintf(".....\n");
      } else {
-           dbprintf(("%s: estimate size for %s level %d: " OFF_T_FMT " KB\n",
-             debug_prefix_time(NULL),
+           dbprintf(_("estimate size for %s level %d: %lld KB\n"),
              qdisk,
              level,
-             (OFF_T_FMT_TYPE)size));
+             (long long)size);
      }
  
      if (killctl[1] != -1) {
-       dbprintf(("%s: asking killpgrp to terminate\n",
-                 debug_prefix_time(NULL)));
+       dbprintf(_("asking killpgrp to terminate\n"));
        aclose(killctl[1]);
        for(s = 5; s > 0; --s) {
            sleep(1);
       * First, try to kill the dump process nicely.  If it ignores us
       * for several seconds, hit it harder.
       */
-     dbprintf(("%s: sending SIGTERM to process group %ld\n",
-             debug_prefix_time(NULL), (long)dumppid));
+     dbprintf(_("sending SIGTERM to process group %ld\n"), (long)dumppid);
      if (kill(-dumppid, SIGTERM) == -1) {
-       dbprintf(("%s: kill failed: %s\n",
-                 debug_prefix_time(NULL), strerror(errno)));
+       dbprintf(_("kill failed: %s\n"), strerror(errno));
      }
      /* Now check whether it dies */
      for(s = 5; s > 0; --s) {
            goto terminated;
      }
  
-     dbprintf(("%s: sending SIGKILL to process group %ld\n",
-             debug_prefix_time(NULL), (long)dumppid));
+     dbprintf(_("sending SIGKILL to process group %ld\n"), (long)dumppid);
      if (kill(-dumppid, SIGKILL) == -1) {
-       dbprintf(("%s: kill failed: %s\n",
-                 debug_prefix_time(NULL), strerror(errno)));
+       dbprintf(_("kill failed: %s\n"), strerror(errno));
      }
      for(s = 5; s > 0; --s) {
        sleep(1);
            goto terminated;
      }
  
-     dbprintf(("%s: waiting for %s%s \"%s\" child\n",
-             debug_prefix_time(NULL), cmd, name, qdisk));
+     dbprintf(_("waiting for %s%s \"%s\" child\n"), cmd, name, qdisk);
      waitpid(dumppid, &wait_status, 0);
      if (WIFSIGNALED(wait_status)) {
-       *errmsg = vstrallocf("%s terminated with signal %d: see %s",
-                            cmd, WTERMSIG(wait_status), debug_fn());
+       *errmsg = vstrallocf(_("%s terminated with signal %d: see %s"),
+                            cmd, WTERMSIG(wait_status), dbfn());
      } else if (WIFEXITED(wait_status)) {
        if (WEXITSTATUS(wait_status) != 0) {
-           *errmsg = vstrallocf("%s exited with status %d: see %s",
-                                cmd, WEXITSTATUS(wait_status), debug_fn());
+           *errmsg = vstrallocf(_("%s exited with status %d: see %s"),
+                                cmd, WEXITSTATUS(wait_status), dbfn());
        } else {
            /* Normal exit */
        }
      } else {
-       *errmsg = vstrallocf("%s got bad exit: see %s",
-                            cmd, debug_fn());
+       *errmsg = vstrallocf(_("%s got bad exit: see %s"),
+                            cmd, dbfn());
      }
-     dbprintf(("%s: after %s%s %s wait\n",
-             debug_prefix_time(NULL), cmd, name, qdisk));
+     dbprintf(_("after %s%s %s wait\n"), cmd, name, qdisk);
  
   terminated:
  
@@@ -1612,7 -1568,7 +1572,7 @@@ getsize_smbtar
        amfree(subdir);
        set_pname(error_pn);
        amfree(error_pn);
-       error("cannot parse disk entry %s for share/subdir", qdisk);
+       error(_("cannot parse disk entry %s for share/subdir"), qdisk);
        /*NOTREACHED*/
      }
      if ((subdir) && (SAMBA_VERSION < 2)) {
        amfree(subdir);
        set_pname(error_pn);
        amfree(error_pn);
-       error("subdirectory specified for share %s but samba not v2 or better", qdisk);
+       error(_("subdirectory specified for share %s but samba not v2 or better"), qdisk);
        /*NOTREACHED*/
      }
      if ((user_and_password = findpass(share, &domain)) == NULL) {
        }
        set_pname(error_pn);
        amfree(error_pn);
-       error("cannot find password for %s", disk);
+       error(_("cannot find password for %s"), disk);
        /*NOTREACHED*/
      }
      lpass = strlen(user_and_password);
        }
        set_pname(error_pn);
        amfree(error_pn);
-       error("password field not \'user%%pass\' for %s", disk);
+       error(_("password field not \'user%%pass\' for %s"), disk);
        /*NOTREACHED*/
      }
      *pwtext++ = '\0';
        }
        set_pname(error_pn);
        amfree(error_pn);
-       error("cannot make share name of %s", share);
+       error(_("cannot make share name of %s"), share);
        /*NOTREACHED*/
      }
      if ((nullfd = open("/dev/null", O_RDWR)) == -1) {
        set_pname(error_pn);
        amfree(error_pn);
        amfree(sharename);
-       error("could not open /dev/null: %s\n",
+       error(_("could not open /dev/null: %s\n"),
              strerror(errno));
        /*NOTREACHED*/
      }
        aclose(passwdfd);
        set_pname(error_pn);
        amfree(error_pn);
-       error("password write failed: %s", strerror(save_errno));
+       error(_("password write failed: %s"), strerror(save_errno));
        /*NOTREACHED*/
      }
      memset(user_and_password, '\0', (size_t)lpass);
      amfree(error_pn);
      dumpout = fdopen(pipefd,"r");
      if (!dumpout) {
-       error("Can't fdopen: %s", strerror(errno));
+       error(_("Can't fdopen: %s"), strerror(errno));
        /*NOTREACHED*/
      }
  
      for(size = (off_t)-1; (line = agets(dumpout)) != NULL; free(line)) {
        if (line[0] == '\0')
            continue;
-       dbprintf(("%s: %s\n", debug_prefix_time(NULL), line));
+       dbprintf("%s\n", line);
        size = handle_dumpline(line);
        if(size > -1) {
            amfree(line);
                amfree(line);
            }
            if(line != NULL) {
-               dbprintf(("%s: %s\n", debug_prefix_time(NULL), line));
+               dbprintf("%s\n", line);
            }
            break;
        }
      }
      amfree(line);
  
-     dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
-     dbprintf(("%s: estimate time for %s level %d: %s\n",
-             debug_prefix_time(NULL),
+     dbprintf(".....\n");
+     dbprintf(_("estimate time for %s level %d: %s\n"),
              qdisk,
              level,
-             walltime_str(timessub(curclock(), start_time))));
+             walltime_str(timessub(curclock(), start_time)));
      if(size == (off_t)-1) {
-       *errmsg = vstrallocf("no size line match in %s output",
+       *errmsg = vstrallocf(_("no size line match in %s output"),
                             SAMBA_CLIENT);
-       dbprintf(("%s: %s for %s\n", debug_prefix_time(NULL),
-                 *errmsg, qdisk));
-       dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
+       dbprintf(_("%s for %s\n"),
+                 *errmsg, qdisk);
+       dbprintf(".....\n");
      } else if(size == (off_t)0 && level == 0) {
-       dbprintf(("%s: possible %s problem -- is \"%s\" really empty?\n",
-                 debug_prefix_time(NULL), SAMBA_CLIENT, disk));
-       dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
+       dbprintf(_("possible %s problem -- is \"%s\" really empty?\n"),
+                 SAMBA_CLIENT, disk);
+       dbprintf(".....\n");
      }
-     dbprintf(("%s: estimate size for %s level %d: " OFF_T_FMT " KB\n",
-             debug_prefix_time(NULL),
+     dbprintf(_("estimate size for %s level %d: %lld KB\n"),
              qdisk,
              level,
-             (OFF_T_FMT_TYPE)size));
+             (long long)size);
  
      kill(-dumppid, SIGTERM);
  
-     dbprintf(("%s: waiting for %s \"%s\" child\n",
-             debug_prefix_time(NULL), SAMBA_CLIENT, qdisk));
+     dbprintf(_("waiting for %s \"%s\" child\n"), SAMBA_CLIENT, qdisk);
      waitpid(dumppid, &wait_status, 0);
      if (WIFSIGNALED(wait_status)) {
-       *errmsg = vstrallocf("%s terminated with signal %d: see %s",
-                            "smbclient", WTERMSIG(wait_status), debug_fn());
+       *errmsg = vstrallocf(_("%s terminated with signal %d: see %s"),
+                            SAMBA_CLIENT, WTERMSIG(wait_status), dbfn());
      } else if (WIFEXITED(wait_status)) {
        if (WEXITSTATUS(wait_status) != 0) {
-           *errmsg = vstrallocf("%s exited with status %d: see %s",
-                                "smbclient", WEXITSTATUS(wait_status),
-                                debug_fn());
+           *errmsg = vstrallocf(_("%s exited with status %d: see %s"),
+                                SAMBA_CLIENT, WEXITSTATUS(wait_status),
+                                dbfn());
        } else {
            /* Normal exit */
        }
      } else {
-       *errmsg = vstrallocf("%s got bad exit: see %s",
-                            "smbclient", debug_fn());
+       *errmsg = vstrallocf(_("%s got bad exit: see %s"),
+                            SAMBA_CLIENT, dbfn());
      }
-     dbprintf(("%s: after %s %s wait\n",
-             debug_prefix_time(NULL), SAMBA_CLIENT, qdisk));
+     dbprintf(_("after %s %s wait\n"), SAMBA_CLIENT, qdisk);
  
      afclose(dumpout);
      pipefd = -1;
@@@ -1854,6 -1806,7 +1810,7 @@@ getsize_gnutar
      char *qdisk = quote_string(disk);
      char *gnutar_list_dir;
      amwait_t wait_status;
+     char tmppath[PATH_MAX];
  
      if(options->exclude_file) nb_exclude += options->exclude_file->nb_element;
      if(options->exclude_list) nb_exclude += options->exclude_list->nb_element;
        gnutar_list_dir = NULL;
      if (gnutar_list_dir) {
        char number[NUM_STR_SIZE];
-       char *s;
-       int ch;
        int baselevel;
+       char *sdisk = sanitise_filename(disk);
  
        basename = vstralloc(gnutar_list_dir,
                             "/",
                             g_options->hostname,
-                            disk,
+                            sdisk,
                             NULL);
-       /*
-        * The loop starts at the first character of the host name,
-        * not the '/'.
-        */
-       s = basename + strlen(gnutar_list_dir) + 1;
-       while((ch = *s++) != '\0') {
-           if(ch == '/' || isspace(ch)) s[-1] = '_';
-       }
+       amfree(sdisk);
  
-       snprintf(number, SIZEOF(number), "%d", level);
+       g_snprintf(number, SIZEOF(number), "%d", level);
        incrname = vstralloc(basename, "_", number, ".new", NULL);
        unlink(incrname);
  
        infd = -1;
        while (infd == -1) {
            if (--baselevel >= 0) {
-               snprintf(number, SIZEOF(number), "%d", baselevel);
+               g_snprintf(number, SIZEOF(number), "%d", baselevel);
                inputname = newvstralloc(inputname,
                                         basename, "_", number, NULL);
            } else {
            }
            if ((infd = open(inputname, O_RDONLY)) == -1) {
  
-               *errmsg = vstrallocf("gnutar: error opening %s: %s",
+               *errmsg = vstrallocf(_("gnutar: error opening %s: %s"),
                                     inputname, strerror(errno));
-               dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+               dbprintf("%s\n", *errmsg);
                if (baselevel < 0) {
                    goto common_exit;
                }
         * Copy the previous listed incremental file to the new one.
         */
        if ((outfd = open(incrname, O_WRONLY|O_CREAT, 0600)) == -1) {
-           *errmsg = vstrallocf("opening %s: %s",
+           *errmsg = vstrallocf(_("opening %s: %s"),
                                 incrname, strerror(errno));
-           dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+           dbprintf("%s\n", *errmsg);
            goto common_exit;
        }
  
        while ((nb = read(infd, &buf, SIZEOF(buf))) > 0) {
            if (fullwrite(outfd, &buf, (size_t)nb) < nb) {
-               *errmsg = vstrallocf("writing to %s: %s",
+               *errmsg = vstrallocf(_("writing to %s: %s"),
                                     incrname, strerror(errno));
-               dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+               dbprintf("%s\n", *errmsg);
                goto common_exit;
            }
        }
  
        if (nb < 0) {
-           *errmsg = vstrallocf("reading from %s: %s",
+           *errmsg = vstrallocf(_("reading from %s: %s"),
                                 inputname, strerror(errno));
-           dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+           dbprintf("%s\n", *errmsg);
            goto common_exit;
        }
  
        if (close(infd) != 0) {
-           *errmsg = vstrallocf("closing %s: %s",
+           *errmsg = vstrallocf(_("closing %s: %s"),
                                 inputname, strerror(errno));
-           dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+           dbprintf("%s\n", *errmsg);
            goto common_exit;
        }
        if (close(outfd) != 0) {
-           *errmsg = vstrallocf("closing %s: %s",
+           *errmsg = vstrallocf(_("closing %s: %s"),
                                 incrname, strerror(errno));
-           dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+           dbprintf("%s\n", *errmsg);
            goto common_exit;
        }
  
      }
  
      gmtm = gmtime(&dumpsince);
-     snprintf(dumptimestr, SIZEOF(dumptimestr),
+     g_snprintf(dumptimestr, SIZEOF(dumptimestr),
                "%04d-%02d-%02d %2d:%02d:%02d GMT",
                gmtm->tm_year + 1900, gmtm->tm_mon+1, gmtm->tm_mday,
                gmtm->tm_hour, gmtm->tm_min, gmtm->tm_sec);
  
      dirname = amname_to_dirname(amdevice);
  
-     cmd = vstralloc(libexecdir, "/", "runtar", versionsuffix(), NULL);
+     cmd = vstralloc(amlibexecdir, "/", "runtar", versionsuffix(), NULL);
      my_argv[i++] = "runtar";
      if (g_options->config)
        my_argv[i++] = g_options->config;
      my_argv[i++] = "--file";
      my_argv[i++] = "/dev/null";
      my_argv[i++] = "--directory";
-     my_argv[i++] = dirname;
+     canonicalize_pathname(dirname, tmppath);
+     my_argv[i++] = tmppath;
      my_argv[i++] = "--one-file-system";
      if (gnutar_list_dir) {
            my_argv[i++] = "--listed-incremental";
      start_time = curclock();
  
      if ((nullfd = open("/dev/null", O_RDWR)) == -1) {
-       *errmsg = vstrallocf("Cannot access /dev/null : %s",
+       *errmsg = vstrallocf(_("Cannot access /dev/null : %s"),
                             strerror(errno));
-       dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+       dbprintf("%s\n", *errmsg);
        goto common_exit;
      }
  
  
      dumpout = fdopen(pipefd,"r");
      if (!dumpout) {
-       error("Can't fdopen: %s", strerror(errno));
+       error(_("Can't fdopen: %s"), strerror(errno));
        /*NOTREACHED*/
      }
  
      for(size = (off_t)-1; (line = agets(dumpout)) != NULL; free(line)) {
        if (line[0] == '\0')
            continue;
-       dbprintf(("%s: %s\n", debug_prefix_time(NULL), line));
+       dbprintf("%s\n", line);
        size = handle_dumpline(line);
        if(size > (off_t)-1) {
            amfree(line);
                amfree(line);
            }
            if (line != NULL) {
-               dbprintf(("%s: %s\n", debug_prefix_time(NULL), line));
+               dbprintf("%s\n", line);
                break;
            }
            break;
      }
      amfree(line);
  
-     dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
-     dbprintf(("%s: estimate time for %s level %d: %s\n",
-             debug_prefix_time(NULL),
+     dbprintf(".....\n");
+     dbprintf(_("estimate time for %s level %d: %s\n"),
              qdisk,
              level,
-             walltime_str(timessub(curclock(), start_time))));
+             walltime_str(timessub(curclock(), start_time)));
      if(size == (off_t)-1) {
-       *errmsg = vstrallocf("no size line match in %s output", my_argv[0]);
-       dbprintf(("%s: %s for %s\n", debug_prefix_time(NULL),
-                 *errmsg, qdisk));
-       dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
+       *errmsg = vstrallocf(_("no size line match in %s output"), my_argv[0]);
+       dbprintf(_("%s for %s\n"), *errmsg, qdisk);
+       dbprintf(".....\n");
      } else if(size == (off_t)0 && level == 0) {
-       dbprintf(("%s: possible %s problem -- is \"%s\" really empty?\n",
-                 debug_prefix_time(NULL), my_argv[0], disk));
-       dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
+       dbprintf(_("possible %s problem -- is \"%s\" really empty?\n"),
+                 my_argv[0], disk);
+       dbprintf(".....\n");
      }
-     dbprintf(("%s: estimate size for %s level %d: " OFF_T_FMT " KB\n",
-             debug_prefix_time(NULL),
+     dbprintf(_("estimate size for %s level %d: %lld KB\n"),
              qdisk,
              level,
-             (OFF_T_FMT_TYPE)size));
+             (long long)size);
  
      kill(-dumppid, SIGTERM);
  
-     dbprintf(("%s: waiting for %s \"%s\" child\n",
-             debug_prefix_time(NULL), my_argv[0], qdisk));
+     dbprintf(_("waiting for %s \"%s\" child\n"), my_argv[0], qdisk);
      waitpid(dumppid, &wait_status, 0);
      if (WIFSIGNALED(wait_status)) {
-       *errmsg = vstrallocf("%s terminated with signal %d: see %s",
-                            cmd, WTERMSIG(wait_status), debug_fn());
+       *errmsg = vstrallocf(_("%s terminated with signal %d: see %s"),
+                            cmd, WTERMSIG(wait_status), dbfn());
      } else if (WIFEXITED(wait_status)) {
        if (WEXITSTATUS(wait_status) != 0) {
-           *errmsg = vstrallocf("%s exited with status %d: see %s",
-                                cmd, WEXITSTATUS(wait_status), debug_fn());
+           *errmsg = vstrallocf(_("%s exited with status %d: see %s"),
+                                cmd, WEXITSTATUS(wait_status), dbfn());
        } else {
            /* Normal exit */
        }
      } else {
-       *errmsg = vstrallocf("%s got bad exit: see %s",
-                            cmd, debug_fn());
+       *errmsg = vstrallocf(_("%s got bad exit: see %s"),
+                            cmd, dbfn());
      }
-     dbprintf(("%s: after %s %s wait\n",
-             debug_prefix_time(NULL), my_argv[0], qdisk));
+     dbprintf(_("after %s %s wait\n"), my_argv[0], qdisk);
  
  common_exit:
  
@@@ -2146,6 -2087,7 +2091,7 @@@ getsize_backup_api
      FILE *dumpout, *toolin;
      char *line = NULL;
      char *cmd = NULL;
+     char *cmdline;
      char dumptimestr[80];
      struct tm *gmtm;
      int  i, j;
  
      (void)options;
      gmtm = gmtime(&dumpsince);
-     snprintf(dumptimestr, SIZEOF(dumptimestr),
+     g_snprintf(dumptimestr, SIZEOF(dumptimestr),
                "%04d-%02d-%02d %2d:%02d:%02d GMT",
                gmtm->tm_year + 1900, gmtm->tm_mon+1, gmtm->tm_mday,
                gmtm->tm_hour, gmtm->tm_min, gmtm->tm_sec);
      }
      if (level <= bsu->max_level) {
        argvchild[i++] = "--level";
-       snprintf(levelstr,SIZEOF(levelstr),"%d",level);
+       g_snprintf(levelstr,SIZEOF(levelstr),"%d",level);
        argvchild[i++] = levelstr;
      }
  
      argvchild[i] = NULL;
  
-     dbprintf(("%s: running %s", debug_prefix_time(NULL), cmd));
-     for(j = 1; j < i; j++) {
-       dbprintf((" %s", argvchild[j]));
-     }
-     dbprintf(("\n"));
+     cmdline = stralloc(cmd);
+     for(j = 1; j < i; j++)
+       cmdline = vstrextend(&cmdline, " ", argvchild[i], NULL);
+     dbprintf("running: \"%s\"\n", cmdline);
+     amfree(cmdline);
  
      if ((nullfd = open("/dev/null", O_RDWR)) == -1) {
-       *errmsg = vstrallocf("Cannot access /dev/null : %s",
+       *errmsg = vstrallocf(_("Cannot access /dev/null : %s"),
                             strerror(errno));
-       dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+       dbprintf("%s\n", *errmsg);
        goto common_exit;
      }
  
      if (pipe(pipeinfd) < 0) {
-       *errmsg = vstrallocf("getsize_backup_api could create data pipes: %s",
+       *errmsg = vstrallocf(_("getsize_backup_api could create data pipes: %s"),
                             strerror(errno));
-       dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+       dbprintf("%s\n", *errmsg);
        goto common_exit;
      }
  
      if (pipe(pipeoutfd) < 0) {
-       *errmsg = vstrallocf("getsize_backup_api could create data pipes: %s",
+       *errmsg = vstrallocf(_("getsize_backup_api could create data pipes: %s"),
                             strerror(errno));
-       dbprintf(("%s: %s\n", debug_prefix_time(NULL), *errmsg));
+       dbprintf("%s\n", *errmsg);
        goto common_exit;
      }
  
        dup2(nullfd, 2);
        aclose(pipeinfd[1]);
        aclose(pipeoutfd[0]);
+       safe_fd(-1, 0);
  
        execve(cmd, argvchild, safe_env());
-       error("exec %s failed: %s", cmd, strerror(errno));
+       error(_("exec %s failed: %s"), cmd, strerror(errno));
        /*NOTREACHED*/
      }
      amfree(newoptstr);
  
      dumpout = fdopen(pipeoutfd[0],"r");
      if (!dumpout) {
-       error("Can't fdopen: %s", strerror(errno));
+       error(_("Can't fdopen: %s"), strerror(errno));
        /*NOTREACHED*/
      }
  
      for(size = (off_t)-1; (line = agets(dumpout)) != NULL; free(line)) {
-       OFF_T_FMT_TYPE size1_ = (OFF_T_FMT_TYPE)0;
-       OFF_T_FMT_TYPE size2_ = (OFF_T_FMT_TYPE)0;
+       long long size1_ = (long long)0;
+       long long size2_ = (long long)0;
        if (line[0] == '\0')
            continue;
-       dbprintf(("%s: %s\n", debug_prefix_time(NULL), line));
-       i = sscanf(line, OFF_T_FMT " " OFF_T_FMT, &size1_, &size2_);
+       dbprintf("%s\n", line);
+       i = sscanf(line, "%lld %lld", &size1_, &size2_);
        size1 = (off_t)size1_;
        size2 = (off_t)size2_;
        if(i == 2) {
                amfree(line);
            }
            if(line != NULL) {
-               dbprintf(("%s: %s\n", debug_prefix_time(NULL), line));
+               dbprintf(_("%s\n"), line);
            }
            break;
        }
      }
      amfree(line);
  
-     dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
-     dbprintf(("%s: estimate time for %s level %d: %s\n",
-             debug_prefix_time(NULL),
-             qamdevice,
-             level,
-             walltime_str(timessub(curclock(), start_time))));
+     dbprintf(".....\n");
+     dbprintf(_("estimate time for %s level %d: %s\n"), qamdevice, level,
+             walltime_str(timessub(curclock(), start_time)));
      if(size == (off_t)-1) {
-       *errmsg = vstrallocf("no size line match in %s output", cmd);
-       dbprintf(("%s: %s for %s\n", debug_prefix_time(NULL), cmd, qdisk));
-       dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
+       *errmsg = vstrallocf(_("no size line match in %s output"), cmd);
+       dbprintf(_("%s for %s\n"), cmd, qdisk);
+       dbprintf(".....\n");
      } else if(size == (off_t)0 && level == 0) {
-       dbprintf(("%s: possible %s problem -- is \"%s\" really empty?\n",
-                 debug_prefix_time(NULL), cmd, qdisk));
-       dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
+       dbprintf(_("possible %s problem -- is \"%s\" really empty?\n"),
+                 cmd, qdisk);
+       dbprintf(".....\n");
      }
-     dbprintf(("%s: estimate size for %s level %d: " OFF_T_FMT " KB\n",
-             debug_prefix_time(NULL),
+     dbprintf(_("estimate size for %s level %d: %lld KB\n"),
              qamdevice,
              level,
-             (OFF_T_FMT_TYPE)size));
+             (long long)size);
  
      kill(-dumppid, SIGTERM);
  
-     dbprintf(("%s: waiting for %s \"%s\" child\n",
-             debug_prefix_time(NULL), cmd, qdisk));
+     dbprintf(_("waiting for %s \"%s\" child\n"), cmd, qdisk);
      waitpid(dumppid, &wait_status, 0);
      if (WIFSIGNALED(wait_status)) {
-       *errmsg = vstrallocf("%s terminated with signal %d: see %s",
-                            cmd, WTERMSIG(wait_status), debug_fn());
+       *errmsg = vstrallocf(_("%s terminated with signal %d: see %s"),
+                            cmd, WTERMSIG(wait_status), dbfn());
      } else if (WIFEXITED(wait_status)) {
        if (WEXITSTATUS(wait_status) != 0) {
-           *errmsg = vstrallocf("%s exited with status %d: see %s", cmd,
-                                WEXITSTATUS(wait_status), debug_fn());
+           *errmsg = vstrallocf(_("%s exited with status %d: see %s"), cmd,
+                                WEXITSTATUS(wait_status), dbfn());
        } else {
            /* Normal exit */
        }
      } else {
-       *errmsg = vstrallocf("%s got bad exit: see %s",
-                            cmd, debug_fn());
+       *errmsg = vstrallocf(_("%s got bad exit: see %s"),
+                            cmd, dbfn());
      }
-     dbprintf(("%s: after %s %s wait\n",
-             debug_prefix_time(NULL), cmd, qdisk));
+     dbprintf(_("after %s %s wait\n"), cmd, qdisk);
  
      aclose(nullfd);
      afclose(dumpout);
@@@ -2380,7 -2317,7 +2321,7 @@@ off_
  handle_dumpline(
      char *    str)
  {
-     regex_t *rp;
+     regex_scale_t *rp;
      double size;
  
      /* check for size match */
diff --combined common-src/Makefile.am
index 672eb190448ff175287acedd06e4ff46bd87cb89,91a42a1159cf478454660984dc59f8fba5ae13a2..488b276f083af4d4014f17137e0d90b49e5387c7
@@@ -1,47 -1,93 +1,93 @@@
  # Makefile for Amanda library.
  
+ include $(top_srcdir)/config/automake/vars.am
+ include $(top_srcdir)/config/automake/scripts.am
+ include $(top_srcdir)/config/automake/installperms.am
+ include $(top_srcdir)/config/automake/precompile.am
  INCLUDES =      -I$(top_srcdir)/gnulib   
  
- lib_LTLIBRARIES =     libamanda.la
+ AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ amlib_LTLIBRARIES =   libamanda.la
  
- LINT=@AMLINT@
- LINTFLAGS=@AMLINTFLAGS@
+ LINT=$(AMLINT)
+ LINTFLAGS=$(AMLINTFLAGS)
  
  libamanda_la_SOURCES =                \
        alloc.c                 \
        amfeatures.c            \
        amflock.c               \
-       bsd-security.c          \
-       bsdtcp-security.c       \
-       bsdudp-security.c       \
        clock.c                 \
+       columnar.c              \
        conffile.c              \
        debug.c                 \
        dgram.c                 \
-       error.c                 \
        event.c                 \
        file.c                  \
        fileheader.c            \
-       krb4-security.c         \
-       krb5-security.c         \
+       glib-util.c             \
        match.c                 \
        packet.c                \
        pipespawn.c             \
        protocol.c              \
-       rsh-security.c          \
        security.c              \
        security-util.c         \
        sl.c                    \
-       ssh-security.c          \
-       statfs.c                \
+       sockaddr-util.c         \
        stream.c                \
        tapelist.c              \
+       timestamp.c             \
        token.c                 \
        util.c                  \
-       version.c               \
        versuff.c
- #libamanda_la_LIBADD =        @LTLIBOBJS@
+ # version.c is generated; see below
+ nodist_libamanda_la_SOURCES = version.c
+ libamanda_la_LIBADD =         \
+       ../gnulib/libgnu.la
+ if WANT_AMFLOCK_POSIX
+ libamanda_la_SOURCES += amflock-posix.c
+ endif
+ if WANT_AMFLOCK_FLOCK
+ libamanda_la_SOURCES += amflock-flock.c
+ endif
+ if WANT_AMFLOCK_LOCKF
+ libamanda_la_SOURCES += amflock-lockf.c
+ endif
+ if WANT_AMFLOCK_LNLOCK
+ libamanda_la_SOURCES += amflock-lnlock.c
+ endif
+ if WANT_RSH_SECURITY
+ libamanda_la_SOURCES += rsh-security.c
+ endif
+ if WANT_SSH_SECURITY
+ libamanda_la_SOURCES += ssh-security.c
+ endif
+ if WANT_BSD_SECURITY
+ libamanda_la_SOURCES += bsd-security.c
+ endif
+ if WANT_BSDTCP_SECURITY
+ libamanda_la_SOURCES += bsdtcp-security.c
+ endif
+ if WANT_BSDUDP_SECURITY
+ libamanda_la_SOURCES += bsdudp-security.c
+ endif
+ if WANT_KRB4_SECURITY
+ libamanda_la_SOURCES += krb4-security.c       
+ endif
+ if WANT_KRB5_SECURITY
+ libamanda_la_SOURCES += krb5-security.c
+ endif
+ libamanda_la_SOURCES += local-security.c
  
  libamanda_la_LDFLAGS =  -release $(VERSION)
  
@@@ -50,10 -96,15 +96,15 @@@ noinst_HEADERS =           
        amfeatures.h            \
        arglist.h               \
        clock.h                 \
+       columnar.h              \
+       amflock.h               \
        conffile.h              \
+       debug.h                 \
        dgram.h                 \
        event.h                 \
+       file.h                  \
        fileheader.h            \
+       glib-util.h             \
        packet.h                \
        pipespawn.h             \
        protocol.h              \
        security.h              \
        security-util.h         \
        sl.h                    \
-       statfs.h                \
+       sockaddr-util.h         \
        stream.h                \
        tapelist.h              \
+       timestamp.h             \
        token.h                 \
        util.h                  \
        version.h
  
 +.sh:
 +      cat $< > $@
 +      chmod a+x $@
 +
  EXTRA_PROGRAMS = genversion $(TEST_PROGS)
  
- genversion_SOURCES = genversion.c
- genversion_LDADD = $(libamanda_la_LIBADD) versuff.lo
+ # Version-building steps:
+ #
+ # 1. configure builds svn-info.h, if svn info is available; this
+ #    file is included in distribution tarballs
+ # 2. Makefile creates genversion.h with build-time information
+ # 3. Makefile builds genversion
+ # 4. Makefile runs genversion to create version.c
+ # 5. version.c is compiled into libamanda normally
+ genversion_SOURCES = genversion.c genversion.h svn-info.h
+ genversion_LDADD = $(libamanda_la_LIBADD)     \
+       versuff.lo                              \
+       ../gnulib/libgnu.la
  
- genversion.@OBJEXT@: genversion.h
  genversion.h: $(top_builddir)/config.status
        -rm -f $@ $@.new
        echo '#define CC "$(CC)"' > $@.new
        echo '#define BUILT_DATE "'`date`'"' >> $@.new
-       echo '#define BUILT_MACH "'`uname -a || echo UNKNOWN HOST`'"' >> $@.new
+       echo '#define BUILT_MACH "$(target)"' >> $@.new
        mv $@.new $@
  
- version.c:    genversion$(EXEEXT)
+ version.c: genversion$(EXEEXT)
        -rm -f version.c
-       ./genversion > version.c
+       ./genversion$(EXEEXT) > version.c
  
- # these are used for testing only:
- TEST_PROGS = statfs token file bsdsecurity amfeatures
+ BUILT_SOURCES += genversion.h version.c
  
- CLEANFILES = *.test.c
+ # these are used for testing only:
+ TEST_PROGS = token file bsdsecurity amfeatures
  
- DISTCLEANFILES = version.c genversion.h genversion amanda-int.h
+ CLEANFILES += *.test.c
+ DISTCLEANFILES += version.c genversion genversion.h
  
  # used for testing only
  
  STANDARD_COMMON_STUFF_NOT_FILE = \
-       alloc.$(OBJEXT) \
-       clock.$(OBJEXT) \
-       debug.$(OBJEXT) \
-       error.$(OBJEXT) \
-       util.$(OBJEXT) \
-       match.$(OBJEXT) \
-       sl.$(OBJEXT)
+       alloc.lo \
+       clock.lo \
+       debug.lo \
+       util.lo \
+       match.lo \
+       sl.lo
  
  STANDARD_COMMON_STUFF = \
        $(STANDARD_COMMON_STUFF_NOT_FILE) \
-       file.$(OBJEXT)
- statfs_SOURCES = statfs.test.c
- statfs_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF)
+       file.lo
  
  token_SOURCES = token.test.c
  token_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF)
@@@ -122,26 -177,65 +181,65 @@@ file_LDADD = $(libamanda_la_LIBADD) $(S
  
  bsdsecurity_SOURCES = bsd-security.test.c
  bsdsecurity_LDADD = $(libamanda_a_LIBADD) \
-                   alloc.$(OBJEXT) \
-                   clock.$(OBJEXT) \
-                   debug.$(OBJEXT) \
-                   dgram.$(OBJEXT) \
-                   error.$(OBJEXT) \
-                   event.$(OBJEXT) \
-                   file.$(OBJEXT) \
-                   packet.$(OBJEXT) \
-                   security.$(OBJEXT) \
-                   ssh-security.$(OBJEXT) \
-                   versuff.$(OBJEXT)
+                   alloc.lo \
+                   clock.lo \
+                   debug.lo \
+                   dgram.lo \
+                   event.lo \
+                   file.lo \
+                   packet.lo \
+                   security.lo \
+                   ssh-security.lo \
+                   versuff.lo
  
  amfeatures_SOURCES = amfeatures.test.c
  amfeatures_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF)
  
+ # automake-style tests
+ TESTS = amflock-test
+ noinst_PROGRAMS = $(TESTS)
+ amflock_test_SOURCES = amflock-test.c
+ amflock_test_LDADD = libamanda.la
+ # scripts
+ # divide scripts up both by language and by destination directory.
+ sbin_SCRIPTS_PERL = \
+           amgpgcrypt \
+           amcryptsimple
+ sbin_SCRIPTS_SHELL = \
+           amcrypt \
+           amaespipe \
+           amcrypt-ossl \
+           amcrypt-ossl-asym
+ amlibexec_SCRIPTS_PERL = 
+ SCRIPTS_INCLUDE = \
+           amanda-sh-lib.sh
+ EXTRA_DIST += amanda-sh-lib.sh.in
+ CHECK_PERL = $(sbin_SCRIPTS_PERL) $(amlibexec_SCRIPTS_PERL)
+ SCRIPTS_PERL = $(CHECK_PERL)
+ SCRIPTS_SHELL = $(sbin_SCRIPTS_SHELL) $(amlibexec_SCRIPTS_SHELL)
+ amlibexec_DATA = $(SCRIPTS_INCLUDE)
+ amlibexec_SCRIPTS = $(amlibexec_SCRIPTS_PERL) $(amlibexec_SCRIPTS_SHELL)
+ sbin_SCRIPTS = $(sbin_SCRIPTS_PERL) $(sbin_SCRIPTS_SHELL)
+ # installation
+ INSTALLPERMS_data = dest=$(sbindir) chown=amanda $(sbin_SCRIPTS) \
+                   dest=$(amlibexecdir) chown=amanda $(amlibexec_SCRIPTS) $(amlibexec_DATA)
  lint:
        @echo $(LINT) $(libamanda_la_SOURCES)
-       @$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config $(INCLUDES) $(libamanda_la_SOURCES)
+       @$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $(libamanda_la_SOURCES)
        @echo $(LINT) $(genversion_SOURCES)
-       @$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config $(INCLUDES) $(genversion_SOURCES)
+       @$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $(genversion_SOURCES)
  
  listlibsrc:
        @ for p in $(libamanda_la_SOURCES) $(REGEXCSRC); do     \
diff --combined common-src/Makefile.in
index e22c64b02b3a31186fab0ea3e5acc71c6ceba3c3,b88a9732f9f66144c8d89d553614d0037b8e52c6..af31e0ae7a1558fb2e6947ac720b7faecd28a112
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for Amanda library.
  
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # simple include file to pre-define variables which are then +='d by other
+ # scripts in this directory.
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # SYNOPSIS:
+ #
+ # Automake magic to handle the various tasks of building scripts.  Scripts can
+ # be built down to extensionless executables (e.g., foo.pl -> foo), or to 
+ # files with the usual extension (foo-lib.sh.in -> foo.sh).
+ #
+ # Files which support it are syntax-checked when the user invokes 'make check'.
+ #
+ # All *target* filenames must be listed in SCRIPTS_SHELL, SCRIPTS_PERL, and 
+ # SCRIPTS_AWK to support 'make check', 'make dist', and 'make distclean'.
+ #
+ # USAGE:
+ #
+ #   include $(top_srcdir)/config/automake/vars.am
+ #   include $(top_srcdir)/config/automake/scripts.am
+ #   ...
+ #   SCRIPTS_PERL = fooscript barscript perl-lib.pl perlmod.pm
+ #   SCRIPTS_SHELL = shell1 shell2 sh-lib.sh
+ #   SCRIPTS_AWK = talk balk chalk awk-lib.awk
+ #
+ # with the corresponding files in the repository:
+ #
+ #   fooscript.pl barscript.pl perl-lib.pl.in perlmod.pm.in
+ #   shell1.sh shell2.sh sh-lib.sh.in
+ #   talk.awk balk.awk chalk.awk awk-lib.awk.in
+ #
+ # by default, all shell and perl scripts are syntax checked.  If this is
+ # a problem (for example, perl scripts depending on Amanda extension 
+ # modules), then assign to CHECK_{PERL,SHELL} the list of files you wish
+ # to be checked (which can be empty).
+ #
+ # To add extra flags to the perl checks (e.g., to add new -I flags), set
+ # CHECK_PERL_FLAGS.
+ # Implementation note:
+ #
+ # This file uses config.status to substitute @foo@ in those scripts while
+ # converting them. It also adds the executable bits (a+x) to extensionless
+ # files.  The substitution works even though the files are not listed in 
+ # configure.in
+ # vim:ft=automake
+ #
+ # Adjust post-install permissions settings.  This rule works off two
+ # specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data. 
+ # Each is a whitespace-separated list of commands, all of which are either
+ # a variable assignment or a filename.  Three variables are available:
+ #
+ #  - dest= sets the destination directory to e.g., $(sbindir)
+ #  - chown= controls changes in ownership; value is first argument to chown
+ #  - chmod= controls changes in permissions; value is first argument to chmod
+ #
+ # As a special case, chown=amanda is taken as equivalent to 
+ # chown=$(BINARY_OWNER):$(SETUID_GROUP), which may otherwise have problems with
+ # whitespace in the user/group names.
+ # 
+ # when a filename is seen, the currently active variables are applied.
+ #
+ # Note that scripts are data, not executables!
+ #
+ # EXAMPLE
+ #
+ # sbin_PROGRAMS = foo bar bing
+ # libexec_PROGRAMS = pro gram
+ # sbin_SCRIPTS = sk ript
+ # INSTALLPERMS_exec = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             foo bar \
+ #     chmod=u+s,o-rwx \
+ #             bing
+ #     dest=$(libexecdir) chmod= \
+ #             $(libexec_PROGRAMS)
+ # INSTALLPERMS_data = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             $(sbin_SCRIPTS)
+ #
+ # This whole operation is not required when making builds for packaging,
+ # and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+ # AM_CONDITIONAL.
+ # vim:ft=automake
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -40,48 -162,134 +162,134 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
+ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/versuff.c.in \
+       $(top_srcdir)/config/automake/installperms.am \
+       $(top_srcdir)/config/automake/precompile.am \
+       $(top_srcdir)/config/automake/scripts.am \
+       $(top_srcdir)/config/automake/vars.am
+ @WANT_AMFLOCK_POSIX_TRUE@am__append_1 = amflock-posix.c
+ @WANT_AMFLOCK_FLOCK_TRUE@am__append_2 = amflock-flock.c
+ @WANT_AMFLOCK_LOCKF_TRUE@am__append_3 = amflock-lockf.c
+ @WANT_AMFLOCK_LNLOCK_TRUE@am__append_4 = amflock-lnlock.c
+ @WANT_RSH_SECURITY_TRUE@am__append_5 = rsh-security.c
+ @WANT_SSH_SECURITY_TRUE@am__append_6 = ssh-security.c
+ @WANT_BSD_SECURITY_TRUE@am__append_7 = bsd-security.c
+ @WANT_BSDTCP_SECURITY_TRUE@am__append_8 = bsdtcp-security.c
+ @WANT_BSDUDP_SECURITY_TRUE@am__append_9 = bsdudp-security.c
+ @WANT_KRB4_SECURITY_TRUE@am__append_10 = krb4-security.c      
+ @WANT_KRB5_SECURITY_TRUE@am__append_11 = krb5-security.c
  EXTRA_PROGRAMS = genversion$(EXEEXT) $(am__EXEEXT_1)
+ TESTS = amflock-test$(EXEEXT)
+ noinst_PROGRAMS = $(am__EXEEXT_2)
  subdir = common-src
- DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/versuff.c.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@@ -93,75 -301,110 +301,111 @@@ am__vpath_adj = case $$p in 
      *) f=$$p;; \
    esac;
  am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
- am__installdirs = "$(DESTDIR)$(libdir)"
- libLTLIBRARIES_INSTALL = $(INSTALL)
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libamanda_la_LIBADD =
- am_libamanda_la_OBJECTS = alloc.lo amfeatures.lo amflock.lo \
-       bsd-security.lo bsdtcp-security.lo bsdudp-security.lo clock.lo \
-       conffile.lo debug.lo dgram.lo error.lo event.lo file.lo \
-       fileheader.lo krb4-security.lo krb5-security.lo match.lo \
-       packet.lo pipespawn.lo protocol.lo rsh-security.lo security.lo \
-       security-util.lo sl.lo ssh-security.lo statfs.lo stream.lo \
-       tapelist.lo token.lo util.lo version.lo versuff.lo
- libamanda_la_OBJECTS = $(am_libamanda_la_OBJECTS)
- am__EXEEXT_1 = statfs$(EXEEXT) token$(EXEEXT) file$(EXEEXT) \
-       bsdsecurity$(EXEEXT) amfeatures$(EXEEXT)
+ am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" \
+       "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amlibexecdir)"
+ amlibLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(amlib_LTLIBRARIES)
+ libamanda_la_DEPENDENCIES = ../gnulib/libgnu.la
+ am__libamanda_la_SOURCES_DIST = alloc.c amfeatures.c amflock.c clock.c \
+       columnar.c conffile.c debug.c dgram.c event.c file.c \
+       fileheader.c glib-util.c match.c packet.c pipespawn.c \
+       protocol.c security.c security-util.c sl.c sockaddr-util.c \
+       stream.c tapelist.c timestamp.c token.c util.c versuff.c \
+       amflock-posix.c amflock-flock.c amflock-lockf.c \
+       amflock-lnlock.c rsh-security.c ssh-security.c bsd-security.c \
+       bsdtcp-security.c bsdudp-security.c krb4-security.c \
+       krb5-security.c local-security.c
+ @WANT_AMFLOCK_POSIX_TRUE@am__objects_1 = amflock-posix.lo
+ @WANT_AMFLOCK_FLOCK_TRUE@am__objects_2 = amflock-flock.lo
+ @WANT_AMFLOCK_LOCKF_TRUE@am__objects_3 = amflock-lockf.lo
+ @WANT_AMFLOCK_LNLOCK_TRUE@am__objects_4 = amflock-lnlock.lo
+ @WANT_RSH_SECURITY_TRUE@am__objects_5 = rsh-security.lo
+ @WANT_SSH_SECURITY_TRUE@am__objects_6 = ssh-security.lo
+ @WANT_BSD_SECURITY_TRUE@am__objects_7 = bsd-security.lo
+ @WANT_BSDTCP_SECURITY_TRUE@am__objects_8 = bsdtcp-security.lo
+ @WANT_BSDUDP_SECURITY_TRUE@am__objects_9 = bsdudp-security.lo
+ @WANT_KRB4_SECURITY_TRUE@am__objects_10 = krb4-security.lo
+ @WANT_KRB5_SECURITY_TRUE@am__objects_11 = krb5-security.lo
+ am_libamanda_la_OBJECTS = alloc.lo amfeatures.lo amflock.lo clock.lo \
+       columnar.lo conffile.lo debug.lo dgram.lo event.lo file.lo \
+       fileheader.lo glib-util.lo match.lo packet.lo pipespawn.lo \
+       protocol.lo security.lo security-util.lo sl.lo \
+       sockaddr-util.lo stream.lo tapelist.lo timestamp.lo token.lo \
+       util.lo versuff.lo $(am__objects_1) $(am__objects_2) \
+       $(am__objects_3) $(am__objects_4) $(am__objects_5) \
+       $(am__objects_6) $(am__objects_7) $(am__objects_8) \
+       $(am__objects_9) $(am__objects_10) $(am__objects_11) \
+       local-security.lo
+ nodist_libamanda_la_OBJECTS = version.lo
+ libamanda_la_OBJECTS = $(am_libamanda_la_OBJECTS) \
+       $(nodist_libamanda_la_OBJECTS)
+ libamanda_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(libamanda_la_LDFLAGS) $(LDFLAGS) -o $@
+ am__EXEEXT_1 = token$(EXEEXT) file$(EXEEXT) bsdsecurity$(EXEEXT) \
+       amfeatures$(EXEEXT)
+ am__EXEEXT_2 = amflock-test$(EXEEXT)
+ PROGRAMS = $(noinst_PROGRAMS)
  am_amfeatures_OBJECTS = amfeatures.test.$(OBJEXT)
  amfeatures_OBJECTS = $(am_amfeatures_OBJECTS)
- am__DEPENDENCIES_1 =
- am__DEPENDENCIES_2 = alloc.$(OBJEXT) clock.$(OBJEXT) debug.$(OBJEXT) \
      error.$(OBJEXT) util.$(OBJEXT) match.$(OBJEXT) sl.$(OBJEXT)
- am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) file.$(OBJEXT)
- amfeatures_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3)
+ amfeatures_DEPENDENCIES = $(libamanda_la_LIBADD) \
+       $(STANDARD_COMMON_STUFF)
am_amflock_test_OBJECTS = amflock-test.$(OBJEXT)
+ amflock_test_OBJECTS = $(am_amflock_test_OBJECTS)
+ amflock_test_DEPENDENCIES = libamanda.la
  am_bsdsecurity_OBJECTS = bsd-security.test.$(OBJEXT)
  bsdsecurity_OBJECTS = $(am_bsdsecurity_OBJECTS)
- bsdsecurity_DEPENDENCIES = alloc.$(OBJEXT) clock.$(OBJEXT) \
-       debug.$(OBJEXT) dgram.$(OBJEXT) error.$(OBJEXT) \
-       event.$(OBJEXT) file.$(OBJEXT) packet.$(OBJEXT) \
-       security.$(OBJEXT) ssh-security.$(OBJEXT) versuff.$(OBJEXT)
+ bsdsecurity_DEPENDENCIES = alloc.lo clock.lo debug.lo dgram.lo \
+       event.lo file.lo packet.lo security.lo ssh-security.lo \
+       versuff.lo
  am_file_OBJECTS = file.test.$(OBJEXT)
  file_OBJECTS = $(am_file_OBJECTS)
- file_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+ file_DEPENDENCIES = $(libamanda_la_LIBADD) \
+       $(STANDARD_COMMON_STUFF_NOT_FILE)
  am_genversion_OBJECTS = genversion.$(OBJEXT)
  genversion_OBJECTS = $(am_genversion_OBJECTS)
- genversion_DEPENDENCIES = $(am__DEPENDENCIES_1) versuff.lo
- am_statfs_OBJECTS = statfs.test.$(OBJEXT)
- statfs_OBJECTS = $(am_statfs_OBJECTS)
- statfs_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3)
+ genversion_DEPENDENCIES = $(libamanda_la_LIBADD) versuff.lo \
+       ../gnulib/libgnu.la
  am_token_OBJECTS = token.test.$(OBJEXT)
  token_OBJECTS = $(am_token_OBJECTS)
- token_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3)
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
+ token_DEPENDENCIES = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF)
+ amlibexecSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+ sbinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+ SCRIPTS = $(amlibexec_SCRIPTS) $(sbin_SCRIPTS)
+ DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
  am__depfiles_maybe = depfiles
  COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  CCLD = $(CC)
- LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
- SOURCES = $(libamanda_la_SOURCES) $(amfeatures_SOURCES) \
-       $(bsdsecurity_SOURCES) $(file_SOURCES) $(genversion_SOURCES) \
-       $(statfs_SOURCES) $(token_SOURCES)
- DIST_SOURCES = $(libamanda_la_SOURCES) $(amfeatures_SOURCES) \
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+ SOURCES = $(libamanda_la_SOURCES) $(nodist_libamanda_la_SOURCES) \
+       $(amfeatures_SOURCES) $(amflock_test_SOURCES) \
        $(bsdsecurity_SOURCES) $(file_SOURCES) $(genversion_SOURCES) \
-       $(statfs_SOURCES) $(token_SOURCES)
+       $(token_SOURCES)
+ DIST_SOURCES = $(am__libamanda_la_SOURCES_DIST) $(amfeatures_SOURCES) \
+       $(amflock_test_SOURCES) $(bsdsecurity_SOURCES) $(file_SOURCES) \
+       $(genversion_SOURCES) $(token_SOURCES)
+ amlibexecDATA_INSTALL = $(INSTALL_DATA)
+ DATA = $(amlibexec_DATA)
  HEADERS = $(noinst_HEADERS)
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -169,14 -412,19 +413,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -187,20 -435,19 +437,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -214,60 -461,169 +463,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -277,10 -633,24 +637,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -291,24 -661,58 +665,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -320,59 -724,46 +728,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -381,75 -772,86 +776,86 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUFFIXES = 
+ EXTRA_DIST = amanda-sh-lib.sh.in
+ BUILT_SOURCES = genversion.h version.c
+ MOSTLYCLEANFILES = 
+ # config.status leaves config.log files around
+ CLEANFILES = config.log *.test.c
+ # and we'll need to clean up our generated files for distclean
+ DISTCLEANFILES = $(SCRIPTS_SHELL) $(SCRIPTS_PERL) $(SCRIPTS_AWK) \
+       version.c genversion genversion.h
+ MAINTAINERCLEANFILES = 
+ # syntax-check shell scripts on 'make check'
+ CHECK_SHELL = $(SCRIPTS_SHELL)
+ # sed expression to strip leading directories from a filename; this converts e.g.,
+ # src/foo/bar.so to bar.so.
+ strip_leading_dirs = s|^.*/||
  INCLUDES = -I$(top_srcdir)/gnulib   
- lib_LTLIBRARIES = libamanda.la
- LINT = @AMLINT@
- LINTFLAGS = @AMLINTFLAGS@
- libamanda_la_SOURCES = \
-       alloc.c                 \
-       amfeatures.c            \
-       amflock.c               \
-       bsd-security.c          \
-       bsdtcp-security.c       \
-       bsdudp-security.c       \
-       clock.c                 \
-       conffile.c              \
-       debug.c                 \
-       dgram.c                 \
-       error.c                 \
-       event.c                 \
-       file.c                  \
-       fileheader.c            \
-       krb4-security.c         \
-       krb5-security.c         \
-       match.c                 \
-       packet.c                \
-       pipespawn.c             \
-       protocol.c              \
-       rsh-security.c          \
-       security.c              \
-       security-util.c         \
-       sl.c                    \
-       ssh-security.c          \
-       statfs.c                \
-       stream.c                \
-       tapelist.c              \
-       token.c                 \
-       util.c                  \
-       version.c               \
-       versuff.c
- #libamanda_la_LIBADD =        @LTLIBOBJS@
+ AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ amlib_LTLIBRARIES = libamanda.la
+ LINT = $(AMLINT)
+ LINTFLAGS = $(AMLINTFLAGS)
+ libamanda_la_SOURCES = alloc.c amfeatures.c amflock.c clock.c \
+       columnar.c conffile.c debug.c dgram.c event.c file.c \
+       fileheader.c glib-util.c match.c packet.c pipespawn.c \
+       protocol.c security.c security-util.c sl.c sockaddr-util.c \
+       stream.c tapelist.c timestamp.c token.c util.c versuff.c \
+       $(am__append_1) $(am__append_2) $(am__append_3) \
+       $(am__append_4) $(am__append_5) $(am__append_6) \
+       $(am__append_7) $(am__append_8) $(am__append_9) \
+       $(am__append_10) $(am__append_11) local-security.c
+ # version.c is generated; see below
+ nodist_libamanda_la_SOURCES = version.c
+ libamanda_la_LIBADD = \
+       ../gnulib/libgnu.la
  libamanda_la_LDFLAGS = -release $(VERSION)
  noinst_HEADERS = \
        amanda.h                \
        amfeatures.h            \
        arglist.h               \
        clock.h                 \
+       columnar.h              \
+       amflock.h               \
        conffile.h              \
+       debug.h                 \
        dgram.h                 \
        event.h                 \
+       file.h                  \
        fileheader.h            \
+       glib-util.h             \
        packet.h                \
        pipespawn.h             \
        protocol.h              \
        security.h              \
        security-util.h         \
        sl.h                    \
-       statfs.h                \
+       sockaddr-util.h         \
        stream.h                \
        tapelist.h              \
+       timestamp.h             \
        token.h                 \
        util.h                  \
        version.h
  
- genversion_SOURCES = genversion.c
- genversion_LDADD = $(libamanda_la_LIBADD) versuff.lo
+ # Version-building steps:
+ #
+ # 1. configure builds svn-info.h, if svn info is available; this
+ #    file is included in distribution tarballs
+ # 2. Makefile creates genversion.h with build-time information
+ # 3. Makefile builds genversion
+ # 4. Makefile runs genversion to create version.c
+ # 5. version.c is compiled into libamanda normally
+ genversion_SOURCES = genversion.c genversion.h svn-info.h
+ genversion_LDADD = $(libamanda_la_LIBADD)     \
+       versuff.lo                              \
+       ../gnulib/libgnu.la
  
  # these are used for testing only:
- TEST_PROGS = statfs token file bsdsecurity amfeatures
- CLEANFILES = *.test.c
- DISTCLEANFILES = version.c genversion.h genversion amanda-int.h
+ TEST_PROGS = token file bsdsecurity amfeatures
  
  # used for testing only
  STANDARD_COMMON_STUFF_NOT_FILE = \
-       alloc.$(OBJEXT) \
-       clock.$(OBJEXT) \
-       debug.$(OBJEXT) \
-       error.$(OBJEXT) \
-       util.$(OBJEXT) \
-       match.$(OBJEXT) \
-       sl.$(OBJEXT)
+       alloc.lo \
+       clock.lo \
+       debug.lo \
+       util.lo \
+       match.lo \
+       sl.lo
  
  STANDARD_COMMON_STUFF = \
        $(STANDARD_COMMON_STUFF_NOT_FILE) \
-       file.$(OBJEXT)
+       file.lo
  
- statfs_SOURCES = statfs.test.c
- statfs_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF)
  token_SOURCES = token.test.c
  token_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF)
  file_SOURCES = file.test.c
  file_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF_NOT_FILE)
  bsdsecurity_SOURCES = bsd-security.test.c
  bsdsecurity_LDADD = $(libamanda_a_LIBADD) \
-                   alloc.$(OBJEXT) \
-                   clock.$(OBJEXT) \
-                   debug.$(OBJEXT) \
-                   dgram.$(OBJEXT) \
-                   error.$(OBJEXT) \
-                   event.$(OBJEXT) \
-                   file.$(OBJEXT) \
-                   packet.$(OBJEXT) \
-                   security.$(OBJEXT) \
-                   ssh-security.$(OBJEXT) \
-                   versuff.$(OBJEXT)
+                   alloc.lo \
+                   clock.lo \
+                   debug.lo \
+                   dgram.lo \
+                   event.lo \
+                   file.lo \
+                   packet.lo \
+                   security.lo \
+                   ssh-security.lo \
+                   versuff.lo
  
  amfeatures_SOURCES = amfeatures.test.c
  amfeatures_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF)
- all: all-am
+ amflock_test_SOURCES = amflock-test.c
+ amflock_test_LDADD = libamanda.la
+ # scripts
+ # divide scripts up both by language and by destination directory.
+ sbin_SCRIPTS_PERL = \
+           amgpgcrypt \
+           amcryptsimple
+ sbin_SCRIPTS_SHELL = \
+           amcrypt \
+           amaespipe \
+           amcrypt-ossl \
+           amcrypt-ossl-asym
+ amlibexec_SCRIPTS_PERL = 
+ SCRIPTS_INCLUDE = \
+           amanda-sh-lib.sh
+ CHECK_PERL = $(sbin_SCRIPTS_PERL) $(amlibexec_SCRIPTS_PERL)
+ SCRIPTS_PERL = $(CHECK_PERL)
+ SCRIPTS_SHELL = $(sbin_SCRIPTS_SHELL) $(amlibexec_SCRIPTS_SHELL)
+ amlibexec_DATA = $(SCRIPTS_INCLUDE)
+ amlibexec_SCRIPTS = $(amlibexec_SCRIPTS_PERL) $(amlibexec_SCRIPTS_SHELL)
+ sbin_SCRIPTS = $(sbin_SCRIPTS_PERL) $(sbin_SCRIPTS_SHELL)
+ # installation
+ INSTALLPERMS_data = dest=$(sbindir) chown=amanda $(sbin_SCRIPTS) \
+                   dest=$(amlibexecdir) chown=amanda $(amlibexec_SCRIPTS) $(amlibexec_DATA)
+ all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
  
  .SUFFIXES:
  .SUFFIXES: .c .lo .o .obj
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -543,53 -984,98 +988,98 @@@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  versuff.c: $(top_builddir)/config.status $(srcdir)/versuff.c.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
            f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           echo " $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(amlibdir)/$$f'"; \
+           $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(amlibdir)/$$f"; \
          else :; fi; \
        done
  
- uninstall-libLTLIBRARIES:
+ uninstall-amlibLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(amlibdir)/$$p'"; \
+         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(amlibdir)/$$p"; \
        done
  
- clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ clean-amlibLTLIBRARIES:
+       -test -z "$(amlib_LTLIBRARIES)" || rm -f $(amlib_LTLIBRARIES)
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
          test "$$dir" != "$$p" || dir=.; \
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
  libamanda.la: $(libamanda_la_OBJECTS) $(libamanda_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libamanda_la_LDFLAGS) $(libamanda_la_OBJECTS) $(libamanda_la_LIBADD) $(LIBS)
+       $(libamanda_la_LINK) -rpath $(amlibdir) $(libamanda_la_OBJECTS) $(libamanda_la_LIBADD) $(LIBS)
+ clean-noinstPROGRAMS:
+       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         echo " rm -f $$p $$f"; \
+         rm -f $$p $$f ; \
+       done
  amfeatures$(EXEEXT): $(amfeatures_OBJECTS) $(amfeatures_DEPENDENCIES) 
        @rm -f amfeatures$(EXEEXT)
-       $(LINK) $(amfeatures_LDFLAGS) $(amfeatures_OBJECTS) $(amfeatures_LDADD) $(LIBS)
+       $(LINK) $(amfeatures_OBJECTS) $(amfeatures_LDADD) $(LIBS)
+ amflock-test$(EXEEXT): $(amflock_test_OBJECTS) $(amflock_test_DEPENDENCIES) 
+       @rm -f amflock-test$(EXEEXT)
+       $(LINK) $(amflock_test_OBJECTS) $(amflock_test_LDADD) $(LIBS)
  bsdsecurity$(EXEEXT): $(bsdsecurity_OBJECTS) $(bsdsecurity_DEPENDENCIES) 
        @rm -f bsdsecurity$(EXEEXT)
-       $(LINK) $(bsdsecurity_LDFLAGS) $(bsdsecurity_OBJECTS) $(bsdsecurity_LDADD) $(LIBS)
+       $(LINK) $(bsdsecurity_OBJECTS) $(bsdsecurity_LDADD) $(LIBS)
  file$(EXEEXT): $(file_OBJECTS) $(file_DEPENDENCIES) 
        @rm -f file$(EXEEXT)
-       $(LINK) $(file_LDFLAGS) $(file_OBJECTS) $(file_LDADD) $(LIBS)
+       $(LINK) $(file_OBJECTS) $(file_LDADD) $(LIBS)
  genversion$(EXEEXT): $(genversion_OBJECTS) $(genversion_DEPENDENCIES) 
        @rm -f genversion$(EXEEXT)
-       $(LINK) $(genversion_LDFLAGS) $(genversion_OBJECTS) $(genversion_LDADD) $(LIBS)
- statfs$(EXEEXT): $(statfs_OBJECTS) $(statfs_DEPENDENCIES) 
-       @rm -f statfs$(EXEEXT)
-       $(LINK) $(statfs_LDFLAGS) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS)
+       $(LINK) $(genversion_OBJECTS) $(genversion_LDADD) $(LIBS)
  token$(EXEEXT): $(token_OBJECTS) $(token_DEPENDENCIES) 
        @rm -f token$(EXEEXT)
-       $(LINK) $(token_LDFLAGS) $(token_OBJECTS) $(token_LDADD) $(LIBS)
+       $(LINK) $(token_OBJECTS) $(token_LDADD) $(LIBS)
+ install-amlibexecSCRIPTS: $(amlibexec_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_SCRIPTS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f $$d$$p; then \
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+           echo " $(amlibexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+           $(amlibexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(amlibexecdir)/$$f"; \
+         else :; fi; \
+       done
+ uninstall-amlibexecSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(amlibexec_SCRIPTS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
+       done
+ install-sbinSCRIPTS: $(sbin_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+       @list='$(sbin_SCRIPTS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f $$d$$p; then \
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+           echo " $(sbinSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
+           $(sbinSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(sbindir)/$$f"; \
+         else :; fi; \
+       done
+ uninstall-sbinSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(sbin_SCRIPTS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+         echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(sbindir)/$$f"; \
+       done
  
  mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@@ -600,23 -1086,30 +1090,30 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfeatures.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfeatures.test.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amflock-flock.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amflock-lnlock.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amflock-lockf.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amflock-posix.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amflock-test.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amflock.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd-security.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd-security.test.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsdtcp-security.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsdudp-security.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/columnar.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conffile.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgram.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.test.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileheader.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genversion.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glib-util.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krb4-security.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krb5-security.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local-security.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/match.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipespawn.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security-util.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sl.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockaddr-util.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh-security.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs.test.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tapelist.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timestamp.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/token.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/token.test.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versuff.Plo@am__quote@
  
  .c.o:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c $<
  
  .c.obj:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
  
  .c.lo:
- @am__fastdepCC_TRUE@  if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@@ -662,10 -1155,23 +1159,23 @@@ mostlyclean-libtool
  
  clean-libtool:
        -rm -rf .libs _libs
+ install-amlibexecDATA: $(amlibexec_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(amlibexecDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         $(amlibexecDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(amlibexecdir)/$$f"; \
+       done
  
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
+ uninstall-amlibexecDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(amlibexec_DATA)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
+       done
  
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@@ -715,23 -1221,95 +1225,95 @@@ GTAGS
  distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
- distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
+ check-TESTS: $(TESTS)
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[        ]'; \
+       srcdir=$(srcdir); export srcdir; \
+       list=' $(TESTS) '; \
+       if test -n "$$list"; then \
+         for tst in $$list; do \
+           if test -f ./$$tst; then dir=./; \
+           elif test -f $$tst; then dir=; \
+           else dir="$(srcdir)/"; fi; \
+           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *$$ws$$tst$$ws*) \
+               xpass=`expr $$xpass + 1`; \
+               failed=`expr $$failed + 1`; \
+               echo "XPASS: $$tst"; \
+             ;; \
+             *) \
+               echo "PASS: $$tst"; \
+             ;; \
+             esac; \
+           elif test $$? -ne 77; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *$$ws$$tst$$ws*) \
+               xfail=`expr $$xfail + 1`; \
+               echo "XFAIL: $$tst"; \
+             ;; \
+             *) \
+               failed=`expr $$failed + 1`; \
+               echo "FAIL: $$tst"; \
+             ;; \
+             esac; \
+           else \
+             skip=`expr $$skip + 1`; \
+             echo "SKIP: $$tst"; \
+           fi; \
+         done; \
+         if test "$$failed" -eq 0; then \
+           if test "$$xfail" -eq 0; then \
+             banner="All $$all tests passed"; \
+           else \
+             banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+           fi; \
          else \
-           dir=''; \
+           if test "$$xpass" -eq 0; then \
+             banner="$$failed of $$all tests failed"; \
+           else \
+             banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+           fi; \
+         fi; \
+         dashes="$$banner"; \
+         skipped=""; \
+         if test "$$skip" -ne 0; then \
+           skipped="($$skip tests were not run)"; \
+           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$skipped"; \
          fi; \
+         report=""; \
+         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+           report="Please report to $(PACKAGE_BUGREPORT)"; \
+           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$report"; \
+         fi; \
+         dashes=`echo "$$dashes" | sed s/./=/g`; \
+         echo "$$dashes"; \
+         echo "$$banner"; \
+         test -z "$$skipped" || echo "$$skipped"; \
+         test -z "$$report" || echo "$$report"; \
+         echo "$$dashes"; \
+         test "$$failed" -eq 0; \
+       else :; fi
+ distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
            || exit 1; \
          fi; \
        done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
  check-am: all-am
- check: check-am
- all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local
+ check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
+               $(HEADERS)
  installdirs:
-       for dir in "$(DESTDIR)$(libdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(amlibexecdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
- install: install-am
+ install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
  install-exec: install-exec-am
  install-data: install-data-am
  uninstall: uninstall-am
@@@ -764,6 -1349,7 +1353,7 @@@ install-strip
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
  
  clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@@ -775,16 -1361,20 +1365,20 @@@ distclean-generic
  maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ @WANT_INSTALLPERMS_FALSE@install-exec-hook:
+ @WANT_INSTALLPERMS_FALSE@install-data-hook:
  clean: clean-am
  
- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
-       mostlyclean-am
+ clean-am: clean-amlibLTLIBRARIES clean-generic clean-libtool \
+       clean-noinstPROGRAMS mostlyclean-am
  
  distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
  
  dvi: dvi-am
  
@@@ -796,14 -1386,27 +1390,27 @@@ info: info-a
  
  info-am:
  
- install-data-am:
+ install-data-am: install-amlibLTLIBRARIES
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
  
- install-exec-am: install-libLTLIBRARIES
+ install-dvi: install-dvi-am
+ install-exec-am: install-amlibexecDATA install-amlibexecSCRIPTS \
+       install-sbinSCRIPTS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+ install-html: install-html-am
  
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -824,43 -1427,177 +1431,177 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+ uninstall-am: uninstall-amlibLTLIBRARIES uninstall-amlibexecDATA \
+       uninstall-amlibexecSCRIPTS uninstall-sbinSCRIPTS
  
- .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libLTLIBRARIES clean-libtool ctags distclean \
+ .MAKE: install-am install-data-am install-exec-am install-strip
+ .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am check-local \
+       clean clean-amlibLTLIBRARIES clean-generic clean-libtool \
+       clean-noinstPROGRAMS ctags dist-hook distclean \
        distclean-compile distclean-generic distclean-libtool \
        distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-exec \
-       install-exec-am install-info install-info-am \
-       install-libLTLIBRARIES install-man install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-compile \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-info-am \
-       uninstall-libLTLIBRARIES
- .sh:
-       cat $< > $@
+       install install-am install-amlibLTLIBRARIES \
+       install-amlibexecDATA install-amlibexecSCRIPTS install-data \
+       install-data-am install-data-hook install-dvi install-dvi-am \
+       install-exec install-exec-am install-exec-hook install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-sbinSCRIPTS install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-amlibLTLIBRARIES \
+       uninstall-amlibexecDATA uninstall-amlibexecSCRIPTS \
+       uninstall-sbinSCRIPTS
+ # Perl
+ %: %.pl $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.pl: %.pl.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ %.pm: %.pm.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Shell
+ %: %.sh $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
        chmod a+x $@
  
- genversion.@OBJEXT@: genversion.h
+ %.sh: %.sh.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Awk
+ %: %.awk $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.awk: %.awk.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # syntax-check perl scripts on 'make check'
+ check-perl: $(CHECK_PERL)
+       @CHECK_PERL="$(CHECK_PERL)"; \
+       if test -n "$(PERL)"; then \
+               for perlobj in $$CHECK_PERL; do \
+                       $(PERL) $(CHECK_PERL_FLAGS) -c -w -T $$perlobj || exit 1; \
+               done; \
+       fi
+ check-local: check-perl
+ check-shell: $(CHECK_SHELL)
+       @CHECK_SHELL="$(CHECK_SHELL)"; \
+       if test -n "$$CHECK_SHELL"; then \
+               if test -n "$(BASH)"; then \
+                       for shobj in $$CHECK_SHELL; do \
+                               if $(BASH) -n $$shobj; then \
+                                       echo "$$shobj syntax OK"; \
+                               else \
+                                       echo "$$shobj syntax error"; \
+                                       exit 1; \
+                               fi; \
+                       done; \
+               else \
+                       echo "No 'bash' available -- cannot syntax-check shell scripts"; \
+               fi; \
+       fi
+ check-local: check-shell
+ # make sure that the sources for all shell and perl scripts get included
+ # in the distribution
+ dist-scripts:
+       SCRIPTS_PERL="$(SCRIPTS_PERL)"; SCRIPTS_SHELL="$(SCRIPTS_SHELL)"; SCRIPTS_AWK="$(SCRIPTS_AWK)"; \
+       for script in $$SCRIPTS_PERL; do \
+               test -f $(srcdir)/$${script}.pl && { cp -p $(srcdir)/$${script}.pl $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL; do \
+               test -f $(srcdir)/$${script}.sh && { cp -p $(srcdir)/$${script}.sh $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.awk && { cp -p $(srcdir)/$${script}.awk $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL $$SCRIPTS_PERL $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.in && { cp -p $(srcdir)/$${script}.in $(distdir)/ || exit 1; } \
+       done; \
+       true
+ dist-hook: dist-scripts
+ @WANT_INSTALLPERMS_TRUE@installperms-exec:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_exec)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on executables"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@installperms-data:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_data)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on data"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@install-exec-hook: installperms-exec
+ @WANT_INSTALLPERMS_TRUE@install-data-hook: installperms-data
+ # A rule to make precompiler output from C files.  This is not used during
+ # ordinary builds, but but can very useful in debugging problems on strange
+ # architectures.  With this rule, we can ask users to 'make foo.i' and send
+ # the result to us.
+ #
+ # It touches some automake internals ($COMPILE), but since it's not
+ # build-critical, that's OK.
+ %.i : %.c
+       $(COMPILE) -E -o $@ $<
  genversion.h: $(top_builddir)/config.status
        -rm -f $@ $@.new
        echo '#define CC "$(CC)"' > $@.new
        echo '#define BUILT_DATE "'`date`'"' >> $@.new
-       echo '#define BUILT_MACH "'`uname -a || echo UNKNOWN HOST`'"' >> $@.new
+       echo '#define BUILT_MACH "$(target)"' >> $@.new
        mv $@.new $@
  
- version.c:    genversion$(EXEEXT)
+ version.c: genversion$(EXEEXT)
        -rm -f version.c
-       ./genversion > version.c
+       ./genversion$(EXEEXT) > version.c
  
  lint:
        @echo $(LINT) $(libamanda_la_SOURCES)
-       @$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config $(INCLUDES) $(libamanda_la_SOURCES)
+       @$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $(libamanda_la_SOURCES)
        @echo $(LINT) $(genversion_SOURCES)
-       @$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config $(INCLUDES) $(genversion_SOURCES)
+       @$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $(genversion_SOURCES)
  
  listlibsrc:
        @ for p in $(libamanda_la_SOURCES) $(REGEXCSRC); do     \
diff --combined common-src/amanda.h
index 2858516b7e7df17c1619b07bad7b2d1337139c3b,9aa3d6a4fafb080c308680991033e40d1ff456ab..d03d8bc8605373b586ef0ad85c0a5c643562e803
  #ifndef AMANDA_H
  #define AMANDA_H
  
+ #include <glib.h>
+ #include <glib/gprintf.h>
+ #include "amflock.h"
  #ifdef HAVE_CONFIG_H
- #include "config.h"
+ /* use a relative path here to avoid conflicting with Perl's config.h. */
+ #include "../config/config.h"
  #endif
  
  /*
@@@ -54,6 -60,9 +60,9 @@@
  #  include <sys/types.h>
  #endif
  
+ /* gnulib creates this header locally if the system doesn't provide it */
+ #include <stdint.h>
  /*
   * I would prefer that each Amanda module include only those system headers
   * that are locally needed, but on most Unixes the system header files are not
  #  endif
  #endif
  
+ #ifdef ENABLE_NLS
+ #  include <libintl.h>
+ #  include <locale.h>
+ #  define  plural(String1, String2, Count)                            \
+               (((Count) == 1) ? (String1) : (String2))
+ #else
+ #  define plural(String1, String2, Count)                             \
+               (((Count) == 1) ? (String1) : (String2))
+ #  define setlocale(Which, Locale)
+ #  define textdomain(Domain)
+ #  define bindtextdomain(Package, Directory)
+ #  define gettext(String)                     String
+ #  define dgettext(Domain, String)            String
+ #  define dcgettext(Domain, String, Catagory) String
+ #  define ngettext(String1, String2, Count)                           \
+               plural((String1), (String2), (Count))
+ #  define dngettext(Domain, String1, String2, Count)                  \
+               plural((String1), (String2), (Count))
+ #  define dcngettext(Domain, String1, String2, Count, Catagory)               \
+               plural((String1), (String2), (Count))
+ #endif
+ #define T_(String)                    String
+ #ifndef SWIG /* TODO: make this go away */
+ #define _(String)                     dgettext("amanda", (String))
+ #endif
  #ifdef HAVE_FCNTL_H
  #  include <fcntl.h>
  #endif
@@@ -250,9 -285,12 +285,12 @@@ struct iovec 
  #  include <unistd.h>
  #endif
  
+ #ifdef HAVE_NETINET_IN_H
+ #  include <netinet/in.h>
+ #endif
  #include <ctype.h>
  #include <errno.h>
- #include <netinet/in.h>
  #include <pwd.h>
  #include <signal.h>
  #include <setjmp.h>
  #include <sys/resource.h>
  #include <sys/socket.h>
  
 +#if !defined(CONFIGURE_TEST)
 +#  include "amanda-int.h"
 +#endif
 +
  #ifdef HAVE_ARPA_INET_H
  #include <arpa/inet.h>
  #endif
  
- #ifndef HAVE_SOCKADDR_STORAGE
- #  define sockaddr_storage sockaddr_in
- #  define ss_family sin_family
+ #ifdef WORKING_IPV6
+ #define INET6
  #endif
  
  #ifndef INET_ADDRSTRLEN
  #define INET_ADDRSTRLEN 16
  #endif
  
 +/* Calculate the length of the data in a struct sockaddr_storage.
 + * THIS IS A HACK.
 + *
 + * To be truly portable, the length of an address should be passed
 + * in a companion variable.  When such lengths are available
 + * everywhere they are needed, this macro should be removed.
 + */
 +#ifdef WORKING_IPV6
 +# define SS_LEN(ss) (((struct sockaddr *)(ss))->sa_family==AF_INET6?sizeof(struct sockaddr_in6):sizeof(struct sockaddr_in))
 +#else
 +# define SS_LEN(ss) (sizeof(struct sockaddr_in))
 +#endif
 +
 +
 +/* AF_NATIVE is the "best" address family we support, backward compatible
 + * through to AF_INET.
 + */
 +#ifdef WORKING_IPV6
 +#define AF_NATIVE AF_INET6
 +#else
 +#define AF_NATIVE AF_INET
 +#endif
 +
 +/* SS_INIT(ss, family) initializes ss to all zeroes (as directed by RFC),
 + * and sets its ss_family as specified
 + */
 +#define SS_INIT(ss, family) do { \
 +    memset((ss), 0, sizeof(*(ss))); \
 +    (ss)->ss_family = (family); \
 +} while (0);
 +
 +/* SS_SET_INADDR_ANY(ss) sets ss to the family-appropriate equivalent of
 + * INADDR_ANY, a wildcard address and port.
 + */
 +#ifdef WORKING_IPV6
 +#define SS_SET_INADDR_ANY(ss) do { \
 +    switch ((ss)->ss_family) { \
 +        case AF_INET6: \
 +            ((struct sockaddr_in6 *)(ss))->sin6_flowinfo = 0; \
 +            ((struct sockaddr_in6 *)(ss))->sin6_addr = in6addr_any; \
 +            break; \
 +        case AF_INET: \
 +            ((struct sockaddr_in *)(ss))->sin_addr.s_addr = INADDR_ANY; \
 +            break; \
 +    } \
 +} while (0);
 +#else
 +#define SS_SET_INADDR_ANY(ss) do { \
 +    ((struct sockaddr_in *)(ss))->sin_addr.s_addr = INADDR_ANY; \
 +} while (0);
 +#endif
 +
 +/* Set/get the port in a sockaddr_storage that already has an family */
 +#ifdef WORKING_IPV6
 +#define SS_SET_PORT(ss, port) \
 +switch ((ss)->ss_family) { \
 +    case AF_INET: \
 +        ((struct sockaddr_in *)(ss))->sin_port = (in_port_t)htons((port)); \
 +        break; \
 +    case AF_INET6: \
 +        ((struct sockaddr_in6 *)(ss))->sin6_port = (in_port_t)htons((port)); \
 +        break; \
 +    default: assert(0); \
 +}
 +#else
 +#define SS_SET_PORT(ss, port) \
 +        ((struct sockaddr_in *)(ss))->sin_port = (in_port_t)htons((port));
 +#endif
 +
 +#ifdef WORKING_IPV6
 +#define SS_GET_PORT(ss) (ntohs( \
 +       (ss)->ss_family == AF_INET6? \
 +        ((struct sockaddr_in6 *)(ss))->sin6_port \
 +       :((struct sockaddr_in *)(ss))->sin_port))
 +#else
 +#define SS_GET_PORT(ss) (ntohs( \
 +        ((struct sockaddr_in *)(ss))->sin_port))
 +#endif
 +
 +/*
 + * The dbmalloc package comes from:
 + *
 + *  http://www.clark.net/pub/dickey/dbmalloc/dbmalloc.tar.gz
 + *
 + * or
 + *
 + *  ftp://gatekeeper.dec.com/pub/usenet/comp.sources.misc/volume32/dbmalloc/
 + *
 + * The following functions are sprinkled through the code, but are
 + * disabled unless USE_DBMALLOC is defined:
 + *
 + *  malloc_enter(char *) -- stack trace for malloc reports
 + *  malloc_leave(char *) -- stack trace for malloc reports
 + *  malloc_mark(void *) -- mark an area as never to be free-d
 + *  malloc_chain_check(void) -- check the malloc area now
 + *  malloc_dump(int fd) -- report the malloc contents to a file descriptor
 + *  malloc_list(int fd, ulong a, ulong b) -- report memory activated since
 + *    history stamp a that is still active as of stamp b (leak check)
 + *  malloc_inuse(ulong *h) -- create history stamp h and return the amount
 + *    of memory currently in use.
 + */
 +
 +#ifdef USE_DBMALLOC
 +#include "dbmalloc.h"
 +#else
 +#define       malloc_enter(func)              ((void)0)
 +#define       malloc_leave(func)              ((void)0)
 +#define       malloc_mark(ptr)                ((void)0)
 +#define       malloc_chain_check()            ((void)0)
 +#define       malloc_dump(fd)                 ((void)0)
 +#define       malloc_list(a,b,c)              ((void)0)
 +#define       malloc_inuse(hist)              (*(hist) = 0, 0)
 +#define       dbmalloc_caller_loc(x,y)        (x)
 +#endif
 +
  #if !defined(HAVE_SIGACTION) && defined(HAVE_SIGVEC)
  /* quick'n'dirty hack for NextStep31 */
  #  define sa_flags sv_flags
@@@ -457,76 -375,6 +494,76 @@@ extern int errno
  #define stringize(x) #x
  #define stringconcat(x, y) x ## y
  
 +/*
 + * So that we can use GNUC attributes (such as to get -Wall warnings
 + * for printf-like functions).  Only do this in gcc 2.7 or later ...
 + * it may work on earlier stuff, but why chance it.
 + */
 +#if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || defined(S_SPLINT_S) || defined(LINT) || defined(__lint)
 +#undef __attribute__
 +#define __attribute__(__x)
 +#endif
 +
 +/*
 + * assertions, but call error() instead of abort 
 + */
 +#ifndef ASSERTIONS
 +
 +#define assert(exp) ((void)0)
 +
 +#else /* ASSERTIONS */
 +
 +#define assert(exp)   do {                                            \
 +    if (!(exp)) {                                                     \
 +      onerror(abort);                                                 \
 +      error("assert: %s false, file %s, line %d",                     \
 +         stringize(exp), __FILE__, __LINE__);                         \
 +        /*NOTREACHED*/                                                        \
 +    }                                                                 \
 +} while (0)
 +
 +#endif        /* ASSERTIONS */
 +
 +/*
 + * print debug output, else compile to nothing.
 + */
 +
 +#ifdef DEBUG_CODE                                                     /* { */
 +#   define dbopen(a)  debug_open(a)
 +#   define dbreopen(a,b) debug_reopen(a,b)
 +#   define dbrename(a,b) debug_rename(a,b)
 +#   define dbclose()  debug_close()
 +#   define dbprintf(p)        (debug_printf p)
 +#   define dbfd()     debug_fd()
 +#   define dbfp()     debug_fp()
 +#   define dbfn()     debug_fn()
 +
 +extern void debug_open(char *subdir);
 +extern void debug_reopen(char *file, char *notation);
 +extern void debug_rename(char *config, char *subdir);
 +extern void debug_close(void);
 +extern void debug_printf(const char *format, ...)
 +    __attribute__ ((format (printf, 1, 2)));
 +extern int  debug_fd(void);
 +extern FILE *  debug_fp(void);
 +extern char *  debug_fn(void);
 +extern void set_debug_prefix_pid(pid_t);
 +extern char *debug_prefix(char *);
 +extern char *debug_prefix_time(char *);
 +#else                                                                 /* }{ */
 +#   define dbopen(a)
 +#   define dbreopen(a,b)
 +#   define dbrename(a,b)
 +#   define dbclose()
 +#   define dbprintf(p)
 +#   define dbfd()     (-1)
 +#   define dbfp()     NULL
 +#   define dbfn()     NULL
 +#   define set_debug_prefix_pid(x)
 +#   define debug_prefix(x) get_pname()
 +#   define debug_prefix_time(x) get_pname()
 +#endif                                                                        /* } */
 +
  /* amanda #days calculation, with roundoff */
  
  #define SECS_PER_DAY  (24*60*60)
  #define MAX_TAPE_LABEL_BUF (MAX_TAPE_LABEL_LEN+1)
  #define MAX_TAPE_LABEL_FMT "%10240s"
  
- /* Define miscellaneous amanda functions.  */
- #define ERR_INTERACTIVE       1
- #define ERR_SYSLOG    2
- #define ERR_AMANDALOG 4
- extern void   set_logerror(void (*f)(char *));
- extern void   set_pname(char *pname);
- extern char  *get_pname(void);
- extern int    erroutput_type;
- extern void   error(const char *format, ...)
-     __attribute__ ((format (printf, 1, 2), noreturn));
- extern void   errordump(const char *format, ...)
-     __attribute__ ((format (printf, 1, 2), noreturn));
- extern int    onerror(void (*errf)(void));
- extern void *debug_alloc      (const char *c, int l, size_t size);
- extern void *debug_newalloc   (const char *c, int l, void *old, size_t size);
- extern char *debug_stralloc   (const char *c, int l, const char *str);
- extern char *debug_newstralloc(const char *c, int l, char *oldstr,
-                              const char *newstr);
- extern const char *debug_caller_loc (const char *file, int line);
- extern int debug_alloc_push (char *file, int line);
- extern void debug_alloc_pop (void);
+ /* Unfortunately, the system-level sockaddr_storage definition can lead to
+  * C aliasing errors (where the optimizer doesn't notice that two operations
+  * affect the same datum).  We define our own similar type as a union.
+  */
+ typedef union sockaddr_union {
+     struct sockaddr         sa;
+     struct sockaddr_in      sin;
+ #ifdef WORKING_IPV6
+     struct sockaddr_in6     sin6;
+ #endif
+ #ifdef HAVE_SOCKADDR_STORAGE
+     struct sockaddr_storage ss;       /* not used; just here to make the union full-size */
+ #endif
+ } sockaddr_union;
+ #include "debug.h"
+ #include "file.h"
+ void *debug_alloc(const char *file, int line, size_t size);
+ void *debug_newalloc(const char *file, int line, void *old, size_t size);
+ char *debug_stralloc(const char *file, int line, const char *str);
+ char *debug_newstralloc(const char *file, int line,
+               char *oldstr, const char *newstr);
+ char *debug_vstralloc(const char *file, int line, const char *str, ...);
+ char *debug_newvstralloc(const char *file, int line,
+               char *oldstr, const char *str, ...);
+ char *debug_vstrallocf(const char *file, int line, const char *fmt,
+               ...) G_GNUC_PRINTF(3, 4);
+ char *debug_newvstrallocf(const char *file, int line, char *oldstr,
+               const char *fmt, ...) G_GNUC_PRINTF(4, 5);
+ /* Usage: vstrextend(foo, "bar, "baz", NULL). Extends the existing 
+  * string, or allocates a brand new one. */
+ char *debug_vstrextend(const char *file, int line, char **oldstr, ...);
  
  #define       alloc(s)                debug_alloc(__FILE__, __LINE__, (s))
  #define       newalloc(p,s)           debug_newalloc(__FILE__, __LINE__, (p), (s))
  #define       stralloc(s)             debug_stralloc(__FILE__, __LINE__, (s))
  #define       newstralloc(p,s)        debug_newstralloc(__FILE__, __LINE__, (p), (s))
+ #define vstralloc(...)                debug_vstralloc(__FILE__,__LINE__,__VA_ARGS__)
+ #define newvstralloc(...)     debug_newvstralloc(__FILE__,__LINE__,__VA_ARGS__)
+ #define vstrallocf(...)               debug_vstrallocf(__FILE__,__LINE__,__VA_ARGS__)
+ #define newvstrallocf(...)    debug_newvstrallocf(__FILE__,__LINE__,__VA_ARGS__)
+ #define vstrextend(...)               debug_vstrextend(__FILE__,__LINE__,__VA_ARGS__)
  
- /*
-  * Voodoo time.  We want to be able to mark these calls with the source
-  * line, but CPP does not handle variable argument lists so we cannot
-  * do what we did above (e.g. for alloc()).
-  *
-  * What we do is call a function to save the file and line number
-  * and have it return "false".  That triggers the "?" operator to
-  * the right side of the ":" which is a call to the debug version of
-  * vstralloc/newvstralloc but without parameters.  The compiler gets
-  * those from the next input tokens:
-  *
-  *  xx = vstralloc(a,b,NULL);
-  *
-  * becomes:
-  *
-  *  xx = debug_alloc_push(__FILE__,__LINE__)?0:debug_vstralloc(a,b,NULL);
-  *
-  * This works as long as vstralloc/newvstralloc are not part of anything
-  * very complicated.  Assignment is fine, as is an argument to another
-  * function (but you should not do that because it creates a memory leak).
-  * This will not work in arithmetic or comparison, but it is unlikely
-  * they are used like that.
-  *
-  *  xx = vstralloc(a,b,NULL);                 OK
-  *  return vstralloc(j,k,NULL);                       OK
-  *  sub(a, vstralloc(g,h,NULL), z);           OK, but a leak
-  *  if(vstralloc(s,t,NULL) == NULL) { ...     NO, but unneeded
-  *  xx = vstralloc(x,y,NULL) + 13;            NO, but why do it?
-  */
- #define vstralloc debug_alloc_push(__FILE__,__LINE__)?0:debug_vstralloc
- #define newvstralloc debug_alloc_push(__FILE__,__LINE__)?0:debug_newvstralloc
- #define vstrallocf debug_alloc_push(__FILE__,__LINE__)?0:debug_vstrallocf
- extern char  *debug_vstralloc(const char *str, ...);
- extern char  *debug_newvstralloc(char *oldstr, const char *newstr, ...);
- extern char  *debug_vstrallocf(const char *fmt, ...)
-                              __attribute__ ((format (printf, 1, 2)));
+ #define       stralloc2(s1,s2)        vstralloc((s1),(s2),NULL)
+ #define       newstralloc2(p,s1,s2)   newvstralloc((p),(s1),(s2),NULL)
  
- #define       stralloc2(s1,s2)      vstralloc((s1),(s2),NULL)
- #define       newstralloc2(p,s1,s2) newvstralloc((p),(s1),(s2),NULL)
+ #define vstrallocf(...)         debug_vstrallocf(__FILE__,__LINE__,__VA_ARGS__)
  
- /* Usage: vstrextend(foo, "bar, "baz", NULL). Extends the existing 
-  * string, or allocates a brand new one. */
- extern char *vstrextend(char **oldstr, ...);
- extern /*@only@*/ /*@null@*/ char *debug_agets(const char *c, int l, FILE *file);
- extern /*@only@*/ /*@null@*/ char *debug_areads(const char *c, int l, int fd);
+ /*@only@*/ /*@null@*/ char *debug_agets(const char *file, int line, FILE *f);
+ /*@only@*/ /*@null@*/ char *debug_areads(const char *file, int line, int fd);
  #define agets(f)            debug_agets(__FILE__,__LINE__,(f))
  #define areads(f)           debug_areads(__FILE__,__LINE__,(f))
  
@@@ -664,14 -487,8 +676,8 @@@ extern int debug_amtable_alloc(const ch
                                                     (b),             \
                                                     (f))
  
- extern void amtable_free(void **table, size_t *current);
- extern uid_t  client_uid;
- extern gid_t  client_gid;
+ extern void amtable_free(void **, size_t *);
  
- void  safe_fd(int fd_start, int fd_count);
- void  safe_cd(void);
- void  save_core(void);
  char **       safe_env(void);
  char *        validate_regexp(const char *regex);
  char *        validate_glob(const char *glob);
@@@ -686,8 -503,6 +692,6 @@@ int        match_disk(const char *glob, const 
  int   match_datestamp(const char *dateexp, const char *datestamp);
  int   match_level(const char *levelexp, const char *level);
  time_t        unctime(char *timestr);
- ssize_t       areads_dataready(int fd);
- void  areads_relbuf(int fd);
  
  /*
   * amfree(ptr) -- if allocated, release space and set ptr to NULL.
      (s1) = t_t_t;                                                     \
  } while(0)
  
- /*
-  * "Safe" close macros.  Close the object then set it to a value that
-  * will cause an error if referenced.
-  *
-  * aclose(fd) -- close a file descriptor and set it to -1.
-  * afclose(f) -- close a stdio file and set it to NULL.
-  * apclose(p) -- close a stdio pipe file and set it to NULL.
-  *
-  * Note: be careful not to do the following:
-  *
-  *  for(fd = low; fd < high; fd++) {
-  *      aclose(fd);
-  *  }
-  *
-  * Since aclose() sets the argument to -1, this will loop forever.
-  * Just copy fd to a temp variable and use that with aclose().
-  *
-  * Aclose() interacts with areads() to inform it to release any buffer
-  * it has outstanding on the file descriptor.
-  */
- #define aclose(fd) do {                                                       \
-     if((fd) >= 0) {                                                   \
-       close(fd);                                                      \
-       areads_relbuf(fd);                                              \
-     }                                                                 \
-     (fd) = -1;                                                                \
-     (void)(fd);  /* Fix value never used warning at end of routines */ \
- } while(0)
- #define afclose(f) do {                                                       \
-     if((f) != NULL) {                                                 \
-       fclose(f);                                                      \
-       (f) = NULL;                                                     \
-       (void)(f);  /* Fix value never used warning at end of routines */ \
-     }                                                                 \
- } while(0)
- #define apclose(p) do {                                                       \
-     if((p) != NULL) {                                                 \
-       pclose(p);                                                      \
-       (p) = NULL;                                                     \
-       (void)(p);  /* Fix value never used warning at end of routines */ \
-     }                                                                 \
- } while(0)
  /*
   * Return the number of elements in an array.
   */
  #define       NUM_STR_SIZE    128             /* a generic number buffer size */
  
  #define       skip_whitespace(ptr,c) do {                                     \
-     while((c) != '\n' && isspace(c)) (c) = *(ptr)++;                  \
+     while((c) != '\n' && isspace((int)c)) (c) = *(ptr)++;             \
  } while(0)
  
  #define       skip_non_whitespace(ptr,c) do {                                 \
-     while((c) != '\0' && !isspace(c)) (c) = *(ptr)++;                 \
+     while((c) != '\0' && !isspace((int)c)) (c) = *(ptr)++;            \
  } while(0)
  
  #define       skip_non_whitespace_cs(ptr,c) do {                              \
-     while((c) != '\0' && (c) != '#' && !isspace(c)) (c) = *(ptr)++;   \
+     while((c) != '\0' && (c) != '#' && !isspace((int)c)) (c) = *(ptr)++;\
  } while(0)
  
  #define       skip_non_integer(ptr,c) do {                                    \
  
  #define skip_quoted_string(ptr, c) do {                                       \
      int       iq = 0;                                                         \
-     while (((c) != '\0') && !((iq == 0) && isspace(c))) {             \
+     while (((c) != '\0') && !((iq == 0) && isspace((int)c))) {                \
        if ((c) == '"') {                                               \
            iq = !iq;                                                   \
        } else if (((c) == '\\') && (*(ptr) == '"')) {                  \
  
  #define       copy_string(ptr,c,f,l,fp) do {                                  \
      (fp) = (f);                                                               \
-     while((c) != '\0' && !isspace(c)) {                                       \
+     while((c) != '\0' && !isspace((int)c)) {                          \
        if((fp) >= (f) + (l) - 1) {                                     \
            *(fp) = '\0';                                               \
            (fp) = NULL;                                                \
  
  #define       copy_string_cs(ptr,c,f,l,fp) do {                               \
      (fp) = (f);                                                               \
-     while((c) != '\0' && (c) != '#' && !isspace(c)) {                 \
+     while((c) != '\0' && (c) != '#' && !isspace((int)c)) {            \
        if((fp) >= (f) + (l) - 1) {                                     \
            *(fp) = '\0';                                               \
            (fp) = NULL;                                                \
                 ((ptr)+=sizeof((cnst))-1, (var)=(ptr)[-1], 0)          \
                :1)
  
- /* from amflock.c */
- extern int    amflock(int fd, char *resource);
- extern int    amroflock(int fd, char *resource);
- extern int    amfunlock(int fd, char *resource);
- /* from file.c */
- extern int    mkpdir(char *file, mode_t mode, uid_t uid, gid_t gid);
- extern int    rmpdir(char *file, char *topdir);
- extern char  *sanitise_filename(char *inp);
- extern char  *old_sanitise_filename(char *inp);
  /* from old bsd-security.c */
  extern int debug;
- extern int check_security(struct sockaddr_storage *, char *, unsigned long, char **);
+ extern int check_security(sockaddr_union *, char *, unsigned long, char **);
  
  /*
   * Handle functions which are not always declared on all systems.  This
  
  /* AIX #defines accept, and provides a prototype for the alternate name */
  #if !defined(HAVE_ACCEPT_DECL) && !defined(accept)
- extern int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
+ extern int accept(int s, struct sockaddr *addr, socklen_t_equiv *addrlen);
  #endif
  
  #ifndef HAVE_ATOF_DECL
@@@ -988,7 -746,7 +935,7 @@@ extern void bcopy(const void *s1, void 
  #endif
  
  #ifndef HAVE_BIND_DECL
- extern int bind(int s, const struct sockaddr *name, socklen_t namelen);
+ extern int bind(int s, const struct sockaddr *name, socklen_t_equiv namelen);
  #endif
  
  #ifndef HAVE_BZERO
@@@ -1004,34 -762,7 +951,7 @@@ extern void closelog(void)
  #endif
  
  #ifndef HAVE_CONNECT_DECL
- extern int connect(int s, struct sockaddr *name, socklen_t namelen);
- #endif
- #if !defined(TEXTDB) && !defined(HAVE_DBM_OPEN_DECL)
- #undef   DBM_INSERT
- #define  DBM_INSERT  0
- #undef   DBM_REPLACE
- #define  DBM_REPLACE 1
-     typedef struct {
-       int dummy[10];
-     } DBM;
- #ifndef HAVE_STRUCT_DATUM
-     typedef struct {
-       char    *dptr;
-       int     dsize;
-     } datum;
- #endif
-     extern DBM   *dbm_open(char *file, int flags, int mode);
-     extern void   dbm_close(DBM *db);
-     extern datum  dbm_fetch(DBM *db, datum key);
-     extern datum  dbm_firstkey(DBM *db);
-     extern datum  dbm_nextkey(DBM *db);
-     extern int    dbm_delete(DBM *db, datum key);
-     extern int    dbm_store(DBM *db, datum key, datum content, int flg);
+ extern int connect(int s, struct sockaddr *name, socklen_t_equiv namelen);
  #endif
  
  #ifndef HAVE_FCLOSE_DECL
@@@ -1078,25 -809,17 +998,17 @@@ extern int getopt(int argc, char * cons
  
  /* AIX #defines getpeername, and provides a prototype for the alternate name */
  #if !defined(HAVE_GETPEERNAME_DECL) && !defined(getpeername)
- extern int getpeername(int s, struct sockaddr *name, socklen_t *namelen);
+ extern int getpeername(int s, struct sockaddr *name, socklen_t_equiv *namelen);
  #endif
  
  /* AIX #defines getsockname, and provides a prototype for the alternate name */
  #if !defined(HAVE_GETSOCKNAME_DECL) && !defined(getsockname)
- extern int getsockname(int s, struct sockaddr *name, socklen_t *namelen);
+ extern int getsockname(int s, struct sockaddr *name, socklen_t_equiv *namelen);
  #endif
  
  #ifndef HAVE_GETSOCKOPT_DECL
  extern int getsockopt(int s, int level, int optname, char *optval,
-                        socklen_t *optlen);
- #endif
- #ifndef HAVE_GETTIMEOFDAY_DECL
- # ifdef HAVE_TWO_ARG_GETTIMEOFDAY
- extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
- # else
- extern int gettimeofday(struct timeval *tp);
- # endif
+                        socklen_t_equiv *optlen);
  #endif
  
  #ifndef HAVE_INITGROUPS
@@@ -1184,7 -907,7 +1096,7 @@@ extern void *realloc(void *ptr, size_t 
  /* AIX #defines recvfrom, and provides a prototype for the alternate name */
  #if !defined(HAVE_RECVFROM_DECL) && !defined(recvfrom)
  extern int recvfrom(int s, char *buf, int len, int flags,
-                      struct sockaddr *from, socklen_t *fromlen);
+                      struct sockaddr *from, socklen_t_equiv *fromlen);
  #endif
  
  #ifndef HAVE_REMOVE_DECL
@@@ -1279,7 -1002,7 +1191,7 @@@ extern int shmget(key_t key, size_t siz
  #ifndef HAVE_SNPRINTF_DECL
  #include "arglist.h"
  int snprintf(char *buf, size_t len, const char *format,...)
-                   __attribute__((format(printf,3,4)));
+      G_GNUC_PRINTF(3,4);
  #endif
  #ifndef HAVE_VSNPRINTF_DECL
  #include "arglist.h"
@@@ -1317,7 -1040,7 +1229,7 @@@ extern int strncasecmp(const char *s1, 
  
  #ifndef HAVE_SYSLOG_DECL
  extern void syslog(int priority, const char *logstring, ...)
-     __attribute__ ((format (printf, 2, 3)));
+      G_GNUC_PRINTF(2,3);
  #endif
  
  #ifndef HAVE_SYSTEM_DECL
@@@ -1350,11 -1073,9 +1262,9 @@@ extern int vfprintf(FILE *stream, cons
  extern int vprintf(const char *format, va_list ap);
  #endif
  
- /* GNULIB include */
- #ifndef CONFIGURE_TEST
+ /* gnulib-only includes (hence "" instead of <>) */
  #include "getaddrinfo.h"
  #include "inet_ntop.h"
- #endif
  
  #if !defined(S_ISCHR) && defined(_S_IFCHR) && defined(_S_IFMT)
  #define S_ISCHR(mode) (((mode) & _S_IFMT) == _S_IFCHR)
@@@ -1398,15 -1119,11 +1308,11 @@@ extern ssize_t writev(int fd, const str
  #endif
  
  #if SIZEOF_SIZE_T == SIZEOF_INT
- #  define        SIZE_T_FMT   "%u"
- #  define        SIZE_T_FMT_TYPE unsigned
  #  define        SIZE_T_ATOI  (size_t)atoi
  #  ifndef SIZE_MAX
- #    define      SIZE_MAX     UINT_MAX
+ #    define      SIZE_MAX     G_MAXUINT
  #  endif
  #else
- #  define        SIZE_T_FMT   "%lu"
- #  define        SIZE_T_FMT_TYPE unsigned long
  #  define        SIZE_T_ATOI  (size_t)atol
  #  ifndef SIZE_MAX
  #    define      SIZE_MAX     ULONG_MAX
  #endif
  
  #if SIZEOF_SSIZE_T == SIZEOF_INT
- #  define        SSIZE_T_FMT  "%d"
- #  define        SSIZE_T_FMT_TYPE int
  #  define        SSIZE_T_ATOI (ssize_t)atoi
  #  ifndef SSIZE_MAX
  #    define      SSIZE_MAX    INT_MAX
  #    define      SSIZE_MIN    INT_MIN
  #  endif
  #else
- #  define        SSIZE_T_FMT  "%ld"
- #  define        SSIZE_T_FMT_TYPE long
  #  define        SSIZE_T_ATOI (ssize_t)atol
  #  ifndef SSIZE_MAX
  #    define      SSIZE_MAX    LONG_MAX
  #endif
  
  #if SIZEOF_TIME_T == SIZEOF_INT
- #  define        TIME_T_FMT   "%u"
- #  define        TIME_T_FMT_TYPE unsigned
  #  define        TIME_T_ATOI  (time_t)atoi
  #  ifndef TIME_MAX
- #    define      TIME_MAX     UINT_MAX
+ #    define      TIME_MAX     G_MAXUINT
  #  endif
  #else
- #  define        TIME_T_FMT   "%lu"
- #  define        TIME_T_FMT_TYPE unsigned long
  #  define        TIME_T_ATOI  (time_t)atol
  #  ifndef TIME_MAX
  #    define      TIME_MAX     ULONG_MAX
  #endif
  
  #if SIZEOF_OFF_T > SIZEOF_LONG
- #  define        OFF_T_FMT       LL_FMT
- #  define        OFF_T_RFMT      LL_RFMT
- #  define        OFF_T_FMT_TYPE  long long
  #  ifdef HAVE_ATOLL
- #    define      OFF_T_ATOI    (off_t)atoll
+ #    define        OFF_T_ATOI  (off_t)atoll
  #  else
- #    define      OFF_T_ATOI      (off_t)atol
+ #    define        OFF_T_ATOI  (off_t)atol
  #  endif
  #  ifdef HAVE_STRTOLL
- #    define      OFF_T_STRTOL  (off_t)strtoll
+ #    define        OFF_T_STRTOL        (off_t)strtoll
  #  else
- #    define      OFF_T_STRTOL      (off_t)strtol
+ #    define        OFF_T_STRTOL        (off_t)strtol
  #  endif
  #else
  #  if SIZEOF_OFF_T == SIZEOF_LONG
- #    define        OFF_T_FMT       "%ld"
- #    define        OFF_T_RFMT      "ld"
- #    define        OFF_T_FMT_TYPE  long
  #    define        OFF_T_ATOI  (off_t)atol
  #    define        OFF_T_STRTOL        (off_t)strtol
  #  else
- #    define        OFF_T_FMT       "%d"
- #    define        OFF_T_RFMT      "d"
- #    define        OFF_T_FMT_TYPE  int
  #    define        OFF_T_ATOI  (off_t)atoi
  #    define        OFF_T_STRTOL        (off_t)strtol
  #  endif
  #  else
  #    define AM64_MIN (off_t)(-9223372036854775807LL -1LL)
  #  endif
- #  define AM64_FMT OFF_T_FMT
  #else
  #if SIZEOF_LONG == 8
  #  ifdef LONG_MAX
  #  else
  #    define AM64_MIN (off_t)(-9223372036854775807L -1L)
  #  endif
- #  define AM64_FMT "%ld"
  #else
  #if SIZEOF_LONG_LONG == 8
  #  ifdef LONG_LONG_MAX
  #  else
  #    define AM64_MIN (off_t)(-9223372036854775807LL -1LL)
  #  endif
- #  define AM64_FMT LL_FMT
  #else
  #if SIZEOF_INTMAX_T == 8
  #  ifdef INTMAX_MAX
  #  else
  #    define AM64_MIN (off_t)(-9223372036854775807LL -1LL)
  #  endif
- #  define AM64_FMT LL_FMT
  #else  /* no 64 bits type found, use long. */
  #  ifdef LONG_MAX
  #    define AM64_MAX (off_t)(LONG_MAX)
  #  else
  #    define AM64_MIN (off_t)(-2147483647 -1)
  #  endif
- #  define AM64_FMT "%ld"
  #endif
  #endif
  #endif
  #endif
  
- #ifdef HAVE_LIBREADLINE
- #  ifdef HAVE_READLINE_READLINE_H
- #    include <readline/readline.h>
- #    ifdef HAVE_READLINE_HISTORY_H
- #      include <readline/history.h>
- #    endif
- #  else
- #    ifdef HAVE_READLINE_H
- #      include <readline.h>
- #      ifdef HAVE_HISTORY_H
- #        include <history.h>
- #      endif
- #    else
- #      undef HAVE_LIBREADLINE
- #    endif
- #  endif
- #else
- char *        readline(const char *prompt);
- void  add_history(const char *line);
- #endif
  #define BIND_CYCLE_RETRIES    120             /* Total of 30 minutes */
  
- #define DBG_SUBDIR_SERVER  "server"
- #define DBG_SUBDIR_CLIENT  "client"
- #define DBG_SUBDIR_AMANDAD "amandad"
  #define MAX_DUMPERS 63
  
  #ifndef NI_MAXHOST
  #define NI_MAXHOST 1025
  #endif
  
- #define _(x) x
- #ifndef AI_V4MAPPED
- #define AI_V4MAPPED 0
- #endif
- #ifndef AI_ALL
- #define AI_ALL 0
- #endif
+ typedef enum {
+     KENCRYPT_NONE,    /* krb5 encryption not enabled */
+     KENCRYPT_WILL_DO, /* krb5 encryption will be enabled once amanda
+                          protocol stream is closed */
+     KENCRYPT_YES      /* krb5 encryption enabled on all stream */
+ } kencrypt_type;
  
  #endif        /* !AMANDA_H */
diff --combined common-src/amflock.c
index cc1cd4e46550ed2e32077a04975f45edf49ff42b,c10599683681a8068ff14bfab5a4f1bcd5fa4c3e..2b012e360ec3afc9848196a3675c7bbca34ebe6f
@@@ -24,7 -24,7 +24,7 @@@
   * file named AUTHORS, in the root directory of this distribution.
   */
  /*
-  * $Id: amflock.c,v 1.28 2006/05/25 01:47:11 johnfranks Exp $
+  * $Id: amflock.c 7161 2007-07-03 16:27:26Z dustin $
   *
   * file locking routines, put here to hide the system dependant stuff
   * from the rest of the code
  **                       blocking file locks as used by Amanda.
  **     USE_LNLOCK      - Home brew exclusive, blocking file lock.
  **     <none>          - No locking available.  User beware!
- ** - "configure" compiles this with -DCONFIGURE_TEST to try and determine
- **   whether a particular type of locking works.
  */
  
+ /* FIXME: This code has several limitations to be fixed:
+  * - It should be possible to select a locking mode (or detect the
+  *   best mode for a particular filesystem) at runtime.
+  * - There should be a locking mode that works with NFS filesystems.
+  * - Semantics should be clear when different parts of a single 
+  *   process (possibly in the same/different threads) both try to lock 
+  *   the same file (but with different file descriptors).
+  * - It should be possible to promote a read-only lock to an 
+  *   exclusive lock.
+  * - Arbitrary strings should be useable as resource names. */
  #include "amanda.h"
+ /* Interface to the implementations in common-src/amflock-*.c */
  
- #if defined(USE_POSIX_FCNTL)
-      static struct flock lock; /* zero-initialized */
+ #ifdef WANT_AMFLOCK_POSIX
+ extern amflock_impl_t amflock_posix_impl;
  #endif
- #if !defined(USE_POSIX_FCNTL) && defined(USE_FLOCK)
- #  ifdef HAVE_SYS_FILE_H
- #    include <sys/file.h>
- #  endif
- #  if !defined(HAVE_FLOCK_DECL) && !defined(CONFIGURE_TEST)
-      extern int flock(int fd, int operation);
- #  endif
+ #ifdef WANT_AMFLOCK_FLOCK
+ extern amflock_impl_t amflock_flock_impl;
  #endif
- #if !defined(USE_POSIX_FCNTL) && !defined(USE_FLOCK) && defined(USE_LOCKF)
- /* XPG4-UNIX (eg, SGI IRIX, DEC DU) has F_ULOCK instead of F_UNLOCK */
- #if defined(F_ULOCK) && !defined(F_UNLOCK)
- #  define F_UNLOCK F_ULOCK
+ #ifdef WANT_AMFLOCK_LOCKF
+ extern amflock_impl_t amflock_lockf_impl;
  #endif
- /* Lock a file using lockf().
- ** Notes:
- ** - returns errors for some non-files like pipes.
- ** - probably only works for files open for writing.
- */
- int
- use_lockf(
-     int fd,   /* fd of file to operate on */
-     int op)   /* true to lock; false to unlock */
- {
-       off_t pos;
-       if (op) {
-               /* lock from here on */
-               if (lockf(fd, F_LOCK, (off_t)0) == -1) return -1;
-       }
-       else {
-               /* unlock from here on */
-               if (lockf(fd, F_UNLOCK, (off_t)0) == -1) return -1;
-               /* unlock from bof to here */
-               pos = lseek(fd, (off_t)0, SEEK_CUR);
-               if (pos == (off_t)-1) {
-                       if (errno == ESPIPE) pos = (off_t)0;
-                       else return -1;
-               }
-               if (pos > (off_t)0 &&
-                   lockf(fd, F_UNLOCK, -pos) == -1) return -1;
-       }
-       return 0;
- }
+ #ifdef WANT_AMFLOCK_LNLOCK
+ extern amflock_impl_t amflock_lnlock_impl;
  #endif
  
- #if !defined(USE_POSIX_FCNTL) && !defined(USE_FLOCK) && !defined(USE_LOCKF) && defined(USE_LNLOCK)
- /* XXX - error checking in this section needs to be tightened up */
- /* Delete a lock file.
- */
- int
- delete_lock(
-     char *fn)
- {
-       int rc;
-       rc = unlink(fn);
-       if (rc != 0 && errno == ENOENT) rc = 0;
-       return rc;
- }
- /* Create a lock file.
- */
- int
- create_lock(
-     char *fn,
-     pid_t pid)
- {
-       int fd;
-       FILE *f;
-       int mask;
-       (void)delete_lock(fn);                  /* that's MY file! */
-       mask = umask(0027);
-       fd = open(fn, O_WRONLY | O_CREAT | O_EXCL, 0640);
-       umask(mask);
-       if (fd == -1) return -1;
-       if((f = fdopen(fd, "w")) == NULL) {
-           aclose(fd);
-           return -1;
-       }
-       fprintf(f, "%ld\n", pid);
-       if (fclose(f) == EOF)
-           return -1;
-       return 0;
- }
- /* Read the pid out of a lock file.
- **   -1=error, otherwise pid.
- */
- long
- read_lock(
-     char *    fn) /* name of lock file */
- {
-       int save_errno;
-       FILE *f;
-       long pid;
-       if ((f = fopen(fn, "r")) == NULL) {
-               return -1;
-       }
-       if (fscanf(f, "%ld", &pid) != 1) {
-               save_errno = errno;
-               afclose(f);
-               errno = save_errno;
-               return -1;
-       }
-       if (fclose(f) != 0) {
-               return -1;
-       }
-       return pid;
- }
- /* Link a lock if we can.
- **   0=done, 1=already locked, -1=error.
- */
- int
- link_lock(
-     char *    lk,     /* real lock file */
-     char *    tlk)    /* temp lock file */
- {
-       int rc;
-       int serrno;     /* saved errno */
-       struct stat lkstat, tlkstat;
-       /* an atomic check and set operation */
-       rc = link(tlk, lk);
-       if (rc == 0) return 0; /* XXX do we trust it? */
-       /* link() says it failed - don't beleive it */
-       serrno = errno;
-       if (stat(lk, &lkstat) == 0 &&
-           stat(tlk, &tlkstat) == 0 &&
-           lkstat.st_ino == tlkstat.st_ino)
-               return 0;       /* it did work! */
-       errno = serrno;
-       if (errno == EEXIST) rc = 1;
-       return rc;
- }
- /* Steal a lock if we can.
- **   0=done; 1=still in use; -1 = error.
- */
- int
- steal_lock(
-     char *    fn,     /* name of lock file to steal */
-     pid_t     mypid,  /* my process id */
-     char *    sres)   /* name of steal-resource to lock */
- {
-       int fd;
-       char buff[64];
-       long pid;
-       int rc;
-       /* prevent a race with another stealer */
-       rc = ln_lock(sres, 1);
-       if (rc != 0) goto error;
-       pid = read_lock(fn);
-       if (pid == -1) {
-               if (errno == ENOENT) goto done;
-               goto error;
-       }
-       if (pid == mypid) goto steal; /* i'm the locker! */
-       /* are they still there ? */
-       rc = kill((pid_t)pid, 0);
-       if (rc != 0) {
-               if (errno == ESRCH) goto steal; /* locker has gone */
-               goto error;
-       }
- inuse:
-       rc = ln_lock(sres, 0);
-       if (rc != 0) goto error;
-       return 1;
- steal:
-       rc = delete_lock(fn);
-       if (rc != 0) goto error;
- done:
-       rc = ln_lock(sres, 0);
-       if (rc != 0) goto error;
-       return 0;
- error:
-       rc = ln_lock(sres, 0);
+ amflock_impl_t *amflock_impls[] = {
+ #ifdef WANT_AMFLOCK_POSIX
+     &amflock_posix_impl,
+ #endif
+ #ifdef WANT_AMFLOCK_FLOCK
+     &amflock_flock_impl,
+ #endif
+ #ifdef WANT_AMFLOCK_LOCKF
+     &amflock_lockf_impl,
+ #endif
+ #ifdef WANT_AMFLOCK_LNLOCK
+     &amflock_lnlock_impl,
+ #endif
+     NULL
+ };
  
-       return -1;
- }
+ /* Interface functions */
+ /* FIXME: for now, these just use the first non-NULL implementation
+  */
  
 -/* Get a file lock (for read/write files).
 +/* Locking using existance of a file.
  */
  int
ln_lock(
-     char *    res, /* name of resource to lock */
-     int               op)  /* true to lock; false to unlock */
amflock(
+     int               fd,
+     char *    resource)
  {
-       long mypid;
-       char *lockfile = NULL;
-       char *tlockfile = NULL;
-       char *mres = NULL;
-       int rc;
-       char pid_str[NUM_STR_SIZE];
-       mypid = (long)getpid();
-       lockfile = vstralloc(AMANDA_TMPDIR, "/am", res, ".lock", NULL);
-       if (!op) {
-               /* unlock the resource */
-               assert(read_lock(lockfile) == mypid);
-               (void)delete_lock(lockfile);
-               amfree(lockfile);
-               return 0;
-       }
-       /* lock the resource */
-       snprintf(pid_str, SIZEOF(pid_str), "%ld", mypid);
-       tlockfile = vstralloc(AMANDA_TMPDIR, "am", res, ".", pid_str, NULL);
-       (void)create_lock(tlockfile, mypid);
-       mres = stralloc2(res, ".");
-       while(1) {
-               rc = link_lock(lockfile, tlockfile);
-               if (rc == -1) break;
-               if (rc == 0) break;
-               rc = steal_lock(lockfile, mypid, mres);
-               if (rc == -1) break;
-               if (rc == 0) continue;
-               sleep(1);
-       }
-       (void) delete_lock(tlockfile);
-       amfree(mres);
-       amfree(tlockfile);
-       amfree(lockfile);
-       return rc;
+     if (!amflock_impls[0]) return 0; /* no locking */
+     return amflock_impls[0]->amflock_impl(fd, resource);
  }
 +#endif
 +
  
  /*
   * Get a file lock (for read-only files).
@@@ -328,161 -109,18 +111,18 @@@ amroflock
      int               fd,
      char *    resource)
  {
-       int r;
- #ifdef USE_POSIX_FCNTL
-       (void)resource; /* Quiet unused paramater warning */
-       lock.l_type = F_RDLCK;
-       lock.l_whence = SEEK_SET;
-       r = fcntl(fd, F_SETLKW, &lock);
- #else
-       (void)fd; /* Quiet unused paramater warning */
-       r = amflock(fd, resource);
- #endif
-       return r;
+     if (!amflock_impls[0]) return 0; /* no locking */
+     return amflock_impls[0]->amroflock_impl(fd, resource);
  }
  
- /* Get a file lock (for read/write files).
- */
- int
- amflock(
-     int               fd,
-     char *    resource)
- {
-       int r;
- #ifdef USE_POSIX_FCNTL
-       (void)resource; /* Quiet unused paramater warning */
-       lock.l_type = F_WRLCK;
-       lock.l_whence = SEEK_SET;
-       r = fcntl(fd, F_SETLKW, &lock);
- #else
- #ifdef USE_FLOCK
-       (void)resource; /* Quiet unused paramater warning */
-       r = flock(fd, LOCK_EX);
- #else
- #ifdef USE_LOCKF
-       (void)resource; /* Quiet unused paramater warning */
-       r = use_lockf(fd, 1);
- #else
- #ifdef USE_LNLOCK
-       (void)fd; /* Quiet unused paramater warning */
-       r = ln_lock(resource, 1);
- #else
-       (void)fd; /* Quiet unused paramater warning */
-       (void)resource; /* Quiet unused paramater warning */
-       r = 0;
- #endif
- #endif
- #endif
- #endif
-       return r;
- }
- /* Release a file lock.
- */
+ /*
+  * Release a file lock.
+  */
  int
  amfunlock(
      int               fd,
      char *    resource)
  {
-       int r;
- #ifdef USE_POSIX_FCNTL
-       (void)resource; /* Quiet unused paramater warning */
-       lock.l_type = F_UNLCK;
-       lock.l_whence = SEEK_SET;
-       r = fcntl(fd, F_SETLK, &lock);
- #else
- #ifdef USE_FLOCK
-       (void)resource; /* Quiet unused paramater warning */
-       r = flock(fd, LOCK_UN);
- #else
- #ifdef USE_LOCKF
-       (void)fd; /* Quiet unused paramater warning */
-       r = use_lockf(fd, 0);
- #else
- #ifdef USE_LNLOCK
-       (void)fd; /* Quiet unused paramater warning */
-       r = ln_lock(resource, 0);
- #else
-       (void)fd; /* Quiet unused paramater warning */
-       (void)resource; /* Quiet unused paramater warning */
-       r = 0;
- #endif
- #endif
- #endif
- #endif
-       return r;
+     if (!amflock_impls[0]) return 0; /* no locking */
+     return amflock_impls[0]->amfunlock_impl(fd, resource);
  }
- /* Test routine for use by configure.
- ** (I'm not sure why we use both return and exit!)
- ** XXX the testing here should be a lot more comprehensive.
- **     - lock the file and then try and lock it from another process
- **     - lock the file from another process and check that process
- **       termination unlocks it.
- **     The hard part is to find a system independent way to not block
- **     for ever.
- */
- #ifdef CONFIGURE_TEST
- int
- main(
-     int argc,
-     char **argv)
- {
-     int lockfd;
-     char *filen = "/tmp/conftest.lock";
-     char *resn = "test";
-     (void)argc;               /* Quiet compiler warning */
-     (void)argv;               /* Quiet compiler warning */
-     unlink(filen);
-     if ((lockfd = open(filen, O_RDONLY | O_CREAT | O_EXCL, 0600)) == -1) {
-       perror (filen);
-       exit(10);
-     }
-     if (amroflock(lockfd, resn) != 0) {
-       perror ("amroflock");
-       exit(1);
-     }
-     if (amfunlock(lockfd, resn) != 0) {
-       perror ("amfunlock/2");
-       exit(2);
-     }
-     /*
-      * Do not use aclose() here.  During configure we do not have
-      * areads_relbuf() available and it makes configure think all
-      * the tests have failed.
-      */
-     close(lockfd);
-     unlink(filen);
-     if ((lockfd = open(filen, O_WRONLY | O_CREAT | O_EXCL, 0600)) == -1) {
-       perror (filen);
-       exit(20);
-     }
-     if (amflock(lockfd, resn) != 0) {
-       perror ("amflock");
-       exit(3);
-     }
-     if (amfunlock(lockfd, resn) != 0) {
-       perror ("amfunlock/4");
-       exit(4);
-     }
-     close(lockfd);
-     exit(0);
- }
- #endif
diff --combined common-src/genversion.c
index 21243b96fcb9c6d14f71aaff728f6fc98a888a5a,1b4f7f5b58aff57f5a983f817847826b0807c483..5ded561beda65846ed72b6e69232102f792c5fbc
   * file named AUTHORS, in the root directory of this distribution.
   */
  /*
-  * $Id: genversion.c,v 1.36 2006/07/13 03:22:20 paddy_s Exp $
+  * $Id: genversion.c 698 2008-01-11 00:42:49Z martinea $
   *
   * dump the current Amanda version info
   */
  #include "amanda.h"
  #include "version.h"
+ /* distribution-time information */
+ #include "svn-info.h"
+ /* build-time information */
  #include "genversion.h"
  
  #define       LMARGIN         6
@@@ -37,8 -42,8 +42,8 @@@
  
  static size_t linelen;
  
- #define       startline(title)        printf("  \"%-*s", LMARGIN, title); linelen = 0
- #define       endline()               printf("\\n\",\n")
+ #define       startline(title)  g_printf("  \"%-*s", LMARGIN, title); linelen = 0
+ #define       endline()         g_printf("\\n\",\n")
  
  static void prstr(const char *);
  static void prvar(const char *, const char *);
@@@ -62,7 -67,7 +67,7 @@@ prstr
        endline();
        startline("");
      }
-     printf(" %s", string);
+     g_printf(" %s", string);
      linelen += len;
  }
  
@@@ -87,12 -92,12 +92,12 @@@ prvar
        buf_len = new_len;
        buf = malloc(new_len);
        if (!buf) {
-           fprintf(stderr, "genversion: Not enough memory");
+           g_fprintf(stderr, _("genversion: Not enough memory"));
            abort();
            /*NOTREACHED*/
        }
      }
-     snprintf(buf, buf_len, "%s=\\\"%s\\\"", var, val);        /* safe */
+     g_snprintf(buf, buf_len, "%s=\\\"%s\\\"", var, val);      /* safe */
      prstr(buf);
  }
  
@@@ -111,12 -116,12 +116,12 @@@ prundefvar
        buf_len = new_len;
        buf = malloc(new_len);          /* let it die if malloc() fails */
        if (!buf) {
-           fprintf(stderr, "genversion: Not enough memory");
+           g_fprintf(stderr, _("genversion: Not enough memory"));
            abort();
            /*NOTREACHED*/
        }
      }
-     snprintf(buf, buf_len, "%s=UNDEF", var);  /* safe */
+     g_snprintf(buf, buf_len, "%s=UNDEF", var);        /* safe */
      prstr(buf);
  }
  
@@@ -129,7 -134,7 +134,7 @@@ prnum
      static char number[NUM_STR_SIZE];
      size_t new_len;
  
-     snprintf(number, SIZEOF(number), "%ld", val);
+     g_snprintf(number, SIZEOF(number), "%ld", val);
      new_len = strlen(var)
              + SIZEOF("=")
              + strlen(number)
        buf_len = new_len;
        buf = malloc(new_len);          /* let it die if malloc() fails */
        if (!buf) {
-           fprintf(stderr, "genversion: Not enough memory");
+           g_fprintf(stderr, _("genversion: Not enough memory"));
            abort();
            /*NOTREACHED*/
        }
      }
-     snprintf(buf, buf_len, "%s=%s", var, number);             /* safe */
+     g_snprintf(buf, buf_len, "%s=%s", var, number);           /* safe */
      prstr(buf);
  }
  
@@@ -160,19 -165,28 +165,28 @@@ main
      (void)argc;       /* Quiet unused parameter warning */
      (void)argv;       /* Quiet unused parameter warning */
  
-     printf("/* version.c - generated by genversion.c - DO NOT EDIT! */\n");
-     printf("const char * const version_info[] = {\n");
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
+     g_printf(_("/* version.c - generated by genversion.c - DO NOT EDIT! */\n"));
+     g_printf("const char * const version_info[] = {\n");
  
      startline("build:");
      v = version();
      v_len = SIZEOF("Amanda-") + strlen(v) + 1;
      verstr = malloc(v_len);
      if (!verstr) {
-       fprintf(stderr, "genversion: Not enough memory");
+       g_fprintf(stderr, _("genversion: Not enough memory"));
        abort();
        /*NOTREACHED*/
      }
-     snprintf(verstr, v_len, "Amanda-%s", v);          /* safe */
+     g_snprintf(verstr, v_len, "Amanda-%s", v);                /* safe */
      prvar("VERSION", verstr);
      free(verstr);
  
      prundefvar("BUILT_MACH");
  #endif
  
- #ifdef CC
-     prvar("CC", CC);
+ #ifdef BUILT_REV
+     prvar("BUILT_REV", BUILT_REV);
  #else
-     prundefvar("CC");
+     prundefvar("BUILT_REV");
+ #endif
+ #ifdef BUILT_BRANCH
+     prvar("BUILT_BRANCH", BUILT_BRANCH);
+ #else
+     prundefvar("BUILT_BRANCH");
  #endif
  
  #ifdef CC
-     prvar("CONFIGURE_COMMAND", CONFIGURE_COMMAND);
+     prvar("CC", CC);
  #else
-     prundefvar("CONFIGURE_COMMAND");
+     prundefvar("CC");
  #endif
  
      endline();
      prvar("bindir", bindir);
      prvar("sbindir", sbindir);
      prvar("libexecdir", libexecdir);
+     prvar("amlibexecdir", amlibexecdir);
      prvar("mandir", mandir);
      prvar("AMANDA_TMPDIR", AMANDA_TMPDIR);
  #ifdef AMANDA_DBGDIR
      prundefvar(" LPRCMD");
  #endif
  
+ #ifdef MAILER
      prvar("MAILER", MAILER);
+ #else
+     prundefvar(" MAILER");
+ #endif
  
  #ifdef GNUTAR_LISTED_INCREMENTAL_DIR
      prvar("listed_incr_dir", GNUTAR_LISTED_INCREMENTAL_DIR);
      prstr("AIX_BACKUP");
  #endif
  
 +#ifdef AIX_TAPEIO
 +    prstr("AIX_TAPEIO");
 +#endif
 +
  #ifdef BROKEN_VOID
      prstr("BROKEN_VOID");
  #endif
      prstr("ASSERTIONS");
  #endif
  
 +#ifdef DEBUG_CODE
 +    prstr("DEBUG_CODE");
 +#endif
 +
  #ifdef AMANDA_DEBUG_DAYS
      prnum("AMANDA_DEBUG_DAYS", AMANDA_DEBUG_DAYS);
  #endif
  
      prvar("CLIENT_LOGIN", CLIENT_LOGIN);
  
- #ifdef FORCE_USERID
-     prstr("FORCE_USERID");
+ #ifdef CHECK_USERID
+     prstr("CHECK_USERID");
  #endif
  
  #ifdef USE_VERSION_SUFFIXES
  
      endline();
  
-     printf("  0\n};\n");
+     g_printf("  0\n};\n");
  
      return (0); /* exit */
  }
diff --combined config/Makefile.am
index bf61cb087810b39db48b65475b56e2baea1714dd,489e52c5034ad08e2bdfe77b5fb8b62f9f1a35f6..6e32254b88ea030e6a5767d345fc12bd52a53aa3
@@@ -1,11 -1,15 +1,16 @@@
  ## Process this file with automake to produce Makefile.in
  
- EXTRA_DIST =  acinclude.m4i   \
-               config.guess    \
+ EXTRA_DIST =  config.guess    \
                config.sub      \
 +              gnulib.m4i      \
                install-sh      \
-               libtool.m4i     \
+               libtool.m4      \
                ltmain.sh       \
                missing         \
                mkinstalldirs
+ # add files from subdirectories, using file lists generated by autogen
+ include $(srcdir)/amanda/file-list
+ include $(srcdir)/gettext-macros/file-list
+ include $(srcdir)/gnulib/file-list
+ include $(srcdir)/macro-archive/file-list
+ include $(srcdir)/automake/file-list
diff --combined config/Makefile.in
index bf8205d4339e22ce42cca7be8cd2f965ca62337b,7f0a293e2f418cb909f23e7e17749b0dc16f3b70..3f046b72341f3481effda9c9ec9ab26296f400a0
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  # PARTICULAR PURPOSE.
  
  @SET_MAKE@
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -36,48 -32,120 +32,120 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
- subdir = config
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/config.h.in config.guess config.rpath config.sub \
-       depcomp install-sh ltmain.sh missing mkinstalldirs
+       $(srcdir)/amanda/file-list $(srcdir)/automake/file-list \
+       $(srcdir)/config.h.in $(srcdir)/gettext-macros/file-list \
+       $(srcdir)/gnulib/file-list $(srcdir)/macro-archive/file-list \
+       compile config.guess config.rpath config.sub depcomp \
+       install-sh ltmain.sh missing mkinstalldirs ylwrap
+ subdir = config
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@@ -86,15 -154,14 +154,15 @@@ CONFIG_CLEAN_FILES 
  SOURCES =
  DIST_SOURCES =
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -102,14 -169,19 +170,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -120,20 -192,19 +194,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -147,60 -218,169 +220,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -210,10 -390,24 +394,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -224,24 -418,58 +422,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -253,59 -481,46 +485,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -314,40 -529,93 +533,93 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
- EXTRA_DIST = acinclude.m4i    \
-               config.guess    \
-               config.sub      \
-               gnulib.m4i      \
-               install-sh      \
-               libtool.m4i     \
-               ltmain.sh       \
-               missing         \
-               mkinstalldirs
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ EXTRA_DIST = config.guess config.sub install-sh libtool.m4 ltmain.sh \
+       missing mkinstalldirs amanda/amplot.m4 amanda/bsd-security.m4 \
+       amanda/bsdtcp-security.m4 amanda/bsdudp-security.m4 \
+       amanda/changer.m4 amanda/components.m4 amanda/compress.m4 \
+       amanda/config.m4 amanda/debugging.m4 amanda/defaults.m4 \
+       amanda/devprefix.m4 amanda/dirs.m4 amanda/documentation.m4 \
+       amanda/dumpers.m4 amanda/flags.m4 amanda/flock.m4 \
+       amanda/funcs.m4 amanda/getfsent.m4 amanda/i18n.m4 \
+       amanda/ipv6.m4 amanda/krb4-security.m4 amanda/krb5-security.m4 \
+       amanda/lfs.m4 amanda/libs.m4 amanda/net.m4 amanda/progs.m4 \
+       amanda/readdir.m4 amanda/readline.m4 amanda/rsh-security.m4 \
+       amanda/s3-device.m4 amanda/shmem.m4 amanda/socklen_t_equiv.m4 \
+       amanda/ssh-security.m4 amanda/summary.m4 amanda/swig.m4 \
+       amanda/syshacks.m4 amanda/tape.m4 amanda/types.m4 \
+       amanda/userid.m4 amanda/version.m4 gettext-macros/codeset.m4 \
+       gettext-macros/gettext.m4 gettext-macros/glibc21.m4 \
+       gettext-macros/glibc2.m4 gettext-macros/iconv.m4 \
+       gettext-macros/intdiv0.m4 gettext-macros/intmax.m4 \
+       gettext-macros/inttypes_h.m4 gettext-macros/inttypes.m4 \
+       gettext-macros/inttypes-pri.m4 gettext-macros/isc-posix.m4 \
+       gettext-macros/lcmessage.m4 gettext-macros/lib-ld.m4 \
+       gettext-macros/lib-link.m4 gettext-macros/lib-prefix.m4 \
+       gettext-macros/longdouble.m4 gettext-macros/longlong.m4 \
+       gettext-macros/nls.m4 gettext-macros/po.m4 \
+       gettext-macros/printf-posix.m4 gettext-macros/progtest.m4 \
+       gettext-macros/signed.m4 gettext-macros/size_max.m4 \
+       gettext-macros/stdint_h.m4 gettext-macros/uintmax_t.m4 \
+       gettext-macros/ulonglong.m4 gettext-macros/wchar_t.m4 \
+       gettext-macros/wint_t.m4 gettext-macros/xsize.m4 \
+       gnulib/absolute-header.m4 gnulib/alloca.m4 \
+       gnulib/arpa_inet_h.m4 gnulib/base64.m4 gnulib/eoverflow.m4 \
+       gnulib/extensions.m4 gnulib/float_h.m4 gnulib/fsusage.m4 \
+       gnulib/getaddrinfo.m4 gnulib/gettimeofday.m4 \
+       gnulib/gnulib-cache.m4 gnulib/gnulib-common.m4 \
+       gnulib/gnulib-comp.m4 gnulib/gnulib-tool.m4 \
+       gnulib/include_next.m4 gnulib/inet_ntop.m4 gnulib/intmax_t.m4 \
+       gnulib/inttypes_h.m4 gnulib/lib-ld.m4 gnulib/lib-link.m4 \
+       gnulib/lib-prefix.m4 gnulib/lock.m4 gnulib/longlong.m4 \
+       gnulib/malloc.m4 gnulib/mkdtemp.m4 gnulib/netinet_in_h.m4 \
+       gnulib/onceonly_2_57.m4 gnulib/physmem.m4 gnulib/safe-read.m4 \
+       gnulib/safe-write.m4 gnulib/size_max.m4 gnulib/snprintf.m4 \
+       gnulib/socklen.m4 gnulib/sockpfaf.m4 gnulib/ssize_t.m4 \
+       gnulib/stdbool.m4 gnulib/stdint_h.m4 gnulib/stdint.m4 \
+       gnulib/stdio_h.m4 gnulib/stdlib_h.m4 gnulib/strdup.m4 \
+       gnulib/string_h.m4 gnulib/sys_socket_h.m4 gnulib/sys_stat_h.m4 \
+       gnulib/sys_time_h.m4 gnulib/tempname.m4 gnulib/ulonglong.m4 \
+       gnulib/unistd_h.m4 gnulib/vasnprintf.m4 gnulib/visibility.m4 \
+       gnulib/wchar.m4 gnulib/wchar_t.m4 gnulib/wint_t.m4 \
+       gnulib/xsize.m4 macro-archive/ac_define_dir.m4 \
+       macro-archive/ac_prog_perl_version.m4 \
+       macro-archive/ac_prog_swig.m4 \
+       macro-archive/ax_compare_version.m4 \
+       macro-archive/docbook-dtd.m4 macro-archive/docbook-xslt.m4 \
+       macro-archive/docbook-xslt-min.m4 macro-archive/xsltproc.m4 \
+       automake/installperms.am automake/precompile.am \
+       automake/scripts.am automake/vars.am
  all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
  
  .SUFFIXES:
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/amanda/file-list $(srcdir)/gettext-macros/file-list $(srcdir)/gnulib/file-list $(srcdir)/macro-archive/file-list $(srcdir)/automake/file-list $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -380,7 -648,7 +652,7 @@@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps
  config.h: stamp-h1
        @if test ! -f $@; then \
          rm -f stamp-h1; \
-         $(MAKE) stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
        else :; fi
  
  stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@@@ -399,10 -667,6 +671,6 @@@ mostlyclean-libtool
  
  clean-libtool:
        -rm -rf .libs _libs
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
  tags: TAGS
  TAGS:
  
@@@ -411,22 -675,21 +679,21 @@@ CTAGS
  
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
@@@ -471,8 -734,7 +738,7 @@@ clean-am: clean-generic clean-libtool m
  
  distclean: distclean-am
        -rm -f Makefile
- distclean-am: clean-am distclean-generic distclean-hdr \
-       distclean-libtool
+ distclean-am: clean-am distclean-generic distclean-hdr
  
  dvi: dvi-am
  
@@@ -486,12 -748,20 +752,20 @@@ info-am
  
  install-data-am:
  
+ install-dvi: install-dvi-am
  install-exec-am:
  
+ install-html: install-html-am
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -510,18 -780,23 +784,23 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am
+ uninstall-am:
+ .MAKE: install-am install-strip
  
  .PHONY: all all-am check check-am clean clean-generic clean-libtool \
        distclean distclean-generic distclean-hdr distclean-libtool \
        distdir dvi dvi-am html html-am info info-am install \
-       install-am install-data install-data-am install-exec \
-       install-exec-am install-info install-info-am install-man \
+       install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
        install-strip installcheck installcheck-am installdirs \
        maintainer-clean maintainer-clean-generic mostlyclean \
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       uninstall uninstall-am uninstall-info-am
+       uninstall uninstall-am
  
+ # add files from subdirectories, using file lists generated by autogen
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
  # Otherwise a system limit (for SysV at least) may be exceeded.
  .NOEXPORT:
diff --combined config/config.h.in
index 0f029207f687965f613b82bada86730f311f8f90,5c2d00400c8f3a0e4d4fe8ba3f35330129cedf7f..2196c493d609eca9cf5b6c9f22b71b18684f2de6
@@@ -1,14 -1,8 +1,8 @@@
  /* config/config.h.in.  Generated from configure.in by autoheader.  */
  
- /* Define this to an absolute name of <string.h>. */
- #undef ABSOLUTE_STRING_H
- /* Define on AIX. */
+ /* Is DUMP the AIX program 'backup'? */
  #undef AIX_BACKUP
  
- /* Define on AIX. */
- #undef AIX_TAPEIO
  /* Location of Amanda directories and files. */
  #undef AMANDA_DBGDIR
  
  /* Define as the user who owns installed binaries. */
  #undef BINARY_OWNER
  
+ /* Define to the number of bits in type 'ptrdiff_t'. */
+ #undef BITSIZEOF_PTRDIFF_T
+ /* Define to the number of bits in type 'sig_atomic_t'. */
+ #undef BITSIZEOF_SIG_ATOMIC_T
+ /* Define to the number of bits in type 'size_t'. */
+ #undef BITSIZEOF_SIZE_T
+ /* Define to the number of bits in type 'wchar_t'. */
+ #undef BITSIZEOF_WCHAR_T
+ /* Define to the number of bits in type 'wint_t'. */
+ #undef BITSIZEOF_WINT_T
  /* Define if BSDTCP transport should be enabled. */
  #undef BSDTCP_SECURITY
  
  /* Define to use BSD .rhosts/.amandahosts security. */
  #undef BSD_SECURITY
  
+ /* Define to force to another user on client machines. */
+ #undef CHECK_USERID
  /* The Kerberos client host instance. */
  #undef CLIENT_HOST_INSTANCE
  
  /* The Kerberos client host key file. */
  #undef CLIENT_HOST_KEY_FILE
  
- /* The Kerberos client host principle. */
- #undef CLIENT_HOST_PRINCIPLE
+ /* The Kerberos client host principal. */
+ #undef CLIENT_HOST_PRINCIPAL
  
  /* Define as a the user to force to on client machines. */
  #undef CLIENT_LOGIN
@@@ -63,9 -75,6 +75,6 @@@
  /* Define to the suffix for the COMPRESS_PATH compression program. */
  #undef COMPRESS_SUFFIX
  
- /* Saves the original ./configure command line arguments */
- #undef CONFIGURE_COMMAND
  /* The directory in which configuration directories should be created. */
  #undef CONFIG_DIR
  
@@@ -77,8 -86,8 +86,8 @@@
  /* Define to 1 if using `alloca.c'. */
  #undef C_ALLOCA
  
- /* Define if you want debugging. */
- #undef DEBUG_CODE
+ /* Default location for 'amandates' */
+ #undef DEFAULT_AMANDATES_FILE
  
  /* This is the default changer device. */
  #undef DEFAULT_CHANGER_DEVICE
  /* This is the default Amanda configuration. */
  #undef DEFAULT_CONFIG
  
- /* For Linux systems with floppy tapes: * QIC volume table support via raw
-    tape device. */
- #undef DEFAULT_RAW_TAPE_DEVICE
  /* This is the default Amanda index server. */
  #undef DEFAULT_SERVER
  
  /* Define as the prefix for disk devices, commonly /dev/ or /dev/dsk/ */
  #undef DEV_PREFIX
  
- /* Define on Cygwin. */
- #undef DONT_SUID_ROOT
  /* Define the location of the ufsdump, backup, or dump program. */
  #undef DUMP
  
  /* Define this if this system's dump exits with 1 as a success code. */
  #undef DUMP_RETURNS_1
  
+ /* Define to 1 if translation of program messages to the user's native
+    language is requested. */
+ #undef ENABLE_NLS
  /* Define as good substitute value for EOVERFLOW. */
  #undef EOVERFLOW
  
 +/* Define to force to another user on client machines. */
 +#undef FORCE_USERID
 +
  /* Define to 1 if the `getpgrp' function requires zero arguments. */
  #undef GETPGRP_VOID
  
- /* Define to the location of Gnu tar. */
+ /* Define if gettimeofday clobbers the localtime buffer. */
+ #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
+ /* Location of the GNU 'tar' binary */
  #undef GNUTAR
  
  /* The directory in which GNU tar should store directory lists for
  /* Define if accept is declared. */
  #undef HAVE_ACCEPT_DECL
  
- /* Define to enable AIX tape-changer support */
- #undef HAVE_AIX_LIKE_SCSI
  /* Define to 1 if you have `alloca', as a function or macro. */
  #undef HAVE_ALLOCA
  
  /* Define if atof is declared. */
  #undef HAVE_ATOF_DECL
  
- /* Define to 1 if you have the `atoi' function. */
- #undef HAVE_ATOI
- /* Define if atoi is declared. */
- #undef HAVE_ATOI_DECL
  /* Define to 1 if you have the `atol' function. */
  #undef HAVE_ATOL
  
  /* Define if bind is declared. */
  #undef HAVE_BIND_DECL
  
- /* Define this if issuing a fsf on a tape fails when you are not at a tape *
-    mark, for instance, if amrecover gives I/O errors when skipping. */
- #undef HAVE_BROKEN_FSF
- /* Define to enable BSD tape-changer support */
- #undef HAVE_BSD_LIKE_SCSI
  /* Define to 1 if you have the `bzero' function. */
  #undef HAVE_BZERO
  
  /* Define to 1 if you have the <camlib.h> header file. */
  #undef HAVE_CAMLIB_H
  
- /* Define to 1 if you have the <cam/cam.h> header file. */
- #undef HAVE_CAM_CAM_H
- /* Define to enable CAM tape-changer support */
- #undef HAVE_CAM_LIKE_SCSI
+ /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+    CoreFoundation framework. */
+ #undef HAVE_CFLOCALECOPYCURRENT
  
- /* Define to 1 if you have the <cam/scsi/scsi_message.h> header file. */
- #undef HAVE_CAM_SCSI_SCSI_MESSAGE_H
- /* Define if limits.h defines CHAR_BIT. */
- #undef HAVE_CHAR_BIT
- /* Define if limits.h defines CHAR_MAX. */
- #undef HAVE_CHAR_MAX
- /* Define if limits.h defines CHAR_MIN. */
- #undef HAVE_CHAR_MIN
+ /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+    the CoreFoundation framework. */
+ #undef HAVE_CFPREFERENCESCOPYAPPVALUE
  
  /* Define to 1 if you have the <chio.h> header file. */
  #undef HAVE_CHIO_H
  /* Define if connect is declared. */
  #undef HAVE_CONNECT_DECL
  
- /* Define to 1 if you have the <dbm.h> header file. */
- #undef HAVE_DBM_H
+ /* Define to 1 if you have the <crypto/hmac.h> header file. */
+ #undef HAVE_CRYPTO_HMAC_H
  
- /* Define to 1 if you have the `dbm_open' function. */
- #undef HAVE_DBM_OPEN
- /* Define if dbm_open is declared. */
- #undef HAVE_DBM_OPEN_DECL
- /* Define to 1 if you have the <db.h> header file. */
- #undef HAVE_DB_H
+ /* Define if the GNU dcgettext() function is already present or preinstalled.
+    */
+ #undef HAVE_DCGETTEXT
  
  /* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you
     don't. */
     don't. */
  #undef HAVE_DECL_INET_NTOP
  
+ /* Define to 1 if you have the declaration of `mkdir', and to 0 if you don't.
+    */
+ #undef HAVE_DECL_MKDIR
+ /* Define to 1 if you have the declaration of `readdir', and to 0 if you
+    don't. */
+ #undef HAVE_DECL_READDIR
+ /* Define to 1 if you have the declaration of `readdir64', and to 0 if you
+    don't. */
+ #undef HAVE_DECL_READDIR64
+ /* Define to 1 if you have the declaration of `readdir64_r', and to 0 if you
+    don't. */
+ #undef HAVE_DECL_READDIR64_R
+ /* Define to 1 if you have the declaration of `readdir_r', and to 0 if you
+    don't. */
+ #undef HAVE_DECL_READDIR_R
  /* Define to 1 if you have the declaration of `snprintf', and to 0 if you
     don't. */
  #undef HAVE_DECL_SNPRINTF
     */
  #undef HAVE_DECL_STRDUP
  
+ /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
+    don't. */
+ #undef HAVE_DECL__SNPRINTF
  /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
     */
  #undef HAVE_DIRENT_H
  /* Define to 1 if you have the <dlfcn.h> header file. */
  #undef HAVE_DLFCN_H
  
- /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
- #undef HAVE_DOPRNT
  /* Define to the string that enables dump estimates. */
  #undef HAVE_DUMP_ESTIMATE
  
+ /* Define to 1 if you have the <dustat.h> header file. */
+ #undef HAVE_DUSTAT_H
  /* Define to 1 if you have the `endmntent' function. */
  #undef HAVE_ENDMNTENT
  
  /* Define if fflush is declared. */
  #undef HAVE_FFLUSH_DECL
  
- /* Define to 1 if you have the `flock' function. */
- #undef HAVE_FLOCK
- /* Define if flock is declared. */
- #undef HAVE_FLOCK_DECL
- /* Define to 1 if you have the `fnmatch' function. */
- #undef HAVE_FNMATCH
- /* Define to 1 if you have the <fnmatch.h> header file. */
- #undef HAVE_FNMATCH_H
+ /* Define to 1 if you have the <float.h> header file. */
+ #undef HAVE_FLOAT_H
  
  /* Define to 1 if you have the `fprintf' function. */
  #undef HAVE_FPRINTF
  /* Define if fwrite is declared. */
  #undef HAVE_FWRITE_DECL
  
- /* Define to 1 if you have the `gai_strerror' function. */
- #undef HAVE_GAI_STRERROR
  /* Define to 1 if you have the `getaddrinfo' function. */
  #undef HAVE_GETADDRINFO
  
- /* Define to 1 if you have the `getfsent' function. */
- #undef HAVE_GETFSENT
+ /* Define to 1 if you have the `getgrgid_r' function. */
+ #undef HAVE_GETGRGID_R
  
  /* Define to 1 if you have the `gethostbyname' function. */
  #undef HAVE_GETHOSTBYNAME
  /* Define if gethostname is declared. */
  #undef HAVE_GETHOSTNAME_DECL
  
- /* Define to 1 if you have the `getmntent' function. */
- #undef HAVE_GETMNTENT
  /* Define to 1 if you have the `getopt' function. */
  #undef HAVE_GETOPT
  
  /* Define if getpeername is declared. */
  #undef HAVE_GETPEERNAME_DECL
  
- /* Define to 1 if you have the `getpgrp' function. */
- #undef HAVE_GETPGRP
+ /* Define to 1 if you have the `getpwuid_r' function. */
+ #undef HAVE_GETPWUID_R
  
  /* Define to 1 if you have the `getsockname' function. */
  #undef HAVE_GETSOCKNAME
  /* Define if getsockopt is declared. */
  #undef HAVE_GETSOCKOPT_DECL
  
+ /* Define to 1 if you have the `getsysinfo' function. */
+ #undef HAVE_GETSYSINFO
+ /* Define if the GNU gettext() function is already present or preinstalled. */
+ #undef HAVE_GETTEXT
  /* Define to 1 if you have the `gettimeofday' function. */
  #undef HAVE_GETTIMEOFDAY
  
- /* Define if gettimeofday is declared. */
- #undef HAVE_GETTIMEOFDAY_DECL
- /* Define to 1 if you have the `getvfsent' function. */
- #undef HAVE_GETVFSENT
+ /* Define this if glibc's backtrace functionality (execinfo.h) is present */
+ #undef HAVE_GLIBC_BACKTRACE
  
  /* Define to 1 if you have the <grp.h> header file. */
  #undef HAVE_GRP_H
  /* Define to 1 if you have the <history.h> header file. */
  #undef HAVE_HISTORY_H
  
+ /* Define to 1 if you have the <hmac.h> header file. */
+ #undef HAVE_HMAC_H
  /* Define this if dump accepts -h for honoring nodump. */
  #undef HAVE_HONOR_NODUMP
  
- /* Define to enable HPUX tape-changer support. */
- #undef HAVE_HPUX_LIKE_SCSI
+ /* Define if you have the iconv() function. */
+ #undef HAVE_ICONV
  
- /* Define to enable HPUX chio based changer support. */
- #undef HAVE_HPUX_SCSI_CHIO
+ /* Define if your compiler supports the #include_next directive. */
+ #undef HAVE_INCLUDE_NEXT
  
  /* Define to 1 if you have the `inet_ntop' function. */
  #undef HAVE_INET_NTOP
  /* Define if ioctl is declared. */
  #undef HAVE_IOCTL_DECL
  
+ /* Define to 1 if you have the <io.h> header file. */
+ #undef HAVE_IO_H
  /* Define to 1 if <sys/socket.h> defines AF_INET. */
  #undef HAVE_IPV4
  
  /* Define to 1 if <sys/socket.h> defines AF_INET6. */
  #undef HAVE_IPV6
  
- /* Define to enable IRIX tape-changer support */
- #undef HAVE_IRIX_LIKE_SCSI
- /* Define to 1 if you have the `isascii' function. */
- #undef HAVE_ISASCII
  /* Define to 1 if you have the `isnormal' function. */
  #undef HAVE_ISNORMAL
  
  /* Define if isnormal is declared. */
  #undef HAVE_ISNORMAL_DECL
  
 +/* Define to 1 if you have the `c' library (-lc). */
 +#undef HAVE_LIBC
 +
  /* Define to 1 if you have the `cam' library (-lcam). */
  #undef HAVE_LIBCAM
  
- /* Define to 1 if you have the `curses' library (-lcurses). */
- #undef HAVE_LIBCURSES
+ /* Define to 1 if you have the `crypto' library (-lcrypto). */
+ #undef HAVE_LIBCRYPTO
+ /* Define to 1 if you have a functional curl library. */
+ #undef HAVE_LIBCURL
  
  /* Define to 1 if you have the `cur_colr' library (-lcur_colr). */
  #undef HAVE_LIBCUR_COLR
  /* Define to 1 if you have the <libc.h> header file. */
  #undef HAVE_LIBC_H
  
- /* Define to 1 if you have the `db' library (-ldb). */
- #undef HAVE_LIBDB
- /* Define to 1 if you have the `dbm' library (-ldbm). */
- #undef HAVE_LIBDBM
- /* Define to 1 if you have the `dbmalloc' library (-ldbmalloc). */
- #undef HAVE_LIBDBMALLOC
- /* Define to 1 if you have the `gdbm' library (-lgdbm). */
- #undef HAVE_LIBGDBM
  /* Define to 1 if you have the <libgen.h> header file. */
  #undef HAVE_LIBGEN_H
  
  /* Define to 1 if you have the `m' library (-lm). */
  #undef HAVE_LIBM
  
- /* Define to 1 if you have the `ncurses' library (-lncurses). */
- #undef HAVE_LIBNCURSES
- /* Define to 1 if you have the `ndbm' library (-lndbm). */
- #undef HAVE_LIBNDBM
  /* Define to 1 if you have the `nsl' library (-lnsl). */
  #undef HAVE_LIBNSL
  
- /* Define to 1 if you have the `readline' library (-lreadline). */
- #undef HAVE_LIBREADLINE
  /* Define to 1 if you have the `resolv' library (-lresolv). */
  #undef HAVE_LIBRESOLV
  
  /* Define to 1 if you have the `sun' library (-lsun). */
  #undef HAVE_LIBSUN
  
- /* Define to 1 if you have the `termcap' library (-ltermcap). */
- #undef HAVE_LIBTERMCAP
- /* Define to 1 if you have the `vtblc' library (-lvtblc). */
- #undef HAVE_LIBVTBLC
+ /* Define to 1 if you have the `xpg4' library (-lxpg4). */
+ #undef HAVE_LIBXPG4
  
  /* Define to 1 if you have the <limits.h> header file. */
  #undef HAVE_LIMITS_H
  
- /* Define to enable Linux tape-changer support. */
- #undef HAVE_LINUX_LIKE_SCSI
+ /* Define to 1 if you have the <linux/chio.h> header file. */
+ #undef HAVE_LINUX_CHIO_H
  
  /* Define to 1 if you have the <linux/zftape.h> header file. */
  #undef HAVE_LINUX_ZFTAPE_H
  /* Define if listen is declared. */
  #undef HAVE_LISTEN_DECL
  
- /* Define if you have the 'long double' type. */
- #undef HAVE_LONG_DOUBLE
  /* Define if you have the 'long long' type. */
  #undef HAVE_LONG_LONG
  
  /* Define if lstat is declared. */
  #undef HAVE_LSTAT_DECL
  
+ /* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */
+ #undef HAVE_MACHINE_HAL_SYSINFO_H
  /* Define to 1 if you have the `malloc' function. */
  #undef HAVE_MALLOC
  
  /* Define if malloc is declared. */
  #undef HAVE_MALLOC_DECL
  
+ /* Define if the 'malloc' function is POSIX compliant. */
+ #undef HAVE_MALLOC_POSIX
  /* Define to 1 if you have the <math.h> header file. */
  #undef HAVE_MATH_H
  
  /* Define if memset is declared. */
  #undef HAVE_MEMSET_DECL
  
- /* Define to 1 if you have the `mkdir' function. */
- #undef HAVE_MKDIR
+ /* Define to 1 if you have the `mkdtemp' function. */
+ #undef HAVE_MKDTEMP
  
  /* Define to 1 if you have the `mkstemp' function. */
  #undef HAVE_MKSTEMP
  /* Define if the mtget structure has an mt_flags field */
  #undef HAVE_MT_FLAGS
  
- /* Define to 1 if you have the <ndbm.h> header file. */
- #undef HAVE_NDBM_H
  /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
  #undef HAVE_NDIR_H
  
  /* Define to 1 if you have the <netinet/in.h> header file. */
  #undef HAVE_NETINET_IN_H
  
 +/* Define to 1 if you have the <netinet/in_systm.h> header file. */
 +#undef HAVE_NETINET_IN_SYSTM_H
 +
 +/* Define to 1 if you have the <netinet/ip.h> header file. */
 +#undef HAVE_NETINET_IP_H
 +
  /* Define to 1 if you have the `on_exit' function. */
  #undef HAVE_ON_EXIT
  
  /* Define if openlog is declared. */
  #undef HAVE_OPENLOG_DECL
  
+ /* Define to 1 if you have the <openssl/hmac.h> header file. */
+ #undef HAVE_OPENSSL_HMAC_H
  /* Define to 1 if you have the `pclose' function. */
  #undef HAVE_PCLOSE
  
  /* Define if printf is declared. */
  #undef HAVE_PRINTF_DECL
  
+ /* Define to 1 if you have the `pstat_getdynamic' function. */
+ #undef HAVE_PSTAT_GETDYNAMIC
+ /* Define to 1 if you have the `pstat_getstatic' function. */
+ #undef HAVE_PSTAT_GETSTATIC
  /* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
  #undef HAVE_PTHREAD_MUTEX_RECURSIVE
  
  /* Define if puts is declared. */
  #undef HAVE_PUTS_DECL
  
+ /* System has readline support (headers and libraries) */
+ #undef HAVE_READLINE
  /* Define to 1 if you have the <readline.h> header file. */
  #undef HAVE_READLINE_H
  
  /* Define if rewind is declared. */
  #undef HAVE_REWIND_DECL
  
- /* Define to 1 if you have the `rmdir' function. */
- #undef HAVE_RMDIR
  /* Define to 1 if you have the `ruserok' function. */
  #undef HAVE_RUSEROK
  
  /* Define to 1 if you have the `sigemptyset' function. */
  #undef HAVE_SIGEMPTYSET
  
+ /* Define to 1 if 'sig_atomic_t' is a signed integer type. */
+ #undef HAVE_SIGNED_SIG_ATOMIC_T
+ /* Define to 1 if 'wchar_t' is a signed integer type. */
+ #undef HAVE_SIGNED_WCHAR_T
+ /* Define to 1 if 'wint_t' is a signed integer type. */
+ #undef HAVE_SIGNED_WINT_T
  /* Define to 1 if you have the `sigvec' function. */
  #undef HAVE_SIGVEC
  
  /* Define if socket is declared. */
  #undef HAVE_SOCKET_DECL
  
- /* Define to enable Solaris tape-changer support */
- #undef HAVE_SOLARIS_LIKE_SCSI
  /* Define to 1 if you have the `sscanf' function. */
  #undef HAVE_SSCANF
  
  /* Define if sscanf is declared. */
  #undef HAVE_SSCANF_DECL
  
- /* Define to 1 if you have the `statfs' function. */
- #undef HAVE_STATFS
- /* Define to 1 if you have the `statvfs' function. */
- #undef HAVE_STATVFS
  /* Define to 1 if you have the <stdarg.h> header file. */
  #undef HAVE_STDARG_H
  
     uintmax_t. */
  #undef HAVE_STDINT_H_WITH_UINTMAX
  
+ /* Define to 1 if you have the <stdio.h> header file. */
+ #undef HAVE_STDIO_H
  /* Define to 1 if you have the <stdlib.h> header file. */
  #undef HAVE_STDLIB_H
  
  /* Define to 1 if the system has the type `struct addrinfo'. */
  #undef HAVE_STRUCT_ADDRINFO
  
- /* Define if the database header declares struct datum. */
- #undef HAVE_STRUCT_DATUM
+ /* Define to 1 if you have the `sysctl' function. */
+ #undef HAVE_SYSCTL
  
  /* Define to 1 if you have the `syslog' function. */
  #undef HAVE_SYSLOG
  /* Define to 1 if you have the <syslog.h> header file. */
  #undef HAVE_SYSLOG_H
  
+ /* Define to 1 if you have the `sysmp' function. */
+ #undef HAVE_SYSMP
  /* Define to 1 if you have the `system' function. */
  #undef HAVE_SYSTEM
  
  /* Define if SysV shared-memory functions are available. */
  #undef HAVE_SYSVSHM
  
+ /* Define to 1 if you have the <sys/bitypes.h> header file. */
+ #undef HAVE_SYS_BITYPES_H
  /* Define to 1 if you have the <sys/chio.h> header file. */
  #undef HAVE_SYS_CHIO_H
  
  /* Define to 1 if you have the <sys/file.h> header file. */
  #undef HAVE_SYS_FILE_H
  
+ /* Define to 1 if you have the <sys/filsys.h> header file. */
+ #undef HAVE_SYS_FILSYS_H
+ /* Define to 1 if you have the <sys/fs/s5param.h> header file. */
+ #undef HAVE_SYS_FS_S5PARAM_H
+ /* Define to 1 if you have the <sys/fs_types.h> header file. */
+ #undef HAVE_SYS_FS_TYPES_H
  /* Define to 1 if you have the <sys/gscdds.h> header file. */
  #undef HAVE_SYS_GSCDDS_H
  
+ /* Define to 1 if you have the <sys/inttypes.h> header file. */
+ #undef HAVE_SYS_INTTYPES_H
  /* Define to 1 if you have the <sys/ioctl.h> header file. */
  #undef HAVE_SYS_IOCTL_H
  
  /* Define to 1 if you have the <sys/param.h> header file. */
  #undef HAVE_SYS_PARAM_H
  
+ /* Define to 1 if you have the <sys/pstat.h> header file. */
+ #undef HAVE_SYS_PSTAT_H
  /* Define to 1 if you have the <sys/scarray.h> header file. */
  #undef HAVE_SYS_SCARRAY_H
  
  /* Define to 1 if you have the <sys/statfs.h> header file. */
  #undef HAVE_SYS_STATFS_H
  
- /* Define to 1 if you have the <sys/statvfs.h> header file. */
- #undef HAVE_SYS_STATVFS_H
  /* Define to 1 if you have the <sys/stat.h> header file. */
  #undef HAVE_SYS_STAT_H
  
+ /* Define to 1 if you have the <sys/sysctl.h> header file. */
+ #undef HAVE_SYS_SYSCTL_H
+ /* Define to 1 if you have the <sys/sysinfo.h> header file. */
+ #undef HAVE_SYS_SYSINFO_H
+ /* Define to 1 if you have the <sys/sysmp.h> header file. */
+ #undef HAVE_SYS_SYSMP_H
+ /* Define to 1 if you have the <sys/systemcfg.h> header file. */
+ #undef HAVE_SYS_SYSTEMCFG_H
+ /* Define to 1 if you have the <sys/table.h> header file. */
+ #undef HAVE_SYS_TABLE_H
  /* Define to 1 if you have the <sys/tape.h> header file. */
  #undef HAVE_SYS_TAPE_H
  
+ /* Define to 1 if you have the <sys/timeb.h> header file. */
+ #undef HAVE_SYS_TIMEB_H
  /* Define to 1 if you have the <sys/time.h> header file. */
  #undef HAVE_SYS_TIME_H
  
  /* Define to 1 if you have the <sys/wait.h> header file. */
  #undef HAVE_SYS_WAIT_H
  
+ /* Define to 1 if you have the `table' function. */
+ #undef HAVE_TABLE
  /* Define to 1 if you have the `time' function. */
  #undef HAVE_TIME
  
  /* Define if toupper is declared. */
  #undef HAVE_TOUPPER_DECL
  
- /* Define if gettimeofday takes two arguments. */
- #undef HAVE_TWO_ARG_GETTIMEOFDAY
  /* Define to 1 if you have the `ungetc' function. */
  #undef HAVE_UNGETC
  
  /* Define to 1 if you have the <unistd.h> header file. */
  #undef HAVE_UNISTD_H
  
- /* Define if the compiler support unsigned long constants. */
- #undef HAVE_UNSIGNED_LONG_CONSTANTS
+ /* Define to 1 if the system has the type `unsigned long long int'. */
+ #undef HAVE_UNSIGNED_LONG_LONG_INT
  
  /* Define to 1 if you have the `vasnprintf' function. */
  #undef HAVE_VASNPRINTF
  /* Define if vsnprintf is declared. */
  #undef HAVE_VSNPRINTF_DECL
  
- /* Define to 1 if you have the `vsprintf' function. */
- #undef HAVE_VSPRINTF
- /* Define if vsprintf is declared. */
- #undef HAVE_VSPRINTF_DECL
- /* Define to 1 if you have the <vtblc.h> header file. */
- #undef HAVE_VTBLC_H
  /* Define to 1 if you have the <wait.h> header file. */
  #undef HAVE_WAIT_H
  
+ /* Define to 1 if you have the <wchar.h> header file. */
+ #undef HAVE_WCHAR_H
  /* Define if you have the 'wchar_t' type. */
  #undef HAVE_WCHAR_T
  
  /* Define to 1 if the system has the type `_Bool'. */
  #undef HAVE__BOOL
  
- /* Define if limits.h defines _POSIX2_RE_DUP_MAX. */
- #undef HAVE__POSIX2_RE_DUP_MAX
+ /* Define to 1 if you have the `_ftime' function. */
+ #undef HAVE__FTIME
+ /* Define to 1 if you have the external variable, _system_configuration with a
+    member named physmem. */
+ #undef HAVE__SYSTEM_CONFIGURATION
  
  /* Define on Cygwin. */
  #undef IGNORE_FSTAB
  /* Define on Cygwin. */
  #undef IGNORE_TAR_ERRORS
  
- /* Define on Cygwin. */
- #undef IGNORE_UID_CHECK
  /* The name for the Kerberized Amanda service. */
  #undef KAMANDA_SERVICE_NAME
  
- /* Enable Kerberos security. */
+ /* Enable Kerberos IV security. */
  #undef KRB4_SECURITY
  
  /* Define if Kerberos 5 security is to be enabled. */
  #undef KRB5_SECURITY
  
- /* Format for a long long printf. */
- #undef LL_FMT
+ /* Defined if libcurl supports AsynchDNS */
+ #undef LIBCURL_FEATURE_ASYNCHDNS
+ /* Defined if libcurl supports IDN */
+ #undef LIBCURL_FEATURE_IDN
+ /* Defined if libcurl supports IPv6 */
+ #undef LIBCURL_FEATURE_IPV6
+ /* Defined if libcurl supports KRB4 */
+ #undef LIBCURL_FEATURE_KRB4
+ /* Defined if libcurl supports libz */
+ #undef LIBCURL_FEATURE_LIBZ
+ /* Defined if libcurl supports NTLM */
+ #undef LIBCURL_FEATURE_NTLM
+ /* Defined if libcurl supports SSL */
+ #undef LIBCURL_FEATURE_SSL
+ /* Defined if libcurl supports SSPI */
+ #undef LIBCURL_FEATURE_SSPI
+ /* Defined if libcurl supports DICT */
+ #undef LIBCURL_PROTOCOL_DICT
+ /* Defined if libcurl supports FILE */
+ #undef LIBCURL_PROTOCOL_FILE
+ /* Defined if libcurl supports FTP */
+ #undef LIBCURL_PROTOCOL_FTP
+ /* Defined if libcurl supports FTPS */
+ #undef LIBCURL_PROTOCOL_FTPS
+ /* Defined if libcurl supports HTTP */
+ #undef LIBCURL_PROTOCOL_HTTP
  
- /* Format for a long long printf. */
- #undef LL_RFMT
+ /* Defined if libcurl supports HTTPS */
+ #undef LIBCURL_PROTOCOL_HTTPS
+ /* Defined if libcurl supports LDAP */
+ #undef LIBCURL_PROTOCOL_LDAP
+ /* Defined if libcurl supports TELNET */
+ #undef LIBCURL_PROTOCOL_TELNET
+ /* Defined if libcurl supports TFTP */
+ #undef LIBCURL_PROTOCOL_TFTP
  
  /* A comma-separated list of two integers, determining the minimum and maximum
-    reserved TCP port numbers sockets should be bound to. (mainly for
+    reserved TCP port numbers sockets should be bound to. (mainly for
     amrecover) */
  #undef LOW_TCPPORTRANGE
  
  /* LPRCMD switch for specifying a printer name. */
  #undef LPRFLAG
  
- /* Define to a program that understands -s "subject" user < message_file */
+ /* A program that understands -s "subject" user < message_file */
  #undef MAILER
  
  /* Maximum size of a tape block in KBytes. */
  #undef MAX_TAPE_BLOCK_KB
  
- /* Defined to the switch to be used when invoking mt to specify the * tape
-    device. */
+ /* The switch to be used when invoking mt to specify the * tape device. */
  #undef MT_FILE_FLAG
  
  /* Define on Cygwin. */
  #undef NEED_PATH_ENV
  
- /* Define if we have to reset tape offsets when reacing 2GB. */
+ /* Define if we have to reset tape offsets when reaching 2GB. */
  #undef NEED_RESETOFS
  
  /* Name of package */
  /* Define if the pthread_in_use() detection is hard. */
  #undef PTHREAD_IN_USE_DETECTION_HARD
  
+ /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+    'ptrdiff_t'. */
+ #undef PTRDIFF_T_SUFFIX
  /* Define as the prefix for raw disk devices, commonly /dev/r or /dev/rdsk/ */
  #undef RDEV_PREFIX
  
+ /* Define if vasnprintf exists but is overridden by gnulib. */
+ #undef REPLACE_VASNPRINTF
  /* Define the location of the ufsrestore or restore program. */
  #undef RESTORE
  
  /* The Kerberos server key file. */
  #undef SERVER_HOST_KEY_FILE
  
- /* The Kerberos server principle. */
- #undef SERVER_HOST_PRINCIPLE
+ /* The Kerberos server principal. */
+ #undef SERVER_HOST_PRINCIPAL
  
  /* A suffix that will be appended to service names. * Useful for testing in
     parallel with a working version. */
  /* Define to type of shmget() function argument. */
  #undef SHM_ARG_TYPE
  
- /* The size of a `char', as computed by sizeof. */
- #undef SIZEOF_CHAR
+ /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+    'sig_atomic_t'. */
+ #undef SIG_ATOMIC_T_SUFFIX
+ /* Define if all of Amanda will run as a single userid (e.g., on Cygwin or for
+    installchecks) */
+ #undef SINGLE_USERID
  
- /* The size of `int', as computed by sizeof. */
+ /* The size of `int', as computed by sizeof. */
  #undef SIZEOF_INT
  
- /* The size of `intmax_t', as computed by sizeof. */
+ /* The size of `intmax_t', as computed by sizeof. */
  #undef SIZEOF_INTMAX_T
  
- /* The size of `long', as computed by sizeof. */
+ /* The size of `long', as computed by sizeof. */
  #undef SIZEOF_LONG
  
- /* The size of `long long', as computed by sizeof. */
+ /* The size of `long long', as computed by sizeof. */
  #undef SIZEOF_LONG_LONG
  
- /* The size of `off_t', as computed by sizeof. */
+ /* The size of `off_t', as computed by sizeof. */
  #undef SIZEOF_OFF_T
  
- /* The size of a `short', as computed by sizeof. */
- #undef SIZEOF_SHORT
- /* The size of a `size_t', as computed by sizeof. */
+ /* The size of `size_t', as computed by sizeof. */
  #undef SIZEOF_SIZE_T
  
- /* The size of `ssize_t', as computed by sizeof. */
+ /* The size of `ssize_t', as computed by sizeof. */
  #undef SIZEOF_SSIZE_T
  
- /* The size of `time_t', as computed by sizeof. */
+ /* The size of `time_t', as computed by sizeof. */
  #undef SIZEOF_TIME_T
  
- /* The size of a `void*', as computed by sizeof. */
- #undef SIZEOF_VOIDP
  /* Define as the maximum value of type 'size_t', if the system doesn't define
     it. */
  #undef SIZE_MAX
  
+ /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+    'size_t'. */
+ #undef SIZE_T_SUFFIX
  /* Define to the exact path to the sort program. */
  #undef SORT_PATH
  
  
  /* If using the C implementation of alloca, define if you know the
     direction of stack growth for your system; otherwise it will be
-    automatically deduced at run-time.
+    automatically deduced at runtime.
        STACK_DIRECTION > 0 => grows toward higher addresses
        STACK_DIRECTION < 0 => grows toward lower addresses
        STACK_DIRECTION = 0 => direction of growth unknown */
  #undef STACK_DIRECTION
  
- /* Define on OSF1. */
- #undef STATFS_OSF1
+ /* Define if the block counts reported by statfs may be truncated to 2GB and
+    the correct values may be stored in the f_spare array. (SunOS 4.1.2, 4.1.3,
+    and 4.1.3_U1 are reported to have this problem. SunOS 4.1.1 seems not to be
+    affected.) */
+ #undef STATFS_TRUNCATES_BLOCK_COUNTS
+ /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+ #undef STAT_MACROS_BROKEN
+ /* Define if there is no specific function for reading file systems usage
+    information and you have the <sys/filsys.h> header file. (SVR2) */
+ #undef STAT_READ_FILSYS
+ /* Define if statfs takes 2 args and struct statfs has a field named f_bsize.
+    (4.3BSD, SunOS 4, HP-UX, AIX PS/2) */
+ #undef STAT_STATFS2_BSIZE
  
- /* Define on SCO OS5. */
- #undef STATFS_SCO_OS5
+ /* Define if statfs takes 2 args and struct statfs has a field named f_fsize.
+    (4.4BSD, NetBSD) */
+ #undef STAT_STATFS2_FSIZE
  
- /* Define on Ultrix. */
- #undef STATFS_ULTRIX
+ /* Define if statfs takes 2 args and the second argument has type struct
+    fs_data. (Ultrix) */
+ #undef STAT_STATFS2_FS_DATA
+ /* Define if statfs takes 3 args. (DEC Alpha running OSF/1) */
+ #undef STAT_STATFS3_OSF1
+ /* Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin) */
+ #undef STAT_STATFS4
+ /* Define if there is a function named statvfs. (SVR4) */
+ #undef STAT_STATVFS
  
  /* Define to 1 if you have the ANSI C header files. */
  #undef STDC_HEADERS
  
- /* A comma-separated list of two integers, determining the minimum and maximum
-    unreserved TCP port numbers sockets should be bound to. */
+ /* A comma-separated list of two integers, determining the minimum and *
+    maximum unreserved TCP port numbers sockets should be bound to. */
  #undef TCPPORTRANGE
  
- /* Define to enable the text-based database format. */
- #undef TEXTDB
  /* The Kerberos ticket lifetime. */
  #undef TICKET_LIFETIME
  
  /* Define to 1 if your <sys/time.h> declares `struct tm'. */
  #undef TM_IN_SYS_TIME
  
- /* A comma-separated list of two integers, determining the minimum and maximum
-    reserved UDP port numbers sockets should be bound to. */
+ /* A comma-separated list of two integers, determining the minimum and *
+    maximum reserved UDP port numbers sockets should be bound to. */
  #undef UDPPORTRANGE
  
  /* Define as any optional arguments to get UNCOMPRESS_PATH to uncompress. */
  /* Define as the exact path to the gzip or compress command. */
  #undef UNCOMPRESS_PATH
  
- /* Define if you want to use the .amandahosts for BSD security. */
+ /* Define if you want to use the ".amandahosts" for BSD security. */
  #undef USE_AMANDAHOSTS
  
- /* Define to enable dbm databases. */
- #undef USE_DBM_H
- /* Define to enable db databases. */
- #undef USE_DB_H
- /* Define to use flock for file locking. */
- #undef USE_FLOCK
  /* Define for backups being done on a multiple networks and FQDNs are used. */
  #undef USE_FQDN
  
- /* Define to enable gdbm databases. */
- #undef USE_GDBM_H
- /* Define to use a hard-link based approach for file locking. */
- #undef USE_LNLOCK
- /* Define to use lockf for file locking. */
- #undef USE_LOCKF
- /* Define to enable ndbm databases. */
- #undef USE_NDBM_H
- /* Define to use Posix fcntl for file locking. */
- #undef USE_POSIX_FCNTL
  /* Define if the POSIX multithreading library can be used. */
  #undef USE_POSIX_THREADS
  
  /* Define if the Win32 multithreading API can be used. */
  #undef USE_WIN32_THREADS
  
 +/* Define on UnixWare. */
 +#undef UWARE_TAPEIO
 +
  /* Define the location of the vdump program. */
  #undef VDUMP
  
  /* Defined if wait() puts the status in a union wait instead of int. */
  #undef WAIT_USES_UNION
  
+ /* Define to use flock(2) for file locking */
+ #undef WANT_AMFLOCK_FLOCK
+ /* Define to use link(2) to emulate file locking. */
+ #undef WANT_AMFLOCK_LNLOCK
+ /* Define to use lockf(3) for file locking. */
+ #undef WANT_AMFLOCK_LOCKF
+ /* Define to use POSIX (fcntl()) for file locking */
+ #undef WANT_AMFLOCK_POSIX
+ /* Compile Amazon DevPay support */
+ #undef WANT_DEVPAY
+ /* Compile Amazon S3 driver */
+ #undef WANT_S3_DEVICE
+ /* Define if clients should be built setuid-root */
+ #undef WANT_SETUID_CLIENT
+ /* Define on AIX. */
+ #undef WANT_TAPE_AIX
+ /* Define if the tape-device will be built */
+ #undef WANT_TAPE_DEVICE
+ /* Define on UnixWare. */
+ #undef WANT_TAPE_UWARE
+ /* Define on XENIX/ISC. */
+ #undef WANT_TAPE_XENIX
+ /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+    'wchar_t'. */
+ #undef WCHAR_T_SUFFIX
+ /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+    'wint_t'. */
+ #undef WINT_T_SUFFIX
  /* Define to 1 if your processor stores words with the most significant byte
     first (like Motorola and SPARC, unlike Intel and VAX). */
  #undef WORDS_BIGENDIAN
  
- /* Define if IPv6 is working. */
+ /* Target system has functional IPv6 support */
  #undef WORKING_IPV6
  
 +/* Define on XENIX/ISC. */
 +#undef XENIX_TAPEIO
 +
  /* Define the location of the xfsdump program on Irix hosts. */
  #undef XFSDUMP
  
     `char[]'. */
  #undef YYTEXT_POINTER
  
- /* Define to 1 if on AIX 3.
-    System headers sometimes define this.
-    We just want to avoid a redefinition error message.  */
- #ifndef _ALL_SOURCE
- # undef _ALL_SOURCE
- #endif
  /* Number of bits in a file offset, on hosts where this is settable. */
  #undef _FILE_OFFSET_BITS
  
  /* Define to 1 if you need to in order for `stat' and other things to work. */
  #undef _POSIX_SOURCE
  
- /* Enable extensions on Solaris.  */
- #ifndef __EXTENSIONS__
- # undef __EXTENSIONS__
+ /* Enable extensions on AIX 3, Interix.  */
+ #ifndef _ALL_SOURCE
+ # undef _ALL_SOURCE
+ #endif
+ /* Enable GNU extensions on systems that have them.  */
+ #ifndef _GNU_SOURCE
+ # undef _GNU_SOURCE
  #endif
+ /* Enable threading extensions on Solaris.  */
  #ifndef _POSIX_PTHREAD_SEMANTICS
  # undef _POSIX_PTHREAD_SEMANTICS
  #endif
+ /* Enable extensions on HP NonStop.  */
  #ifndef _TANDEM_SOURCE
  # undef _TANDEM_SOURCE
  #endif
+ /* Enable general extensions on Solaris.  */
+ #ifndef __EXTENSIONS__
+ # undef __EXTENSIONS__
+ #endif
+ /* Directory in which Amanda header files should be installed */
+ #undef amincludedir
+ /* Directory in which Amanda libraries should be installed */
+ #undef amlibdir
+ /* Directory in which Amanda own programs should be installed */
+ #undef amlibexecdir
+ /* Directory in which perl modules should be installed */
+ #undef amperldir
  
  /* Directory in which user binaries should be installed. */
  #undef bindir
  /* Define to empty if `const' does not conform to ANSI C. */
  #undef const
  
+ /* Define curl_free() as free() if our version of curl lacks curl_free. */
+ #undef curl_free
+ /* Type for curl_off_t, if it is not defined by the system */
+ #undef curl_off_t
  /* Define to `int' if <sys/types.h> doesn't define. */
  #undef gid_t
  
+ /* Define to rpl_gmtime if the replacement function should be used. */
+ #undef gmtime
+ /* Type for in_port_t, if it is not defined by the system */
+ #undef in_port_t
  /* Define to `__inline__' or `__inline' if that's what the C compiler
     calls it, or to nothing if 'inline' is not supported under any name.  */
  #ifndef __cplusplus
  /* Directory in which internal binaries should be installed. */
  #undef libexecdir
  
+ /* Define to rpl_localtime if the replacement function should be used. */
+ #undef localtime
  /* Directory in which man-pages should be installed */
  #undef mandir
  
- /* Define to `long' if <sys/types.h> does not define. */
+ /* Define to `long int' if <sys/types.h> does not define. */
  #undef off_t
  
  /* Define to `int' if <sys/types.h> does not define. */
     supported. Do not define if restrict is supported directly. */
  #undef restrict
  
- /* Define if sa_family_t is not a standard system type */
+ /* Type for sa_family_t, if it is not defined by the system */
  #undef sa_family_t
  
  /* Directory in which administrator binaries should be installed. */
  #undef sbindir
  
- /* Define to `unsigned' if <sys/types.h> does not define. */
+ /* Define to `unsigned int' if <sys/types.h> does not define. */
  #undef size_t
  
- /* Define if socklen_t is not a standard system type */
+ /* type to use in place of socklen_t if not defined */
  #undef socklen_t
  
+ /* type to use for socket length parameters; use instead of socklen_t */
+ #undef socklen_t_equiv
+ /* Define as a signed type of the same size as size_t. */
+ #undef ssize_t
  /* Define to `int' if <sys/types.h> doesn't define. */
  #undef uid_t
diff --combined config/config.sub
index 6759825a5b7fcf64476b4398dc0e30b3090b925c,2a4932e7f58c367a246c5cfbbbb9d19e9c932203..695284aef45fd64f3e27b4e4ff9a43cda206b2c0
@@@ -1,10 -1,10 +1,10 @@@
  #! /bin/sh
  # Configuration validation subroutine script.
  #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- #   Free Software Foundation, Inc.
+ #   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+ #   Inc.
  
- timestamp='2008-01-16'
+ timestamp='2007-01-18'
  
  # This file is (in principle) common to ALL GNU software.
  # The presence of a machine in this file suggests that SOME GNU software
@@@ -72,8 -72,8 +72,8 @@@ Report bugs and patches to <config-patc
  version="\
  GNU config.sub ($timestamp)
  
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 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."
@@@ -244,7 -244,7 +244,7 @@@ case $basic_machine i
        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
        | bfin \
        | c4x | clipper \
-       | d10v | d30v | dlx | dsp16xx \
+       | d10v | d30v | dlx | dsp16xx | dvp \
        | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
        | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa*-* \
+       | xstormy16-* | xtensa-* \
        | ymp-* \
        | z8k-*)
                ;;
 +      # Recognize the basic CPU types without company name, with glob match.
 +      xtensa*)
 +              basic_machine=$basic_machine-unknown
 +              ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
        386bsd)
                basic_machine=ns32k-sequent
                os=-dynix
                ;;
 +      blackfin)
 +              basic_machine=bfin-unknown
 +              os=-linux
 +              ;;
 +      blackfin-*)
 +              basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
 +              os=-linux
 +              ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16)
-               basic_machine=cr16-unknown
+       cr16c)
+               basic_machine=cr16c-unknown
                os=-elf
                ;;
        crds | unos)
                basic_machine=m68k-isi
                os=-sysv
                ;;
 +      m68knommu)
 +              basic_machine=m68k-unknown
 +              os=-linux
 +              ;;
 +      m68knommu-*)
 +              basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
 +              os=-linux
 +              ;;
        m88k-omron*)
                basic_machine=m88k-omron
                ;;
                basic_machine=i386-pc
                os=-mingw32
                ;;
 +      mingw32ce)
 +              basic_machine=arm-unknown
 +              os=-mingw32ce
 +              ;;
        miniframe)
                basic_machine=m68000-convergent
                ;;
                basic_machine=m68k-atari
                os=-mint
                ;;
+       mipsEE* | ee | ps2)
+               basic_machine=mips64r5900el-scei
+               case $os in
+                   -linux*)
+                       ;;
+                   *)
+                       os=-elf
+                       ;;
+               esac
+               ;;
+       iop)
+               basic_machine=mipsel-scei
+               os=-irx
+               ;;
+       dvp)
+               basic_machine=dvp-scei
+               os=-elf
+               ;;
        mips3*-*)
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
                ;;
                basic_machine=i860-intel
                os=-osf
                ;;
 +      parisc)
 +              basic_machine=hppa-unknown
 +              os=-linux
 +              ;;
 +      parisc-*)
 +              basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
 +              os=-linux
 +              ;;
        pbd)
                basic_machine=sparc-tti
                ;;
                basic_machine=tic6x-unknown
                os=-coff
                ;;
 +      tile*)
 +              basic_machine=tile-unknown
 +              os=-linux-gnu
 +              ;;
        tx39)
                basic_machine=mipstx39-unknown
                ;;
@@@ -1258,7 -1240,7 +1276,7 @@@ case $os i
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
diff --combined configure
index 08704fb549cc4f611ddd6e3e673bdefd295e1a2f,49ddd558d6e39df0daedc71056759463218117b8..d90c7e7bb306be6a95640180bd654d2655b8c7e7
+++ b/configure
@@@ -1,25 -1,54 +1,54 @@@
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
- # 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.
  ## --------------------- ##
  ## 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
+ # 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
- DUALCASE=1; export DUALCASE # for MKS sh
  
  # Support unset when possible.
  if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@@ -29,8 -58,43 +58,43 @@@ els
  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='+ '
    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
  
  
  # 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@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=:
@@@ -222,7 -518,28 +518,28 @@@ els
    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'"
  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
  
  
  # Check that we are running under the correct shell.
@@@ -395,29 -703,26 +703,26 @@@ tagnames=${tagnames+${tagnames},}CX
  
  tagnames=${tagnames+${tagnames},}F77
  
+ 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=
  PACKAGE_TARNAME=
@@@ -429,43 -734,548 +734,548 @@@ ac_unique_file="common-src/amanda.h
  # 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"
  
  gl_header_list=
- 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 target target_cpu target_vendor target_os CONFIGURE_COMMAND INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar SNAPSHOT_STAMP VERSION_MAJOR VERSION_MINOR VERSION_PATCH VERSION_COMMENT VERSION_SUFFIX CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB CPP EGREP GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE ALLOCA ALLOCA_H ARPA_INET_H SYS_SOCKET_H LIBPTH LTLIBPTH LIBPTH_PREFIX LIBTHREAD LTLIBTHREAD LIBMULTITHREAD LTLIBMULTITHREAD NETINET_IN_H STDBOOL_H HAVE__BOOL HAVE_DECL_MEMMEM HAVE_MEMPCPY HAVE_DECL_MEMRCHR HAVE_STPCPY HAVE_STPNCPY HAVE_DECL_STRNCASECMP HAVE_STRCHRNUL HAVE_DECL_STRDUP HAVE_STRNDUP HAVE_DECL_STRNDUP HAVE_DECL_STRNLEN HAVE_STRPBRK HAVE_STRSEP HAVE_DECL_STRTOK_R REPLACE_STRCASECMP REPLACE_STRSTR REPLACE_STRCASESTR ABSOLUTE_STRING_H MKDIR_P EOVERFLOW CFLAG_VISIBILITY HAVE_VISIBILITY GREP AMLINT AMLINTFLAGS DUMPER_DIR CONFIG_DIR USE_VERSION_SUFFIXES CLIENT_SCRIPTS_OPT DEFAULT_SERVER CLIENT_LOGIN SETUID_GROUP BINARY_OWNER DEFAULT_CONFIG DEFAULT_TAPE_SERVER DEFAULT_TAPE_DEVICE EXAMPLE_TAPEDEV DEFAULT_RAW_TAPE_DEVICE DEFAULT_CHANGER_DEVICE GNUTAR_LISTED_INCREMENTAL_DIRX GNUTAR_LISTED_INCREMENTAL_DIR SSH MAXTAPEBLOCKSIZE AMANDA_TMPDIR AMANDA_DBGDIR AMANDA_DEBUG_DAYS SERVICE_SUFFIX MT_FILE_FLAG AR YACC CAT COMPRESS DD GETCONF GNUPLOT GNUTAR SAMBA_CLIENT GZIP SORT MAILER MT CHIO CHS MTX MCUTIL PRINT PCAT PERL DUMP RESTORE XFSDUMP XFSRESTORE VXDUMP VXRESTORE VDUMP VRESTORE AMPLOT_COMPRESS AMPLOT_CAT_GZIP AMPLOT_CAT_COMPRESS AMPLOT_CAT_PACK LL_FMT LL_RFMT LN_S ECHO ac_ct_AR CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS LEX LEXLIB LEX_OUTPUT_ROOT READLINE_LIBS DB_EXT ac_n ac_c WANT_CLIENT_TRUE WANT_CLIENT_FALSE WANT_SAMBA_TRUE WANT_SAMBA_FALSE WANT_RESTORE_TRUE WANT_RESTORE_FALSE WANT_SERVER_TRUE WANT_SERVER_FALSE WANT_RECOVER_TRUE WANT_RECOVER_FALSE WANT_TAPE_TRUE WANT_TAPE_FALSE WANT_AMPLOT_TRUE WANT_AMPLOT_FALSE WANT_CHG_SCSI_TRUE WANT_CHG_SCSI_FALSE WANT_CHIO_SCSI_TRUE WANT_CHIO_SCSI_FALSE WANT_RUNTIME_PSEUDO_RELOC_TRUE WANT_RUNTIME_PSEUDO_RELOC_FALSE WANT_SETUID_CLIENT_TRUE WANT_SETUID_CLIENT_FALSE WANT_SSH_SECURITY_TRUE WANT_SSH_SECURITY_FALSE LTLIBOBJS LTALLOCA DOC_BUILD_DATE XSLTPROC_FLAGS XSLTPROC ENABLE_MANPAGE_BUILD_TRUE ENABLE_MANPAGE_BUILD_FALSE GCC_COMPILER_TRUE GCC_COMPILER_FALSE AM_CFLAGS LIBOBJS gl_LIBOBJS gl_LTLIBOBJS'
+ gl_func_list=
+ 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
+ target
+ target_cpu
+ target_vendor
+ target_os
+ PACKAGE
+ INSTALL_PROGRAM
+ INSTALL_SCRIPT
+ INSTALL_DATA
+ am__isrc
+ CYGPATH_W
+ VERSION
+ ACLOCAL
+ AUTOCONF
+ AUTOMAKE
+ AUTOHEADER
+ MAKEINFO
+ install_sh
+ STRIP
+ INSTALL_STRIP_PROGRAM
+ mkdir_p
+ AWK
+ SET_MAKE
+ am__leading_dot
+ AMTAR
+ am__tar
+ am__untar
+ SNAPSHOT_STAMP
+ VERSION_MAJOR
+ VERSION_MINOR
+ VERSION_PATCH
+ VERSION_COMMENT
+ VERSION_SUFFIX
+ CC
+ CFLAGS
+ LDFLAGS
+ CPPFLAGS
+ ac_ct_CC
+ EXEEXT
+ OBJEXT
+ DEPDIR
+ am__include
+ am__quote
+ AMDEP_TRUE
+ AMDEP_FALSE
+ AMDEPBACKSLASH
+ CCDEPMODE
+ am__fastdepCC_TRUE
+ am__fastdepCC_FALSE
+ RANLIB
+ CPP
+ GREP
+ EGREP
+ GL_COND_LIBTOOL_TRUE
+ GL_COND_LIBTOOL_FALSE
+ ALLOCA
+ ALLOCA_H
+ ARPA_INET_H
+ INCLUDE_NEXT
+ NEXT_FLOAT_H
+ FLOAT_H
+ NEXT_SYS_SOCKET_H
+ HAVE_SYS_SOCKET_H
+ HAVE_WINSOCK2_H
+ HAVE_WS2TCPIP_H
+ SYS_SOCKET_H
+ LIBINTL
+ LTLIBINTL
+ NEXT_SYS_TIME_H
+ HAVE_SYS_TIME_H
+ HAVE_STRUCT_TIMEVAL
+ REPLACE_GETTIMEOFDAY
+ SYS_TIME_H
+ LIBPTH
+ LTLIBPTH
+ LIBTHREAD
+ LTLIBTHREAD
+ LIBMULTITHREAD
+ LTLIBMULTITHREAD
+ HAVE_MALLOC_POSIX
+ GNULIB_MALLOC_POSIX
+ GNULIB_REALLOC_POSIX
+ GNULIB_CALLOC_POSIX
+ GNULIB_GETSUBOPT
+ GNULIB_MKDTEMP
+ GNULIB_MKSTEMP
+ HAVE_CALLOC_POSIX
+ HAVE_GETSUBOPT
+ HAVE_MKDTEMP
+ HAVE_REALLOC_POSIX
+ REPLACE_MKSTEMP
+ NEXT_NETINET_IN_H
+ HAVE_NETINET_IN_H
+ NETINET_IN_H
+ GNULIB_FPRINTF_POSIX
+ GNULIB_PRINTF_POSIX
+ GNULIB_SNPRINTF
+ GNULIB_SPRINTF_POSIX
+ GNULIB_VFPRINTF_POSIX
+ GNULIB_VPRINTF_POSIX
+ GNULIB_VSNPRINTF
+ GNULIB_VSPRINTF_POSIX
+ GNULIB_VASPRINTF
+ GNULIB_FSEEK
+ GNULIB_FSEEKO
+ GNULIB_FTELL
+ GNULIB_FTELLO
+ GNULIB_FFLUSH
+ GNULIB_GETDELIM
+ GNULIB_GETLINE
+ REPLACE_FPRINTF
+ REPLACE_VFPRINTF
+ REPLACE_PRINTF
+ REPLACE_VPRINTF
+ REPLACE_SNPRINTF
+ HAVE_DECL_SNPRINTF
+ REPLACE_VSNPRINTF
+ HAVE_DECL_VSNPRINTF
+ REPLACE_SPRINTF
+ REPLACE_VSPRINTF
+ HAVE_VASPRINTF
+ REPLACE_VASPRINTF
+ HAVE_FSEEKO
+ REPLACE_FSEEKO
+ REPLACE_FSEEK
+ HAVE_FTELLO
+ REPLACE_FTELLO
+ REPLACE_FTELL
+ REPLACE_FFLUSH
+ HAVE_DECL_GETDELIM
+ HAVE_DECL_GETLINE
+ REPLACE_GETLINE
+ STDBOOL_H
+ HAVE__BOOL
+ HAVE_LONG_LONG_INT
+ HAVE_UNSIGNED_LONG_LONG_INT
+ HAVE_INTTYPES_H
+ HAVE_SYS_TYPES_H
+ NEXT_STDINT_H
+ HAVE_STDINT_H
+ HAVE_SYS_INTTYPES_H
+ HAVE_SYS_BITYPES_H
+ BITSIZEOF_PTRDIFF_T
+ BITSIZEOF_SIG_ATOMIC_T
+ BITSIZEOF_SIZE_T
+ BITSIZEOF_WCHAR_T
+ BITSIZEOF_WINT_T
+ HAVE_SIGNED_SIG_ATOMIC_T
+ HAVE_SIGNED_WCHAR_T
+ HAVE_SIGNED_WINT_T
+ PTRDIFF_T_SUFFIX
+ SIG_ATOMIC_T_SUFFIX
+ SIZE_T_SUFFIX
+ WCHAR_T_SUFFIX
+ WINT_T_SUFFIX
+ STDINT_H
+ NEXT_STDIO_H
+ NEXT_STDLIB_H
+ GNULIB_MEMMEM
+ GNULIB_MEMPCPY
+ GNULIB_MEMRCHR
+ GNULIB_STPCPY
+ GNULIB_STPNCPY
+ GNULIB_STRCHRNUL
+ GNULIB_STRDUP
+ GNULIB_STRNDUP
+ GNULIB_STRNLEN
+ GNULIB_STRPBRK
+ GNULIB_STRSEP
+ GNULIB_STRCASESTR
+ GNULIB_STRTOK_R
+ GNULIB_MBSLEN
+ GNULIB_MBSNLEN
+ GNULIB_MBSCHR
+ GNULIB_MBSRCHR
+ GNULIB_MBSSTR
+ GNULIB_MBSCASECMP
+ GNULIB_MBSNCASECMP
+ GNULIB_MBSPCASECMP
+ GNULIB_MBSCASESTR
+ GNULIB_MBSCSPN
+ GNULIB_MBSPBRK
+ GNULIB_MBSSPN
+ GNULIB_MBSSEP
+ GNULIB_MBSTOK_R
+ HAVE_DECL_MEMMEM
+ HAVE_MEMPCPY
+ HAVE_DECL_MEMRCHR
+ HAVE_STPCPY
+ HAVE_STPNCPY
+ HAVE_STRCASECMP
+ HAVE_DECL_STRNCASECMP
+ HAVE_STRCHRNUL
+ HAVE_DECL_STRDUP
+ HAVE_STRNDUP
+ HAVE_DECL_STRNDUP
+ HAVE_DECL_STRNLEN
+ HAVE_STRPBRK
+ HAVE_STRSEP
+ HAVE_STRCASESTR
+ HAVE_DECL_STRTOK_R
+ NEXT_STRING_H
+ HAVE_LSTAT
+ HAVE_DECL_MKDIR
+ HAVE_IO_H
+ NEXT_SYS_STAT_H
+ SYS_STAT_H
+ GNULIB_CHOWN
+ GNULIB_DUP2
+ GNULIB_FCHDIR
+ GNULIB_FTRUNCATE
+ GNULIB_GETCWD
+ GNULIB_GETLOGIN_R
+ GNULIB_LCHOWN
+ GNULIB_LSEEK
+ GNULIB_READLINK
+ GNULIB_SLEEP
+ HAVE_DUP2
+ HAVE_FTRUNCATE
+ HAVE_READLINK
+ HAVE_SLEEP
+ HAVE_DECL_GETLOGIN_R
+ REPLACE_CHOWN
+ REPLACE_FCHDIR
+ REPLACE_GETCWD
+ REPLACE_LCHOWN
+ REPLACE_LSEEK
+ NEXT_UNISTD_H
+ HAVE_UNISTD_H
+ EOVERFLOW
+ CFLAG_VISIBILITY
+ HAVE_VISIBILITY
+ GNULIB_WCWIDTH
+ HAVE_DECL_WCWIDTH
+ REPLACE_WCWIDTH
+ WCHAR_H
+ HAVE_WCHAR_H
+ NEXT_WCHAR_H
+ AMANDA_WARNING_CFLAGS
+ CLIENT_LOGIN
+ SETUID_GROUP
+ CONFIG_DIR
+ USE_VERSION_SUFFIXES
+ GNUTAR_LISTED_INCREMENTAL_DIR
+ AMANDA_TMPDIR
+ BINARY_OWNER
+ MAXTAPEBLOCKSIZE
+ AMANDA_DBGDIR
+ AMANDA_DEBUG_DAYS
+ SERVICE_SUFFIX
+ WANT_SETUID_CLIENT_TRUE
+ WANT_SETUID_CLIENT_FALSE
+ WANT_INSTALLPERMS_TRUE
+ WANT_INSTALLPERMS_FALSE
+ WANT_CLIENT_TRUE
+ WANT_CLIENT_FALSE
+ WANT_RESTORE_TRUE
+ WANT_RESTORE_FALSE
+ WANT_SERVER_TRUE
+ WANT_SERVER_FALSE
+ WANT_RECOVER_TRUE
+ WANT_RECOVER_FALSE
+ WANT_TAPE_TRUE
+ WANT_TAPE_FALSE
+ GNUPLOT
+ PCAT
+ COMPRESS
+ GZIP
+ AMPLOT_COMPRESS
+ AMPLOT_CAT_GZIP
+ AMPLOT_CAT_COMPRESS
+ AMPLOT_CAT_PACK
+ WANT_AMPLOT_TRUE
+ WANT_AMPLOT_FALSE
+ XSLTPROC_FLAGS
+ XSLTPROC
+ ENABLE_MANPAGE_BUILD_TRUE
+ ENABLE_MANPAGE_BUILD_FALSE
+ XSLREL
+ DOC_BUILD_DATE
+ DEFAULT_SERVER
+ DEFAULT_CONFIG
+ DEFAULT_TAPE_SERVER
+ DEFAULT_TAPE_DEVICE
+ EXAMPLE_TAPEDEV
+ DEFAULT_CHANGER_DEVICE
+ DEFAULT_AMANDATES_FILE
+ GETCONF
+ CHIO
+ CHS
+ MTX
+ MCUTIL
+ WANT_CHG_SCSI_TRUE
+ WANT_CHG_SCSI_FALSE
+ WANT_SCSI_LINUX_TRUE
+ WANT_SCSI_LINUX_FALSE
+ WANT_SCSI_HPUX_NEW_TRUE
+ WANT_SCSI_HPUX_NEW_FALSE
+ WANT_SCSI_IRIX_TRUE
+ WANT_SCSI_IRIX_FALSE
+ WANT_SCSI_SOLARIS_TRUE
+ WANT_SCSI_SOLARIS_FALSE
+ WANT_SCSI_AIX_TRUE
+ WANT_SCSI_AIX_FALSE
+ WANT_SCSI_CAM_TRUE
+ WANT_SCSI_CAM_FALSE
+ WANT_SCSI_BSD_TRUE
+ WANT_SCSI_BSD_FALSE
+ WANT_CHG_SCSI_CHIO_TRUE
+ WANT_CHG_SCSI_CHIO_FALSE
+ WANT_SCSI_HPUX_TRUE
+ WANT_SCSI_HPUX_FALSE
+ WANT_SCSI_CHIO_TRUE
+ WANT_SCSI_CHIO_FALSE
+ WANT_AMFLOCK_POSIX_TRUE
+ WANT_AMFLOCK_POSIX_FALSE
+ WANT_AMFLOCK_FLOCK_TRUE
+ WANT_AMFLOCK_FLOCK_FALSE
+ WANT_AMFLOCK_LOCKF_TRUE
+ WANT_AMFLOCK_LOCKF_FALSE
+ WANT_AMFLOCK_LNLOCK_TRUE
+ WANT_AMFLOCK_LNLOCK_FALSE
+ SWIG
+ SWIG_LIB
+ PERL
+ PERL_INC
+ WANT_CYGWIN_COPY_PERL_DLL_TRUE
+ WANT_CYGWIN_COPY_PERL_DLL_FALSE
+ PERLEXTLIBS
+ CAT
+ CLIENT_SCRIPTS_OPT
+ amlibdir
+ amlibexecdir
+ amincludedir
+ amperldir
+ DUMPER_DIR
+ MSGFMT
+ GETTEXT
+ USE_NLS
+ GMSGFMT
+ MSGFMT_015
+ GMSGFMT_015
+ XGETTEXT
+ XGETTEXT_015
+ MSGMERGE
+ INTL_MACOSX_LIBS
+ LIBICONV
+ LTLIBICONV
+ INTLLIBS
+ POSUB
+ CURL_CONFIG
+ _libcurl_config
+ LIBCURL_CPPFLAGS
+ LIBCURL
+ WANT_S3_DEVICE_TRUE
+ WANT_S3_DEVICE_FALSE
+ WANT_DEVPAY_TRUE
+ WANT_DEVPAY_FALSE
+ WANT_TAPE_XENIX_TRUE
+ WANT_TAPE_XENIX_FALSE
+ WANT_TAPE_AIX_TRUE
+ WANT_TAPE_AIX_FALSE
+ WANT_TAPE_UWARE_TRUE
+ WANT_TAPE_UWARE_FALSE
+ WANT_TAPE_POSIX_TRUE
+ WANT_TAPE_POSIX_FALSE
+ WANT_TAPE_DEVICE_TRUE
+ WANT_TAPE_DEVICE_FALSE
+ WANT_BSD_SECURITY_TRUE
+ WANT_BSD_SECURITY_FALSE
+ WANT_BSDTCP_SECURITY_TRUE
+ WANT_BSDTCP_SECURITY_FALSE
+ WANT_BSDUDP_SECURITY_TRUE
+ WANT_BSDUDP_SECURITY_FALSE
+ WANT_RSH_SECURITY_TRUE
+ WANT_RSH_SECURITY_FALSE
+ SSH
+ WANT_SSH_SECURITY_TRUE
+ WANT_SSH_SECURITY_FALSE
+ WANT_KRB4_SECURITY_TRUE
+ WANT_KRB4_SECURITY_FALSE
+ WANT_KRB5_SECURITY_TRUE
+ WANT_KRB5_SECURITY_FALSE
+ XFSDUMP
+ XFSRESTORE
+ VXDUMP
+ VXRESTORE
+ VDUMP
+ VRESTORE
+ DUMP
+ RESTORE
+ GNUTAR
+ SAMBA_CLIENT
+ WANT_SAMBA_TRUE
+ WANT_SAMBA_FALSE
+ AMLINT
+ AMLINTFLAGS
+ LEX
+ LEX_OUTPUT_ROOT
+ LEXLIB
+ AR
+ YACC
+ YFLAGS
+ DD
+ BASH
+ SORT
+ MAILER
+ MT
+ MT_FILE_FLAG
+ PRINT
+ GCC_COMPILER_TRUE
+ GCC_COMPILER_FALSE
+ LN_S
+ ECHO
+ CXX
+ CXXFLAGS
+ ac_ct_CXX
+ CXXDEPMODE
+ am__fastdepCXX_TRUE
+ am__fastdepCXX_FALSE
+ CXXCPP
+ F77
+ FFLAGS
+ ac_ct_F77
+ LIBTOOL
+ LIBTOOL_DEPS
+ AMANDA_STATIC_LDFLAGS
+ PKG_CONFIG
+ GLIB_CFLAGS
+ GLIB_LIBS
+ GLIB_GENMARSHAL
+ GOBJECT_QUERY
+ GLIB_MKENUMS
+ READLINE_LIBS
+ LIBOBJS
+ LTLIBOBJS
+ gl_LIBOBJS
+ gl_LTLIBOBJS
+ SVN'
  ac_subst_files=''
+       ac_precious_vars='build_alias
+ host_alias
+ target_alias
+ CC
+ CFLAGS
+ LDFLAGS
+ LIBS
+ CPPFLAGS
+ CPP
+ GNUPLOT
+ SWIG
+ PERL
+ GNUTAR
+ YACC
+ YFLAGS
+ CXX
+ CXXFLAGS
+ CCC
+ CXXCPP
+ F77
+ FFLAGS
+ PKG_CONFIG'
  
  # Initialize some variables set by options.
  ac_init_help=
@@@ -492,34 -1302,48 +1302,48 @@@ x_libraries=NON
  # 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}'
+ 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 ;;
    --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- \
    -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 ;;
    | --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)
    | --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 ;;
    -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.
@@@ -789,8 -1640,7 +1640,7 @@@ Try \`$0 --help' for more information.
      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 ;;
  
    *)
@@@ -810,27 -1660,19 +1660,19 @@@ if test -n "$ac_prev"; the
     { (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; }; };;
-   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; }; };;
+     [\\/$]* | ?:[\\/]* )  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
  
  # There might be people who depend on the old broken behavior: `$host'
@@@ -857,94 -1699,76 +1699,76 @@@ test -n "$host_alias" && ac_tool_prefix
  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
-    { (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
+ 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; }; }
- 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
- ac_env_CXX_set=${CXX+set}
- ac_env_CXX_value=$CXX
- ac_cv_env_CXX_set=${CXX+set}
- ac_cv_env_CXX_value=$CXX
- ac_env_CXXFLAGS_set=${CXXFLAGS+set}
- ac_env_CXXFLAGS_value=$CXXFLAGS
- ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
- ac_cv_env_CXXFLAGS_value=$CXXFLAGS
- ac_env_CXXCPP_set=${CXXCPP+set}
- ac_env_CXXCPP_value=$CXXCPP
- ac_cv_env_CXXCPP_set=${CXXCPP+set}
- ac_cv_env_CXXCPP_value=$CXXCPP
- ac_env_F77_set=${F77+set}
- ac_env_F77_value=$F77
- ac_cv_env_F77_set=${F77+set}
- ac_cv_env_F77_value=$F77
- ac_env_FFLAGS_set=${FFLAGS+set}
- ac_env_FFLAGS_value=$FFLAGS
- ac_cv_env_FFLAGS_set=${FFLAGS+set}
- ac_cv_env_FFLAGS_value=$FFLAGS
+       pwd)`
+ # When building in place, set srcdir=.
+ if test "$ac_abs_confdir" = "$ac_pwd"; then
+   srcdir=.
+ fi
+ # 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.
@@@ -973,9 -1797,6 +1797,6 @@@ Configuration
    -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]
@@@ -993,15 -1814,22 +1814,22 @@@ Fine tuning of the installation directo
    --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/PACKAGE]
+   --htmldir=DIR          html documentation [DOCDIR]
+   --dvidir=DIR           dvi documentation [DOCDIR]
+   --pdfdir=DIR           pdf documentation [DOCDIR]
+   --psdir=DIR            ps documentation [DOCDIR]
  _ACEOF
  
    cat <<\_ACEOF
@@@ -1032,233 -1860,271 +1860,271 @@@ Optional Features
    --disable-threads       build without multithread safety
    --disable-rpath         do not hardcode runtime library paths
    --disable-largefile     omit support for large files
-   --enable-shared[=PKGS]
-                           build shared libraries [default=yes]
-   --enable-static[=PKGS]
-                           build static libraries [default=yes]
+   --disable-installperms  do not modify ownership and permissions on installed
+                           files
+   --enable-manpage-build  Build the manpages from their XML source (shipped
+                           manpages are usually sufficient)
+   --disable-nls           do not use Native Language Support
+   --disable-s3-device     disable the S3 device
+   --enable-devpay         Use devpay authentication for Amazon S3 driver
+   --enable-shared[=PKGS]  build shared libraries [default=yes]
+   --enable-static[=PKGS]  build static libraries [default=yes]
    --enable-fast-install[=PKGS]
                            optimize for fast installation [default=yes]
    --disable-libtool-lock  avoid locking (might break parallel builds)
-   --enable-manpage-build  Build the manpages from their XML source (shipped
-                           manpages are usually sufficient)
+   --enable-static-binary  To build statically linked binaries
+   --disable-glibtest      do not try to compile and run a test GLIB program
  
  Optional Packages:
    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-   --with-cflags=CFLAGS   arguments to the c compiler (-Wall, -g, etc)
    --with-gnu-ld           assume the C compiler uses GNU ld default=no
    --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
    --without-libpth-prefix     don't search for libpth in includedir and libdir
-   --with-includes=DIR    site header files for readline, etc in DIR
-   --with-libraries=DIR   site library directories for readline, etc in DIR
-   --with-dumperdir=DIR   where we install the dumpers [EPREFIX/dumper]
-   --with-configdir=DIR   runtime config files in DIR [sysconfdir/amanda]
-   --with-indexdir        deprecated, use indexdir in amanda.conf
-   --with-dbdir           deprecated, use infofile in amanda.conf
-   --with-logdir          deprecated, use logfile in amanda.conf
+   --with-cflags=FLAGS     deprecated; use ./configure CFLAGS=...
+   --with-includes=INCLUDE-DIRS
+                           deprecated; use ./configure CPPFLAGS='-I.. -I..'
+   --with-libraries=LIBRARY-DIRS
+                           deprecated; use ./configure LDFLAGS='-L.. -L..' (add
+                           -R on Solaris, NetBSD)
+   --with-user=USER        force execution to USER on client systems (REQUIRED)
+   --with-group=GROUP      group allowed to execute setuid-root programs
+                           (REQUIRED)
+   --with-dumperdir=DIR    where we install the dumpers (default:
+                           exec_prefix/dumper)
+   --with-configdir=DIR    runtime config files in DIR [sysconfdir/amanda]
+   --with-indexdir         deprecated: use indexdir in amanda.conf
+   --with-dbdir            deprecated: use infofile in amanda.conf
+   --with-logdir           deprecated: use logfile in amanda.conf
    --with-suffixes        install binaries with version string appended to name
-   --with-client-only     deprecated, use --without-server
-   --with-server-only     deprecated, use --without-client
-   --without-client       do not build client stuff
-   --without-server       do not build server stuff (set --without-restore)
-   --without-restore      do not build amrestore nor amidxtaped
-   --without-amrecover    do not build amrecover
-   --with-index-server=HOST default amanda index server [`uname -n`]
-   --without-force-uid    do not force the uid to --with-user
-   --with-user=USER       force execution to USER on client systems [required]
-   --with-group=GROUP     group allowed to execute setuid-root programs [required]
-   --with-owner=USER       force ownership of files to USER [default == --with-user value]
-   --with-rundump         use rundump (setuid-root) to invoke dump
-   --with-config=CONFIG   default configuration [DailySet1]
-   --with-tape-server=HOST default restoring tape server is HOST [same as --with-index-server]
-   --with-tape-device=ARG restoring tape server HOST's no rewinding tape drive
-   --with-ftape-rawdevice=ARG raw device on tape server HOST's if using Linux ftape >=3.04d
-   --with-rew-tape        deprecated, use --with-tape-device
-   --with-norew-tape=ARG  deprecated, use --with-tape-device
-   --with-changer-device=ARG default tape changer device [/dev/ch0 if it exists]
-   --with-fqdn            use FQDN's to backup multiple networks
-   --with-broken-fsf      only enable if tape fsf calls fail mid-file
-   --without-reuseaddr    Don't closed network connections to be reused until full timeout period.
-   --with-gnutar[=PROG]      use PROG as GNU tar executable [default: looks for one]
-   --with-smbclient[=PROG]   use PROG as Samba's smbclient executable [default: looks for one]
-   --with-samba-user was deprecated
-   --with-gnutar-listdir=DIR  gnutar directory lists go in DIR [localstatedir/amanda/gnutar-lists]
-   --with-gnutar-listed-incremental was deprecated, use --with-gnutar-listdir
-   --without-bsd-security do not use BSD rsh/rlogin style security
-   --without-amandahosts  use .rhosts instead of .amandahosts
-   --with-dbmalloc=DIR  Location of dbmalloc libs and headers
-   --with-ipv6             If IPv6 must be enabled (Default)
-   --without-ipv6          If IPv6 must be disable
-   --with-krb4-security=DIR   Location of Kerberos software [/usr/kerberos /usr/cygnus /usr /opt/kerberos]
-   --with-rsh-security use rsh as a transport
-   --with-ssh-security use ssh as a transport
-   --with-ssh-options=[OPTIONS]
-                           Use these ssh options for ssh security; the default
-                           should work
-   --with-bsdtcp-security use tcp as a transport
-   --with-bsdudp-security use udp as a transport
-     --with-server-principal=ARG    server host principal  ["amanda"]
-     --with-server-instance=ARG     server host instance   ["amanda"]
-     --with-server-keyfile=ARG      server host key file   ["/.amanda"]
-     --with-client-principal=ARG    client host principal  ["rcmd"]
-     --with-client-instance=ARG     client host instance   [HOSTNAME_INSTANCE]
-     --with-client-keyfile=ARG      client host key file   [KEYFILE]
-     --with-ticket-lifetime=ARG     ticket lifetime        [128]
-   --with-krb5-security=DIR   Location of Kerberos V software [/usr/kerberos /usr/cygnus /usr /opt/kerberos]
-   --with-low-tcpportrange=low,high     bind reserved TCP server sockets to ports within this range unlimited (mainly for amrecover)
-   --with-tcpportrange=low,high  bind unreserved TCP server sockets to ports within this range [unlimited]
-   --with-udpportrange=low,high  bind reserved UDP server sockets to ports within this range [unlimited]
-   --with-maxtapeblocksize=kb            Maximum size of a tape block
-   --with-db={text,db,dbm,gdbm,ndbm} use the selected database format [text]
-   --with-mmap            force use of mmap instead of shared memory support
-   --with-buffered-dump   buffer the dumping sockets on the server for speed
-   --with-assertions      compile assertions into code
-   --with-tmpdir=/temp/dir area Amanda can use for temp files [/tmp/amanda]
-   --with[out]-debugging[=/debug/dir] [do not] record runtime debugging information in specified directory [--with-tmpdir]
-   --with-debug-days=NN    number of days to keep debugging files [default=4]
-   --with-testing[=suffix] use alternate service names
+   --with-gnutar-listdir=DIR
+                           put gnutar directory lists in DIR (default:
+                           localstatedir/amanda/gnutar-lists)
+   --with-gnutar-listed-incremental
+                           deprecated; use --with-gnutar-listdir
+   --with-tmpdir           directory for temporary and debugging files
+                           (default: /tmp/amanda)
+   --without-force-uid     do not check userids when running programs
+   --with-owner=USER
+             force ownership of installed files to USER (default same as --with-user)
+   --with-fqdn             use FQDN's to backup multiple networks
+   --without-reuseaddr     Don't reuse network connections until full timeout
+                           period
+   --with-low-tcpportrange=low/high
+                           bind reserved TCP server sockets to ports within
+                           this range (default: unlimited)
+   --with-tcpportrange=low/high
+                           bind unreserved TCP server sockets to ports within
+                           this range (default: unlimited)
+   --with-udpportrange=low/high
+                           bind reserved UDP server sockets to ports within
+                           this range (default: unlimited)
+   --with-buffered-dump    buffer the dumping sockets on the server for speed
+   --with-maxtapeblocksize=kb
+                           Maximum size of a tape block (default: 32)
+   --with-assertions       compile assertions into code
+   --with-debugging=DIR
+             put debug logs in DIR (default same as --with-tmpdir)
+   --with-debug-days=NN    number of days to keep debugging files (default: 4)
+   --with-testing[=SUFFIX] use alternate service names with suffix (default
+                           'test')
+   --with-single-userid
+             force amanda to run as a single userid (for testing)
+   --without-server        do not build server stuff (set --without-restore)
+   --without-client        do not build client stuff
+   --without-restore       do not build amrestore nor amidxtaped
+   --without-amrecover     do not build amrecover
+   --with-client-only      deprecated: use --without-server
+   --with-server-only      deprecated: use --without-client
    --with-gnuplot=PATH     use gnuplot executable at PATH in amplot
-   --with-dump-honor-nodump  if dump supports -h, use it for level0s too
-   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
-   --with-pic              try to use only PIC/non-PIC objects [default=use
-                           both]
-   --with-tags[=TAGS]
-                           include additional configurations [automatic]
    --with-xsltproc[=PATH]
                            Use the xsltproc binary in in PATH.
      --with-xsltproc-flags=FLAGS
                            Flags to pass to xsltproc (default --nonet)
+   --with-index-server=HOST
+                           default amanda index server (default: `uname -n`)
+   --with-config=CONFIG    default amanda configuration (default: DailySet1)
+   --with-tape-server=HOST default tape server for restore (default: same as
+                           index-server)
+   --with-tape-device=DEVICE
+                           default device on restore tape server
+   --with-changer-device=DEV
+                           default tape changer device (default: /dev/ch0)
+   --with-amandates        default location for 'amandates' (default:
+                           $localstatedir/amanda/amandates)
+   --with-perlextlibs=libs extra LIBS for Perl extensions
+   --with-ipv6             enable IPv6 support (default if IPv6 is found)
+         --without-ipv6          disable IPv6
+   --with-mmap             force use of mmap instead of shared memory support
+   --with-amlibdir[=PATH]
+                           Where library are installed, default: $libdir/amanda
+         --without-amlibdir      Library are installed in $libdir
+   --with-amlibexecdir[=PATH]
+                           Where amanda own programs are installed, default:
+                           $libexecdir/amanda
+         --without-amlibexecdir  Amanda own programs are installed in $libexecdir
+   --with-amperldir[=PATH]
+                           Where amanda's perl modules are installed; default:
+                           installsitelib
+         --without-amperldir     Install amanda's perl modules in $amlibdir/perl
+   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
+   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
+   --without-libintl-prefix     don't search for libintl in includedir and libdir
+   --with-libcurl=DIR      look for the curl library in DIR
+   --without-bsd-security  do not include BSD authentication
+    --without-amandahosts  use ".rhosts" instead of ".amandahosts"
+   --with-bsdtcp-security  include BSDTCP authentication
+   --with-bsdudp-security  include BSDUDP authentication
+   --with-rsh-security     include RSH authentication
+   --with-ssh-security     include SSH authentication
+    --with-ssh-options=[OPTIONS]
+                           Use these ssh options for ssh security; the default
+                           should work
+   --with-krb4-security=DIR
+                           Location of Kerberos software [/usr/kerberos
+                           /usr/cygnus /usr /opt/kerberos]
+    --with-server-principal=ARG
+                           server host principal ("amanda")
+    --with-server-instance=ARG
+                           server host instance ("amanda")
+    --with-server-keyfile=ARG
+                           server host key file ("/.amanda")
+    --with-client-principal=ARG
+                           client host principle ("rcmd")
+    --with-client-instance=ARG
+                           client host instance (HOSTNAME_INSTANCE)
+    --with-client-keyfile=ARG
+                           client host key file (KEYFILE)
+    --ticket-lifetime      ticket lifetime (128)
+   --with-krb5-security=DIR
+                           Location of Kerberos V software [/usr/kerberos
+                           /usr/cygnus /usr /opt/kerberos]
+   --with-dump-honor-nodump
+                           if dump supports -h, use it for level0s too
+   --with-gnutar=PROG      use PROG as GNU 'tar'
+   --with-smbclient=PROG   use PROG as 'smbclient'
+   --with-samba-user       deprecated; place username in 'amandapass'
+   --with-rundump          use rundump, a setuid-root wrapper, to invoke dump
+   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+   --with-pic              try to use only PIC/non-PIC objects [default=use
+                           both]
+   --with-tags[=TAGS]      include additional configurations [automatic]
+   --with-readline         require readline support (for amrecover)
+   --without-readline      don't search for readline
  
  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>
+   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
+   GNUPLOT     Location of the 'gnuplot' binary
+   SWIG        Path to the 'swig' binary (developers only)
+   PERL        Path to the 'perl' binary
+   GNUTAR      Location of the GNU 'tar' binary
+   YACC        The `Yet Another C Compiler' implementation to use. Defaults to
+               the first program found out of: `bison -y', `byacc', `yacc'.
+   YFLAGS      The list of arguments that will be passed by default to $YACC.
+               This script will default YFLAGS to the empty string to avoid a
+               default value of `-d' given by some make applications.
    CXX         C++ compiler command
    CXXFLAGS    C++ compiler flags
    CXXCPP      C++ preprocessor
    F77         Fortran 77 compiler command
    FFLAGS      Fortran 77 compiler flags
+   PKG_CONFIG  path to pkg-config utility
  
  Use these variables to override the choices made by `configure' or to help
  it to find libraries and programs with nonstandard names/locations.
  
  _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 ;;
- 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;;
+     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
- 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
+ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+     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
+ configure
+ 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 $as_me, 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
  ## --------- ##
@@@ -1277,7 -2143,7 +2143,7 @@@ uname -v = `(uname -v) 2>/dev/null || e
  /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`
    test -z "$as_dir" && as_dir=.
    echo "PATH: $as_dir"
  done
+ IFS=$as_save_IFS
  
  } >&5
  
@@@ -1312,7 -2179,6 +2179,6 @@@ _ACEO
  ac_configure_args=
  ac_configure_args0=
  ac_configure_args1=
- ac_sep=
  ac_must_keep_next=false
  for ac_pass in 1 2
  do
      -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
          -* ) 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
@@@ -1358,8 -2222,8 +2222,8 @@@ $as_unset ac_configure_args1 || test "$
  # 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.
    {
  _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
@@@ -1396,22 -2274,28 +2274,28 @@@ _ASBO
      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
  ## ----------- ##
  _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.
  
@@@ -1473,14 -2355,17 +2355,17 @@@ _ACEO
  
  # 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;}
@@@ -1496,8 -2381,8 +2381,8 @@@ if test -r "$cache_file"; the
      { 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
@@@ -1506,15 -2391,33 +2391,33 @@@ echo "$as_me: creating cache $cache_fil
    >$cache_file
  fi
  
+ gl_header_list="$gl_header_list arpa/inet.h"
+ gl_header_list="$gl_header_list float.h"
+ gl_header_list="$gl_header_list sys/param.h"
+ gl_header_list="$gl_header_list sys/vfs.h"
+ gl_header_list="$gl_header_list sys/fs_types.h"
+ gl_header_list="$gl_header_list sys/socket.h"
+ gl_header_list="$gl_header_list netdb.h"
+ gl_header_list="$gl_header_list netinet/in.h"
+ gl_header_list="$gl_header_list sys/time.h"
+ gl_func_list="$gl_func_list gettimeofday"
+ gl_header_list="$gl_header_list stdint.h"
+ gl_header_list="$gl_header_list wchar.h"
+ gl_header_list="$gl_header_list stdio.h"
+ gl_header_list="$gl_header_list stdlib.h"
+ gl_header_list="$gl_header_list string.h"
+ gl_func_list="$gl_func_list lstat"
+ gl_header_list="$gl_header_list sys/stat.h"
+ gl_header_list="$gl_header_list unistd.h"
+ gl_func_list="$gl_func_list vasnprintf"
  # 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
@@@ -1539,8 -2442,7 +2442,7 @@@ echo "$as_me:   current value: $ac_new_
    # 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
@@@ -1557,18 -2459,7 +2459,12 @@@ echo "$as_me: error: run \`make distcle
     { (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
  
 +gl_header_list="$gl_header_list arpa/inet.h"
 +gl_header_list="$gl_header_list sys/socket.h"
 +gl_header_list="$gl_header_list netinet/in.h"
 +gl_header_list="$gl_header_list netdb.h"
 +gl_header_list="$gl_header_list string.h"
  
  
  
  
  
  
+ 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 config $srcdir/config; do
-   if test -f $ac_dir/install-sh; then
+ for ac_dir in config "$srcdir"/config; 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 config $srcdir/config" >&5
- echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
+   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
+ echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&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/'`
- echo "$as_me:$LINENO: checking host system type" >&5
- echo $ECHO_N "checking host system type... $ECHO_C" >&6
+ 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; }
  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/'`
- echo "$as_me:$LINENO: checking target system type" >&5
- echo $ECHO_N "checking target system type... $ECHO_C" >&6
+ 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
+ { echo "$as_me:$LINENO: checking target system type" >&5
+ echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
  if test "${ac_cv_target+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_cv_target_alias=$target_alias
- test "x$ac_cv_target_alias" = "x" &&
-   ac_cv_target_alias=$ac_cv_host_alias
ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
-   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
- echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   if test "x$target_alias" = x; then
+   ac_cv_target=$ac_cv_host
+ else
  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
+ echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
     { (exit 1); exit 1; }; }
+ fi
  
  fi
- echo "$as_me:$LINENO: result: $ac_cv_target" >&5
- echo "${ECHO_T}$ac_cv_target" >&6
+ { echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+ echo "${ECHO_T}$ac_cv_target" >&6; }
+ case $ac_cv_target in
+ *-*-*) ;;
+ *) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
+ echo "$as_me: error: invalid value of canonical target" >&2;}
+    { (exit 1); exit 1; }; };;
+ esac
  target=$ac_cv_target
- target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ ac_save_IFS=$IFS; IFS='-'
+ set x $ac_cv_target
+ shift
+ target_cpu=$1
+ target_vendor=$2
+ shift; shift
+ # Remember, the first character of IFS is used to create $*,
+ # except with old shells:
+ target_os=$*
+ IFS=$ac_save_IFS
+ case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
  
  
  # The aliases save the names the user supplied, while $host etc.
@@@ -1695,19 -2641,11 +2646,11 @@@ test -n "$target_alias" &
      NONENONEs,x,x, &&
    program_prefix=${target_alias}-
  
+ PACKAGE=amanda
  
- CONFIGURE_COMMAND="'$0'"
- for arg in "$@"; do
-   CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
- done
- cat >>confdefs.h <<_ACEOF
- #define CONFIGURE_COMMAND "$CONFIGURE_COMMAND"
- _ACEOF
  
+ am__api_version='1.10'
  
- am__api_version="1.9"
  # 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:
  # 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
@@@ -1744,7 -2682,7 +2687,7 @@@ case $as_dir/ i
      # 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.
      ;;
  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.
@@@ -1787,8 -2726,8 +2731,8 @@@ test -z "$INSTALL_SCRIPT" && INSTALL_SC
  
  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  
- echo "$as_me:$LINENO: checking whether build environment is sane" >&5
- echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+ echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
  # Just in case
  sleep 1
  echo timestamp > conftest.file
@@@ -1830,20 -2769,20 +2774,20 @@@ echo "$as_me: error: newly created fil
  Check your system clock" >&2;}
     { (exit 1); exit 1; }; }
  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; }
  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
  
  # expand $ac_aux_dir to an absolute path
  am_aux_dir=`cd $ac_aux_dir && pwd`
  echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
  fi
  
- if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-   # We used to keeping the `.' as first argument, in order to
-   # allow $(mkdir_p) to be used without argument.  As in
-   #   $(mkdir_p) $(somedir)
-   # where $(somedir) is conditionally defined.  However this is wrong
-   # for two reasons:
-   #  1. if the package is installed by a user who cannot write `.'
-   #     make install will fail,
-   #  2. the above comment should most certainly read
-   #     $(mkdir_p) $(DESTDIR)$(somedir)
-   #     so it does not work when $(somedir) is undefined and
-   #     $(DESTDIR) is not.
-   #  To support the latter case, we have to write
-   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-   #  so the `.' trick is pointless.
-   mkdir_p='mkdir -p --'
- else
-   # On NextStep and OpenStep, the `mkdir' command does not
-   # recognize any option.  It will interpret all options as
-   # directories to create, and then abort because `.' already
-   # exists.
-   for d in ./-p ./--version;
-   do
-     test -d $d && rmdir $d
-   done
-   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-   if test -f "$ac_aux_dir/mkinstalldirs"; then
-     mkdir_p='$(mkinstalldirs)'
+ { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+ echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+ if test -z "$MKDIR_P"; then
+   if test "${ac_cv_path_mkdir+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+        done
+ done
+ IFS=$as_save_IFS
+ fi
+   if test "${ac_cv_path_mkdir+set}" = set; then
+     MKDIR_P="$ac_cv_path_mkdir -p"
    else
-     mkdir_p='$(install_sh) -d'
+     # As a last resort, use the slow shell script.  Don't cache a
+     # value for MKDIR_P within a source directory, because that will
+     # break other packages using the cache if that directory is
+     # removed, or if the value is a relative name.
+     test -d ./--version && rmdir ./--version
+     MKDIR_P="$ac_install_sh -d"
    fi
  fi
+ { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+ echo "${ECHO_T}$MKDIR_P" >&6; }
+ mkdir_p="$MKDIR_P"
+ case $mkdir_p in
+   [\\/$]* | ?:[\\/]*) ;;
+   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+ esac
  
  for ac_prog in gawk mawk nawk awk
  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
    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
  
- 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
  
  fi
  rmdir .tst 2>/dev/null
  
- # test to see if srcdir already configured
- if test "`cd $srcdir && pwd`" != "`pwd`" &&
-    test -f $srcdir/config.status; then
-   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+ if test "`cd $srcdir && pwd`" != "`pwd`"; then
+   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+   # is not polluted with repeated "-I."
+   am__isrc=' -I$(srcdir)'
+   # test to see if srcdir already configured
+   if test -f $srcdir/config.status; then
+     { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
  echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
     { (exit 1); exit 1; }; }
+   fi
  fi
  
  # test whether we have cygpath
  
  # Define the identity of the package.
   PACKAGE=amanda
-  VERSION=2.5.2p1
+  VERSION="2.6.0p2"
  
  
  cat >>confdefs.h <<_ACEOF
@@@ -2017,7 -2978,7 +2983,7 @@@ AUTOHEADER=${AUTOHEADER-"${am_missing_r
  
  MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
  
- install_sh=${install_sh-"$am_aux_dir/install-sh"}
+ install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
  
  # Installed binaries are usually stripped using `strip' when the user
  # run `make install-strip'.  However `strip' might not be the right
@@@ -2027,8 -2988,8 +2993,8 @@@ if test "$cross_compiling" != no; the
    if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
  set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    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_STRIP="${ac_tool_prefix}strip"
      echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
  done
  done
+ IFS=$as_save_IFS
  
  fi
  fi
  STRIP=$ac_cv_prog_STRIP
  if test -n "$STRIP"; then
-   echo "$as_me:$LINENO: result: $STRIP" >&5
- echo "${ECHO_T}$STRIP" >&6
+   echo "$as_me:$LINENO: result: $STRIP" >&5
+ echo "${ECHO_T}$STRIP" >&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_STRIP"; then
    ac_ct_STRIP=$STRIP
    # Extract the first word of "strip", so it can be a program name with args.
  set dummy strip; 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_STRIP+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    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_STRIP="strip"
      echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
  done
  done
+ IFS=$as_save_IFS
  
-   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
  fi
  fi
  ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
  if test -n "$ac_ct_STRIP"; then
-   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
- echo "${ECHO_T}$ac_ct_STRIP" >&6
+   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+ echo "${ECHO_T}$ac_ct_STRIP" >&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
  
-   STRIP=$ac_ct_STRIP
+   if test "x$ac_ct_STRIP" = x; then
+     STRIP=":"
+   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@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@gnu.org." >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     STRIP=$ac_ct_STRIP
+   fi
  else
    STRIP="$ac_cv_prog_STRIP"
  fi
  
  fi
- INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  
  # We need awk for the "check" target.  The system "awk" is bad on
  # some platforms.
@@@ -2119,69 -3096,58 +3101,69 @@@ am__tar='${AMTAR} chof - "$$tardir"'; a
  
  
  
          ac_config_headers="$ac_config_headers config/config.h"
+ ac_config_headers="$ac_config_headers config/config.h"
  
  
  
 +if test -f "$srcdir/SNAPSHOT"; then
 +  cat < "$srcdir/SNAPSHOT"
  
-   snapdate=`sed -n '/^Snapshot Date: \([0-9]*\)/ s//\1/p' < $srcdir/SNAPSHOT`
+ #
+ # Take care of some early Amanda-specific setup
+ #
  
-   test -z "$snapdate" || VERSION="$VERSION-$snapdate"
-   SNAPSHOT_STAMP=SNAPSHOT
- else
-   SNAPSHOT_STAMP=
- fi
+     # initialize warnings file
+     rm -f config.warnings
  
  
- if test -f config.local; then
-     echo "running local script ./config.local"
-     . ./config.local
- fi
+     if test -f "$srcdir/SNAPSHOT"; then
+       cat < "$srcdir/SNAPSHOT"
  
+       snapdate=`sed -n '/^Snapshot Date: \([0-9]*\)/ s//\1/p' < $srcdir/SNAPSHOT`
  
- VERSION_MAJOR=`expr "$VERSION" : '\([0-9]*\)'`
- VERSION_MINOR=`expr "$VERSION" : '[0-9]*\.\([0-9]*\)'`
- VERSION_PATCH=`expr "$VERSION" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
- VERSION_COMMENT=\"`expr "$VERSION" : '[0-9]*\.[0-9]*\.[0-9]*\(.*\)'`\"
+       test -z "$snapdate" || VERSION="$VERSION-$snapdate"
+       SNAPSHOT_STAMP=SNAPSHOT
+     else
+       SNAPSHOT_STAMP=
+     fi
  
  
 +VERSION_SUFFIX="$VERSION"
  
  
+     VERSION_MAJOR=`expr "$VERSION" : '\([0-9]*\)'`
+     VERSION_MINOR=`expr "$VERSION" : '[0-9]*\.\([0-9]*\)'`
+     VERSION_PATCH=`expr "$VERSION" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+     VERSION_COMMENT=\"`expr "$VERSION" : '[0-9]*\.[0-9]*\.[0-9]*\(.*\)'`\"
  
  
+     VERSION_SUFFIX="$VERSION"
  
  
- SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/opt/SUNWspro/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc"
- LOCPATH=`(
-     test "x$prefix" = xNONE && prefix=$ac_default_prefix
-     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
-     eval echo "$libexecdir:$PATH:/usr/local/sbin:/usr/local/bin:/usr/ccs/bin"
- )`
- SYSLOCPATH="$SYSPATH:$LOCPATH"
- LOCSYSPATH="$LOCPATH:$SYSPATH"
  
  
  
- # Check whether --with-cflags or --without-cflags was given.
- if test "${with_cflags+set}" = set; then
-   withval="$with_cflags"
  
 +      case "$withval" in
 +      "" | y | ye | yes | n | no)
 +          { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-cflags option." >&5
 +echo "$as_me: error: *** You must supply an argument to the --with-cflags option." >&2;}
 +   { (exit 1); exit 1; }; }
 +          ;;
 +      esac
 +      CFLAGS="$withval"
  
- fi;
+     if test -f config.local; then
+       echo "running local script ./config.local"
+       . ./config.local
+     fi
  
- CFLAGS="-D_GNU_SOURCE $CFLAGS"
  
+ #
+ # Set up compiler location, basic flags, and include locations
+ # and library locations before we start checking the system
+ # configuration in more detail...
+ #
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
  ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@@ -2190,8 -3156,8 +3172,8 @@@ ac_compiler_gnu=$ac_cv_c_compiler_gn
  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
    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
    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@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@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
    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
- 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
+   { 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
  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
    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
    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.
  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
    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
    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@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@gnu.org." >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     CC=$ac_ct_CC
+   fi
  fi
  
  fi
@@@ -2498,21 -3461,35 +3481,35 @@@ See \`config.log' for more details." >&
     { (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); }
@@@ -2537,47 -3514,77 +3534,77 @@@ ac_clean_files="$ac_clean_files a.out a
  # 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 )
-       ;;
-     conftest.$ac_ext )
-       # This is the source file.
+     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
        ;;
      [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
  
@@@ -2589,19 -3596,21 +3616,21 @@@ See \`config.log' for more details." >&
  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
@@@ -2620,22 -3629,27 +3649,27 @@@ See \`config.log' for more details." >&
      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 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 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 { (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
  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
@@@ -2662,14 -3675,14 +3695,14 @@@ See \`config.log' for more details." >&
  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
@@@ -2689,14 -3702,20 +3722,20 @@@ main (
  }
  _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
  
  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
@@@ -2742,50 -3761,49 +3781,49 @@@ main (
  }
  _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
@@@ -2801,38 -3819,118 +3839,118 @@@ main (
  }
  _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
+ 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
+    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
      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.  */
@@@ -2887,12 -3985,17 +4005,17 @@@ static char *f (char * (*g) (char **, i
  /* 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);};
@@@ -2907,205 -4010,57 +4030,197 @@@ return f (e, argv, 0) != argv[0]  ||  
    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'
@@@ -3113,7 -4068,7 +4228,7 @@@ ac_link='$CC -o conftest$ac_exeext $CFL
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
  DEPDIR="${am__leading_dot}deps"
  
          ac_config_commands="$ac_config_commands depfiles"
+ ac_config_commands="$ac_config_commands depfiles"
  
  
  am_make=${MAKE-make}
@@@ -3123,8 -4078,8 +4238,8 @@@ am__doit
  .PHONY: am__doit
  END
  # If we don't find an include directive, just comment out the code.
- echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
- echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+ echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
  am__include="#"
  am__quote=
  _am_result=none
@@@ -3151,22 -4106,20 +4266,20 @@@ if test "$am__include" = "#"; the
  fi
  
  
- echo "$as_me:$LINENO: result: $_am_result" >&5
- echo "${ECHO_T}$_am_result" >&6
echo "$as_me:$LINENO: result: $_am_result" >&5
+ echo "${ECHO_T}$_am_result" >&6; }
  rm -f confinc confmf
  
- # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+ # Check whether --enable-dependency-tracking was given.
  if test "${enable_dependency_tracking+set}" = set; then
-   enableval="$enable_dependency_tracking"
+   enableval=$enable_dependency_tracking;
+ fi
  
- fi;
  if test "x$enable_dependency_tracking" != xno; then
    am_depcomp="$ac_aux_dir/depcomp"
    AMDEPBACKSLASH='\'
  fi
- if test "x$enable_dependency_tracking" != xno; then
+  if test "x$enable_dependency_tracking" != xno; then
    AMDEP_TRUE=
    AMDEP_FALSE='#'
  else
  
  
  
  depcc="$CC"   am_compiler_list=
  
- echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
- echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+ echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
  if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
         depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
         $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
           >/dev/null 2>conftest.err &&
+        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
         grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
         grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
         ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  fi
  
  fi
- echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
- echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+ echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
  CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
  
- if
+  if
    test "x$enable_dependency_tracking" != xno \
    && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
    am__fastdepCC_TRUE=
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    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_RANLIB="${ac_tool_prefix}ranlib"
      echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
  done
  done
+ IFS=$as_save_IFS
  
  fi
  fi
  RANLIB=$ac_cv_prog_RANLIB
  if test -n "$RANLIB"; then
-   echo "$as_me:$LINENO: result: $RANLIB" >&5
- echo "${ECHO_T}$RANLIB" >&6
+   echo "$as_me:$LINENO: result: $RANLIB" >&5
+ echo "${ECHO_T}$RANLIB" >&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_RANLIB"; then
    ac_ct_RANLIB=$RANLIB
    # Extract the first word of "ranlib", so it can be a program name with args.
  set dummy ranlib; 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_RANLIB+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    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_RANLIB="ranlib"
      echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
  done
  done
+ IFS=$as_save_IFS
  
-   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
  fi
  fi
  ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
  if test -n "$ac_ct_RANLIB"; then
-   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
- echo "${ECHO_T}$ac_ct_RANLIB" >&6
+   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+ echo "${ECHO_T}$ac_ct_RANLIB" >&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
  
-   RANLIB=$ac_ct_RANLIB
+   if test "x$ac_ct_RANLIB" = x; then
+     RANLIB=":"
+   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@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@gnu.org." >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     RANLIB=$ac_ct_RANLIB
+   fi
  else
    RANLIB="$ac_cv_prog_RANLIB"
  fi
@@@ -3378,8 -4345,8 +4505,8 @@@ 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
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=
@@@ -3413,24 -4380,22 +4540,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  #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
@@@ -3439,9 -4404,10 +4564,10 @@@ sed 's/^/| /' conftest.$ac_ext >&
    # 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.  */
@@@ -3451,24 -4417,22 +4577,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  /* 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
@@@ -3479,6 -4443,7 +4603,7 @@@ sed 's/^/| /' conftest.$ac_ext >&
  ac_preproc_ok=:
  break
  fi
  rm -f conftest.err conftest.$ac_ext
  
  done
  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
@@@ -3520,24 -4485,22 +4645,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  #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
@@@ -3546,9 -4509,10 +4669,10 @@@ sed 's/^/| /' conftest.$ac_ext >&
    # 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.  */
@@@ -3558,24 -4522,22 +4682,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  /* 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
@@@ -3586,6 -4548,7 +4708,7 @@@ sed 's/^/| /' conftest.$ac_ext >&
  ac_preproc_ok=:
  break
  fi
  rm -f conftest.err conftest.$ac_ext
  
  done
@@@ -3608,52 -4571,170 +4731,182 @@@ ac_link='$CC -o conftest$ac_exeext $CFL
  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
+   # 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
-   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-     then ac_cv_prog_egrep='grep -E'
-     else ac_cv_prog_egrep='egrep'
+   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
  
+ else
+   ac_cv_path_GREP=$GREP
+ fi
  
 +echo "$as_me:$LINENO: checking for AIX" >&5
 +echo $ECHO_N "checking for AIX... $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 _AIX
 +  yes
 +#endif
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "yes" >/dev/null 2>&1; then
-   echo "$as_me:$LINENO: result: yes" >&5
- echo "${ECHO_T}yes" >&6
- cat >>confdefs.h <<\_ACEOF
- #define _ALL_SOURCE 1
- _ACEOF
+ 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
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   ac_cv_path_EGREP=$EGREP
  fi
 +rm -f conftest*
  
  
- echo "$as_me:$LINENO: checking for ANSI C header files" >&5
- echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+    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
@@@ -3677,35 -4758,31 +4930,31 @@@ main (
  }
  _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.
@@@ -3761,6 -4838,7 +5010,7 @@@ cat confdefs.h >>conftest.$ac_ex
  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))
@@@ -3780,18 -4858,27 +5030,27 @@@ main (
    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
@@@ -3804,12 -4891,14 +5063,14 @@@ sed 's/^/| /' conftest.$ac_ext >&
  ( 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
@@@ -3832,9 -4921,9 +5093,9 @@@ for ac_header in sys/types.h sys/stat.
                  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
@@@ -3848,38 -4937,35 +5109,35 @@@ $ac_includes_defaul
  #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
  done
  
  
- if test "${ac_cv_header_minix_config_h+set}" = set; then
-   echo "$as_me:$LINENO: checking for minix/config.h" >&5
- echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
+   if test "${ac_cv_header_minix_config_h+set}" = set; then
+   { echo "$as_me:$LINENO: checking for minix/config.h" >&5
+ echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
  if test "${ac_cv_header_minix_config_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  fi
- echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
- echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+ echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
  else
    # Is the header compilable?
- echo "$as_me:$LINENO: checking minix/config.h usability" >&5
- echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
echo "$as_me:$LINENO: checking minix/config.h usability" >&5
+ echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
@@@ -3912,41 -4999,37 +5171,37 @@@ $ac_includes_defaul
  #include <minix/config.h>
  _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 minix/config.h presence" >&5
- echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
echo "$as_me:$LINENO: checking minix/config.h presence" >&5
+ echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
@@@ -3955,24 -5038,22 +5210,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  /* end confdefs.h.  */
  #include <minix/config.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
    ac_header_preproc=yes
  else
    echo "$as_me: failed program was:" >&5
@@@ -3980,9 -5061,10 +5233,10 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
    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
@@@ -4006,25 -5088,18 +5260,18 @@@ echo "$as_me: WARNING: minix/config.h
  echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
      { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
  echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
-     (
-       cat <<\_ASBOX
- ## ------------------------------------------ ##
- ## Report this to the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _ASBOX
-     ) |
-       sed "s/^/$as_me: WARNING:     /" >&2
      ;;
  esac
- echo "$as_me:$LINENO: checking for minix/config.h" >&5
- echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
echo "$as_me:$LINENO: checking for minix/config.h" >&5
+ echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
  if test "${ac_cv_header_minix_config_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    ac_cv_header_minix_config_h=$ac_header_preproc
  fi
- echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
- echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+ echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
  
  fi
  if test $ac_cv_header_minix_config_h = yes; then
@@@ -4034,7 -5109,7 +5281,7 @@@ els
  fi
  
  
- if test "$MINIX" = yes; then
  if test "$MINIX" = yes; then
  
  cat >>confdefs.h <<\_ACEOF
  #define _POSIX_SOURCE 1
@@@ -4050,20 -5125,12 +5297,12 @@@ cat >>confdefs.h <<\_ACEO
  #define _MINIX 1
  _ACEOF
  
- fi
+   fi
  
  
  
-   echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
- echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
+ echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
  if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -4085,41 -5152,45 +5324,45 @@@ main (
  }
  _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_safe_to_define___extensions__=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_safe_to_define___extensions__=no
      ac_cv_safe_to_define___extensions__=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_safe_to_define___extensions__" >&5
- echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
+ echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
    test $ac_cv_safe_to_define___extensions__ = yes &&
      cat >>confdefs.h <<\_ACEOF
  #define __EXTENSIONS__ 1
+ _ACEOF
+   cat >>confdefs.h <<\_ACEOF
+ #define _ALL_SOURCE 1
+ _ACEOF
+   cat >>confdefs.h <<\_ACEOF
+ #define _GNU_SOURCE 1
  _ACEOF
  
    cat >>confdefs.h <<\_ACEOF
@@@ -4135,17 -5206,18 +5378,18 @@@ _ACEO
  
  
  
-        # Check whether --enable-threads or --disable-threads was given.
+     # Check whether --enable-threads was given.
  if test "${enable_threads+set}" = set; then
-   enableval="$enable_threads"
-   gl_use_threads=$enableval
+   enableval=$enable_threads; gl_use_threads=$enableval
  else
    case "$host_os" in
                              osf*) gl_use_threads=no ;;
         *)    gl_use_threads=yes ;;
       esac
  
- fi;
+ fi
    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
      # For using <pthread.h>:
      case "$host_os" in
  
  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  # for constant arguments.  Useless!
- echo "$as_me:$LINENO: checking for working alloca.h" >&5
- echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
echo "$as_me:$LINENO: checking for working alloca.h" >&5
+ echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
  if test "${ac_cv_working_alloca_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  main ()
  {
  char *p = (char *) alloca (2 * sizeof (int));
+                         if (p) return 0;
    ;
    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_working_alloca_h=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_working_alloca_h=no
      ac_cv_working_alloca_h=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_working_alloca_h" >&5
- echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+ echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
  if test $ac_cv_working_alloca_h = yes; then
  
  cat >>confdefs.h <<\_ACEOF
@@@ -4241,8 -5311,8 +5483,8 @@@ _ACEO
  
  fi
  
- echo "$as_me:$LINENO: checking for alloca" >&5
- echo $ECHO_N "checking for alloca... $ECHO_C" >&6
echo "$as_me:$LINENO: checking for alloca" >&5
+ echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
  if test "${ac_cv_func_alloca_works+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -4259,7 -5329,7 +5501,7 @@@ cat >>conftest.$ac_ext <<_ACEO
  #  include <malloc.h>
  #  define alloca _alloca
  # else
- #  if HAVE_ALLOCA_H
+ #  ifdef HAVE_ALLOCA_H
  #   include <alloca.h>
  #  else
  #   ifdef _AIX
  main ()
  {
  char *p = (char *) alloca (1);
+                                   if (p) return 0;
    ;
    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_alloca_works=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_func_alloca_works=no
      ac_cv_func_alloca_works=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_alloca_works" >&5
- echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+ echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
  
  if test $ac_cv_func_alloca_works = yes; then
  
  # contain a buggy version.  If you still want to use their alloca,
  # use ar to extract alloca.o from them instead of compiling alloca.c.
  
- ALLOCA=alloca.$ac_objext
+ ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
  
  cat >>confdefs.h <<\_ACEOF
  #define C_ALLOCA 1
  _ACEOF
  
  
- echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
- echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+ echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
  if test "${ac_cv_os_cray+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -4346,7 -5414,7 +5586,7 @@@ _ACEO
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #if defined(CRAY) && ! defined(CRAY2)
+ #if defined CRAY && ! defined CRAY2
  webecray
  #else
  wenotbecray
  rm -f conftest*
  
  fi
- echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
- echo "${ECHO_T}$ac_cv_os_cray" >&6
echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+ echo "${ECHO_T}$ac_cv_os_cray" >&6; }
  if test $ac_cv_os_cray = yes; then
    for ac_func in _getb67 GETB67 getb67; 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
@@@ -4395,68 -5463,60 +5635,60 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
    done
  fi
  
- echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
- echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+ echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
  if test "${ac_cv_c_stack_direction+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -4483,6 -5543,7 +5715,7 @@@ _ACEO
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
+ $ac_includes_default
  int
  find_stack_direction ()
  {
  int
  main ()
  {
-   exit (find_stack_direction () < 0);
+   return find_stack_direction () < 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
@@@ -4523,11 -5593,13 +5765,13 @@@ sed 's/^/| /' conftest.$ac_ext >&
  ( exit $ac_status )
  ac_cv_c_stack_direction=-1
  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_c_stack_direction" >&5
- echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+ echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
  
  cat >>confdefs.h <<_ACEOF
  #define STACK_DIRECTION $ac_cv_c_stack_direction
  for ac_header in $gl_header_list
  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
@@@ -4566,41 -5639,37 +5811,37 @@@ $ac_includes_defaul
  #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
@@@ -4609,24 -5678,22 +5850,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  /* 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
@@@ -4634,9 -5701,10 +5873,10 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
    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
@@@ -4660,25 -5728,19 +5900,19 @@@ echo "$as_me: WARNING: $ac_header:     
  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 the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _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 "$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
  
  
  
- echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
- echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for inline" >&5
+ echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
+ if test "${ac_cv_c_inline+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_cv_c_inline=no
+ for ac_kw in inline __inline__ __inline; do
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #ifndef __cplusplus
+ typedef int foo_t;
+ static $ac_kw foo_t static_foo () {return 0; }
+ $ac_kw foo_t foo () {return 0; }
+ #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
+   ac_cv_c_inline=$ac_kw
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   test "$ac_cv_c_inline" != no && break
+ done
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+ echo "${ECHO_T}$ac_cv_c_inline" >&6; }
+ case $ac_cv_c_inline in
+   inline | yes) ;;
+   *)
+     case $ac_cv_c_inline in
+       no) ac_val=;;
+       *) ac_val=$ac_cv_c_inline;;
+     esac
+     cat >>confdefs.h <<_ACEOF
+ #ifndef __cplusplus
+ #define inline $ac_val
+ #endif
+ _ACEOF
+     ;;
+ esac
+ { echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
+ echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6; }
  if test "${ac_cv_c_restrict+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -4710,42 -5841,53 +6013,53 @@@ _ACEO
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- float * $ac_kw x;
+ typedef int * int_ptr;
+         int foo (int_ptr $ac_kw ip) {
+         return ip[0];
+        }
+ int
+ main ()
+ {
+ int s[1];
+         int * $ac_kw t = s;
+         t[0] = 0;
+         return foo(t)
+   ;
+   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
-   ac_cv_c_restrict=$ac_kw; break
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_c_restrict=$ac_kw
  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
+      test "$ac_cv_c_restrict" != no && break
     done
  
  fi
- echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
- echo "${ECHO_T}$ac_cv_c_restrict" >&6
echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
+ echo "${ECHO_T}$ac_cv_c_restrict" >&6; }
   case $ac_cv_c_restrict in
     restrict) ;;
     no)
  
  
  
+   { echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5
+ echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6; }
+ if test "${gl_cv_have_include_next+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   rm -rf conftestd1 conftestd2
+      mkdir conftestd1 conftestd2
+      cat <<EOF > conftestd1/conftest.h
+ #define DEFINED_IN_CONFTESTD1
+ #include_next <conftest.h>
+ #ifdef DEFINED_IN_CONFTESTD2
+ int foo;
+ #else
+ #error "include_next doesn't work"
+ #endif
+ EOF
+      cat <<EOF > conftestd2/conftest.h
+ #ifndef DEFINED_IN_CONFTESTD1
+ #error "include_next test doesn't work"
+ #endif
+ #define DEFINED_IN_CONFTESTD2
+ EOF
+      save_CPPFLAGS="$CPPFLAGS"
+      CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
+      cat >conftest.$ac_ext <<_ACEOF
+ #include <conftest.h>
+ _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
+   gl_cv_have_include_next=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       gl_cv_have_include_next=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CPPFLAGS="$save_CPPFLAGS"
+      rm -rf conftestd1 conftestd2
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
+ echo "${ECHO_T}$gl_cv_have_include_next" >&6; }
+   if test $gl_cv_have_include_next = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_INCLUDE_NEXT 1
+ _ACEOF
+     INCLUDE_NEXT=include_next
+   else
+     INCLUDE_NEXT=include
+   fi
  
  
  
  
  
  
-   :
  
  
  
  
  
-   if test $ac_cv_header_sys_socket_h = yes; then
+   { echo "$as_me:$LINENO: checking whether <sys/socket.h> is self-contained" >&5
+ echo $ECHO_N "checking whether <sys/socket.h> is self-contained... $ECHO_C" >&6; }
+ if test "${gl_cv_header_sys_socket_h_selfcontained+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 <sys/socket.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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_header_sys_socket_h_selfcontained=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       gl_cv_header_sys_socket_h_selfcontained=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
+ echo "${ECHO_T}$gl_cv_header_sys_socket_h_selfcontained" >&6; }
+   if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
      SYS_SOCKET_H=''
    else
+     SYS_SOCKET_H='sys/socket.h'
+   :
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_sys_socket_h='<'sys/socket.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <sys/socket.h>" >&5
+ echo $ECHO_N "checking absolute name of <sys/socket.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_sys_socket_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         if test $ac_cv_header_sys_socket_h = yes; then
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/socket.h>
+ _ACEOF
+                                   gl_cv_next_sys_socket_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/sys/socket.h#{
+                s#.*"\(.*/sys/socket.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_sys_socket_h='<'sys/socket.h'>'
+         fi
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_sys_socket_h" >&5
+ echo "${ECHO_T}$gl_cv_next_sys_socket_h" >&6; }
+      fi
+      NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
+     if test $ac_cv_header_sys_socket_h = yes; then
+       HAVE_SYS_SOCKET_H=1
+       HAVE_WINSOCK2_H=0
+       HAVE_WS2TCPIP_H=0
+     else
+       HAVE_SYS_SOCKET_H=0
  
  
  for ac_header in winsock2.h ws2tcpip.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
@@@ -4803,41 -6146,37 +6318,37 @@@ $ac_includes_defaul
  #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
@@@ -4846,24 -6185,22 +6357,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  /* 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
@@@ -4871,9 -6208,10 +6380,10 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
    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
@@@ -4897,25 -6235,19 +6407,19 @@@ echo "$as_me: WARNING: $ac_header:     
  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 the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _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 "$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
  
  done
  
-     SYS_SOCKET_H='sys/socket.h'
+       if test $ac_cv_header_winsock2_h = yes; then
+         HAVE_WINSOCK2_H=1
+       else
+         HAVE_WINSOCK2_H=0
+       fi
+       if test $ac_cv_header_ws2tcpip_h = yes; then
+         HAVE_WS2TCPIP_H=1
+       else
+         HAVE_WS2TCPIP_H=0
+       fi
+     fi
    fi
  
  
  
  
  
    :
  
  
  
  
  
-   echo "$as_me:$LINENO: checking for IPv4 sockets" >&5
- echo $ECHO_N "checking for IPv4 sockets... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for IPv4 sockets" >&5
+ echo $ECHO_N "checking for IPv4 sockets... $ECHO_C" >&6; }
    if test "${gl_cv_socket_ipv4+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -4978,39 -6329,35 +6501,35 @@@ int x = AF_INET; struct in_addr y; stru
  }
  _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
    gl_cv_socket_ipv4=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- gl_cv_socket_ipv4=no
      gl_cv_socket_ipv4=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: $gl_cv_socket_ipv4" >&5
- echo "${ECHO_T}$gl_cv_socket_ipv4" >&6
+   echo "$as_me:$LINENO: result: $gl_cv_socket_ipv4" >&5
+ echo "${ECHO_T}$gl_cv_socket_ipv4" >&6; }
    if test $gl_cv_socket_ipv4 = yes; then
  
  cat >>confdefs.h <<\_ACEOF
@@@ -5019,8 -6366,8 +6538,8 @@@ _ACEO
  
    fi
  
-   echo "$as_me:$LINENO: checking for IPv6 sockets" >&5
- echo $ECHO_N "checking for IPv6 sockets... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for IPv6 sockets" >&5
+ echo $ECHO_N "checking for IPv6 sockets... $ECHO_C" >&6; }
    if test "${gl_cv_socket_ipv6+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -5050,39 -6397,35 +6569,35 @@@ int x = AF_INET6; struct in6_addr y; st
  }
  _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
    gl_cv_socket_ipv6=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- gl_cv_socket_ipv6=no
      gl_cv_socket_ipv6=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: $gl_cv_socket_ipv6" >&5
- echo "${ECHO_T}$gl_cv_socket_ipv6" >&6
+   echo "$as_me:$LINENO: result: $gl_cv_socket_ipv6" >&5
+ echo "${ECHO_T}$gl_cv_socket_ipv6" >&6; }
    if test $gl_cv_socket_ipv6 = yes; then
  
  cat >>confdefs.h <<\_ACEOF
  
    fi
  
- echo "$as_me:$LINENO: checking for inline" >&5
- echo $ECHO_N "checking for inline... $ECHO_C" >&6
- if test "${ac_cv_c_inline+set}" = set; then
+   :
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_sys_time_h='<'sys/time.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <sys/time.h>" >&5
+ echo $ECHO_N "checking absolute name of <sys/time.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_sys_time_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         if test $ac_cv_header_sys_time_h = yes; then
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/time.h>
+ _ACEOF
+                                   gl_cv_next_sys_time_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/sys/time.h#{
+                s#.*"\(.*/sys/time.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_sys_time_h='<'sys/time.h'>'
+         fi
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_sys_time_h" >&5
+ echo "${ECHO_T}$gl_cv_next_sys_time_h" >&6; }
+      fi
+      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
+   if test $ac_cv_header_sys_time_h = yes; then
+     HAVE_SYS_TIME_H=1
+   else
+     HAVE_SYS_TIME_H=0
+   fi
+   { echo "$as_me:$LINENO: checking for struct timeval" >&5
+ echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
+ if test "${gl_cv_sys_struct_timeval+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_cv_c_inline=no
- for ac_kw in inline __inline__ __inline; do
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #ifndef __cplusplus
- typedef int foo_t;
- static $ac_kw foo_t static_foo () {return 0; }
- $ac_kw foo_t foo () {return 0; }
- #endif
+ #if HAVE_SYS_TIME_H
+            #include <sys/time.h>
+           #endif
+           #include <time.h>
  
+ int
+ main ()
+ {
+ static struct timeval x; x.tv_sec = x.tv_usec;
+   ;
+   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
-   ac_cv_c_inline=$ac_kw; break
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_sys_struct_timeval=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
+       gl_cv_sys_struct_timeval=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
- echo "${ECHO_T}$ac_cv_c_inline" >&6
+ { echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timeval" >&5
+ echo "${ECHO_T}$gl_cv_sys_struct_timeval" >&6; }
+   if test $gl_cv_sys_struct_timeval = yes; then
+     HAVE_STRUCT_TIMEVAL=1
+   else
+     HAVE_STRUCT_TIMEVAL=0
+   fi
  
  
- case $ac_cv_c_inline in
-   inline | yes) ;;
-   *)
-     case $ac_cv_c_inline in
-       no) ac_val=;;
-       *) ac_val=$ac_cv_c_inline;;
-     esac
-     cat >>confdefs.h <<_ACEOF
- #ifndef __cplusplus
- #define inline $ac_val
+     REPLACE_GETTIMEOFDAY=0
+   if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then
+     SYS_TIME_H=sys/time.h
+   else
+     SYS_TIME_H=
+   fi
+ for ac_func in $gl_func_list
+ 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 { 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
+ /* 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 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
+ 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
  #endif
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
  _ACEOF
-     ;;
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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"
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
  
+ fi
+ done
  
  
  
    prefix="$acl_save_prefix"
  
  
- # Check whether --with-gnu-ld or --without-gnu-ld was given.
+ # Check whether --with-gnu-ld was given.
  if test "${with_gnu_ld+set}" = set; then
-   withval="$with_gnu_ld"
-   test "$withval" = no || with_gnu_ld=yes
+   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
  else
    with_gnu_ld=no
- fi;
+ fi
  # Prepare PATH_SEPARATOR.
  # The user is always right.
  if test "${PATH_SEPARATOR+set}" != set; then
  ac_prog=ld
  if test "$GCC" = yes; then
    # Check if gcc -print-prog-name=ld gives a path.
-   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
- echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
    case $host in
    *-*-mingw*)
      # gcc leaves a trailing carriage return which upsets mingw
      ;;
    esac
  elif test "$with_gnu_ld" = yes; then
-   echo "$as_me:$LINENO: checking for GNU ld" >&5
- echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for GNU ld" >&5
+ echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
  else
-   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
- echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+ echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
  fi
  if test "${acl_cv_path_LD+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  
  LD="$acl_cv_path_LD"
  if test -n "$LD"; then
-   echo "$as_me:$LINENO: result: $LD" >&5
- echo "${ECHO_T}$LD" >&6
+   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
+   echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
  test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
  echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
     { (exit 1); exit 1; }; }
- echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
- echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
  if test "${acl_cv_prog_gnu_ld+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -5294,15 -6800,15 +6972,15 @@@ case `$LD -v 2>&1 </dev/null` i
    acl_cv_prog_gnu_ld=no ;;
  esac
  fi
- echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
- echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+ echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; }
  with_gnu_ld=$acl_cv_prog_gnu_ld
  
  
  
  
-                                                 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
- echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
+                                                 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+ echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; }
  if test "${acl_cv_rpath+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
      acl_cv_rpath=done
  
  fi
- echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
- echo "${ECHO_T}$acl_cv_rpath" >&6
echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+ echo "${ECHO_T}$acl_cv_rpath" >&6; }
    wl="$acl_cv_wl"
-   acl_libext="$acl_cv_libext"
-   acl_shlibext="$acl_cv_shlibext"
-   acl_libname_spec="$acl_cv_libname_spec"
-   acl_library_names_spec="$acl_cv_library_names_spec"
-   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-   acl_hardcode_direct="$acl_cv_hardcode_direct"
-   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
-     # Check whether --enable-rpath or --disable-rpath was given.
+   libext="$acl_cv_libext"
+   shlibext="$acl_cv_shlibext"
+   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+   hardcode_direct="$acl_cv_hardcode_direct"
+   hardcode_minus_L="$acl_cv_hardcode_minus_L"
+     # Check whether --enable-rpath was given.
  if test "${enable_rpath+set}" = set; then
-   enableval="$enable_rpath"
-   :
+   enableval=$enable_rpath; :
  else
    enable_rpath=yes
- fi;
+ fi
  
  
                    acl_libdirstem=lib
    LIBMULTITHREAD=
    LTLIBMULTITHREAD=
    if test "$gl_use_threads" != no; then
-         echo "$as_me:$LINENO: checking whether imported symbols can be declared weak" >&5
- echo $ECHO_N "checking whether imported symbols can be declared weak... $ECHO_C" >&6
+         echo "$as_me:$LINENO: checking whether imported symbols can be declared weak" >&5
+ echo $ECHO_N "checking whether imported symbols can be declared weak... $ECHO_C" >&6; }
      gl_have_weak=no
      cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -5380,52 -6884,50 +7056,50 @@@ xyzzy()
  }
  _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
    gl_have_weak=yes
  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 conftest_ipa8_conftest.oo \
        conftest$ac_exeext conftest.$ac_ext
-     echo "$as_me:$LINENO: result: $gl_have_weak" >&5
- echo "${ECHO_T}$gl_have_weak" >&6
+     echo "$as_me:$LINENO: result: $gl_have_weak" >&5
+ echo "${ECHO_T}$gl_have_weak" >&6; }
      if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
        # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
        # it groks <pthread.h>. It's added above, in gl_LOCK_EARLY_BODY.
        if test "${ac_cv_header_pthread_h+set}" = set; then
-   echo "$as_me:$LINENO: checking for pthread.h" >&5
- echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for pthread.h" >&5
+ echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
  if test "${ac_cv_header_pthread_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  fi
- echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
- echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
+ echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
  else
    # Is the header compilable?
- echo "$as_me:$LINENO: checking pthread.h usability" >&5
- echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
echo "$as_me:$LINENO: checking pthread.h usability" >&5
+ echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6; }
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
@@@ -5436,41 -6938,37 +7110,37 @@@ $ac_includes_defaul
  #include <pthread.h>
  _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 pthread.h presence" >&5
- echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
echo "$as_me:$LINENO: checking pthread.h presence" >&5
+ echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6; }
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
@@@ -5479,24 -6977,22 +7149,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  /* end confdefs.h.  */
  #include <pthread.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
    ac_header_preproc=yes
  else
    echo "$as_me: failed program was:" >&5
@@@ -5504,9 -7000,10 +7172,10 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
    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
@@@ -5530,25 -7027,18 +7199,18 @@@ echo "$as_me: WARNING: pthread.h:     s
  echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
      { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
  echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
-     (
-       cat <<\_ASBOX
- ## ------------------------------------------ ##
- ## Report this to the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _ASBOX
-     ) |
-       sed "s/^/$as_me: WARNING:     /" >&2
      ;;
  esac
- echo "$as_me:$LINENO: checking for pthread.h" >&5
- echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
echo "$as_me:$LINENO: checking for pthread.h" >&5
+ echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
  if test "${ac_cv_header_pthread_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    ac_cv_header_pthread_h=$ac_header_preproc
  fi
- echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
- echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
+ echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
  
  fi
  if test $ac_cv_header_pthread_h = yes; then
@@@ -5583,42 -7073,40 +7245,40 @@@ pthread_mutex_lock((pthread_mutex_t*)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
    gl_have_pthread=yes
  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 conftest_ipa8_conftest.oo \
        conftest$ac_exeext conftest.$ac_ext
          # Test for libpthread by looking for pthread_kill. (Not pthread_self,
          # since it is defined as a macro on OSF/1.)
          if test -n "$gl_have_pthread"; then
            # The program links fine without libpthread. But it may actually
            # need to link with libpthread in order to create multiple threads.
-           echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5
- echo $ECHO_N "checking for pthread_kill in -lpthread... $ECHO_C" >&6
+           echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5
+ echo $ECHO_N "checking for pthread_kill in -lpthread... $ECHO_C" >&6; }
  if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -5631,56 -7119,53 +7291,53 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- /* 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 pthread_kill ();
  int
  main ()
  {
- pthread_kill ();
return pthread_kill ();
    ;
    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_lib_pthread_pthread_kill=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_pthread_pthread_kill=no
      ac_cv_lib_pthread_pthread_kill=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
  LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5
- echo "${ECHO_T}$ac_cv_lib_pthread_pthread_kill" >&6
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5
+ echo "${ECHO_T}$ac_cv_lib_pthread_pthread_kill" >&6; }
  if test $ac_cv_lib_pthread_pthread_kill = yes; then
    LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
               # On Solaris and HP-UX, most pthread functions exist also in libc.
  
          else
            # Some library is needed. Try libpthread and libc_r.
-           echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5
- echo $ECHO_N "checking for pthread_kill in -lpthread... $ECHO_C" >&6
+           echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5
+ echo $ECHO_N "checking for pthread_kill in -lpthread... $ECHO_C" >&6; }
  if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -5714,56 -7199,53 +7371,53 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- /* 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 pthread_kill ();
  int
  main ()
  {
- pthread_kill ();
return pthread_kill ();
    ;
    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_lib_pthread_pthread_kill=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_pthread_pthread_kill=no
      ac_cv_lib_pthread_pthread_kill=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
  LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5
- echo "${ECHO_T}$ac_cv_lib_pthread_pthread_kill" >&6
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5
+ echo "${ECHO_T}$ac_cv_lib_pthread_pthread_kill" >&6; }
  if test $ac_cv_lib_pthread_pthread_kill = yes; then
    gl_have_pthread=yes
               LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
  
            if test -z "$gl_have_pthread"; then
              # For FreeBSD 4.
-             echo "$as_me:$LINENO: checking for pthread_kill in -lc_r" >&5
- echo $ECHO_N "checking for pthread_kill in -lc_r... $ECHO_C" >&6
+             echo "$as_me:$LINENO: checking for pthread_kill in -lc_r" >&5
+ echo $ECHO_N "checking for pthread_kill in -lc_r... $ECHO_C" >&6; }
  if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -5786,56 -7268,53 +7440,53 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- /* 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 pthread_kill ();
  int
  main ()
  {
- pthread_kill ();
return pthread_kill ();
    ;
    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_lib_c_r_pthread_kill=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_c_r_pthread_kill=no
      ac_cv_lib_c_r_pthread_kill=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
  LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_kill" >&5
- echo "${ECHO_T}$ac_cv_lib_c_r_pthread_kill" >&6
echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_kill" >&5
+ echo "${ECHO_T}$ac_cv_lib_c_r_pthread_kill" >&6; }
  if test $ac_cv_lib_c_r_pthread_kill = yes; then
    gl_have_pthread=yes
                 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
@@@ -5864,8 -7343,8 +7515,8 @@@ _ACEO
            fi
            # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
            # pthread_rwlock_* functions.
-           echo "$as_me:$LINENO: checking for pthread_rwlock_t" >&5
- echo $ECHO_N "checking for pthread_rwlock_t... $ECHO_C" >&6
+           echo "$as_me:$LINENO: checking for pthread_rwlock_t" >&5
+ echo $ECHO_N "checking for pthread_rwlock_t... $ECHO_C" >&6; }
  if test "${ac_cv_type_pthread_rwlock_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -5877,50 -7356,47 +7528,47 @@@ cat >>conftest.$ac_ext <<_ACEO
  /* end confdefs.h.  */
  #include <pthread.h>
  
+ typedef pthread_rwlock_t ac__type_new_;
  int
  main ()
  {
- if ((pthread_rwlock_t *) 0)
+ if ((ac__type_new_ *) 0)
    return 0;
- if (sizeof (pthread_rwlock_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_pthread_rwlock_t=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_pthread_rwlock_t=no
      ac_cv_type_pthread_rwlock_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_pthread_rwlock_t" >&5
- echo "${ECHO_T}$ac_cv_type_pthread_rwlock_t" >&6
echo "$as_me:$LINENO: result: $ac_cv_type_pthread_rwlock_t" >&5
+ echo "${ECHO_T}$ac_cv_type_pthread_rwlock_t" >&6; }
  if test $ac_cv_type_pthread_rwlock_t = yes; then
  
  cat >>confdefs.h <<\_ACEOF
@@@ -5951,27 -7427,22 +7599,22 @@@ return !x
  }
  _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
  
  cat >>confdefs.h <<\_ACEOF
  #define HAVE_PTHREAD_MUTEX_RECURSIVE 1
    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
          fi
        fi
      fi
@@@ -6008,34 -7481,32 +7653,32 @@@ thr_self()
  }
  _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
    gl_have_solaristhread=yes
  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 conftest_ipa8_conftest.oo \
        conftest$ac_exeext conftest.$ac_ext
          LIBS="$gl_save_LIBS"
          if test -n "$gl_have_solaristhread"; then
@@@ -6068,8 -7539,8 +7711,8 @@@ _ACEO
  
  
  
-   echo "$as_me:$LINENO: checking how to link with libpth" >&5
- echo $ECHO_N "checking how to link with libpth... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking how to link with libpth" >&5
+ echo $ECHO_N "checking how to link with libpth... $ECHO_C" >&6; }
  if test "${ac_cv_libpth_libs+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
  
  
      use_additional=yes
  
    acl_save_prefix="$prefix"
    prefix="$acl_save_prefix"
  
  
- # Check whether --with-libpth-prefix or --without-libpth-prefix was given.
+ # Check whether --with-libpth-prefix was given.
  if test "${with_libpth_prefix+set}" = set; then
-   withval="$with_libpth_prefix"
+   withval=$with_libpth_prefix;
      if test "X$withval" = "Xno"; then
        use_additional=no
      else
        fi
      fi
  
- fi;
+ fi
        LIBPTH=
    LTLIBPTH=
    INCPTH=
-   LIBPTH_PREFIX=
    rpathdirs=
    ltrpathdirs=
    names_already_handled=
            found_la=
            found_so=
            found_a=
-           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-           if test -n "$acl_shlibext"; then
-             shrext=".$acl_shlibext"             # typically: shrext=.so
-           else
-             shrext=
-           fi
            if test $use_additional = yes; then
-             dir="$additional_libdir"
-                                     if test -n "$acl_shlibext"; then
-               if test -f "$dir/$libname$shrext"; then
-                 found_dir="$dir"
-                 found_so="$dir/$libname$shrext"
-               else
-                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                   ver=`(cd "$dir" && \
-                         for f in "$libname$shrext".*; do echo "$f"; done \
-                         | sed -e "s,^$libname$shrext\\\\.,," \
-                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                         | sed 1q ) 2>/dev/null`
-                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                     found_dir="$dir"
-                     found_so="$dir/$libname$shrext.$ver"
-                   fi
-                 else
-                   eval library_names=\"$acl_library_names_spec\"
-                   for f in $library_names; do
-                     if test -f "$dir/$f"; then
-                       found_dir="$dir"
-                       found_so="$dir/$f"
-                       break
-                     fi
-                   done
-                 fi
-               fi
-             fi
-                         if test "X$found_dir" = "X"; then
-               if test -f "$dir/$libname.$acl_libext"; then
-                 found_dir="$dir"
-                 found_a="$dir/$libname.$acl_libext"
+             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+               found_dir="$additional_libdir"
+               found_so="$additional_libdir/lib$name.$shlibext"
+               if test -f "$additional_libdir/lib$name.la"; then
+                 found_la="$additional_libdir/lib$name.la"
                fi
-             fi
-             if test "X$found_dir" != "X"; then
-               if test -f "$dir/$libname.la"; then
-                 found_la="$dir/$libname.la"
+             else
+               if test -f "$additional_libdir/lib$name.$libext"; then
+                 found_dir="$additional_libdir"
+                 found_a="$additional_libdir/lib$name.$libext"
+                 if test -f "$additional_libdir/lib$name.la"; then
+                   found_la="$additional_libdir/lib$name.la"
+                 fi
                fi
              fi
            fi
                case "$x" in
                  -L*)
                    dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                     if test -n "$acl_shlibext"; then
-                     if test -f "$dir/$libname$shrext"; then
-                       found_dir="$dir"
-                       found_so="$dir/$libname$shrext"
-                     else
-                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                         ver=`(cd "$dir" && \
-                               for f in "$libname$shrext".*; do echo "$f"; done \
-                               | sed -e "s,^$libname$shrext\\\\.,," \
-                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                               | sed 1q ) 2>/dev/null`
-                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                           found_dir="$dir"
-                           found_so="$dir/$libname$shrext.$ver"
-                         fi
-                       else
-                         eval library_names=\"$acl_library_names_spec\"
-                         for f in $library_names; do
-                           if test -f "$dir/$f"; then
-                             found_dir="$dir"
-                             found_so="$dir/$f"
-                             break
-                           fi
-                         done
-                       fi
+                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                     found_dir="$dir"
+                     found_so="$dir/lib$name.$shlibext"
+                     if test -f "$dir/lib$name.la"; then
+                       found_la="$dir/lib$name.la"
                      fi
-                   fi
-                                     if test "X$found_dir" = "X"; then
-                     if test -f "$dir/$libname.$acl_libext"; then
+                   else
+                     if test -f "$dir/lib$name.$libext"; then
                        found_dir="$dir"
-                       found_a="$dir/$libname.$acl_libext"
-                     fi
-                   fi
-                   if test "X$found_dir" != "X"; then
-                     if test -f "$dir/$libname.la"; then
-                       found_la="$dir/$libname.la"
+                       found_a="$dir/lib$name.$libext"
+                       if test -f "$dir/lib$name.la"; then
+                         found_la="$dir/lib$name.la"
+                       fi
                      fi
                    fi
                    ;;
                  if test -z "$haveit"; then
                    ltrpathdirs="$ltrpathdirs $found_dir"
                  fi
-                                 if test "$acl_hardcode_direct" = yes; then
+                                 if test "$hardcode_direct" = yes; then
                                                        LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
                  else
-                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
                                                              LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
                                                              haveit=
                      for x in $rpathdirs; do
                      if test -z "$haveit"; then
                        LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
                      fi
-                     if test "$acl_hardcode_minus_L" != no; then
+                     if test "$hardcode_minus_L" != no; then
                                                                                          LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
                      else
                                                                                                                                                                                  LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
              case "$found_dir" in
                */$acl_libdirstem | */$acl_libdirstem/)
                  basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                 LIBPTH_PREFIX="$basedir"
                  additional_includedir="$basedir/include"
                  ;;
              esac
      done
    done
    if test "X$rpathdirs" != "X"; then
-     if test -n "$acl_hardcode_libdir_separator"; then
+     if test -n "$hardcode_libdir_separator"; then
                          alldirs=
        for found_dir in $rpathdirs; do
-         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
        done
              acl_save_libdir="$libdir"
        libdir="$alldirs"
-       eval flag=\"$acl_hardcode_libdir_flag_spec\"
+       eval flag=\"$hardcode_libdir_flag_spec\"
        libdir="$acl_save_libdir"
        LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
      else
              for found_dir in $rpathdirs; do
          acl_save_libdir="$libdir"
          libdir="$found_dir"
-         eval flag=\"$acl_hardcode_libdir_flag_spec\"
+         eval flag=\"$hardcode_libdir_flag_spec\"
          libdir="$acl_save_libdir"
          LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
        done
      ac_cv_libpth_libs="$LIBPTH"
      ac_cv_libpth_ltlibs="$LTLIBPTH"
      ac_cv_libpth_cppflags="$INCPTH"
-     ac_cv_libpth_prefix="$LIBPTH_PREFIX"
  
  fi
- echo "$as_me:$LINENO: result: $ac_cv_libpth_libs" >&5
- echo "${ECHO_T}$ac_cv_libpth_libs" >&6
echo "$as_me:$LINENO: result: $ac_cv_libpth_libs" >&5
+ echo "${ECHO_T}$ac_cv_libpth_libs" >&6; }
    LIBPTH="$ac_cv_libpth_libs"
    LTLIBPTH="$ac_cv_libpth_ltlibs"
    INCPTH="$ac_cv_libpth_cppflags"
-   LIBPTH_PREFIX="$ac_cv_libpth_prefix"
  
    for element in $INCPTH; do
      haveit=
  
  
  
        HAVE_LIBPTH=yes
  
  
@@@ -6570,34 -7982,32 +8154,32 @@@ pth_self()
  }
  _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
    gl_have_pth=yes
  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 conftest_ipa8_conftest.oo \
        conftest$ac_exeext conftest.$ac_ext
        LIBS="$gl_save_LIBS"
        if test -n "$gl_have_pth"; then
        fi
      fi
    fi
-   echo "$as_me:$LINENO: checking for multithread API to use" >&5
- echo $ECHO_N "checking for multithread API to use... $ECHO_C" >&6
-   echo "$as_me:$LINENO: result: $gl_threads_api" >&5
- echo "${ECHO_T}$gl_threads_api" >&6
+   echo "$as_me:$LINENO: checking for multithread API to use" >&5
+ echo $ECHO_N "checking for multithread API to use... $ECHO_C" >&6; }
+   echo "$as_me:$LINENO: result: $gl_threads_api" >&5
+ echo "${ECHO_T}$gl_threads_api" >&6; }
  
  
  
  
  
  
-       echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
- echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
+   { echo "$as_me:$LINENO: checking whether malloc, realloc, calloc are POSIX compliant" >&5
+ echo $ECHO_N "checking whether malloc, realloc, calloc are POSIX compliant... $ECHO_C" >&6; }
+ if test "${gl_cv_func_malloc_posix+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 ()
+ {
+ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+          choke me
+          #endif
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_func_malloc_posix=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       gl_cv_func_malloc_posix=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_func_malloc_posix" >&5
+ echo "${ECHO_T}$gl_cv_func_malloc_posix" >&6; }
+   GNULIB_MALLOC_POSIX=0;
+   GNULIB_REALLOC_POSIX=0;
+   GNULIB_CALLOC_POSIX=0;
+   GNULIB_GETSUBOPT=0;
+   GNULIB_MKDTEMP=0;
+   GNULIB_MKSTEMP=0;
+     HAVE_CALLOC_POSIX=1;
+   HAVE_GETSUBOPT=1;
+   HAVE_MALLOC_POSIX=1;
+   HAVE_MKDTEMP=1;
+   HAVE_REALLOC_POSIX=1;
+   REPLACE_MKSTEMP=0;
+ { echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
+ echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6; }
+ if test "${gl_cv_var__system_configuration+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 <sys/systemcfg.h>
+ int
+ main ()
+ {
+ double x = _system_configuration.physmem;
+                      if (x > 0.0) return 0;
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   gl_cv_var__system_configuration=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       gl_cv_var__system_configuration=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_var__system_configuration" >&5
+ echo "${ECHO_T}$gl_cv_var__system_configuration" >&6; }
+     if test $gl_cv_var__system_configuration = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE__SYSTEM_CONFIGURATION 1
+ _ACEOF
+     fi
+   { echo "$as_me:$LINENO: checking for ssize_t" >&5
+ echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
+ if test "${gt_cv_ssize_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.  */
+ #include <sys/types.h>
+ int
+ main ()
+ {
+ int x = sizeof (ssize_t *) + sizeof (ssize_t);
+         return !x;
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gt_cv_ssize_t=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       gt_cv_ssize_t=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5
+ echo "${ECHO_T}$gt_cv_ssize_t" >&6; }
+   if test $gt_cv_ssize_t = no; then
+ cat >>confdefs.h <<\_ACEOF
+ #define ssize_t int
+ _ACEOF
+   fi
+   GNULIB_FPRINTF_POSIX=0;
+   GNULIB_PRINTF_POSIX=0;
+   GNULIB_SNPRINTF=0;
+   GNULIB_SPRINTF_POSIX=0;
+   GNULIB_VFPRINTF_POSIX=0;
+   GNULIB_VPRINTF_POSIX=0;
+   GNULIB_VSNPRINTF=0;
+   GNULIB_VSPRINTF_POSIX=0;
+   GNULIB_VASPRINTF=0;
+   GNULIB_FSEEK=0;
+   GNULIB_FSEEKO=0;
+   GNULIB_FTELL=0;
+   GNULIB_FTELLO=0;
+   GNULIB_FFLUSH=0;
+   GNULIB_GETDELIM=0;
+   GNULIB_GETLINE=0;
+     REPLACE_FPRINTF=0;
+   REPLACE_VFPRINTF=0;
+   REPLACE_PRINTF=0;
+   REPLACE_VPRINTF=0;
+   REPLACE_SNPRINTF=0;
+   HAVE_DECL_SNPRINTF=1;
+   REPLACE_VSNPRINTF=0;
+   HAVE_DECL_VSNPRINTF=1;
+   REPLACE_SPRINTF=0;
+   REPLACE_VSPRINTF=0;
+   HAVE_VASPRINTF=1;
+   REPLACE_VASPRINTF=0;
+   HAVE_FSEEKO=1;
+   REPLACE_FSEEKO=0;
+   REPLACE_FSEEK=0;
+   HAVE_FTELLO=1;
+   REPLACE_FTELLO=0;
+   REPLACE_FTELL=0;
+   REPLACE_FFLUSH=0;
+   HAVE_DECL_GETDELIM=1;
+   HAVE_DECL_GETLINE=1;
+   REPLACE_GETLINE=0;
+       { echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
+ echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6; }
  if test "${ac_cv_have_decl_snprintf+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -6669,7 -8311,7 +8483,7 @@@ in
  main ()
  {
  #ifndef snprintf
-   char *p = (char *) snprintf;
+   (void) snprintf;
  #endif
  
    ;
  }
  _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_snprintf=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_have_decl_snprintf=no
      ac_cv_have_decl_snprintf=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_snprintf" >&5
- echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6; }
  if test $ac_cv_have_decl_snprintf = yes; then
  
  cat >>confdefs.h <<_ACEOF
  
  
  
- echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
- echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
+ echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; }
  if test "${ac_cv_header_stdbool_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -6814,40 -8452,36 +8624,36 @@@ main (
  }
  _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_stdbool_h=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_header_stdbool_h=no
      ac_cv_header_stdbool_h=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_header_stdbool_h" >&5
- echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
-    echo "$as_me:$LINENO: checking for _Bool" >&5
- echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
+ echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; }
+    echo "$as_me:$LINENO: checking for _Bool" >&5
+ echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
  if test "${ac_cv_type__Bool+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -6858,50 -8492,47 +8664,47 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  $ac_includes_default
+ typedef _Bool ac__type_new_;
  int
  main ()
  {
- if ((_Bool *) 0)
+ if ((ac__type_new_ *) 0)
    return 0;
- if (sizeof (_Bool))
+ 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__Bool=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type__Bool=no
      ac_cv_type__Bool=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__Bool" >&5
- echo "${ECHO_T}$ac_cv_type__Bool" >&6
echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
+ echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
  if test $ac_cv_type__Bool = yes; then
  
  cat >>confdefs.h <<_ACEOF
  
     fi
  
+   { echo "$as_me:$LINENO: checking for long long int" >&5
+ echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
+ if test "${ac_cv_type_long_long_int+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.  */
+ long long int ll = 9223372036854775807ll;
+           long long int nll = -9223372036854775807LL;
+           typedef int a[((-9223372036854775807LL < 0
+                           && 0 < 9223372036854775807ll)
+                          ? 1 : -1)];
+           int i = 63;
+ int
+ main ()
+ {
+ long long int llmax = 9223372036854775807ll;
+           return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+                   | (llmax / ll) | (llmax % ll));
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+                       if test "$cross_compiling" = yes; then
+   ac_cv_type_long_long_int=yes
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <limits.h>
+              #ifndef LLONG_MAX
+              # define HALF \
+                       (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+              # define LLONG_MAX (HALF - 1 + HALF)
+              #endif
+ int
+ main ()
+ {
+ long long int n = 1;
+              int i;
+              for (i = 0; ; i++)
+                {
+                  long long int m = n << i;
+                  if (m >> i != n)
+                    return 1;
+                  if (LLONG_MAX / 2 < m)
+                    break;
+                }
+              return 0;
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+ 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'
+   { (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_long_long_int=yes
+ 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_type_long_long_int=no
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_type_long_long_int=no
+ fi
+ 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_type_long_long_int" >&5
+ echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
+   if test $ac_cv_type_long_long_int = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_LONG_LONG_INT 1
+ _ACEOF
+   fi
+   { echo "$as_me:$LINENO: checking for unsigned long long int" >&5
+ echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; }
+ if test "${ac_cv_type_unsigned_long_long_int+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.  */
+ unsigned long long int ull = 18446744073709551615ULL;
+           typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
+                          ? 1 : -1)];
+          int i = 63;
+ int
+ main ()
+ {
+ unsigned long long int ullmax = 18446744073709551615ull;
+           return (ull << 63 | ull >> 63 | ull << i | ull >> i
+                   | ullmax / ull | ullmax % ull);
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_type_unsigned_long_long_int=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_type_unsigned_long_long_int=no
+ fi
+ 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_type_unsigned_long_long_int" >&5
+ echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; }
+   if test $ac_cv_type_unsigned_long_long_int = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_UNSIGNED_LONG_LONG_INT 1
+ _ACEOF
+   fi
+   GNULIB_MEMMEM=0;
+   GNULIB_MEMPCPY=0;
+   GNULIB_MEMRCHR=0;
+   GNULIB_STPCPY=0;
+   GNULIB_STPNCPY=0;
+   GNULIB_STRCHRNUL=0;
+   GNULIB_STRDUP=0;
+   GNULIB_STRNDUP=0;
+   GNULIB_STRNLEN=0;
+   GNULIB_STRPBRK=0;
+   GNULIB_STRSEP=0;
+   GNULIB_STRCASESTR=0;
+   GNULIB_STRTOK_R=0;
+   GNULIB_MBSLEN=0;
+   GNULIB_MBSNLEN=0;
+   GNULIB_MBSCHR=0;
+   GNULIB_MBSRCHR=0;
+   GNULIB_MBSSTR=0;
+   GNULIB_MBSCASECMP=0;
+   GNULIB_MBSNCASECMP=0;
+   GNULIB_MBSPCASECMP=0;
+   GNULIB_MBSCASESTR=0;
+   GNULIB_MBSCSPN=0;
+   GNULIB_MBSPBRK=0;
+   GNULIB_MBSSPN=0;
+   GNULIB_MBSSEP=0;
+   GNULIB_MBSTOK_R=0;
      HAVE_DECL_MEMMEM=1;
    HAVE_MEMPCPY=1;
    HAVE_DECL_MEMRCHR=1;
    HAVE_STPCPY=1;
    HAVE_STPNCPY=1;
+   HAVE_STRCASECMP=1;
    HAVE_DECL_STRNCASECMP=1;
    HAVE_STRCHRNUL=1;
    HAVE_DECL_STRDUP=1;
    HAVE_DECL_STRNLEN=1;
    HAVE_STRPBRK=1;
    HAVE_STRSEP=1;
+   HAVE_STRCASESTR=1;
    HAVE_DECL_STRTOK_R=1;
-   REPLACE_STRCASECMP=0;
-   REPLACE_STRSTR=0;
-   REPLACE_STRCASESTR=0;
  
  
-       echo "$as_me:$LINENO: checking whether strdup is declared" >&5
- echo $ECHO_N "checking whether strdup is declared... $ECHO_C" >&6
+       echo "$as_me:$LINENO: checking whether strdup is declared" >&5
+ echo $ECHO_N "checking whether strdup is declared... $ECHO_C" >&6; }
  if test "${ac_cv_have_decl_strdup+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -6954,7 -8832,7 +9004,7 @@@ in
  main ()
  {
  #ifndef strdup
-   char *p = (char *) strdup;
+   (void) strdup;
  #endif
  
    ;
  }
  _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_strdup=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_have_decl_strdup=no
      ac_cv_have_decl_strdup=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_strdup" >&5
- echo "${ECHO_T}$ac_cv_have_decl_strdup" >&6
echo "$as_me:$LINENO: result: $ac_cv_have_decl_strdup" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_strdup" >&6; }
  if test $ac_cv_have_decl_strdup = yes; then
  
  cat >>confdefs.h <<_ACEOF
  
  
  
-     echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
- echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6
- if test "${gl_cv_absolute_string_h+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
  
    :
  
  
  
  
-     if test $ac_cv_header_string_h = yes; then
-       cat >conftest.$ac_ext <<_ACEOF
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_string_h='<'string.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
+ echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_string_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         if test $ac_cv_header_string_h = yes; then
+           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
-       gl_cv_absolute_string_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/string.h#{s#.*"\(.*/string.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
-     fi
+                                   gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/string.h#{
+                s#.*"\(.*/string.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_string_h='<'string.h'>'
+         fi
  
  fi
- echo "$as_me:$LINENO: result: $gl_cv_absolute_string_h" >&5
- echo "${ECHO_T}$gl_cv_absolute_string_h" >&6
- cat >>confdefs.h <<_ACEOF
- #define ABSOLUTE_STRING_H "$gl_cv_absolute_string_h"
- _ACEOF
+ { echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5
+ echo "${ECHO_T}$gl_cv_next_string_h" >&6; }
+      fi
+      NEXT_STRING_H=$gl_cv_next_string_h
  
  
-   ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\"
  
  
  
  
-   echo "$as_me:$LINENO: checking for EOVERFLOW" >&5
- echo $ECHO_N "checking for EOVERFLOW... $ECHO_C" >&6
- if test "${ac_cv_decl_EOVERFLOW+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 <errno.h>
- #ifdef EOVERFLOW
- yes
- #endif
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "yes" >/dev/null 2>&1; then
-   have_eoverflow=1
- fi
- rm -f conftest*
  
-     if test -n "$have_eoverflow"; then
-             ac_cv_decl_EOVERFLOW=yes
-     else
-       cat >conftest.$ac_ext <<_ACEOF
+ { echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
+ echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; }
+ if test "${ac_cv_header_stat_broken+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 <sys/types.h>
+ #include <sys/stat.h>
  
- #define _XOPEN_SOURCE_EXTENDED 1
- #include <errno.h>
- #ifdef EOVERFLOW
- yes
+ #if defined S_ISBLK && defined S_IFDIR
+ extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
  #endif
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "yes" >/dev/null 2>&1; then
-   have_eoverflow=1
- fi
- rm -f conftest*
-       if test -n "$have_eoverflow"; then
-                         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.  */
+ #if defined S_ISBLK && defined S_IFCHR
+ extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+ #endif
  
- #define _XOPEN_SOURCE_EXTENDED 1
- #include <errno.h>
- /* The following two lines are a workaround against an autoconf-2.52 bug.  */
- #include <stdio.h>
- #include <stdlib.h>
+ #if defined S_ISLNK && defined S_IFREG
+ extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+ #endif
  
- int
- main ()
- {
- static int test_array [1 - 2 * !((EOVERFLOW) >= 0)];
- test_array [0] = 0
+ #if defined S_ISSOCK && defined S_IFREG
+ extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+ #endif
  
-   ;
-   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
-   ac_lo=0 ac_mid=0
-   while :; do
-     cat >conftest.$ac_ext <<_ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   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 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; }
+ if test $ac_cv_header_stat_broken = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define STAT_MACROS_BROKEN 1
+ _ACEOF
+ fi
+ # Check whether --enable-largefile was given.
+ if test "${enable_largefile+set}" = set; then
+   enableval=$enable_largefile;
+ fi
+ if test "$enable_largefile" != no; then
+   { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+ echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
+ if test "${ac_cv_sys_largefile_CC+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_cv_sys_largefile_CC=no
+      if test "$GCC" != yes; then
+        ac_save_CC=$CC
+        while :; do
+        # IRIX 6.2 and later do not support large files by default,
+        # so use the C compiler's -n32 option if that helps.
+        cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #define _XOPEN_SOURCE_EXTENDED 1
- #include <errno.h>
- /* The following two lines are a workaround against an autoconf-2.52 bug.  */
- #include <stdio.h>
- #include <stdlib.h>
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
  int
  main ()
  {
- static int test_array [1 - 2 * !((EOVERFLOW) <= $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
+        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 -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
+   break
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext
+        CC="$CC -n32"
+        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
+   ac_cv_sys_largefile_CC=' -n32'; break
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext
+        break
+        done
+        CC=$ac_save_CC
+        rm -f conftest.$ac_ext
+     fi
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+ echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
+   if test "$ac_cv_sys_largefile_CC" != no; then
+     CC=$CC$ac_cv_sys_largefile_CC
+   fi
+   { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+ echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
+ if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   while :; do
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+ 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
-   ac_hi=$ac_mid; break
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_sys_file_offset_bits=no; 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
+ rm -f core 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.  */
+ #define _FILE_OFFSET_BITS 64
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_sys_file_offset_bits=64; break
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cv_sys_file_offset_bits=unknown
+   break
+ done
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+ echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
+ case $ac_cv_sys_file_offset_bits in #(
+   no | unknown) ;;
+   *)
+ cat >>confdefs.h <<_ACEOF
+ #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+ _ACEOF
+ ;;
+ esac
+ rm -f conftest*
+   if test $ac_cv_sys_file_offset_bits = unknown; then
+     { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+ echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
+ if test "${ac_cv_sys_large_files+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   while :; do
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_sys_large_files=no; break
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core 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.  */
+ #define _LARGE_FILES 1
+ #include <sys/types.h>
+  /* Check that off_t can represent 2**63 - 1 correctly.
+     We can't simply define LARGE_OFF_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_sys_large_files=1; break
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cv_sys_large_files=unknown
+   break
+ done
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+ echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
+ case $ac_cv_sys_large_files in #(
+   no | unknown) ;;
+   *)
+ cat >>confdefs.h <<_ACEOF
+ #define _LARGE_FILES $ac_cv_sys_large_files
+ _ACEOF
+ ;;
+ esac
+ rm -f conftest*
+   fi
+ fi
+   GNULIB_CHOWN=0;
+   GNULIB_DUP2=0;
+   GNULIB_FCHDIR=0;
+   GNULIB_FTRUNCATE=0;
+   GNULIB_GETCWD=0;
+   GNULIB_GETLOGIN_R=0;
+   GNULIB_LCHOWN=0;
+   GNULIB_LSEEK=0;
+   GNULIB_READLINK=0;
+   GNULIB_SLEEP=0;
+     HAVE_DUP2=1;
+   HAVE_FTRUNCATE=1;
+   HAVE_READLINK=1;
+   HAVE_SLEEP=1;
+   HAVE_DECL_GETLOGIN_R=1;
+   REPLACE_CHOWN=0;
+   REPLACE_FCHDIR=0;
+   REPLACE_GETCWD=0;
+   REPLACE_LCHOWN=0;
+   REPLACE_LSEEK=0;
+   { echo "$as_me:$LINENO: checking for EOVERFLOW" >&5
+ echo $ECHO_N "checking for EOVERFLOW... $ECHO_C" >&6; }
+ if test "${ac_cv_decl_EOVERFLOW+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 <errno.h>
+ #ifdef EOVERFLOW
+ yes
+ #endif
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "yes" >/dev/null 2>&1; then
+   have_eoverflow=1
+ fi
+ rm -f conftest*
+     if test -n "$have_eoverflow"; then
+             ac_cv_decl_EOVERFLOW=yes
+     else
+       cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <errno.h>
+ #ifdef EOVERFLOW
+ yes
+ #endif
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "yes" >/dev/null 2>&1; then
+   have_eoverflow=1
+ fi
+ rm -f conftest*
+       if test -n "$have_eoverflow"; then
+                         if test "$cross_compiling" = yes; then
+   # Depending upon the size, compute the lo and hi bounds.
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
@@@ -7234,7 -9471,7 +9643,7 @@@ cat >>conftest.$ac_ext <<_ACEO
  int
  main ()
  {
- static int test_array [1 - 2 * !((EOVERFLOW) < 0)];
+ static int test_array [1 - 2 * !((EOVERFLOW) >= 0)];
  test_array [0] = 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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <errno.h>
+ /* The following two lines are a workaround against an autoconf-2.52 bug.  */
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)];
+ test_array [0] = 0
+   ;
+   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
+   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 core 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.  */
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <errno.h>
+ /* The following two lines are a workaround against an autoconf-2.52 bug.  */
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((EOVERFLOW) < 0)];
+ test_array [0] = 0
+   ;
+   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_hi=-1 ac_mid=-1
    while :; do
      cat >conftest.$ac_ext <<_ACEOF
@@@ -7289,50 -9622,48 +9791,48 @@@ test_array [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_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`
      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
+ rm -f core 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=
      ac_lo= ac_hi=
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core 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`
@@@ -7360,47 -9691,36 +9860,36 @@@ test_array [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_hi=$ac_mid
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_lo=`expr '(' $ac_mid ')' + 1`
      ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  done
  case $ac_lo in
  ?*) ac_cv_decl_EOVERFLOW=$ac_lo;;
  '')  ;;
  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.  */
@@@ -7415,8 -9735,8 +9904,8 @@@ cat >>conftest.$ac_ext <<_ACEO
  #include <stdio.h>
  #include <stdlib.h>
  
long longval () { return EOVERFLOW; }
unsigned long ulongval () { return EOVERFLOW; }
static long int longval () { return EOVERFLOW; }
static unsigned long int ulongval () { return EOVERFLOW; }
  #include <stdio.h>
  #include <stdlib.h>
  int
@@@ -7425,35 -9745,44 +9914,44 @@@ main (
  
    FILE *f = fopen ("conftest.val", "w");
    if (! f)
-     exit (1);
+     return 1;
    if ((EOVERFLOW) < 0)
      {
-       long i = longval ();
+       long int i = longval ();
        if (i != (EOVERFLOW))
-       exit (1);
+       return 1;
        fprintf (f, "%ld\n", i);
      }
    else
      {
-       unsigned long i = ulongval ();
+       unsigned long int i = ulongval ();
        if (i != (EOVERFLOW))
-       exit (1);
+       return 1;
        fprintf (f, "%lu\n", i);
      }
-   exit (ferror (f) || fclose (f) != 0);
+   return 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
+ 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
@@@ -7464,8 -9793,7 +9962,7 @@@ echo "$as_me: failed program was:" >&
  sed 's/^/| /' conftest.$ac_ext >&5
  
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
  rm -f conftest.val
        else
      fi
  
  fi
- echo "$as_me:$LINENO: result: $ac_cv_decl_EOVERFLOW" >&5
- echo "${ECHO_T}$ac_cv_decl_EOVERFLOW" >&6
echo "$as_me:$LINENO: result: $ac_cv_decl_EOVERFLOW" >&5
+ echo "${ECHO_T}$ac_cv_decl_EOVERFLOW" >&6; }
    if test "$ac_cv_decl_EOVERFLOW" != yes; then
  
  cat >>confdefs.h <<_ACEOF
@@@ -7487,9 -9815,15 +9984,15 @@@ _ACEO
    fi
  
  
-   echo "$as_me:$LINENO: checking for long long int" >&5
- echo $ECHO_N "checking for long long int... $ECHO_C" >&6
- if test "${ac_cv_type_long_long_int+set}" = set; then
+   { echo "$as_me:$LINENO: checking for wchar_t" >&5
+ echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
+ if test "${gt_cv_c_wchar_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
@@@ -7498,46 -9832,58 +10001,58 @@@ _ACEO
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- long long int ll = 9223372036854775807ll;
-           long long int nll = -9223372036854775807LL;
-           typedef int a[((-9223372036854775807LL < 0
-                           && 0 < 9223372036854775807ll)
-                          ? 1 : -1)];
-           int i = 63;
+ #include <stddef.h>
+        wchar_t foo = (wchar_t)'\0';
  int
  main ()
  {
- long long int llmax = 9223372036854775807ll;
-           return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
-                   | (llmax / ll) | (llmax % ll));
    ;
    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
+ 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 -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
-                       if test "$cross_compiling" = yes; then
-   ac_cv_type_long_long_int=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gt_cv_c_wchar_t=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       gt_cv_c_wchar_t=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5
+ echo "${ECHO_T}$gt_cv_c_wchar_t" >&6; }
+   if test $gt_cv_c_wchar_t = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_WCHAR_T 1
+ _ACEOF
+   fi
+   { echo "$as_me:$LINENO: checking for wint_t" >&5
+ echo $ECHO_N "checking for wint_t... $ECHO_C" >&6; }
+ if test "${gt_cv_c_wint_t+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <limits.h>
-              #ifndef LLONG_MAX
-              # define HALF \
-                       (1LL << (sizeof (long long int) * CHAR_BIT - 2))
-              # define LLONG_MAX (HALF - 1 + HALF)
-              #endif
+ #include <wchar.h>
+        wint_t foo = (wchar_t)'\0';
  int
  main ()
  {
- long long int n = 1;
-              int i;
-              for (i = 0; ; i++)
-                {
-                  long long int m = n << i;
-                  if (m >> i != n)
-                    return 1;
-                  if (LLONG_MAX / 2 < m)
-                    break;
-                }
-              return 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
+ 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
-   ac_cv_type_long_long_int=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gt_cv_c_wint_t=yes
  else
-   echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
+   echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ( exit $ac_status )
- ac_cv_type_long_long_int=no
+       gt_cv_c_wint_t=no
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_long_long_int=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
- echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
-   if test $ac_cv_type_long_long_int = yes; then
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_LONG_LONG_INT 1
- _ACEOF
-   fi
-   echo "$as_me:$LINENO: checking for long double" >&5
- echo $ECHO_N "checking for long double... $ECHO_C" >&6
- if test "${gt_cv_c_long_double+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test "$GCC" = yes; then
-        gt_cv_c_long_double=yes
-      else
-        cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
-          /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
-          long double foo = 0.0;
-          /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
-          int array [2*(sizeof(long double) >= sizeof(double)) - 1];
- 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
-   gt_cv_c_long_double=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- gt_cv_c_long_double=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-      fi
- fi
- echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5
- echo "${ECHO_T}$gt_cv_c_long_double" >&6
-   if test $gt_cv_c_long_double = yes; then
+ { echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5
+ echo "${ECHO_T}$gt_cv_c_wint_t" >&6; }
+   if test $gt_cv_c_wint_t = yes; then
  
  cat >>confdefs.h <<\_ACEOF
- #define HAVE_LONG_DOUBLE 1
+ #define HAVE_WINT_T 1
  _ACEOF
  
    fi
  
-   echo "$as_me:$LINENO: checking for wchar_t" >&5
- echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
- if test "${gt_cv_c_wchar_t+set}" = set; then
+ { 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
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <stddef.h>
       wchar_t foo = (wchar_t)'\0';
+ $ac_includes_default
typedef size_t ac__type_new_;
  int
  main ()
  {
+ if ((ac__type_new_ *) 0)
+   return 0;
+ 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
-   gt_cv_c_wchar_t=yes
+   (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
  
- gt_cv_c_wchar_t=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_cv_type_size_t=no
  fi
- echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5
- echo "${ECHO_T}$gt_cv_c_wchar_t" >&6
-   if test $gt_cv_c_wchar_t = yes; then
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_WCHAR_T 1
- _ACEOF
  
-   fi
-   echo "$as_me:$LINENO: checking for wint_t" >&5
- echo $ECHO_N "checking for wint_t... $ECHO_C" >&6
- if test "${gt_cv_c_wint_t+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ 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; }
+ if test $ac_cv_type_size_t = 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.  */
- /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-    <wchar.h>.
-    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-    before <wchar.h>.  */
- #include <stddef.h>
- #include <stdio.h>
- #include <time.h>
- #include <wchar.h>
-        wint_t foo = (wchar_t)'\0';
- int
- main ()
- {
  
-   ;
-   return 0;
- }
+ cat >>confdefs.h <<_ACEOF
+ #define size_t unsigned int
  _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
-   gt_cv_c_wint_t=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- gt_cv_c_wint_t=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5
- echo "${ECHO_T}$gt_cv_c_wint_t" >&6
-   if test $gt_cv_c_wint_t = yes; then
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_WINT_T 1
- _ACEOF
-   fi
  
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 "$as_me:$LINENO: checking for inttypes.h" >&5
+ echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; }
+ if test "${gl_cv_header_inttypes_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
+ #include <sys/types.h>
+ #include <inttypes.h>
  int
  main ()
  {
- if ((size_t *) 0)
-   return 0;
- if (sizeof (size_t))
-   return 0;
+ uintmax_t i = (uintmax_t) -1;
    ;
    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
-   ac_cv_type_size_t=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_header_inttypes_h=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_type_size_t=no
      gl_cv_header_inttypes_h=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
- if test $ac_cv_type_size_t = yes; then
-   :
- else
+ { echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5
+ echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6; }
+   if test $gl_cv_header_inttypes_h = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define size_t unsigned
+ #define HAVE_INTTYPES_H_WITH_UINTMAX 1
  _ACEOF
  
- fi
  fi
  
  
-   echo "$as_me:$LINENO: checking for inttypes.h" >&5
- echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
- if test "${gl_cv_header_inttypes_h+set}" = set; then
+   { echo "$as_me:$LINENO: checking for stdint.h" >&5
+ echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6; }
+ if test "${gl_cv_header_stdint_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
@@@ -7894,60 -10073,56 +10239,56 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  #include <sys/types.h>
- #include <inttypes.h>
+ #include <stdint.h>
  int
  main ()
  {
- uintmax_t i = (uintmax_t) -1; return !i;
+ uintmax_t i = (uintmax_t) -1;
    ;
    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
-   gl_cv_header_inttypes_h=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_header_stdint_h=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
gl_cv_header_inttypes_h=no
      gl_cv_header_stdint_h=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: $gl_cv_header_inttypes_h" >&5
- echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6
-   if test $gl_cv_header_inttypes_h = yes; then
{ echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5
+ echo "${ECHO_T}$gl_cv_header_stdint_h" >&6; }
+   if test $gl_cv_header_stdint_h = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_INTTYPES_H_WITH_UINTMAX 1
+ #define HAVE_STDINT_H_WITH_UINTMAX 1
  _ACEOF
  
    fi
  
  
-   echo "$as_me:$LINENO: checking for stdint.h" >&5
- echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6
- if test "${gl_cv_header_stdint_h+set}" = set; then
+   { 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
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <sys/types.h>
- #include <stdint.h>
+ long long ll = 1LL; int i = 63;
  int
  main ()
  {
- uintmax_t i = (uintmax_t) -1; return !i;
+ long long llmax = (long long) -1;
+      return ll << i | ll >> i | llmax / ll | llmax % ll;
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
-   gl_cv_header_stdint_h=yes
+   (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_type_long_long=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- gl_cv_header_stdint_h=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_cv_type_long_long=no
  fi
- echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5
- echo "${ECHO_T}$gl_cv_header_stdint_h" >&6
-   if test $gl_cv_header_stdint_h = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_STDINT_H_WITH_UINTMAX 1
- _ACEOF
-   fi
  
-   ac_cv_type_long_long=$ac_cv_type_long_long_int
+ 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_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
@@@ -8021,8 -10183,8 +10349,8 @@@ _ACEO
  
  
  
-   echo "$as_me:$LINENO: checking for intmax_t" >&5
- echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for intmax_t" >&5
+ echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6; }
  if test "${gt_cv_c_intmax_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -8051,38 -10213,34 +10379,34 @@@ intmax_t x = -1; return !x
  }
  _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
    gt_cv_c_intmax_t=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- gt_cv_c_intmax_t=no
      gt_cv_c_intmax_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: $gt_cv_c_intmax_t" >&5
- echo "${ECHO_T}$gt_cv_c_intmax_t" >&6
echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5
+ echo "${ECHO_T}$gt_cv_c_intmax_t" >&6; }
    if test $gt_cv_c_intmax_t = yes; then
  
  cat >>confdefs.h <<\_ACEOF
    fi
  
  
+   GNULIB_WCWIDTH=0;
+     HAVE_DECL_WCWIDTH=1;
+   REPLACE_WCWIDTH=0;
+   WCHAR_H=
  
  
  
  
  
- if true; then
   if true; then
    GL_COND_LIBTOOL_TRUE=
    GL_COND_LIBTOOL_FALSE='#'
  else
  
    # Define an additional variable used in the Makefile substitution.
    if test $ac_cv_working_alloca_h = yes; then
-     echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5
- echo $ECHO_N "checking for alloca as a compiler built-in... $ECHO_C" >&6
+     echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5
+ echo $ECHO_N "checking for alloca as a compiler built-in... $ECHO_C" >&6; }
  if test "${gl_cv_rpl_alloca+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -8156,8 -10319,8 +10485,8 @@@ rm -f conftest
  
  
  fi
- echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5
- echo "${ECHO_T}$gl_cv_rpl_alloca" >&6
echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5
+ echo "${ECHO_T}$gl_cv_rpl_alloca" >&6; }
      if test $gl_cv_rpl_alloca = yes; then
  
  cat >>confdefs.h <<\_ACEOF
    fi
  
  
+   { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+ echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+ if test -z "$MKDIR_P"; then
+   if test "${ac_cv_path_mkdir+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+        done
+ done
+ IFS=$as_save_IFS
  
-   { echo "$as_me:$LINENO: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&5
- echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&6;}
+ fi
  
-   echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5
- echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6
- if test "${ac_cv_search_getaddrinfo+set}" = set; then
+   if test "${ac_cv_path_mkdir+set}" = set; then
+     MKDIR_P="$ac_cv_path_mkdir -p"
+   else
+     # As a last resort, use the slow shell script.  Don't cache a
+     # value for MKDIR_P within a source directory, because that will
+     # break other packages using the cache if that directory is
+     # removed, or if the value is a relative name.
+     test -d ./--version && rmdir ./--version
+     MKDIR_P="$ac_install_sh -d"
+   fi
+ fi
+ { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+ echo "${ECHO_T}$MKDIR_P" >&6; }
+   FLOAT_H=
+   case "$host_os" in
+     beos*)
+       FLOAT_H=float.h
+   :
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_float_h='<'float.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <float.h>" >&5
+ echo $ECHO_N "checking absolute name of <float.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_float_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_func_search_save_LIBS=$LIBS
- ac_cv_search_getaddrinfo=no
- cat >conftest.$ac_ext <<_ACEOF
+         if test $ac_cv_header_float_h = yes; then
          cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
+ #include <float.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 getaddrinfo ();
- int
- main ()
- {
- getaddrinfo ();
-   ;
-   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
+                                   gl_cv_next_float_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/float.h#{
+                s#.*"\(.*/float.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_float_h='<'float.h'>'
+         fi
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_float_h" >&5
+ echo "${ECHO_T}$gl_cv_next_float_h" >&6; }
+      fi
+      NEXT_FLOAT_H=$gl_cv_next_float_h
+       ;;
+   esac
+   :
+   :
+ for ac_header in sys/mount.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 { 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
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ $ac_includes_default
+      #if HAVE_SYS_PARAM_H
+        #include <sys/param.h>
+       #endif
+ #include <$ac_header>
+ _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 -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_search_getaddrinfo="none required"
+   (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"
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- if test "$ac_cv_search_getaddrinfo" = no; then
-   for ac_lib in nsl socket; do
-     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-     cat >conftest.$ac_ext <<_ACEOF
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ 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
+ _ACEOF
+ fi
+ done
+ { echo "$as_me:$LINENO: checking how to get file system space usage" >&5
+ echo "$as_me: checking how to get file system space usage" >&6;}
+ ac_fsusage_space=no
+ # Perform only the link test since it seems there are no variants of the
+ # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
+ # because that got a false positive on SCO OSR5.  Adding the declaration
+ # of a `struct statvfs' causes this test to fail (as it should) on such
+ # systems.  That system is reported to work fine with STAT_STATFS4 which
+ # is what it gets when this test fails.
+ if test $ac_fsusage_space = no; then
+   # SVR4
+   { echo "$as_me:$LINENO: checking for statvfs function (SVR4)" >&5
+ echo $ECHO_N "checking for statvfs function (SVR4)... $ECHO_C" >&6; }
+ if test "${fu_cv_sys_stat_statvfs+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 <sys/types.h>
+ #if defined __GLIBC__ && !defined __BEOS__
+ Do not use statvfs on systems with GNU libc, because that function stats
+ all preceding entries in /proc/mounts, and that makes df hang if even
+ one of the corresponding file systems is hard-mounted, but not available.
+ statvfs in GNU libc on BeOS operates differently: it only makes a system
+ call.
+ #endif
  
- /* Override any gcc2 internal prototype to avoid an error.  */
- #ifdef __cplusplus
- extern "C"
+ #ifdef __osf__
+ "Do not use Tru64's statvfs implementation"
  #endif
- /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
- char getaddrinfo ();
+ #include <sys/statvfs.h>
  int
  main ()
  {
getaddrinfo ();
struct statvfs fsd; statvfs (0, &fsd);
    ;
    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
-   ac_cv_search_getaddrinfo="-l$ac_lib"
- break
+   (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
+   fu_cv_sys_stat_statvfs=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
+       fu_cv_sys_stat_statvfs=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
-   done
  fi
- LIBS=$ac_func_search_save_LIBS
- fi
- echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5
- echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6
- if test "$ac_cv_search_getaddrinfo" != no; then
-   test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS"
+ { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs" >&5
+ echo "${ECHO_T}$fu_cv_sys_stat_statvfs" >&6; }
+   if test $fu_cv_sys_stat_statvfs = yes; then
+     ac_fsusage_space=yes
  
- fi
+ cat >>confdefs.h <<\_ACEOF
+ #define STAT_STATVFS 1
+ _ACEOF
  
+   fi
+ fi
  
- for ac_func in getaddrinfo
- 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
+ if test $ac_fsusage_space = no; then
+   # DEC Alpha running OSF/1
+   { echo "$as_me:$LINENO: checking for 3-argument statfs function (DEC OSF/1)" >&5
+ echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6; }
+   if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test "$cross_compiling" = yes; then
+   fu_cv_sys_stat_statfs3_osf1=no
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  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.  */
+ #include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/mount.h>
+   int
+   main ()
+   {
+     struct statfs fsd;
+     fsd.f_fsize = 0;
+     return statfs (".", &fsd, sizeof (struct statfs)) != 0;
+   }
+ _ACEOF
+ rm -f conftest$ac_exeext
+ 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'
+   { (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
+   fu_cv_sys_stat_statfs3_osf1=yes
+ else
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
+ ( exit $ac_status )
+ fu_cv_sys_stat_statfs3_osf1=no
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
  
- #undef $ac_func
  
- /* Override any gcc2 internal prototype to avoid an error.  */
- #ifdef __cplusplus
- extern "C"
- {
+ fi
+   { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs3_osf1" >&5
+ echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6; }
+   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
+     ac_fsusage_space=yes
+ cat >>confdefs.h <<\_ACEOF
+ #define STAT_STATFS3_OSF1 1
+ _ACEOF
+   fi
+ fi
+ if test $ac_fsusage_space = no; then
+ # AIX
+   { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
+ echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6; }
+   if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test "$cross_compiling" = yes; then
+   fu_cv_sys_stat_statfs2_bsize=no
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
  #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;
+ #ifdef HAVE_SYS_MOUNT_H
+ #include <sys/mount.h>
  #endif
- #ifdef __cplusplus
- }
+ #ifdef HAVE_SYS_VFS_H
+ #include <sys/vfs.h>
  #endif
- int
- main ()
- {
- return f != $ac_func;
-   ;
-   return 0;
- }
+   int
+   main ()
+   {
+   struct statfs fsd;
+   fsd.f_bsize = 0;
+   return statfs (".", &fsd) != 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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest$ac_exeext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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"
+   fu_cv_sys_stat_statfs2_bsize=yes
  else
-   echo "$as_me: failed program was:" >&5
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+ ( exit $ac_status )
+ fu_cv_sys_stat_statfs2_bsize=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 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
+ fi
+   { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_bsize" >&5
+ echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6; }
+   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
+     ac_fsusage_space=yes
+ cat >>confdefs.h <<\_ACEOF
+ #define STAT_STATFS2_BSIZE 1
  _ACEOF
  
- else
+   fi
+ fi
  
-     echo "$as_me:$LINENO: checking for getaddrinfo in ws2tcpip.h and -lws2_32" >&5
- echo $ECHO_N "checking for getaddrinfo in ws2tcpip.h and -lws2_32... $ECHO_C" >&6
- if test "${gl_cv_w32_getaddrinfo+set}" = set; then
+ if test $ac_fsusage_space = no; then
+ # SVR3
+   { echo "$as_me:$LINENO: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
+ echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6; }
+   if test "${fu_cv_sys_stat_statfs4+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-       gl_cv_w32_getaddrinfo=no
-       am_save_LIBS="$LIBS"
-       LIBS="$LIBS -lws2_32"
-       cat >conftest.$ac_ext <<_ACEOF
+   if test "$cross_compiling" = yes; then
+   fu_cv_sys_stat_statfs4=no
+ else
+   cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #ifdef HAVE_WS2TCPIP_H
- #include <ws2tcpip.h>
- #endif
- int
- main ()
- {
- getaddrinfo(0, 0, 0, 0);
-   ;
-   return 0;
- }
+ #include <sys/types.h>
+ #include <sys/statfs.h>
+   int
+   main ()
+   {
+   struct statfs fsd;
+   return statfs (".", &fsd, sizeof fsd, 0) != 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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest$ac_exeext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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
-   gl_cv_w32_getaddrinfo=yes
+   fu_cv_sys_stat_statfs4=yes
  else
-   echo "$as_me: failed program was:" >&5
+   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 )
+ fu_cv_sys_stat_statfs4=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
-     LIBS="$am_save_LIBS"
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $gl_cv_w32_getaddrinfo" >&5
- echo "${ECHO_T}$gl_cv_w32_getaddrinfo" >&6
-     if test "$gl_cv_w32_getaddrinfo" = "yes"; then
-       LIBS="$LIBS -lws2_32"
-     else
-       gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext"
-     fi
  
  fi
- done
  
+   { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs4" >&5
+ echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6; }
+   if test $fu_cv_sys_stat_statfs4 = yes; then
+     ac_fsusage_space=yes
  
+ cat >>confdefs.h <<\_ACEOF
+ #define STAT_STATFS4 1
+ _ACEOF
  
- for ac_func in gai_strerror
- 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
+   fi
+ fi
+ if test $ac_fsusage_space = no; then
+ # 4.4BSD and NetBSD
+   { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
+ echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6; }
+   if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test "$cross_compiling" = yes; then
+   fu_cv_sys_stat_statfs2_fsize=no
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  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;
+ #include <sys/types.h>
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
  #endif
- #ifdef __cplusplus
- }
+ #ifdef HAVE_SYS_MOUNT_H
+ #include <sys/mount.h>
  #endif
- int
- main ()
- {
- return f != $ac_func;
-   ;
-   return 0;
- }
+   int
+   main ()
+   {
+   struct statfs fsd;
+   fsd.f_fsize = 0;
+   return statfs (".", &fsd) != 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
+ rm -f conftest$ac_exeext
+ 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=$?
 +  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
+   (exit $ac_status); } && { ac_try='./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"
+   fu_cv_sys_stat_statfs2_fsize=yes
  else
-   echo "$as_me: failed program was:" >&5
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+ ( exit $ac_status )
+ fu_cv_sys_stat_statfs2_fsize=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 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
  
- else
-   gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
  fi
- done
  
+   { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_fsize" >&5
+ echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6; }
+   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
+     ac_fsusage_space=yes
  
-   echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
- echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
- if test "${ac_cv_search_gethostbyname+set}" = set; then
+ cat >>confdefs.h <<\_ACEOF
+ #define STAT_STATFS2_FSIZE 1
+ _ACEOF
+   fi
+ fi
+ if test $ac_fsusage_space = no; then
+   # Ultrix
+   { echo "$as_me:$LINENO: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
+ echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6; }
+   if test "${fu_cv_sys_stat_fs_data+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_func_search_save_LIBS=$LIBS
- ac_cv_search_gethostbyname=no
- cat >conftest.$ac_ext <<_ACEOF
+   if test "$cross_compiling" = yes; then
+   fu_cv_sys_stat_fs_data=no
+ else
+   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"
+ #include <sys/types.h>
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
  #endif
- /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
- char gethostbyname ();
- int
- main ()
- {
- gethostbyname ();
-   ;
-   return 0;
- }
+ #ifdef HAVE_SYS_MOUNT_H
+ #include <sys/mount.h>
+ #endif
+ #ifdef HAVE_SYS_FS_TYPES_H
+ #include <sys/fs_types.h>
+ #endif
+   int
+   main ()
+   {
+   struct fs_data fsd;
+   /* Ultrix's statfs returns 1 for success,
+      0 for not mounted, -1 for failure.  */
+   return statfs (".", &fsd) != 1;
+   }
  _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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest$ac_exeext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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_gethostbyname="none required"
+   fu_cv_sys_stat_fs_data=yes
  else
-   echo "$as_me: failed program was:" >&5
+   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 )
+ fu_cv_sys_stat_fs_data=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- if test "$ac_cv_search_gethostbyname" = no; then
-   for ac_lib in inet nsl; do
-     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-     cat >conftest.$ac_ext <<_ACEOF
+ 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: $fu_cv_sys_stat_fs_data" >&5
+ echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6; }
+   if test $fu_cv_sys_stat_fs_data = yes; then
+     ac_fsusage_space=yes
+ cat >>confdefs.h <<\_ACEOF
+ #define STAT_STATFS2_FS_DATA 1
+ _ACEOF
+   fi
+ fi
+ if test $ac_fsusage_space = no; then
+   # SVR2
+   cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
+ #include <sys/filsys.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 gethostbyname ();
- int
- main ()
- {
- gethostbyname ();
-   ;
-   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_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); } &&
-        { 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); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        }; then
+ cat >>confdefs.h <<\_ACEOF
+ #define STAT_READ_FILSYS 1
+ _ACEOF
+     ac_fsusage_space=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f conftest.err conftest.$ac_ext
+ fi
+ if test $ac_fsusage_space = yes; then
+   gl_cv_fs_space=yes
+ else
+   gl_cv_fs_space=no
+ fi
+   if test $gl_cv_fs_space = yes; then
+     gl_LIBOBJS="$gl_LIBOBJS fsusage.$ac_objext"
+ for ac_header in dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ 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; }
+ 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 { (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_exeext'
-   { (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_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_header_compiler=no
+ fi
+ 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; }
+ 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 { (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); }; }; then
-   ac_cv_search_gethostbyname="-l$ac_lib"
- break
+   (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
  sed 's/^/| /' conftest.$ac_ext >&5
  
+   ac_header_preproc=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
-   done
+ 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;}
+     ;;
+ esac
+ { 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
- LIBS=$ac_func_search_save_LIBS
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  fi
- echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
- echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
- if test "$ac_cv_search_gethostbyname" != no; then
-   test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  
  fi
  
-   echo "$as_me:$LINENO: checking for library containing getservbyname" >&5
- echo $ECHO_N "checking for library containing getservbyname... $ECHO_C" >&6
- if test "${ac_cv_search_getservbyname+set}" = set; then
+ done
+   { echo "$as_me:$LINENO: checking for statfs that truncates block counts" >&5
+ echo $ECHO_N "checking for statfs that truncates block counts... $ECHO_C" >&6; }
+   if test "${fu_cv_sys_truncating_statfs+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_func_search_save_LIBS=$LIBS
- ac_cv_search_getservbyname=no
- cat >conftest.$ac_ext <<_ACEOF
+   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"
+ #if !defined(sun) && !defined(__sun)
+ choke -- this is a workaround for a Sun-specific problem
  #endif
- /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
- char getservbyname ();
+ #include <sys/types.h>
+ #include <sys/vfs.h>
  int
  main ()
  {
- getservbyname ();
+ struct statfs t; long c = *(t.f_spare);
+       if (c) return 0;
    ;
    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
+ 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 -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_search_getservbyname="none required"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   fu_cv_sys_truncating_statfs=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
+       fu_cv_sys_truncating_statfs=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- if test "$ac_cv_search_getservbyname" = no; then
-   for ac_lib in inet nsl socket xnet; do
-     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-     cat >conftest.$ac_ext <<_ACEOF
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+   if test $fu_cv_sys_truncating_statfs = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define STATFS_TRUNCATES_BLOCK_COUNTS 1
+ _ACEOF
+   fi
+   { echo "$as_me:$LINENO: result: $fu_cv_sys_truncating_statfs" >&5
+ echo "${ECHO_T}$fu_cv_sys_truncating_statfs" >&6; }
+   fi
+     { echo "$as_me:$LINENO: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&5
+ echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&6;}
+   { echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5
+ echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6; }
+ if test "${ac_cv_search_getaddrinfo+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_func_search_save_LIBS=$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.  */
+ /* 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 getservbyname ();
+ char getaddrinfo ();
  int
  main ()
  {
getservbyname ();
return getaddrinfo ();
    ;
    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
+ for ac_lib in '' nsl socket; do
+   if test -z "$ac_lib"; then
+     ac_res="none required"
+   else
+     ac_res=-l$ac_lib
+     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+   fi
+   rm -f conftest.$ac_objext conftest$ac_exeext
+ 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
-   ac_cv_search_getservbyname="-l$ac_lib"
- break
+   (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_search_getaddrinfo=$ac_res
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
-   done
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext
+   if test "${ac_cv_search_getaddrinfo+set}" = set; then
+   break
+ fi
+ done
+ if test "${ac_cv_search_getaddrinfo+set}" = set; then
+   :
+ else
+   ac_cv_search_getaddrinfo=no
  fi
+ rm conftest.$ac_ext
  LIBS=$ac_func_search_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_search_getservbyname" >&5
- echo "${ECHO_T}$ac_cv_search_getservbyname" >&6
- if test "$ac_cv_search_getservbyname" != no; then
-   test "$ac_cv_search_getservbyname" = "none required" || LIBS="$ac_cv_search_getservbyname $LIBS"
+ { echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5
+ echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6; }
+ ac_res=$ac_cv_search_getaddrinfo
+ if test "$ac_res" != no; then
+   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
  fi
  
  
- for ac_func in gethostbyname
+ for ac_func in getaddrinfo
  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
@@@ -8886,68 -11404,467 +11567,467 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
  }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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"
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
+ else
+     { echo "$as_me:$LINENO: checking for getaddrinfo in ws2tcpip.h and -lws2_32" >&5
+ echo $ECHO_N "checking for getaddrinfo in ws2tcpip.h and -lws2_32... $ECHO_C" >&6; }
+ if test "${gl_cv_w32_getaddrinfo+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+       gl_cv_w32_getaddrinfo=no
+       am_save_LIBS="$LIBS"
+       LIBS="$LIBS -lws2_32"
+       cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #ifdef HAVE_WS2TCPIP_H
+ #include <ws2tcpip.h>
  #endif
  
  int
  main ()
  {
return f != $ac_func;
getaddrinfo(0, 0, 0, 0);
    ;
    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
+   (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
+   gl_cv_w32_getaddrinfo=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+     LIBS="$am_save_LIBS"
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_w32_getaddrinfo" >&5
+ echo "${ECHO_T}$gl_cv_w32_getaddrinfo" >&6; }
+     if test "$gl_cv_w32_getaddrinfo" = "yes"; then
+       LIBS="$LIBS -lws2_32"
+     else
+       gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext"
+     fi
+ fi
+ done
+   # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
+   # inline function declared in ws2tcpip.h, so we need to get that
+   # header included somehow.
+   :
+   { echo "$as_me:$LINENO: checking for gai_strerror (possibly via ws2tcpip.h)" >&5
+ echo $ECHO_N "checking for gai_strerror (possibly via ws2tcpip.h)... $ECHO_C" >&6; }
+ if test "${gl_cv_func_gai_strerror+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 <sys/types.h>
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+ #ifdef HAVE_WS2TCPIP_H
+ #include <ws2tcpip.h>
+ #endif
+ int
+ main ()
+ {
+ gai_strerror (0);
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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 -s conftest$ac_exeext'
-   { (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_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   gl_cv_func_gai_strerror=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       gl_cv_func_gai_strerror=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_func_gai_strerror" >&5
+ echo "${ECHO_T}$gl_cv_func_gai_strerror" >&6; }
+   if test $gl_cv_func_gai_strerror = no; then
+     gl_LIBOBJS="$gl_LIBOBJS gai_strerror.$ac_objext"
+   fi
+     { echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
+ echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6; }
+ if test "${ac_cv_search_gethostbyname+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_func_search_save_LIBS=$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 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
+ char gethostbyname ();
+ int
+ main ()
+ {
+ return gethostbyname ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ for ac_lib in '' inet nsl; do
+   if test -z "$ac_lib"; then
+     ac_res="none required"
+   else
+     ac_res=-l$ac_lib
+     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+   fi
+   rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); }; }; 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_search_gethostbyname=$ac_res
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext
+   if test "${ac_cv_search_gethostbyname+set}" = set; then
+   break
+ fi
+ done
+ if test "${ac_cv_search_gethostbyname+set}" = set; then
+   :
+ else
+   ac_cv_search_gethostbyname=no
+ fi
+ rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
+ echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6; }
+ ac_res=$ac_cv_search_gethostbyname
+ if test "$ac_res" != no; then
+   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ fi
+   { echo "$as_me:$LINENO: checking for library containing getservbyname" >&5
+ echo $ECHO_N "checking for library containing getservbyname... $ECHO_C" >&6; }
+ if test "${ac_cv_search_getservbyname+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_func_search_save_LIBS=$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 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
+ char getservbyname ();
+ int
+ main ()
+ {
+ return getservbyname ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ for ac_lib in '' inet nsl socket xnet; do
+   if test -z "$ac_lib"; then
+     ac_res="none required"
+   else
+     ac_res=-l$ac_lib
+     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+   fi
+   rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_search_getservbyname=$ac_res
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext
+   if test "${ac_cv_search_getservbyname+set}" = set; then
+   break
+ fi
+ done
+ if test "${ac_cv_search_getservbyname+set}" = set; then
+   :
+ else
+   ac_cv_search_getservbyname=no
+ fi
+ rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_search_getservbyname" >&5
+ echo "${ECHO_T}$ac_cv_search_getservbyname" >&6; }
+ ac_res=$ac_cv_search_getservbyname
+ if test "$ac_res" != no; then
+   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ fi
+ for ac_func in gethostbyname
+ 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 { 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
+ /* 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 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
+ 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
+ #endif
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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
@@@ -8955,8 -11872,8 +12035,8 @@@ _ACEO
  
  else
  
-     echo "$as_me:$LINENO: checking for gethostbyname in winsock2.h and -lws2_32" >&5
- echo $ECHO_N "checking for gethostbyname in winsock2.h and -lws2_32... $ECHO_C" >&6
+     echo "$as_me:$LINENO: checking for gethostbyname in winsock2.h and -lws2_32" >&5
+ echo $ECHO_N "checking for gethostbyname in winsock2.h and -lws2_32... $ECHO_C" >&6; }
  if test "${gl_cv_w32_gethostbyname+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -8984,39 -11901,37 +12064,37 @@@ gethostbyname(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
    gl_cv_w32_gethostbyname=yes
  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 conftest_ipa8_conftest.oo \
        conftest$ac_exeext conftest.$ac_ext
      LIBS="$am_save_LIBS"
  fi
- echo "$as_me:$LINENO: result: $gl_cv_w32_gethostbyname" >&5
- echo "${ECHO_T}$gl_cv_w32_gethostbyname" >&6
echo "$as_me:$LINENO: result: $gl_cv_w32_gethostbyname" >&5
+ echo "${ECHO_T}$gl_cv_w32_gethostbyname" >&6; }
      if test "$gl_cv_w32_gethostbyname" = "yes"; then
        LIBS="$LIBS -lws2_32"
      fi
  
  
  
-   echo "$as_me:$LINENO: checking whether getaddrinfo is declared" >&5
- echo $ECHO_N "checking whether getaddrinfo is declared... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking whether getaddrinfo is declared" >&5
+ echo $ECHO_N "checking whether getaddrinfo is declared... $ECHO_C" >&6; }
  if test "${ac_cv_have_decl_getaddrinfo+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  main ()
  {
  #ifndef getaddrinfo
-   char *p = (char *) getaddrinfo;
+   (void) getaddrinfo;
  #endif
  
    ;
  }
  _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_getaddrinfo=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_have_decl_getaddrinfo=no
      ac_cv_have_decl_getaddrinfo=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_getaddrinfo" >&5
- echo "${ECHO_T}$ac_cv_have_decl_getaddrinfo" >&6
echo "$as_me:$LINENO: result: $ac_cv_have_decl_getaddrinfo" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_getaddrinfo" >&6; }
  if test $ac_cv_have_decl_getaddrinfo = yes; then
  
  cat >>confdefs.h <<_ACEOF
@@@ -9124,8 -12035,8 +12198,8 @@@ _ACEO
  
  
  fi
- echo "$as_me:$LINENO: checking whether freeaddrinfo is declared" >&5
- echo $ECHO_N "checking whether freeaddrinfo is declared... $ECHO_C" >&6
echo "$as_me:$LINENO: checking whether freeaddrinfo is declared" >&5
+ echo $ECHO_N "checking whether freeaddrinfo is declared... $ECHO_C" >&6; }
  if test "${ac_cv_have_decl_freeaddrinfo+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  main ()
  {
  #ifndef freeaddrinfo
-   char *p = (char *) freeaddrinfo;
+   (void) freeaddrinfo;
  #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
+ 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_have_decl_freeaddrinfo=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_have_decl_freeaddrinfo=no
      ac_cv_have_decl_freeaddrinfo=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_freeaddrinfo" >&5
- echo "${ECHO_T}$ac_cv_have_decl_freeaddrinfo" >&6
echo "$as_me:$LINENO: result: $ac_cv_have_decl_freeaddrinfo" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_freeaddrinfo" >&6; }
  if test $ac_cv_have_decl_freeaddrinfo = yes; then
  
  cat >>confdefs.h <<_ACEOF
@@@ -9209,8 -12116,8 +12276,8 @@@ _ACEO
  
  
  fi
- echo "$as_me:$LINENO: checking whether gai_strerror is declared" >&5
- echo $ECHO_N "checking whether gai_strerror is declared... $ECHO_C" >&6
echo "$as_me:$LINENO: checking whether gai_strerror is declared" >&5
+ echo $ECHO_N "checking whether gai_strerror is declared... $ECHO_C" >&6; }
  if test "${ac_cv_have_decl_gai_strerror+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  main ()
  {
  #ifndef gai_strerror
-   char *p = (char *) gai_strerror;
+   (void) gai_strerror;
  #endif
  
    ;
  }
  _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_gai_strerror=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_have_decl_gai_strerror=no
      ac_cv_have_decl_gai_strerror=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_gai_strerror" >&5
- echo "${ECHO_T}$ac_cv_have_decl_gai_strerror" >&6
echo "$as_me:$LINENO: result: $ac_cv_have_decl_gai_strerror" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_gai_strerror" >&6; }
  if test $ac_cv_have_decl_gai_strerror = yes; then
  
  cat >>confdefs.h <<_ACEOF
@@@ -9294,8 -12197,8 +12357,8 @@@ _ACEO
  
  
  fi
- echo "$as_me:$LINENO: checking whether getnameinfo is declared" >&5
- echo $ECHO_N "checking whether getnameinfo is declared... $ECHO_C" >&6
echo "$as_me:$LINENO: checking whether getnameinfo is declared" >&5
+ echo $ECHO_N "checking whether getnameinfo is declared... $ECHO_C" >&6; }
  if test "${ac_cv_have_decl_getnameinfo+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  main ()
  {
  #ifndef getnameinfo
-   char *p = (char *) getnameinfo;
+   (void) getnameinfo;
  #endif
  
    ;
  }
  _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_getnameinfo=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_have_decl_getnameinfo=no
      ac_cv_have_decl_getnameinfo=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_getnameinfo" >&5
- echo "${ECHO_T}$ac_cv_have_decl_getnameinfo" >&6
echo "$as_me:$LINENO: result: $ac_cv_have_decl_getnameinfo" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_getnameinfo" >&6; }
  if test $ac_cv_have_decl_getnameinfo = yes; then
  
  cat >>confdefs.h <<_ACEOF
@@@ -9381,8 -12280,8 +12440,8 @@@ _ACEO
  fi
  
  
-   echo "$as_me:$LINENO: checking for struct addrinfo" >&5
- echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for struct addrinfo" >&5
+ echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; }
  if test "${ac_cv_type_struct_addrinfo+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -9405,50 -12304,47 +12464,47 @@@ cat >>conftest.$ac_ext <<_ACEO
  #endif
  
  
+ typedef struct addrinfo ac__type_new_;
  int
  main ()
  {
- if ((struct addrinfo *) 0)
+ if ((ac__type_new_ *) 0)
    return 0;
- if (sizeof (struct addrinfo))
+ 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_struct_addrinfo=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_struct_addrinfo=no
      ac_cv_type_struct_addrinfo=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_struct_addrinfo" >&5
- echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
+ echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6; }
  if test $ac_cv_type_struct_addrinfo = yes; then
  
  cat >>confdefs.h <<_ACEOF
  
  
  
- for ac_func in inet_ntop
- 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 gettimeofday with POSIX signature" >&5
+ echo $ECHO_N "checking for gettimeofday with POSIX signature... $ECHO_C" >&6; }
+ if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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
+ #include <sys/time.h>
+           struct timeval c;
  
  int
  main ()
  {
- return f != $ac_func;
+           int (*f) (struct timeval *restrict, void *restrict) = gettimeofday;
+           int x = f (&c, 0);
+           return !(x | c.tv_sec | c.tv_usec);
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_func_gettimeofday_posix_signature=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       gl_cv_func_gettimeofday_posix_signature=no
  fi
- rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
rm -f core conftest.err conftest.$ac_objext 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
- else
-   gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
- fi
- done
-   :
+ { echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_posix_signature" >&5
+ echo "${ECHO_T}$gl_cv_func_gettimeofday_posix_signature" >&6; }
  
  
  
  
-   echo "$as_me:$LINENO: checking whether inet_ntop is declared" >&5
- echo $ECHO_N "checking whether inet_ntop is declared... $ECHO_C" >&6
- if test "${ac_cv_have_decl_inet_ntop+set}" = set; then
+  { echo "$as_me:$LINENO: checking whether gettimeofday clobbers localtime buffer" >&5
+ echo $ECHO_N "checking whether gettimeofday clobbers localtime buffer... $ECHO_C" >&6; }
+ if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test "$cross_compiling" = yes; then
+        gl_cv_func_gettimeofday_clobber=yes
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <arpa/inet.h>
+ #include <string.h>
+         #include <sys/time.h>
+         #include <time.h>
+         #include <stdlib.h>
  
  int
  main ()
  {
- #ifndef inet_ntop
-   char *p = (char *) inet_ntop;
- #endif
+         time_t t = 0;
+         struct tm *lt;
+         struct tm saved_lt;
+         struct timeval tv;
+         lt = localtime (&t);
+         saved_lt = *lt;
+         gettimeofday (&tv, NULL);
+         return memcmp (lt, &saved_lt, sizeof (struct tm)) != 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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest.$ac_objext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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_have_decl_inet_ntop=yes
+   gl_cv_func_gettimeofday_clobber=no
  else
-   echo "$as_me: failed program was:" >&5
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_have_decl_inet_ntop=no
+ ( exit $ac_status )
+ gl_cv_func_gettimeofday_clobber=yes
  fi
- rm -f conftest.err 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
 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_inet_ntop" >&5
 +echo "${ECHO_T}$ac_cv_have_decl_inet_ntop" >&6
 +if test $ac_cv_have_decl_inet_ntop = yes; then
 +
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_DECL_INET_NTOP 1
 +_ACEOF
 +
 +
 +else
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_DECL_INET_NTOP 0
 +_ACEOF
  
  
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_clobber" >&5
+ echo "${ECHO_T}$gl_cv_func_gettimeofday_clobber" >&6; }
+  if test $gl_cv_func_gettimeofday_clobber = yes; then
+    REPLACE_GETTIMEOFDAY=1
+    SYS_TIME_H=sys/time.h
+   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
+ for ac_header in sys/timeb.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ 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; }
+ 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 { (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
+   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 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; }
+ 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 { (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 && {
+        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
+ 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;}
+     ;;
+ esac
+ { 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
+ 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
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  fi
  
+ done
  
  
+ for ac_func in _ftime
+ 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 { 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
+ /* 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 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
+ 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
+ #endif
  
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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"
+ fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
  
+ fi
+ done
  
  
  
+ cat >>confdefs.h <<\_ACEOF
+ #define gmtime rpl_gmtime
+ _ACEOF
  
-   :
  
+ cat >>confdefs.h <<\_ACEOF
+ #define localtime rpl_localtime
+ _ACEOF
  
  
  
+ cat >>confdefs.h <<\_ACEOF
+ #define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1
+ _ACEOF
  
-   if test $ac_cv_header_netinet_in_h = yes; then
-     NETINET_IN_H=''
-   else
-     NETINET_IN_H='netinet/in.h'
-   fi
+  fi
  
  
+   if test $gl_cv_func_gettimeofday_posix_signature != yes; then
+     REPLACE_GETTIMEOFDAY=1
+     SYS_TIME_H=sys/time.h
+     if test $gl_cv_func_gettimeofday_clobber != yes; then
+       gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
  
  
- for ac_header in stdint.h
+ for ac_header in sys/timeb.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
@@@ -9702,41 -12794,37 +12967,37 @@@ $ac_includes_defaul
  #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
@@@ -9745,24 -12833,22 +13006,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  /* 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
@@@ -9770,9 -12856,10 +13029,10 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
    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
@@@ -9796,25 -12883,19 +13056,19 @@@ echo "$as_me: WARNING: $ac_header:     
  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 the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _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 "$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
  
  done
  
-     echo "$as_me:$LINENO: checking for SIZE_MAX" >&5
- echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6
-   if test "${gl_cv_size_max+set}" = set; then
+ for ac_func in _ftime
+ 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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-     gl_cv_size_max=
-     cat >conftest.$ac_ext <<_ACEOF
+   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
  
- #include <limits.h>
- #if HAVE_STDINT_H
- #include <stdint.h>
+ /* 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
- #ifdef SIZE_MAX
- Found it
+ #undef $ac_func
+ /* 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
+ 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
  #endif
  
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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"
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "Found it" >/dev/null 2>&1; then
-   gl_cv_size_max=yes
  fi
- rm -f conftest*
+ done
  
-     if test -z "$gl_cv_size_max"; then
-                         if test "$cross_compiling" = yes; then
-   # Depending upon the size, compute the lo and hi bounds.
- cat >conftest.$ac_ext <<_ACEOF
+     fi
+   fi
+ for ac_func in inet_ntop
+ 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 { 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
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <stddef.h>
- #include <limits.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 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
+ 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
+ #endif
  int
  main ()
  {
- static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)];
- test_array [0] = 0
+ return $ac_func ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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"
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
+ else
+   gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+ fi
+ done
+   :
+   { echo "$as_me:$LINENO: checking whether inet_ntop is declared" >&5
+ echo $ECHO_N "checking whether inet_ntop is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl_inet_ntop+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 <stddef.h>
- #include <limits.h>
+ #include <arpa/inet.h>
  int
  main ()
  {
- static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)];
- test_array [0] = 0
+ #ifndef inet_ntop
+   (void) inet_ntop;
+ #endif
  
    ;
    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
-   ac_hi=$ac_mid; break
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_have_decl_inet_ntop=yes
  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`
+       ac_cv_have_decl_inet_ntop=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_have_decl_inet_ntop" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_inet_ntop" >&6; }
+ if test $ac_cv_have_decl_inet_ntop = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_INET_NTOP 1
+ _ACEOF
+ else
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_INET_NTOP 0
+ _ACEOF
  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.  */
- #include <stddef.h>
- #include <limits.h>
- int
- main ()
- {
- static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)];
- test_array [0] = 0
  
-   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.  */
- #include <stddef.h>
- #include <limits.h>
 +  ;
 +  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
- static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)];
- test_array [0] = 0
++  ac_hi=$ac_mid
++else
++  echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
 +int
 +main ()
 +{
  
-   ;
-   return 0;
- }
+   if test $gl_cv_func_malloc_posix = yes; then
+     HAVE_MALLOC_POSIX=1
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_MALLOC_POSIX 1
  _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
+   else
+     gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
+     HAVE_MALLOC_POSIX=0
+   fi
  
- 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`
+   GNULIB_MALLOC_POSIX=1
+ for ac_func in mkdtemp
+ 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 { 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
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <stddef.h>
- #include <limits.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 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
+ 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
+ #endif
  int
  main ()
  {
- static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)];
- test_array [0] = 0
+ return $ac_func ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
  
- ac_lo=`expr '(' $ac_mid ')' + 1`
+       eval "$as_ac_var=no"
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- case $ac_lo in
- ?*) size_t_bits_minus_1=$ac_lo;;
- '') size_t_bits_minus_1= ;;
- esac
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
  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; }; }
+   gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+ fi
+ done
+   if test $ac_cv_func_mkdtemp = no; then
+     HAVE_MKDTEMP=0
+     :
+   fi
+   GNULIB_MKDTEMP=1
+   { echo "$as_me:$LINENO: checking whether <netinet/in.h> is self-contained" >&5
+ echo $ECHO_N "checking whether <netinet/in.h> is self-contained... $ECHO_C" >&6; }
+ if test "${gl_cv_header_netinet_in_h_selfcontained+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+       cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <stddef.h>
- #include <limits.h>
- long longval () { return sizeof (size_t) * CHAR_BIT - 1; }
- unsigned long ulongval () { return sizeof (size_t) * CHAR_BIT - 1; }
- #include <stdio.h>
- #include <stdlib.h>
+ #include <netinet/in.h>
  int
  main ()
  {
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if ((sizeof (size_t) * CHAR_BIT - 1) < 0)
-     {
-       long i = longval ();
-       if (i != (sizeof (size_t) * CHAR_BIT - 1))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != (sizeof (size_t) * CHAR_BIT - 1))
-       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
+ 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
-   size_t_bits_minus_1=`cat conftest.val`
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_header_netinet_in_h_selfcontained=yes
  else
-   echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
+   echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ( exit $ac_status )
- size_t_bits_minus_1=
+       gl_cv_header_netinet_in_h_selfcontained=no
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+ { echo "$as_me:$LINENO: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
+ echo "${ECHO_T}$gl_cv_header_netinet_in_h_selfcontained" >&6; }
+   if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
+     NETINET_IN_H=''
+   else
+     NETINET_IN_H='netinet/in.h'
+ for ac_header in netinet/in.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
- rm -f conftest.val
-       if test "$cross_compiling" = yes; then
-   # Depending upon the size, compute the lo and hi bounds.
+ 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; }
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <stddef.h>
- int
- main ()
- {
- static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)];
- test_array [0] = 0
-   ;
-   return 0;
- }
+ $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
+ 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_lo=0 ac_mid=0
-   while :; do
-     cat >conftest.$ac_ext <<_ACEOF
+   (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
+ fi
+ 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; }
+ cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <stddef.h>
- int
- main ()
- {
- static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)];
- test_array [0] = 0
-   ;
-   return 0;
- }
+ #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_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); } &&
-        { 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
+   (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
  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`
+   ac_header_preproc=no
  fi
-   done
 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++           test "$gl_cv_socklen_t_equiv" != "" && break
++         done
++         test "$gl_cv_socklen_t_equiv" != "" && break
++       done
+ 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;}
+     ;;
+ esac
+ { 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
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  
- cat >conftest.$ac_ext <<_ACEOF
+ 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
+   :
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_netinet_in_h='<'netinet/in.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <netinet/in.h>" >&5
+ echo $ECHO_N "checking absolute name of <netinet/in.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_netinet_in_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         if test $ac_cv_header_netinet_in_h = yes; then
+           cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <stddef.h>
- int
- main ()
- {
- static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)];
- test_array [0] = 0
+ #include <netinet/in.h>
  
-   ;
-   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
+                                   gl_cv_next_netinet_in_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/netinet/in.h#{
+                s#.*"\(.*/netinet/in.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_netinet_in_h='<'netinet/in.h'>'
+         fi
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_netinet_in_h" >&5
+ echo "${ECHO_T}$gl_cv_next_netinet_in_h" >&6; }
+      fi
+      NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
+     if test $ac_cv_header_netinet_in_h = yes; then
+       HAVE_NETINET_IN_H=1
+     else
+       HAVE_NETINET_IN_H=0
+     fi
+   fi
+   { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+ echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+ if test -z "$MKDIR_P"; then
+   if test "${ac_cv_path_mkdir+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+        done
+ done
+ IFS=$as_save_IFS
+ fi
+   if test "${ac_cv_path_mkdir+set}" = set; then
+     MKDIR_P="$ac_cv_path_mkdir -p"
+   else
+     # As a last resort, use the slow shell script.  Don't cache a
+     # value for MKDIR_P within a source directory, because that will
+     # break other packages using the cache if that directory is
+     # removed, or if the value is a relative name.
+     test -d ./--version && rmdir ./--version
+     MKDIR_P="$ac_install_sh -d"
+   fi
+ fi
+ { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+ echo "${ECHO_T}$MKDIR_P" >&6; }
+   gl_LIBOBJS="$gl_LIBOBJS physmem.$ac_objext"
+   # Prerequisites of lib/physmem.c.
+ for ac_header in sys/pstat.h sys/sysmp.h sys/sysinfo.h \
+     machine/hal_sysinfo.h sys/table.h sys/param.h sys/sysctl.h \
+     sys/systemcfg.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 { 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
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <stddef.h>
- int
- main ()
- {
- static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)];
- test_array [0] = 0
+ $ac_includes_default
  
-   ;
-   return 0;
- }
+ #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
-   ac_lo=$ac_mid; break
+   (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
  
- 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`
+       eval "$as_ac_Header=no"
  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=
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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
+ _ACEOF
  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`
+ done
+ for ac_func in pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table
+ 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 { 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
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <stddef.h>
- int
- main ()
- {
- static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $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
- ?*) fits_in_uint=$ac_lo;;
- '') fits_in_uint= ;;
- 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.  */
- #include <stddef.h>
- long longval () { return sizeof (size_t) <= sizeof (unsigned int); }
- unsigned long ulongval () { return sizeof (size_t) <= sizeof (unsigned int); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if ((sizeof (size_t) <= sizeof (unsigned int)) < 0)
-     {
-       long i = longval ();
-       if (i != (sizeof (size_t) <= sizeof (unsigned int)))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != (sizeof (size_t) <= sizeof (unsigned int)))
-       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
-   fits_in_uint=`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 )
- fits_in_uint=
- fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- rm -f conftest.val
-       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
-         if test $fits_in_uint = 1; then
-                               cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <stddef.h>
-             extern size_t foo;
-             extern unsigned long foo;
- 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
-   fits_in_uint=0
- 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
-         fi
-                                 if test $fits_in_uint = 1; then
-           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
-         else
-           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
-         fi
-       else
-                 gl_cv_size_max='((size_t)~(size_t)0)'
-       fi
-     fi
- fi
-   echo "$as_me:$LINENO: result: $gl_cv_size_max" >&5
- echo "${ECHO_T}$gl_cv_size_max" >&6
-   if test "$gl_cv_size_max" != yes; then
- cat >>confdefs.h <<_ACEOF
- #define SIZE_MAX $gl_cv_size_max
- _ACEOF
-   fi
- for ac_func in snprintf
- 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
+ /* 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.
  
  #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
  
- else
-   gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
  fi
  done
  
  
-   :
  
  
+   gl_LIBOBJS="$gl_LIBOBJS safe-read.$ac_objext"
  
  
  
-   :
  
-      echo "$as_me:$LINENO: checking for socklen_t" >&5
- echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
- if test "${ac_cv_type_socklen_t+set}" = set; then
+   gl_LIBOBJS="$gl_LIBOBJS safe-write.$ac_objext"
+ for ac_header in stdint.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   # 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.  */
- #include <sys/types.h>
-       #if HAVE_SYS_SOCKET_H
-       # include <sys/socket.h>
-       #elif HAVE_WS2TCPIP_H
-       # include <ws2tcpip.h>
-       #endif
- int
- main ()
- {
- if ((socklen_t *) 0)
-   return 0;
- if (sizeof (socklen_t))
-   return 0;
-   ;
-   return 0;
- }
+ $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
+ 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_type_socklen_t=yes
+   (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_cv_type_socklen_t=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_header_compiler=no
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
- echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
- if test $ac_cv_type_socklen_t = yes; then
-   :
- else
-   echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
- echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6
-       if test "${gl_cv_gl_cv_socklen_t_equiv+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   # Systems have either "struct sockaddr *" or
-        # "void *" as the second argument to getpeername
-        gl_cv_socklen_t_equiv=
-        for arg2 in "struct sockaddr" void; do
-          for t in int size_t "unsigned int" "long int" "unsigned long int"; do
-            cat >conftest.$ac_ext <<_ACEOF
+ 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; }
+ cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <sys/types.h>
-               #include <sys/socket.h>
-               int getpeername (int, $arg2 *, $t *);
- int
- main ()
- {
- $t len;
-               getpeername (0, 0, &len);
-   ;
-   return 0;
- }
+ #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_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); } &&
-        { 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
-   gl_cv_socklen_t_equiv="$t"
+   (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
  sed 's/^/| /' conftest.$ac_ext >&5
  
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-            test "$gl_cv_socklen_t_equiv" != "" && break
-          done
-          test "$gl_cv_socklen_t_equiv" != "" && break
-        done
+   ac_header_preproc=no
  fi
  
-       if test "$gl_cv_socklen_t_equiv" = ""; then
-       { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5
- echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
-    { (exit 1); exit 1; }; }
-       fi
-       echo "$as_me:$LINENO: result: $gl_cv_socklen_t_equiv" >&5
- echo "${ECHO_T}$gl_cv_socklen_t_equiv" >&6
+ rm -f conftest.err conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6; }
  
- cat >>confdefs.h <<_ACEOF
- #define socklen_t $gl_cv_socklen_t_equiv
- _ACEOF
+ # 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;}
  
+     ;;
+ esac
+ { 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
+ 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
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  
+ fi
  
+ done
  
-   # Define two additional variables used in the Makefile substitution.
-   if test "$ac_cv_header_stdbool_h" = yes; then
-     STDBOOL_H=''
-   else
-     STDBOOL_H='stdbool.h'
-   fi
-   if test "$ac_cv_type__Bool" = yes; then
-     HAVE__BOOL=1
-   else
-     HAVE__BOOL=0
-   fi
- for ac_func in strdup
- 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
+     { echo "$as_me:$LINENO: checking for SIZE_MAX" >&5
+ echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6; }
+   result=
    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;
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
  #endif
- #ifdef __cplusplus
- }
+ #ifdef SIZE_MAX
+ Found it
  #endif
  
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "Found it" >/dev/null 2>&1; then
+   result=yes
+ fi
+ rm -f conftest*
+   if test -z "$result"; then
+                 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.  */
+ #include <stddef.h>
+ #include <limits.h>
  int
  main ()
  {
- return f != $ac_func;
+ static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)];
+ test_array [0] = 0
    ;
    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
+ 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 -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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
+ #include <stddef.h>
+ #include <limits.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)];
+ test_array [0] = 0
+   ;
+   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
-   eval "$as_ac_var=yes"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid; break
  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
+       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
- 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
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
-   gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
- fi
- done
-   :
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
-   if test $ac_cv_have_decl_strdup = no; then
-     HAVE_DECL_STRDUP=0
-   fi
-   :
+       cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <stddef.h>
+ #include <limits.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)];
+ test_array [0] = 0
  
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
+ #include <stddef.h>
+ #include <limits.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)];
+ test_array [0] = 0
  
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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 core 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
  
+ rm -f core 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.  */
+ #include <stddef.h>
+ #include <limits.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)];
+ test_array [0] = 0
  
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) size_t_bits_minus_1=$ac_lo;;
+ '') size_t_bits_minus_1= ;;
+ esac
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <stddef.h>
+ #include <limits.h>
+ static long int longval () { return sizeof (size_t) * CHAR_BIT - 1; }
+ static unsigned long int ulongval () { return sizeof (size_t) * CHAR_BIT - 1; }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+ main ()
+ {
  
-   if test $ac_cv_header_sys_socket_h = yes; then
-     SYS_SOCKET_H=''
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if ((sizeof (size_t) * CHAR_BIT - 1) < 0)
+     {
+       long int i = longval ();
+       if (i != (sizeof (size_t) * CHAR_BIT - 1))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
    else
+     {
+       unsigned long int i = ulongval ();
+       if (i != (sizeof (size_t) * CHAR_BIT - 1))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
  
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+ 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'
+   { (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
+   size_t_bits_minus_1=`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
  
- for ac_header in winsock2.h ws2tcpip.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
+ ( exit $ac_status )
+ size_t_bits_minus_1=
  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
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f conftest.val
+     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
- #include <$ac_header>
+ #include <stddef.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 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
+ 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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
+ #include <stddef.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)];
+ test_array [0] = 0
+   ;
+   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
-   ac_header_compiler=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid; break
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_header_compiler=no
+       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
- 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
+ rm -f core 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.  */
- #include <$ac_header>
+ #include <stddef.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)];
+ test_array [0] = 0
+   ;
+   return 0;
+ }
  _ACEOF
- if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ 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); } >/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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
+ #include <stddef.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)];
+ test_array [0] = 0
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_lo=$ac_mid; break
  else
-   ac_cpp_err=yes
+   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
- if test -z "$ac_cpp_err"; then
-   ac_header_preproc=yes
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
-   ac_header_preproc=no
+       ac_lo= ac_hi=
  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 the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _ASBOX
-     ) |
-       sed "s/^/$as_me: WARNING:     /" >&2
-     ;;
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f core 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.  */
+ #include <stddef.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)];
+ test_array [0] = 0
+   ;
+   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
- 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
+ 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
+   ac_hi=$ac_mid
  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
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+       ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) fits_in_uint=$ac_lo;;
+ '') fits_in_uint= ;;
+ esac
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <stddef.h>
+ static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); }
+ static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+ main ()
+ {
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if ((sizeof (size_t) <= sizeof (unsigned int)) < 0)
+     {
+       long int i = longval ();
+       if (i != (sizeof (size_t) <= sizeof (unsigned int)))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
+   else
+     {
+       unsigned long int i = ulongval ();
+       if (i != (sizeof (size_t) <= sizeof (unsigned int)))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
+   ;
+   return 0;
+ }
  _ACEOF
+ rm -f conftest$ac_exeext
+ 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'
+   { (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
+   fits_in_uint=`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 )
+ fits_in_uint=
  fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f conftest.val
  
- done
+     if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+       if test $fits_in_uint = 1; then
+                         cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <stddef.h>
+           extern size_t foo;
+           extern unsigned long foo;
  
-     SYS_SOCKET_H='sys/socket.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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   fits_in_uint=0
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       fi
+                         if test $fits_in_uint = 1; then
+         result="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+       else
+         result="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+       fi
+     else
+             result='((size_t)~(size_t)0)'
+     fi
    fi
+   { echo "$as_me:$LINENO: result: $result" >&5
+ echo "${ECHO_T}$result" >&6; }
+   if test "$result" != yes; then
  
+ cat >>confdefs.h <<_ACEOF
+ #define SIZE_MAX $result
+ _ACEOF
  
-        MKDIR_P='$(mkdir_p)'
+   fi
  
  
  
  
- for ac_func in vasnprintf
+ for ac_func in snprintf
  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
@@@ -11190,97 -14698,96 +14914,96 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
  
- else
-   gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
  fi
  done
  
-   if test $ac_cv_func_vasnprintf = no; then
-     gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
-     gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
-     gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
+   if test $ac_cv_func_snprintf = no; then
  
+   gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
+   if test $ac_cv_func_snprintf = yes; then
+     REPLACE_SNPRINTF=1
+   fi
+   :
  
+   fi
  
+   :
  
  
  
  
  
+   if test $ac_cv_have_decl_snprintf = no; then
+     HAVE_DECL_SNPRINTF=0
+   fi
  
  
  
+   GNULIB_SNPRINTF=1
  
-   echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
- echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
- if test "${ac_cv_type_ptrdiff_t+set}" = set; then
+      { echo "$as_me:$LINENO: checking for socklen_t" >&5
+ echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_socklen_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
+ #include <sys/types.h>
+       #if HAVE_SYS_SOCKET_H
+       # include <sys/socket.h>
+       #elif HAVE_WS2TCPIP_H
+       # include <ws2tcpip.h>
+       #endif
+ typedef socklen_t ac__type_new_;
  int
  main ()
  {
- if ((ptrdiff_t *) 0)
+ if ((ac__type_new_ *) 0)
    return 0;
- if (sizeof (ptrdiff_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
-   ac_cv_type_ptrdiff_t=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_socklen_t=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_type_ptrdiff_t=no
      ac_cv_type_socklen_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_ptrdiff_t" >&5
- echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
- if test $ac_cv_type_ptrdiff_t = yes; then
+ { echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
+ echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
+ if test $ac_cv_type_socklen_t = yes; then
+   :
+ else
+   { echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
+ echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6; }
+       if test "${gl_cv_socklen_t_equiv+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   # Systems have either "struct sockaddr *" or
+        # "void *" as the second argument to getpeername
+        gl_cv_socklen_t_equiv=
+        for arg2 in "struct sockaddr" void; do
+          for t in int size_t "unsigned int" "long int" "unsigned long int"; do
+            cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+               #include <sys/socket.h>
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_PTRDIFF_T 1
+               int getpeername (int, $arg2 *, $t *);
+ int
+ main ()
+ {
+ $t len;
+               getpeername (0, 0, &len);
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_socklen_t_equiv="$t"
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
  
  fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+            test "$gl_cv_socklen_t_equiv" != "" && break
+          done
+          test "$gl_cv_socklen_t_equiv" != "" && break
+        done
  
+ fi
  
+       if test "$gl_cv_socklen_t_equiv" = ""; then
+       { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5
+ echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
+    { (exit 1); exit 1; }; }
+       fi
+       { echo "$as_me:$LINENO: result: $gl_cv_socklen_t_equiv" >&5
+ echo "${ECHO_T}$gl_cv_socklen_t_equiv" >&6; }
  
+ cat >>confdefs.h <<_ACEOF
+ #define socklen_t $gl_cv_socklen_t_equiv
+ _ACEOF
  
+ fi
  
  
- for ac_func in snprintf wcslen
- 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 ssize_t" >&5
+ echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
+ if test "${gt_cv_ssize_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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
+ #include <sys/types.h>
  int
  main ()
  {
- return f != $ac_func;
+ int x = sizeof (ssize_t *) + sizeof (ssize_t);
+         return !x;
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gt_cv_ssize_t=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       gt_cv_ssize_t=no
  fi
- rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
rm -f core conftest.err conftest.$ac_objext 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
+ { echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5
+ echo "${ECHO_T}$gt_cv_ssize_t" >&6; }
+   if test $gt_cv_ssize_t = no; then
+ cat >>confdefs.h <<\_ACEOF
+ #define ssize_t int
  _ACEOF
  
- fi
- done
  fi
  
  
  
+   # Define two additional variables used in the Makefile substitution.
+   if test "$ac_cv_header_stdbool_h" = yes; then
+     STDBOOL_H=''
+   else
+     STDBOOL_H='stdbool.h'
+   fi
  
+   if test "$ac_cv_type__Bool" = yes; then
+     HAVE__BOOL=1
+   else
+     HAVE__BOOL=0
    fi
  
  
  
-   CFLAG_VISIBILITY=
-   HAVE_VISIBILITY=0
-   if test -n "$GCC"; then
-     echo "$as_me:$LINENO: checking for simple visibility declarations" >&5
- echo $ECHO_N "checking for simple visibility declarations... $ECHO_C" >&6
-     if test "${gl_cv_cc_visibility+set}" = set; then
+   if test $ac_cv_type_long_long_int = yes; then
+     HAVE_LONG_LONG_INT=1
+   else
+     HAVE_LONG_LONG_INT=0
+   fi
+   if test $ac_cv_type_unsigned_long_long_int = yes; then
+     HAVE_UNSIGNED_LONG_LONG_INT=1
+   else
+     HAVE_UNSIGNED_LONG_LONG_INT=0
+   fi
+       if test $ac_cv_header_inttypes_h = yes; then
+     HAVE_INTTYPES_H=1
+   else
+     HAVE_INTTYPES_H=0
+   fi
+       if test $ac_cv_header_sys_types_h = yes; then
+     HAVE_SYS_TYPES_H=1
+   else
+     HAVE_SYS_TYPES_H=0
+   fi
+   :
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_stdint_h='<'stdint.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5
+ echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_stdint_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
-       gl_save_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS -fvisibility=hidden"
-       cat >conftest.$ac_ext <<_ACEOF
+         if test $ac_cv_header_stdint_h = yes; then
+           cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- extern __attribute__((__visibility__("hidden"))) int hiddenvar;
-          extern __attribute__((__visibility__("default"))) int exportedvar;
-          extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
-          extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+ #include <stdint.h>
+ _ACEOF
+                                   gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/stdint.h#{
+                s#.*"\(.*/stdint.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_stdint_h='<'stdint.h'>'
+         fi
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5
+ echo "${ECHO_T}$gl_cv_next_stdint_h" >&6; }
+      fi
+      NEXT_STDINT_H=$gl_cv_next_stdint_h
+   if test $ac_cv_header_stdint_h = yes; then
+     HAVE_STDINT_H=1
+   else
+     HAVE_STDINT_H=0
+   fi
+     if test $ac_cv_header_stdint_h = yes; then
+     { echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5
+ echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6; }
+ if test "${gl_cv_header_working_stdint_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   gl_cv_header_working_stdint_h=no
+        cat >conftest.$ac_ext <<_ACEOF
+          /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+ #include <stdint.h>
+ /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
+ #if !(defined WCHAR_MIN && defined WCHAR_MAX)
+ #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+ #endif
+   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+      included before <wchar.h>.  */
+   #include <stddef.h>
+   #include <signal.h>
+   #if HAVE_WCHAR_H
+   # include <stdio.h>
+   # include <time.h>
+   # include <wchar.h>
+   #endif
+ #ifdef INT8_MAX
+ int8_t a1 = INT8_MAX;
+ int8_t a1min = INT8_MIN;
+ #endif
+ #ifdef INT16_MAX
+ int16_t a2 = INT16_MAX;
+ int16_t a2min = INT16_MIN;
+ #endif
+ #ifdef INT32_MAX
+ int32_t a3 = INT32_MAX;
+ int32_t a3min = INT32_MIN;
+ #endif
+ #ifdef INT64_MAX
+ int64_t a4 = INT64_MAX;
+ int64_t a4min = INT64_MIN;
+ #endif
+ #ifdef UINT8_MAX
+ uint8_t b1 = UINT8_MAX;
+ #else
+ typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+ #endif
+ #ifdef UINT16_MAX
+ uint16_t b2 = UINT16_MAX;
+ #endif
+ #ifdef UINT32_MAX
+ uint32_t b3 = UINT32_MAX;
+ #endif
+ #ifdef UINT64_MAX
+ uint64_t b4 = UINT64_MAX;
+ #endif
+ int_least8_t c1 = INT8_C (0x7f);
+ int_least8_t c1max = INT_LEAST8_MAX;
+ int_least8_t c1min = INT_LEAST8_MIN;
+ int_least16_t c2 = INT16_C (0x7fff);
+ int_least16_t c2max = INT_LEAST16_MAX;
+ int_least16_t c2min = INT_LEAST16_MIN;
+ int_least32_t c3 = INT32_C (0x7fffffff);
+ int_least32_t c3max = INT_LEAST32_MAX;
+ int_least32_t c3min = INT_LEAST32_MIN;
+ int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+ int_least64_t c4max = INT_LEAST64_MAX;
+ int_least64_t c4min = INT_LEAST64_MIN;
+ uint_least8_t d1 = UINT8_C (0xff);
+ uint_least8_t d1max = UINT_LEAST8_MAX;
+ uint_least16_t d2 = UINT16_C (0xffff);
+ uint_least16_t d2max = UINT_LEAST16_MAX;
+ uint_least32_t d3 = UINT32_C (0xffffffff);
+ uint_least32_t d3max = UINT_LEAST32_MAX;
+ uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+ uint_least64_t d4max = UINT_LEAST64_MAX;
+ int_fast8_t e1 = INT_FAST8_MAX;
+ int_fast8_t e1min = INT_FAST8_MIN;
+ int_fast16_t e2 = INT_FAST16_MAX;
+ int_fast16_t e2min = INT_FAST16_MIN;
+ int_fast32_t e3 = INT_FAST32_MAX;
+ int_fast32_t e3min = INT_FAST32_MIN;
+ int_fast64_t e4 = INT_FAST64_MAX;
+ int_fast64_t e4min = INT_FAST64_MIN;
+ uint_fast8_t f1 = UINT_FAST8_MAX;
+ uint_fast16_t f2 = UINT_FAST16_MAX;
+ uint_fast32_t f3 = UINT_FAST32_MAX;
+ uint_fast64_t f4 = UINT_FAST64_MAX;
+ #ifdef INTPTR_MAX
+ intptr_t g = INTPTR_MAX;
+ intptr_t gmin = INTPTR_MIN;
+ #endif
+ #ifdef UINTPTR_MAX
+ uintptr_t h = UINTPTR_MAX;
+ #endif
+ intmax_t i = INTMAX_MAX;
+ uintmax_t j = UINTMAX_MAX;
+ #include <limits.h> /* for CHAR_BIT */
+ #define TYPE_MINIMUM(t) \
+   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+ #define TYPE_MAXIMUM(t) \
+   ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+ struct s {
+   int check_PTRDIFF:
+       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+       ? 1 : -1;
+   /* Detect bug in FreeBSD 6.0 / ia64.  */
+   int check_SIG_ATOMIC:
+       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+       ? 1 : -1;
+   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+   int check_WCHAR:
+       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+       ? 1 : -1;
+   /* Detect bug in mingw.  */
+   int check_WINT:
+       WINT_MIN == TYPE_MINIMUM (wint_t)
+       && WINT_MAX == TYPE_MAXIMUM (wint_t)
+       ? 1 : -1;
+   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
+   int check_UINT8_C:
+         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+   int check_UINT16_C:
+         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
+ #ifdef UINT8_MAX
+   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+ #endif
+ #ifdef UINT16_MAX
+   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+ #endif
+ #ifdef UINT32_MAX
+   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+ #endif
+ #ifdef UINT64_MAX
+   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+ #endif
+   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+ };
  int
  main ()
  {
  }
  _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
-   gl_cv_cc_visibility=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_header_working_stdint_h=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- gl_cv_cc_visibility=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-       CFLAGS="$gl_save_CFLAGS"
  fi
  
-     echo "$as_me:$LINENO: result: $gl_cv_cc_visibility" >&5
- echo "${ECHO_T}$gl_cv_cc_visibility" >&6
-     if test $gl_cv_cc_visibility = yes; then
-       CFLAG_VISIBILITY="-fvisibility=hidden"
-       HAVE_VISIBILITY=1
-     fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5
+ echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6; }
    fi
+   if test "$gl_cv_header_working_stdint_h" = yes; then
+     STDINT_H=
+   else
  
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_VISIBILITY $HAVE_VISIBILITY
- _ACEOF
- for ac_header in stdint.h
+ for ac_header in sys/inttypes.h sys/bitypes.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
@@@ -11567,41 -15323,37 +15539,37 @@@ $ac_includes_defaul
  #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
@@@ -11610,24 -15362,22 +15578,22 @@@ cat >>conftest.$ac_ext <<_ACEO
  /* 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
@@@ -11635,9 -15385,10 +15601,10 @@@ sed 's/^/| /' conftest.$ac_ext >&
  
    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
@@@ -11661,25 -15412,19 +15628,19 @@@ echo "$as_me: WARNING: $ac_header:     
  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 the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _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 "$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
  
  done
  
+     if test $ac_cv_header_sys_inttypes_h = yes; then
+       HAVE_SYS_INTTYPES_H=1
+     else
+       HAVE_SYS_INTTYPES_H=0
+     fi
+     if test $ac_cv_header_sys_bitypes_h = yes; then
+       HAVE_SYS_BITYPES_H=1
+     else
+       HAVE_SYS_BITYPES_H=0
+     fi
  
  
  
+   :
  
  
  
  
  
- # Check whether --enable-largefile or --disable-largefile was given.
- if test "${enable_largefile+set}" = set; then
-   enableval="$enable_largefile"
  
- fi;
- if test "$enable_largefile" != no; then
  
-   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
- echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
- if test "${ac_cv_sys_largefile_CC+set}" = set; then
+   for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
+     { echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
+ echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6; }
+ if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_cv_sys_largefile_CC=no
-      if test "$GCC" != yes; then
-        ac_save_CC=$CC
-        while :; do
-        # IRIX 6.2 and later do not support large files by default,
-        # so use the C compiler's -n32 option if that helps.
-        cat >conftest.$ac_ext <<_ACEOF
+   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.  */
- #include <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+      included before <wchar.h>.  */
+   #include <stddef.h>
+   #include <signal.h>
+   #if HAVE_WCHAR_H
+   # include <stdio.h>
+   # include <time.h>
+   # include <wchar.h>
+   #endif
+ #include <limits.h>
  int
  main ()
  {
+ static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 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
+ 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 -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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
  
- fi
- rm -f conftest.err conftest.$ac_objext
-        CC="$CC -n32"
-        rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+      included before <wchar.h>.  */
+   #include <stddef.h>
+   #include <signal.h>
+   #if HAVE_WCHAR_H
+   # include <stdio.h>
+   # include <time.h>
+   # include <wchar.h>
+   #endif
+ #include <limits.h>
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
+ test_array [0] = 0
+   ;
+   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 -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_sys_largefile_CC=' -n32'; break
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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
-        break
-        done
-        CC=$ac_save_CC
-        rm -f conftest.$ac_ext
-     fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
- echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
-   if test "$ac_cv_sys_largefile_CC" != no; then
-     CC=$CC$ac_cv_sys_largefile_CC
-   fi
  
-   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
- echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
- if test "${ac_cv_sys_file_offset_bits+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
-   while :; do
-   ac_cv_sys_file_offset_bits=no
-   cat >conftest.$ac_ext <<_ACEOF
+   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.  */
- #include <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+      included before <wchar.h>.  */
+   #include <stddef.h>
+   #include <signal.h>
+   #if HAVE_WCHAR_H
+   # include <stdio.h>
+   # include <time.h>
+   # include <wchar.h>
+   #endif
+ #include <limits.h>
  int
  main ()
  {
+ static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 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
+ 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
-   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
-   cat >conftest.$ac_ext <<_ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
- #define _FILE_OFFSET_BITS 64
- #include <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+      included before <wchar.h>.  */
+   #include <stddef.h>
+   #include <signal.h>
+   #if HAVE_WCHAR_H
+   # include <stdio.h>
+   # include <time.h>
+   # include <wchar.h>
+   #endif
+ #include <limits.h>
  int
  main ()
  {
+ static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $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
+ 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_sys_file_offset_bits=64; break
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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
-   break
- done
- fi
- echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
- echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
- if test "$ac_cv_sys_file_offset_bits" != no; then
  
- cat >>confdefs.h <<_ACEOF
- #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
- _ACEOF
+ rm -f core 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*
-   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
- echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
- if test "${ac_cv_sys_large_files+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
  while :; do
-   ac_cv_sys_large_files=no
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f core 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.  */
- #include <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+      included before <wchar.h>.  */
+   #include <stddef.h>
+   #include <signal.h>
+   #if HAVE_WCHAR_H
+   # include <stdio.h>
+   # include <time.h>
+   # include <wchar.h>
+   #endif
+ #include <limits.h>
  int
  main ()
  {
+ static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $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
+ 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
-   break
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) result=$ac_lo;;
+ '') result=unknown ;;
+ esac
+ else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #define _LARGE_FILES 1
- #include <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-     We can't simply define LARGE_OFF_T to be 9223372036854775807,
-     since some C++ compilers masquerading as C compilers
-     incorrectly reject 9223372036854775807.  */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+      included before <wchar.h>.  */
+   #include <stddef.h>
+   #include <signal.h>
+   #if HAVE_WCHAR_H
+   # include <stdio.h>
+   # include <time.h>
+   # include <wchar.h>
+   #endif
+ #include <limits.h>
+ static long int longval () { return sizeof ($gltype) * CHAR_BIT; }
+ static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; }
+ #include <stdio.h>
+ #include <stdlib.h>
  int
  main ()
  {
  
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if ((sizeof ($gltype) * CHAR_BIT) < 0)
+     {
+       long int i = longval ();
+       if (i != (sizeof ($gltype) * CHAR_BIT))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
+   else
+     {
+       unsigned long int i = ulongval ();
+       if (i != (sizeof ($gltype) * CHAR_BIT))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest.$ac_objext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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_sys_large_files=1; break
+   result=`cat conftest.val`
  else
-   echo "$as_me: failed program was:" >&5
+   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 )
+ result=unknown
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   break
- done
- fi
- echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
- echo "${ECHO_T}$ac_cv_sys_large_files" >&6
- if test "$ac_cv_sys_large_files" != no; then
- cat >>confdefs.h <<_ACEOF
- #define _LARGE_FILES $ac_cv_sys_large_files
- _ACEOF
- fi
- rm -f conftest*
- fi
- for ac_prog in grep
- 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_path_GREP+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $GREP in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_GREP="$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
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
- GREP=$ac_cv_path_GREP
+ rm -f conftest.val
+        eval gl_cv_bitsizeof_${gltype}=\$result
  
- if test -n "$GREP"; then
-   echo "$as_me:$LINENO: result: $GREP" >&5
- echo "${ECHO_T}$GREP" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
  fi
+ ac_res=`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
+     eval result=\$gl_cv_bitsizeof_${gltype}
+     if test $result = unknown; then
+                                                 result=0
+     fi
+     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+     cat >>confdefs.h <<_ACEOF
+ #define BITSIZEOF_${GLTYPE} $result
+ _ACEOF
  
-   test -n "$GREP" && break
- done
- if test -z "$GREP"; then
-     GREP=grep
- fi
+     eval BITSIZEOF_${GLTYPE}=\$result
+   done
  
- cat >>confdefs.h <<_ACEOF
- #define GREP "$GREP"
- _ACEOF
  
- for ac_prog in egrep
- 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_path_EGREP+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $EGREP in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_EGREP="$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
- EGREP=$ac_cv_path_EGREP
  
- if test -n "$EGREP"; then
-   echo "$as_me:$LINENO: result: $EGREP" >&5
- echo "${ECHO_T}$EGREP" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
  
-   test -n "$EGREP" && break
- done
  
  
- for ac_prog in lint
- 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_path_AMLINT+set}" = set; then
+   for gltype in sig_atomic_t wchar_t wint_t ; do
+     { echo "$as_me:$LINENO: checking whether $gltype is signed" >&5
+ echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6; }
+ if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $AMLINT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_AMLINT="$AMLINT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- as_dummy="/opt/SUNWspro/bin:$SYSLOCPATH"
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-     ac_cv_path_AMLINT="$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
- AMLINT=$ac_cv_path_AMLINT
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
- if test -n "$AMLINT"; then
-   echo "$as_me:$LINENO: result: $AMLINT" >&5
- echo "${ECHO_T}$AMLINT" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
+   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+      included before <wchar.h>.  */
+   #include <stddef.h>
+   #include <signal.h>
+   #if HAVE_WCHAR_H
+   # include <stdio.h>
+   # include <time.h>
+   # include <wchar.h>
+   #endif
  
-   test -n "$AMLINT" && break
- done
- if test ! -z "$AMLINT"; then
-   $AMLINT -flags | $GREP -- '-errfmt=' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AMLINTFLAGS="-n -s -u -m -x"
-     AMLINTFLAGS="$AMLINTFLAGS -errchk=%all"
-     AMLINTFLAGS="$AMLINTFLAGS -errfmt=macro"
-     AMLINTFLAGS="$AMLINTFLAGS -errhdr=no%/usr/include"
-     AMLINTFLAGS="$AMLINTFLAGS -errhdr=%user"
-     AMLINTFLAGS="$AMLINTFLAGS -errsecurity=extended"
-     AMLINTFLAGS="$AMLINTFLAGS -errtags=yes"
-     AMLINTFLAGS="$AMLINTFLAGS -Ncheck=%all"
-     AMLINTFLAGS="$AMLINTFLAGS -Nlevel=2"
-     AMLINTFLAGS="$AMLINTFLAGS -erroff=E_ASGN_NEVER_USED"
-     AMLINTFLAGS="$AMLINTFLAGS,E_ASGN_RESET"
-     AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_CONST_TO_SMALL_INT"
-     AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_TO_SMALL_INT"
-     AMLINTFLAGS="$AMLINTFLAGS,E_CAST_UINT_TO_SIGNED_INT"
-     AMLINTFLAGS="$AMLINTFLAGS,E_CONSTANT_CONDITION"
-     AMLINTFLAGS="$AMLINTFLAGS,E_ENUM_UNUSE"
-     AMLINTFLAGS="$AMLINTFLAGS,E_EXPR_NULL_EFFECT"
-     AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_ALWAYS_IGNOR"
-     AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_MAYBE_IGNORED"
-     AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK0"
-     AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK1"
-     AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK2"
-     AMLINTFLAGS="$AMLINTFLAGS,E_INCL_MNUSD"
-     AMLINTFLAGS="$AMLINTFLAGS,E_INCL_NUSD"
-     AMLINTFLAGS="$AMLINTFLAGS,E_MCR_NODIFF"
-     AMLINTFLAGS="$AMLINTFLAGS,E_NAME_MULTIPLY_DEF"
-     AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_NULL_PSBL"
-     AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_SUSP"
-     AMLINTFLAGS="$AMLINTFLAGS,E_PTRDIFF_OVERFLOW"
-     AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_NULL_PSBL"
-     AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_SUSP"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_ACCESS_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHDIR_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHMOD_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CREAT_WITHOUT_EXCL"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_PATH"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_FOPEN_MODE"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_GETENV_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_MKDIR_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_PRINTF_VAR_FMT"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_RAND_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SCANF_VAR_FMT"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SELECT_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SHELL_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_STRNCPY_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_UMASK_WARN"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SEC_USE_AFTER_STAT"
-     AMLINTFLAGS="$AMLINTFLAGS,E_SIGN_EXTENSION_PSBL"
-     AMLINTFLAGS="$AMLINTFLAGS,E_TYPEDEF_UNUSE"
-     AMLINTFLAGS="$AMLINTFLAGS,E_UNCAL_F"
-   else
-     AMLINTFLAGS=""
-   fi
- else
-   for ac_prog in splint
- 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_path_AMLINT+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $AMLINT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_AMLINT="$AMLINT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $SYSLOCPATH
- 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_AMLINT="$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
+             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+ 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
- fi
- AMLINT=$ac_cv_path_AMLINT
- if test -n "$AMLINT"; then
-   echo "$as_me:$LINENO: result: $AMLINT" >&5
- echo "${ECHO_T}$AMLINT" >&6
+ 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
+   result=yes
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
-   test -n "$AMLINT" && break
- done
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
-   if test ! -z "$AMLINT"; then
-     AMLINT="splint"
-   fi
-   AMLINTFLAGS='+show-scan +unixlib -weak -globs +usedef +usereleased +impouts -paramimptemp -varuse -warnposix -redef -preproc -fixedformalarray -retval -unrecog -usevarargs -formatcode'
+       result=no
  fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        eval gl_cv_type_${gltype}_signed=\$result
  
- # Check whether --with-includes or --without-includes was given.
- if test "${with_includes+set}" = set; then
-   withval="$with_includes"
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-includes option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-includes option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       esac
-       INCLUDE_DIRS="$withval"
- fi;
- if test "$INCLUDE_DIRS"; then
-       for dir in $INCLUDE_DIRS; do
-           if test -d "$dir"; then
-               AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS -I$dir"
-           else
-               { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
- echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
-           fi
-       done
  fi
+ ac_res=`eval echo '${'gl_cv_type_${gltype}_signed'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
+     eval result=\$gl_cv_type_${gltype}_signed
+     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+     if test "$result" = yes; then
+       cat >>confdefs.h <<_ACEOF
+ #define HAVE_SIGNED_${GLTYPE} 1
+ _ACEOF
  
+       eval HAVE_SIGNED_${GLTYPE}=1
+     else
+       eval HAVE_SIGNED_${GLTYPE}=0
+     fi
+   done
  
- # Check whether --with-libraries or --without-libraries was given.
- if test "${with_libraries+set}" = set; then
-   withval="$with_libraries"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-libraries option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-libraries option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       esac
-       LIBRARY_DIRS="$withval"
+   gl_cv_type_ptrdiff_t_signed=yes
+   gl_cv_type_size_t_signed=no
  
- fi;
  
- if test "$LIBRARY_DIRS"; then
-       for dir in $LIBRARY_DIRS; do
-           if test -d "$dir"; then
-               case "$target" in
-                 *-solaris2*,*-netbsd*)
-                       AMANDA_LDFLAGS="$AMANDA_LDFLAGS -R$dir"
-                       ;;
-               esac
-               AMANDA_LDFLAGS="$AMANDA_LDFLAGS -L$dir"
-           else
-               { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
- echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
-           fi
-       done
- fi
  
  
  
- # Check whether --with-dumperdir or --without-dumperdir was given.
- if test "${with_dumperdir+set}" = set; then
-   withval="$with_dumperdir"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-dumperdir option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-dumperdir option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       esac
-       DUMPER_DIR="$withval"
  
+   for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
+     { echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
+ echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6; }
+ if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
+   eval gl_cv_type_${gltype}_suffix=no
+        eval result=\$gl_cv_type_${gltype}_signed
+        if test "$result" = yes; then
+          glsufu=
+        else
+          glsufu=u
+        fi
+        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+          case $glsuf in
+            '')  gltype1='int';;
+            l) gltype1='long int';;
+            ll)        gltype1='long long int';;
+            i64)       gltype1='__int64';;
+            u) gltype1='unsigned int';;
+            ul)        gltype1='unsigned long int';;
+            ull)       gltype1='unsigned long long int';;
+            ui64)gltype1='unsigned __int64';;
+          esac
+          cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
-         test "x$prefix" = xNONE && prefix=$ac_default_prefix
-         test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
-         DUMPER_DIR=$exec_prefix/dumper
+   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+      included before <wchar.h>.  */
+   #include <stddef.h>
+   #include <signal.h>
+   #if HAVE_WCHAR_H
+   # include <stdio.h>
+   # include <time.h>
+   # include <wchar.h>
+   #endif
  
- fi;
- DUMPER_DIR=`(
-     test "x$prefix" = xNONE && prefix=$ac_default_prefix
-     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
-     eval echo "$DUMPER_DIR"
- )`
+               extern $gltype foo;
+               extern $gltype1 foo;
+ int
+ main ()
+ {
  
- cat >>confdefs.h <<_ACEOF
- #define DUMPER_DIR "$DUMPER_DIR"
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   eval gl_cv_type_${gltype}_suffix=\$glsuf
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
  
+ fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+          eval result=\$gl_cv_type_${gltype}_suffix
+          test "$result" != no && break
+        done
+ fi
+ ac_res=`eval echo '${'gl_cv_type_${gltype}_suffix'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
+     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+     eval result=\$gl_cv_type_${gltype}_suffix
+     test "$result" = no && result=
+     eval ${GLTYPE}_SUFFIX=\$result
+     cat >>confdefs.h <<_ACEOF
+ #define ${GLTYPE}_SUFFIX $result
+ _ACEOF
  
- # Check whether --with-configdir or --without-configdir was given.
- if test "${with_configdir+set}" = set; then
-   withval="$with_configdir"
+   done
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-configdir option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-configdir option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) CONFIG_DIR="$withval"
-         ;;
-       esac
  
- else
-   : ${CONFIG_DIR="$sysconfdir/amanda"}
  
- fi;
- CONFIG_DIR=`(
-     test "x$prefix" = xNONE && prefix=$ac_default_prefix
-     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
-     eval echo "$CONFIG_DIR"
- )`
+     STDINT_H=stdint.h
+   fi
  
- cat >>confdefs.h <<_ACEOF
- #define CONFIG_DIR "$CONFIG_DIR"
- _ACEOF
  
  
  
  
- # Check whether --with-indexdir or --without-indexdir was given.
- if test "${with_indexdir+set}" = set; then
-   withval="$with_indexdir"
-      { { echo "$as_me:$LINENO: error: *** --with-indexdir is deprecated, use indexdir in amanda.conf instead." >&5
- echo "$as_me: error: *** --with-indexdir is deprecated, use indexdir in amanda.conf instead." >&2;}
-    { (exit 1); exit 1; }; }
  
- fi;
  
+   :
  
- # Check whether --with-dbdir or --without-dbdir was given.
- if test "${with_dbdir+set}" = set; then
-   withval="$with_dbdir"
-      { { echo "$as_me:$LINENO: error: *** --with-dbdir is deprecated, use infofile in amanda.conf instead." >&5
- echo "$as_me: error: *** --with-dbdir is deprecated, use infofile in amanda.conf instead." >&2;}
-    { (exit 1); exit 1; }; }
  
- fi;
  
  
- # Check whether --with-logdir or --without-logdir was given.
- if test "${with_logdir+set}" = set; then
-   withval="$with_logdir"
-      { { echo "$as_me:$LINENO: error: *** --with-logdir is deprecated, use logdir in amanda.conf instead." >&5
- echo "$as_me: error: *** --with-logdir is deprecated, use logdir in amanda.conf instead." >&2;}
-    { (exit 1); exit 1; }; }
  
- fi;
  
  
- # Check whether --with-suffixes or --without-suffixes was given.
- if test "${with_suffixes+set}" = set; then
-   withval="$with_suffixes"
-   USE_VERSION_SUFFIXES=$withval
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_stdio_h='<'stdio.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <stdio.h>" >&5
+ echo $ECHO_N "checking absolute name of <stdio.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_stdio_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   : ${USE_VERSION_SUFFIXES=no}
- fi;
- case "$USE_VERSION_SUFFIXES" in
- y | ye | yes)
  
- cat >>confdefs.h <<\_ACEOF
- #define USE_VERSION_SUFFIXES 1
+         if test $ac_cv_header_stdio_h = yes; then
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
  _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <stdio.h>
  
+ _ACEOF
+                                   gl_cv_next_stdio_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/stdio.h#{
+                s#.*"\(.*/stdio.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_stdio_h='<'stdio.h'>'
+         fi
  
-     program_suffix="-$VERSION"
-     # This is from the output of configure.in.
-     if test "x$program_transform_name" = xs,x,x,; then
-       program_transform_name=
-     else
-       # Double any \ or $.  echo might interpret backslashes.
-       cat <<\EOF_SED > conftestsed
- s,\\,\\\\,g; s,\$,$$,g
- EOF_SED
-       program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
-       rm -f conftestsed
-     fi
-     test "x$program_prefix" != xNONE &&
-       program_transform_name="s,^,${program_prefix},; $program_transform_name"
-     # Use a double $ so make ignores it.
-     test "x$program_suffix" != xNONE &&
-       program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-     # sed with no file args requires a program.
-     test "x$program_transform_name" = "" && program_transform_name="xs,x,x,"
-     # Remove empty command
-     cat <<\EOF_SED > conftestsed
- s,\;\;,\;,g; s,\; \$,,g; s,\;$,,g
- EOF_SED
-     program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
-     rm -f conftestsed
-   ;;
- n | no) USE_VERSION_SUFFIXES=no
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-suffixes option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-suffixes option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_stdio_h" >&5
+ echo "${ECHO_T}$gl_cv_next_stdio_h" >&6; }
+      fi
+      NEXT_STDIO_H=$gl_cv_next_stdio_h
  
  
- case "$target" in
-     *-hp-*)
-       CLIENT_SCRIPTS_OPT=amhpfixdevs
-       ;;
-     *-sni-sysv4)
-       CLIENT_SCRIPTS_OPT=amsinixfixdevs
-       ;;
-     *)
-       CLIENT_SCRIPTS_OPT=
-       ;;
- esac
  
  
  
  
- # Check whether --with-client-only or --without-client-only was given.
- if test "${with_client_only+set}" = set; then
-   withval="$with_client_only"
-      { { echo "$as_me:$LINENO: error: *** --with-client-only is deprecated, use --without-server instead." >&5
- echo "$as_me: error: *** --with-client-only is deprecated, use --without-server instead." >&2;}
-    { (exit 1); exit 1; }; }
  
- fi;
  
- # Check whether --with-server-only or --without-server-only was given.
- if test "${with_server_only+set}" = set; then
-   withval="$with_server_only"
-      { { echo "$as_me:$LINENO: error: *** --with-server-only is deprecated, use --without-client instead." >&5
- echo "$as_me: error: *** --with-server-only is deprecated, use --without-client instead." >&2;}
-    { (exit 1); exit 1; }; }
  
- fi;
+   :
  
  
- # Check whether --with-client or --without-client was given.
- if test "${with_client+set}" = set; then
-   withval="$with_client"
  
-       case "$withval" in
-       y | ye | yes) NO_CLIENT_MODE=false;;
-       n | no) NO_CLIENT_MODE=true;;
-       *)
-           { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-client option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-client option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       esac
  
  
- fi;
  
  
- # Check whether --with-server or --without-server was given.
- if test "${with_server+set}" = set; then
-   withval="$with_server"
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_stdlib_h='<'stdlib.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <stdlib.h>" >&5
+ echo $ECHO_N "checking absolute name of <stdlib.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_stdlib_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
  
-       case "$withval" in
-       y | ye | yes) NO_SERVER_MODE=false ;;
-       n | no) NO_SERVER_MODE=true;NO_RESTORE_MODE=true;;
-       *)
-           { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-server option.  Maybe you meant --with-index-server=$withval" >&5
- echo "$as_me: error: *** You must not supply an argument to --with-server option.  Maybe you meant --with-index-server=$withval" >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       esac
+         if test $ac_cv_header_stdlib_h = yes; then
+           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
+                                   gl_cv_next_stdlib_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/stdlib.h#{
+                s#.*"\(.*/stdlib.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_stdlib_h='<'stdlib.h'>'
+         fi
  
- fi;
- if test "x${NO_SERVER_MODE+set}" != xset ; then
-    NO_SERVER_MODE=false
  fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_stdlib_h" >&5
+ echo "${ECHO_T}$gl_cv_next_stdlib_h" >&6; }
+      fi
+      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
  
  
- # Check whether --with-restore or --without-restore was given.
- if test "${with_restore+set}" = set; then
-   withval="$with_restore"
  
-       case "$withval" in
-       y | ye | yes) NO_RESTORE_MODE=false;;
-       n | no) NO_RESTORE_MODE=true;;
-       *)
-           { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-restore option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-restore option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       esac
  
  
- fi;
- if test "x${NO_RESTORE_MODE+set}" != xset ; then
-    NO_RESTORE_MODE=${NO_SERVER_MODE-false}
- fi
  
- if ${NO_SERVER_MODE-false}; then
-    if ${NO_RESTORE_MODE-false}; then
-                         true
-    else
-       { { echo "$as_me:$LINENO: error: *** --without-server requires --without-restore" >&5
- echo "$as_me: error: *** --without-server requires --without-restore" >&2;}
-    { (exit 1); exit 1; }; }
-    fi
- fi
  
+ for ac_func in strdup
+ 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 { 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
+ /* 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
  
- # Check whether --with-amrecover or --without-amrecover was given.
- if test "${with_amrecover+set}" = set; then
-   withval="$with_amrecover"
-       case "$withval" in
-       y | ye | yes)
-           if ${NO_CLIENT_MODE-false}; then
-               { { echo "$as_me:$LINENO: error: *** --without-client and --with-amrecover are incompatible" >&5
- echo "$as_me: error: *** --without-client and --with-amrecover are incompatible" >&2;}
-    { (exit 1); exit 1; }; }
-           fi
-           NO_RECOVER_MODE=false;;
-       n | no) NO_RECOVER_MODE=true;;
-       *)
-           { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-amrecover option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-amrecover option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       esac
- fi;
+ /* 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
  
- # Check whether --with-index-server or --without-index-server was given.
- if test "${with_index_server+set}" = set; then
-   withval="$with_index_server"
+ #undef $ac_func
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-index-server option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-index-server option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) DEFAULT_SERVER="$withval"
-         ;;
-       esac
+ /* 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
+ 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
+ #endif
  
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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
-   : ${DEFAULT_SERVER=`uname -n`}
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- fi;
+       eval "$as_ac_var=no"
+ fi
  
- cat >>confdefs.h <<_ACEOF
- #define DEFAULT_SERVER "$DEFAULT_SERVER"
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
  
- # Check whether --with-force-uid or --without-force-uid was given.
- if test "${with_force_uid+set}" = set; then
-   withval="$with_force_uid"
-   FORCE_USERID="$withval"
  else
-   : ${FORCE_USERID=yes}
- fi;
- case "$FORCE_USERID" in
- y | ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define FORCE_USERID 1
- _ACEOF
+   gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+ fi
+ done
  
-   ;;
- n | no) :
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-force-uid option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-force-uid option." >&2;}
-    { (exit 1); exit 1; }; }
- esac
  
+   :
  
- # Check whether --with-user or --without-user was given.
- if test "${with_user+set}" = set; then
-   withval="$with_user"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-user option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-user option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) CLIENT_LOGIN="$withval"
-         ;;
-       esac
  
  
- fi;
- if test "x${CLIENT_LOGIN+set}" != xset; then
-     { { echo "$as_me:$LINENO: error: *** --with-user=USER is missing" >&5
- echo "$as_me: error: *** --with-user=USER is missing" >&2;}
-    { (exit 1); exit 1; }; }
- fi
  
- cat >>confdefs.h <<_ACEOF
- #define CLIENT_LOGIN "$CLIENT_LOGIN"
- _ACEOF
+   if test $ac_cv_have_decl_strdup = no; then
+     HAVE_DECL_STRDUP=0
+   fi
+   :
  
  
  
+   GNULIB_STRDUP=1
  
- # Check whether --with-group or --without-group was given.
- if test "${with_group+set}" = set; then
-   withval="$with_group"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-group option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-group option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) SETUID_GROUP="$withval"
-         ;;
-       esac
  
  
- fi;
- if test "x${SETUID_GROUP+set}" != xset; then
-     { { echo "$as_me:$LINENO: error: *** --with-group=GROUP is missing" >&5
- echo "$as_me: error: *** --with-group=GROUP is missing" >&2;}
-    { (exit 1); exit 1; }; }
- fi
  
+   { echo "$as_me:$LINENO: checking whether <sys/socket.h> is self-contained" >&5
+ echo $ECHO_N "checking whether <sys/socket.h> is self-contained... $ECHO_C" >&6; }
+ if test "${gl_cv_header_sys_socket_h_selfcontained+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 <sys/socket.h>
+ int
+ main ()
+ {
  
- # Check whether --with-owner or --without-owner was given.
- if test "${with_owner+set}" = set; then
-   withval="$with_owner"
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_header_sys_socket_h_selfcontained=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
-         case "$withval" in
-         "" | y | ye | yes | n | no)
-             { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-owner option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-owner option." >&2;}
-    { (exit 1); exit 1; }; }
-           ;;
-         *) BINARY_OWNER="$withval"
-           ;;
-         esac
+       gl_cv_header_sys_socket_h_selfcontained=no
+ fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
- fi;
- if test "x${BINARY_OWNER+set}" != xset ; then
-    BINARY_OWNER=$CLIENT_LOGIN
  fi
- cat >>confdefs.h <<_ACEOF
- #define BINARY_OWNER "$BINARY_OWNER"
- _ACEOF
+ { echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
+ echo "${ECHO_T}$gl_cv_header_sys_socket_h_selfcontained" >&6; }
+   if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
+     SYS_SOCKET_H=''
+   else
+     SYS_SOCKET_H='sys/socket.h'
  
  
  
  
- # Check whether --with-rundump or --without-rundump was given.
- if test "${with_rundump+set}" = set; then
-   withval="$with_rundump"
+   :
  
-     case "$withval" in
-       n | no | y | ye | yes) FORCE_USE_RUNDUMP="$withval";;
-       *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-rundump option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-rundump option." >&2;}
-    { (exit 1); exit 1; }; };;
-     esac
  
  
- fi;
  
  
- # Check whether --with-config or --without-config was given.
- if test "${with_config+set}" = set; then
-   withval="$with_config"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-config option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-config option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) DEFAULT_CONFIG="$withval"
-         ;;
-       esac
  
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_sys_socket_h='<'sys/socket.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <sys/socket.h>" >&5
+ echo $ECHO_N "checking absolute name of <sys/socket.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_sys_socket_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   : ${DEFAULT_CONFIG=DailySet1}
  
- fi;
+         if test $ac_cv_header_sys_socket_h = yes; then
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/socket.h>
  
- cat >>confdefs.h <<_ACEOF
- #define DEFAULT_CONFIG "$DEFAULT_CONFIG"
  _ACEOF
+                                   gl_cv_next_sys_socket_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/sys/socket.h#{
+                s#.*"\(.*/sys/socket.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_sys_socket_h='<'sys/socket.h'>'
+         fi
  
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_sys_socket_h" >&5
+ echo "${ECHO_T}$gl_cv_next_sys_socket_h" >&6; }
+      fi
+      NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
  
  
  
- # Check whether --with-tape-server or --without-tape-server was given.
- if test "${with_tape_server+set}" = set; then
-   withval="$with_tape_server"
+     if test $ac_cv_header_sys_socket_h = yes; then
+       HAVE_SYS_SOCKET_H=1
+       HAVE_WINSOCK2_H=0
+       HAVE_WS2TCPIP_H=0
+     else
+       HAVE_SYS_SOCKET_H=0
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-tape-server option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-tape-server option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) DEFAULT_TAPE_SERVER="$withval"
-         ;;
-       esac
  
+ for ac_header in winsock2.h ws2tcpip.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   : ${DEFAULT_TAPE_SERVER=$DEFAULT_SERVER}
- fi;
- cat >>confdefs.h <<_ACEOF
- #define DEFAULT_TAPE_SERVER "$DEFAULT_TAPE_SERVER"
+   # 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 { (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
+   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 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; }
+ 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 { (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 && {
+        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
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # Check whether --with-tape-device or --without-tape-device was given.
- if test "${with_tape_device+set}" = set; then
-   withval="$with_tape_device"
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-tape-device option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-tape-device option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) DEFAULT_TAPE_DEVICE="$withval"
-         ;;
-       esac
+   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; }
  
- fi;
+ # 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;}
  
- if test ! -z "$DEFAULT_TAPE_DEVICE"; then
+     ;;
+ esac
+ { 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  
- cat >>confdefs.h <<_ACEOF
- #define DEFAULT_TAPE_DEVICE "$DEFAULT_TAPE_DEVICE"
+ fi
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
-     EXAMPLE_TAPEDEV=$DEFAULT_TAPE_DEVICE
- else
-     EXAMPLE_TAPEDEV="/dev/null"
  fi
  
+ done
  
+       if test $ac_cv_header_winsock2_h = yes; then
+         HAVE_WINSOCK2_H=1
+       else
+         HAVE_WINSOCK2_H=0
+       fi
+       if test $ac_cv_header_ws2tcpip_h = yes; then
+         HAVE_WS2TCPIP_H=1
+       else
+         HAVE_WS2TCPIP_H=0
+       fi
+     fi
  
- # Check whether --with-ftape-raw-device or --without-ftape-raw-device was given.
- if test "${with_ftape_raw_device+set}" = set; then
-   withval="$with_ftape_raw_device"
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-ftape-rawdevice option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-ftape-rawdevice option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) DEFAULT_RAW_TAPE_DEVICE="$withval"
-         ;;
-       esac
  
- else
  
-       if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
-           echo "$as_me:$LINENO: checking for raw ftape device" >&5
- echo $ECHO_N "checking for raw ftape device... $ECHO_C" >&6
-                   raw_tape_dev=/dev/null
-                               for num in 3 2 1 0 ; do
-                   td=/dev/rawft${num}
-                   if test -r $td; then
-                       raw_tape_dev=$td
-                   fi
-               done
-           DEFAULT_RAW_TAPE_DEVICE=$raw_tape_dev
-           echo "$as_me:$LINENO: result: $DEFAULT_RAW_TAPE_DEVICE" >&5
- echo "${ECHO_T}$DEFAULT_RAW_TAPE_DEVICE" >&6
-       fi
+   fi
  
  
- fi;
+   { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+ echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+ if test -z "$MKDIR_P"; then
+   if test "${ac_cv_path_mkdir+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+        done
+ done
+ IFS=$as_save_IFS
  
- if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
-     DEFAULT_RAW_TAPE_DEVICE=/dev/null
  fi
  
- cat >>confdefs.h <<_ACEOF
- #define DEFAULT_RAW_TAPE_DEVICE "$DEFAULT_RAW_TAPE_DEVICE"
- _ACEOF
+   if test "${ac_cv_path_mkdir+set}" = set; then
+     MKDIR_P="$ac_cv_path_mkdir -p"
+   else
+     # As a last resort, use the slow shell script.  Don't cache a
+     # value for MKDIR_P within a source directory, because that will
+     # break other packages using the cache if that directory is
+     # removed, or if the value is a relative name.
+     test -d ./--version && rmdir ./--version
+     MKDIR_P="$ac_install_sh -d"
+   fi
+ fi
+ { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+ echo "${ECHO_T}$MKDIR_P" >&6; }
  
  
- # Check whether --with-rew-tape or --without-rew-tape was given.
- if test "${with_rew_tape+set}" = set; then
-   withval="$with_rew_tape"
-      { { echo "$as_me:$LINENO: error: *** --with-rew-tape is deprecated, use --with-tape-device instead." >&5
- echo "$as_me: error: *** --with-rew-tape is deprecated, use --with-tape-device instead." >&2;}
-    { (exit 1); exit 1; }; }
  
- fi;
+   :
  
  
- # Check whether --with-norew-tape or --without-norew-tape was given.
- if test "${with_norew_tape+set}" = set; then
-   withval="$with_norew_tape"
-      { { echo "$as_me:$LINENO: error: *** --with-norew-tape is deprecated, use --with-tape-device instead." >&5
- echo "$as_me: error: *** --with-norew-tape is deprecated, use --with-tape-device instead." >&2;}
-    { (exit 1); exit 1; }; }
  
- fi;
  
  
- # Check whether --with-changer-device or --without-changer-device was given.
- if test "${with_changer_device+set}" = set; then
-   withval="$with_changer_device"
+   if test $ac_cv_func_lstat = yes; then
+     HAVE_LSTAT=1
+   else
+     HAVE_LSTAT=0
+   fi
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-changer-device option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-changer-device option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) DEFAULT_CHANGER_DEVICE="$withval"
-         ;;
-       esac
  
+       { echo "$as_me:$LINENO: checking whether mkdir is declared" >&5
+ echo $ECHO_N "checking whether mkdir is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl_mkdir+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 <sys/stat.h>
  
-       if test -z "$DEFAULT_CHANGER_DEVICE" &&
-          test -f /dev/ch0; then
-           DEFAULT_CHANGER_DEVICE=/dev/ch0
-       fi
+ int
+ main ()
+ {
+ #ifndef mkdir
+   (void) mkdir;
+ #endif
  
- fi;
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_have_decl_mkdir=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test -z "$DEFAULT_CHANGER_DEVICE"; then
-     DEFAULT_CHANGER_DEVICE=/dev/null
+       ac_cv_have_decl_mkdir=no
  fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_have_decl_mkdir" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_mkdir" >&6; }
+ if test $ac_cv_have_decl_mkdir = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define DEFAULT_CHANGER_DEVICE "$DEFAULT_CHANGER_DEVICE"
+ #define HAVE_DECL_MKDIR 1
  _ACEOF
  
  
+ else
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_MKDIR 0
+ _ACEOF
  
  
- # Check whether --with-fqdn or --without-fqdn was given.
- if test "${with_fqdn+set}" = set; then
-   withval="$with_fqdn"
-   USE_FQDN=$withval
+ for ac_header in io.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   : ${USE_FQDN=no}
- fi;
- case "$USE_FQDN" in
- n | no) : ;;
- y |  ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define USE_FQDN 1
+   # 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
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-fqdn option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-fqdn option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
+ 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 { (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
+   ac_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+       ac_header_compiler=no
+ fi
  
- # Check whether --with-broken-fsf or --without-broken-fsf was given.
- if test "${with_broken_fsf+set}" = set; then
-   withval="$with_broken_fsf"
-   HAVE_BROKEN_FSF=$withval
- else
-   : ${HAVE_BROKEN_FSF=no}
+ 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; }
  
- fi;
- case "$HAVE_BROKEN_FSF" in
- n | no) : ;;
- y |  ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_BROKEN_FSF 1
+ # 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
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-broken-fsf option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-broken-fsf option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$ac_header>
+ _ACEOF
+ 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 && {
+        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
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+   ac_header_preproc=no
+ fi
  
- # Check whether --with-reuseports or --without-reuseports was given.
- if test "${with_reuseports+set}" = set; then
-   withval="$with_reuseports"
-    case "$withval" in
-         y | ye | yes)
-           REUSEADDR=no;;
-         n | no)
-           REUSEADDR=yes;;
-         *)
-           REUSEADDR=no;;
-       esac
+ rm -f conftest.err conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6; }
  
- else
-    REUSEADDR=yes;
- fi;
- case "$REUSEADDR" in
- n | no) :
+ # 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
      ;;
- y |  ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define USE_REUSEADDR 1
- _ACEOF
+   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;}
  
-     ;;
- *)
-     { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-reuseports option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-reuseports option." >&2;}
-    { (exit 1); exit 1; }; }
      ;;
  esac
+ { 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
+ 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
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  
- # Check whether --with-gnutar or --without-gnutar was given.
- if test "${with_gnutar+set}" = set; then
-   withval="$with_gnutar"
+ fi
  
-       case "$withval" in
-           /*) GNUTAR="$withval";;
-           y|ye|yes) :;;
-           n|no) GNUTAR=;;
-           *)  { { echo "$as_me:$LINENO: error: *** You must supply a full pathname to --with-gnutar" >&5
- echo "$as_me: error: *** You must supply a full pathname to --with-gnutar" >&2;}
-    { (exit 1); exit 1; }; };;
-       esac
+ done
  
+ fi
  
- fi;
  
+   if test $ac_cv_have_decl_mkdir = yes; then
+     HAVE_DECL_MKDIR=1
+   else
+     HAVE_DECL_MKDIR=0
+   fi
  
- # Check whether --with-smbclient or --without-smbclient was given.
- if test "${with_smbclient+set}" = set; then
-   withval="$with_smbclient"
+   if test "$ac_cv_header_io_h" = yes; then
+     HAVE_IO_H=1
+   else
+     HAVE_IO_H=0
+   fi
  
-       case "$withval" in
-           /*) SAMBA_CLIENT="$withval";;
-           y|ye|yes) :;;
-           n|no) SAMBA_CLIENT=;;
-           *)  { { echo "$as_me:$LINENO: error: *** You must supply a full pathname to --with-smbclient" >&5
- echo "$as_me: error: *** You must supply a full pathname to --with-smbclient" >&2;}
-    { (exit 1); exit 1; }; };;
-       esac
  
  
- fi;
  
  
- # Check whether --with-samba-user or --without-samba-user was given.
- if test "${with_samba_user+set}" = set; then
-   withval="$with_samba_user"
-       { { echo "$as_me:$LINENO: error: *** The samba-user option was deprecated, the username go in the amandapass" >&5
- echo "$as_me: error: *** The samba-user option was deprecated, the username go in the amandapass" >&2;}
-    { (exit 1); exit 1; }; }
  
  
- fi;
  
+   :
  
- # Check whether --with-gnutar-listdir or --without-gnutar-listdir was given.
- if test "${with_gnutar_listdir+set}" = set; then
-   withval="$with_gnutar_listdir"
  
-       case "$withval" in
-           n | no)             unset GNUTAR_LISTDIR ;;
-           y | ye | yes)       : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists} ;;
-           /*)                 GNUTAR_LISTDIR="$withval" ;;
-           *)                  { { echo "$as_me:$LINENO: error: *** You must supply a full pathname to --with-gnutar-listdir" >&5
- echo "$as_me: error: *** You must supply a full pathname to --with-gnutar-listdir" >&2;}
-    { (exit 1); exit 1; }; }
-       esac
  
- else
-   : ${GNUTAR_LISTDIR="$localstatedir/amanda/gnutar-lists"}
  
- fi;
- if test "$GNUTAR_LISTDIR"; then
-     GNUTAR_LISTDIR=`(
-         test "x$prefix" = xNONE && prefix=$ac_default_prefix
-         eval echo "$GNUTAR_LISTDIR"
-     )`
  
- cat >>confdefs.h <<_ACEOF
- #define GNUTAR_LISTED_INCREMENTAL_DIR "$GNUTAR_LISTDIR"
- _ACEOF
-     GNUTAR_LISTED_INCREMENTAL_DIRX=$GNUTAR_LISTDIR
- else
-     GNUTAR_LISTED_INCREMENTAL_DIRX=
- fi
- # Check whether --with-gnutar-listed-incremental or --without-gnutar-listed-incremental was given.
- if test "${with_gnutar_listed_incremental+set}" = set; then
-   withval="$with_gnutar_listed_incremental"
-       { { echo "$as_me:$LINENO: error: *** The gnutar-listed-incremental option was deprecated, use gnutar-listdir instead" >&5
- echo "$as_me: error: *** The gnutar-listed-incremental option was deprecated, use gnutar-listdir instead" >&2;}
-    { (exit 1); exit 1; }; }
- fi;
- GNUTAR_LISTED_INCREMENTAL_DIR=$GNUTAR_LISTDIR
- # Check whether --with-bsd-security or --without-bsd-security was given.
- if test "${with_bsd_security+set}" = set; then
-   withval="$with_bsd_security"
-   BSD_SECURITY=$withval
- else
-   : ${BSD_SECURITY=yes}
- fi;
- case "$BSD_SECURITY" in
- n | no) : ;;
- y |  ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define BSD_SECURITY 1
- _ACEOF
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-bsd-security option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-bsd-security option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
- # Check whether --with-amandahosts or --without-amandahosts was given.
- if test "${with_amandahosts+set}" = set; then
-   withval="$with_amandahosts"
-   USE_AMANDAHOSTS=$withval
- else
-   : ${USE_AMANDAHOSTS=yes}
- fi;
- case "$USE_AMANDAHOSTS" in
- n | no) : ;;
- y |  ye | yes) :
-   case "$BSD_SECURITY" in
-   y | ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define USE_AMANDAHOSTS 1
- _ACEOF
-     ;;
-   esac
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-amandahosts option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-amandahosts option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
- # Check whether --with-dbmalloc or --without-dbmalloc was given.
- if test "${with_dbmalloc+set}" = set; then
-   withval="$with_dbmalloc"
-   DBMALLOC="$withval"
- else
-   : ${DBMALLOC=no}
- fi;
  
- case "$DBMALLOC" in
- n | no)
-     DBMALLOCCFLAGS=""
-     DBMALLOCLIBS=""
-     ;;
- *)
  
- echo "$as_me:$LINENO: checking for malloc in -ldbmalloc" >&5
- echo $ECHO_N "checking for malloc in -ldbmalloc... $ECHO_C" >&6
- if test "${ac_cv_lib_dbmalloc_malloc+set}" = set; then
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <sys/stat.h>" >&5
+ echo $ECHO_N "checking absolute name of <sys/stat.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_sys_stat_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldbmalloc  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+         if test $ac_cv_header_sys_stat_h = yes; then
          cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
+ #include <sys/stat.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 malloc ();
- int
- main ()
- {
- malloc ();
-   ;
-   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_dbmalloc_malloc=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_dbmalloc_malloc=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_dbmalloc_malloc" >&5
- echo "${ECHO_T}$ac_cv_lib_dbmalloc_malloc" >&6
- if test $ac_cv_lib_dbmalloc_malloc = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBDBMALLOC 1
  _ACEOF
-   LIBS="-ldbmalloc $LIBS"
+                                   gl_cv_next_sys_stat_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/sys/stat.h#{
+                s#.*"\(.*/sys/stat.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+         fi
  
  fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_sys_stat_h" >&5
+ echo "${ECHO_T}$gl_cv_next_sys_stat_h" >&6; }
+      fi
+      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
  
-     if test "x$ac_cv_lib_dbmalloc_malloc" != "xyes"; then
-       { echo "$as_me:$LINENO: WARNING: *** dbmalloc library not found - no malloc debugging support!" >&5
- echo "$as_me: WARNING: *** dbmalloc library not found - no malloc debugging support!" >&2;}
-       DBMALLOCCFLAGS=""
-       DBMALLOCLIBS=""
-     else
-       DBMALLOCCFLAGS="-I$DBMALLOC -DUSE_DBMALLOC"
-       DBMALLOCLIBS="-L$DBMALLOC -ldbmalloc"
-     fi
-     ;;
- esac
- # Check whether --with-ipv6 or --without-ipv6 was given.
- if test "${with_ipv6+set}" = set; then
-   withval="$with_ipv6"
-       case "$withval" in
-       y | ye | yes) amanda_ipv6=true;;
-       n | no) amanda_ipv6=false;;
-       *)
-           { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-ipv6 option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-ipv6 option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       esac
- fi;
  
  
- : ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
+   SYS_STAT_H='sys/stat.h'
  
  
- # Check whether --with-krb4-security or --without-krb4-security was given.
- if test "${with_krb4_security+set}" = set; then
-   withval="$with_krb4_security"
-   KRB4_SECURITY="$withval"
+   { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+ echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+ if test -z "$MKDIR_P"; then
+   if test "${ac_cv_path_mkdir+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   : ${KRB4_SECURITY=no}
- fi;
- case "$KRB4_SECURITY" in
- n | no) KRB4_SECURITY=no ;;
- y | ye | yes) : ;;
- *) KRB4_SPOTS="$KRB4_SECURITY"
-    KRB4_SECURITY=yes
-    ;;
- esac
- echo "$as_me:$LINENO: checking for Kerberos and Amanda kerberos4 bits" >&5
- echo $ECHO_N "checking for Kerberos and Amanda kerberos4 bits... $ECHO_C" >&6
- if test "x${KRB4_SECURITY}" = xyes -a -f  ${srcdir-.}/common-src/krb4-security.c ; then
-     for dir in $KRB4_SPOTS; do
-       if test -f ${dir}/lib/libkrb.a -a -f ${dir}/lib/libdes.a ; then
-           #
-           # This is the original Kerberos 4.
-           #
-           echo "$as_me:$LINENO: result: found in $dir" >&5
- echo "${ECHO_T}found in $dir" >&6
-           KRB4_SECURITY=yes
- cat >>confdefs.h <<\_ACEOF
- #define KRB4_SECURITY 1
- _ACEOF
-           if test -d $dir/include/kerberosIV ; then
-               #
-               # This handles BSD/OS.
-               #
-               KRB4INCLUDES=-I$dir/include/kerberosIV
-           else
-               KRB4INCLUDES=-I$dir/include
-           fi
-           KRB4LDFLAGS=-L$dir/lib
-           KRB4LIBS="-lkrb -ldes"
-           if test -f ${dir}/lib/libcom_err.a; then
-               KRB4LIBS="$KRB4LIBS -lcom_err"
-           fi
-           break
-       elif test -f ${dir}/lib/libkrb4.a &&
-            test -f ${dir}/lib/libcrypto.a &&
-            test -f ${dir}/lib/libdes425.a ; then
-           #
-           # This is Kerberos 5 with Kerberos 4 back-support.
-           #
-           echo "$as_me:$LINENO: result: found in $dir" >&5
- echo "${ECHO_T}found in $dir" >&6
-           KRB4_SECURITY=yes
- cat >>confdefs.h <<\_ACEOF
- #define KRB4_SECURITY 1
- _ACEOF
-           KRB4INCLUDES="-I$dir/include -I$dir/include/kerberosIV"
-           KRB4LDFLAGS=-L$dir/lib
-           if test -f ${dir}/lib/libkrb5.a &&
-                test -f ${dir}/lib/libcom_err.a; then
-               KRB4LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err"
-           else
-               KRB4LIBS="-lkrb4 -lcrypto -ldes425"
-           fi
-           break
-       fi
-     done
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+        done
+ done
+ IFS=$as_save_IFS
  
-     if test "x$KRB4LDFLAGS" = "x" ; then
-       echo "$as_me:$LINENO: result: no libraries found" >&5
- echo "${ECHO_T}no libraries found" >&6
-     fi
- else
-     echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
  fi
  
+   if test "${ac_cv_path_mkdir+set}" = set; then
+     MKDIR_P="$ac_cv_path_mkdir -p"
+   else
+     # As a last resort, use the slow shell script.  Don't cache a
+     # value for MKDIR_P within a source directory, because that will
+     # break other packages using the cache if that directory is
+     # removed, or if the value is a relative name.
+     test -d ./--version && rmdir ./--version
+     MKDIR_P="$ac_install_sh -d"
+   fi
+ fi
+ { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+ echo "${ECHO_T}$MKDIR_P" >&6; }
  
- # Check whether --with-rsh-security or --without-rsh-security was given.
- if test "${with_rsh_security+set}" = set; then
-   withval="$with_rsh_security"
-   RSH_SECURITY=$withval
- else
-   : ${RSH_SECURITY=yes}
- fi;
- case "$RSH_SECURITY" in
- n | no) : ;;
- y |  ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define RSH_SECURITY 1
- _ACEOF
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument the to --with-rsh-security option." >&5
- echo "$as_me: error: *** You must not supply an argument the to --with-rsh-security option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
- # Check whether --with-ssh-security or --without-ssh-security was given.
- if test "${with_ssh_security+set}" = set; then
-   withval="$with_ssh_security"
-   SSH_SECURITY=$withval
- else
-   : ${SSH_SECURITY=no}
  
- fi;
- case "$SSH_SECURITY" in
- n | no) : ;;
- y |  ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define SSH_SECURITY 1
- _ACEOF
  
-              SSH_SECURITY_SET=true
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-ssh-security." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-ssh-security." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
  
- # find SSH and check for SSH options if we're using SSH security
- if test x"$SSH_SECURITY" = "xyes"; then
-     for ac_prog in ssh
- 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_path_SSH+set}" = set; then
+   { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+ echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+ if test -z "$MKDIR_P"; then
+   if test "${ac_cv_path_mkdir+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $SSH in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_SSH="$SSH" # Let the user override the test with a path.
-   ;;
-   *)
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
+ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
  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_SSH="$as_dir/$ac_word$ac_exec_ext"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
+   for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+        done
  done
+ IFS=$as_save_IFS
  
-   ;;
- esac
  fi
- SSH=$ac_cv_path_SSH
  
- if test -n "$SSH"; then
-   echo "$as_me:$LINENO: result: $SSH" >&5
- echo "${ECHO_T}$SSH" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   if test "${ac_cv_path_mkdir+set}" = set; then
+     MKDIR_P="$ac_cv_path_mkdir -p"
+   else
+     # As a last resort, use the slow shell script.  Don't cache a
+     # value for MKDIR_P within a source directory, because that will
+     # break other packages using the cache if that directory is
+     # removed, or if the value is a relative name.
+     test -d ./--version && rmdir ./--version
+     MKDIR_P="$ac_install_sh -d"
+   fi
  fi
+ { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+ echo "${ECHO_T}$MKDIR_P" >&6; }
  
-   test -n "$SSH" && break
- done
- cat >>confdefs.h <<_ACEOF
- #define SSH "$SSH"
- _ACEOF
- # Check whether --with-ssh-options or --without-ssh-options was given.
- if test "${with_ssh_options+set}" = set; then
-   withval="$with_ssh_options"
-    SSH_OPTIONS="$withval"
- else
-    SSH_OPTIONS=''
  
- fi;
  
-     case "$SSH_OPTIONS" in
-       y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to --with-ssh-options." >&5
- echo "$as_me: error: *** You must supply an argument to --with-ssh-options." >&2;}
-    { (exit 1); exit 1; }; };;
-       *) : ;;
-     esac
  
-     echo "$as_me:$LINENO: checking SSH options" >&5
- echo $ECHO_N "checking SSH options... $ECHO_C" >&6
-     # if we didn't get SSH options from the user, figure them out for ourselves
-     if test -z "$SSH_OPTIONS"; then
-       # TODO - quote these (or break them up in ssh-security??)
-       case `$SSH -V 2>&1` in
-           OpenSSH*) SSH_OPTIONS='-x -o BatchMode=yes -o PreferredAuthentications=publickey';;
-           *) SSH_OPTIONS='-x -o BatchMode=yes'
-       esac
-     fi
+   gl_LIBOBJS="$gl_LIBOBJS tempname.$ac_objext"
  
-     # now convert that to a comma-separated list of C strings
-     eval "set dummy ${SSH_OPTIONS}"; shift
-     SSH_OPTIONS=''
-     for i in "${@}"; do SSH_OPTIONS="${SSH_OPTIONS}${SSH_OPTIONS:+, }\"${i/\"/\\\"}\""; done
-     echo "$as_me:$LINENO: result: $SSH_OPTIONS" >&5
- echo "${ECHO_T}$SSH_OPTIONS" >&6
+   :
  
  
- cat >>confdefs.h <<_ACEOF
- #define SSH_OPTIONS $SSH_OPTIONS
- _ACEOF
  
- fi
  
  
- # Check whether --with-bsdtcp-security or --without-bsdtcp-security was given.
- if test "${with_bsdtcp_security+set}" = set; then
-   withval="$with_bsdtcp_security"
-   BSDTCP_SECURITY=$withval
- else
-   : ${BSDTCP_SECURITY=yes}
  
- fi;
- case "$BSDTCP_SECURITY" in
- n | no) : ;;
- y |  ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define BSDTCP_SECURITY 1
- _ACEOF
  
-              BSDTCP_SECURITY_SET=true
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument the to --with-bsdtcp-security option." >&5
- echo "$as_me: error: *** You must not supply an argument the to --with-bsdtcp-security option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
  
+   :
  
- # Check whether --with-bsdudp-security or --without-bsdudp-security was given.
- if test "${with_bsdudp_security+set}" = set; then
-   withval="$with_bsdudp_security"
-   BSDUDP_SECURITY=$withval
- else
-   : ${BSDUDP_SECURITY=yes}
  
- fi;
- case "$BSDUDP_SECURITY" in
- n | no) : ;;
- y |  ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define BSDUDP_SECURITY 1
- _ACEOF
  
-              BSDUDP_SECURITY_SET=true
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument the to --with-bsdudp-security option." >&5
- echo "$as_me: error: *** You must not supply an argument the to --with-bsdudp-security option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
  
  
- # Check whether --with-server-principal or --without-server-principal was given.
- if test "${with_server_principal+set}" = set; then
-   withval="$with_server_principal"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-server-principal option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-server-principal option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *)
-           SERVER_HOST_PRINCIPLE="$withval"
-         ;;
-       esac
  
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_unistd_h='<'unistd.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <unistd.h>" >&5
+ echo $ECHO_N "checking absolute name of <unistd.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_unistd_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   : ${SERVER_HOST_PRINCIPLE="amanda"}
- fi;
  
- cat >>confdefs.h <<_ACEOF
- #define SERVER_HOST_PRINCIPLE "$SERVER_HOST_PRINCIPLE"
+         if test $ac_cv_header_unistd_h = yes; then
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
  _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <unistd.h>
  
+ _ACEOF
+                                   gl_cv_next_unistd_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/unistd.h#{
+                s#.*"\(.*/unistd.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_unistd_h='<'unistd.h'>'
+         fi
  
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_unistd_h" >&5
+ echo "${ECHO_T}$gl_cv_next_unistd_h" >&6; }
+      fi
+      NEXT_UNISTD_H=$gl_cv_next_unistd_h
  
- # Check whether --with-server-instance or --without-server-instance was given.
- if test "${with_server_instance+set}" = set; then
-   withval="$with_server_instance"
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-server-instance option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-server-instance option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) SERVER_HOST_INSTANCE="$withval"
-         ;;
-       esac
  
- else
-   : ${SERVER_HOST_INSTANCE="amanda"}
  
- fi;
  
- cat >>confdefs.h <<_ACEOF
- #define SERVER_HOST_INSTANCE "$SERVER_HOST_INSTANCE"
- _ACEOF
  
+   :
  
  
- # Check whether --with-server-keyfile or --without-server-keyfile was given.
- if test "${with_server_keyfile+set}" = set; then
-   withval="$with_server_keyfile"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-server-keyfile option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-server-keyfile option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) SERVER_HOST_KEY_FILE="$withval"
-         ;;
-       esac
  
- else
-   : ${SERVER_HOST_KEY_FILE="/.amanda"}
  
- fi;
+   if test $ac_cv_header_unistd_h = yes; then
+     HAVE_UNISTD_H=1
+   else
+     HAVE_UNISTD_H=0
+   fi
  
- cat >>confdefs.h <<_ACEOF
- #define SERVER_HOST_KEY_FILE "$SERVER_HOST_KEY_FILE"
- _ACEOF
  
  
  
- # Check whether --with-client-principal or --without-client-principal was given.
- if test "${with_client_principal+set}" = set; then
-   withval="$with_client_principal"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-client-principal option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-client-principal option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) CLIENT_HOST_PRINCIPLE="$withval"
-         ;;
-       esac
+   :
  
- else
-   : ${CLIENT_HOST_PRINCIPLE="rcmd"}
  
- fi;
  
- cat >>confdefs.h <<_ACEOF
- #define CLIENT_HOST_PRINCIPLE "$CLIENT_HOST_PRINCIPLE"
- _ACEOF
  
  
+   if test $ac_cv_func_vasnprintf = no; then
  
- # Check whether --with-client-instance or --without-client-instance was given.
- if test "${with_client_instance+set}" = set; then
-   withval="$with_client_instance"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-client-instance option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-client-instance option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) CLIENT_HOST_INSTANCE="$withval"
-         ;;
-       esac
+   :
  
- else
-   : ${CLIENT_HOST_INSTANCE=HOSTNAME_INSTANCE}
  
- fi;
  
- cat >>confdefs.h <<_ACEOF
- #define CLIENT_HOST_INSTANCE $CLIENT_HOST_INSTANCE
- _ACEOF
  
  
+   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
+   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
+   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
+   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
+   if test $ac_cv_func_vasnprintf = yes; then
  
- # Check whether --with-client-keyfile or --without-client-keyfile was given.
- if test "${with_client_keyfile+set}" = set; then
-   withval="$with_client_keyfile"
+ cat >>confdefs.h <<\_ACEOF
+ #define REPLACE_VASNPRINTF 1
+ _ACEOF
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-client-keyfile option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-client-keyfile option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) CLIENT_HOST_KEY_FILE="$withval"
-         ;;
-       esac
+   fi
  
- else
-   : ${CLIENT_HOST_KEY_FILE=KEYFILE}
  
- fi;
  
- # Assume it's either KEYFILE (defined in krb.h), or a string filename...
- if test "x$CLIENT_HOST_KEY_FILE" != "xKEYFILE"; then
-   CLIENT_HOST_KEY_FILE="\"$CLIENT_HOST_KEY_FILE\""
- fi
  
  
- cat >>confdefs.h <<_ACEOF
- #define CLIENT_HOST_KEY_FILE $CLIENT_HOST_KEY_FILE
- _ACEOF
  
  
  
- # Check whether --with-ticket-lifetime or --without-ticket-lifetime was given.
- if test "${with_ticket_lifetime+set}" = set; then
-   withval="$with_ticket_lifetime"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-ticket-lifetime option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-ticket-lifetime option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) TICKET_LIFETIME="$withval"
-         ;;
-       esac
  
+   { echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
+ echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_ptrdiff_t+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   : ${TICKET_LIFETIME=128}
+   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
+ typedef ptrdiff_t ac__type_new_;
+ int
+ main ()
+ {
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_ptrdiff_t=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- fi;
+       ac_cv_type_ptrdiff_t=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
+ echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6; }
+ if test $ac_cv_type_ptrdiff_t = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define TICKET_LIFETIME $TICKET_LIFETIME
+ #define HAVE_PTRDIFF_T 1
  _ACEOF
  
  
+ fi
  
- : ${KRB5_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
  
  
- # Check whether --with-krb5-security or --without-krb5-security was given.
- if test "${with_krb5_security+set}" = set; then
-   withval="$with_krb5_security"
-   KRB5_SECURITY="$withval"
- else
-   : ${KRB5_SECURITY=no}
  
- fi;
  
- case "$KRB5_SECURITY" in
- n | no) KRB5_SECURITY=no
-         KRB5_SPOTS=""
-       ;;
- y | ye | yes) : ;;
- *) KRB5_SPOTS="$KRB5_SECURITY"
-    KRB5_SECURITY=yes
-    ;;
- esac
  
- # if found, force the static versions of these libs (.a) by linking directly
- # with the .a files.  I don't know how to get -R dependancies checked
- # in autoconf at this time. -kashmir
- echo "$as_me:$LINENO: checking for Kerberos V" >&5
- echo $ECHO_N "checking for Kerberos V... $ECHO_C" >&6
- KRB5_DIR_FOUND=""
- KRB5_CFLAGS=""
- for dir in $KRB5_SPOTS; do
-   for lib in lib lib64; do
-     k5libdir=${dir}/${lib}
-     if test -f ${k5libdir}/libkrb5.a -a -f ${k5libdir}/libgssapi_krb5.a -a -f ${k5libdir}/libcom_err.a; then
-       if test -f ${k5libdir}/libk5crypto.a; then
-           K5CRYPTO=-lk5crypto
-       elif test -f ${k5libdir}/libcrypto.a; then
-           K5CRYPTO=-lcrypto
-       else
-           K5CRYPTO=""
-       fi
-       if test -f ${k5libdir}/libkrb5support.a; then
-           K5SUPPORT=-lkrb5support
-       else
-           K5SUPPORT=""
-       fi
-       KRB5_DIR_FOUND=$dir
-       KRB5LIBS="-lgssapi_krb5 -lkrb5 $K5CRYPTO $K5SUPPORT -lcom_err"
-       KRB5CFLAGS=""
-       break
-     elif test -f ${k5libdir}/libkrb5.a -a -f ${k5libdir}/libasn1.a -a -f ${k5libdir}/libgssapi.a; then
-       KRB5_DIR_FOUND=$dir
-       KRB5LIBS="-lgssapi.a -lkrb5.a -lasn1.a"
-       KRB5_CFLAGS="-DKRB5_HEIMDAL_INCLUDES"
-       break
-     fi
-   done
- done
  
- if test "$KRB5_DIR_FOUND"; then
-       echo "$as_me:$LINENO: result: found in $KRB5_DIR_FOUND" >&5
- echo "${ECHO_T}found in $KRB5_DIR_FOUND" >&6
-       KRB5_SECURITY=yes
  
- cat >>confdefs.h <<\_ACEOF
- #define KRB5_SECURITY 1
- _ACEOF
  
-       #
-       # some OS's, such as NetBSD, stick krb5 includes out of the way...
-       # should probably just use autoconf to look for various include
-       # options and set them, but don't quite want to do that until I've
-       # dug into it a bit more.
-       #
-       if test -d "$KRB5_DIR_FOUND/krb5" ; then
-               KRB5INCLUDES="-I$KRB5_DIR_FOUND/include/krb5"
-       else
-               KRB5INCLUDES="-I$KRB5_DIR_FOUND/include"
-       fi
-       if test "$KRB5_CFLAGS" ; then
-               KRB5INCLUDES="$KRB5INCLUDES $KRB5_CFLAGS"
-       fi
  
- echo "$as_me:$LINENO: checking for main in -lkrb5support" >&5
- echo $ECHO_N "checking for main in -lkrb5support... $ECHO_C" >&6
- if test "${ac_cv_lib_krb5support_main+set}" = set; then
+ for ac_func in snprintf wcslen
+ 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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lkrb5support  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   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 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
+ 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
+ #endif
  
  int
  main ()
  {
main ();
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
-   ac_cv_lib_krb5support_main=yes
+   (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
  
- ac_cv_lib_krb5support_main=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
- LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_main" >&5
- echo "${ECHO_T}$ac_cv_lib_krb5support_main" >&6
- if test $ac_cv_lib_krb5support_main = yes; then
+ 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 HAVE_LIBKRB5SUPPORT 1
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
-   LIBS="-lkrb5support $LIBS"
- fi
-       KRB5LDFLAGS=-L$k5libdir
-       break
- fi
- if test "x$KRB5LDFLAGS" = "x" ; then
-     echo "$as_me:$LINENO: result: no krb5 system libraries found" >&5
- echo "${ECHO_T}no krb5 system libraries found" >&6
  fi
+ done
  
+       { echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5
+ echo $ECHO_N "checking whether _snprintf is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl__snprintf+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 <stdio.h>
  
+ int
+ main ()
+ {
+ #ifndef _snprintf
+   (void) _snprintf;
+ #endif
  
- # Check whether --with-low-tcpportrange or --without-low-tcpportrange was given.
- if test "${with_low_tcpportrange+set}" = set; then
-   withval="$with_low_tcpportrange"
-       LOW_TCPPORTRANGE="$withval"
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_have_decl__snprintf=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- fi;
+       ac_cv_have_decl__snprintf=no
+ fi
  
- if test x"${LOW_TCPPORTRANGE+set}" = x"set"; then
-     if test x`echo "$LOW_TCPPORTRANGE" | sed 's/[0-9][0-9]*,[0-9][0-9]*//'` != x""; then
-       { { echo "$as_me:$LINENO: error: *** --with-low-tcpportrange requires two comma-separated positive numbers" >&5
- echo "$as_me: error: *** --with-low-tcpportrange requires two comma-separated positive numbers" >&2;}
-    { (exit 1); exit 1; }; }
-     fi
-     min_low_tcp_port=`echo "$LOW_TCPPORTRANGE" | sed 's/,.*//'`
-     max_low_tcp_port=`echo "$LOW_TCPPORTRANGE" | sed 's/.*,//'`
-     if test $min_low_tcp_port -gt $max_low_tcp_port; then
-       { { echo "$as_me:$LINENO: error: *** the second TCP port number must be greater than the first in --with-low-tcpportrange" >&5
- echo "$as_me: error: *** the second TCP port number must be greater than the first in --with-low-tcpportrange" >&2;}
-    { (exit 1); exit 1; }; }
-     fi
-     if test $min_low_tcp_port -lt 512; then
-       { echo "$as_me:$LINENO: WARNING: *** the low TCP port range should be 512 or greater in --with-low-tcpportrange" >&5
- echo "$as_me: WARNING: *** the low TCP port range should be 512 or greater in --with-low-tcpportrange" >&2;}
-     fi
-     if test $max_low_tcp_port -ge 1024; then
-       { echo "$as_me:$LINENO: WARNING: *** the low TCP port range should be less than 1024 in --with-low-tcpportrange" >&5
- echo "$as_me: WARNING: *** the low TCP port range should be less than 1024 in --with-low-tcpportrange" >&2;}
-     fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5
+ echo "${ECHO_T}$ac_cv_have_decl__snprintf" >&6; }
+ if test $ac_cv_have_decl__snprintf = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define LOW_TCPPORTRANGE $LOW_TCPPORTRANGE
+ #define HAVE_DECL__SNPRINTF 1
+ _ACEOF
+ else
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL__SNPRINTF 0
  _ACEOF
  
  fi
  
  
- # Check whether --with-tcpportrange or --without-tcpportrange was given.
- if test "${with_tcpportrange+set}" = set; then
-   withval="$with_tcpportrange"
  
-       TCPPORTRANGE="$withval"
  
  
- fi;
- if test x"${TCPPORTRANGE+set}" = x"set"; then
-     if test x`echo "$TCPPORTRANGE" | sed 's/[0-9][0-9]*,[0-9][0-9]*//'` != x""; then
-       { { echo "$as_me:$LINENO: error: *** --with-tcpportrange requires two comma-separated positive numbers" >&5
- echo "$as_me: error: *** --with-tcpportrange requires two comma-separated positive numbers" >&2;}
-    { (exit 1); exit 1; }; }
-     fi
-     min_tcp_port=`echo "$TCPPORTRANGE" | sed 's/,.*//'`
-     max_tcp_port=`echo "$TCPPORTRANGE" | sed 's/.*,//'`
-     if test $min_tcp_port -gt $max_tcp_port; then
-       { { echo "$as_me:$LINENO: error: *** the second TCP port number must be greater than the first in --with-tcpportrange" >&5
- echo "$as_me: error: *** the second TCP port number must be greater than the first in --with-tcpportrange" >&2;}
-    { (exit 1); exit 1; }; }
-     fi
-     if test $min_tcp_port -lt 1024; then
-       { echo "$as_me:$LINENO: WARNING: *** the TCP port range should be 1024 or greater in --with-tcpportrange" >&5
- echo "$as_me: WARNING: *** the TCP port range should be 1024 or greater in --with-tcpportrange" >&2;}
-     fi
-     if test $max_tcp_port -ge 65536; then
-       { echo "$as_me:$LINENO: WARNING: *** the TCP port range should be less than 65536 in --with-tcpportrange" >&5
- echo "$as_me: WARNING: *** the TCP port range should be less than 65536 in --with-tcpportrange" >&2;}
-     fi
  
- cat >>confdefs.h <<_ACEOF
- #define TCPPORTRANGE $TCPPORTRANGE
- _ACEOF
+   fi
  
- fi
  
  
- # Check whether --with-udpportrange or --without-udpportrange was given.
- if test "${with_udpportrange+set}" = set; then
-   withval="$with_udpportrange"
+   CFLAG_VISIBILITY=
+   HAVE_VISIBILITY=0
+   if test -n "$GCC"; then
+     { echo "$as_me:$LINENO: checking for simple visibility declarations" >&5
+ echo $ECHO_N "checking for simple visibility declarations... $ECHO_C" >&6; }
+     if test "${gl_cv_cc_visibility+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
  
-       UDPPORTRANGE="$withval"
+       gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -fvisibility=hidden"
+       cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+          extern __attribute__((__visibility__("default"))) int exportedvar;
+          extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+          extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_cc_visibility=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- fi;
- if test x"${UDPPORTRANGE+set}" = x"set"; then
-     if test x`echo "$UDPPORTRANGE" | sed 's/[0-9][0-9]*,[0-9][0-9]*//'` != x""; then
-       { { echo "$as_me:$LINENO: error: *** --with-udpportrange requires two comma-separated positive numbers" >&5
- echo "$as_me: error: *** --with-udpportrange requires two comma-separated positive numbers" >&2;}
-    { (exit 1); exit 1; }; }
-     fi
-     min_udp_port=`echo "$UDPPORTRANGE" | sed 's/,.*//'`
-     max_udp_port=`echo "$UDPPORTRANGE" | sed 's/.*,//'`
-     if test $min_udp_port -gt $max_udp_port; then
-       { { echo "$as_me:$LINENO: error: *** the second UDP port number must be greater than the first in --with-udpportrange" >&5
- echo "$as_me: error: *** the second UDP port number must be greater than the first in --with-udpportrange" >&2;}
-    { (exit 1); exit 1; }; }
-     fi
-     if test $max_udp_port -ge 1024; then
-       { echo "$as_me:$LINENO: WARNING: *** the UDP port range should be less than 1024 in --with-udpportrange" >&5
- echo "$as_me: WARNING: *** the UDP port range should be less than 1024 in --with-udpportrange" >&2;}
-     fi
-     if test $min_udp_port -le 0; then
-       { echo "$as_me:$LINENO: WARNING: *** the UDP port range should be greater than 0 in --with-udpportrange" >&5
- echo "$as_me: WARNING: *** the UDP port range should be greater than 0 in --with-udpportrange" >&2;}
+       gl_cv_cc_visibility=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       CFLAGS="$gl_save_CFLAGS"
+ fi
+     { echo "$as_me:$LINENO: result: $gl_cv_cc_visibility" >&5
+ echo "${ECHO_T}$gl_cv_cc_visibility" >&6; }
+     if test $gl_cv_cc_visibility = yes; then
+       CFLAG_VISIBILITY="-fvisibility=hidden"
+       HAVE_VISIBILITY=1
      fi
+   fi
  
  cat >>confdefs.h <<_ACEOF
- #define UDPPORTRANGE $UDPPORTRANGE
+ #define HAVE_VISIBILITY $HAVE_VISIBILITY
+ _ACEOF
+   { echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5
+ echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6; }
+ if test "${gl_cv_header_wchar_h_standalone+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ #include <wchar.h>
+ wchar_t w;
  _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
+   gl_cv_header_wchar_h_standalone=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+       gl_cv_header_wchar_h_standalone=no
  fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5
+ echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6; }
+   if test $gl_cv_header_wchar_h_standalone != yes; then
+     WCHAR_H=wchar.h
+   fi
  
- # Check whether --with-maxtapeblocksize or --without-maxtapeblocksize was given.
- if test "${with_maxtapeblocksize+set}" = set; then
-   withval="$with_maxtapeblocksize"
  
-       MAXTAPEBLOCKSIZE="$withval"
+   :
  
- else
-   : ${MAXTAPEBLOCKSIZE=32}
  
- fi;
  
  
- cat >>confdefs.h <<_ACEOF
- #define MAX_TAPE_BLOCK_KB ($MAXTAPEBLOCKSIZE)
- _ACEOF
  
+   if test $ac_cv_header_wchar_h = yes; then
+     HAVE_WCHAR_H=1
+   else
+     HAVE_WCHAR_H=0
+   fi
  
  
  
- # Check whether --with-db or --without-db was given.
- if test "${with_db+set}" = set; then
-   withval="$with_db"
  
-       case "$withval" in
-       "" | y | ye | yes | n | no)
-           { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-db option." >&5
- echo "$as_me: error: *** You must supply an argument to the --with-db option." >&2;}
-    { (exit 1); exit 1; }; }
-         ;;
-       *) DB_STYLE="$withval"
-         ;;
-       esac
+   :
  
  
- fi;
- if test "$DB_STYLE"; then
-     case "$DB_STYLE" in
-       db | dbm | gdbm | ndbm | text)  ;;
-       *)
-           { { echo "$as_me:$LINENO: error: *** Unknown argument $DB_STYLE given to --with-db.  Choose from db, dbm, gdbm, ndbm, text." >&5
- echo "$as_me: error: *** Unknown argument $DB_STYLE given to --with-db.  Choose from db, dbm, gdbm, ndbm, text." >&2;}
-    { (exit 1); exit 1; }; }
-           DB_STYLE=
-           ;;
-     esac
- fi
  
  
- # Check whether --with-mmap or --without-mmap was given.
- if test "${with_mmap+set}" = set; then
-   withval="$with_mmap"
-   FORCE_MMAP=$withval
- else
-   : ${FORCE_MMAP=no}
  
- fi;
- case "$FORCE_MMAP" in
- y | ye | yes | n | no) : ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-mmap." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-mmap." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
  
  
- # Check whether --with-buffered-dump or --without-buffered-dump was given.
- if test "${with_buffered_dump+set}" = set; then
-   withval="$with_buffered_dump"
-   DUMPER_SOCKET_BUFFERING=$withval
+      if test $gl_cv_have_include_next = yes; then
+        gl_cv_next_wchar_h='<'wchar.h'>'
+      else
+        { echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5
+ echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6; }
+ if test "${gl_cv_next_wchar_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   : ${DUMPER_SOCKET_BUFFERING=no}
  
- fi;
- case "$DUMPER_SOCKET_BUFFERING" in
- n | no) :
-   ;;
- y | ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define DUMPER_SOCKET_BUFFERING 1
+         if test $ac_cv_header_wchar_h = yes; then
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
  _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <wchar.h>
  
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-buffered-dump." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-buffered-dump." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
+ _ACEOF
+                                   gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+              sed -n '\#/wchar.h#{
+                s#.*"\(.*/wchar.h\)".*#\1#
+                s#^/[^/]#//&#
+                p
+                q
+              }'`'"'
+         else
+           gl_cv_next_wchar_h='<'wchar.h'>'
+         fi
  
+ fi
+ { echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5
+ echo "${ECHO_T}$gl_cv_next_wchar_h" >&6; }
+      fi
+      NEXT_WCHAR_H=$gl_cv_next_wchar_h
  
- # Check whether --with-assertions or --without-assertions was given.
- if test "${with_assertions+set}" = set; then
-   withval="$with_assertions"
-   ASSERTIONS="$withval"
- else
-   : ${ASSERTIONS=no}
  
- fi;
- case "$ASSERTIONS" in
- n | no) : ;;
- y |  ye | yes)
- cat >>confdefs.h <<\_ACEOF
- #define ASSERTIONS 1
- _ACEOF
  
-   ;;
- *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-assertions option." >&5
- echo "$as_me: error: *** You must not supply an argument to --with-assertions option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
  
  
- # Check whether --with-tmpdir or --without-tmpdir was given.
- if test "${with_tmpdir+set}" = set; then
-   withval="$with_tmpdir"
-   tmpdir="$withval"
- else
-   : ${tmpdir=yes}
  
- fi;
- tmpdir=`(
-     test "x$prefix" = xNONE && prefix=$ac_default_prefix
-     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
-     eval echo "$tmpdir"
- )`
- case "$tmpdir" in
- n | no) { { echo "$as_me:$LINENO: error: *** --without-tmpdir is not allowed." >&5
- echo "$as_me: error: *** --without-tmpdir is not allowed." >&2;}
-    { (exit 1); exit 1; }; };;
- y |  ye | yes)
-       AMANDA_TMPDIR="/tmp/amanda";;
- /*)
-       AMANDA_TMPDIR="$tmpdir";;
- *) { { echo "$as_me:$LINENO: error: *** You must supply a full pathname to --with-tmpdir option." >&5
- echo "$as_me: error: *** You must supply a full pathname to --with-tmpdir option." >&2;}
-    { (exit 1); exit 1; }; };;
+ for ac_header in stdint.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ 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; }
+ 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 { (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
+   ac_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- cat >>confdefs.h <<_ACEOF
- #define AMANDA_TMPDIR "$AMANDA_TMPDIR"
+       ac_header_compiler=no
+ fi
+ 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; }
+ 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 { (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 && {
+        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
+ 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;}
  
- # Check whether --with-debugging or --without-debugging was given.
- if test "${with_debugging+set}" = set; then
-   withval="$with_debugging"
-   debugging="$withval"
+     ;;
+ esac
+ { 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
-   : ${debugging=yes}
+   eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  
- fi;
- debugging=`(
-     test "x$prefix" = xNONE && prefix=$ac_default_prefix
-     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
-     eval echo "$debugging"
- )`
- case "$debugging" in
- n | no) AMANDA_DBGDIR="";;
- y |  ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR";;
- /*) AMANDA_DBGDIR="$debugging";;
- *) { { echo "$as_me:$LINENO: error: *** You must supply a full pathname to --with-debugging option." >&5
- echo "$as_me: error: *** You must supply a full pathname to --with-debugging option." >&2;}
-    { (exit 1); exit 1; }; }
-   ;;
- esac
- case "$AMANDA_DBGDIR" in
- "") :;;
- *)
- cat >>confdefs.h <<\_ACEOF
- #define DEBUG_CODE 1
+ 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
  
- cat >>confdefs.h <<_ACEOF
- #define AMANDA_DBGDIR "$AMANDA_DBGDIR"
- _ACEOF
+ done
  
-    ;;
- esac
  
  
- # Check whether --with-debug_days or --without-debug_days was given.
- if test "${with_debug_days+set}" = set; then
-   withval="$with_debug_days"
-   debug_days="$withval"
- else
-   : ${debug_days=4}
  
- fi;
- case "$debug_days" in
- n | no) AMANDA_DEBUG_DAYS=0 ;;
- y |  ye | yes) AMANDA_DEBUG_DAYS=4 ;;
- [0-9] | [0-9][0-9] | [0-9][0-9][0-9]) AMANDA_DEBUG_DAYS="$debug_days" ;;
- *) { { echo "$as_me:$LINENO: error: *** --with-debug-days value not numeric or out of range." >&5
- echo "$as_me: error: *** --with-debug-days value not numeric or out of range." >&2;}
+     # support deprecated ./configure flags to set various compiler flags
+ # Check whether --with-cflags was given.
+ if test "${with_cflags+set}" = set; then
+   withval=$with_cflags;
+           case "$withval" in
+           "" | y | ye | yes | n | no)
+               { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-cflags option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-cflags option." >&2;}
     { (exit 1); exit 1; }; }
-   ;;
- esac
+               ;;
          esac
  
- cat >>confdefs.h <<_ACEOF
- #define AMANDA_DEBUG_DAYS $AMANDA_DEBUG_DAYS
- _ACEOF
+           CFLAGS="$withval"
  
+ fi
  
  
  
- # Check whether --with-testing or --without-testing was given.
- if test "${with_testing+set}" = set; then
-   withval="$with_testing"
-   TESTING="$withval"
- else
-   : ${TESTING=no}
+ # Check whether --with-includes was given.
+ if test "${with_includes+set}" = set; then
+   withval=$with_includes;
+           case "$withval" in
+           "" | y | ye | yes | n | no)
+               { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-includes option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-includes option." >&2;}
+    { (exit 1); exit 1; }; }
+             ;;
+           esac
  
- fi;
- case "$TESTING" in
- n | no) SERVICE_SUFFIX="";;
- y |  ye | yes) SERVICE_SUFFIX="-test";;
- *) SERVICE_SUFFIX="-$TESTING";;
- esac
- AMANDA_SERVICE_NAME="amanda$SERVICE_SUFFIX"
- KAMANDA_SERVICE_NAME="kamanda$SERVICE_SUFFIX"
+           for dir in $withval; do
+               if test -d "$dir"; then
+                   CPPFLAGS="$CPPFLAGS -I$dir"
+               else
  
+     { echo "$as_me:$LINENO: WARNING: Include directory $dir does not exist." >&5
+ echo "$as_me: WARNING: Include directory $dir does not exist." >&2;}
  
- cat >>confdefs.h <<_ACEOF
- #define SERVICE_SUFFIX "$SERVICE_SUFFIX"
- _ACEOF
  
+     cat <<AAW_EOF >>config.warnings
+ Include directory $dir does not exist.
+ AAW_EOF
  
- cat >>confdefs.h <<_ACEOF
- #define AMANDA_SERVICE_NAME "$AMANDA_SERVICE_NAME"
- _ACEOF
  
+               fi
+           done
  
- cat >>confdefs.h <<_ACEOF
- #define KAMANDA_SERVICE_NAME "$KAMANDA_SERVICE_NAME"
- _ACEOF
+ fi
  
  
- (
-     test "x$prefix" = xNONE && prefix=$ac_default_prefix
-     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
  
-     tmp=`eval echo "$bindir"`
+ # Check whether --with-libraries was given.
+ if test "${with_libraries+set}" = set; then
+   withval=$with_libraries;
+           case "$withval" in
+           "" | y | ye | yes | n | no)
+               { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-libraries option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-libraries option." >&2;}
+    { (exit 1); exit 1; }; }
+             ;;
+           esac
  
- cat >>confdefs.h <<_ACEOF
- #define bindir "$tmp"
- _ACEOF
+           for dir in $withval; do
+               if test -d "$dir"; then
+                   case "$target" in
+                     *-solaris2*,*-netbsd*)
+                           LDFLAGS="$LDFLAGS -R$dir"
+                           ;;
+                   esac
+                   LDFLAGS="$LDFLAGS -L$dir"
+               else
  
+     { echo "$as_me:$LINENO: WARNING: Library directory $dir does not exist." >&5
+ echo "$as_me: WARNING: Library directory $dir does not exist." >&2;}
  
-     tmp=`eval echo "$sbindir"`
  
- cat >>confdefs.h <<_ACEOF
- #define sbindir "$tmp"
_ACEOF
+     cat <<AAW_EOF >>config.warnings
+ Library directory $dir does not exist.
AAW_EOF
  
  
-     tmp=`eval echo "$libexecdir"`
+               fi
+           done
  
- cat >>confdefs.h <<_ACEOF
- #define libexecdir "$tmp"
- _ACEOF
+ fi
  
  
-     tmp=`eval echo $mandir`
+     # Warn for just about everything
  
- cat >>confdefs.h <<_ACEOF
- #define mandir "$tmp"
- _ACEOF
  
- )
  
- DUMP_PROGRAMS="ufsdump dump backup"
- GETCONF_LFS="LFS"
+     { echo "$as_me:$LINENO: checking for gcc flag -Wall" >&5
+ echo $ECHO_N "checking for gcc flag -Wall... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wall[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
  
- dump_returns_1=
- xenix_tapeio=
- case "$target" in
-     *-dec-osf*)
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wall"
  
- cat >>confdefs.h <<\_ACEOF
- #define STATFS_OSF1 1
- _ACEOF
-                       ;;
-     *-dg-*)
-                       DUMP_PROGRAMS="dump "$DUMP_PROGRAMS
-                       : ${USE_RUNDUMP=yes}
-                       dump_returns_1=yes
-                       ;;
-     *-netbsd*)
-                       ;;
-     *-freebsd*)
-                       ;;
-     *-openbsd*)
-                       ;;
-     *-hp-*)
-                       MT_FILE_FLAG="-t"
-                       GETCONF_LFS="XBS5_ILP32_OFFBIG"
-                       case "$CC" in
-                           *gcc*)
-                               AMANDA_CPPFLAGS="-D__STDC_EXT__ $AMANDA_CPPFLAGS"
-                               ;;
-                           *cc*)
-                               AMANDA_CFLAGS="-Ae $AMANDA_CFLAGS"
-                               ;;
-                       esac
-                       ;;
-   *-ibm-aix*)
-                       GETCONF_LFS="XBS5_ILP32_OFFBIG"
-                       DUMP_PROGRAMS="backup "$DUMP_PROGRAMS
  
- cat >>confdefs.h <<\_ACEOF
- #define AIX_TAPEIO 1
- _ACEOF
+     else
+       :
+     fi
  
  
- cat >>confdefs.h <<\_ACEOF
- #define AIX_BACKUP 1
- _ACEOF
+     # And add any extra warnings too
  
-                       ;;
-   m88k-motorola-sysv4)
-                       ;;
-   *-nextstep3)
-                       ;;
-   *-pc-bsdi*)
-                       ;;
-   *-pc-linux-*)
-                       ;;
-   *-redhat-linux-*)
-                       ;;
-   *-suse-linux-*)
-                       ;;
-   x86_64-*-linux-*)
-                       ;;
-   alpha*-*-linux-*)
-                       ;;
-   sparc*-*-linux-*)
-                       ;;
-   powerpc-*-linux-*)
-                       ;;
-   *-sgi-irix3*)
-                                               CC=gcc
-                       ;;
-   *-sgi-irix4*)
-                       ;;
-   *-sgi-irix5*)
-                       ;;
-   *-sgi-irix6*)
-                       ;;
-   *-solaris2*)
-                       ;;
-   *-sun-sunos4.1*)
-                       ;;
-   *-ultrix*)
-                       : ${USE_RUNDUMP=yes}
  
- cat >>confdefs.h <<\_ACEOF
- #define STATFS_ULTRIX 1
- _ACEOF
  
-                       dump_returns_1=yes
-                       ;;
-   *-sysv4.2uw2*)
+     { echo "$as_me:$LINENO: checking for gcc flag -Wextra" >&5
+ echo $ECHO_N "checking for gcc flag -Wextra... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wextra[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
  
- cat >>confdefs.h <<\_ACEOF
- #define UWARE_TAPEIO 1
- _ACEOF
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wextra"
  
-                       ;;
-   *-sco3.2v4*)
-                       DEV_PREFIX=/dev/
-                       RDEV_PREFIX=/dev/
-                       ;;
-   *-sco3.2v5*)
-                       xenix_tapeio=yes
  
- cat >>confdefs.h <<\_ACEOF
- #define STATFS_SCO_OS5 1
- _ACEOF
+     else
  
-                       ;;
-   i386-pc-isc4*)
-                       xenix_tapeio=yes
-                       ;;
-   *-sni-sysv4)
-                       ;;
-   *-pc-cygwin)
  
- cat >>confdefs.h <<\_ACEOF
- #define IGNORE_TAR_ERRORS 1
- _ACEOF
  
-                       # Cygwin needs PATH to find cygwin1.dll
+     { echo "$as_me:$LINENO: checking for gcc flag -W" >&5
+ echo $ECHO_N "checking for gcc flag -W... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '^[:alnum:]-W^[:alnum:]-' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
  
- cat >>confdefs.h <<\_ACEOF
- #define NEED_PATH_ENV 1
- _ACEOF
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -W"
  
  
- cat >>confdefs.h <<\_ACEOF
- #define IGNORE_UID_CHECK 1
- _ACEOF
+     else
+       :
+     fi
  
  
- cat >>confdefs.h <<\_ACEOF
- #define IGNORE_FSTAB 1
- _ACEOF
+     fi
  
  
- cat >>confdefs.h <<\_ACEOF
- #define DONT_SUID_ROOT 1
- _ACEOF
  
-                       NEED_SETUID_CLIENT=false
-                       NEED_RUNTIME_PSEUDO_RELOC=true
-                       BROKEN_IPV6=true
-                       ;;
-   *)
-                       cat <<END
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
  
- *****
- This machine, target type $target, is not known
- to be fully supported by this configure script.  If the
- installation of Amanda on this system succeeds or needed
- any patches, please email amanda-hackers@amanda.org with
- the patches or an indication of the sucess or failure of
- the Amanda installation on your system.
- *****
  
- END
-               ;;
- esac
  
- if test -n "$dump_returns_1"; then
+ #
+ # Configuration flags (--with-xxx and --enable-xxx)
+ #
  
- cat >>confdefs.h <<\_ACEOF
- #define DUMP_RETURNS_1 1
- _ACEOF
  
- fi
+ # Check whether --with-user was given.
+ if test "${with_user+set}" = set; then
+   withval=$with_user;
+             case "$withval" in
+                 "" | y | ye | yes | n | no)
+                     { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-user option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-user option." >&2;}
+    { (exit 1); exit 1; }; }
+                   ;;
+                 *)
+                     CLIENT_LOGIN="$withval"
+                   ;;
+             esac
  
- if test -n "$xenix_tapeio"; then
+ else
  
- cat >>confdefs.h <<\_ACEOF
- #define XENIX_TAPEIO 1
- _ACEOF
  
- fi
+     { echo "$as_me:$LINENO: WARNING: no user specified (--with-user) -- using 'amanda'" >&5
+ echo "$as_me: WARNING: no user specified (--with-user) -- using 'amanda'" >&2;}
  
- AMANDA_CFLAGS="$AMANDA_CFLAGS $KRB4INCLUDES $KRB5INCLUDES $DBMALLOCCFLAGS"
- AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS $KRB4INCLUDES $KRB5INCLUDES $DBMALLOCINCLUDES"
- AMANDA_LDFLAGS="$AMANDA_LDFLAGS $KRB4LDFLAGS $KRB5LDFLAGS"
- AMANDA_LIBS="$KRB4LIBS $KRB5LIBS $DBMALLOCLIBS $AMANDA_LIBS"
- CFLAGS="$CFLAGS $AMANDA_CFLAGS"
- CPPFLAGS="$CPPFLAGS $AMANDA_CPPFLAGS"
- LDFLAGS="$LDFLAGS $AMANDA_LDFLAGS"
- LIBS="$AMANDA_LIBS $LIBS"
  
+     cat <<AAW_EOF >>config.warnings
+ no user specified (--with-user) -- using 'amanda'
+ AAW_EOF
+           CLIENT_LOGIN=amanda
+ fi
  
- : ${MT_FILE_FLAG="-f"}
  
  
  cat >>confdefs.h <<_ACEOF
- #define MT_FILE_FLAG "$MT_FILE_FLAG"
+ #define CLIENT_LOGIN "$CLIENT_LOGIN"
  _ACEOF
  
  
- # ------ AX CREATE STDINT H -------------------------------------
- echo "$as_me:$LINENO: checking for stdint types" >&5
- echo $ECHO_N "checking for stdint types... $ECHO_C" >&6
- ac_stdint_h=`echo common-src/amanda-int.h`
- # try to shortcircuit - if the default include path of the compiler
- # can find a "stdint.h" header then we assume that all compilers can.
- if test "${ac_cv_header_stdint_t+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
  
- old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
- old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
- old_CFLAGS="$CFLAGS"     ; CFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <stdint.h>
- int
- main ()
- {
- int_least32_t v = 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_stdint_result="(assuming C99 compatible system)"
-  ac_cv_header_stdint_t="stdint.h";
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_header_stdint_t=""
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- CXXFLAGS="$old_CXXFLAGS"
- CPPFLAGS="$old_CPPFLAGS"
- CFLAGS="$old_CFLAGS"
- fi
  
+ # Check whether --with-group was given.
+ if test "${with_group+set}" = set; then
+   withval=$with_group;
+             case "$withval" in
+                 "" | y | ye | yes | n | no)
+                     { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-group option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-group option." >&2;}
+    { (exit 1); exit 1; }; }
+                   ;;
+                 *) SETUID_GROUP="$withval"
+                   ;;
+             esac
  
- v="... $ac_cv_header_stdint_h"
- if test "$ac_stdint_h" = "stdint.h" ; then
-  echo "$as_me:$LINENO: result: (are you sure you want them in ./stdint.h?)" >&5
- echo "${ECHO_T}(are you sure you want them in ./stdint.h?)" >&6
- elif test "$ac_stdint_h" = "inttypes.h" ; then
-  echo "$as_me:$LINENO: result: (are you sure you want them in ./inttypes.h?)" >&5
- echo "${ECHO_T}(are you sure you want them in ./inttypes.h?)" >&6
- elif test "_$ac_cv_header_stdint_t" = "_" ; then
-  echo "$as_me:$LINENO: result: (putting them into $ac_stdint_h)$v" >&5
- echo "${ECHO_T}(putting them into $ac_stdint_h)$v" >&6
  else
-  ac_cv_header_stdint="$ac_cv_header_stdint_t"
-  echo "$as_me:$LINENO: result: $ac_cv_header_stdint (shortcircuit)" >&5
- echo "${ECHO_T}$ac_cv_header_stdint (shortcircuit)" >&6
+     { echo "$as_me:$LINENO: WARNING: no group specified (--with-group) -- using 'backup'" >&5
+ echo "$as_me: WARNING: no group specified (--with-group) -- using 'backup'" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ no group specified (--with-group) -- using 'backup'
+ AAW_EOF
+           CLIENT_LOGIN=backup
  fi
  
- if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
  
  
- inttype_headers=`echo  | sed -e 's/,/ /g'`
  
- ac_cv_stdint_result="(no helpful system typedefs seen)"
  
- echo "$as_me:$LINENO: checking for stdint uintptr_t" >&5
- echo $ECHO_N "checking for stdint uintptr_t... $ECHO_C" >&6
- if test "${ac_cv_header_stdint_x+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+ # Check whether --with-dumperdir was given.
+ if test "${with_dumperdir+set}" = set; then
+   withval=$with_dumperdir;
+     { echo "$as_me:$LINENO: WARNING: --with-dumperdir is no longer used." >&5
+ echo "$as_me: WARNING: --with-dumperdir is no longer used." >&2;}
+     cat <<AAW_EOF >>config.warnings
+ --with-dumperdir is no longer used.
+ AAW_EOF
  
-  ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
-   echo "$as_me:$LINENO: result: (..)" >&5
- echo "${ECHO_T}(..)" >&6
-   for i in    stdint.h inttypes.h sys/inttypes.h $inttype_headers ; do
-    unset ac_cv_type_uintptr_t
-    unset ac_cv_type_uint64_t
-    echo "$as_me:$LINENO: checking for uintptr_t" >&5
- echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
- if test "${ac_cv_type_uintptr_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.  */
- #include <$i>
  
- int
- main ()
- {
- if ((uintptr_t *) 0)
-   return 0;
- if (sizeof (uintptr_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_uintptr_t=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_uintptr_t=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
- echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
- if test $ac_cv_type_uintptr_t = yes; then
-   ac_cv_header_stdint_x=$i
+ # Check whether --with-configdir was given.
+ if test "${with_configdir+set}" = set; then
+   withval=$with_configdir;
+           case "$withval" in
+           "" | y | ye | yes | n | no)
+               { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-configdir option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-configdir option." >&2;}
+    { (exit 1); exit 1; }; }
+             ;;
+           *) CONFIG_DIR="$withval"
+             ;;
+           esac
  else
-   continue
+           : ${CONFIG_DIR='${sysconfdir}/amanda'} # (variable will be evaluated below)
  fi
  
-    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
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include<$i>
  
- int
- main ()
- {
- if ((uint64_t *) 0)
-   return 0;
- if (sizeof (uint64_t))
-   return 0;
-   ;
-   return 0;
- }
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$CONFIG_DIR\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   CONFIG_DIR="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define CONFIG_DIR "$ac_define_dir"
  _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_uint64_t=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_uint64_t=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+ # Check whether --with-indexdir was given.
+ if test "${with_indexdir+set}" = set; then
+   withval=$with_indexdir;    { { echo "$as_me:$LINENO: error: *** --with-indexdir is deprecated; use indexdir in amanda.conf instead." >&5
+ echo "$as_me: error: *** --with-indexdir is deprecated; use indexdir in amanda.conf instead." >&2;}
+    { (exit 1); exit 1; }; }
  fi
- 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
-   and64="/uint64_t"
- else
-   and64=""
+ # Check whether --with-dbdir was given.
+ if test "${with_dbdir+set}" = set; then
+   withval=$with_dbdir;    { { echo "$as_me:$LINENO: error: *** --with-dbdir is deprecated; use infofile in amanda.conf instead." >&5
+ echo "$as_me: error: *** --with-dbdir is deprecated; use infofile in amanda.conf instead." >&2;}
+    { (exit 1); exit 1; }; }
  fi
  
-       stdint.h inttypes.h sys/inttypes.h $inttype_headers
-  break
-   done
-   echo "$as_me:$LINENO: checking for stdint uintptr_t" >&5
- echo $ECHO_N "checking for stdint uintptr_t... $ECHO_C" >&6
+ # Check whether --with-logdir was given.
+ if test "${with_logdir+set}" = set; then
+   withval=$with_logdir;    { { echo "$as_me:$LINENO: error: *** --with-logdir is deprecated; use logfile in amanda.conf instead." >&5
+ echo "$as_me: error: *** --with-logdir is deprecated; use logfile in amanda.conf instead." >&2;}
+    { (exit 1); exit 1; }; }
  
  fi
- echo "$as_me:$LINENO: result: $ac_cv_header_stdint_x" >&5
- echo "${ECHO_T}$ac_cv_header_stdint_x" >&6
  
  
- if test "_$ac_cv_header_stdint_x" = "_" ; then
  
- echo "$as_me:$LINENO: checking for stdint uint32_t" >&5
- echo $ECHO_N "checking for stdint uint32_t... $ECHO_C" >&6
- if test "${ac_cv_header_stdint_o+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
  
-  ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
-   echo "$as_me:$LINENO: result: (..)" >&5
- echo "${ECHO_T}(..)" >&6
-   for i in    inttypes.h sys/inttypes.h stdint.h $inttype_headers ; do
-    unset ac_cv_type_uint32_t
-    unset ac_cv_type_uint64_t
-    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
+ # Check whether --with-suffixes was given.
+ if test "${with_suffixes+set}" = set; then
+   withval=$with_suffixes; USE_VERSION_SUFFIXES=$withval
  else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$i>
+   : ${USE_VERSION_SUFFIXES=no}
  
- int
- main ()
- {
- if ((uint32_t *) 0)
-   return 0;
- if (sizeof (uint32_t))
-   return 0;
-   ;
-   return 0;
- }
+ fi
+     case "$USE_VERSION_SUFFIXES" in
+     y | ye | yes) USE_VERSION_SUFFIXES=yes
+ cat >>confdefs.h <<\_ACEOF
+ #define USE_VERSION_SUFFIXES 1
  _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_uint32_t=yes
+       program_suffix="-$VERSION_SUFFIX"
+       # This is from the output of configure.in.
+       if test "x$program_transform_name" = xs,x,x,; then
+           program_transform_name=
+       else
+           # Double any \ or $.  echo might interpret backslashes.
+           cat <<\EOF_SED > conftestsed
+ s,\\,\\\\,g; s,\$,$$,g
+ EOF_SED
+           program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+           rm -f conftestsed
+       fi
+       test "x$program_prefix" != xNONE &&
+           program_transform_name="s,^,${program_prefix},; $program_transform_name"
+       # Use a double $ so make ignores it.
+       test "x$program_suffix" != xNONE &&
+           program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+       # sed with no file args requires a program.
+       test "x$program_transform_name" = "" && program_transform_name="xs,x,x,"
+       # Remove empty command
+       cat <<\EOF_SED > conftestsed
+ s,\;\;,\;,g; s,\; \$,,g; s,\;$,,g
+ EOF_SED
+       program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+       rm -f conftestsed
+       ;;
+     n | no) USE_VERSION_SUFFIXES=no
+       ;;
+     *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-suffixes option." >&5
+ echo "$as_me: error: *** You must not supply an argument to --with-suffixes option." >&2;}
+    { (exit 1); exit 1; }; }
+       ;;
+     esac
+ # Check whether --with-gnutar-listdir was given.
+ if test "${with_gnutar_listdir+set}" = set; then
+   withval=$with_gnutar_listdir;
+             case "$withval" in
+                 n | no) GNUTAR_LISTDIR= ;;
+                 y | ye | yes) GNUTAR_LISTDIR='${localstatedir}/amanda/gnutar-lists' ;;
+                 *) GNUTAR_LISTDIR="$withval" ;;
+             esac
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_uint32_t=no
+             GNUTAR_LISTDIR='${localstatedir}/amanda/gnutar-lists'
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+     # substitute $prefix, etc. if necessary
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$GNUTAR_LISTDIR\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   GNUTAR_LISTED_INCREMENTAL_DIR="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define GNUTAR_LISTED_INCREMENTAL_DIR "$ac_define_dir"
+ _ACEOF
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+     # handle deprecated option
+ # Check whether --with-gnutar-listed-incremental was given.
+ if test "${with_gnutar_listed_incremental+set}" = set; then
+   withval=$with_gnutar_listed_incremental;
+             { { echo "$as_me:$LINENO: error: *** The gnutar-listed-incremental option is deprecated; use --with-gnutar-listdir instead" >&5
+ echo "$as_me: error: *** The gnutar-listed-incremental option is deprecated; use --with-gnutar-listdir instead" >&2;}
+    { (exit 1); exit 1; }; }
  fi
- 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
-   ac_cv_header_stdint_o=$i
+ # Check whether --with-tmpdir was given.
+ if test "${with_tmpdir+set}" = set; then
+   withval=$with_tmpdir;
+             tmpdir="$withval"
  else
-   continue
+             tmpdir=yes
  fi
  
-    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
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include<$i>
  
- int
- main ()
- {
- if ((uint64_t *) 0)
-   return 0;
- if (sizeof (uint64_t))
-   return 0;
-   ;
-   return 0;
- }
+     case "$tmpdir" in
+         n | no) { { echo "$as_me:$LINENO: error: *** --without-tmpdir is not allowed." >&5
+ echo "$as_me: error: *** --without-tmpdir is not allowed." >&2;}
+    { (exit 1); exit 1; }; };;
+         y |  ye | yes) AMANDA_TMPDIR="/tmp/amanda";;
+         *) AMANDA_TMPDIR="$tmpdir";;
+     esac
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$AMANDA_TMPDIR\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   AMANDA_TMPDIR="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define AMANDA_TMPDIR "$ac_define_dir"
  _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_uint64_t=yes
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+ # Check whether --with-force-uid was given.
+ if test "${with_force_uid+set}" = set; then
+   withval=$with_force_uid; CHECK_USERID="$withval"
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   : ${CHECK_USERID=yes}
  
- ac_cv_type_uint64_t=no
  fi
- rm -f 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
- if test $ac_cv_type_uint64_t = yes; then
-   and64="/uint64_t"
+     case "$CHECK_USERID" in
+         y | ye | yes)
+ cat >>confdefs.h <<\_ACEOF
+ #define CHECK_USERID 1
+ _ACEOF
+           ;;
+         n | no) :
+           ;;
+         *)
+             { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-force-uid option." >&5
+ echo "$as_me: error: *** You must not supply an argument to --with-force-uid option." >&2;}
+    { (exit 1); exit 1; }; }
+     esac
+ # Check whether --with-owner was given.
+ if test "${with_owner+set}" = set; then
+   withval=$with_owner;
+             case "$withval" in
+             "" | y | ye | yes | n | no)
+                 { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-owner option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-owner option." >&2;}
+    { (exit 1); exit 1; }; }
+               ;;
+             *) BINARY_OWNER="$withval"
+               ;;
+             esac
  else
-   and64=""
- fi
  
-       inttypes.h sys/inttypes.h stdint.h $inttype_headers
-  break
-    break;
-   done
-   echo "$as_me:$LINENO: checking for stdint uint32_t" >&5
- echo $ECHO_N "checking for stdint uint32_t... $ECHO_C" >&6
+             BINARY_OWNER="$CLIENT_LOGIN"
  
- fi
- echo "$as_me:$LINENO: result: $ac_cv_header_stdint_o" >&5
- echo "${ECHO_T}$ac_cv_header_stdint_o" >&6
  
  fi
  
- if test "_$ac_cv_header_stdint_x" = "_" ; then
- if test "_$ac_cv_header_stdint_o" = "_" ; then
  
- echo "$as_me:$LINENO: checking for stdint u_int32_t" >&5
- echo $ECHO_N "checking for stdint u_int32_t... $ECHO_C" >&6
- if test "${ac_cv_header_stdint_u+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+ cat >>confdefs.h <<_ACEOF
+ #define BINARY_OWNER "$BINARY_OWNER"
+ _ACEOF
  
-  ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
-   echo "$as_me:$LINENO: result: (..)" >&5
- echo "${ECHO_T}(..)" >&6
-   for i in    sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do
-    unset ac_cv_type_u_int32_t
-    unset ac_cv_type_u_int64_t
-    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
+ # Check whether --with-fqdn was given.
+ if test "${with_fqdn+set}" = set; then
+   withval=$with_fqdn;  USE_FQDN=$withval
  else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$i>
+    USE_FQDN=no
+ fi
  
- int
- main ()
- {
- if ((u_int32_t *) 0)
-   return 0;
- if (sizeof (u_int32_t))
-   return 0;
-   ;
-   return 0;
- }
+     case "$USE_FQDN" in
+     n | no) : ;;
+     y |  ye | yes)
+ cat >>confdefs.h <<\_ACEOF
+ #define USE_FQDN 1
  _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_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
- fi
- rm -f 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
- if test $ac_cv_type_u_int32_t = yes; then
-   ac_cv_header_stdint_u=$i
+       ;;
+     *) { { echo "$as_me:$LINENO: error: You must not supply an argument to --with-fqdn option." >&5
+ echo "$as_me: error: You must not supply an argument to --with-fqdn option." >&2;}
+    { (exit 1); exit 1; }; }
+       ;;
+     esac
+ # Check whether --with-reuseports was given.
+ if test "${with_reuseports+set}" = set; then
+   withval=$with_reuseports;  case "$withval" in
+           y | ye | yes) USE_REUSEADDR=no;;
+           n | no) USE_REUSEADDR=yes;;
+           *) { { echo "$as_me:$LINENO: error: You must not supply an argument to --without-reuseports" >&5
+ echo "$as_me: error: You must not supply an argument to --without-reuseports" >&2;}
+    { (exit 1); exit 1; }; };;
+         esac
  else
-   continue
+    USE_REUSEADDR=yes;
  fi
  
-    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
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include<$i>
+     if test x"$USE_REUSEADDR" = x"yes"; then
  
- int
- main ()
- {
- if ((u_int64_t *) 0)
-   return 0;
- if (sizeof (u_int64_t))
-   return 0;
-   ;
-   return 0;
- }
+ cat >>confdefs.h <<\_ACEOF
+ #define USE_REUSEADDR 1
  _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_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
- fi
- rm -f 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
- if test $ac_cv_type_u_int64_t = yes; then
-   and64="/u_int64_t"
+     fi
+ # Check whether --with-low-tcpportrange was given.
+ if test "${with_low_tcpportrange+set}" = set; then
+   withval=$with_low_tcpportrange;  LOW_TCPPORTRANGE="$withval"
  else
-   and64=""
+    LOW_TCPPORTRANGE=unlimited
  fi
  
-       sys/types.h inttypes.h sys/inttypes.h $inttype_headers
-  break
-    break;
-   done
-   echo "$as_me:$LINENO: checking for stdint u_int32_t" >&5
- echo $ECHO_N "checking for stdint u_int32_t... $ECHO_C" >&6
  
- fi
- echo "$as_me:$LINENO: result: $ac_cv_header_stdint_u" >&5
- echo "${ECHO_T}$ac_cv_header_stdint_u" >&6
+     if test x"$LOW_TCPPORTRANGE" != x"unlimited"; then
+       if test x`echo "$LOW_TCPPORTRANGE" | sed 's/[0-9][0-9]*,[0-9][0-9]*//'` != x""; then
+           { { echo "$as_me:$LINENO: error: --with-low-tcpportrange requires two comma-separated positive numbers" >&5
+ echo "$as_me: error: --with-low-tcpportrange requires two comma-separated positive numbers" >&2;}
+    { (exit 1); exit 1; }; }
+       fi
+       min_low_tcp_port=`echo "$LOW_TCPPORTRANGE" | sed 's/,.*//'`
+       max_low_tcp_port=`echo "$LOW_TCPPORTRANGE" | sed 's/.*,//'`
+       if test $min_low_tcp_port -gt $max_low_tcp_port; then
+           { { echo "$as_me:$LINENO: error: the second TCP port number must be greater than the first in --with-low-tcpportrange" >&5
+ echo "$as_me: error: the second TCP port number must be greater than the first in --with-low-tcpportrange" >&2;}
+    { (exit 1); exit 1; }; }
+       fi
+       if test $min_low_tcp_port -lt 512; then
  
- fi fi
+     { echo "$as_me:$LINENO: WARNING: the low TCP port range should be 512 or greater in --with-low-tcpportrange" >&5
+ echo "$as_me: WARNING: the low TCP port range should be 512 or greater in --with-low-tcpportrange" >&2;}
  
- if test "_$ac_cv_header_stdint_x" = "_" ; then
-    echo "$as_me:$LINENO: checking for stdint datatype model" >&5
- echo $ECHO_N "checking for stdint datatype model... $ECHO_C" >&6
-    echo "$as_me:$LINENO: result: (..)" >&5
- echo "${ECHO_T}(..)" >&6
  
-    echo "$as_me:$LINENO: checking for char" >&5
- echo $ECHO_N "checking for char... $ECHO_C" >&6
- if test "${ac_cv_type_char+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 ((char *) 0)
-   return 0;
- if (sizeof (char))
-   return 0;
-   ;
-   return 0;
- }
+     cat <<AAW_EOF >>config.warnings
+ the low TCP port range should be 512 or greater in --with-low-tcpportrange
+ AAW_EOF
+       fi
+       if test $max_low_tcp_port -ge 1024; then
+     { echo "$as_me:$LINENO: WARNING: the low TCP port range should be less than 1024 in --with-low-tcpportrange" >&5
+ echo "$as_me: WARNING: the low TCP port range should be less than 1024 in --with-low-tcpportrange" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ the low TCP port range should be less than 1024 in --with-low-tcpportrange
+ AAW_EOF
+       fi
+ cat >>confdefs.h <<_ACEOF
+ #define LOW_TCPPORTRANGE $LOW_TCPPORTRANGE
  _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_char=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_char=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
- echo "${ECHO_T}$ac_cv_type_char" >&6
+     fi
  
- echo "$as_me:$LINENO: checking size of char" >&5
- echo $ECHO_N "checking size of char... $ECHO_C" >&6
- if test "${ac_cv_sizeof_char+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ # Check whether --with-tcpportrange was given.
+ if test "${with_tcpportrange+set}" = set; then
+   withval=$with_tcpportrange;  TCPPORTRANGE="$withval"
  else
-   if test "$ac_cv_type_char" = 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 (char))) >= 0)];
- test_array [0] = 0
+    TCPPORTRANGE="unlimited"
+ fi
  
-   ;
-   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 (char))) <= $ac_mid)];
- test_array [0] = 0
  
-   ;
-   return 0;
- }
+     if test x"$TCPPORTRANGE" != x"unlimited"; then
+       if test x`echo "$TCPPORTRANGE" | sed 's/[0-9][0-9]*,[0-9][0-9]*//'` != x""; then
+           { { echo "$as_me:$LINENO: error: --with-tcpportrange requires two comma-separated positive numbers" >&5
+ echo "$as_me: error: --with-tcpportrange requires two comma-separated positive numbers" >&2;}
+    { (exit 1); exit 1; }; }
+       fi
+       min_tcp_port=`echo "$TCPPORTRANGE" | sed 's/,.*//'`
+       max_tcp_port=`echo "$TCPPORTRANGE" | sed 's/.*,//'`
+       if test $min_tcp_port -gt $max_tcp_port; then
+           { { echo "$as_me:$LINENO: error: the second TCP port number must be greater than the first in --with-tcpportrange" >&5
+ echo "$as_me: error: the second TCP port number must be greater than the first in --with-tcpportrange" >&2;}
+    { (exit 1); exit 1; }; }
+       fi
+       if test $min_tcp_port -lt 1024; then
+     { echo "$as_me:$LINENO: WARNING: the TCP port range should be 1024 or greater in --with-tcpportrange" >&5
+ echo "$as_me: WARNING: the TCP port range should be 1024 or greater in --with-tcpportrange" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ the TCP port range should be 1024 or greater in --with-tcpportrange
+ AAW_EOF
+       fi
+       if test $max_tcp_port -ge 65536; then
+     { echo "$as_me:$LINENO: WARNING: the TCP port range should be less than 65536 in --with-tcpportrange" >&5
+ echo "$as_me: WARNING: the TCP port range should be less than 65536 in --with-tcpportrange" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ the TCP port range should be less than 65536 in --with-tcpportrange
+ AAW_EOF
+       fi
+ cat >>confdefs.h <<_ACEOF
+ #define TCPPORTRANGE $TCPPORTRANGE
  _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
+     fi
+ # Check whether --with-udpportrange was given.
+ if test "${with_udpportrange+set}" = set; then
+   withval=$with_udpportrange;  UDPPORTRANGE="$withval"
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+    UDPPORTRANGE="unlimited"
+ fi
  
- 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 (char))) < 0)];
- test_array [0] = 0
+     if test x"$UDPPORTRANGE" != x"unlimited"; then
+       if test x`echo "$UDPPORTRANGE" | sed 's/[0-9][0-9]*,[0-9][0-9]*//'` != x""; then
+           { { echo "$as_me:$LINENO: error: --with-udpportrange requires two comma-separated positive numbers" >&5
+ echo "$as_me: error: --with-udpportrange requires two comma-separated positive numbers" >&2;}
+    { (exit 1); exit 1; }; }
+       fi
+       min_udp_port=`echo "$UDPPORTRANGE" | sed 's/,.*//'`
+       max_udp_port=`echo "$UDPPORTRANGE" | sed 's/.*,//'`
+       if test $min_udp_port -gt $max_udp_port; then
+           { { echo "$as_me:$LINENO: error: the second UDP port number must be greater than the first in --with-udpportrange" >&5
+ echo "$as_me: error: the second UDP port number must be greater than the first in --with-udpportrange" >&2;}
+    { (exit 1); exit 1; }; }
+       fi
+       if test $max_udp_port -ge 1024; then
  
-   ;
-   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 (char))) >= $ac_mid)];
- test_array [0] = 0
+     { echo "$as_me:$LINENO: WARNING: the UDP port range should be less than 1025 in --with-udpportrange" >&5
+ echo "$as_me: WARNING: the UDP port range should be less than 1025 in --with-udpportrange" >&2;}
  
-   ;
-   return 0;
- }
+     cat <<AAW_EOF >>config.warnings
+ the UDP port range should be less than 1025 in --with-udpportrange
+ AAW_EOF
+       fi
+       if test $min_udp_port -le 0; then
+     { echo "$as_me:$LINENO: WARNING: the UDP port range should be greater than 0 in --with-udpportrange" >&5
+ echo "$as_me: WARNING: the UDP port range should be greater than 0 in --with-udpportrange" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ the UDP port range should be greater than 0 in --with-udpportrange
+ AAW_EOF
+       fi
+ cat >>confdefs.h <<_ACEOF
+ #define UDPPORTRANGE $UDPPORTRANGE
  _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
+     fi
  
- ac_lo= ac_hi=
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ # Check whether --with-buffered-dump was given.
+ if test "${with_buffered_dump+set}" = set; then
+   withval=$with_buffered_dump;  DUMPER_SOCKET_BUFFERING=$withval
+ else
+    DUMPER_SOCKET_BUFFERING=no
  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 (char))) <= $ac_mid)];
- test_array [0] = 0
  
-   ;
-   return 0;
- }
+     case "$DUMPER_SOCKET_BUFFERING" in
+     n | no) ;;
+     y | ye | yes)
+ cat >>confdefs.h <<\_ACEOF
+ #define DUMPER_SOCKET_BUFFERING 1
  _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_char=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (char), 77
- See \`config.log' for more details." >&2;}
+       ;;
+     *) { { echo "$as_me:$LINENO: error: You must not supply an argument to --with-buffered-dump." >&5
+ echo "$as_me: error: You must not supply an argument to --with-buffered-dump." >&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; }; }
+     esac
+ # Check whether --with-maxtapeblocksize was given.
+ if test "${with_maxtapeblocksize+set}" = set; then
+   withval=$with_maxtapeblocksize;  MAXTAPEBLOCKSIZE="$withval"
  else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
+    MAXTAPEBLOCKSIZE=32
+ fi
+ cat >>confdefs.h <<_ACEOF
+ #define MAX_TAPE_BLOCK_KB ($MAXTAPEBLOCKSIZE)
  _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- $ac_includes_default
- long longval () { return (long) (sizeof (char)); }
- unsigned long ulongval () { return (long) (sizeof (char)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (char))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (char))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (char))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
  
-   ;
-   return 0;
- }
+ # Check whether --with-assertions was given.
+ if test "${with_assertions+set}" = set; then
+   withval=$with_assertions;
+             case "$withval" in
+                 n | no) : ;;
+                 y |  ye | yes)
+ cat >>confdefs.h <<\_ACEOF
+ #define ASSERTIONS 1
  _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_char=`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 (char), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (char), 77
- See \`config.log' for more details." >&2;}
+                   ;;
+                 *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-assertions option." >&5
+ echo "$as_me: error: *** You must not supply an argument to --with-assertions option." >&2;}
     { (exit 1); exit 1; }; }
+                   ;;
+             esac
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- rm -f conftest.val
+ # Check whether --with-debugging was given.
+ if test "${with_debugging+set}" = set; then
+   withval=$with_debugging;  debugging="$withval"
  else
-   ac_cv_sizeof_char=0
- fi
+    debugging="yes"
  fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
- echo "${ECHO_T}$ac_cv_sizeof_char" >&6
+     case "$debugging" in
+         n | no) { { echo "$as_me:$LINENO: error: Amanda no longer supports building with debugging disabled" >&5
+ echo "$as_me: error: Amanda no longer supports building with debugging disabled" >&2;}
+    { (exit 1); exit 1; }; };;
+         y | ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR";;
+         *) AMANDA_DBGDIR="$debugging";;
+     esac
+     # evaluate any extra variables in the directory
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$AMANDA_DBGDIR\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   AMANDA_DBGDIR="$ac_define_dir"
  cat >>confdefs.h <<_ACEOF
- #define SIZEOF_CHAR $ac_cv_sizeof_char
+ #define AMANDA_DBGDIR "$ac_define_dir"
  _ACEOF
  
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+ # Check whether --with-debug_days was given.
+ if test "${with_debug_days+set}" = set; then
+   withval=$with_debug_days;
+             debug_days="$withval"
  
-    echo "$as_me:$LINENO: checking for short" >&5
- echo $ECHO_N "checking for short... $ECHO_C" >&6
- if test "${ac_cv_type_short+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 ((short *) 0)
-   return 0;
- if (sizeof (short))
-   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_short=yes
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_short=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+             debug_days="yes"
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
- echo "${ECHO_T}$ac_cv_type_short" >&6
  
- echo "$as_me:$LINENO: checking size of short" >&5
- echo $ECHO_N "checking size of short... $ECHO_C" >&6
- if test "${ac_cv_sizeof_short+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test "$ac_cv_type_short" = 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 (short))) >= 0)];
- test_array [0] = 0
+     case "$debug_days" in
+         n | no)
+             AMANDA_DEBUG_DAYS=0 ;;
+         y |  ye | yes)
+             AMANDA_DEBUG_DAYS=4 ;;
+         [0-9] | [0-9][0-9] | [0-9][0-9][0-9])
+             AMANDA_DEBUG_DAYS="$debug_days" ;;
+         *) { { echo "$as_me:$LINENO: error: *** --with-debug-days value not numeric or out of range." >&5
+ echo "$as_me: error: *** --with-debug-days value not numeric or out of range." >&2;}
+    { (exit 1); exit 1; }; }
+           ;;
+     esac
  
-   ;
-   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.  */
+ cat >>confdefs.h <<_ACEOF
+ #define AMANDA_DEBUG_DAYS $AMANDA_DEBUG_DAYS
  _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 (short))) <= $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
+ # Check whether --with-testing was given.
+ if test "${with_testing+set}" = set; then
+   withval=$with_testing;
+             TESTING="$withval"
  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`
+             TESTING="no"
  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.  */
+     case "$TESTING" in
+         n | no) SERVICE_SUFFIX="";;
+         y |  ye | yes) SERVICE_SUFFIX="-test";;
+         *) SERVICE_SUFFIX="-$TESTING";;
+     esac
+     AMANDA_SERVICE_NAME="amanda$SERVICE_SUFFIX"
+     KAMANDA_SERVICE_NAME="kamanda$SERVICE_SUFFIX"
+ cat >>confdefs.h <<_ACEOF
+ #define SERVICE_SUFFIX "$SERVICE_SUFFIX"
  _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 (short))) < 0)];
- test_array [0] = 0
  
-   ;
-   return 0;
- }
+ cat >>confdefs.h <<_ACEOF
+ #define AMANDA_SERVICE_NAME "$AMANDA_SERVICE_NAME"
  _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.  */
+ cat >>confdefs.h <<_ACEOF
+ #define KAMANDA_SERVICE_NAME "$KAMANDA_SERVICE_NAME"
  _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 (short))) >= $ac_mid)];
- test_array [0] = 0
  
-   ;
-   return 0;
- }
+     SINGLE_USERID=${SINGLE_USERID:-no}
+     WANT_SETUID_CLIENT=${WANT_SETUID_CLIENT:-true}
+ # Check whether --with-single-userid was given.
+ if test "${with_single_userid+set}" = set; then
+   withval=$with_single_userid;    SINGLE_USERID=$withval
+ fi
+     case "$target" in
+         *-pc-cygwin)
+             WANT_SETUID_CLIENT=false
+           SINGLE_USERID=yes
+             ;;
+     esac
+     if test x"$WANT_SETUID_CLIENT" = x"true"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_SETUID_CLIENT 1
  _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
+     fi
+      if test x"$WANT_SETUID_CLIENT" = x"true"; then
+   WANT_SETUID_CLIENT_TRUE=
+   WANT_SETUID_CLIENT_FALSE='#'
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   WANT_SETUID_CLIENT_TRUE='#'
+   WANT_SETUID_CLIENT_FALSE=
+ fi
+     if test x"$SINGLE_USERID" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define SINGLE_USERID 1
+ _ACEOF
+     fi
+     WANT_INSTALLPERMS=yes
+     # Check whether --enable-installperms was given.
+ if test "${enable_installperms+set}" = set; then
+   enableval=$enable_installperms;  WANT_INSTALLPERMS="$enableval"
+ else
+    WANT_INSTALLPERMS="yes"
  
- 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
+      if test x"$WANT_INSTALLPERMS" = x"yes"; then
+   WANT_INSTALLPERMS_TRUE=
+   WANT_INSTALLPERMS_FALSE='#'
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   WANT_INSTALLPERMS_TRUE='#'
+   WANT_INSTALLPERMS_FALSE=
+ fi
+ #
+ # Set up for Amanda components and modules
+ #
+     WANT_SERVER=true
+ # Check whether --with-server was given.
+ if test "${with_server+set}" = set; then
+   withval=$with_server;
+           case "$withval" in
+           y | ye | yes) WANT_SERVER=true;;
+           n | no) WANT_SERVER=false;;
+           *) { { echo "$as_me:$LINENO: error: You must not supply an argument to the --without-server option." >&5
+ echo "$as_me: error: You must not supply an argument to the --without-server option." >&2;}
+    { (exit 1); exit 1; }; } ;;
+           esac
  
- ac_lo= ac_hi=
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+     WANT_CLIENT=true
+ # Check whether --with-client was given.
+ if test "${with_client+set}" = set; then
+   withval=$with_client;
+           case "$withval" in
+           y | ye | yes) WANT_CLIENT=true;;
+           n | no) WANT_CLIENT=false;;
+           *) { { echo "$as_me:$LINENO: error: You must not supply an argument to the --without-client option." >&5
+ echo "$as_me: error: You must not supply an argument to the --without-client option." >&2;}
+    { (exit 1); exit 1; }; } ;;
+           esac
  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 (short))) <= $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`
+     WANT_RESTORE=${WANT_SERVER-true}
+ # Check whether --with-restore was given.
+ if test "${with_restore+set}" = set; then
+   withval=$with_restore;
+           case "$withval" in
+           y | ye | yes) WANT_RESTORE=true;;
+           n | no) WANT_RESTORE=false;;
+           *) { { echo "$as_me:$LINENO: error: You must not supply an argument to --with-restore option." >&5
+ echo "$as_me: error: You must not supply an argument to --with-restore option." >&2;}
+    { (exit 1); exit 1; }; } ;;
+           esac
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- case $ac_lo in
- ?*) ac_cv_sizeof_short=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (short), 77
- See \`config.log' for more details." >&2;}
+     WANT_RECOVER=${WANT_CLIENT-true}
+ # Check whether --with-amrecover was given.
+ if test "${with_amrecover+set}" = set; then
+   withval=$with_amrecover;
+           case "$withval" in
+           y | ye | yes) WANT_RECOVER=false;;
+           n | no) WANT_RECOVER=false;;
+           *) { { echo "$as_me:$LINENO: error: You must not supply an argument to --with-amrecover option." >&5
+ echo "$as_me: error: You must not supply an argument to --with-amrecover option." >&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;}
+           esac
+ fi
+ # Check whether --with-client-only was given.
+ if test "${with_client_only+set}" = set; then
+   withval=$with_client_only;    { { echo "$as_me:$LINENO: error: --with-client-only is deprecated, use --without-server instead." >&5
+ echo "$as_me: error: --with-client-only is deprecated, use --without-server instead." >&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 (short)); }
- unsigned long ulongval () { return (long) (sizeof (short)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (short))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (short))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (short))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
+ fi
  
-   ;
-   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_short=`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 (short), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (short), 77
- See \`config.log' for more details." >&2;}
+ # Check whether --with-server-only was given.
+ if test "${with_server_only+set}" = set; then
+   withval=$with_server_only;    { { echo "$as_me:$LINENO: error: --with-server-only is deprecated, use --without-client instead." >&5
+ echo "$as_me: error: --with-server-only is deprecated, use --without-client instead." >&2;}
     { (exit 1); exit 1; }; }
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+     # detect invalid combinations of components
+     if ! ${WANT_SERVER-true} && ${WANT_RESTORE-true}; then
+         { { echo "$as_me:$LINENO: error: --without-server requires --without-restore" >&5
+ echo "$as_me: error: --without-server requires --without-restore" >&2;}
+    { (exit 1); exit 1; }; }
+     fi
+     if ! ${WANT_CLIENT-true} && ${WANT_RECOVER-true}; then
+         { { echo "$as_me:$LINENO: error: --without-client requires --without-amrecover" >&5
+ echo "$as_me: error: --without-client requires --without-amrecover" >&2;}
+    { (exit 1); exit 1; }; }
+     fi
+      if $WANT_CLIENT; then
+   WANT_CLIENT_TRUE=
+   WANT_CLIENT_FALSE='#'
+ else
+   WANT_CLIENT_TRUE='#'
+   WANT_CLIENT_FALSE=
  fi
+      if $WANT_RESTORE; then
+   WANT_RESTORE_TRUE=
+   WANT_RESTORE_FALSE='#'
+ else
+   WANT_RESTORE_TRUE='#'
+   WANT_RESTORE_FALSE=
  fi
- rm -f conftest.val
+      if $WANT_SERVER; then
+   WANT_SERVER_TRUE=
+   WANT_SERVER_FALSE='#'
  else
-   ac_cv_sizeof_short=0
+   WANT_SERVER_TRUE='#'
+   WANT_SERVER_FALSE=
  fi
+      if $WANT_RECOVER; then
+   WANT_RECOVER_TRUE=
+   WANT_RECOVER_FALSE='#'
+ else
+   WANT_RECOVER_TRUE='#'
+   WANT_RECOVER_FALSE=
  fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
- echo "${ECHO_T}$ac_cv_sizeof_short" >&6
- cat >>confdefs.h <<_ACEOF
- #define SIZEOF_SHORT $ac_cv_sizeof_short
- _ACEOF
  
  
-    echo "$as_me:$LINENO: checking for int" >&5
- echo $ECHO_N "checking for int... $ECHO_C" >&6
- if test "${ac_cv_type_int+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 ((int *) 0)
-   return 0;
- if (sizeof (int))
-   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_int=yes
+      if $WANT_SERVER || $WANT_RESTORE; then
+   WANT_TAPE_TRUE=
+   WANT_TAPE_FALSE='#'
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_int=no
+   WANT_TAPE_TRUE='#'
+   WANT_TAPE_FALSE=
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+     SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/opt/SUNWspro/bin:/usr/ucb:/usr/sfw/bin:/usr/bsd:/etc:/usr/etc"
+     # expand prefix or exec_prefix in LOCPATH
+     LOCPATH=`(
+       test "x$prefix" = xNONE && prefix=$ac_default_prefix
+       test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
+       eval echo "$libexecdir:$PATH:/usr/local/sbin:/usr/local/bin:/usr/ccs/bin"
+     )`
+     SYSLOCPATH="$SYSPATH:$LOCPATH"
+     LOCSYSPATH="$LOCPATH:$SYSPATH"
+ # Check whether --with-gnuplot was given.
+ if test "${with_gnuplot+set}" = set; then
+   withval=$with_gnuplot;
+           case "$withval" in
+               y | ye | yes) : ;;
+               n | no) GNUPLOT=no ;;
+               *) GNUPLOT="$withval" ;;
+           esac
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
- echo "${ECHO_T}$ac_cv_type_int" >&6
  
- echo "$as_me:$LINENO: checking size of int" >&5
- echo $ECHO_N "checking size of int... $ECHO_C" >&6
- if test "${ac_cv_sizeof_int+set}" = set; then
+     if test "x$GNUPLOT" = "xno"; then
+       GNUPLOT=
+     else
+       # Extract the first word of "gnuplot", so it can be a program name with args.
+ set dummy gnuplot; 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_GNUPLOT+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test "$ac_cv_type_int" = 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 (int))) >= 0)];
- test_array [0] = 0
+   case $GNUPLOT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_GNUPLOT="$GNUPLOT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GNUPLOT="$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
  
-   ;
-   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 (int))) <= $ac_mid)];
- test_array [0] = 0
+   ;;
+ esac
+ fi
+ GNUPLOT=$ac_cv_path_GNUPLOT
+ if test -n "$GNUPLOT"; then
+   { echo "$as_me:$LINENO: result: $GNUPLOT" >&5
+ echo "${ECHO_T}$GNUPLOT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
-   ;
-   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
+     fi
+     # Extract the first word of "pcat", so it can be a program name with args.
+ set dummy pcat; 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_PCAT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   case $PCAT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_PCAT="$PCAT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PCAT="$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
  
- 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`
+   ;;
+ esac
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   done
+ PCAT=$ac_cv_path_PCAT
+ if test -n "$PCAT"; then
+   { echo "$as_me:$LINENO: result: $PCAT" >&5
+ echo "${ECHO_T}$PCAT" >&6; }
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
- 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 (int))) < 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 (int))) >= $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
+     # Extract the first word of "compress", so it can be a program name with args.
+ set dummy compress; 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_COMPRESS+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   case $COMPRESS in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_COMPRESS="$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
  
- ac_lo= ac_hi=
+   ;;
+ esac
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ COMPRESS=$ac_cv_path_COMPRESS
+ if test -n "$COMPRESS"; then
+   { echo "$as_me:$LINENO: result: $COMPRESS" >&5
+ echo "${ECHO_T}$COMPRESS" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  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 (int))) <= $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
+     # Extract the first word of "gzip", so it can be a program name with args.
+ set dummy gzip; 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_GZIP+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $GZIP in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
  done
- case $ac_lo in
- ?*) ac_cv_sizeof_int=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (int), 77
- See \`config.log' for more details." >&2;}
-    { (exit 1); exit 1; }; } ;;
+ done
+ IFS=$as_save_IFS
+   ;;
  esac
+ fi
+ GZIP=$ac_cv_path_GZIP
+ if test -n "$GZIP"; then
+   { echo "$as_me:$LINENO: result: $GZIP" >&5
+ echo "${ECHO_T}$GZIP" >&6; }
  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 (int)); }
- unsigned long ulongval () { return (long) (sizeof (int)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (int))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (int))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (int))))
-       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_int=`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 (int), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (int), 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
+     if test "x$GNUPLOT" != "x"; then
+       WANT_AMPLOT=true
+       # variable substitutions for amcat.awk
+       if test "$PCAT"; then
+           AMPLOT_CAT_PACK="if(o==\"z\")print \"$PCAT\"; else"
+       else
+           AMPLOT_CAT_PACK=
+       fi
+       if test "$COMPRESS"; then
+           AMPLOT_COMPRESS=$COMPRESS
+           AMPLOT_CAT_COMPRESS="if(o==\"Z\")print \"$COMPRESS -dc\"; else"
+       else
+           AMPLOT_CAT_COMPRESS=
+       fi
+       if test "$GZIP"; then
+           AMPLOT_COMPRESS=$GZIP
+           AMPLOT_CAT_GZIP="if(o==\"gz\")print \"$GZIP -dc\"; else"
+       else
+           AMPLOT_CAT_GZIP=
+       fi
+     else
+       WANT_AMPLOT=false
+     { echo "$as_me:$LINENO: WARNING: Not building 'amplot', because gnuplot was not found" >&5
+ echo "$as_me: WARNING: Not building 'amplot', because gnuplot was not found" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ Not building 'amplot', because gnuplot was not found
+ AAW_EOF
+     fi
+      if test x"$WANT_AMPLOT" = x"true"; then
+   WANT_AMPLOT_TRUE=
+   WANT_AMPLOT_FALSE='#'
+ else
+   WANT_AMPLOT_TRUE='#'
+   WANT_AMPLOT_FALSE=
  fi
+     # Check whether --enable-manpage-build was given.
+ if test "${enable_manpage_build+set}" = set; then
+   enableval=$enable_manpage_build;  ENABLE_MANPAGE_BUILD=$enableval
+ else
+    ENABLE_MANPAGE_BUILD=no
  fi
- rm -f conftest.val
+     # and ensure that everything docbook-related is OK if we'll be using it
+     if test "x$ENABLE_MANPAGE_BUILD" = "xyes"; then
+       DOC_BUILD_DATE=`date '+%d-%m-%Y'`
+ XSLTPROC_FLAGS="--nonet"
+ # The (lack of) whitespace and overquoting here are all necessary for
+ # proper formatting.
+ # Check whether --with-xsltproc was given.
+ if test "${with_xsltproc+set}" = set; then
+   withval=$with_xsltproc;  ac_with_xsltproc=$withval;
  else
-   ac_cv_sizeof_int=0
+    ac_with_xsltproc=maybe;
  fi
+ # Check whether --with-xsltproc-flags was given.
+ if test "${with_xsltproc_flags+set}" = set; then
+   withval=$with_xsltproc_flags;  if test "x$withval" == "xno"; then
+       XSLTPROC_FLAGS=''
+     else
+       if test "x$withval" != "xyes"; then
+           XSLTPROC_FLAGS="$withval"
+       fi
+     fi
  fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
- echo "${ECHO_T}$ac_cv_sizeof_int" >&6
- cat >>confdefs.h <<_ACEOF
- #define SIZEOF_INT $ac_cv_sizeof_int
- _ACEOF
  
  
-    echo "$as_me:$LINENO: checking for long" >&5
- echo $ECHO_N "checking for long... $ECHO_C" >&6
- if test "${ac_cv_type_long+set}" = set; then
+ # search for xsltproc if it wasn't specified
+ if test "$ac_with_xsltproc" = "yes" -o "$ac_with_xsltproc" = "maybe"; then
+     for ac_prog in xsltproc
+ 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_path_XSLTPROC+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 ((long *) 0)
-   return 0;
- if (sizeof (long))
-   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_long=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   case $XSLTPROC in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_XSLTPROC="$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
  
- ac_cv_type_long=no
+   ;;
+ esac
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ XSLTPROC=$ac_cv_path_XSLTPROC
+ if test -n "$XSLTPROC"; then
+   { echo "$as_me:$LINENO: result: $XSLTPROC" >&5
+ echo "${ECHO_T}$XSLTPROC" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
- echo "${ECHO_T}$ac_cv_type_long" >&6
  
- echo "$as_me:$LINENO: checking size of long" >&5
- echo $ECHO_N "checking size of long... $ECHO_C" >&6
- if test "${ac_cv_sizeof_long+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+   test -n "$XSLTPROC" && break
+ done
  else
-   if test "$ac_cv_type_long" = 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 (long))) >= 0)];
- test_array [0] = 0
+     if test "$ac_with_xsltproc" != "no"; then
+         if test -x "$ac_with_xsltproc"; then
+             XSLTPROC="$ac_with_xsltproc";
+         else
  
-   ;
-   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 (long))) <= $ac_mid)];
- test_array [0] = 0
+     { echo "$as_me:$LINENO: WARNING: Specified xsltproc of $ac_with_xsltproc isn't executable; searching for an alternative." >&5
+ echo "$as_me: WARNING: Specified xsltproc of $ac_with_xsltproc isn't executable; searching for an alternative." >&2;}
  
-   ;
-   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
+     cat <<AAW_EOF >>config.warnings
+ Specified xsltproc of $ac_with_xsltproc isn't executable; searching for an alternative.
+ AAW_EOF
+             for ac_prog in xsltproc
+ 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_path_XSLTPROC+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   case $XSLTPROC in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_XSLTPROC="$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
  
- 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`
+   ;;
+ esac
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   done
+ XSLTPROC=$ac_cv_path_XSLTPROC
+ if test -n "$XSLTPROC"; then
+   { echo "$as_me:$LINENO: result: $XSLTPROC" >&5
+ echo "${ECHO_T}$XSLTPROC" >&6; }
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
- 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 (long))) < 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 (long))) >= $ac_mid)];
- test_array [0] = 0
+   test -n "$XSLTPROC" && break
+ done
  
-   ;
-   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
+         fi
+     fi
+ fi
+     { echo "$as_me:$LINENO: checking for Docbook XSLT version 1.72.0" >&5
+ echo $ECHO_N "checking for Docbook XSLT version 1.72.0... $ECHO_C" >&6; }
+ if test "${ac_cv_docbook_xslt_1_72_0+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  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`
+       ac_cv_docbook_xslt_1_72_0=no
+       if test -n "$XSLTPROC"; then
+           echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/1.72.0/xhtml/docbook.xsl'" >&5
+           $XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/1.72.0/xhtml/docbook.xsl >&5 2>&5
+           if test "$?" = 0; then
+               ac_cv_docbook_xslt_1_72_0=yes
+           fi
+       fi
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   done
+ { echo "$as_me:$LINENO: result: $ac_cv_docbook_xslt_1_72_0" >&5
+ echo "${ECHO_T}$ac_cv_docbook_xslt_1_72_0" >&6; }
+     HAVE_DOCBOOK_XSLT_1_72_0="$ac_cv_docbook_xslt_1_72_0"
+     HAVE_DOCBOOK_XSLT="$HAVE_DOCBOOK_XSLT_1_72_0"
+     { echo "$as_me:$LINENO: checking for current Docbook XSLT version" >&5
+ echo $ECHO_N "checking for current Docbook XSLT version... $ECHO_C" >&6; }
+ if test "${ac_cv_docbook_xslt_current_version+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_lo= ac_hi=
+       ac_cv_docbook_xslt_current_version=no
+       if test -n "$XSLTPROC"; then
+           cat >conftest.xsl <<EOF
+               <xsl:stylesheet
+                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                   xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
+                   version="1.0">
+                   <xsl:output method="text"/>
+                   <xsl:template match="fm:project/fm:Version">
+                       <xsl:value-of select="." />
+                   </xsl:template>
+                   <!-- do nothing with any other text -->
+                   <xsl:template match="text()"/>
+               </xsl:stylesheet>
+ EOF
+           echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/current/VERSION' with input:" >&5
+           echo "====" >&5
+           cat conftest.xsl >&5
+           echo "====" >&5
+           ac_cv_docbook_xslt_current_version=`$XSLTPROC $XSLTPROC_FLAGS conftest.xsl http://docbook.sourceforge.net/release/xsl/current/VERSION 2>&5`
+           if test "$?" != 0; then
+               ac_cv_docbook_xslt_current_version='no'
+           fi
+           rm conftest.xsl
+       fi
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ac_cv_docbook_xslt_current_version" >&5
+ echo "${ECHO_T}$ac_cv_docbook_xslt_current_version" >&6; }
+     DOCBOOK_XSLT_CURRENT_VERSION="$ac_cv_docbook_xslt_current_version"
+     { echo "$as_me:$LINENO: checking whether Docbook XSLT version is 1.72.0 or newer" >&5
+ echo $ECHO_N "checking whether Docbook XSLT version is 1.72.0 or newer... $ECHO_C" >&6; }
+     if test x"$DOCBOOK_XSLT_CURRENT_VERSION" = x"no"; then
+       { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+     else
+   # Used to indicate true or false condition
+   ax_compare_version=false
+   # Convert the two version strings to be compared into a format that
+   # allows a simple string comparison.  The end result is that a version
+   # string of the form 1.12.5-r617 will be converted to the form
+   # 0001001200050617.  In other words, each number is zero padded to four
+   # digits, and non digits are removed.
+   ax_compare_version_A=`echo "$DOCBOOK_XSLT_CURRENT_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                      -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                      -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                      -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                      -e 's/[^0-9]//g'`
+   ax_compare_version_B=`echo "1.72.0" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                      -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                      -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                      -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                      -e 's/[^0-9]//g'`
+     ax_compare_version=`echo "x$ax_compare_version_A
+ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"`
+     if test "$ax_compare_version" = "true" ; then
+           # version is less than required, so mark it as "no"
+           DOCBOOK_XSLT_CURRENT_VERSION=no
+       fi
+       if test x"$DOCBOOK_XSLT_CURRENT_VERSION" = x"no"; then
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       else
+           { echo "$as_me:$LINENO: result: yes ($DOCBOOK_XSLT_CURRENT_VERSION)" >&5
+ echo "${ECHO_T}yes ($DOCBOOK_XSLT_CURRENT_VERSION)" >&6; }
+       fi
+     fi
+     { echo "$as_me:$LINENO: checking for Docbook DTD version 4.1.2" >&5
+ echo $ECHO_N "checking for Docbook DTD version 4.1.2... $ECHO_C" >&6; }
+ if test "${ac_cv_docbook_dtd_4_1_2+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+       ac_cv_docbook_dtd_4_1_2=no
+       if test -n "$XSLTPROC"; then
+           MY_XSLTPROC_FLAGS=`echo "" $XSLTPROC_FLAGS|sed -e s/--novalid//g`
+           cat <<EOF >conftest.xml
+ <?xml version="1.0" encoding='ISO-8859-1'?>
+ <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+ <book id="empty">
+ </book>
+ EOF
+           echo "Trying '$XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml'" >&5
+           echo "conftest.xml:" >&5
+           echo "====" >&5
+           cat conftest.xml >&5
+           echo "====" >&5
+           $XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml >conftest.out 2>&1
+           if test "$?" = 0 -o "$?" = 5; then
+               # failing to load the DTD is just a warning, so check for it in the output.
+               if grep 'warning: failed to load external entity' conftest.out >/dev/null 2>&1; then
+                   : # no good..
+               else
+                   ac_cv_docbook_dtd_4_1_2=yes
+               fi
+           fi
+           cat conftest.out >&5
+           rm -f conftest.xml conftest.out
+       fi
  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 (long))) <= $ac_mid)];
- test_array [0] = 0
+ { echo "$as_me:$LINENO: result: $ac_cv_docbook_dtd_4_1_2" >&5
+ echo "${ECHO_T}$ac_cv_docbook_dtd_4_1_2" >&6; }
  
-   ;
-   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
+     HAVE_DOCBOOK_DTD_4_1_2="$ac_cv_docbook_dtd_4_1_2"
+     HAVE_DOCBOOK_DTD="$HAVE_DOCBOOK_DTD_4_1_2"
+     { echo "$as_me:$LINENO: checking for Docbook DTD version 4.2" >&5
+ echo $ECHO_N "checking for Docbook DTD version 4.2... $ECHO_C" >&6; }
+ if test "${ac_cv_docbook_dtd_4_2+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_lo=`expr '(' $ac_mid ')' + 1`
+       ac_cv_docbook_dtd_4_2=no
+       if test -n "$XSLTPROC"; then
+           MY_XSLTPROC_FLAGS=`echo "" $XSLTPROC_FLAGS|sed -e s/--novalid//g`
+           cat <<EOF >conftest.xml
+ <?xml version="1.0" encoding='ISO-8859-1'?>
+ <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ <book id="empty">
+ </book>
+ EOF
+           echo "Trying '$XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml'" >&5
+           echo "conftest.xml:" >&5
+           echo "====" >&5
+           cat conftest.xml >&5
+           echo "====" >&5
+           $XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml >conftest.out 2>&1
+           if test "$?" = 0 -o "$?" = 5; then
+               # failing to load the DTD is just a warning, so check for it in the output.
+               if grep 'warning: failed to load external entity' conftest.out >/dev/null 2>&1; then
+                   : # no good..
+               else
+                   ac_cv_docbook_dtd_4_2=yes
+               fi
+           fi
+           cat conftest.out >&5
+           rm -f conftest.xml conftest.out
+       fi
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- case $ac_lo in
- ?*) ac_cv_sizeof_long=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (long), 77
- See \`config.log' for more details." >&2;}
-    { (exit 1); exit 1; }; } ;;
- esac
+ { echo "$as_me:$LINENO: result: $ac_cv_docbook_dtd_4_2" >&5
+ echo "${ECHO_T}$ac_cv_docbook_dtd_4_2" >&6; }
+     HAVE_DOCBOOK_DTD_4_2="$ac_cv_docbook_dtd_4_2"
+     HAVE_DOCBOOK_DTD="$HAVE_DOCBOOK_DTD_4_2"
+       if test -z "$XSLTPROC"; then
+           { { echo "$as_me:$LINENO: error: Cannot build manpages: 'xsltproc' was not found." >&5
+ echo "$as_me: error: Cannot build manpages: 'xsltproc' was not found." >&2;}
+    { (exit 1); exit 1; }; }
+       fi
+       # if the 'current' Docbook revision is good enough, use that; otherwise,
+       # if 1.72.0 is available, use that.
+       XSLREL=current
+       if test "x$DOCBOOK_XSLT_CURRENT_VERSION" = "xno"; then
+           if test "x$HAVE_DOCBOOK_XSLT_1_72_0" = "xno"; then
+               { { echo "$as_me:$LINENO: error: Cannot build manpages: docbook version 1.72.0 or higher required." >&5
+ echo "$as_me: error: Cannot build manpages: docbook version 1.72.0 or higher required." >&2;}
+    { (exit 1); exit 1; }; }
+           else
+               XSLREL=1.72.0
+           fi
+       fi
+       # disable validation if the correct DTDs are not available
+       if test "x$HAVE_DOCBOOK_DTD_4_1_2" = "xno" || test "x$HAVE_DOCBOOK_DTD_4_2" = "xno"; then
+     { echo "$as_me:$LINENO: WARNING: Docbook DTD versions 4.1.2 and 4.2 are required for manpage validation; disabling validation" >&5
+ echo "$as_me: WARNING: Docbook DTD versions 4.1.2 and 4.2 are required for manpage validation; disabling validation" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ Docbook DTD versions 4.1.2 and 4.2 are required for manpage validation; disabling validation
+ AAW_EOF
+           XSLTPROC_FLAGS="$XSLTPROC_FLAGS --novalid"
+       fi
+     fi
+      if test "x$ENABLE_MANPAGE_BUILD" = "xyes"; then
+   ENABLE_MANPAGE_BUILD_TRUE=
+   ENABLE_MANPAGE_BUILD_FALSE='#'
  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;}
+   ENABLE_MANPAGE_BUILD_TRUE='#'
+   ENABLE_MANPAGE_BUILD_FALSE=
+ fi
+ # Check whether --with-index-server was given.
+ if test "${with_index_server+set}" = set; then
+   withval=$with_index_server;
+           case "$withval" in
+           "" | y | ye | yes | n | no)
+               { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-index-server option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-index-server option." >&2;}
     { (exit 1); exit 1; }; }
+             ;;
+           *) DEFAULT_SERVER="$withval"
+             ;;
+           esac
  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 (long)); }
- unsigned long ulongval () { return (long) (sizeof (long)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
+   : ${DEFAULT_SERVER=`uname -n`}
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (long))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (long))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (long))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
+ fi
  
-   ;
-   return 0;
- }
+ cat >>confdefs.h <<_ACEOF
+ #define DEFAULT_SERVER "$DEFAULT_SERVER"
  _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_long=`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 (long), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (long), 77
- See \`config.log' for more details." >&2;}
+ # Check whether --with-config was given.
+ if test "${with_config+set}" = set; then
+   withval=$with_config;
+           case "$withval" in
+           "" | y | ye | yes | n | no)
+               { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-config option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-config option." >&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
+             ;;
+           *) DEFAULT_CONFIG="$withval"
+             ;;
+           esac
  else
-   ac_cv_sizeof_long=0
- fi
+   : ${DEFAULT_CONFIG=DailySet1}
  fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
- echo "${ECHO_T}$ac_cv_sizeof_long" >&6
  cat >>confdefs.h <<_ACEOF
- #define SIZEOF_LONG $ac_cv_sizeof_long
+ #define DEFAULT_CONFIG "$DEFAULT_CONFIG"
  _ACEOF
  
  
-    echo "$as_me:$LINENO: checking for void*" >&5
- echo $ECHO_N "checking for void*... $ECHO_C" >&6
- if test "${ac_cv_type_voidp+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ # Check whether --with-tape-server was given.
+ if test "${with_tape_server+set}" = set; then
+   withval=$with_tape_server;
+           case "$withval" in
+           "" | y | ye | yes | n | no)
+               { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-tape-server option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-tape-server option." >&2;}
+    { (exit 1); exit 1; }; }
+             ;;
+           *) DEFAULT_TAPE_SERVER="$withval"
+             ;;
+           esac
  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 ((void* *) 0)
-   return 0;
- if (sizeof (void*))
-   return 0;
-   ;
-   return 0;
- }
+   : ${DEFAULT_TAPE_SERVER=$DEFAULT_SERVER}
+ fi
+ cat >>confdefs.h <<_ACEOF
+ #define DEFAULT_TAPE_SERVER "$DEFAULT_TAPE_SERVER"
  _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_voidp=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_voidp=no
+ # Check whether --with-tape-device was given.
+ if test "${with_tape_device+set}" = set; then
+   withval=$with_tape_device;
+           case "$withval" in
+           "" | y | ye | yes | n | no)
+               { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-tape-device option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-tape-device option." >&2;}
+    { (exit 1); exit 1; }; }
+             ;;
+           *) DEFAULT_TAPE_DEVICE="$withval"
+             ;;
+           esac
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >>confdefs.h <<_ACEOF
+ #define DEFAULT_TAPE_DEVICE "$DEFAULT_TAPE_DEVICE"
+ _ACEOF
+     if test "${DEFAULT_TAPE_DEVICE+set}" = "set"; then
+       EXAMPLE_TAPEDEV="$DEFAULT_TAPE_DEVICE"
+     else
+       EXAMPLE_TAPEDEV="tape:/dev/YOUR-TAPE-DEVICE-HERE"
+     fi
+ # Check whether --with-changer-device was given.
+ if test "${with_changer_device+set}" = set; then
+   withval=$with_changer_device;
+           case "$withval" in
+           "" | y | ye | yes | n | no)
+               { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-changer-device option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-changer-device option." >&2;}
+    { (exit 1); exit 1; }; }
+             ;;
+           *) DEFAULT_CHANGER_DEVICE="$withval"
+             ;;
+           esac
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_voidp" >&5
- echo "${ECHO_T}$ac_cv_type_voidp" >&6
  
- echo "$as_me:$LINENO: checking size of void*" >&5
- echo $ECHO_N "checking size of void*... $ECHO_C" >&6
- if test "${ac_cv_sizeof_voidp+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test "$ac_cv_type_voidp" = 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.  */
+     if test -z "$DEFAULT_CHANGER_DEVICE"; then
+       DEFAULT_CHANGER_DEVICE=/dev/null
+       if test -f /dev/ch0; then
+           DEFAULT_CHANGER_DEVICE=/dev/ch0
+       fi
+     fi
+ cat >>confdefs.h <<_ACEOF
+ #define DEFAULT_CHANGER_DEVICE "$DEFAULT_CHANGER_DEVICE"
  _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 (void*))) >= 0)];
- test_array [0] = 0
  
-   ;
-   return 0;
- }
+ # Check whether --with-amandates was given.
+ if test "${with_amandates+set}" = set; then
+   withval=$with_amandates;
+           case "$withval" in
+               n | no) { { echo "$as_me:$LINENO: error: *** --without-amandates is not allowed." >&5
+ echo "$as_me: error: *** --without-amandates is not allowed." >&2;}
+    { (exit 1); exit 1; }; };;
+               y |  ye | yes) amandates='$localstatedir/amanda/amandates' ;;
+               *) amandates="$withval";;
+           esac
+ else
+   amandates='$localstatedir/amanda/amandates'
+ fi
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$amandates\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   DEFAULT_AMANDATES_FILE="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define DEFAULT_AMANDATES_FILE "$ac_define_dir"
  _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
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+     # Extract the first word of "getconf", so it can be a program name with args.
+ set dummy getconf; 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_GETCONF+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $GETCONF in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $SYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GETCONF="$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
+ GETCONF=$ac_cv_path_GETCONF
+ if test -n "$GETCONF"; then
+   { echo "$as_me:$LINENO: result: $GETCONF" >&5
+ echo "${ECHO_T}$GETCONF" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     # we use 'getconf', if it exists, to get the relevant
+     # compiler flags.
+     GETCONF_LFS="LFS"
+     case "$target" in
+         *-hp-*) GETCONF_LFS="XBS5_ILP32_OFFBIG" ;;
+         *-ibm-aix*) GETCONF_LFS="XBS5_ILP32_OFFBIG" ;;
+     esac
+     # Checks for compilers, typedefs, structures, and compiler characteristics.
+     # Check for large file compilation environment.
+     NEED_RESETOFS=yes
+     { echo "$as_me:$LINENO: checking for large file compilation CFLAGS" >&5
+ echo $ECHO_N "checking for large file compilation CFLAGS... $ECHO_C" >&6; }
+ if test "${amanda_cv_LFS_CFLAGS+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         amanda_cv_LFS_CFLAGS=
+         if test "$GETCONF"; then
+             if $GETCONF ${GETCONF_LFS}_CFLAGS >/dev/null 2>&1; then
+                 amanda_cv_LFS_CFLAGS=`$GETCONF ${GETCONF_LFS}_CFLAGS 2>/dev/null`
+                 NEED_RESETOFS=no
+             fi
+         fi
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_LFS_CFLAGS" >&5
+ echo "${ECHO_T}$amanda_cv_LFS_CFLAGS" >&6; }
+     CFLAGS="$CFLAGS $amanda_cv_LFS_CFLAGS"
+     { echo "$as_me:$LINENO: checking for large file compilation LDFLAGS" >&5
+ echo $ECHO_N "checking for large file compilation LDFLAGS... $ECHO_C" >&6; }
+ if test "${amanda_cv_LFS_LDFLAGS+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         amanda_cv_LFS_LDFLAGS=
+         if test "$GETCONF"; then
+             if $GETCONF ${GETCONF_LFS}_LDFLAGS >/dev/null 2>&1; then
+                 amanda_cv_LFS_LDFLAGS=`$GETCONF ${GETCONF_LFS}_LDFLAGS 2>/dev/null`
+                 NEED_RESETOFS=no
+             fi
+         fi
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_LFS_LDFLAGS" >&5
+ echo "${ECHO_T}$amanda_cv_LFS_LDFLAGS" >&6; }
+     LDFLAGS="$LDFLAGS $amanda_cv_LFS_LDFLAGS"
+     { echo "$as_me:$LINENO: checking for large file compilation LIBS" >&5
+ echo $ECHO_N "checking for large file compilation LIBS... $ECHO_C" >&6; }
+ if test "${amanda_cv_LFS_LIBS+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         amanda_cv_LFS_LIBS=
+         if test "$GETCONF"; then
+             if $GETCONF ${GETCONF_LFS}_LIBS >/dev/null 2>&1; then
+                 amanda_cv_LFS_LIBS=`$GETCONF ${GETCONF_LFS}_LIBS 2>/dev/null`
+                 NEED_RESETOFS=no
+             fi
+         fi
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_LFS_LIBS" >&5
+ echo "${ECHO_T}$amanda_cv_LFS_LIBS" >&6; }
+     LIBS="$amanda_cv_LFS_LIBS $LIBS"
+     if test x"$NEED_RESETOFS" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define NEED_RESETOFS 1
+ _ACEOF
+     fi
+     # Extract the first word of "chio", so it can be a program name with args.
+ set dummy chio; 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_CHIO+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $CHIO in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_CHIO="$CHIO" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_CHIO="$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
+   test -z "$ac_cv_path_CHIO" && ac_cv_path_CHIO="chio"
+   ;;
+ esac
+ fi
+ CHIO=$ac_cv_path_CHIO
+ if test -n "$CHIO"; then
+   { echo "$as_me:$LINENO: result: $CHIO" >&5
+ echo "${ECHO_T}$CHIO" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     # Extract the first word of "chs", so it can be a program name with args.
+ set dummy chs; 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_CHS+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $CHS in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_CHS="$CHS" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_CHS="$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
+   test -z "$ac_cv_path_CHS" && ac_cv_path_CHS="chs"
+   ;;
+ esac
+ fi
+ CHS=$ac_cv_path_CHS
+ if test -n "$CHS"; then
+   { echo "$as_me:$LINENO: result: $CHS" >&5
+ echo "${ECHO_T}$CHS" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     # Extract the first word of "mtx", so it can be a program name with args.
+ set dummy mtx; 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_MTX+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $MTX in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_MTX="$MTX" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_MTX="$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
+   test -z "$ac_cv_path_MTX" && ac_cv_path_MTX="mtx"
+   ;;
+ esac
+ fi
+ MTX=$ac_cv_path_MTX
+ if test -n "$MTX"; then
+   { echo "$as_me:$LINENO: result: $MTX" >&5
+ echo "${ECHO_T}$MTX" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     # Extract the first word of "mcutil", so it can be a program name with args.
+ set dummy mcutil; 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_MCUTIL+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $MCUTIL in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_MCUTIL="$MCUTIL" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_MCUTIL="$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
+   test -z "$ac_cv_path_MCUTIL" && ac_cv_path_MCUTIL="mcutil"
+   ;;
+ esac
+ fi
+ MCUTIL=$ac_cv_path_MCUTIL
+ if test -n "$MCUTIL"; then
+   { echo "$as_me:$LINENO: result: $MCUTIL" >&5
+ echo "${ECHO_T}$MCUTIL" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+ for ac_header in \
+       camlib.h \
+       chio.h \
+       linux/chio.h \
+       scsi/sg.h \
+       scsi/scsi_ioctl.h \
+       sys/chio.h \
+       sys/dsreq.h \
+       sys/mtio.h \
+       sys/scarray.h \
+       sys/gscdds.h \
+       sys/scsi.h \
+       sys/scsiio.h \
+       sys/scsi/impl/uscsi.h \
+       sys/scsi/scsi/ioctl.h \
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ 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; }
+ 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 (void*))) <= $ac_mid)];
- test_array [0] = 0
-   ;
-   return 0;
- }
+ #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
-   ac_hi=$ac_mid; break
+   (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_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`
+       ac_header_compiler=no
  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
  
+ 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; }
  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 (void*))) < 0)];
- test_array [0] = 0
-   ;
-   return 0;
- }
+ #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_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); } &&
-        { 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
+   (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
+ 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;}
+     ;;
+ esac
+ { 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
+ 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
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ fi
+ done
+     #
+     # chio support
+     #
+     if test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
+       { echo "$as_me:$LINENO: checking for HP/UX-like scsi changer support" >&5
+ echo $ECHO_N "checking for HP/UX-like scsi changer support... $ECHO_C" >&6; }
+ if test "${amanda_cv_hpux_scsi_chio+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 <sys/scsi.h>
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (void*))) >= $ac_mid)];
- test_array [0] = 0
+           static struct element_addresses changer_info;
+           int i = SIOC_ELEMENT_ADDRESSES;
+           int j = SIOC_ELEMENT_STATUS;
+           int k = SIOC_MOVE_MEDIUM;
  
    ;
    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
-   ac_lo=$ac_mid; break
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_hpux_scsi_chio=yes
  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`
+       amanda_cv_hpux_scsi_chio=no
  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
+ rm -f core 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`
+ { echo "$as_me:$LINENO: result: $amanda_cv_hpux_scsi_chio" >&5
+ echo "${ECHO_T}$amanda_cv_hpux_scsi_chio" >&6; }
+       if test x"$amanda_cv_hpux_scsi_chio" = x"yes"; then
+           WANT_SCSI_HPUX=yes
+           WANT_CHG_SCSI=yes
+       fi
+     fi
+     #
+     # Linux SCSI based on ioctl
+     #
+     if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
+        test x"$ac_cv_header_scsi_scsi_ioctl_h" = x"yes"; then
+           { echo "$as_me:$LINENO: checking for Linux like scsi support (ioctl)" >&5
+ echo $ECHO_N "checking for Linux like scsi support (ioctl)... $ECHO_C" >&6; }
+ if test "${amanda_cv_linux_scsi+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 <scsi/scsi_ioctl.h>
+ #include <sys/mtio.h>
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (void*))) <= $ac_mid)];
- test_array [0] = 0
+           int device;
+           char *Command;
+           ioctl(device, SCSI_IOCTL_SEND_COMMAND, Command);
  
    ;
    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
-   ac_hi=$ac_mid
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_linux_scsi=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_lo=`expr '(' $ac_mid ')' + 1`
+       amanda_cv_linux_scsi=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- case $ac_lo in
- ?*) ac_cv_sizeof_voidp=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void*), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (void*), 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; }; }
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_linux_scsi" >&5
+ echo "${ECHO_T}$amanda_cv_linux_scsi" >&6; }
+     fi
+     #
+     # Linux SCSI based on sg
+     #
+     if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
+        test x"$ac_cv_header_scsi_sg_h" = x"yes"; then
+           { echo "$as_me:$LINENO: checking for Linux like scsi support (sg)" >&5
+ echo $ECHO_N "checking for Linux like scsi support (sg)... $ECHO_C" >&6; }
+ if test "${amanda_cv_linux_sg_scsi+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
- long longval () { return (long) (sizeof (void*)); }
- unsigned long ulongval () { return (long) (sizeof (void*)); }
- #include <stdio.h>
- #include <stdlib.h>
+ #include <sys/types.h>
+ #include <scsi/sg.h>
+ #include <sys/mtio.h>
  int
  main ()
  {
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (void*))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (void*))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (void*))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
+           int device;
+           struct sg_header *psg_header;
+           char *buffer;
+           write(device, buffer, 1);
  
    ;
    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
+ 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
-   ac_cv_sizeof_voidp=`cat conftest.val`
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_linux_sg_scsi=yes
  else
-   echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&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 (void*), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (void*), 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
+       amanda_cv_linux_sg_scsi=no
  fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- rm -f conftest.val
+ { echo "$as_me:$LINENO: result: $amanda_cv_linux_sg_scsi" >&5
+ echo "${ECHO_T}$amanda_cv_linux_sg_scsi" >&6; }
+     fi
+     if test x"$amanda_cv_linux_scsi" = x"yes" ||
+      test x"$amanda_cv_linux_sg_scsi" = x"yes";then
+           WANT_SCSI_LINUX=yes
+           WANT_CHG_SCSI=yes
+     fi
+     #
+     # HP-UX SCSI
+     #
+     if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
+        test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
+           { echo "$as_me:$LINENO: checking for HP-UX like scsi support" >&5
+ echo $ECHO_N "checking for HP-UX like scsi support... $ECHO_C" >&6; }
+ if test "${amanda_cv_hpux_scsi+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_cv_sizeof_voidp=0
- fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_voidp" >&5
- echo "${ECHO_T}$ac_cv_sizeof_voidp" >&6
- cat >>confdefs.h <<_ACEOF
- #define SIZEOF_VOIDP $ac_cv_sizeof_voidp
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
  _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
+ #include <stdio.h>
+ #include <sys/ioctl.h>
+ #include <sys/scsi.h>
+ #include <sys/mtio.h>
  
-    ac_cv_char_data_model=""
-    ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char"
-    ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short"
-    ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int"
-    ac_cv_long_data_model=""
-    ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int"
-    ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long"
-    ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp"
-    echo "$as_me:$LINENO: checking data model" >&5
- echo $ECHO_N "checking data model... $ECHO_C" >&6
-    case "$ac_cv_char_data_model/$ac_cv_long_data_model" in
-     122/242)     ac_cv_data_model="IP16"  ; n="standard 16bit machine" ;;
-     122/244)     ac_cv_data_model="LP32"  ; n="standard 32bit machine" ;;
-     122/*)       ac_cv_data_model="i16"   ; n="unusual int16 model" ;;
-     124/444)     ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;;
-     124/488)     ac_cv_data_model="LP64"  ; n="standard 64bit unixish" ;;
-     124/448)     ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;;
-     124/*)       ac_cv_data_model="i32"   ; n="unusual int32 model" ;;
-     128/888)     ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;;
-     128/*)       ac_cv_data_model="i64"   ; n="unusual int64 model" ;;
-     222/*2)      ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;;
-     333/*3)      ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;;
-     444/*4)      ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;;
-     666/*6)      ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;;
-     888/*8)      ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;;
-     222/*|333/*|444/*|666/*|888/*) :
-                  ac_cv_data_model="iDSP"  ; n="unusual dsptype" ;;
-      *)          ac_cv_data_model="none"  ; n="very unusual model" ;;
-    esac
-    echo "$as_me:$LINENO: result: $ac_cv_data_model ($ac_cv_long_data_model, $n)" >&5
- echo "${ECHO_T}$ac_cv_data_model ($ac_cv_long_data_model, $n)" >&6
+ int
+ main ()
+ {
  
- fi
+           int device;
+           char *Command;
+           ioctl(device, SIOC_IO, Command);
  
- if test "_$ac_cv_header_stdint_x" != "_" ; then
-    ac_cv_header_stdint="$ac_cv_header_stdint_x"
- elif  test "_$ac_cv_header_stdint_o" != "_" ; then
-    ac_cv_header_stdint="$ac_cv_header_stdint_o"
- elif  test "_$ac_cv_header_stdint_u" != "_" ; then
-    ac_cv_header_stdint="$ac_cv_header_stdint_u"
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_hpux_scsi=yes
  else
-    ac_cv_header_stdint="stddef.h"
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       amanda_cv_hpux_scsi=no
  fi
  
- echo "$as_me:$LINENO: checking for extra inttypes in chosen header" >&5
- echo $ECHO_N "checking for extra inttypes in chosen header... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: ($ac_cv_header_stdint)" >&5
- echo "${ECHO_T}($ac_cv_header_stdint)" >&6
- unset ac_cv_type_int_least32_t
- unset ac_cv_type_int_fast32_t
- echo "$as_me:$LINENO: checking for int_least32_t" >&5
- echo $ECHO_N "checking for int_least32_t... $ECHO_C" >&6
- if test "${ac_cv_type_int_least32_t+set}" = set; then
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_hpux_scsi" >&5
+ echo "${ECHO_T}$amanda_cv_hpux_scsi" >&6; }
+           if test x"$amanda_cv_hpux_scsi" = x"yes";then
+                   WANT_SCSI_HPUX_NEW=yes
+                   WANT_CHG_SCSI=yes
+                   WANT_CHG_SCSI_CHIO=yes
+           fi
+     fi
+     #
+     # IRIX SCSI
+     #
+     if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
+        test x"$ac_cv_header_sys_dsreq_h" = x"yes"; then
+           { echo "$as_me:$LINENO: checking for Irix like scsi support" >&5
+ echo $ECHO_N "checking for Irix like scsi support... $ECHO_C" >&6; }
+ if test "${amanda_cv_irix_scsi+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$ac_cv_header_stdint>
+ #include <sys/types.h>
+ #include <sys/dsreq.h>
+ #include <sys/mtio.h>
  
  int
  main ()
  {
- if ((int_least32_t *) 0)
-   return 0;
- if (sizeof (int_least32_t))
-   return 0;
+           int device=1;
+           char Command;
+           ioctl(device, DS_ENTER, &Command);
    ;
    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
-   ac_cv_type_int_least32_t=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_irix_scsi=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_type_int_least32_t=no
      amanda_cv_irix_scsi=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_int_least32_t" >&5
- echo "${ECHO_T}$ac_cv_type_int_least32_t" >&6
+ { echo "$as_me:$LINENO: result: $amanda_cv_irix_scsi" >&5
+ echo "${ECHO_T}$amanda_cv_irix_scsi" >&6; }
+           if test x"$amanda_cv_irix_scsi" = x"yes";then
+                   WANT_SCSI_IRIX=yes
+                   WANT_CHG_SCSI=yes
+           fi
+     fi
  
- echo "$as_me:$LINENO: checking for int_fast32_t" >&5
- echo $ECHO_N "checking for int_fast32_t... $ECHO_C" >&6
- if test "${ac_cv_type_int_fast32_t+set}" = set; then
+     #
+     # Solaris  SCSI
+     #
+     if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
+        test x"$ac_cv_header_sys_scsi_impl_uscsi_h" = x"yes"; then
+           { echo "$as_me:$LINENO: checking for Solaris-like scsi support" >&5
+ echo $ECHO_N "checking for Solaris-like scsi support... $ECHO_C" >&6; }
+ if test "${amanda_cv_solaris_scsi+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include<$ac_cv_header_stdint>
+ #include <sys/types.h>
+ #include <sys/scsi/impl/uscsi.h>
+ #include <sys/mtio.h>
  
  int
  main ()
  {
- if ((int_fast32_t *) 0)
-   return 0;
- if (sizeof (int_fast32_t))
-   return 0;
+           int device;
+           char *Command;
+           ioctl(device, USCSICMD, Command);
    ;
    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
-   ac_cv_type_int_fast32_t=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_solaris_scsi=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_type_int_fast32_t=no
      amanda_cv_solaris_scsi=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_int_fast32_t" >&5
- echo "${ECHO_T}$ac_cv_type_int_fast32_t" >&6
+ { echo "$as_me:$LINENO: result: $amanda_cv_solaris_scsi" >&5
+ echo "${ECHO_T}$amanda_cv_solaris_scsi" >&6; }
+           if test x"$amanda_cv_solaris_scsi" = x"yes";then
+                   WANT_SCSI_SOLARIS=yes
+                   WANT_CHG_SCSI=yes
+           fi
+     fi
  
- echo "$as_me:$LINENO: checking for intmax_t" >&5
- echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6
- if test "${ac_cv_type_intmax_t+set}" = set; then
+     #
+     # AIX SCSI
+     #
+     if test x"$ac_cv_header_sys_tape_h" = x"yes" &&
+        test x"$ac_cv_header_sys_scarray_h" = x"yes" &&
+        test x"$ac_cv_header_sys_gscdds_h" = x"yes"; then
+           { echo "$as_me:$LINENO: checking for AIX like scsi support" >&5
+ echo $ECHO_N "checking for AIX like scsi support... $ECHO_C" >&6; }
+ if test "${amanda_cv_aix_scsi+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$ac_cv_header_stdint>
+ #include <sys/types.h>
+ #include <sys/scarray.h>
+ #include <sys/tape.h>
  
  int
  main ()
  {
- if ((intmax_t *) 0)
-   return 0;
- if (sizeof (intmax_t))
-   return 0;
+           int device;
+           char *Command;
+           ioctl(device, STIOCMD, Command);
    ;
    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
-   ac_cv_type_intmax_t=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_aix_scsi=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_intmax_t=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+       amanda_cv_aix_scsi=no
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5
- echo "${ECHO_T}$ac_cv_type_intmax_t" >&6
  
- fi # shortcircut to system "stdint.h"
- # ------------------ PREPARE VARIABLES ------------------------------
- if test "$GCC" = "yes" ; then
- ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
- else
- ac_cv_stdint_message="using $CC"
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_aix_scsi" >&5
+ echo "${ECHO_T}$amanda_cv_aix_scsi" >&6; }
+           if test x"$amanda_cv_aix_scsi" = x"yes";then
+                   WANT_SCSI_AIX=yes
+                   WANT_CHG_SCSI=yes
+           fi
+     fi
+     #
+     # BSD CAM SCSI
+     #
+     if test x"$ac_cv_header_cam_cam_h" = x"yes";then
+           { echo "$as_me:$LINENO: checking for CAM like scsi support" >&5
+ echo $ECHO_N "checking for CAM like scsi support... $ECHO_C" >&6; }
+ if test "${amanda_cv_cam_scsi+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.  */
  
- echo "$as_me:$LINENO: result: make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&5
- echo "${ECHO_T}make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&6
+ #include <stdio.h>
+ # include <fcntl.h>
+ # include <cam/cam.h>
+ # include <cam/cam_ccb.h>
+ # include <cam/scsi/scsi_message.h>
+ # include <cam/scsi/scsi_pass.h>
+ # include <camlib.h>
  
- # ----------------- DONE inttypes.h checks START header -------------
-           ac_config_commands="$ac_config_commands $ac_stdint_h"
+ int
+ main ()
+ {
  
+           struct cam_device *curdev;
  
+           curdev = cam_open_pass("", O_RDWR, NULL);
  
- for ac_prog in ar
- 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_path_AR+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_cam_scsi=yes
  else
-   case $AR in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_AR="$AR" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_AR="$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
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
-   ;;
- esac
+       amanda_cv_cam_scsi=no
  fi
- AR=$ac_cv_path_AR
  
- if test -n "$AR"; then
-   echo "$as_me:$LINENO: result: $AR" >&5
- echo "${ECHO_T}$AR" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_cam_scsi" >&5
+ echo "${ECHO_T}$amanda_cv_cam_scsi" >&6; }
+           if test x"$amanda_cv_cam_scsi" = x"yes";then
+                   WANT_SCSI_CAM=yes
+                   WANT_CHG_SCSI=yes
  
-   test -n "$AR" && break
- done
- for ac_prog in gawk mawk nawk awk
- 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_AWK+set}" = set; then
+ { echo "$as_me:$LINENO: checking for main in -lcam" >&5
+ echo $ECHO_N "checking for main in -lcam... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_cam_main+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test -n "$AWK"; then
-   ac_cv_prog_AWK="$AWK" # Let the user override the test.
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lcam  $LIBS"
+ 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 main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_cam_main=yes
  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_AWK="$ac_prog"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
- done
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+       ac_cv_lib_cam_main=no
  fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
- AWK=$ac_cv_prog_AWK
- if test -n "$AWK"; then
-   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: $ac_cv_lib_cam_main" >&5
+ echo "${ECHO_T}$ac_cv_lib_cam_main" >&6; }
+ if test $ac_cv_lib_cam_main = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBCAM 1
+ _ACEOF
+   LIBS="-lcam $LIBS"
  fi
  
-   test -n "$AWK" && break
- done
+           fi
+     fi
  
- for ac_prog in 'bison -y' byacc
- 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_YACC+set}" = set; then
+     #
+     # BSD SCSI
+     #
+     if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
+        test x"$ac_cv_header_sys_scsiio_h" = x"yes"; then
+       { echo "$as_me:$LINENO: checking for BSD like scsi support" >&5
+ echo $ECHO_N "checking for BSD like scsi support... $ECHO_C" >&6; }
+ if test "${amanda_cv_bsd_scsi+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test -n "$YACC"; then
-   ac_cv_prog_YACC="$YACC" # Let the user override the test.
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+ #include <sys/scsiio.h>
+ #include <sys/mtio.h>
+ int
+ main ()
+ {
+       int device=1;
+       char Command;
+       ioctl(device, SCIOCCOMMAND, &Command);
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_bsd_scsi=yes
  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_YACC="$ac_prog"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
- done
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+       amanda_cv_bsd_scsi=no
  fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- YACC=$ac_cv_prog_YACC
- if test -n "$YACC"; then
-   echo "$as_me:$LINENO: result: $YACC" >&5
- echo "${ECHO_T}$YACC" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_bsd_scsi" >&5
+ echo "${ECHO_T}$amanda_cv_bsd_scsi" >&6; }
+       if test x"$amanda_cv_bsd_scsi" = x"yes";then
+          WANT_SCSI_BSD=yes
+          WANT_CHG_SCSI=yes
+       fi
+     fi
  
-   test -n "$YACC" && break
- done
- test -n "$YACC" || YACC="yacc"
+     # Do not build chg-scsi-chio if we cannot find the needed support
+     # include files for the SCSI interfaces
+     # chio.h and sys/chio.h are chio based systems
+     if test x"$ac_cv_header_chio_h" = x"yes" ||
+        test x"$ac_cv_header_linux_chio_h" = x"yes" ||
+        test x"$ac_cv_header_sys_chio_h" = x"yes"; then
+        # chg-scsi does not support FreeBSD 3.0's chio.h; it became backward
+        # incompatible with the introduction of camlib.h
+        if test x"$ac_cv_header_camlib_h" != x"yes"; then
+        WANT_SCSI_CHIO=yes
+        # prefer to use chg-scsi, unless we already have a driver for that,
+        # in which case set it up as chg-scsi-chio.
+        if test x"$WANT_CHG_SCSI" = x"no"; then
+          WANT_CHG_SCSI=yes
+        else
+          WANT_CHG_SCSI_CHIO=yes
+        fi
+        fi
+     fi
  
- for ac_prog in cat
- 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_path_CAT+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+     # scsi-based implementations
+      if test x"$WANT_CHG_SCSI" = x"yes"; then
+   WANT_CHG_SCSI_TRUE=
+   WANT_CHG_SCSI_FALSE='#'
  else
-   case $CAT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_CAT="$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
+   WANT_CHG_SCSI_TRUE='#'
+   WANT_CHG_SCSI_FALSE=
+ fi
  
-   ;;
- esac
+      if test x"$WANT_SCSI_LINUX" = x"yes"; then
+   WANT_SCSI_LINUX_TRUE=
+   WANT_SCSI_LINUX_FALSE='#'
+ else
+   WANT_SCSI_LINUX_TRUE='#'
+   WANT_SCSI_LINUX_FALSE=
  fi
- CAT=$ac_cv_path_CAT
  
if test -n "$CAT"; then
-   echo "$as_me:$LINENO: result: $CAT" >&5
- echo "${ECHO_T}$CAT" >&6
     if test x"$WANT_SCSI_HPUX_NEW" = x"yes"; then
+   WANT_SCSI_HPUX_NEW_TRUE=
+   WANT_SCSI_HPUX_NEW_FALSE='#'
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   WANT_SCSI_HPUX_NEW_TRUE='#'
+   WANT_SCSI_HPUX_NEW_FALSE=
  fi
  
-   test -n "$CAT" && break
- done
+      if test x"$WANT_SCSI_IRIX" = x"yes"; then
+   WANT_SCSI_IRIX_TRUE=
+   WANT_SCSI_IRIX_FALSE='#'
+ else
+   WANT_SCSI_IRIX_TRUE='#'
+   WANT_SCSI_IRIX_FALSE=
+ fi
  
- if test -z "$CAT"; then
-     CAT=cat
+      if test x"$WANT_SCSI_SOLARIS" = x"yes"; then
+   WANT_SCSI_SOLARIS_TRUE=
+   WANT_SCSI_SOLARIS_FALSE='#'
+ else
+   WANT_SCSI_SOLARIS_TRUE='#'
+   WANT_SCSI_SOLARIS_FALSE=
  fi
- for ac_prog in compress
- 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_path_COMPRESS+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+      if test x"$WANT_SCSI_AIX" = x"yes"; then
+   WANT_SCSI_AIX_TRUE=
+   WANT_SCSI_AIX_FALSE='#'
  else
-   case $COMPRESS in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_COMPRESS="$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
+   WANT_SCSI_AIX_TRUE='#'
+   WANT_SCSI_AIX_FALSE=
+ fi
  
-   ;;
- esac
+      if test x"$WANT_SCSI_CAM" = x"yes"; then
+   WANT_SCSI_CAM_TRUE=
+   WANT_SCSI_CAM_FALSE='#'
+ else
+   WANT_SCSI_CAM_TRUE='#'
+   WANT_SCSI_CAM_FALSE=
  fi
- COMPRESS=$ac_cv_path_COMPRESS
  
if test -n "$COMPRESS"; then
-   echo "$as_me:$LINENO: result: $COMPRESS" >&5
- echo "${ECHO_T}$COMPRESS" >&6
     if test x"$WANT_SCSI_BSD" = x"yes"; then
+   WANT_SCSI_BSD_TRUE=
+   WANT_SCSI_BSD_FALSE='#'
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   WANT_SCSI_BSD_TRUE='#'
+   WANT_SCSI_BSD_FALSE=
  fi
  
-   test -n "$COMPRESS" && break
- done
  
- for ac_prog in dd
- 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_path_DD+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+     # scsi-chio-based implementations
+      if test x"$WANT_CHG_SCSI_CHIO" = x"yes"; then
+   WANT_CHG_SCSI_CHIO_TRUE=
+   WANT_CHG_SCSI_CHIO_FALSE='#'
  else
-   case $DD in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_DD="$DD" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_DD="$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
+   WANT_CHG_SCSI_CHIO_TRUE='#'
+   WANT_CHG_SCSI_CHIO_FALSE=
+ fi
  
-   ;;
- esac
+      if test x"$WANT_SCSI_HPUX" = x"yes"; then
+   WANT_SCSI_HPUX_TRUE=
+   WANT_SCSI_HPUX_FALSE='#'
+ else
+   WANT_SCSI_HPUX_TRUE='#'
+   WANT_SCSI_HPUX_FALSE=
  fi
- DD=$ac_cv_path_DD
  
if test -n "$DD"; then
-   echo "$as_me:$LINENO: result: $DD" >&5
- echo "${ECHO_T}$DD" >&6
     if test x"$WANT_SCSI_CHIO" = x"yes"; then
+   WANT_SCSI_CHIO_TRUE=
+   WANT_SCSI_CHIO_FALSE='#'
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   WANT_SCSI_CHIO_TRUE='#'
+   WANT_SCSI_CHIO_FALSE=
  fi
  
-   test -n "$DD" && break
- done
  
- for ac_prog in getconf
+ for ac_header in fstab.h \
+       mntent.h \
+       mnttab.h \
+       sys/vfstab.h \
  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_path_GETCONF+set}" = set; then
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   case $GETCONF in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $SYSPATH
- 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_GETCONF="$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
-   ;;
+   # 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 { (ac_try="$ac_compile"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
  esac
- fi
- GETCONF=$ac_cv_path_GETCONF
- if test -n "$GETCONF"; then
-   echo "$as_me:$LINENO: result: $GETCONF" >&5
- echo "${ECHO_T}$GETCONF" >&6
+ 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
+   ac_header_compiler=yes
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_header_compiler=no
  fi
  
-   test -n "$GETCONF" && break
- done
+ 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; }
+ 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 { (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 && {
+        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
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+   ac_header_preproc=no
+ fi
  
- # Check whether --with-gnuplot or --without-gnuplot was given.
- if test "${with_gnuplot+set}" = set; then
-   withval="$with_gnuplot"
-    ac_with_gnuplot=$withval;
- else
-    ac_with_gnuplot=maybe;
- fi;
+ rm -f conftest.err conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6; }
  
- if test "$ac_with_gnuplot" = "yes" -o "$ac_with_gnuplot" = "maybe"; then
-     for ac_prog in gnuplot
- 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_path_GNUPLOT+set}" = set; then
+ # 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;}
+     ;;
+ esac
+ { 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
-   case $GNUPLOT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_GNUPLOT="$GNUPLOT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_GNUPLOT="$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
+   eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  
-   ;;
- esac
  fi
- GNUPLOT=$ac_cv_path_GNUPLOT
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  
- if test -n "$GNUPLOT"; then
-   echo "$as_me:$LINENO: result: $GNUPLOT" >&5
- echo "${ECHO_T}$GNUPLOT" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
  fi
  
-   test -n "$GNUPLOT" && break
  done
  
- else
-     if test "$ac_with_gnuplot" != "no"; then
-         if test -x "$ac_with_gnuplot"; then
-             GNUPLOT="$ac_with_gnuplot";
-         else
-             { echo "$as_me:$LINENO: WARNING: Specified gnuplot of $ac_with_gnuplot isn't" >&5
- echo "$as_me: WARNING: Specified gnuplot of $ac_with_gnuplot isn't" >&2;}
-             { echo "$as_me:$LINENO: WARNING: executable, searching for an alternative." >&5
- echo "$as_me: WARNING: executable, searching for an alternative." >&2;}
-           for ac_prog in gnuplot
+ for ac_func in endmntent
  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_path_GNUPLOT+set}" = set; then
+ 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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $GNUPLOT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_GNUPLOT="$GNUPLOT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_GNUPLOT="$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
+   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
  
-   ;;
- esac
- fi
- GNUPLOT=$ac_cv_path_GNUPLOT
+ /* 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.  */
  
- if test -n "$GNUPLOT"; then
-   echo "$as_me:$LINENO: result: $GNUPLOT" >&5
- echo "${ECHO_T}$GNUPLOT" >&6
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
+ #undef $ac_func
+ /* 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
+ 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
+ #endif
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       eval "$as_ac_var=no"
  fi
  
-   test -n "$GNUPLOT" && break
- done
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
  
-         fi
-     fi
  fi
+ done
  
  
- for ac_prog in gtar gnutar tar
+ for ac_func in setmntent
  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_path_GNUTAR+set}" = set; then
+ 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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $GNUTAR in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_GNUTAR="$GNUTAR" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_GNUTAR="$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
+   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
  
-   ;;
- esac
- fi
- GNUTAR=$ac_cv_path_GNUTAR
+ /* 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.  */
  
- if test -n "$GNUTAR"; then
-   echo "$as_me:$LINENO: result: $GNUTAR" >&5
- echo "${ECHO_T}$GNUTAR" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
  
-   test -n "$GNUTAR" && break
- done
+ #undef $ac_func
  
- if test ! -z "$GNUTAR"; then
-   case "`\"$GNUTAR\" --version 2>&1`" in
-    *GNU*tar* | *Free*paxutils* )
+ /* 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
+ 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
+ #endif
  
- cat >>confdefs.h <<_ACEOF
- #define GNUTAR "$GNUTAR"
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
  _ACEOF
-               ;;
-    *)
-               { echo "$as_me:$LINENO: WARNING: *** $GNUTAR is not GNU tar, so it will not be used." >&5
- echo "$as_me: WARNING: *** $GNUTAR is not GNU tar, so it will not be used." >&2;}
-               GNUTAR=
-               ;;
-   esac
- fi
- for ac_prog in smbclient
- 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_path_SAMBA_CLIENT+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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
-   case $SAMBA_CLIENT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_SAMBA_CLIENT="$SAMBA_CLIENT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_SAMBA_CLIENT="$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
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
-   ;;
- esac
+       eval "$as_ac_var=no"
  fi
- SAMBA_CLIENT=$ac_cv_path_SAMBA_CLIENT
  
- if test -n "$SAMBA_CLIENT"; then
-   echo "$as_me:$LINENO: result: $SAMBA_CLIENT" >&5
- echo "${ECHO_T}$SAMBA_CLIENT" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  fi
+ 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
  
-   test -n "$SAMBA_CLIENT" && break
+ fi
  done
  
- if test ! -z "$SAMBA_CLIENT"; then
-   case "`\"$SAMBA_CLIENT\" '\\\\not.a.host.name\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1`" in
-   *"Unknown host"*)
-               smbversion=1
-               ;;
-   *"Connection to not.a.host.name failed"*)
-               smbversion=2
-               ;;
-   *)
-               { echo "$as_me:$LINENO: WARNING: *** $SAMBA_CLIENT does not seem to be smbclient, so it will not be used." >&5
- echo "$as_me: WARNING: *** $SAMBA_CLIENT does not seem to be smbclient, so it will not be used." >&2;}
-               SAMBA_CLIENT=
-               ;;
-   esac
-   if test -n "$SAMBA_CLIENT"; then
  
- cat >>confdefs.h <<_ACEOF
- #define SAMBA_CLIENT "$SAMBA_CLIENT"
- _ACEOF
  
  
- cat >>confdefs.h <<_ACEOF
- #define SAMBA_VERSION $smbversion
- _ACEOF
  
-   fi
- fi
  
- for ac_prog in gzip
+ for ac_header in fcntl.h \
+         sys/fcntl.h \
+       sys/types.h \
+       sys/file.h \
+       unistd.h \
  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_path_GZIP+set}" = set; then
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   case $GZIP in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_GZIP="$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
-   ;;
+   # 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 { (ac_try="$ac_compile"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
  esac
- fi
- GZIP=$ac_cv_path_GZIP
- if test -n "$GZIP"; then
-   echo "$as_me:$LINENO: result: $GZIP" >&5
- echo "${ECHO_T}$GZIP" >&6
+ 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
+   ac_header_compiler=yes
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
-   test -n "$GZIP" && break
- done
+       ac_header_compiler=no
+ fi
  
- if test "$GZIP"; then
+ 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; }
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_GZIP 1
+ # 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
-     COMPRESS_PATH="$GZIP"
-     COMPRESS_SUFFIX=".gz"
-     COMPRESS_FAST_OPT="--fast"
-     COMPRESS_BEST_OPT="--best"
-     UNCOMPRESS_PATH="$GZIP"
-     UNCOMPRESS_OPT="-dc"
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$ac_header>
+ _ACEOF
+ 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 && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        }; then
+   ac_header_preproc=yes
  else
-     if test "$COMPRESS"; then
-       COMPRESS_PATH="$COMPRESS"
-       COMPRESS_SUFFIX=".Z"
-       COMPRESS_FAST_OPT="-f"
-       COMPRESS_BEST_OPT="-f"
-       UNCOMPRESS_PATH="$COMPRESS"
-       UNCOMPRESS_OPT="-dc"
-     else
-                               { echo "$as_me:$LINENO: WARNING: *** Cannot find either gzip or compress.  Using cat. ***" >&5
- echo "$as_me: WARNING: *** Cannot find either gzip or compress.  Using cat. ***" >&2;}
-       COMPRESS_PATH="$CAT"
-       COMPRESS_SUFFIX=""
-       COMPRESS_FAST_OPT=""
-       COMPRESS_BEST_OPT=""
-       UNCOMPRESS_PATH="$CAT"
-       UNCOMPRESS_OPT=""
-     fi
- fi
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- cat >>confdefs.h <<_ACEOF
- #define COMPRESS_PATH "$COMPRESS_PATH"
- _ACEOF
+   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; }
  
- cat >>confdefs.h <<_ACEOF
- #define COMPRESS_SUFFIX "$COMPRESS_SUFFIX"
- _ACEOF
+ # 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;}
  
+     ;;
+ esac
+ { 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  
- cat >>confdefs.h <<_ACEOF
- #define COMPRESS_FAST_OPT "$COMPRESS_FAST_OPT"
+ 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
  
- cat >>confdefs.h <<_ACEOF
- #define COMPRESS_BEST_OPT "$COMPRESS_BEST_OPT"
- _ACEOF
+ done
  
  
- cat >>confdefs.h <<_ACEOF
- #define UNCOMPRESS_PATH "$UNCOMPRESS_PATH"
- _ACEOF
+     # find a working file-locking mechanism.
+     # Note: these all use AC_TRY_LINK to make sure that we can compile
+     # and link each variant.  They do not try to test the variants --
+     # that is left to runtime.
+     WORKING_FILE_LOCK="no"
  
+     # check POSIX locking
+     { echo "$as_me:$LINENO: checking whether POSIX locking (with fcntl(2)) is available" >&5
+ echo $ECHO_N "checking whether POSIX locking (with fcntl(2)) is available... $ECHO_C" >&6; }
+ if test "${amanda_cv_posix_filelocking+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
  
cat >>confdefs.h <<_ACEOF
- #define UNCOMPRESS_OPT "$UNCOMPRESS_OPT"
          cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
  _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
+ #if HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+ #if HAVE_FCNTL_H
+ # include <fcntl.h>
+ #endif
  
- for ac_prog in sort
- 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_path_SORT+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $SORT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_SORT="$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
-   ;;
+ int
+ main ()
+ {
+           struct flock lock;
+           lock.l_type = F_RDLCK;
+           lock.l_start = 0;
+           lock.l_whence = SEEK_CUR;
+           lock.l_len = 0;
+           return fcntl(1, F_SETLK, &lock);
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (ac_try="$ac_link"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
  esac
- fi
- SORT=$ac_cv_path_SORT
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+       amanda_cv_posix_filelocking="yes"
  
- if test -n "$SORT"; then
-   echo "$as_me:$LINENO: result: $SORT" >&5
- echo "${ECHO_T}$SORT" >&6
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       amanda_cv_posix_filelocking="no"
  fi
  
-   test -n "$SORT" && break
- done
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  
- if test -z "$SORT"; then
-     if $NO_SERVER_MODE; then
-       SORT="NONE"
-     else
-       { { echo "$as_me:$LINENO: error: Set SORT to the path of the sort program." >&5
- echo "$as_me: error: Set SORT to the path of the sort program." >&2;}
-    { (exit 1); exit 1; }; }
-     fi
  fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_posix_filelocking" >&5
+ echo "${ECHO_T}$amanda_cv_posix_filelocking" >&6; }
+     if test "x$amanda_cv_posix_filelocking" = xyes; then
  
- cat >>confdefs.h <<_ACEOF
- #define SORT_PATH "$SORT"
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_AMFLOCK_POSIX 1
  _ACEOF
  
+       WANT_AMFLOCK_POSIX="yes"
+       WORKING_FILE_LOCK="yes"
+     fi
+      if test x"$WANT_AMFLOCK_POSIX" = x"yes"; then
+   WANT_AMFLOCK_POSIX_TRUE=
+   WANT_AMFLOCK_POSIX_FALSE='#'
+ else
+   WANT_AMFLOCK_POSIX_TRUE='#'
+   WANT_AMFLOCK_POSIX_FALSE=
+ fi
  
- for ac_prog in Mail mailx mail
- 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_path_MAILER+set}" = set; then
+     # check flock-based (BSD) locking
+     { echo "$as_me:$LINENO: checking whether flock locking is available" >&5
+ echo $ECHO_N "checking whether flock locking is available... $ECHO_C" >&6; }
+ if test "${amanda_cv_flock_filelocking+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $MAILER in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_MAILER="$MAILER" # 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_MAILER="$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
  
-   ;;
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #if HAVE_SYS_FILE_H
+ # include <sys/file.h>
+ #endif
+ int
+ main ()
+ {
+           return flock(1, LOCK_SH);
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (ac_try="$ac_link"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
  esac
- fi
- MAILER=$ac_cv_path_MAILER
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+       amanda_cv_flock_filelocking="yes"
  
- if test -n "$MAILER"; then
-   echo "$as_me:$LINENO: result: $MAILER" >&5
- echo "${ECHO_T}$MAILER" >&6
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       amanda_cv_flock_filelocking="no"
  fi
  
-   test -n "$MAILER" && break
- done
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  
- if test -z "$MAILER"; then
-     if $NO_SERVER_MODE; then
-       MAILER="NONE"
-       { echo "$as_me:$LINENO: WARNING: *** WARNING: Amanda cannot send mail reports without these programs." >&5
- echo "$as_me: WARNING: *** WARNING: Amanda cannot send mail reports without these programs." >&2;}
-     else
-       { { echo "$as_me:$LINENO: error: Set MAILER to some program that accepts -s subject user < message_file." >&5
- echo "$as_me: error: Set MAILER to some program that accepts -s subject user < message_file." >&2;}
-    { (exit 1); exit 1; }; }
-     fi
  fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_flock_filelocking" >&5
+ echo "${ECHO_T}$amanda_cv_flock_filelocking" >&6; }
+     if test "x$amanda_cv_flock_filelocking" = xyes; then
  
- cat >>confdefs.h <<_ACEOF
- #define MAILER "$MAILER"
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_AMFLOCK_FLOCK 1
  _ACEOF
  
+       WANT_AMFLOCK_FLOCK="yes"
+       WORKING_FILE_LOCK="yes"
+     fi
+      if test x"$WANT_AMFLOCK_FLOCK" = x"yes"; then
+   WANT_AMFLOCK_FLOCK_TRUE=
+   WANT_AMFLOCK_FLOCK_FALSE='#'
+ else
+   WANT_AMFLOCK_FLOCK_TRUE='#'
+   WANT_AMFLOCK_FLOCK_FALSE=
+ fi
  
- for ac_prog in mt
- 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_path_MT+set}" = set; then
+     # check lockf-based (SVR2, SVR3, SVR4) locking
+     { echo "$as_me:$LINENO: checking whether lockf(3) locking is available" >&5
+ echo $ECHO_N "checking whether lockf(3) locking is available... $ECHO_C" >&6; }
+ if test "${amanda_cv_lockf_filelocking+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $MT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_MT="$MT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_MT="$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
  
-   ;;
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+ int
+ main ()
+ {
+           return lockf(1, F_LOCK, 0);
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (ac_try="$ac_link"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
  esac
- fi
- MT=$ac_cv_path_MT
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+       amanda_cv_lockf_filelocking="yes"
  
- if test -n "$MT"; then
-   echo "$as_me:$LINENO: result: $MT" >&5
- echo "${ECHO_T}$MT" >&6
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       amanda_cv_lockf_filelocking="no"
  fi
  
-   test -n "$MT" && break
- done
- test -n "$MT" || MT="mt"
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_lockf_filelocking" >&5
+ echo "${ECHO_T}$amanda_cv_lockf_filelocking" >&6; }
+     if test "x$amanda_cv_lockf_filelocking" = xyes; then
  
- for ac_prog in chio
- 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_path_CHIO+set}" = set; then
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_AMFLOCK_LOCKF 1
+ _ACEOF
+       WANT_AMFLOCK_LOCKF="yes"
+       WORKING_FILE_LOCK="yes"
+     fi
+      if test x"$WANT_AMFLOCK_LOCKF" = x"yes"; then
+   WANT_AMFLOCK_LOCKF_TRUE=
+   WANT_AMFLOCK_LOCKF_FALSE='#'
+ else
+   WANT_AMFLOCK_LOCKF_TRUE='#'
+   WANT_AMFLOCK_LOCKF_FALSE=
+ fi
+     # check our homebrew hardlink-based locking (requires hardlinks)
+     { echo "$as_me:$LINENO: checking whether link(2) is available for locking" >&5
+ echo $ECHO_N "checking whether link(2) is available for locking... $ECHO_C" >&6; }
+ if test "${amanda_cv_lnlock_filelocking+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $CHIO in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_CHIO="$CHIO" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_CHIO="$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
  
-   ;;
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+ int
+ main ()
+ {
+           return link("/tmp/foo", "/tmp/bar");
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+       amanda_cv_lnlock_filelocking="yes"
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       amanda_cv_lnlock_filelocking="no"
  fi
- CHIO=$ac_cv_path_CHIO
  
- if test -n "$CHIO"; then
-   echo "$as_me:$LINENO: result: $CHIO" >&5
- echo "${ECHO_T}$CHIO" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_lnlock_filelocking" >&5
+ echo "${ECHO_T}$amanda_cv_lnlock_filelocking" >&6; }
+     if test "x$amanda_cv_lnlock_filelocking" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_AMFLOCK_LNLOCK 1
+ _ACEOF
+       WANT_AMFLOCK_LNLOCK="yes"
+       WORKING_FILE_LOCK="yes"
+     fi
+      if test x"$WANT_AMFLOCK_LNLOCK" = x"yes"; then
+   WANT_AMFLOCK_LNLOCK_TRUE=
+   WANT_AMFLOCK_LNLOCK_FALSE='#'
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   WANT_AMFLOCK_LNLOCK_TRUE='#'
+   WANT_AMFLOCK_LNLOCK_FALSE=
  fi
  
-   test -n "$CHIO" && break
- done
- test -n "$CHIO" || CHIO="chio"
+     if test x"$WORKING_FILE_LOCK" = "no"; then
+       # this shouldn't happen, and is *bad* if it does
+       { { echo "$as_me:$LINENO: error: *** No working file locking capability found!" >&5
+ echo "$as_me: error: *** No working file locking capability found!" >&2;}
+    { (exit 1); exit 1; }; }
+     fi
  
  
- for ac_prog in chs
+     for ac_prog in swig
  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_path_CHS+set}" = set; then
echo "$as_me:$LINENO: checking for $ac_word" >&5
+ echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_path_SWIG+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $CHS in
+   case $SWIG in
    [\\/]* | ?:[\\/]*)
-   ac_cv_path_CHS="$CHS" # Let the user override the test with a path.
+   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
    ;;
    *)
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    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_CHS="$as_dir/$ac_word$ac_exec_ext"
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_SWIG="$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
- CHS=$ac_cv_path_CHS
- if test -n "$CHS"; then
-   echo "$as_me:$LINENO: result: $CHS" >&5
- echo "${ECHO_T}$CHS" >&6
+ SWIG=$ac_cv_path_SWIG
+ if test -n "$SWIG"; then
+   { echo "$as_me:$LINENO: result: $SWIG" >&5
+ echo "${ECHO_T}$SWIG" >&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 "$CHS" && break
+   test -n "$SWIG" && break
  done
- test -n "$CHS" || CHS="chs"
  
  
- for ac_prog in mtx
- 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_path_MTX+set}" = set; then
+         # Extract the first word of "swig", so it can be a program name with args.
+ set dummy swig; 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_SWIG+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $MTX in
+   case $SWIG in
    [\\/]* | ?:[\\/]*)
-   ac_cv_path_MTX="$MTX" # Let the user override the test with a path.
+   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
    ;;
    *)
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
+ 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_MTX="$as_dir/$ac_word$ac_exec_ext"
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_SWIG="$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
- MTX=$ac_cv_path_MTX
+ SWIG=$ac_cv_path_SWIG
+ if test -n "$SWIG"; then
+   { echo "$as_me:$LINENO: result: $SWIG" >&5
+ echo "${ECHO_T}$SWIG" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+         if test -z "$SWIG" ; then
+                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
+         elif test -n "1.3.28" ; then
+                 { echo "$as_me:$LINENO: checking for SWIG version" >&5
+ echo $ECHO_N "checking for SWIG version... $ECHO_C" >&6; }
+                 swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
+                 { echo "$as_me:$LINENO: result: $swig_version" >&5
+ echo "${ECHO_T}$swig_version" >&6; }
+                 if test -n "$swig_version" ; then
+                         # Calculate the required version number components
+                         required=1.3.28
+                         required_major=`echo $required | sed 's/[^0-9].*//'`
+                         if test -z "$required_major" ; then
+                                 required_major=0
+                         fi
+                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+                         required_minor=`echo $required | sed 's/[^0-9].*//'`
+                         if test -z "$required_minor" ; then
+                                 required_minor=0
+                         fi
+                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+                         required_patch=`echo $required | sed 's/[^0-9].*//'`
+                         if test -z "$required_patch" ; then
+                                 required_patch=0
+                         fi
+                         # Calculate the available version number components
+                         available=$swig_version
+                         available_major=`echo $available | sed 's/[^0-9].*//'`
+                         if test -z "$available_major" ; then
+                                 available_major=0
+                         fi
+                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+                         available_minor=`echo $available | sed 's/[^0-9].*//'`
+                         if test -z "$available_minor" ; then
+                                 available_minor=0
+                         fi
+                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+                         available_patch=`echo $available | sed 's/[^0-9].*//'`
+                         if test -z "$available_patch" ; then
+                                 available_patch=0
+                         fi
+                         if test $available_major -ne $required_major \
+                                 -o $available_minor -ne $required_minor \
+                                 -o $available_patch -lt $required_patch ; then
+                                 SWIG='echo "Error: SWIG version >= 1.3.28 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
+                         else
+                                 SWIG_LIB=`$SWIG -swiglib`
+                         fi
+                 else
+                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
+                 fi
+         fi
  
- if test -n "$MTX"; then
-   echo "$as_me:$LINENO: result: $MTX" >&5
- echo "${ECHO_T}$MTX" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
  
-   test -n "$MTX" && break
- done
- test -n "$MTX" || MTX="mtx"
  
  
for ac_prog in mcutil
    for ac_prog in perl5 perl
  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_path_MCUTIL+set}" = set; then
echo "$as_me:$LINENO: checking for $ac_word" >&5
+ echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_path_PERL+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $MCUTIL in
+   case $PERL in
    [\\/]* | ?:[\\/]*)
-   ac_cv_path_MCUTIL="$MCUTIL" # Let the user override the test with a path.
+   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
    ;;
    *)
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    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_MCUTIL="$as_dir/$ac_word$ac_exec_ext"
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PERL="$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
- MCUTIL=$ac_cv_path_MCUTIL
- if test -n "$MCUTIL"; then
-   echo "$as_me:$LINENO: result: $MCUTIL" >&5
- echo "${ECHO_T}$MCUTIL" >&6
+ PERL=$ac_cv_path_PERL
+ if test -n "$PERL"; then
+   { echo "$as_me:$LINENO: result: $PERL" >&5
+ echo "${ECHO_T}$PERL" >&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 "$MCUTIL" && break
+   test -n "$PERL" && break
  done
- test -n "$MCUTIL" || MCUTIL="mcutil"
  
  
- for ac_prog in lpr lp
- 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_path_PRINT+set}" = set; then
+     # Make sure we have perl
+ if test -z "$PERL"; then
# Extract the first word of "perl", so it can be a program name with args.
+ set dummy perl; 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_PERL+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $PRINT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_PRINT="$PRINT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+   if test -n "$PERL"; then
+   ac_cv_prog_PERL="$PERL" # 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_path_PRINT="$as_dir/$ac_word$ac_exec_ext"
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_PERL="perl"
      echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
  done
  done
+ IFS=$as_save_IFS
  
-   ;;
- esac
  fi
- PRINT=$ac_cv_path_PRINT
- if test -n "$PRINT"; then
-   echo "$as_me:$LINENO: result: $PRINT" >&5
- echo "${ECHO_T}$PRINT" >&6
+ fi
+ PERL=$ac_cv_prog_PERL
+ if test -n "$PERL"; then
+   { echo "$as_me:$LINENO: result: $PERL" >&5
+ echo "${ECHO_T}$PERL" >&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 "$PRINT" && break
- done
  
- if test ! -z "$PRINT"; then
+ fi
  
- cat >>confdefs.h <<_ACEOF
- #define LPRCMD "$PRINT"
- _ACEOF
+ # Check if version of Perl is sufficient
+ ac_perl_version="5.6.0"
  
-     echo "$as_me:$LINENO: checking which flag to use to select a printer" >&5
- echo $ECHO_N "checking which flag to use to select a printer... $ECHO_C" >&6
- if test "${amanda_cv_printer_flag+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+ if test "x$PERL" != "x"; then
+   { echo "$as_me:$LINENO: checking for perl version greater than or equal to $ac_perl_version" >&5
+ echo $ECHO_N "checking for perl version greater than or equal to $ac_perl_version... $ECHO_C" >&6; }
+   # NB: It would be nice to log the error if there is one, but we cannot rely
+   # on autoconf internals
+   $PERL -e "use $ac_perl_version;" > /dev/null 2>&1
+   if test $? -ne 0; then
+     { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; };
  
-       amanda_cv_printer_flag=$PRINTER_FLAG
-       case "$PRINT" in
-       lpr|*/lpr) amanda_cv_printer_flag="-P";;
-       lp|*/lp) amanda_cv_printer_flag="-d";;
-       esac
+       { { echo "$as_me:$LINENO: error: Amanda requires at least perl 5.6.0" >&5
+ echo "$as_me: error: Amanda requires at least perl 5.6.0" >&2;}
+    { (exit 1); exit 1; }; }
  
+   else
+     { echo "$as_me:$LINENO: result: ok" >&5
+ echo "${ECHO_T}ok" >&6; };
+   fi
+ else
+   { echo "$as_me:$LINENO: WARNING: could not find perl" >&5
+ echo "$as_me: WARNING: could not find perl" >&2;}
  fi
- echo "$as_me:$LINENO: result: $amanda_cv_printer_flag" >&5
- echo "${ECHO_T}$amanda_cv_printer_flag" >&6
-     if test ! -z "$amanda_cv_printer_flag"; then
  
- cat >>confdefs.h <<_ACEOF
- #define LPRFLAG "$amanda_cv_printer_flag"
- _ACEOF
  
-     else
-       { echo "$as_me:$LINENO: WARNING: *** WARNING: amanda will always print to the default printer" >&5
- echo "$as_me: WARNING: *** WARNING: amanda will always print to the default printer" >&2;}
+     # If we want cygwin to copy ddl to modules directory.
+     WANT_CYGWIN_COPY_PERL_DLL="false"
+     # get the include path for building perl extensions
+     PERL_INC=`$PERL -MExtUtils::Embed -e perl_inc`
+     if test x"$enable_shared" = x"no"; then
+       { { echo "$as_me:$LINENO: error: *** Amanda cannot be compiled without shared-library support (do not use --disable-shared)" >&5
+ echo "$as_me: error: *** Amanda cannot be compiled without shared-library support (do not use --disable-shared)" >&2;}
+    { (exit 1); exit 1; }; }
      fi
- fi
  
- for ac_prog in pcat
- 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_path_PCAT+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $PCAT in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_PCAT="$PCAT" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $LOCSYSPATH
- 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_PCAT="$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
+     case "$target" in
+       *freebsd[123456]*) # up to and including FreeBSD 6.*
+           # Before 7.0, FreeBSD systems don't include a DT_NEEDS segment in
+           # libgthread to automatically pull in the desired threading library.
+           # Instead, they assume that any application linking against
+           # libgthread will pull in the threading library.  This is fine for
+           # Amanda C applications, but for Perl applications this assumption
+           # means that the perl binary would pull in the threading library.
+           # But perl is compiled without threading by default.
+           #
+           # Specifically, this occurs on any FreeBSD using gcc-3.*: the linking
+           # decision is made in gcc's spec files, which were changed in
+           # gcc-4.0.  For a more in-depth discussion, see
+           #  http://wiki.zmanda.com/index.php/Installation/OS_Specific_Notes/Installing_Amanda_on_FreeBSD
+           #
+           # The easiest solution for the "default" case is to link all perl
+           # extension libraries against the threading library, so it is loaded
+           # when perl loads the extension library.  The default threading
+           # library in FreeBSD is libpthread.  The below default will work on
+           # such a FreeBSD system, but ports maintainers and those with
+           # different configurations may need to override this value with
+           # --with-perlextlibs.
+           #
+           # We can't use -pthread because gcc on FreeBSD ignores -pthread in
+           # combination with -shared.  See
+           #   http://lists.freebsd.org/pipermail/freebsd-stable/2006-June/026229.html
  
-   ;;
- esac
+           PERLEXTLIBS="-lpthread"
+           ;;
+       *-pc-cygwin)
+           # When need -lperl and the '-L' where it is located,
+           # we don't want the DynaLoader.a
+           PERLEXTLIBS=`perl -MExtUtils::Embed -e ldopts | sed -e 's/^.*-L/-L/'`
+           WANT_CYGWIN_COPY_PERL_DLL="true";
+           ;;
+     esac
+      if $WANT_CYGWIN_COPY_PERL_DLL; then
+   WANT_CYGWIN_COPY_PERL_DLL_TRUE=
+   WANT_CYGWIN_COPY_PERL_DLL_FALSE='#'
+ else
+   WANT_CYGWIN_COPY_PERL_DLL_TRUE='#'
+   WANT_CYGWIN_COPY_PERL_DLL_FALSE=
  fi
- PCAT=$ac_cv_path_PCAT
  
- if test -n "$PCAT"; then
-   echo "$as_me:$LINENO: result: $PCAT" >&5
- echo "${ECHO_T}$PCAT" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+ # Check whether --with-perlextlibs was given.
+ if test "${with_perlextlibs+set}" = set; then
+   withval=$with_perlextlibs;
+           case "$withval" in
+               y|ye|yes) { { echo "$as_me:$LINENO: error: *** You must specify a value for --with-perlextlibs" >&5
+ echo "$as_me: error: *** You must specify a value for --with-perlextlibs" >&2;}
+    { (exit 1); exit 1; }; };;
+               n|no) PERLEXTLIBS='';;
+               *) PERLEXTLIBS="$withval" ;;
+           esac
  fi
  
-   test -n "$PCAT" && break
- done
  
- for ac_prog in perl5 perl
- 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_path_PERL+set}" = set; then
+     # Extract the first word of "cat", so it can be a program name with args.
+ set dummy cat; 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_CAT+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   case $PERL in
+   case $CAT in
    [\\/]* | ?:[\\/]*)
-   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
    ;;
    *)
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    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_PERL="$as_dir/$ac_word$ac_exec_ext"
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_CAT="$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
  
+   test -z "$ac_cv_path_CAT" && ac_cv_path_CAT="cat"
    ;;
  esac
  fi
- PERL=$ac_cv_path_PERL
- if test -n "$PERL"; then
-   echo "$as_me:$LINENO: result: $PERL" >&5
- echo "${ECHO_T}$PERL" >&6
+ CAT=$ac_cv_path_CAT
+ if test -n "$CAT"; then
+   { echo "$as_me:$LINENO: result: $CAT" >&5
+ echo "${ECHO_T}$CAT" >&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 "$PERL" && break
- done
  
  
  
- for ac_prog in $DUMP_PROGRAMS
- 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_path_DUMP+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $DUMP in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_DUMP="$DUMP" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $SYSLOCPATH
- 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_DUMP="$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
- DUMP=$ac_cv_path_DUMP
- if test -n "$DUMP"; then
-   echo "$as_me:$LINENO: result: $DUMP" >&5
- echo "${ECHO_T}$DUMP" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
-   test -n "$DUMP" && break
- done
- if test -n "$DUMP"; then
-   if test "`basename $DUMP`" = "backup"; then
-     backup_gnutar=`$DUMP --version | $GREP "GNU tar"`
-     if test $? -eq 0; then
-       DUMP=
-     fi
-   fi
- fi
- for ac_prog in ufsrestore restore
- 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_path_RESTORE+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $RESTORE in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_RESTORE="$RESTORE" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $SYSLOCPATH
- 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_RESTORE="$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
- RESTORE=$ac_cv_path_RESTORE
- if test -n "$RESTORE"; then
-   echo "$as_me:$LINENO: result: $RESTORE" >&5
- echo "${ECHO_T}$RESTORE" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
-   test -n "$RESTORE" && break
- done
- if test "$DUMP" -a "$RESTORE"; then
- cat >>confdefs.h <<_ACEOF
- #define DUMP "$DUMP"
- _ACEOF
- cat >>confdefs.h <<_ACEOF
- #define RESTORE "$RESTORE"
- _ACEOF
-     if test -x $DUMP; then
-         echo "$as_me:$LINENO: checking whether $DUMP supports -E or -S for estimates" >&5
- echo $ECHO_N "checking whether $DUMP supports -E or -S for estimates... $ECHO_C" >&6
- if test "${amanda_cv_dump_estimate+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-               case "$DUMP" in
-               *dump)
-                   { ac_try='$DUMP 9Ef /dev/null /dev/null/invalid/fs 2>&1
-                       | $GREP -v Dumping
-                       | $GREP -v Date
-                       | $GREP -v Label >conftest.d-E 2>&1'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }
-                   cat conftest.d-E >&5
-                   { ac_try='$DUMP 9Sf /dev/null /dev/null/invalid/fs 2>&1
-                       | $GREP -v Dumping
-                       | $GREP -v Date
-                       | $GREP -v Label >conftest.d-S 2>&1'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }
-                   cat conftest.d-S >&5
-                   { ac_try='$DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
-                       | $GREP -v Dumping
-                       | $GREP -v Date
-                       | $GREP -v Label >conftest.d 2>&1'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }
-                   cat conftest.d >&5
-                   if { ac_try='cmp conftest.d-E conftest.d 1>&2'
-   { (eval 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
-                       amanda_cv_dump_estimate=E
-                   elif { ac_try='cmp conftest.d-S conftest.d 1>&2'
-   { (eval 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
-                       amanda_cv_dump_estimate=S
-                   else
-                       amanda_cv_dump_estimate=no
-                   fi
-                   rm -f conftest.d conftest.d-E conftest.d-S
-                 ;;
-               *) amanda_cv_dump_estimate=no
-                 ;;
-               esac
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_dump_estimate" >&5
- echo "${ECHO_T}$amanda_cv_dump_estimate" >&6
-     else
-       { echo "$as_me:$LINENO: WARNING: *** $DUMP is not executable, cannot run -E/-S test" >&5
- echo "$as_me: WARNING: *** $DUMP is not executable, cannot run -E/-S test" >&2;}
-       amanda_cv_dump_estimate=no
-     fi
-     if test "x$amanda_cv_dump_estimate" != xno; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_DUMP_ESTIMATE "$amanda_cv_dump_estimate"
- _ACEOF
-     fi
  
  
- # Check whether --with-dump-honor-nodump or --without-dump-honor-nodump was given.
- if test "${with_dump_honor_nodump+set}" = set; then
-   withval="$with_dump_honor_nodump"
-    if test -x $DUMP; then
-         echo "$as_me:$LINENO: checking whether $DUMP supports -h (honor nodump flag)" >&5
- echo $ECHO_N "checking whether $DUMP supports -h (honor nodump flag)... $ECHO_C" >&6
- if test "${amanda_cv_honor_nodump+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
  
-           case "$DUMP" in
-           *dump)
-               { ac_try='$DUMP 9hf 0 /dev/null /dev/null/invalid/fs 2>&1
-                   | $GREP -v Dumping
-                   | $GREP -v Date
-                   | $GREP -v Label >conftest.d-h 2>&1'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }
-               cat conftest.d-h >&5
-               { ac_try='$DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
-                   | $GREP -v Dumping
-                   | $GREP -v Date
-                   | $GREP -v Label >conftest.d 2>&1'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }
-               cat conftest.d >&5
-               if { ac_try='diff conftest.d-h conftest.d 1>&2'
-   { (eval 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
-                   amanda_cv_honor_nodump=yes
-               else
-                   amanda_cv_honor_nodump=no
-               fi
-               rm -f conftest.d conftest.d-h
-             ;;
-           *) amanda_cv_honor_nodump=no
-             ;;
-           esac
  
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_honor_nodump" >&5
- echo "${ECHO_T}$amanda_cv_honor_nodump" >&6
-       else
-       { echo "$as_me:$LINENO: WARNING: *** $DUMP is not executable, cannot run -h test" >&5
- echo "$as_me: WARNING: *** $DUMP is not executable, cannot run -h test" >&2;}
-       amanda_cv_honor_nodump=no
-       fi
-       if test "x$amanda_cv_honor_nodump" = xyes; then
+     if test "$GZIP"; then
  
  cat >>confdefs.h <<\_ACEOF
- #define HAVE_HONOR_NODUMP 1
+ #define HAVE_GZIP 1
  _ACEOF
  
-       fi
- fi;
- fi
- for ac_prog in xfsdump
- 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_path_XFSDUMP+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $XFSDUMP in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_XFSDUMP="$XFSDUMP" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $SYSLOCPATH
- 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_XFSDUMP="$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
- XFSDUMP=$ac_cv_path_XFSDUMP
+       COMPRESS_PATH="$GZIP"
+       COMPRESS_SUFFIX=".gz"
+       COMPRESS_FAST_OPT="--fast"
+       COMPRESS_BEST_OPT="--best"
+       UNCOMPRESS_PATH="$GZIP"
+       UNCOMPRESS_OPT="-dc"
+     else
+       if test "$COMPRESS"; then
+           COMPRESS_PATH="$COMPRESS"
+           COMPRESS_SUFFIX=".Z"
+           COMPRESS_FAST_OPT="-f"
+           COMPRESS_BEST_OPT="-f"
+           UNCOMPRESS_PATH="$COMPRESS"
+           UNCOMPRESS_OPT="-dc"
+       else
+           # If we have to use cat, we don't define COMPRESS_FAST_OPT,
+           # COMPRESS_BEST_OPT, or UNCOMPRESS_OPT as "" since cat will look
+           # look for a file by the name of "".
+           # XXX is the above true? --dustin
  
- if test -n "$XFSDUMP"; then
-   echo "$as_me:$LINENO: result: $XFSDUMP" >&5
- echo "${ECHO_T}$XFSDUMP" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
  
-   test -n "$XFSDUMP" && break
- done
+     { echo "$as_me:$LINENO: WARNING: Cannot find either gzip or compress.  Using cat." >&5
+ echo "$as_me: WARNING: Cannot find either gzip or compress.  Using cat." >&2;}
  
- for ac_prog in xfsrestore
- 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_path_XFSRESTORE+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $XFSRESTORE in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_XFSRESTORE="$XFSRESTORE" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $SYSLOCPATH
- 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_XFSRESTORE="$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
- XFSRESTORE=$ac_cv_path_XFSRESTORE
+     cat <<AAW_EOF >>config.warnings
+ Cannot find either gzip or compress.  Using cat.
+ AAW_EOF
  
- if test -n "$XFSRESTORE"; then
-   echo "$as_me:$LINENO: result: $XFSRESTORE" >&5
- echo "${ECHO_T}$XFSRESTORE" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
  
-   test -n "$XFSRESTORE" && break
- done
+           COMPRESS_PATH="$CAT"
+           COMPRESS_SUFFIX=""
+           COMPRESS_FAST_OPT=""
+           COMPRESS_BEST_OPT=""
+           UNCOMPRESS_PATH="$CAT"
+           UNCOMPRESS_OPT=""
+       fi
+     fi
  
- if test "$XFSDUMP" -a "$XFSRESTORE"; then
  
  cat >>confdefs.h <<_ACEOF
- #define XFSDUMP "$XFSDUMP"
+ #define COMPRESS_PATH "$COMPRESS_PATH"
  _ACEOF
  
  
  cat >>confdefs.h <<_ACEOF
- #define XFSRESTORE "$XFSRESTORE"
+ #define COMPRESS_SUFFIX "$COMPRESS_SUFFIX"
  _ACEOF
  
-     { echo "$as_me:$LINENO: WARNING: *** xfsdump causes the setuid-root rundump program to be enabled" >&5
- echo "$as_me: WARNING: *** xfsdump causes the setuid-root rundump program to be enabled" >&2;}
-     { echo "$as_me:$LINENO: WARNING: *** to disable it, just #undef XFSDUMP in config/config.h" >&5
- echo "$as_me: WARNING: *** to disable it, just #undef XFSDUMP in config/config.h" >&2;}
- fi
- VXSYSLOCPATH="$SYSLOCPATH:/usr/lib/fs/vxfs"
- for ac_prog in vxdump
- 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_path_VXDUMP+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $VXDUMP in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_VXDUMP="$VXDUMP" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $VXSYSLOCPATH
- 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_VXDUMP="$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
- VXDUMP=$ac_cv_path_VXDUMP
- if test -n "$VXDUMP"; then
-   echo "$as_me:$LINENO: result: $VXDUMP" >&5
- echo "${ECHO_T}$VXDUMP" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
-   test -n "$VXDUMP" && break
- done
- for ac_prog in vxrestore
- 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_path_VXRESTORE+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $VXRESTORE in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_VXRESTORE="$VXRESTORE" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $VXSYSLOCPATH
- 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_VXRESTORE="$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
- VXRESTORE=$ac_cv_path_VXRESTORE
- if test -n "$VXRESTORE"; then
-   echo "$as_me:$LINENO: result: $VXRESTORE" >&5
- echo "${ECHO_T}$VXRESTORE" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
-   test -n "$VXRESTORE" && break
- done
- if test "$VXDUMP" -a "$VXRESTORE"; then
  
  cat >>confdefs.h <<_ACEOF
- #define VXDUMP "$VXDUMP"
+ #define COMPRESS_FAST_OPT "$COMPRESS_FAST_OPT"
  _ACEOF
  
  
  cat >>confdefs.h <<_ACEOF
- #define VXRESTORE "$VXRESTORE"
+ #define COMPRESS_BEST_OPT "$COMPRESS_BEST_OPT"
  _ACEOF
  
- fi
- for ac_prog in vdump
- 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_path_VDUMP+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $VDUMP in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_VDUMP="$VDUMP" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $SYSLOCPATH
- 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_VDUMP="$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
- VDUMP=$ac_cv_path_VDUMP
- if test -n "$VDUMP"; then
-   echo "$as_me:$LINENO: result: $VDUMP" >&5
- echo "${ECHO_T}$VDUMP" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
-   test -n "$VDUMP" && break
- done
- for ac_prog in vrestore
- 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_path_VRESTORE+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $VRESTORE in
-   [\\/]* | ?:[\\/]*)
-   ac_cv_path_VRESTORE="$VRESTORE" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $SYSLOCPATH
- 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_VRESTORE="$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
- VRESTORE=$ac_cv_path_VRESTORE
- if test -n "$VRESTORE"; then
-   echo "$as_me:$LINENO: result: $VRESTORE" >&5
- echo "${ECHO_T}$VRESTORE" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
-   test -n "$VRESTORE" && break
- done
- if test "$VDUMP" -a "$VRESTORE"; then
  
  cat >>confdefs.h <<_ACEOF
- #define VDUMP "$VDUMP"
+ #define UNCOMPRESS_PATH "$UNCOMPRESS_PATH"
  _ACEOF
  
  
  cat >>confdefs.h <<_ACEOF
- #define VRESTORE "$VRESTORE"
+ #define UNCOMPRESS_OPT "$UNCOMPRESS_OPT"
  _ACEOF
  
- fi
- if test "$PCAT"; then
-     AMPLOT_CAT_PACK="if(o==\"z\")print \"$PCAT\"; else"
- else
-     AMPLOT_CAT_PACK=
- fi
- if test "$COMPRESS"; then
-     AMPLOT_COMPRESS=$COMPRESS
-     AMPLOT_CAT_COMPRESS="if(o==\"Z\")print \"$COMPRESS -dc\"; else"
- else
-     AMPLOT_CAT_COMPRESS=
- fi
- if test "$GZIP"; then
-     AMPLOT_COMPRESS=$GZIP
-     AMPLOT_CAT_GZIP="if(o==\"gz\")print \"$GZIP -dc\"; else"
- else
-     AMPLOT_CAT_GZIP=
- fi
  
+     # Empty GZIP so that make dist works.
+     GZIP=
  
  
- echo "$as_me:$LINENO: checking if sockaddr_storage struct exists" >&5
- echo $ECHO_N "checking if sockaddr_storage struct exists... $ECHO_C" >&6
    if test "${ac_cv_has_sockaddr_storage+set}" = set; then
    { echo "$as_me:$LINENO: checking if sockaddr_storage struct exists" >&5
+ echo $ECHO_N "checking if sockaddr_storage struct exists... $ECHO_C" >&6; }
+ if test "${ac_cv_has_sockaddr_storage+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+       cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
@@@ -19163,39 -22307,36 +22523,36 @@@ u_int i = sizeof (struct sockaddr_stora
  }
  _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_has_sockaddr_storage=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_has_sockaddr_storage=no
      ac_cv_has_sockaddr_storage=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_has_sockaddr_storage" >&5
+ echo "${ECHO_T}$ac_cv_has_sockaddr_storage" >&6; }
  
-     echo "$as_me:$LINENO: result: $ac_cv_has_sockaddr_storage" >&5
- echo "${ECHO_T}$ac_cv_has_sockaddr_storage" >&6
      if test $ac_cv_has_sockaddr_storage = yes ; then
  
  cat >>confdefs.h <<\_ACEOF
  
      fi
  
- # Determine the printf format characters to use when printing
- # values of type long long. This will normally be "ll", but where
- # the compiler treats "long long" as a alias for "long" and printf
- # doesn't know about "long long" use "l".  Hopefully the sprintf
- # will produce a inconsistant result in the later case.  If the compiler
- # fails due to seeing "%lld" we fall back to "l".
- #
- # Win32 uses "%I64d", but that's defined elsewhere since we don't use
- # configure on Win32.
- #
- echo "$as_me:$LINENO: checking printf format modifier for 64-bit integers" >&5
- echo $ECHO_N "checking printf format modifier for 64-bit integers... $ECHO_C" >&6
- if test "$cross_compiling" = yes; then
-   echo "$as_me:$LINENO: result: assuming target platform uses ll" >&5
- echo "${ECHO_T}assuming target platform uses ll" >&6
-       LL_FMT="%lld"; LL_RFMT="lld"
+     WORKING_IPV6=no
+ # Check whether --with-ipv6 was given.
+ if test "${with_ipv6+set}" = set; then
+   withval=$with_ipv6;
+           case "$withval" in
+           y | ye | yes) amanda_with_ipv6=yes;;
+           n | no) amanda_with_ipv6=no;;
+           *)
+               { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-ipv6 option." >&5
+ echo "$as_me: error: *** You must not supply an argument to --with-ipv6 option." >&2;}
+    { (exit 1); exit 1; }; }
+             ;;
+           esac
+ else
+           amanda_with_ipv6=maybe
+ fi
+     if test x"$amanda_with_ipv6" = x"yes" ||
+        test x"$amanda_with_ipv6" = x"maybe" ; then
+       { echo "$as_me:$LINENO: checking for working IPv6" >&5
+ echo $ECHO_N "checking for working IPv6... $ECHO_C" >&6; }
+ if test "${amanda_cv_working_ipv6+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+           case "$target" in
+               *-pc-cygwin) amanda_cv_working_ipv6=no;;
+               *)
+                   if test "$cross_compiling" = yes; then
+    amanda_cv_working_ipv6=yes
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -19228,544 -22393,397 +22609,397 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- #include <stdio.h>
- main() {
-       long long int j = 0;
-       char buf[100];
-       buf[0] = 0;
-       sprintf(buf, "%lld", j);
-       exit((sizeof(long long int) != sizeof(long int))? 0 :
-            (strcmp(buf, "0") != 0));
- }
+ #include <sys/types.h>
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+ #ifdef HAVE_WINSOCK2_H
+ #include <winsock2.h>
+ #endif
+ #include <sys/socket.h>
+ #include <errno.h>
  
+ main()
+ {
+    int aa;
+    aa = socket(AF_INET6, SOCK_STREAM, 0);
+    if (aa > 0) return 0;
+    return aa;
+ }
  _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
-   echo "$as_me:$LINENO: result: ll" >&5
- echo "${ECHO_T}ll" >&6
-       LL_FMT="%lld"; LL_RFMT="lld"
+    amanda_cv_working_ipv6=yes
  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: result: l" >&5
- echo "${ECHO_T}l" >&6
-       LL_FMT="%ld"; LL_RFMT="ld"
+  amanda_cv_working_ipv6=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
  
- cat >>confdefs.h <<_ACEOF
- #define LL_FMT "$LL_FMT"
- _ACEOF
- cat >>confdefs.h <<_ACEOF
- #define LL_RFMT "$LL_RFMT"
- _ACEOF
  
+           esac
  
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_working_ipv6" >&5
+ echo "${ECHO_T}$amanda_cv_working_ipv6" >&6; }
  
- GZIP=
+       if test "$amanda_cv_working_ipv6" = yes; then
+           WORKING_IPV6=yes
  
- need_resetofs=yes
- echo "$as_me:$LINENO: checking for large file compilation CFLAGS" >&5
- echo $ECHO_N "checking for large file compilation CFLAGS... $ECHO_C" >&6
- if test "${amanda_cv_LFS_CFLAGS+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+ cat >>confdefs.h <<\_ACEOF
+ #define WORKING_IPV6 1
+ _ACEOF
  
-       amanda_cv_LFS_CFLAGS=
-       if test "$GETCONF"; then
-           if $GETCONF ${GETCONF_LFS}_CFLAGS >/dev/null 2>&1; then
-               amanda_cv_LFS_CFLAGS=`$GETCONF ${GETCONF_LFS}_CFLAGS 2>/dev/null`
-               need_resetofs=no
+       else
+           # error out only if the user specifically requested support
+           if test x"$amanda_with_ipv6" = x"yes"; then
+               { { echo "$as_me:$LINENO: error: IPv6 support was requested, but it is not working." >&5
+ echo "$as_me: error: IPv6 support was requested, but it is not working." >&2;}
+    { (exit 1); exit 1; }; }
            fi
        fi
+     fi
  
  
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_LFS_CFLAGS" >&5
- echo "${ECHO_T}$amanda_cv_LFS_CFLAGS" >&6
- echo "$as_me:$LINENO: checking for large file compilation LDFLAGS" >&5
- echo $ECHO_N "checking for large file compilation LDFLAGS... $ECHO_C" >&6
- if test "${amanda_cv_LFS_LDFLAGS+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
  
-       amanda_cv_LFS_LDFLAGS=
-       if test "$GETCONF"; then
-           if $GETCONF ${GETCONF_LFS}_LDFLAGS >/dev/null 2>&1; then
-               amanda_cv_LFS_LDFLAGS=`$GETCONF ${GETCONF_LFS}_LDFLAGS 2>/dev/null`
-               need_resetofs=no
-           fi
-       fi
  
+ # Check whether --with-mmap was given.
+ if test "${with_mmap+set}" = set; then
+   withval=$with_mmap;
+           case "$FORCE_MMAP" in
+               y | ye | yes | n | no) : ;;
+               *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-mmap." >&5
+ echo "$as_me: error: *** You must not supply an argument to --with-mmap." >&2;}
+    { (exit 1); exit 1; }; } ;;
+           esac
+           FORCE_MMAP=$withval
  
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_LFS_LDFLAGS" >&5
- echo "${ECHO_T}$amanda_cv_LFS_LDFLAGS" >&6
- echo "$as_me:$LINENO: checking for large file compilation LIBS" >&5
- echo $ECHO_N "checking for large file compilation LIBS... $ECHO_C" >&6
- if test "${amanda_cv_LFS_LIBS+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-       amanda_cv_LFS_LIBS=
-       if test "$GETCONF"; then
-           if $GETCONF ${GETCONF_LFS}_LIBS >/dev/null 2>&1; then
-               amanda_cv_LFS_LIBS=`$GETCONF ${GETCONF_LFS}_LIBS 2>/dev/null`
-               need_resetofs=no
-           fi
-       fi
+    : ${FORCE_MMAP=no}
  
  fi
- echo "$as_me:$LINENO: result: $amanda_cv_LFS_LIBS" >&5
- echo "${ECHO_T}$amanda_cv_LFS_LIBS" >&6
- if test "x$need_resetofs" = xyes; then
  
- cat >>confdefs.h <<\_ACEOF
- #define NEED_RESETOFS 1
- _ACEOF
  
- fi
  
  
- CFLAGS="$amanda_cv_LFS_CFLAGS $CFLAGS"
- CPPFLAGS="$amanda_cv_LFS_CPPFLAGS $CPPFLAGS"
- LDFLAGS="$amanda_cv_LFS_LDFLAGS $LDFLAGS"
- LIBS="$amanda_cv_LFS_LIBS $LIBS"
  
- echo "$as_me:$LINENO: checking for int" >&5
- echo $ECHO_N "checking for int... $ECHO_C" >&6
- if test "${ac_cv_type_int+set}" = set; then
+ for ac_header in \
+           sys/shm.h \
+           sys/mman.h \
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   # 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
- int
- main ()
- {
- if ((int *) 0)
-   return 0;
- if (sizeof (int))
-   return 0;
-   ;
-   return 0;
- }
+ #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
-   ac_cv_type_int=yes
+   (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_cv_type_int=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_header_compiler=no
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
- echo "${ECHO_T}$ac_cv_type_int" >&6
  
- echo "$as_me:$LINENO: checking size of int" >&5
- echo $ECHO_N "checking size of int... $ECHO_C" >&6
- if test "${ac_cv_sizeof_int+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test "$ac_cv_type_int" = 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 (int))) >= 0)];
- test_array [0] = 0
+ 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; }
  
-   ;
-   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
+ # 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.  */
- $ac_includes_default
- int
- main ()
- {
- static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
- test_array [0] = 0
-   ;
-   return 0;
- }
+ #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_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); } &&
-        { 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
+   (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
  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`
+   ac_header_preproc=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   done
+ 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;}
+     ;;
+ esac
+ { 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
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
+ fi
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _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 (int))) < 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
+ fi
+ done
+ for ac_header in stdlib.h unistd.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ 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; }
+ 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 (int))) >= $ac_mid)];
- test_array [0] = 0
-   ;
-   return 0;
- }
+ #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
-   ac_lo=$ac_mid; break
+   (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_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`
+       ac_header_compiler=no
  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
+ 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; }
+ 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 (int))) <= $ac_mid)];
- test_array [0] = 0
-   ;
-   return 0;
- }
+ #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_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); } &&
-        { 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
+   (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
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_lo=`expr '(' $ac_mid ')' + 1`
+   ac_header_preproc=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- case $ac_lo in
- ?*) ac_cv_sizeof_int=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (int), 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 (int)); }
- unsigned long ulongval () { return (long) (sizeof (int)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (int))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (int))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (int))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
+ rm -f conftest.err conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6; }
  
-   ;
-   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_int=`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
+ # 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;}
  
- ( exit $ac_status )
- { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (int), 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
+     ;;
+ esac
+ { 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
-   ac_cv_sizeof_int=0
+   eval "$as_ac_Header=\$ac_header_preproc"
  fi
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
- echo "${ECHO_T}$ac_cv_sizeof_int" >&6
- cat >>confdefs.h <<_ACEOF
- #define SIZEOF_INT $ac_cv_sizeof_int
+ 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
  
- echo "$as_me:$LINENO: checking for long" >&5
- echo $ECHO_N "checking for long... $ECHO_C" >&6
- if test "${ac_cv_type_long+set}" = set; then
+ for ac_func in getpagesize
+ 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 { 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
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
+ /* 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 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
+ 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
+ #endif
  int
  main ()
  {
- if ((long *) 0)
-   return 0;
- if (sizeof (long))
-   return 0;
+ return $ac_func ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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_long=yes
+   (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
  
- ac_cv_type_long=no
+       eval "$as_ac_var=no"
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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_type_long" >&5
- echo "${ECHO_T}$ac_cv_type_long" >&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 size of long" >&5
- echo $ECHO_N "checking size of long... $ECHO_C" >&6
- if test "${ac_cv_sizeof_long+set}" = set; then
+ fi
+ done
+ { echo "$as_me:$LINENO: checking for working mmap" >&5
+ echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
+ if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test "$ac_cv_type_long" = 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
+   ac_cv_func_mmap_fixed_mapped=no
+ 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 ()
- {
- static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
- test_array [0] = 0
+ /* malloc might have been renamed as rpl_malloc. */
+ #undef malloc
  
-   ;
-   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 (long))) <= $ac_mid)];
- test_array [0] = 0
+ /* Thanks to Mike Haertel and Jim Avera for this test.
+    Here is a matrix of mmap possibilities:
+       mmap private not fixed
+       mmap private fixed at somewhere currently unmapped
+       mmap private fixed at somewhere already mapped
+       mmap shared not fixed
+       mmap shared fixed at somewhere currently unmapped
+       mmap shared fixed at somewhere already mapped
+    For private mappings, we should verify that changes cannot be read()
+    back from the file, nor mmap's back from the file at a different
+    address.  (There have been systems where private was not correctly
+    implemented like the infamous i386 svr4.0, and systems where the
+    VM page cache was not coherent with the file system buffer cache
+    like early versions of FreeBSD and possibly contemporary NetBSD.)
+    For shared mappings, we should conversely verify that changes get
+    propagated back to all the places they're supposed to be.
  
-   ;
-   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
+    Grep wants private fixed already mapped.
+    The main things grep needs to know about mmap are:
+    * does it exist and is it safe to write into the mmap'd area
+    * how to use it (BSD variants)  */
  
- 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
+ #include <fcntl.h>
+ #include <sys/mman.h>
  
- 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 (long))) < 0)];
- test_array [0] = 0
+ #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+ char *malloc ();
+ #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_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 (long))) >= $ac_mid)];
- test_array [0] = 0
+ /* This mess was copied from the GNU getpagesize.h.  */
+ #ifndef HAVE_GETPAGESIZE
+ /* Assume that all systems that can run configure have sys/param.h.  */
+ # ifndef HAVE_SYS_PARAM_H
+ #  define HAVE_SYS_PARAM_H 1
+ # 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_lo=$ac_mid; break
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ # ifdef _SC_PAGESIZE
+ #  define getpagesize() sysconf(_SC_PAGESIZE)
+ # else /* no _SC_PAGESIZE */
+ #  ifdef HAVE_SYS_PARAM_H
+ #   include <sys/param.h>
+ #   ifdef EXEC_PAGESIZE
+ #    define getpagesize() EXEC_PAGESIZE
+ #   else /* no EXEC_PAGESIZE */
+ #    ifdef NBPG
+ #     define getpagesize() NBPG * CLSIZE
+ #     ifndef CLSIZE
+ #      define CLSIZE 1
+ #     endif /* no CLSIZE */
+ #    else /* no NBPG */
+ #     ifdef NBPC
+ #      define getpagesize() NBPC
+ #     else /* no NBPC */
+ #      ifdef PAGESIZE
+ #       define getpagesize() PAGESIZE
+ #      endif /* PAGESIZE */
+ #     endif /* no NBPC */
+ #    endif /* no NBPG */
+ #   endif /* no EXEC_PAGESIZE */
+ #  else /* no HAVE_SYS_PARAM_H */
+ #   define getpagesize() 8192 /* punt totally */
+ #  endif /* no HAVE_SYS_PARAM_H */
+ # endif /* no _SC_PAGESIZE */
  
- 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
+ #endif /* no HAVE_GETPAGESIZE */
  
- 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 (long))) <= $ac_mid)];
- test_array [0] = 0
+   char *data, *data2, *data3;
+   int i, pagesize;
+   int fd;
  
-   ;
-   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
+   pagesize = getpagesize ();
  
- 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_long=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (long), 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 (long)); }
- unsigned long ulongval () { return (long) (sizeof (long)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
+   /* First, make a file with some known garbage in it. */
+   data = (char *) malloc (pagesize);
+   if (!data)
+     return 1;
+   for (i = 0; i < pagesize; ++i)
+     *(data + i) = rand ();
+   umask (0);
+   fd = creat ("conftest.mmap", 0600);
+   if (fd < 0)
+     return 1;
+   if (write (fd, data, pagesize) != pagesize)
+     return 1;
+   close (fd);
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (long))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (long))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (long))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
+   /* Next, try to mmap the file at a fixed address which already has
+      something else allocated at it.  If we can, also make sure that
+      we see the same garbage.  */
+   fd = open ("conftest.mmap", O_RDWR);
+   if (fd < 0)
+     return 1;
+   data2 = (char *) malloc (2 * pagesize);
+   if (!data2)
+     return 1;
+   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
+   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+                    MAP_PRIVATE | MAP_FIXED, fd, 0L))
+     return 1;
+   for (i = 0; i < pagesize; ++i)
+     if (*(data + i) != *(data2 + i))
+       return 1;
  
-   ;
+   /* Finally, make sure that changes to the mapped area do not
+      percolate back to the file as seen by read().  (This is a bug on
+      some variants of i386 svr4.0.)  */
+   for (i = 0; i < pagesize; ++i)
+     *(data2 + i) = *(data2 + i) + 1;
+   data3 = (char *) malloc (pagesize);
+   if (!data3)
+     return 1;
+   if (read (fd, data3, pagesize) != pagesize)
+     return 1;
+   for (i = 0; i < pagesize; ++i)
+     if (*(data + i) != *(data3 + i))
+       return 1;
+   close (fd);
    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
-   ac_cv_sizeof_long=`cat conftest.val`
+   ac_cv_func_mmap_fixed_mapped=yes
  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 (long), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (long), 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
+ ac_cv_func_mmap_fixed_mapped=no
  fi
- rm -f conftest.val
- else
-   ac_cv_sizeof_long=0
+ 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_sizeof_long" >&5
- echo "${ECHO_T}$ac_cv_sizeof_long" >&6
- cat >>confdefs.h <<_ACEOF
- #define SIZEOF_LONG $ac_cv_sizeof_long
+ { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+ echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
+ if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_MMAP 1
  _ACEOF
  
+ fi
+ rm -f conftest.mmap
  
- 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
+ for ac_func in shmget
+ 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 { 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
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
+ /* 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 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
+ 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
+ #endif
  int
  main ()
  {
- if ((long long *) 0)
-   return 0;
- if (sizeof (long long))
-   return 0;
+ return $ac_func ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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_long_long=yes
+   (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
  
- ac_cv_type_long_long=no
+       eval "$as_ac_var=no"
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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_type_long_long" >&5
- echo "${ECHO_T}$ac_cv_type_long_long" >&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 size of long long" >&5
- echo $ECHO_N "checking size of long long... $ECHO_C" >&6
- if test "${ac_cv_sizeof_long_long+set}" = set; then
+ for ac_header in sys/types.h \
+           sys/ipc.h \
+           sys/shm.h \
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   if test "$ac_cv_type_long_long" = 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.
+   # 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
@@@ -20253,347 -23179,519 +23395,519 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  $ac_includes_default
- int
- main ()
- {
- static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 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 (long long))) <= $ac_mid)];
- test_array [0] = 0
-   ;
-   return 0;
- }
+ #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
-   ac_hi=$ac_mid; break
+   (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_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`
+       ac_header_compiler=no
  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
  
+ 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; }
  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 (long long))) < 0)];
- test_array [0] = 0
-   ;
-   return 0;
- }
+ #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_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); } &&
-        { 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
+   (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
+ 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;}
+     ;;
+ esac
+ { 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
+ 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
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ fi
+ done
+       { echo "$as_me:$LINENO: checking for shmdt() argument type" >&5
+ echo $ECHO_N "checking for shmdt() argument type... $ECHO_C" >&6; }
+ if test "${amanda_cv_shmdt_arg_type+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+               if test "$ac_cv_func_shmget" = yes; then
+                   cat <<EOF >conftest.$ac_ext
+ #include "confdefs.h"
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_IPC_H
+ # include <sys/ipc.h>
+ #endif
+ #ifdef HAVE_SYS_SHM_H
+ # include <sys/shm.h>
+ #endif
+ #ifdef __cplusplus
+ extern "C" void *shmat(int, void *, int);
+ #else
+ void *shmat();
+ #endif
+ int main()
+ {
+     int i;
+     return 0;
+ }
+ EOF
+                   ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >/dev/null 2>/dev/null
+                   if test $? = 0; then
+                       amanda_cv_shmdt_arg_type=void
+                   else
+                       amanda_cv_shmdt_arg_type=char
+                   fi
+                   rm -f conftest*
+               else
+                   amanda_cv_shmdt_arg_type=nothing
+               fi
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_shmdt_arg_type" >&5
+ echo "${ECHO_T}$amanda_cv_shmdt_arg_type" >&6; }
+ cat >>confdefs.h <<_ACEOF
+ #define SHM_ARG_TYPE $amanda_cv_shmdt_arg_type
+ _ACEOF
+           case "$FORCE_MMAP" in
+           n | no)
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_SYSVSHM 1
+ _ACEOF
+             ;;
+           esac
+ fi
+ done
+ ice_have_shmat=no
+ for ac_func in shmat
+ 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 { 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
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
+ /* 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 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
+ 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
+ #endif
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
- test_array [0] = 0
+ return $ac_func ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
  
- 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`
+       eval "$as_ac_var=no"
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   done
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
+  ice_have_shmat=yes
+ fi
+ done
+ if test "${ice_have_shmat}" = yes; then
+ { echo "$as_me:$LINENO: checking for shmat declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
+ echo $ECHO_N "checking for shmat declaration in sys/types.h sys/ipc.h sys/shm.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_shmat_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_lo= ac_hi=
+ ice_cv_have_shmat_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in sys/types.h sys/ipc.h sys/shm.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}shmat[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_shmat_decl=yes
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f conftest*
+ if test "$ice_cv_have_shmat_decl" = yes; then
+       break
  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`
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}shmat[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_shmat_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_shmat_decl" = yes; then
+       break
+ fi
+ done
+ fi
+ { echo "$as_me:$LINENO: result: $ice_cv_have_shmat_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_shmat_decl" >&6; }
+ if test "$ice_cv_have_shmat_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SHMAT_DECL 1
+ _ACEOF
+ fi
+ fi
+ ice_have_shmctl=no
+ for ac_func in shmctl
+ 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 { 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
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
+ /* 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 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
+ 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
+ #endif
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
- test_array [0] = 0
+ return $ac_func ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
  
- ac_lo=`expr '(' $ac_mid ')' + 1`
+       eval "$as_ac_var=no"
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
+  ice_have_shmctl=yes
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
- case $ac_lo in
- ?*) ac_cv_sizeof_long_long=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (long long), 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; }; }
+ if test "${ice_have_shmctl}" = yes; then
+ { echo "$as_me:$LINENO: checking for shmctl declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
+ echo $ECHO_N "checking for shmctl declaration in sys/types.h sys/ipc.h sys/shm.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_shmctl_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+ ice_cv_have_shmctl_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in sys/types.h sys/ipc.h sys/shm.h; do
+ # Check for ordinary declaration
+ 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 (long long)); }
- unsigned long ulongval () { return (long) (sizeof (long long)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (long long))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (long long))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (long long))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
+ #include <$header>
  
-   ;
-   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_long_long=`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 (long long), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (long long), 77
- See \`config.log' for more details." >&2;}
-    { (exit 1); exit 1; }; }
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}shmctl[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_shmctl_decl=yes
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ rm -f conftest*
+ if test "$ice_cv_have_shmctl_decl" = yes; then
+       break
  fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}shmctl[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_shmctl_decl=yes
  fi
- rm -f conftest.val
- else
-   ac_cv_sizeof_long_long=0
+ rm -f conftest*
+ if test "$ice_cv_have_shmctl_decl" = yes; then
+       break
  fi
+ done
  fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
- echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
+ { echo "$as_me:$LINENO: result: $ice_cv_have_shmctl_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_shmctl_decl" >&6; }
+ if test "$ice_cv_have_shmctl_decl" = yes; then
  cat >>confdefs.h <<_ACEOF
- #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+ #define HAVE_SHMCTL_DECL 1
  _ACEOF
  
+ fi
+ fi
  
- echo "$as_me:$LINENO: checking for intmax_t" >&5
- echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6
- if test "${ac_cv_type_intmax_t+set}" = set; then
+ ice_have_shmdt=no
+ for ac_func in shmdt
+ 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 { 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
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
+ /* 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 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
+ 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
+ #endif
  int
  main ()
  {
- if ((intmax_t *) 0)
-   return 0;
- if (sizeof (intmax_t))
-   return 0;
+ return $ac_func ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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_intmax_t=yes
+   (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
  
- ac_cv_type_intmax_t=no
+       eval "$as_ac_var=no"
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
+  ice_have_shmdt=yes
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5
- echo "${ECHO_T}$ac_cv_type_intmax_t" >&6
+ done
  
- echo "$as_me:$LINENO: checking size of intmax_t" >&5
- echo $ECHO_N "checking size of intmax_t... $ECHO_C" >&6
- if test "${ac_cv_sizeof_intmax_t+set}" = set; then
+ if test "${ice_have_shmdt}" = yes; then
+ { echo "$as_me:$LINENO: checking for shmdt declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
+ echo $ECHO_N "checking for shmdt declaration in sys/types.h sys/ipc.h sys/shm.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_shmdt_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test "$ac_cv_type_intmax_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.
+ ice_cv_have_shmdt_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in sys/types.h sys/ipc.h sys/shm.h; do
+ # Check for ordinary declaration
  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 (intmax_t))) >= 0)];
- test_array [0] = 0
+ #include <$header>
  
-   ;
-   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
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}shmdt[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_shmdt_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_shmdt_decl" = yes; then
+       break
+ fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ 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 <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}shmdt[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_shmdt_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_shmdt_decl" = yes; then
+       break
+ fi
+ done
+ fi
+ { echo "$as_me:$LINENO: result: $ice_cv_have_shmdt_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_shmdt_decl" >&6; }
+ if test "$ice_cv_have_shmdt_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SHMDT_DECL 1
+ _ACEOF
+ fi
+ fi
+ ice_have_shmget=no
+ for ac_func in shmget
+ 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 { 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
+ /* 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 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
+ 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
+ #endif
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (intmax_t))) <= $ac_mid)];
- test_array [0] = 0
+ return $ac_func ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
  
- 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`
+       eval "$as_ac_var=no"
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   done
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
+  ice_have_shmget=yes
+ fi
+ done
+ if test "${ice_have_shmget}" = yes; then
+ { echo "$as_me:$LINENO: checking for shmget declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
+ echo $ECHO_N "checking for shmget declaration in sys/types.h sys/ipc.h sys/shm.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_shmget_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
+ ice_cv_have_shmget_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in sys/types.h sys/ipc.h sys/shm.h; do
+ # Check for ordinary declaration
  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 (intmax_t))) < 0)];
- test_array [0] = 0
+ #include <$header>
  
-   ;
-   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
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}shmget[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_shmget_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_shmget_decl" = yes; then
+       break
+ fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ 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 <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}shmget[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_shmget_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_shmget_decl" = yes; then
+       break
+ fi
+ done
+ fi
+ { echo "$as_me:$LINENO: result: $ice_cv_have_shmget_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_shmget_decl" >&6; }
+ if test "$ice_cv_have_shmget_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SHMGET_DECL 1
+ _ACEOF
+ fi
+ fi
+     if test "x$ac_cv_func_mmap_fixed_mapped" != xyes; then
+       case "$FORCE_MMAP" in
+       n | no)
+           if test "x$ac_cv_func_shmget" != xyes; then
+     { echo "$as_me:$LINENO: WARNING: Neither shmget() nor mmap() found. This system will not support the Amanda server." >&5
+ echo "$as_me: WARNING: Neither shmget() nor mmap() found. This system will not support the Amanda server." >&2;}
+     cat <<AAW_EOF >>config.warnings
+ Neither shmget() nor mmap() found. This system will not support the Amanda server.
+ AAW_EOF
+               NO_SERVER_MODE=true
+           fi
+         ;;
+       y | ye | yes)
+     { echo "$as_me:$LINENO: WARNING: --with-mmap used on a system with no mmap() support.  This system will not support the Amanda server." >&5
+ echo "$as_me: WARNING: --with-mmap used on a system with no mmap() support.  This system will not support the Amanda server." >&2;}
+     cat <<AAW_EOF >>config.warnings
+ --with-mmap used on a system with no mmap() support.  This system will not support the Amanda server.
+ AAW_EOF
+           NO_SERVER_MODE=true
+         ;;
+       esac
+     fi
+ ac_header_dirent=no
+ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+ { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+ echo $ECHO_N "checking for $ac_hdr that defines DIR... $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
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+ #include <$ac_hdr>
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (intmax_t))) >= $ac_mid)];
- test_array [0] = 0
+ if ((DIR *) 0)
+ 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
-   ac_lo=$ac_mid; break
+   (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
  
- 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`
+       eval "$as_ac_Header=no"
  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=
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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_hdr" | $as_tr_cpp` 1
+ _ACEOF
+ ac_header_dirent=$ac_hdr; break
  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
+ done
+ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+ if test $ac_header_dirent = dirent.h; then
+   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
+ echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
+ if test "${ac_cv_search_opendir+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_func_search_save_LIBS=$LIBS
+ 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
+ /* 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
+ char opendir ();
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (intmax_t))) <= $ac_mid)];
- test_array [0] = 0
+ return opendir ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ for ac_lib in '' dir; do
+   if test -z "$ac_lib"; then
+     ac_res="none required"
+   else
+     ac_res=-l$ac_lib
+     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+   fi
+   rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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_search_opendir=$ac_res
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext
+   if test "${ac_cv_search_opendir+set}" = set; then
+   break
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  done
- case $ac_lo in
- ?*) ac_cv_sizeof_intmax_t=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (intmax_t), 77
- See \`config.log' for more details." >&2;}
-    { (exit 1); exit 1; }; } ;;
- esac
+ if test "${ac_cv_search_opendir+set}" = set; then
+   :
  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; }; }
+   ac_cv_search_opendir=no
+ fi
+ rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+ echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
+ ac_res=$ac_cv_search_opendir
+ if test "$ac_res" != no; then
+   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ fi
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
+ echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
+ if test "${ac_cv_search_opendir+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_func_search_save_LIBS=$LIBS
+ 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 (intmax_t)); }
- unsigned long ulongval () { return (long) (sizeof (intmax_t)); }
- #include <stdio.h>
- #include <stdlib.h>
+ /* 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
+ char opendir ();
  int
  main ()
  {
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (intmax_t))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (intmax_t))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (intmax_t))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
+ return opendir ();
    ;
    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
+ for ac_lib in '' x; do
+   if test -z "$ac_lib"; then
+     ac_res="none required"
+   else
+     ac_res=-l$ac_lib
+     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+   fi
+   rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); }; }; then
-   ac_cv_sizeof_intmax_t=`cat conftest.val`
+   (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_search_opendir=$ac_res
  else
-   echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&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 (intmax_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (intmax_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
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext
+   if test "${ac_cv_search_opendir+set}" = set; then
+   break
  fi
- rm -f conftest.val
+ done
+ if test "${ac_cv_search_opendir+set}" = set; then
+   :
  else
-   ac_cv_sizeof_intmax_t=0
+   ac_cv_search_opendir=no
  fi
+ rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
  fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_intmax_t" >&5
- echo "${ECHO_T}$ac_cv_sizeof_intmax_t" >&6
- cat >>confdefs.h <<_ACEOF
- #define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t
- _ACEOF
{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+ echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
+ ac_res=$ac_cv_search_opendir
+ if test "$ac_res" != no; then
+   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
+ fi
  
- echo "$as_me:$LINENO: checking for off_t" >&5
- echo $ECHO_N "checking for off_t... $ECHO_C" >&6
- if test "${ac_cv_type_off_t+set}" = set; then
+ fi
+     # include the dirent headers as described in the autoconf documentation.
+     { echo "$as_me:$LINENO: checking whether readdir is declared" >&5
+ echo $ECHO_N "checking whether readdir is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl_readdir+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
+ #if HAVE_DIRENT_H
+ # include <dirent.h>
+ # define NAMLEN(dirent) strlen((dirent)->d_name)
+ #else
+ # define dirent direct
+ # define NAMLEN(dirent) (dirent)->d_namlen
+ # if HAVE_SYS_NDIR_H
+ #  include <sys/ndir.h>
+ # endif
+ # if HAVE_SYS_DIR_H
+ #  include <sys/dir.h>
+ # endif
+ # if HAVE_NDIR_H
+ #  include <ndir.h>
+ # endif
+ #endif
  int
  main ()
  {
- if ((off_t *) 0)
-   return 0;
- if (sizeof (off_t))
-   return 0;
+ #ifndef readdir
+   (void) readdir;
+ #endif
    ;
    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
-   ac_cv_type_off_t=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_have_decl_readdir=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_type_off_t=no
      ac_cv_have_decl_readdir=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_off_t" >&5
- echo "${ECHO_T}$ac_cv_type_off_t" >&6
+ { echo "$as_me:$LINENO: result: $ac_cv_have_decl_readdir" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_readdir" >&6; }
+ if test $ac_cv_have_decl_readdir = yes; then
  
- echo "$as_me:$LINENO: checking size of off_t" >&5
- echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
- if test "${ac_cv_sizeof_off_t+set}" = set; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_READDIR 1
+ _ACEOF
+ else
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_READDIR 0
+ _ACEOF
+ fi
+ { echo "$as_me:$LINENO: checking whether readdir_r is declared" >&5
+ echo $ECHO_N "checking whether readdir_r is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl_readdir_r+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test "$ac_cv_type_off_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
+   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
+ #if HAVE_DIRENT_H
+ # include <dirent.h>
+ # define NAMLEN(dirent) strlen((dirent)->d_name)
+ #else
+ # define dirent direct
+ # define NAMLEN(dirent) (dirent)->d_namlen
+ # if HAVE_SYS_NDIR_H
+ #  include <sys/ndir.h>
+ # endif
+ # if HAVE_SYS_DIR_H
+ #  include <sys/dir.h>
+ # endif
+ # if HAVE_NDIR_H
+ #  include <ndir.h>
+ # endif
+ #endif
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= 0)];
- test_array [0] = 0
+ #ifndef readdir_r
+   (void) readdir_r;
+ #endif
  
    ;
    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
-   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 (off_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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_have_decl_readdir_r=yes
  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`
+       ac_cv_have_decl_readdir_r=no
  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.  */
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_have_decl_readdir_r" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_readdir_r" >&6; }
+ if test $ac_cv_have_decl_readdir_r = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_READDIR_R 1
  _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 (off_t))) < 0)];
- test_array [0] = 0
  
-   ;
-   return 0;
- }
+ else
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_READDIR_R 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
+ fi
+ { echo "$as_me:$LINENO: checking whether readdir64 is declared" >&5
+ echo $ECHO_N "checking whether readdir64 is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl_readdir64+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
+ #if HAVE_DIRENT_H
+ # include <dirent.h>
+ # define NAMLEN(dirent) strlen((dirent)->d_name)
+ #else
+ # define dirent direct
+ # define NAMLEN(dirent) (dirent)->d_namlen
+ # if HAVE_SYS_NDIR_H
+ #  include <sys/ndir.h>
+ # endif
+ # if HAVE_SYS_DIR_H
+ #  include <sys/dir.h>
+ # endif
+ # if HAVE_NDIR_H
+ #  include <ndir.h>
+ # endif
+ #endif
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= $ac_mid)];
- test_array [0] = 0
+ #ifndef readdir64
+   (void) readdir64;
+ #endif
  
    ;
    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
-   ac_lo=$ac_mid; break
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_have_decl_readdir64=yes
  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`
+       ac_cv_have_decl_readdir64=no
  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=
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ac_cv_have_decl_readdir64" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_readdir64" >&6; }
+ if test $ac_cv_have_decl_readdir64 = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_READDIR64 1
+ _ACEOF
+ else
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_READDIR64 0
+ _ACEOF
  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`
+ { echo "$as_me:$LINENO: checking whether readdir64_r is declared" >&5
+ echo $ECHO_N "checking whether readdir64_r is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl_readdir64_r+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
+ #if HAVE_DIRENT_H
+ # include <dirent.h>
+ # define NAMLEN(dirent) strlen((dirent)->d_name)
+ #else
+ # define dirent direct
+ # define NAMLEN(dirent) (dirent)->d_namlen
+ # if HAVE_SYS_NDIR_H
+ #  include <sys/ndir.h>
+ # endif
+ # if HAVE_SYS_DIR_H
+ #  include <sys/dir.h>
+ # endif
+ # if HAVE_NDIR_H
+ #  include <ndir.h>
+ # endif
+ #endif
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)];
- test_array [0] = 0
+ #ifndef readdir64_r
+   (void) readdir64_r;
+ #endif
  
    ;
    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
-   ac_hi=$ac_mid
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_have_decl_readdir64_r=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_lo=`expr '(' $ac_mid ')' + 1`
+       ac_cv_have_decl_readdir64_r=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- case $ac_lo in
- ?*) ac_cv_sizeof_off_t=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (off_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; }; }
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_have_decl_readdir64_r" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_readdir64_r" >&6; }
+ if test $ac_cv_have_decl_readdir64_r = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_READDIR64_R 1
+ _ACEOF
  else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_DECL_READDIR64_R 0
  _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- $ac_includes_default
- long longval () { return (long) (sizeof (off_t)); }
- unsigned long ulongval () { return (long) (sizeof (off_t)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (off_t))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (off_t))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (off_t))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
  
-   ;
-   return 0;
- }
+ fi
+     # disk device prefixes
+     { echo "$as_me:$LINENO: checking disk device prefixes" >&5
+ echo $ECHO_N "checking disk device prefixes... $ECHO_C" >&6; }
+     # Use df to find the mount point for the root filesystem.  Use
+     # the positional parameters to find the particular line from df
+     # that contains the root paritition.  We put it in a subshell so
+     # that the original positional parameters are not messed with.
+     dfline=`(
+       df / | while read line; do
+           set -- $line
+                   while test $# -gt 0; do
+               if test "x$1" = "x/"; then
+                   echo $line
+                   break 2
+               fi
+               shift
+           done
+       done
+     ) | sed 's/(//' | sed 's/)//' `
+     # Search for the mount point by using expr to find the parameter
+     # with dev in it.
+     mount=`(
+       set -- $dfline
+               while test $# -gt 0; do
+           if expr "$1" : '.*dev' >/dev/null 2>&1; then
+               echo $1
+               break
+           fi
+           shift
+       done
+     )`
+     # get any system-specific configuration information
+     case "$target" in
+       *-hp-*)
+           CLIENT_SCRIPTS_OPT=amhpfixdevs
+           case $mount in
+               /dev/vg*)
+     { echo "$as_me:$LINENO: WARNING: Run amhpfixdevs on HP-UX systems using /dev/vg??." >&5
+ echo "$as_me: WARNING: Run amhpfixdevs on HP-UX systems using /dev/vg??." >&2;}
+     cat <<AAW_EOF >>config.warnings
+ Run amhpfixdevs on HP-UX systems using /dev/vg??.
+ AAW_EOF
+                   ;;
+           esac
+           ;;
+       *-sni-sysv4)
+           DEV_PREFIX=/dev/dsk/
+           RDEV_PREFIX=/dev/rdsk/
+           CLIENT_SCRIPTS_OPT=amsinixfixdevs
+           if ! test -d /dev/dsk; then
+     { echo "$as_me:$LINENO: WARNING: Run amsinixfixdevs on Sinix systems using VxFS." >&5
+ echo "$as_me: WARNING: Run amsinixfixdevs on Sinix systems using VxFS." >&2;}
+     cat <<AAW_EOF >>config.warnings
+ Run amsinixfixdevs on Sinix systems using VxFS.
+ AAW_EOF
+           fi
+           ;;
+       *-sco3.2v4*)
+           DEV_PREFIX=/dev/
+           RDEV_PREFIX=/dev/
+           ;;
+       *)
+           CLIENT_SCRIPTS_OPT=
+           ;;
+     esac
+     if test "$DEV_PREFIX" && test "$RDEV_PREFIX"; then
+       { echo "$as_me:$LINENO: result: (predefined) $DEV_PREFIX - $RDEV_PREFIX" >&5
+ echo "${ECHO_T}(predefined) $DEV_PREFIX - $RDEV_PREFIX" >&6; }
+     else
+       if test -d /dev/dsk; then
+           DEV_PREFIX=/dev/dsk/
+           if test -d /dev/rdsk; then
+               RDEV_PREFIX=/dev/rdsk/
+           else
+               RDEV_PREFIX=/dev/dsk/
+           fi
+       elif test -d /dev; then
+           DEV_PREFIX=/dev/
+           # Some systems, notably Linux, do not have raw disk devices
+           # names.  Check this by trying to see if a raw disk device name
+           # exists using the normal raw device path prepended to the
+           # mount point of the root filesystem.
+           if test "$mount"; then
+               dev_name="/dev/r`basename $mount`"
+               if test -b $dev_name -o -c $dev_name; then
+                   RDEV_PREFIX=/dev/r
+               else
+                   RDEV_PREFIX=/dev/
+               fi
+           else
+               RDEV_PREFIX=/dev/r
+           fi
+       else
+           # just fake it..
+           DEV_PREFIX=/
+           RDEV_PREFIX=/
+       fi
+       { echo "$as_me:$LINENO: result: $DEV_PREFIX - $RDEV_PREFIX" >&5
+ echo "${ECHO_T}$DEV_PREFIX - $RDEV_PREFIX" >&6; }
+     fi
+ cat >>confdefs.h <<_ACEOF
+ #define DEV_PREFIX "${DEV_PREFIX}"
  _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_off_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 (off_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (off_t), 77
- See \`config.log' for more details." >&2;}
+ cat >>confdefs.h <<_ACEOF
+ #define RDEV_PREFIX "${RDEV_PREFIX}"
+ _ACEOF
+     case "$target" in
+       *-dec-osf*)
+                   ;;
+       *-dg-*)
+                   ;;
+       *-netbsd*)
+                   ;;
+       *-freebsd*)
+                   ;;
+       *-openbsd*)
+                   ;;
+       *-hp-*)
+                   case "$CC" in
+                       *gcc*)
+                           CPPFLAGS="$CPPFLAGS -D__STDC_EXT__"
+                           ;;
+                       *cc*)
+                           CFLAGS="$CFLAGS -Ae"
+                           ;;
+                   esac
+                   ;;
+       *-ibm-aix*)
+                   ;;
+       m88k-motorola-sysv4)
+                   ;;
+       *-nextstep3)
+                   ;;
+       *-pc-bsdi*)
+                   ;;
+       *-pc-linux-*)
+                   ;;
+       *-redhat-linux-*)
+                   ;;
+       *-suse-linux-*)
+                   ;;
+       x86_64-*-linux-*)
+                   ;;
+       alpha*-*-linux-*)
+                   ;;
+       sparc*-*-linux-*)
+                   ;;
+       powerpc-*-linux-*)
+                   ;;
+         *-sgi-irix3*)
+                   # The old cc won't work!
+                   if test "x$GCC" != "xyes"; then
+                       { { echo "$as_me:$LINENO: error: The old SGI IRIX compiler ($CC) will not compile Amanda; use CC=gcc" >&5
+ echo "$as_me: error: The old SGI IRIX compiler ($CC) will not compile Amanda; use CC=gcc" >&2;}
     { (exit 1); exit 1; }; }
+                   fi
+                   ;;
+         *-sgi-irix4*)
+                   ;;
+         *-sgi-irix5*)
+                   ;;
+         *-sgi-irix6*)
+                   ;;
+         *-solaris2*)
+                   ;;
+         *-sun-sunos4.1*)
+                   ;;
+         *-ultrix*)
+                   ;;
+         *-sysv4.2uw2*)
+                   ;;
+         *-sco3.2v5*)
+                   ;;
+         i386-pc-isc4*)
+                   ;;
+         *-sni-sysv4)
+                   ;;
+         *-pc-cygwin)
+ cat >>confdefs.h <<\_ACEOF
+ #define IGNORE_TAR_ERRORS 1
+ _ACEOF
+                   # Cygwin needs PATH to find cygwin1.dll
+ cat >>confdefs.h <<\_ACEOF
+ #define NEED_PATH_ENV 1
+ _ACEOF
+ cat >>confdefs.h <<\_ACEOF
+ #define IGNORE_FSTAB 1
+ _ACEOF
+                   LDFLAGS="$LDFLAGS -Wl,-enable-runtime-pseudo-reloc -no-undefined"
+                   ;;
+         *-apple-darwin7*) # MacOS X 10.3.* (Panther)
+                   ;;
+         *-apple-darwin8*) # MacOS X 10.4.* (Tiger)
+                   ;;
+       *)
+     cat <<AAW_EOF >>config.warnings
+ *****
+ This machine, target type $target, is not known to be fully supported
+ by this configure script.  If the installation of Amanda on this system
+ succeeds or needed any patches, please email amanda-hackers@amanda.org
+ with the patches or an indication of the sucess or failure of the
+ Amanda installation on your system.
+ *****
+ AAW_EOF
+                   ;;
+     esac
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$bindir\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   bindir="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define bindir "$ac_define_dir"
+ _ACEOF
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$sbindir\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   sbindir="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define sbindir "$ac_define_dir"
+ _ACEOF
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$libexecdir\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   libexecdir="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define libexecdir "$ac_define_dir"
+ _ACEOF
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$mandir\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   mandir="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define mandir "$ac_define_dir"
+ _ACEOF
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+     # amanda-specific directories
+     AMLIBDIR=$libdir/amanda
+ # Check whether --with-amlibdir was given.
+ if test "${with_amlibdir+set}" = set; then
+   withval=$with_amlibdir;
+           case "$withval" in
+               n | no) AMLIBDIR=$libdir ;;
+               y | ye | yes) AMLIBDIR=$libdir/amanda ;;
+               *) AMLIBDIR=$withval ;;
+           esac
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$AMLIBDIR\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   amlibdir="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define amlibdir "$ac_define_dir"
+ _ACEOF
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+     AMLIBEXECDIR=$libexecdir/amanda
+ # Check whether --with-amlibexecdir was given.
+ if test "${with_amlibexecdir+set}" = set; then
+   withval=$with_amlibexecdir;
+           case "$withval" in
+               n | no) AMLIBEXECDIR=$libexecdir ;;
+               y | ye | yes) AMLIBEXECDIR=$libexecdir/amanda ;;
+               *) AMLIBEXECDIR=$withval ;;
+           esac
  fi
- rm -f conftest.val
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$AMLIBEXECDIR\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   amlibexecdir="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define amlibexecdir "$ac_define_dir"
+ _ACEOF
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+     amincludedir="${includedir}/amanda"
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$amincludedir\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   amincludedir="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define amincludedir "$ac_define_dir"
+ _ACEOF
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+ # Check whether --with-amperldir was given.
+ if test "${with_amperldir+set}" = set; then
+   withval=$with_amperldir;
+           case "$withval" in
+               y | ye | yes) AMPERLLIB=DEFAULT ;;
+               n | no) AMPERLLIB=$amlibdir/perl ;;
+               *) AMPERLLIB=$withval ;;
+           esac
  else
-   ac_cv_sizeof_off_t=0
- fi
+           AMPERLLIB=DEFAULT
  fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
- echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
+     # apply the default if no value was given.
+     if test x"$AMPERLLIB" = x"DEFAULT"; then
+       eval `$PERL -V:installsitelib`
+       AMPERLLIB=$installsitelib
+     fi
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$AMPERLLIB\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   amperldir="$ac_define_dir"
  cat >>confdefs.h <<_ACEOF
- #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
+ #define amperldir "$ac_define_dir"
  _ACEOF
  
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
  
- 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
+     DUMPER_DIR='${amlibexecdir}/application'
+   prefix_NONE=
+   exec_prefix_NONE=
+   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+   eval ac_define_dir="\"$DUMPER_DIR\""
+   eval ac_define_dir="\"$ac_define_dir\""
+   DUMPER_DIR="$ac_define_dir"
+ cat >>confdefs.h <<_ACEOF
+ #define DUMPER_DIR "$ac_define_dir"
+ _ACEOF
+   test "$prefix_NONE" && prefix=NONE
+   test "$exec_prefix_NONE" && exec_prefix=NONE
+     # TODO: rename to APPLICATION_DIR, add to Amanda::Paths and 'amgtconf build.APPLICATION_DIR'
+ #
+ # Internationalization
+ #
+     # FreeBSD needs to link libxpg4
+ { echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5
+ echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lxpg4  $LIBS"
+ 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
+ /* 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
+ char setlocale ();
  int
  main ()
  {
- if ((size_t *) 0)
-   return 0;
- if (sizeof (size_t))
-   return 0;
+ return setlocale ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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_size_t=yes
+   (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_lib_xpg4_setlocale=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_type_size_t=no
      ac_cv_lib_xpg4_setlocale=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  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_lib_xpg4_setlocale" >&5
+ echo "${ECHO_T}$ac_cv_lib_xpg4_setlocale" >&6; }
+ if test $ac_cv_lib_xpg4_setlocale = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBXPG4 1
+ _ACEOF
  
- echo "$as_me:$LINENO: checking size of size_t" >&5
- echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
- if test "${ac_cv_sizeof_size_t+set}" = set; then
+   LIBS="-lxpg4 $LIBS"
+ fi
+     # ------------------------------------------------------------------
+     # All list of languages for which a translation exist. Each
+     #  language is separated by a space.
+     # ------------------------------------------------------------------
+     ALL_LINGUAS=""
+     # Extract the first word of "msgfmt", so it can be a program name with args.
+ set dummy msgfmt; 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_MSGFMT+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test "$ac_cv_type_size_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 (size_t))) >= 0)];
- test_array [0] = 0
+   case $MSGFMT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_MSGFMT="$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
  
-   ;
-   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 (size_t))) <= $ac_mid)];
- test_array [0] = 0
+   ;;
+ esac
+ fi
+ MSGFMT=$ac_cv_path_MSGFMT
+ if test -n "$MSGFMT"; then
+   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
+ echo "${ECHO_T}$MSGFMT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
-   ;
-   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
+     # Extract the first word of "gettext", so it can be a program name with args.
+ set dummy gettext; 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_GETTEXT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   case $GETTEXT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_GETTEXT="$GETTEXT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GETTEXT="$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
  
- 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`
+   ;;
+ esac
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   done
+ GETTEXT=$ac_cv_path_GETTEXT
+ if test -n "$GETTEXT"; then
+   { echo "$as_me:$LINENO: result: $GETTEXT" >&5
+ echo "${ECHO_T}$GETTEXT" >&6; }
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
- 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 (size_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 (size_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
+   { echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+ echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; }
+     # Check whether --enable-nls was given.
+ if test "${enable_nls+set}" = set; then
+   enableval=$enable_nls; USE_NLS=$enableval
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   USE_NLS=yes
+ fi
+   { echo "$as_me:$LINENO: result: $USE_NLS" >&5
+ echo "${ECHO_T}$USE_NLS" >&6; }
  
- 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`
+ # Prepare PATH_SEPARATOR.
+ # 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
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   done
+ # Find out how to test for executable files. 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
+   ac_executable_p="test -x"
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   ac_executable_p="test -f"
+ fi
+ rm -f conf$$.file
  
- ac_lo= ac_hi=
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+ set dummy msgfmt; 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_MSGFMT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case "$MSGFMT" in
+   [\\/]* | ?:[\\/]*)
+     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+     ;;
+   *)
+     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+     for ac_dir in $PATH; do
+       IFS="$ac_save_IFS"
+       test -z "$ac_dir" && ac_dir=.
+       for ac_exec_ext in '' $ac_executable_extensions; do
+         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+           echo "$as_me: trying $ac_dir/$ac_word..." >&5
+           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+             break 2
+           fi
+         fi
+       done
+     done
+     IFS="$ac_save_IFS"
+   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+     ;;
+ esac
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ MSGFMT="$ac_cv_path_MSGFMT"
+ if test "$MSGFMT" != ":"; then
+   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
+ echo "${ECHO_T}$MSGFMT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  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 (size_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
+   # Extract the first word of "gmsgfmt", so it can be a program name with args.
+ set dummy gmsgfmt; 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_GMSGFMT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  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
+   case $GMSGFMT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_GMSGFMT="$GMSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
  done
- case $ac_lo in
- ?*) ac_cv_sizeof_size_t=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (size_t), 77
- See \`config.log' for more details." >&2;}
-    { (exit 1); exit 1; }; } ;;
+ done
+ IFS=$as_save_IFS
+   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+   ;;
  esac
+ fi
+ GMSGFMT=$ac_cv_path_GMSGFMT
+ if test -n "$GMSGFMT"; then
+   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+ echo "${ECHO_T}$GMSGFMT" >&6; }
  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 (size_t)); }
- unsigned long ulongval () { return (long) (sizeof (size_t)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (size_t))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (size_t))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (size_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_size_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 (size_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (size_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
+     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+     *) MSGFMT_015=$MSGFMT ;;
+   esac
+   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+     *) GMSGFMT_015=$GMSGFMT ;;
+   esac
+ # Prepare PATH_SEPARATOR.
+ # 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
- rm -f conftest.val
+ # Find out how to test for executable files. 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
+   ac_executable_p="test -x"
  else
-   ac_cv_sizeof_size_t=0
+   ac_executable_p="test -f"
  fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
- echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
- cat >>confdefs.h <<_ACEOF
- #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
- _ACEOF
+ rm -f conf$$.file
  
- echo "$as_me:$LINENO: checking for ssize_t" >&5
- echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
- if test "${ac_cv_type_ssize_t+set}" = set; then
+ # Extract the first word of "xgettext", so it can be a program name with args.
+ set dummy xgettext; 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_XGETTEXT+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 ((ssize_t *) 0)
-   return 0;
- if (sizeof (ssize_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_ssize_t=yes
+   case "$XGETTEXT" in
+   [\\/]* | ?:[\\/]*)
+     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+     ;;
+   *)
+     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+     for ac_dir in $PATH; do
+       IFS="$ac_save_IFS"
+       test -z "$ac_dir" && ac_dir=.
+       for ac_exec_ext in '' $ac_executable_extensions; do
+         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+           echo "$as_me: trying $ac_dir/$ac_word..." >&5
+           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+      (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+             break 2
+           fi
+         fi
+       done
+     done
+     IFS="$ac_save_IFS"
+   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+     ;;
+ esac
+ fi
+ XGETTEXT="$ac_cv_path_XGETTEXT"
+ if test "$XGETTEXT" != ":"; then
+   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+ echo "${ECHO_T}$XGETTEXT" >&6; }
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     rm -f messages.po
+     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+     *) XGETTEXT_015=$XGETTEXT ;;
+   esac
  
- ac_cv_type_ssize_t=no
+ # Prepare PATH_SEPARATOR.
+ # 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
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ # Find out how to test for executable files. 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
+   ac_executable_p="test -x"
+ else
+   ac_executable_p="test -f"
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
- echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
+ rm -f conf$$.file
  
- echo "$as_me:$LINENO: checking size of ssize_t" >&5
- echo $ECHO_N "checking size of ssize_t... $ECHO_C" >&6
- if test "${ac_cv_sizeof_ssize_t+set}" = set; then
+ # Extract the first word of "msgmerge", so it can be a program name with args.
+ set dummy msgmerge; 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_MSGMERGE+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test "$ac_cv_type_ssize_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 (ssize_t))) >= 0)];
- test_array [0] = 0
+   case "$MSGMERGE" in
+   [\\/]* | ?:[\\/]*)
+     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+     ;;
+   *)
+     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+     for ac_dir in $PATH; do
+       IFS="$ac_save_IFS"
+       test -z "$ac_dir" && ac_dir=.
+       for ac_exec_ext in '' $ac_executable_extensions; do
+         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+           echo "$as_me: trying $ac_dir/$ac_word..." >&5
+           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+             break 2
+           fi
+         fi
+       done
+     done
+     IFS="$ac_save_IFS"
+   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+     ;;
+ esac
+ fi
+ MSGMERGE="$ac_cv_path_MSGMERGE"
+ if test "$MSGMERGE" != ":"; then
+   { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+ echo "${ECHO_T}$MSGMERGE" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
-   ;
-   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 (ssize_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
+         test -n "$localedir" || localedir='${datadir}/locale'
+   ac_config_commands="$ac_config_commands po-directories"
+     use_additional=yes
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+     eval additional_includedir=\"$includedir\"
+     eval additional_libdir=\"$libdir\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
+ # Check whether --with-libiconv-prefix was given.
+ if test "${with_libiconv_prefix+set}" = set; then
+   withval=$with_libiconv_prefix;
+     if test "X$withval" = "Xno"; then
+       use_additional=no
+     else
+       if test "X$withval" = "X"; then
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+           eval additional_includedir=\"$includedir\"
+           eval additional_libdir=\"$libdir\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
+       else
+         additional_includedir="$withval/include"
+         additional_libdir="$withval/$acl_libdirstem"
+       fi
+     fi
  
- 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
+       LIBICONV=
+   LTLIBICONV=
+   INCICONV=
+   rpathdirs=
+   ltrpathdirs=
+   names_already_handled=
+   names_next_round='iconv '
+   while test -n "$names_next_round"; do
+     names_this_round="$names_next_round"
+     names_next_round=
+     for name in $names_this_round; do
+       already_handled=
+       for n in $names_already_handled; do
+         if test "$n" = "$name"; then
+           already_handled=yes
+           break
+         fi
+       done
+       if test -z "$already_handled"; then
+         names_already_handled="$names_already_handled $name"
+                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+         eval value=\"\$HAVE_LIB$uppername\"
+         if test -n "$value"; then
+           if test "$value" = yes; then
+             eval value=\"\$LIB$uppername\"
+             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+             eval value=\"\$LTLIB$uppername\"
+             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+           else
+                                     :
+           fi
+         else
+                               found_dir=
+           found_la=
+           found_so=
+           found_a=
+           if test $use_additional = yes; then
+             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+               found_dir="$additional_libdir"
+               found_so="$additional_libdir/lib$name.$shlibext"
+               if test -f "$additional_libdir/lib$name.la"; then
+                 found_la="$additional_libdir/lib$name.la"
+               fi
+             else
+               if test -f "$additional_libdir/lib$name.$libext"; then
+                 found_dir="$additional_libdir"
+                 found_a="$additional_libdir/lib$name.$libext"
+                 if test -f "$additional_libdir/lib$name.la"; then
+                   found_la="$additional_libdir/lib$name.la"
+                 fi
+               fi
+             fi
+           fi
+           if test "X$found_dir" = "X"; then
+             for x in $LDFLAGS $LTLIBICONV; do
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
+               case "$x" in
+                 -L*)
+                   dir=`echo "X$x" | sed -e 's/^X-L//'`
+                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                     found_dir="$dir"
+                     found_so="$dir/lib$name.$shlibext"
+                     if test -f "$dir/lib$name.la"; then
+                       found_la="$dir/lib$name.la"
+                     fi
+                   else
+                     if test -f "$dir/lib$name.$libext"; then
+                       found_dir="$dir"
+                       found_a="$dir/lib$name.$libext"
+                       if test -f "$dir/lib$name.la"; then
+                         found_la="$dir/lib$name.la"
+                       fi
+                     fi
+                   fi
+                   ;;
+               esac
+               if test "X$found_dir" != "X"; then
+                 break
+               fi
+             done
+           fi
+           if test "X$found_dir" != "X"; then
+                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+             if test "X$found_so" != "X"; then
+                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+               else
+                                                                                 haveit=
+                 for x in $ltrpathdirs; do
+                   if test "X$x" = "X$found_dir"; then
+                     haveit=yes
+                     break
+                   fi
+                 done
+                 if test -z "$haveit"; then
+                   ltrpathdirs="$ltrpathdirs $found_dir"
+                 fi
+                                 if test "$hardcode_direct" = yes; then
+                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                 else
+                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                             haveit=
+                     for x in $rpathdirs; do
+                       if test "X$x" = "X$found_dir"; then
+                         haveit=yes
+                         break
+                       fi
+                     done
+                     if test -z "$haveit"; then
+                       rpathdirs="$rpathdirs $found_dir"
+                     fi
+                   else
+                                                                                 haveit=
+                     for x in $LDFLAGS $LIBICONV; do
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
+                       if test "X$x" = "X-L$found_dir"; then
+                         haveit=yes
+                         break
+                       fi
+                     done
+                     if test -z "$haveit"; then
+                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                     fi
+                     if test "$hardcode_minus_L" != no; then
+                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                     else
+                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                     fi
+                   fi
+                 fi
+               fi
+             else
+               if test "X$found_a" != "X"; then
+                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+               else
+                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+               fi
+             fi
+                         additional_includedir=
+             case "$found_dir" in
+               */$acl_libdirstem | */$acl_libdirstem/)
+                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                 additional_includedir="$basedir/include"
+                 ;;
+             esac
+             if test "X$additional_includedir" != "X"; then
+                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
+                 haveit=
+                 if test "X$additional_includedir" = "X/usr/local/include"; then
+                   if test -n "$GCC"; then
+                     case $host_os in
+                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                     esac
+                   fi
+                 fi
+                 if test -z "$haveit"; then
+                   for x in $CPPFLAGS $INCICONV; do
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
+                     if test "X$x" = "X-I$additional_includedir"; then
+                       haveit=yes
+                       break
+                     fi
+                   done
+                   if test -z "$haveit"; then
+                     if test -d "$additional_includedir"; then
+                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+                     fi
+                   fi
+                 fi
+               fi
+             fi
+                         if test -n "$found_la"; then
+                                                         save_libdir="$libdir"
+               case "$found_la" in
+                 */* | *\\*) . "$found_la" ;;
+                 *) . "./$found_la" ;;
+               esac
+               libdir="$save_libdir"
+                             for dep in $dependency_libs; do
+                 case "$dep" in
+                   -L*)
+                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                       haveit=
+                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+                         if test -n "$GCC"; then
+                           case $host_os in
+                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                           esac
+                         fi
+                       fi
+                       if test -z "$haveit"; then
+                         haveit=
+                         for x in $LDFLAGS $LIBICONV; do
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
+                           if test "X$x" = "X-L$additional_libdir"; then
+                             haveit=yes
+                             break
+                           fi
+                         done
+                         if test -z "$haveit"; then
+                           if test -d "$additional_libdir"; then
+                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+                           fi
+                         fi
+                         haveit=
+                         for x in $LDFLAGS $LTLIBICONV; do
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
+                           if test "X$x" = "X-L$additional_libdir"; then
+                             haveit=yes
+                             break
+                           fi
+                         done
+                         if test -z "$haveit"; then
+                           if test -d "$additional_libdir"; then
+                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+                           fi
+                         fi
+                       fi
+                     fi
+                     ;;
+                   -R*)
+                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                     if test "$enable_rpath" != no; then
+                                                                   haveit=
+                       for x in $rpathdirs; do
+                         if test "X$x" = "X$dir"; then
+                           haveit=yes
+                           break
+                         fi
+                       done
+                       if test -z "$haveit"; then
+                         rpathdirs="$rpathdirs $dir"
+                       fi
+                                                                   haveit=
+                       for x in $ltrpathdirs; do
+                         if test "X$x" = "X$dir"; then
+                           haveit=yes
+                           break
+                         fi
+                       done
+                       if test -z "$haveit"; then
+                         ltrpathdirs="$ltrpathdirs $dir"
+                       fi
+                     fi
+                     ;;
+                   -l*)
+                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                     ;;
+                   *.la)
+                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                     ;;
+                   *)
+                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                     ;;
+                 esac
+               done
+             fi
+           else
+                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+           fi
+         fi
+       fi
+     done
    done
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   if test "X$rpathdirs" != "X"; then
+     if test -n "$hardcode_libdir_separator"; then
+                         alldirs=
+       for found_dir in $rpathdirs; do
+         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+       done
+             acl_save_libdir="$libdir"
+       libdir="$alldirs"
+       eval flag=\"$hardcode_libdir_flag_spec\"
+       libdir="$acl_save_libdir"
+       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+     else
+             for found_dir in $rpathdirs; do
+         acl_save_libdir="$libdir"
+         libdir="$found_dir"
+         eval flag=\"$hardcode_libdir_flag_spec\"
+         libdir="$acl_save_libdir"
+         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+       done
+     fi
+   fi
+   if test "X$ltrpathdirs" != "X"; then
+             for found_dir in $ltrpathdirs; do
+       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+     done
+   fi
  
- cat >conftest.$ac_ext <<_ACEOF
+     { echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
+ echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6; }
+ if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   gt_save_LIBS="$LIBS"
+      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+      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 <CoreFoundation/CFPreferences.h>
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (ssize_t))) < 0)];
- test_array [0] = 0
+ CFPreferencesCopyAppValue(NULL, NULL)
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
+   gt_cv_func_CFPreferencesCopyAppValue=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       gt_cv_func_CFPreferencesCopyAppValue=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+      LIBS="$gt_save_LIBS"
+ fi
+ { echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+ echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_CFPREFERENCESCOPYAPPVALUE 1
+ _ACEOF
+   fi
+     { echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
+ echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6; }
+ if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   gt_save_LIBS="$LIBS"
+      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+      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 <CoreFoundation/CFLocale.h>
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (ssize_t))) >= $ac_mid)];
- test_array [0] = 0
+ CFLocaleCopyCurrent();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
+   gt_cv_func_CFLocaleCopyCurrent=yes
  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`
+       gt_cv_func_CFLocaleCopyCurrent=no
  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
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+      LIBS="$gt_save_LIBS"
  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`
+ { echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+ echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_CFLOCALECOPYCURRENT 1
+ _ACEOF
+   fi
+   INTL_MACOSX_LIBS=
+   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+   fi
+   LIBINTL=
+   LTLIBINTL=
+   POSUB=
+     if test "$USE_NLS" = "yes"; then
+     gt_use_preinstalled_gnugettext=no
+         { echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
+ echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6; }
+ if test "${gt_cv_func_gnugettext1_libc+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 <libintl.h>
+ extern int _nl_msg_cat_cntr;
+ extern int *_nl_domain_bindings;
  int
  main ()
  {
- static int test_array [1 - 2 * !(((long) (sizeof (ssize_t))) <= $ac_mid)];
- test_array [0] = 0
+ bindtextdomain ("", "");
+ return * gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
+   gt_cv_func_gnugettext1_libc=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_lo=`expr '(' $ac_mid ')' + 1`
+       gt_cv_func_gnugettext1_libc=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- case $ac_lo in
- ?*) ac_cv_sizeof_ssize_t=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (ssize_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (ssize_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 (ssize_t)); }
- unsigned long ulongval () { return (long) (sizeof (ssize_t)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (ssize_t))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (ssize_t))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
-   else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (ssize_t))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5
+ echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6; }
  
-   ;
-   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_ssize_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
+         if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
  
- ( exit $ac_status )
- { { echo "$as_me:$LINENO: error: cannot compute sizeof (ssize_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (ssize_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_ssize_t=0
- fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_ssize_t" >&5
- echo "${ECHO_T}$ac_cv_sizeof_ssize_t" >&6
- cat >>confdefs.h <<_ACEOF
- #define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
- _ACEOF
  
  
- echo "$as_me:$LINENO: checking for time_t" >&5
- echo $ECHO_N "checking for time_t... $ECHO_C" >&6
- if test "${ac_cv_type_time_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 ((time_t *) 0)
-   return 0;
- if (sizeof (time_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_time_t=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_time_t=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
- echo "${ECHO_T}$ac_cv_type_time_t" >&6
  
- echo "$as_me:$LINENO: checking size of time_t" >&5
- echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
- if test "${ac_cv_sizeof_time_t+set}" = set; then
+           am_save_CPPFLAGS="$CPPFLAGS"
+   for element in $INCICONV; do
+     haveit=
+     for x in $CPPFLAGS; do
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
+       if test "X$x" = "X$element"; then
+         haveit=yes
+         break
+       fi
+     done
+     if test -z "$haveit"; then
+       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+     fi
+   done
+   { echo "$as_me:$LINENO: checking for iconv" >&5
+ echo $ECHO_N "checking for iconv... $ECHO_C" >&6; }
+ if test "${am_cv_func_iconv+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test "$ac_cv_type_time_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 (time_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
+     am_cv_func_iconv="no, consider installing GNU libiconv"
+     am_cv_lib_iconv=no
      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 <stdlib.h>
+ #include <iconv.h>
  int
  main ()
  {
static int test_array [1 - 2 * !(((long) (sizeof (time_t))) <= $ac_mid)];
- test_array [0] = 0
iconv_t cd = iconv_open("","");
+        iconv(cd,NULL,NULL,NULL,NULL);
+        iconv_close(cd);
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
+   am_cv_func_iconv=yes
  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 (time_t))) < 0)];
- test_array [0] = 0
+ fi
  
-   ;
-   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
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+     if test "$am_cv_func_iconv" != yes; then
+       am_save_LIBS="$LIBS"
+       LIBS="$LIBS $LIBICONV"
+       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 <stdlib.h>
+ #include <iconv.h>
  int
  main ()
  {
static int test_array [1 - 2 * !(((long) (sizeof (time_t))) >= $ac_mid)];
- test_array [0] = 0
iconv_t cd = iconv_open("","");
+          iconv(cd,NULL,NULL,NULL,NULL);
+          iconv_close(cd);
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
+   am_cv_lib_iconv=yes
+         am_cv_func_iconv=yes
  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 (time_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
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+       LIBS="$am_save_LIBS"
+     fi
  
- 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_time_t=$ac_lo;;
- '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (time_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.  */
+ { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+ echo "${ECHO_T}$am_cv_func_iconv" >&6; }
+   if test "$am_cv_func_iconv" = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_ICONV 1
  _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- $ac_includes_default
- long longval () { return (long) (sizeof (time_t)); }
- unsigned long ulongval () { return (long) (sizeof (time_t)); }
- #include <stdio.h>
- #include <stdlib.h>
- int
- main ()
- {
  
-   FILE *f = fopen ("conftest.val", "w");
-   if (! f)
-     exit (1);
-   if (((long) (sizeof (time_t))) < 0)
-     {
-       long i = longval ();
-       if (i != ((long) (sizeof (time_t))))
-       exit (1);
-       fprintf (f, "%ld\n", i);
-     }
+   fi
+   if test "$am_cv_lib_iconv" = yes; then
+     { echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+ echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; }
+     { echo "$as_me:$LINENO: result: $LIBICONV" >&5
+ echo "${ECHO_T}$LIBICONV" >&6; }
    else
-     {
-       unsigned long i = ulongval ();
-       if (i != ((long) (sizeof (time_t))))
-       exit (1);
-       fprintf (f, "%lu\n", i);
-     }
-   exit (ferror (f) || fclose (f) != 0);
+             CPPFLAGS="$am_save_CPPFLAGS"
+     LIBICONV=
+     LTLIBICONV=
+   fi
  
-   ;
-   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_time_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 (time_t), 77
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot compute sizeof (time_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_time_t=0
- fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
- echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
- cat >>confdefs.h <<_ACEOF
- #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
- _ACEOF
  
  
  
- # Check whether --enable-shared or --disable-shared was given.
- if test "${enable_shared+set}" = set; then
-   enableval="$enable_shared"
-   p=${PACKAGE-default}
-     case $enableval in
-     yes) enable_shared=yes ;;
-     no) enable_shared=no ;;
-     *)
-       enable_shared=no
-       # Look at the argument we got.  We use all the common list separators.
-       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_shared=yes
-       fi
-       done
-       IFS="$lt_save_ifs"
-       ;;
-     esac
- else
-   enable_shared=yes
- fi;
  
- # Check whether --enable-static or --disable-static was given.
- if test "${enable_static+set}" = set; then
-   enableval="$enable_static"
-   p=${PACKAGE-default}
-     case $enableval in
-     yes) enable_static=yes ;;
-     no) enable_static=no ;;
-     *)
-      enable_static=no
-       # Look at the argument we got.  We use all the common list separators.
-       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_static=yes
-       fi
-       done
-       IFS="$lt_save_ifs"
-       ;;
-     esac
- else
-   enable_static=yes
- fi;
  
- # Check whether --enable-fast-install or --disable-fast-install was given.
- if test "${enable_fast_install+set}" = set; then
-   enableval="$enable_fast_install"
-   p=${PACKAGE-default}
-     case $enableval in
-     yes) enable_fast_install=yes ;;
-     no) enable_fast_install=no ;;
-     *)
-       enable_fast_install=no
-       # Look at the argument we got.  We use all the common list separators.
-       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_fast_install=yes
-       fi
-       done
-       IFS="$lt_save_ifs"
-       ;;
-     esac
- else
-   enable_fast_install=yes
- fi;
+     use_additional=yes
  
- echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
- echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
- if test "${lt_cv_path_SED+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   # Loop through the user's path and test for sed and gsed.
- # Then use that list of sed's as ones to test for truncation.
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
-   for lt_ac_prog in sed gsed; do
-     for ac_exec_ext in '' $ac_executable_extensions; do
-       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-       fi
-     done
-   done
- done
- lt_ac_max=0
- lt_ac_count=0
- # Add /usr/xpg4/bin/sed as it is typically found on Solaris
- # along with /bin/sed that truncates output.
- for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-   test ! -f $lt_ac_sed && continue
-   cat /dev/null > conftest.in
-   lt_ac_count=0
-   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-   # Check for GNU sed and select it if it is found.
-   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-     lt_cv_path_SED=$lt_ac_sed
-     break
-   fi
-   while true; do
-     cat conftest.in conftest.in >conftest.tmp
-     mv conftest.tmp conftest.in
-     cp conftest.in conftest.nl
-     echo >>conftest.nl
-     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-     cmp -s conftest.out conftest.nl || break
-     # 10000 chars as input seems more than enough
-     test $lt_ac_count -gt 10 && break
-     lt_ac_count=`expr $lt_ac_count + 1`
-     if test $lt_ac_count -gt $lt_ac_max; then
-       lt_ac_max=$lt_ac_count
-       lt_cv_path_SED=$lt_ac_sed
-     fi
-   done
- done
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
  
- fi
+     eval additional_includedir=\"$includedir\"
+     eval additional_libdir=\"$libdir\"
  
- SED=$lt_cv_path_SED
- echo "$as_me:$LINENO: result: $SED" >&5
- echo "${ECHO_T}$SED" >&6
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
  
  
- # Check whether --with-gnu-ld or --without-gnu-ld was given.
- if test "${with_gnu_ld+set}" = set; then
-   withval="$with_gnu_ld"
-   test "$withval" = no || with_gnu_ld=yes
- else
-   with_gnu_ld=no
- fi;
- ac_prog=ld
- if test "$GCC" = yes; then
-   # Check if gcc -print-prog-name=ld gives a path.
-   echo "$as_me:$LINENO: checking for ld used by $CC" >&5
- echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
-   case $host in
-   *-*-mingw*)
-     # gcc leaves a trailing carriage return which upsets mingw
-     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-   *)
-     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-   esac
-   case $ac_prog in
-     # Accept absolute paths.
-     [\\/]* | ?:[\\/]*)
-       re_direlt='/[^/][^/]*/\.\./'
-       # Canonicalize the pathname of ld
-       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
-       done
-       test -z "$LD" && LD="$ac_prog"
-       ;;
-   "")
-     # If it fails, then pretend we aren't using GCC.
-     ac_prog=ld
-     ;;
-   *)
-     # If it is relative, then search for the first ld in PATH.
-     with_gnu_ld=unknown
-     ;;
-   esac
- elif test "$with_gnu_ld" = yes; then
-   echo "$as_me:$LINENO: checking for GNU ld" >&5
- echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
- else
-   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
- echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
- fi
- if test "${lt_cv_path_LD+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -z "$LD"; then
-   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-   for ac_dir in $PATH; do
-     IFS="$lt_save_ifs"
-     test -z "$ac_dir" && ac_dir=.
-     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-       lt_cv_path_LD="$ac_dir/$ac_prog"
-       # Check to see if the program is GNU ld.  I'd rather use --version,
-       # but apparently some variants of GNU ld only accept -v.
-       # Break only if it was the GNU/non-GNU ld that we prefer.
-       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-       *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-       *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-       esac
-     fi
-   done
-   IFS="$lt_save_ifs"
- else
-   lt_cv_path_LD="$LD" # Let the user override the test with a path.
- fi
- fi
+ # Check whether --with-libintl-prefix was given.
+ if test "${with_libintl_prefix+set}" = set; then
+   withval=$with_libintl_prefix;
+     if test "X$withval" = "Xno"; then
+       use_additional=no
+     else
+       if test "X$withval" = "X"; then
  
- LD="$lt_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
- test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
- echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-    { (exit 1); exit 1; }; }
- echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
- echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
- if test "${lt_cv_prog_gnu_ld+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   # I'd rather use --version here, but apparently some GNU lds only accept -v.
- case `$LD -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
-   lt_cv_prog_gnu_ld=yes
-   ;;
- *)
-   lt_cv_prog_gnu_ld=no
-   ;;
- esac
- fi
- echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
- echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
- with_gnu_ld=$lt_cv_prog_gnu_ld
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
  
+           eval additional_includedir=\"$includedir\"
+           eval additional_libdir=\"$libdir\"
  
- echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
- echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
- if test "${lt_cv_ld_reload_flag+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   lt_cv_ld_reload_flag='-r'
- fi
- echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
- echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
- reload_flag=$lt_cv_ld_reload_flag
- case $reload_flag in
- "" | " "*) ;;
- *) reload_flag=" $reload_flag" ;;
- esac
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- case $host_os in
-   darwin*)
-     if test "$GCC" = yes; then
-       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
-     else
-       reload_cmds='$LD$reload_flag -o $output$reload_objs'
-     fi
-     ;;
- esac
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
  
- echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
- echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
- if test "${lt_cv_path_NM+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -n "$NM"; then
-   # Let the user override the test.
-   lt_cv_path_NM="$NM"
- else
-   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
-     IFS="$lt_save_ifs"
-     test -z "$ac_dir" && ac_dir=.
-     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
-     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-       # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-       #   nm: unknown option "B" ignored
-       # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
-       lt_cv_path_NM="$tmp_nm -B"
-       break
-         ;;
-       *)
-       case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-       */dev/null*)
-         lt_cv_path_NM="$tmp_nm -p"
-         break
-         ;;
-       *)
-         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-         continue # so that we can try to find one that supports BSD flags
-         ;;
-       esac
-       esac
+       else
+         additional_includedir="$withval/include"
+         additional_libdir="$withval/$acl_libdirstem"
+       fi
      fi
-   done
-   IFS="$lt_save_ifs"
-   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
- fi
- fi
- echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
- echo "${ECHO_T}$lt_cv_path_NM" >&6
- NM="$lt_cv_path_NM"
  
- 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
- else
-   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
- echo "${ECHO_T}no, using $LN_S" >&6
  fi
  
- echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
- echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
- if test "${lt_cv_deplibs_check_method+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   lt_cv_file_magic_cmd='$MAGIC_CMD'
- lt_cv_file_magic_test_file=
- lt_cv_deplibs_check_method='unknown'
- # Need to set the preceding variable on all platforms that support
- # interlibrary dependencies.
- # 'none' -- dependencies not supported.
- # `unknown' -- same as none, but documents that we really don't know.
- # 'pass_all' -- all dependencies passed with no checks.
- # 'test_compile' -- check by making test program.
- # 'file_magic [[regex]]' -- check by looking for files in library path
- # which responds to the $file_magic_cmd with a given extended regex.
- # If you have `file' or equivalent on your system and you're not sure
- # whether `pass_all' will *always* work, you probably want this one.
- case $host_os in
- aix4* | aix5*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- beos*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
+       LIBINTL=
+   LTLIBINTL=
+   INCINTL=
+   rpathdirs=
+   ltrpathdirs=
+   names_already_handled=
+   names_next_round='intl '
+   while test -n "$names_next_round"; do
+     names_this_round="$names_next_round"
+     names_next_round=
+     for name in $names_this_round; do
+       already_handled=
+       for n in $names_already_handled; do
+         if test "$n" = "$name"; then
+           already_handled=yes
+           break
+         fi
+       done
+       if test -z "$already_handled"; then
+         names_already_handled="$names_already_handled $name"
+                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+         eval value=\"\$HAVE_LIB$uppername\"
+         if test -n "$value"; then
+           if test "$value" = yes; then
+             eval value=\"\$LIB$uppername\"
+             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+             eval value=\"\$LTLIB$uppername\"
+             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+           else
+                                     :
+           fi
+         else
+                               found_dir=
+           found_la=
+           found_so=
+           found_a=
+           if test $use_additional = yes; then
+             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+               found_dir="$additional_libdir"
+               found_so="$additional_libdir/lib$name.$shlibext"
+               if test -f "$additional_libdir/lib$name.la"; then
+                 found_la="$additional_libdir/lib$name.la"
+               fi
+             else
+               if test -f "$additional_libdir/lib$name.$libext"; then
+                 found_dir="$additional_libdir"
+                 found_a="$additional_libdir/lib$name.$libext"
+                 if test -f "$additional_libdir/lib$name.la"; then
+                   found_la="$additional_libdir/lib$name.la"
+                 fi
+               fi
+             fi
+           fi
+           if test "X$found_dir" = "X"; then
+             for x in $LDFLAGS $LTLIBINTL; do
  
- bsdi[45]*)
-   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-   lt_cv_file_magic_cmd='/usr/bin/file -L'
-   lt_cv_file_magic_test_file=/shlib/libc.so
-   ;;
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
  
- cygwin*)
-   # func_win32_libid is a shell function defined in ltmain.sh
-   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-   lt_cv_file_magic_cmd='func_win32_libid'
-   ;;
+               case "$x" in
+                 -L*)
+                   dir=`echo "X$x" | sed -e 's/^X-L//'`
+                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                     found_dir="$dir"
+                     found_so="$dir/lib$name.$shlibext"
+                     if test -f "$dir/lib$name.la"; then
+                       found_la="$dir/lib$name.la"
+                     fi
+                   else
+                     if test -f "$dir/lib$name.$libext"; then
+                       found_dir="$dir"
+                       found_a="$dir/lib$name.$libext"
+                       if test -f "$dir/lib$name.la"; then
+                         found_la="$dir/lib$name.la"
+                       fi
+                     fi
+                   fi
+                   ;;
+               esac
+               if test "X$found_dir" != "X"; then
+                 break
+               fi
+             done
+           fi
+           if test "X$found_dir" != "X"; then
+                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+             if test "X$found_so" != "X"; then
+                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+               else
+                                                                                 haveit=
+                 for x in $ltrpathdirs; do
+                   if test "X$x" = "X$found_dir"; then
+                     haveit=yes
+                     break
+                   fi
+                 done
+                 if test -z "$haveit"; then
+                   ltrpathdirs="$ltrpathdirs $found_dir"
+                 fi
+                                 if test "$hardcode_direct" = yes; then
+                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                 else
+                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                                                             haveit=
+                     for x in $rpathdirs; do
+                       if test "X$x" = "X$found_dir"; then
+                         haveit=yes
+                         break
+                       fi
+                     done
+                     if test -z "$haveit"; then
+                       rpathdirs="$rpathdirs $found_dir"
+                     fi
+                   else
+                                                                                 haveit=
+                     for x in $LDFLAGS $LIBINTL; do
  
- mingw* | pw32*)
-   # Base MSYS/MinGW do not provide the 'file' command needed by
-   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-   lt_cv_file_magic_cmd='$OBJDUMP -f'
-   ;;
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
  
- darwin* | rhapsody*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
+                       if test "X$x" = "X-L$found_dir"; then
+                         haveit=yes
+                         break
+                       fi
+                     done
+                     if test -z "$haveit"; then
+                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+                     fi
+                     if test "$hardcode_minus_L" != no; then
+                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                     else
+                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+                     fi
+                   fi
+                 fi
+               fi
+             else
+               if test "X$found_a" != "X"; then
+                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+               else
+                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+               fi
+             fi
+                         additional_includedir=
+             case "$found_dir" in
+               */$acl_libdirstem | */$acl_libdirstem/)
+                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                 additional_includedir="$basedir/include"
+                 ;;
+             esac
+             if test "X$additional_includedir" != "X"; then
+                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
+                 haveit=
+                 if test "X$additional_includedir" = "X/usr/local/include"; then
+                   if test -n "$GCC"; then
+                     case $host_os in
+                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                     esac
+                   fi
+                 fi
+                 if test -z "$haveit"; then
+                   for x in $CPPFLAGS $INCINTL; do
  
- freebsd* | kfreebsd*-gnu | dragonfly*)
-   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-     case $host_cpu in
-     i*86 )
-       # Not sure whether the presence of OpenBSD here was a mistake.
-       # Let's accept both of them until this is cleared up.
-       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
-       lt_cv_file_magic_cmd=/usr/bin/file
-       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-       ;;
-     esac
-   else
-     lt_cv_deplibs_check_method=pass_all
-   fi
-   ;;
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
  
- gnu*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
+                     if test "X$x" = "X-I$additional_includedir"; then
+                       haveit=yes
+                       break
+                     fi
+                   done
+                   if test -z "$haveit"; then
+                     if test -d "$additional_includedir"; then
+                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+                     fi
+                   fi
+                 fi
+               fi
+             fi
+                         if test -n "$found_la"; then
+                                                         save_libdir="$libdir"
+               case "$found_la" in
+                 */* | *\\*) . "$found_la" ;;
+                 *) . "./$found_la" ;;
+               esac
+               libdir="$save_libdir"
+                             for dep in $dependency_libs; do
+                 case "$dep" in
+                   -L*)
+                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                       haveit=
+                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+                         if test -n "$GCC"; then
+                           case $host_os in
+                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                           esac
+                         fi
+                       fi
+                       if test -z "$haveit"; then
+                         haveit=
+                         for x in $LDFLAGS $LIBINTL; do
  
- hpux10.20* | hpux11*)
-   lt_cv_file_magic_cmd=/usr/bin/file
-   case $host_cpu in
-   ia64*)
-     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
-     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-     ;;
-   hppa*64*)
-     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
-     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-     ;;
-   *)
-     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
-     lt_cv_file_magic_test_file=/usr/lib/libc.sl
-     ;;
-   esac
-   ;;
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
  
- irix5* | irix6* | nonstopux*)
-   case $LD in
-   *-32|*"-32 ") libmagic=32-bit;;
-   *-n32|*"-n32 ") libmagic=N32;;
-   *-64|*"-64 ") libmagic=64-bit;;
-   *) libmagic=never-match;;
-   esac
-   lt_cv_deplibs_check_method=pass_all
-   ;;
+                           if test "X$x" = "X-L$additional_libdir"; then
+                             haveit=yes
+                             break
+                           fi
+                         done
+                         if test -z "$haveit"; then
+                           if test -d "$additional_libdir"; then
+                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+                           fi
+                         fi
+                         haveit=
+                         for x in $LDFLAGS $LTLIBINTL; do
  
- # This must be Linux ELF.
- linux*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
  
- netbsd*)
-   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-   else
-     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+                           if test "X$x" = "X-L$additional_libdir"; then
+                             haveit=yes
+                             break
+                           fi
+                         done
+                         if test -z "$haveit"; then
+                           if test -d "$additional_libdir"; then
+                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+                           fi
+                         fi
+                       fi
+                     fi
+                     ;;
+                   -R*)
+                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                     if test "$enable_rpath" != no; then
+                                                                   haveit=
+                       for x in $rpathdirs; do
+                         if test "X$x" = "X$dir"; then
+                           haveit=yes
+                           break
+                         fi
+                       done
+                       if test -z "$haveit"; then
+                         rpathdirs="$rpathdirs $dir"
+                       fi
+                                                                   haveit=
+                       for x in $ltrpathdirs; do
+                         if test "X$x" = "X$dir"; then
+                           haveit=yes
+                           break
+                         fi
+                       done
+                       if test -z "$haveit"; then
+                         ltrpathdirs="$ltrpathdirs $dir"
+                       fi
+                     fi
+                     ;;
+                   -l*)
+                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                     ;;
+                   *.la)
+                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                     ;;
+                   *)
+                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+                     ;;
+                 esac
+               done
+             fi
+           else
+                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+           fi
+         fi
+       fi
+     done
+   done
+   if test "X$rpathdirs" != "X"; then
+     if test -n "$hardcode_libdir_separator"; then
+                         alldirs=
+       for found_dir in $rpathdirs; do
+         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+       done
+             acl_save_libdir="$libdir"
+       libdir="$alldirs"
+       eval flag=\"$hardcode_libdir_flag_spec\"
+       libdir="$acl_save_libdir"
+       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+     else
+             for found_dir in $rpathdirs; do
+         acl_save_libdir="$libdir"
+         libdir="$found_dir"
+         eval flag=\"$hardcode_libdir_flag_spec\"
+         libdir="$acl_save_libdir"
+         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+       done
+     fi
    fi
-   ;;
- newos6*)
-   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
-   lt_cv_file_magic_cmd=/usr/bin/file
-   lt_cv_file_magic_test_file=/usr/lib/libnls.so
-   ;;
- nto-qnx*)
-   lt_cv_deplibs_check_method=unknown
-   ;;
- openbsd*)
-   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
-   else
-     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+   if test "X$ltrpathdirs" != "X"; then
+             for found_dir in $ltrpathdirs; do
+       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+     done
    fi
-   ;;
  
- osf3* | osf4* | osf5*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- sco3.2v5*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- solaris*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-   case $host_vendor in
-   motorola)
-     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
-     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-     ;;
-   ncr)
-     lt_cv_deplibs_check_method=pass_all
-     ;;
-   sequent)
-     lt_cv_file_magic_cmd='/bin/file'
-     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
-     ;;
-   sni)
-     lt_cv_file_magic_cmd='/bin/file'
-     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
-     lt_cv_file_magic_test_file=/lib/libc.so
-     ;;
-   siemens)
-     lt_cv_deplibs_check_method=pass_all
-     ;;
-   esac
-   ;;
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
-   lt_cv_deplibs_check_method=pass_all
-   ;;
- esac
- fi
- echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
- echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
- file_magic_cmd=$lt_cv_file_magic_cmd
- deplibs_check_method=$lt_cv_deplibs_check_method
- test -z "$deplibs_check_method" && deplibs_check_method=unknown
- # If no C compiler was specified, use CC.
- LTCC=${LTCC-"$CC"}
- # Allow CC to be a program name with arguments.
- compiler=$CC
- # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
- if test "${enable_libtool_lock+set}" = set; then
-   enableval="$enable_libtool_lock"
- fi;
- test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
- # Some flags need to be propagated to the compiler or linker for good
- # libtool support.
- case $host in
- ia64-*-hpux*)
-   # Find out which ABI we are using.
-   echo 'int i;' > conftest.$ac_ext
-   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
-     case `/usr/bin/file conftest.$ac_objext` in
-     *ELF-32*)
-       HPUX_IA64_MODE="32"
-       ;;
-     *ELF-64*)
-       HPUX_IA64_MODE="64"
-       ;;
-     esac
-   fi
-   rm -rf conftest*
-   ;;
- *-*-irix6*)
-   # Find out which ABI we are using.
-   echo '#line 23199 "configure"' > conftest.$ac_ext
-   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
-    if test "$lt_cv_prog_gnu_ld" = yes; then
-     case `/usr/bin/file conftest.$ac_objext` in
-     *32-bit*)
-       LD="${LD-ld} -melf32bsmip"
-       ;;
-     *N32*)
-       LD="${LD-ld} -melf32bmipn32"
-       ;;
-     *64-bit*)
-       LD="${LD-ld} -melf64bmip"
-       ;;
-     esac
-    else
-     case `/usr/bin/file conftest.$ac_objext` in
-     *32-bit*)
-       LD="${LD-ld} -32"
-       ;;
-     *N32*)
-       LD="${LD-ld} -n32"
-       ;;
-     *64-bit*)
-       LD="${LD-ld} -64"
-       ;;
-     esac
-    fi
-   fi
-   rm -rf conftest*
-   ;;
- x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
-   # Find out which ABI we are using.
-   echo 'int i;' > conftest.$ac_ext
-   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
-     case `/usr/bin/file conftest.o` in
-     *32-bit*)
-       case $host in
-         x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
-           ;;
-         ppc64-*linux*|powerpc64-*linux*)
-           LD="${LD-ld} -m elf32ppclinux"
-           ;;
-         s390x-*linux*)
-           LD="${LD-ld} -m elf_s390"
-           ;;
-         sparc64-*linux*)
-           LD="${LD-ld} -m elf32_sparc"
-           ;;
-       esac
-       ;;
-     *64-bit*)
-       case $host in
-         x86_64-*linux*)
-           LD="${LD-ld} -m elf_x86_64"
-           ;;
-         ppc*-*linux*|powerpc*-*linux*)
-           LD="${LD-ld} -m elf64ppc"
-           ;;
-         s390*-*linux*)
-           LD="${LD-ld} -m elf64_s390"
-           ;;
-         sparc*-*linux*)
-           LD="${LD-ld} -m elf64_sparc"
-           ;;
-       esac
-       ;;
-     esac
-   fi
-   rm -rf conftest*
-   ;;
- *-*-sco3.2v5*)
-   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-   SAVE_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS -belf"
-   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
- echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
- if test "${lt_cv_cc_needs_belf+set}" = set; then
+           { echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
+ echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6; }
+ if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   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
-      cat >conftest.$ac_ext <<_ACEOF
+   gt_save_CPPFLAGS="$CPPFLAGS"
+             CPPFLAGS="$CPPFLAGS $INCINTL"
+             gt_save_LIBS="$LIBS"
+             LIBS="$LIBS $LIBINTL"
+                         cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
+ #include <libintl.h>
+ extern int _nl_msg_cat_cntr;
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ const char *_nl_expand_alias (const char *);
  int
  main ()
  {
+ bindtextdomain ("", "");
+ return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
    ;
    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
-   lt_cv_cc_needs_belf=yes
+   (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
+   gt_cv_func_gnugettext1_libintl=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- lt_cv_cc_needs_belf=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext 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
+       gt_cv_func_gnugettext1_libintl=no
  fi
- echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
- echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
-   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-     CFLAGS="$SAVE_CFLAGS"
-   fi
-   ;;
- esac
  
- need_locks="$enable_libtool_lock"
- for ac_header in dlfcn.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
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+                         if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then
+               LIBS="$LIBS $LIBICONV"
+               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>
+ #include <libintl.h>
+ extern int _nl_msg_cat_cntr;
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ const char *_nl_expand_alias (const char *);
+ int
+ main ()
+ {
+ bindtextdomain ("", "");
+ return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+   ;
+   return 0;
+ }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
+   LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 gt_cv_func_gnugettext1_libintl=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>
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+             fi
+             CPPFLAGS="$gt_save_CPPFLAGS"
+             LIBS="$gt_save_LIBS"
+ fi
+ { echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5
+ echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6; }
+         fi
+                                         if test "$gt_cv_func_gnugettext1_libc" = "yes" \
+            || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
+                 && test "$PACKAGE" != gettext-runtime \
+                 && test "$PACKAGE" != gettext-tools; }; then
+           gt_use_preinstalled_gnugettext=yes
+         else
+                     LIBINTL=
+           LTLIBINTL=
+           INCINTL=
+         fi
+     if test -n "$INTL_MACOSX_LIBS"; then
+       if test "$gt_use_preinstalled_gnugettext" = "yes" \
+          || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+       fi
+     fi
+     if test "$gt_use_preinstalled_gnugettext" = "yes" \
+        || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define ENABLE_NLS 1
  _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=
+     else
+       USE_NLS=no
+     fi
    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
+   { echo "$as_me:$LINENO: checking whether to use NLS" >&5
+ echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6; }
+   { echo "$as_me:$LINENO: result: $USE_NLS" >&5
+ echo "${ECHO_T}$USE_NLS" >&6; }
+   if test "$USE_NLS" = "yes"; then
+     { echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
+ echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6; }
+     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+       if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+         gt_source="external libintl"
+       else
+         gt_source="libc"
+       fi
+     else
+       gt_source="included intl directory"
+     fi
+     { echo "$as_me:$LINENO: result: $gt_source" >&5
+ echo "${ECHO_T}$gt_source" >&6; }
+   fi
  
- # 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 the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _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
+   if test "$USE_NLS" = "yes"; then
  
- fi
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+       if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+         { echo "$as_me:$LINENO: checking how to link with libintl" >&5
+ echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6; }
+         { echo "$as_me:$LINENO: result: $LIBINTL" >&5
+ echo "${ECHO_T}$LIBINTL" >&6; }
+   for element in $INCINTL; do
+     haveit=
+     for x in $CPPFLAGS; do
+   acl_save_prefix="$prefix"
+   prefix="$acl_final_prefix"
+   acl_save_exec_prefix="$exec_prefix"
+   exec_prefix="$acl_final_exec_prefix"
+   eval x=\"$x\"
+   exec_prefix="$acl_save_exec_prefix"
+   prefix="$acl_save_prefix"
+       if test "X$x" = "X$element"; then
+         haveit=yes
+         break
+       fi
+     done
+     if test -z "$haveit"; then
+       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+     fi
+   done
+       fi
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_GETTEXT 1
  _ACEOF
  
- fi
  
- done
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_DCGETTEXT 1
+ _ACEOF
  
- ac_ext=cc
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- if test -n "$ac_tool_prefix"; then
-   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
-   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_CXX+set}" = set; then
+     fi
+         POSUB=po
+   fi
+     INTLLIBS="$LIBINTL"
+ #
+ # Devices
+ #
+     case "$target" in
+         sparc-sun-solaris2.10) # Solaris 10
+         # curl is not in the LD_LIBRARY_PATH on Solaris 10, so we search
+         # for it in a few common paths; we then extract the -L flags and
+         # translate them to -R flags, as required by the runtime linker.
+         # Extract the first word of "curl-config", so it can be a program name with args.
+ set dummy curl-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_CURL_CONFIG+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test -n "$CXX"; then
-   ac_cv_prog_CXX="$CXX" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
+   case $CURL_CONFIG in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ as_dummy="$LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin"
+ 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
    fi
  done
  done
+ IFS=$as_save_IFS
  
+   ;;
+ esac
  fi
- fi
- CXX=$ac_cv_prog_CXX
- if test -n "$CXX"; then
-   echo "$as_me:$LINENO: result: $CXX" >&5
- echo "${ECHO_T}$CXX" >&6
+ CURL_CONFIG=$ac_cv_path_CURL_CONFIG
+ if test -n "$CURL_CONFIG"; then
+   { echo "$as_me:$LINENO: result: $CURL_CONFIG" >&5
+ echo "${ECHO_T}$CURL_CONFIG" >&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 "$CXX" && break
-   done
+         if test -n "$CURL_CONFIG"; then
+             curlflags=`$CURL_CONFIG --libs 2>/dev/null`
+             for flag in curlflags; do
+                 case $flag in
+                     -L*) LDFLAGS="$LDFLAGS "`echo "x$flag" | sed -e 's/^x-L/-R/'`;;
+                 esac
+             done
+         fi
+         ;;
+     esac
+ # Check whether --with-libcurl was given.
+ if test "${with_libcurl+set}" = set; then
+   withval=$with_libcurl; _libcurl_with=$withval
+ else
+   _libcurl_with=yes
  fi
- if test -z "$CXX"; then
-   ac_ct_CXX=$CXX
-   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+   if test "$_libcurl_with" != "no" ; then
+      for ac_prog in gawk mawk nawk awk
  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_CXX+set}" = set; then
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
-   if test -n "$ac_ct_CXX"; then
-   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+   if test -n "$AWK"; then
+   ac_cv_prog_AWK="$AWK" # Let the user override the test.
  else
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  for as_dir in $PATH
    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_CXX="$ac_prog"
+   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
- ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
- if test -n "$ac_ct_CXX"; then
-   echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
- echo "${ECHO_T}$ac_ct_CXX" >&6
+ AWK=$ac_cv_prog_AWK
+ if test -n "$AWK"; then
+   { 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 "$ac_ct_CXX" && break
+   test -n "$AWK" && break
  done
- test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
  
-   CXX=$ac_ct_CXX
- fi
  
+      _libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[1]+256*A[2]+A[3]; print X;}'"
  
- # 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); }
+      _libcurl_try_link=yes
  
- 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_cxx_compiler_gnu+set}" = set; then
+      if test -d "$_libcurl_with" ; then
+         LIBCURL_CPPFLAGS="-I$withval/include"
+         _libcurl_ldflags="-L$withval/lib"
+         # Extract the first word of "curl-config", so it can be a program name with args.
+ set dummy curl-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__libcurl_config+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
+   case $_libcurl_config in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path__libcurl_config="$_libcurl_config" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in "$withval/bin"
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path__libcurl_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
+ IFS=$as_save_IFS
+   test -z "$ac_cv_path__libcurl_config" && ac_cv_path__libcurl_config=""$withval/bin""
+   ;;
+ esac
+ fi
+ _libcurl_config=$ac_cv_path__libcurl_config
+ if test -n "$_libcurl_config"; then
+   { echo "$as_me:$LINENO: result: $_libcurl_config" >&5
+ echo "${ECHO_T}$_libcurl_config" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+      else
+         # Extract the first word of "curl-config", so it can be a program name with args.
+ set dummy curl-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__libcurl_config+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $_libcurl_config in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path__libcurl_config="$_libcurl_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path__libcurl_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
+ IFS=$as_save_IFS
+   ;;
+ esac
+ fi
+ _libcurl_config=$ac_cv_path__libcurl_config
+ if test -n "$_libcurl_config"; then
+   { echo "$as_me:$LINENO: result: $_libcurl_config" >&5
+ echo "${ECHO_T}$_libcurl_config" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+      fi
+      if test x$_libcurl_config != "x" ; then
+         { echo "$as_me:$LINENO: checking for the version of libcurl" >&5
+ echo $ECHO_N "checking for the version of libcurl... $ECHO_C" >&6; }
+ if test "${libcurl_cv_lib_curl_version+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $2}'`
+ fi
+ { echo "$as_me:$LINENO: result: $libcurl_cv_lib_curl_version" >&5
+ echo "${ECHO_T}$libcurl_cv_lib_curl_version" >&6; }
+         _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
+         _libcurl_wanted=`echo 7.10.0 | $_libcurl_version_parse`
+         if test $_libcurl_wanted -gt 0 ; then
+            { echo "$as_me:$LINENO: checking for libcurl >= version 7.10.0" >&5
+ echo $ECHO_N "checking for libcurl >= version 7.10.0... $ECHO_C" >&6; }
+ if test "${libcurl_cv_lib_version_ok+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+               if test $_libcurl_version -ge $_libcurl_wanted ; then
+                  libcurl_cv_lib_version_ok=yes
+               else
+                  libcurl_cv_lib_version_ok=no
+               fi
+ fi
+ { echo "$as_me:$LINENO: result: $libcurl_cv_lib_version_ok" >&5
+ echo "${ECHO_T}$libcurl_cv_lib_version_ok" >&6; }
+         fi
+         if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
+            if test x"$LIBCURL_CPPFLAGS" = "x" ; then
+               LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
+            fi
+            if test x"$LIBCURL" = "x" ; then
+               LIBCURL=`$_libcurl_config --libs`
+               # This is so silly, but Apple actually has a bug in their
+               # curl-config script.  Fixed in Tiger, but there are still
+               # lots of Panther installs around.
+               case "${host}" in
+                  powerpc-apple-darwin7*)
+                     LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
+                  ;;
+               esac
+            fi
+            # All curl-config scripts support --feature
+            _libcurl_features=`$_libcurl_config --feature`
+            # Is it modern enough to have --protocols? (7.12.4)
+            if test $_libcurl_version -ge 461828 ; then
+               _libcurl_protocols=`$_libcurl_config --protocols`
+            fi
+         else
+            _libcurl_try_link=no
+         fi
+         unset _libcurl_wanted
+      fi
+      if test $_libcurl_try_link = yes ; then
+         # we didn't find curl-config, so let's see if the user-supplied
+         # link line (or failing that, "-lcurl") is enough.
+         LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
+         { echo "$as_me:$LINENO: checking whether libcurl is usable" >&5
+ echo $ECHO_N "checking whether libcurl is usable... $ECHO_C" >&6; }
+ if test "${libcurl_cv_lib_curl_usable+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+            _libcurl_save_cppflags=$CPPFLAGS
+            CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
+            _libcurl_save_libs=$LIBS
+            LIBS="$LIBCURL $LIBS"
+            cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
+ #include <curl/curl.h>
  int
  main ()
  {
- #ifndef __GNUC__
-        choke me
- #endif
+ /* Try and use a few common options to force a failure if we are
+    missing symbols or can't link. */
+ int x;
+ curl_easy_setopt(NULL,CURLOPT_URL,NULL);
+ x=CURL_ERROR_SIZE;
+ x=CURLOPT_WRITEFUNCTION;
+ x=CURLOPT_FILE;
+ x=CURLOPT_ERRORBUFFER;
+ x=CURLOPT_STDERR;
+ x=CURLOPT_VERBOSE;
  
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_cxx_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
+   (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
+   libcurl_cv_lib_curl_usable=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_compiler_gnu=no
      libcurl_cv_lib_curl_usable=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+            CPPFLAGS=$_libcurl_save_cppflags
+            LIBS=$_libcurl_save_libs
+            unset _libcurl_save_cppflags
+            unset _libcurl_save_libs
  
  fi
- echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
- echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
- GXX=`test $ac_compiler_gnu = yes && echo yes`
- ac_test_CXXFLAGS=${CXXFLAGS+set}
- ac_save_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="-g"
- echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
- echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
- if test "${ac_cv_prog_cxx_g+set}" = set; then
+ { echo "$as_me:$LINENO: result: $libcurl_cv_lib_curl_usable" >&5
+ echo "${ECHO_T}$libcurl_cv_lib_curl_usable" >&6; }
+         if test $libcurl_cv_lib_curl_usable = yes ; then
+            # Does curl_free() exist in this version of libcurl?
+            # If not, fake it with free()
+            _libcurl_save_cppflags=$CPPFLAGS
+            CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
+            _libcurl_save_libs=$LIBS
+            LIBS="$LIBS $LIBCURL"
+            { echo "$as_me:$LINENO: checking for curl_free" >&5
+ echo $ECHO_N "checking for curl_free... $ECHO_C" >&6; }
+ if test "${ac_cv_func_curl_free+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
+ /* Define curl_free to an innocuous variant, in case <limits.h> declares curl_free.
+    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+ #define curl_free innocuous_curl_free
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char curl_free (); 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 curl_free
+ /* 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
+ char curl_free ();
+ /* 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_curl_free || defined __stub___curl_free
+ choke me
+ #endif
  
  int
  main ()
  {
+ return curl_free ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_cxx_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_cxx_g=yes
+   (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_curl_free=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_prog_cxx_g=no
      ac_cv_func_curl_free=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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_prog_cxx_g" >&5
- echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
- if test "$ac_test_CXXFLAGS" = set; then
-   CXXFLAGS=$ac_save_CXXFLAGS
- elif test $ac_cv_prog_cxx_g = yes; then
-   if test "$GXX" = yes; then
-     CXXFLAGS="-g -O2"
-   else
-     CXXFLAGS="-g"
-   fi
+ { echo "$as_me:$LINENO: result: $ac_cv_func_curl_free" >&5
+ echo "${ECHO_T}$ac_cv_func_curl_free" >&6; }
+ if test $ac_cv_func_curl_free = yes; then
+   :
  else
-   if test "$GXX" = yes; then
-     CXXFLAGS="-O2"
+ cat >>confdefs.h <<\_ACEOF
+ #define curl_free free
+ _ACEOF
+ fi
+            CPPFLAGS=$_libcurl_save_cppflags
+            LIBS=$_libcurl_save_libs
+            unset _libcurl_save_cppflags
+            unset _libcurl_save_libs
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_LIBCURL 1
+ _ACEOF
+            for _libcurl_feature in $_libcurl_features ; do
+               cat >>confdefs.h <<_ACEOF
+ #define `echo "libcurl_feature_$_libcurl_feature" | $as_tr_cpp` 1
+ _ACEOF
+               eval `echo "libcurl_feature_$_libcurl_feature" | $as_tr_sh`=yes
+            done
+            if test "x$_libcurl_protocols" = "x" ; then
+               # We don't have --protocols, so just assume that all
+               # protocols are available
+               _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
+               if test x$libcurl_feature_SSL = xyes ; then
+                  _libcurl_protocols="$_libcurl_protocols HTTPS"
+                  # FTPS wasn't standards-compliant until version
+                  # 7.11.0
+                  if test $_libcurl_version -ge 461568; then
+                     _libcurl_protocols="$_libcurl_protocols FTPS"
+                  fi
+               fi
+            fi
+            for _libcurl_protocol in $_libcurl_protocols ; do
+               cat >>confdefs.h <<_ACEOF
+ #define `echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_cpp` 1
+ _ACEOF
+               eval `echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_sh`=yes
+            done
+         else
+            unset LIBCURL
+            unset LIBCURL_CPPFLAGS
+         fi
+      fi
+      unset _libcurl_try_link
+      unset _libcurl_version_parse
+      unset _libcurl_config
+      unset _libcurl_feature
+      unset _libcurl_features
+      unset _libcurl_protocol
+      unset _libcurl_protocols
+      unset _libcurl_version
+      unset _libcurl_ldflags
+   fi
+   if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
+      # This is the IF-NO path
+      HAVE_CURL=no
    else
-     CXXFLAGS=
+      # This is the IF-YES path
+      HAVE_CURL=yes
    fi
- fi
- 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
+   unset _libcurl_with
+     if test x"$HAVE_CURL" = x"yes"; then
+       LIBS="$LIBCURL $LIBS"
+       CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
+     { echo "$as_me:$LINENO: checking for curl_off_t" >&5
+ echo $ECHO_N "checking for curl_off_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_curl_off_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_declaration
+ #ifdef STDC_HEADERS
  #include <stdlib.h>
+ #include <stddef.h>
+ #endif
+ #include <curl/curl.h>
+ typedef curl_off_t ac__type_new_;
  int
  main ()
  {
- exit (42);
+ if ((ac__type_new_ *) 0)
+   return 0;
+ 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_cxx_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_curl_off_t=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- continue
+       ac_cv_type_curl_off_t=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-   cat >conftest.$ac_ext <<_ACEOF
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_type_curl_off_t" >&5
+ echo "${ECHO_T}$ac_cv_type_curl_off_t" >&6; }
+ if test $ac_cv_type_curl_off_t = yes; then
+   :
+ else
+ cat >>confdefs.h <<\_ACEOF
+ #define curl_off_t off_t
+ _ACEOF
+ fi
+     fi
+     HAVE_HMAC=yes
+ { echo "$as_me:$LINENO: checking for HMAC_CTX_init in -lcrypto" >&5
+ echo $ECHO_N "checking for HMAC_CTX_init in -lcrypto... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_crypto_HMAC_CTX_init+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.  */
- $ac_declaration
+ /* 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
+ char HMAC_CTX_init ();
  int
  main ()
  {
exit (42);
return HMAC_CTX_init ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_cxx_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
+   (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_lib_crypto_HMAC_CTX_init=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
- 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
- ac_ext=cc
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- depcc="$CXX"  am_compiler_list=
- echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
- echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
- if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-   # We make a subdir and do the tests there.  Otherwise we can end up
-   # making bogus files that we don't know about and never remove.  For
-   # instance it was reported that on HP-UX the gcc test will end up
-   # making a dummy file named `D' -- because `-MD' means `put the output
-   # in D'.
-   mkdir conftest.dir
-   # Copy depcomp to subdir because otherwise we won't find it if we're
-   # using a relative directory.
-   cp "$am_depcomp" conftest.dir
-   cd conftest.dir
-   # We will build objects and dependencies in a subdirectory because
-   # it helps to detect inapplicable dependency modes.  For instance
-   # both Tru64's cc and ICC support -MD to output dependencies as a
-   # side effect of compilation, but ICC will put the dependencies in
-   # the current directory while Tru64 will put them in the object
-   # directory.
-   mkdir sub
-   am_cv_CXX_dependencies_compiler_type=none
-   if test "$am_compiler_list" = ""; then
-      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-   fi
-   for depmode in $am_compiler_list; do
-     # Setup a source with many dependencies, because some compilers
-     # like to wrap large dependency lists on column 80 (with \), and
-     # we should not choose a depcomp mode which is confused by this.
-     #
-     # We need to recreate these files for each test, as the compiler may
-     # overwrite some of them when testing with obscure command lines.
-     # This happens at least with the AIX C compiler.
-     : > sub/conftest.c
-     for i in 1 2 3 4 5 6; do
-       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-       # Solaris 8's {/usr,}/bin/sh.
-       touch sub/conftst$i.h
-     done
-     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-     case $depmode in
-     nosideeffect)
-       # after this tag, mechanisms are not by side-effect, so they'll
-       # only be used when explicitly requested
-       if test "x$enable_dependency_tracking" = xyes; then
-       continue
-       else
-       break
-       fi
-       ;;
-     none) break ;;
-     esac
-     # We check with `-c' and `-o' for the sake of the "dashmstdout"
-     # mode.  It turns out that the SunPro C++ compiler does not properly
-     # handle `-M -o', and we need to detect this.
-     if depmode=$depmode \
-        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-          >/dev/null 2>conftest.err &&
-        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-       # icc doesn't choke on unknown options, it will just issue warnings
-       # or remarks (even with -Werror).  So we grep stderr for any message
-       # that says an option was ignored or not supported.
-       # When given -MP, icc 7.0 and 7.1 complain thusly:
-       #   icc: Command line warning: ignoring option '-M'; no argument required
-       # The diagnosis changed in icc 8.0:
-       #   icc: Command line remark: option '-MP' not supported
-       if (grep 'ignoring option' conftest.err ||
-           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-         am_cv_CXX_dependencies_compiler_type=$depmode
-         break
-       fi
-     fi
-   done
-   cd ..
-   rm -rf conftest.dir
- else
-   am_cv_CXX_dependencies_compiler_type=none
+       ac_cv_lib_crypto_HMAC_CTX_init=no
  fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
- echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
- CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_HMAC_CTX_init" >&5
+ echo "${ECHO_T}$ac_cv_lib_crypto_HMAC_CTX_init" >&6; }
+ if test $ac_cv_lib_crypto_HMAC_CTX_init = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBCRYPTO 1
+ _ACEOF
  
+   LIBS="-lcrypto $LIBS"
  
- if
-   test "x$enable_dependency_tracking" != xno \
-   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
-   am__fastdepCXX_TRUE=
-   am__fastdepCXX_FALSE='#'
  else
-   am__fastdepCXX_TRUE='#'
-   am__fastdepCXX_FALSE=
+   HAVE_HMAC=no
  fi
  
  
+     found_hmac_h=no
  
  
- if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-     (test "X$CXX" != "Xg++"))) ; then
-   ac_ext=cc
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_cxx_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
- if test -z "$CXXCPP"; then
-   if test "${ac_cv_prog_CXXCPP+set}" = set; then
+ for ac_header in openssl/hmac.h crypto/hmac.h hmac.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-       # Double quotes because CXXCPP needs to be expanded
-     for CXXCPP in "$CXX -E" "/lib/cpp"
-     do
-       ac_preproc_ok=false
- for ac_cxx_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
+   # 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.  */
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
-                    Syntax error
+ $ac_includes_default
+ #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
+ 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); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_cxx_preproc_warn_flag
-     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-   else
-     ac_cpp_err=
-   fi
- else
-   ac_cpp_err=yes
- fi
- if test -z "$ac_cpp_err"; 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
  
-   # Broken: fails on valid input.
- continue
+       ac_header_compiler=no
  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
+ 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; }
+ 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>
+ #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_cxx_preproc_warn_flag
-     ac_cpp_err=$ac_cpp_err$ac_cxx_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
+   (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
  sed 's/^/| /' conftest.$ac_ext >&5
  
-   # Passes both tests.
- ac_preproc_ok=:
- break
+   ac_header_preproc=no
  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_CXXCPP=$CXXCPP
+ { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6; }
  
- fi
-   CXXCPP=$ac_cv_prog_CXXCPP
- else
-   ac_cv_prog_CXXCPP=$CXXCPP
- fi
- echo "$as_me:$LINENO: result: $CXXCPP" >&5
- echo "${ECHO_T}$CXXCPP" >&6
- ac_preproc_ok=false
- for ac_cxx_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.  */
+ # 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;}
+     ;;
+ esac
+ { 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
+ 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
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+  found_hmac_h=yes; break
+ fi
+ done
+     if test x"$found_hmac_h" != x"yes"; then
+       HAVE_HMAC=no
+     fi
+     # Check whether --enable-s3-device was given.
+ if test "${enable_s3_device+set}" = set; then
+   enableval=$enable_s3_device;  WANT_S3_DEVICE=$enableval
+ else
+    WANT_S3_DEVICE=maybe
+ fi
+     { echo "$as_me:$LINENO: checking whether to include the Amazon S3 device" >&5
+ echo $ECHO_N "checking whether to include the Amazon S3 device... $ECHO_C" >&6; }
+     # if the user didn't specify 'no', then check for support
+     if test x"$WANT_S3_DEVICE" != x"no"; then
+       if test x"$HAVE_CURL" = x"yes" -a x"$HAVE_HMAC" = x"yes"; then
+           WANT_S3_DEVICE=yes
+       else
+           # no support -- if the user explicitly enabled the device,
+           # then this is an error
+           if test x"$WANT_S3_DEVICE" = x"yes"; then
+               { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+               { { echo "$as_me:$LINENO: error: Cannot build the Amazon S3 device: one or more prerequisites are missing." >&5
+ echo "$as_me: error: Cannot build the Amazon S3 device: one or more prerequisites are missing." >&2;}
+    { (exit 1); exit 1; }; }
+           else
+               WANT_S3_DEVICE=no
+           fi
+       fi
+     fi
+     { echo "$as_me:$LINENO: result: $WANT_S3_DEVICE" >&5
+ echo "${ECHO_T}$WANT_S3_DEVICE" >&6; }
+      if test x"$WANT_S3_DEVICE" = x"yes"; then
+   WANT_S3_DEVICE_TRUE=
+   WANT_S3_DEVICE_FALSE='#'
+ else
+   WANT_S3_DEVICE_TRUE='#'
+   WANT_S3_DEVICE_FALSE=
+ fi
+     # Now handle any setup for S3, if we want it.
+     if test x"$WANT_S3_DEVICE" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_S3_DEVICE
+ _ACEOF
+     fi
+     # Check whether --enable-devpay was given.
+ if test "${enable_devpay+set}" = set; then
+   enableval=$enable_devpay; WANT_DEVPAY=$enableval
+ else
+   WANT_DEVPAY=no
+ fi
+     { echo "$as_me:$LINENO: checking whether to include the Amazon S3 device's DevPay support" >&5
+ echo $ECHO_N "checking whether to include the Amazon S3 device's DevPay support... $ECHO_C" >&6; }
+     if test x"$WANT_DEVPAY" = x"yes"; then
+       if test x"$WANT_S3_DEVICE" != x"yes"; then
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+           { { echo "$as_me:$LINENO: error: DevPay support requires the S3 device (--enable-s3-device)" >&5
+ echo "$as_me: error: DevPay support requires the S3 device (--enable-s3-device)" >&2;}
+    { (exit 1); exit 1; }; }
+       fi
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_DEVPAY
+ _ACEOF
+     fi
+     { echo "$as_me:$LINENO: result: $WANT_DEVPAY" >&5
+ echo "${ECHO_T}$WANT_DEVPAY" >&6; }
+      if test "$WANT_DEVPAY" = "yes"; then
+   WANT_DEVPAY_TRUE=
+   WANT_DEVPAY_FALSE='#'
+ else
+   WANT_DEVPAY_TRUE='#'
+   WANT_DEVPAY_FALSE=
+ fi
+ for ac_header in \
+       linux/zftape.h \
+       sys/tape.h \
+       sys/mtio.h \
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ 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; }
+ 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
+ $ac_includes_default
+ #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
+ 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); } >/dev/null; then
-   if test -s conftest.err; then
-     ac_cpp_err=$ac_cxx_preproc_warn_flag
-     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-   else
-     ac_cpp_err=
-   fi
- else
-   ac_cpp_err=yes
- fi
- if test -z "$ac_cpp_err"; 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
  
-   # Broken: fails on valid input.
- continue
+       ac_header_compiler=no
  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
+ 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; }
+ 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>
+ #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_cxx_preproc_warn_flag
-     ac_cpp_err=$ac_cpp_err$ac_cxx_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
+   (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
  sed 's/^/| /' conftest.$ac_ext >&5
  
-   # Passes both tests.
- ac_preproc_ok=:
- break
+   ac_header_preproc=no
  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 \"$CXXCPP\" fails sanity check
- See \`config.log' for more details." >&5
- echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
- See \`config.log' for more details." >&2;}
-    { (exit 1); exit 1; }; }
- fi
- ac_ext=cc
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- fi
+ { 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;}
  
- ac_ext=f
- ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
- ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_f77_compiler_gnu
- if test -n "$ac_tool_prefix"; then
-   for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
-   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_F77+set}" = set; then
+     ;;
+ esac
+ { 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
-   if test -n "$F77"; then
-   ac_cv_prog_F77="$F77" # 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_F77="$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
- F77=$ac_cv_prog_F77
- if test -n "$F77"; then
-   echo "$as_me:$LINENO: result: $F77" >&5
- echo "${ECHO_T}$F77" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   eval "$as_ac_Header=\$ac_header_preproc"
  fi
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  
-     test -n "$F77" && break
-   done
  fi
- if test -z "$F77"; then
-   ac_ct_F77=$F77
-   for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
- 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_F77+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -n "$ac_ct_F77"; then
-   ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
- done
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  
- fi
- fi
- ac_ct_F77=$ac_cv_prog_ac_ct_F77
- if test -n "$ac_ct_F77"; then
-   echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
- echo "${ECHO_T}$ac_ct_F77" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
  fi
  
-   test -n "$ac_ct_F77" && break
  done
  
-   F77=$ac_ct_F77
- fi
  
- # Provide some information about the compiler.
- echo "$as_me:24305:" \
-      "checking for Fortran 77 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); }
- rm -f a.out
- # If we don't use `.F' as extension, the preprocessor is not run on the
- # input file.  (Note that this only needs to work for GNU compilers.)
- ac_save_ext=$ac_ext
- ac_ext=F
- echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
- echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
- if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+     # check for MTIOCTOP, an indicator of POSIX tape support
+     { echo "$as_me:$LINENO: checking for MTIOCTOP" >&5
+ echo $ECHO_N "checking for MTIOCTOP... $ECHO_C" >&6; }
+ if test "${amanda_cv_HAVE_MTIOCTOP+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
-       program main
- #ifndef __GNUC__
-        choke me
+       cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #ifdef HAVE_SYS_TAPE_H
+ # include <sys/tape.h>
+ #endif
+ #ifdef HAVE_SYS_MTIO_H
+ # include <sys/mtio.h>
+ #endif
+ #ifndef MTIOCTOP
+ #error MTIOCTOP not defined
  #endif
  
-       end
+ int
+ main ()
+ {
+  int dummy = 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_f77_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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   amanda_cv_HAVE_MTIOCTOP=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_compiler_gnu=no
      amanda_cv_HAVE_MTIOCTOP=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       HAVE_MTIOCTOP=$amanda_cv_HAVE_MTIOCTOP
  
  fi
- echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
- echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
- ac_ext=$ac_save_ext
- ac_test_FFLAGS=${FFLAGS+set}
- ac_save_FFLAGS=$FFLAGS
- FFLAGS=
- echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
- echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
- if test "${ac_cv_prog_f77_g+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   FFLAGS=-g
- cat >conftest.$ac_ext <<_ACEOF
-       program main
+ { echo "$as_me:$LINENO: result: $amanda_cv_HAVE_MTIOCTOP" >&5
+ echo "${ECHO_T}$amanda_cv_HAVE_MTIOCTOP" >&6; }
  
-       end
+     # decide which tape device to compile (arranged in such a way that
+     # only one actually gets compiled)
+     case "$target" in
+       *-ibm-aix*) aix_tapeio=yes ;;
+       *-sysv4.2uw2*) uware_tapeio=yes ;;
+       *-sco3.2v5*) xenix_tapeio=yes ;;
+       i386-pc-isc4*) xenix_tapeio=yes ;;
+     esac
+     # maybe we have no tape device at all (e.g., Mac OS X)?
+     if test -n "$xenix_tapeio" ||
+        test -n "$aix_tapeio" ||
+        test -n "$uware_tapeio" ||
+        test -n "$HAVE_MTIOCTOP"; then
+       want_tape_device=yes
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_TAPE_DEVICE 1
  _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_f77_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_f77_g=yes
+     fi
+      if test -n "$xenix_tapeio"; then
+   WANT_TAPE_XENIX_TRUE=
+   WANT_TAPE_XENIX_FALSE='#'
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   WANT_TAPE_XENIX_TRUE='#'
+   WANT_TAPE_XENIX_FALSE=
+ fi
  
- ac_cv_prog_f77_g=no
+      if test -n "$aix_tapeio"; then
+   WANT_TAPE_AIX_TRUE=
+   WANT_TAPE_AIX_FALSE='#'
+ else
+   WANT_TAPE_AIX_TRUE='#'
+   WANT_TAPE_AIX_FALSE=
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  
+      if test -n "$uware_tapeio"; then
+   WANT_TAPE_UWARE_TRUE=
+   WANT_TAPE_UWARE_FALSE='#'
+ else
+   WANT_TAPE_UWARE_TRUE='#'
+   WANT_TAPE_UWARE_FALSE=
  fi
- echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
- echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
- if test "$ac_test_FFLAGS" = set; then
-   FFLAGS=$ac_save_FFLAGS
- elif test $ac_cv_prog_f77_g = yes; then
-   if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-     FFLAGS="-g -O2"
-   else
-     FFLAGS="-g"
-   fi
+      if test -n "$HAVE_MTIOCTOP"; then
+   WANT_TAPE_POSIX_TRUE=
+   WANT_TAPE_POSIX_FALSE='#'
  else
-   if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-     FFLAGS="-O2"
-   else
-     FFLAGS=
-   fi
+   WANT_TAPE_POSIX_TRUE='#'
+   WANT_TAPE_POSIX_FALSE=
  fi
  
- G77=`test $ac_compiler_gnu = yes && echo yes`
- 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 "$want_tape_device"; then
+   WANT_TAPE_DEVICE_TRUE=
+   WANT_TAPE_DEVICE_FALSE='#'
+ else
+   WANT_TAPE_DEVICE_TRUE='#'
+   WANT_TAPE_DEVICE_FALSE=
+ fi
  
  
+     if test -n "$xenix_tapeio"; then
  
- # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_TAPE_XENIX 1
+ _ACEOF
  
- # find the maximum length of command line arguments
- echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
- echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
- if test "${lt_cv_sys_max_cmd_len+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-     i=0
-   teststring="ABCD"
+     fi
  
-   case $build_os in
-   msdosdjgpp*)
-     # On DJGPP, this test can blow up pretty badly due to problems in libc
-     # (any single argument exceeding 2000 bytes causes a buffer overrun
-     # during glob expansion).  Even if it were fixed, the result of this
-     # check would be larger than it should be.
-     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-     ;;
+     if test -n "$aix_tapeio"; then
  
-   gnu*)
-     # Under GNU Hurd, this test is not required because there is
-     # no limit to the length of command line arguments.
-     # Libtool will interpret -1 as no limit whatsoever
-     lt_cv_sys_max_cmd_len=-1;
-     ;;
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_TAPE_AIX 1
+ _ACEOF
  
-   cygwin* | mingw*)
-     # On Win9x/ME, this test blows up -- it succeeds, but takes
-     # about 5 minutes as the teststring grows exponentially.
-     # Worse, since 9x/ME are not pre-emptively multitasking,
-     # you end up with a "frozen" computer, even though with patience
-     # the test eventually succeeds (with a max line length of 256k).
-     # Instead, let's just punt: use the minimum linelength reported by
-     # all of the supported platforms: 8192 (on NT/2K/XP).
-     lt_cv_sys_max_cmd_len=8192;
-     ;;
+     fi
  
-   amigaos*)
-     # On AmigaOS with pdksh, this test takes hours, literally.
-     # So we just punt and use a minimum line length of 8192.
-     lt_cv_sys_max_cmd_len=8192;
-     ;;
+     if test -n "$uware_tapeio"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define WANT_TAPE_UWARE 1
+ _ACEOF
  
-   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-     # This has been around since 386BSD, at least.  Likely further.
-     if test -x /sbin/sysctl; then
-       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-     elif test -x /usr/sbin/sysctl; then
-       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-     else
-       lt_cv_sys_max_cmd_len=65536     # usable default for all BSDs
      fi
-     # And add a safety zone
-     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-     ;;
-   osf*)
-     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-     # nice to cause kernel panics so lets avoid the loop below.
-     # First set a reasonable default.
-     lt_cv_sys_max_cmd_len=16384
      #
-     if test -x /sbin/sysconfig; then
-       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-         *1*) lt_cv_sys_max_cmd_len=-1 ;;
-       esac
-     fi
-     ;;
-   *)
-     # If test is not a shell built-in, we'll probably end up computing a
-     # maximum length that is only half of the actual maximum length, but
-     # we can't tell.
-     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
-              = "XX$teststring") >/dev/null 2>&1 &&
-           new_result=`expr "X$teststring" : ".*" 2>&1` &&
-           lt_cv_sys_max_cmd_len=$new_result &&
-           test $i != 17 # 1/2 MB should be enough
-     do
-       i=`expr $i + 1`
-       teststring=$teststring$teststring
-     done
-     teststring=
-     # Add a significant safety factor because C++ compilers can tack on massive
-     # amounts of additional arguments before passing them to the linker.
-     # It appears as though 1/2 is a usable value.
-     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-     ;;
-   esac
+     # Check for various "mt status" related structure elements.
+     #
+     { echo "$as_me:$LINENO: checking for mt_flags mtget structure element" >&5
+ echo $ECHO_N "checking for mt_flags mtget structure element... $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.  */
  
- fi
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/mtio.h>
  
- if test -n $lt_cv_sys_max_cmd_len ; then
-   echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
- echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
- else
-   echo "$as_me:$LINENO: result: none" >&5
- echo "${ECHO_T}none" >&6
- fi
+ int
+ main ()
+ {
  
+           struct mtget buf;
+           long ds;
  
+           ds = buf.mt_flags;
  
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
  
- # Check for command to grab the raw symbol name followed by C symbol from nm.
- echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
- echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
- if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
  
- # These are sane defaults that work on at least a few old systems.
- # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_MT_FLAGS 1
+ _ACEOF
  
- # Character class describing NM global symbol codes.
- symcode='[BCDEGRST]'
  
- # Regexp to match symbols that can be accessed directly from C.
- sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # Transform an extracted symbol line into a proper C declaration
- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  
- # Transform an extracted symbol line into symbol name and symbol address
- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  
- # Define system-specific variables.
- case $host_os in
- aix*)
-   symcode='[BCDT]'
-   ;;
- cygwin* | mingw* | pw32*)
-   symcode='[ABCDGISTW]'
-   ;;
- hpux*) # Its linker distinguishes data from code symbols
-   if test "$host_cpu" = ia64; then
-     symcode='[ABCDEGRST]'
-   fi
-   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-   ;;
- linux*)
-   if test "$host_cpu" = ia64; then
-     symcode='[ABCDGIRSTW]'
-     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-   fi
-   ;;
- irix* | nonstopux*)
-   symcode='[BCDEGRST]'
-   ;;
- osf*)
-   symcode='[BCDEGQRST]'
-   ;;
- solaris* | sysv5*)
-   symcode='[BDRT]'
-   ;;
- sysv4)
-   symcode='[DFNSTU]'
-   ;;
- esac
+ fi
  
- # Handle CRLF in mingw tool chain
- opt_cr=
- case $build_os in
- mingw*)
-   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-   ;;
- esac
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
- # If we're using GNU nm, then use its standard symbol codes.
- case `$NM -V 2>&1` in
- *GNU* | *'with BFD'*)
-   symcode='[ABCDGIRSTW]' ;;
- esac
+     { echo "$as_me:$LINENO: checking for mt_fileno mtget structure element" >&5
+ echo $ECHO_N "checking for mt_fileno mtget structure element... $ECHO_C" >&6; }
+     mt_fileno_result="found"
+     cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
- # Try without a prefix undercore, then with it.
- for ac_symprfx in "" "_"; do
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/mtio.h>
  
-   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-   symxfrm="\\1 $ac_symprfx\\2 \\2"
+ int
+ main ()
+ {
  
-   # Write the raw and C identifiers.
-   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+           struct mtget buf;
+           long ds;
  
-   # Check to see that the pipe works correctly.
-   pipe_works=no
+           ds = buf.mt_fileno;
  
-   rm -f conftest*
-   cat > conftest.$ac_ext <<EOF
- #ifdef __cplusplus
- extern "C" {
- #endif
- char nm_test_var;
- void nm_test_func(){}
- #ifdef __cplusplus
+   ;
+   return 0;
  }
- #endif
- int main(){nm_test_var='a';nm_test_func();return(0);}
- EOF
-   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
-     # Now try to grab the symbols.
-     nlist=conftest.nm
-     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
-   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ _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 -s "$nlist"; then
-       # Try sorting and uniquifying the output.
-       if sort "$nlist" | uniq > "$nlist"T; then
-       mv -f "$nlist"T "$nlist"
-       else
-       rm -f "$nlist"T
-       fi
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
  
-       # Make sure that we snagged all the symbols we need.
-       if grep ' nm_test_var$' "$nlist" >/dev/null; then
-       if grep ' nm_test_func$' "$nlist" >/dev/null; then
-         cat <<EOF > conftest.$ac_ext
- #ifdef __cplusplus
- extern "C" {
- #endif
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
  
- EOF
-         # Now generate the symbol file.
-         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
cat >>confdefs.h <<\_ACEOF
+ #define HAVE_MT_FILENO 1
+ _ACEOF
  
-         cat <<EOF >> conftest.$ac_ext
- #if defined (__STDC__) && __STDC__
- # define lt_ptr_t void *
- #else
- # define lt_ptr_t char *
- # define const
- #endif
  
- /* The mapping between symbol names and symbols. */
- const struct {
-   const char *name;
-   lt_ptr_t address;
- }
- lt_preloaded_symbols[] =
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     { echo "$as_me:$LINENO: checking for mt_blkno mtget structure element" >&5
+ echo $ECHO_N "checking for mt_blkno mtget structure element... $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 <stdio.h>
+ #include <sys/types.h>
+ #include <sys/mtio.h>
+ int
+ main ()
  {
- EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-         cat <<\EOF >> conftest.$ac_ext
-   {0, (lt_ptr_t) 0}
- };
  
- #ifdef __cplusplus
+           struct mtget buf;
+           long ds;
+           ds = buf.mt_blkno;
+   ;
+   return 0;
  }
- #endif
- EOF
-         # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
-         LIBS="conftstm.$ac_objext"
-         CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
-         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
+ _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 -s conftest${ac_exeext}; then
-           pipe_works=yes
-         fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
-       else
-         echo "cannot find nm_test_func in $nlist" >&5
-       fi
-       else
-       echo "cannot find nm_test_var in $nlist" >&5
-       fi
-     else
-       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
-     fi
-   else
-     echo "$progname: failed program was:" >&5
-     cat conftest.$ac_ext >&5
-   fi
-   rm -f conftest* conftst*
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
  
-   # Do not use the global_symbol_pipe unless it works.
-   if test "$pipe_works" = yes; then
-     break
-   else
-     lt_cv_sys_global_symbol_pipe=
-   fi
- done
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_MT_BLKNO 1
+ _ACEOF
  
- fi
  
- if test -z "$lt_cv_sys_global_symbol_pipe"; then
-   lt_cv_sys_global_symbol_to_cdecl=
- fi
- if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-   echo "$as_me:$LINENO: result: failed" >&5
- echo "${ECHO_T}failed" >&6
  else
-   echo "$as_me:$LINENO: result: ok" >&5
- echo "${ECHO_T}ok" >&6
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
  
- echo "$as_me:$LINENO: checking for objdir" >&5
- echo $ECHO_N "checking for objdir... $ECHO_C" >&6
- if test "${lt_cv_objdir+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   rm -f .libs 2>/dev/null
- mkdir .libs 2>/dev/null
- if test -d .libs; then
-   lt_cv_objdir=.libs
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     { echo "$as_me:$LINENO: checking for mt_dsreg mtget structure element" >&5
+ echo $ECHO_N "checking for mt_dsreg mtget structure element... $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 <stdio.h>
+ #include <sys/types.h>
+ #include <sys/mtio.h>
+ int
+ main ()
+ {
+           struct mtget buf;
+           long ds;
+           ds = buf.mt_dsreg;
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_MT_DSREG 1
+ _ACEOF
  else
-   # MS-DOS does not allow filenames that begin with a dot.
-   lt_cv_objdir=_libs
- fi
- rmdir .libs 2>/dev/null
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
- echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
- echo "${ECHO_T}$lt_cv_objdir" >&6
- objdir=$lt_cv_objdir
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     { echo "$as_me:$LINENO: checking for mt_erreg mtget structure element" >&5
+ echo $ECHO_N "checking for mt_erreg mtget structure element... $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 <stdio.h>
+ #include <sys/types.h>
+ #include <sys/mtio.h>
  
+ int
+ main ()
+ {
  
+           struct mtget buf;
+           long ds;
  
+           ds = buf.mt_erreg;
  
- case $host_os in
- aix3*)
-   # AIX sometimes has problems with the GCC collect2 program.  For some
-   # reason, if we set the COLLECT_NAMES environment variable, the problems
-   # vanish in a puff of smoke.
-   if test "X${COLLECT_NAMES+set}" != Xset; then
-     COLLECT_NAMES=
-     export COLLECT_NAMES
-   fi
-   ;;
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
  
- # Sed substitution that helps us do robust quoting.  It backslashifies
- # metacharacters that are still active within double-quoted strings.
- Xsed='sed -e 1s/^X//'
- sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
  
- # Same as above, but do not quote variable references.
- double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_MT_ERREG 1
+ _ACEOF
  
- # Sed substitution to delay expansion of an escaped shell variable in a
- # double_quote_subst'ed string.
- delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  
- # Sed substitution to avoid accidental globbing in evaled expressions
- no_glob_subst='s/\*/\\\*/g'
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # Constants:
- rm="rm -f"
  
- # Global variables:
- default_ofile=libtool
- can_build_shared=yes
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  
- # All known linkers require a `.a' archive for static linking (except MSVC,
- # which needs '.lib').
- libext=a
- ltmain="$ac_aux_dir/ltmain.sh"
- ofile="$default_ofile"
- with_gnu_ld="$lt_cv_prog_gnu_ld"
+ fi
  
- if test -n "$ac_tool_prefix"; then
-   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
- set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -n "$AR"; then
-   ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
- done
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ #
+ # Security (authentication) mechansims
+ #
+     BSD_SECURITY="yes"
+ # Check whether --with-bsd-security was given.
+ if test "${with_bsd_security+set}" = set; then
+   withval=$with_bsd_security;
+             case "$withval" in
+                 n | no) BSD_SECURITY=no ;;
+                 y |  ye | yes) ;;
+                 *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --without-bsd-security." >&5
+ echo "$as_me: error: *** You must not supply an argument to --without-bsd-security." >&2;}
+    { (exit 1); exit 1; }; }
+                     ;;
+             esac
  
  fi
+     USE_AMANDAHOSTS=yes
+ # Check whether --with-amandahosts was given.
+ if test "${with_amandahosts+set}" = set; then
+   withval=$with_amandahosts;
+             case "$withval" in
+                 n | no ) USE_AMANDAHOSTS="no" ;;
+                 y |  ye | yes) : ;;
+                 *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --without-amandahosts option." >&5
+ echo "$as_me: error: *** You must not supply an argument to --without-amandahosts option." >&2;}
+    { (exit 1); exit 1; }; }
+                   ;;
+             esac
  fi
- AR=$ac_cv_prog_AR
- if test -n "$AR"; then
-   echo "$as_me:$LINENO: result: $AR" >&5
- echo "${ECHO_T}$AR" >&6
+     if test "x$BSD_SECURITY" = "xyes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define BSD_SECURITY 1
+ _ACEOF
+         if test "x$USE_AMANDAHOSTS" = "xyes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define USE_AMANDAHOSTS 1
+ _ACEOF
+         fi
+     fi
+      if test x"$BSD_SECURITY" = x"yes"; then
+   WANT_BSD_SECURITY_TRUE=
+   WANT_BSD_SECURITY_FALSE='#'
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   WANT_BSD_SECURITY_TRUE='#'
+   WANT_BSD_SECURITY_FALSE=
  fi
  
- fi
- if test -z "$ac_cv_prog_AR"; then
-   ac_ct_AR=$AR
-   # Extract the first word of "ar", so it can be a program name with args.
- set dummy ar; 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_AR+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -n "$ac_ct_AR"; then
-   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
- done
  
-   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
- fi
+     BSDTCP_SECURITY="no"
+ # Check whether --with-bsdtcp-security was given.
+ if test "${with_bsdtcp_security+set}" = set; then
+   withval=$with_bsdtcp_security;
+             case "$withval" in
+                 n | no) : ;;
+                 y |  ye | yes) BSDTCP_SECURITY=yes ;;
+                 *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-bsdtcp-security." >&5
+ echo "$as_me: error: *** You must not supply an argument to --with-bsdtcp-security." >&2;}
+    { (exit 1); exit 1; }; }
+               ;;
+             esac
  fi
- ac_ct_AR=$ac_cv_prog_ac_ct_AR
- if test -n "$ac_ct_AR"; then
-   echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
- echo "${ECHO_T}$ac_ct_AR" >&6
+     if test "x$BSDTCP_SECURITY" = "xyes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define BSDTCP_SECURITY 1
+ _ACEOF
+     fi
+      if test x"$BSDTCP_SECURITY" = x"yes"; then
+   WANT_BSDTCP_SECURITY_TRUE=
+   WANT_BSDTCP_SECURITY_FALSE='#'
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   WANT_BSDTCP_SECURITY_TRUE='#'
+   WANT_BSDTCP_SECURITY_FALSE=
  fi
  
-   AR=$ac_ct_AR
- else
-   AR="$ac_cv_prog_AR"
+     BSDUDP_SECURITY="no"
+ # Check whether --with-bsdudp-security was given.
+ if test "${with_bsdudp_security+set}" = set; then
+   withval=$with_bsdudp_security;
+             case "$withval" in
+                 n | no) : ;;
+                 y |  ye | yes) BSDUDP_SECURITY=yes ;;
+                 *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-bsdudp-security." >&5
+ echo "$as_me: error: *** You must not supply an argument to --with-bsdudp-security." >&2;}
+    { (exit 1); exit 1; }; }
+               ;;
+             esac
  fi
  
- if test -n "$ac_tool_prefix"; then
-   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
- set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -n "$RANLIB"; then
-   ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
- done
  
+     if test "x$BSDUDP_SECURITY" = "xyes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define BSDUDP_SECURITY 1
+ _ACEOF
+     fi
+      if test x"$BSDUDP_SECURITY" = x"yes"; then
+   WANT_BSDUDP_SECURITY_TRUE=
+   WANT_BSDUDP_SECURITY_FALSE='#'
+ else
+   WANT_BSDUDP_SECURITY_TRUE='#'
+   WANT_BSDUDP_SECURITY_FALSE=
  fi
+     RSH_SECURITY=no
+ # Check whether --with-rsh-security was given.
+ if test "${with_rsh_security+set}" = set; then
+   withval=$with_rsh_security;
+             case "$withval" in
+                 n | no) : ;;
+                 y |  ye | yes) RSH_SECURITY=yes ;;
+                 *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-rsh-security." >&5
+ echo "$as_me: error: *** You must not supply an argument to --with-rsh-security." >&2;}
+    { (exit 1); exit 1; }; }
+               ;;
+             esac
  fi
- RANLIB=$ac_cv_prog_RANLIB
- if test -n "$RANLIB"; then
-   echo "$as_me:$LINENO: result: $RANLIB" >&5
- echo "${ECHO_T}$RANLIB" >&6
+     if test "x$RSH_SECURITY" = "xyes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define RSH_SECURITY 1
+ _ACEOF
+     fi
+      if test x"$RSH_SECURITY" = x"yes"; then
+   WANT_RSH_SECURITY_TRUE=
+   WANT_RSH_SECURITY_FALSE='#'
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   WANT_RSH_SECURITY_TRUE='#'
+   WANT_RSH_SECURITY_FALSE=
  fi
  
+     SSH_SECURITY=no
+ # Check whether --with-ssh-security was given.
+ if test "${with_ssh_security+set}" = set; then
+   withval=$with_ssh_security;
+             case "$withval" in
+                 n | no) : ;;
+                 y |  ye | yes) SSH_SECURITY=yes ;;
+                 *) { { echo "$as_me:$LINENO: error: *** You must not supply an argument to --with-ssh-security." >&5
+ echo "$as_me: error: *** You must not supply an argument to --with-ssh-security." >&2;}
+    { (exit 1); exit 1; }; }
+               ;;
+             esac
  fi
- if test -z "$ac_cv_prog_RANLIB"; then
-   ac_ct_RANLIB=$RANLIB
-   # Extract the first word of "ranlib", so it can be a program name with args.
- set dummy ranlib; 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_RANLIB+set}" = set; then
+     if test "x$SSH_SECURITY" = "xyes"; then
+         # find the SSH binary
+         for ac_prog in ssh
+ 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_path_SSH+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test -n "$ac_ct_RANLIB"; then
-   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
- else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
- for as_dir in $PATH
+   case $SSH in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_SSH="$SSH" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
  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_RANLIB="ranlib"
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_SSH="$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
  
-   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
- fi
+   ;;
+ esac
  fi
- ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
- if test -n "$ac_ct_RANLIB"; then
-   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
- echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ SSH=$ac_cv_path_SSH
+ if test -n "$SSH"; then
+   { echo "$as_me:$LINENO: result: $SSH" >&5
+ echo "${ECHO_T}$SSH" >&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
  
-   RANLIB=$ac_ct_RANLIB
- else
-   RANLIB="$ac_cv_prog_RANLIB"
- fi
  
- if test -n "$ac_tool_prefix"; then
-   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
- set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -n "$STRIP"; then
-   ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
+   test -n "$SSH" && break
  done
  
- fi
- fi
- STRIP=$ac_cv_prog_STRIP
- if test -n "$STRIP"; then
-   echo "$as_me:$LINENO: result: $STRIP" >&5
- echo "${ECHO_T}$STRIP" >&6
+         # see what options we should use
+ # Check whether --with-ssh-options was given.
+ if test "${with_ssh_options+set}" = set; then
+   withval=$with_ssh_options;  SSH_OPTIONS="$withval"
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
+    SSH_OPTIONS=''
  
  fi
- if test -z "$ac_cv_prog_STRIP"; then
-   ac_ct_STRIP=$STRIP
-   # Extract the first word of "strip", so it can be a program name with args.
- set dummy strip; 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_STRIP+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -n "$ac_ct_STRIP"; then
-   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
- done
  
-   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+         case "$SSH_OPTIONS" in
+             y | ye | yes | n | no)
+                 { { echo "$as_me:$LINENO: error: *** You must supply an argument to --with-ssh-options." >&5
+ echo "$as_me: error: *** You must supply an argument to --with-ssh-options." >&2;}
+    { (exit 1); exit 1; }; };;
+             *) : ;;
+         esac
+         { echo "$as_me:$LINENO: checking SSH options" >&5
+ echo $ECHO_N "checking SSH options... $ECHO_C" >&6; }
+         # if we didn't get SSH options from the user, figure them out for ourselves
+         if test -z "$SSH_OPTIONS"; then
+             case `$SSH -V 2>&1` in
+                 OpenSSH*) SSH_OPTIONS='-x -o BatchMode=yes -o PreferredAuthentications=publickey';;
+                 *) SSH_OPTIONS='-x -o BatchMode=yes' ;;
+             esac
+         fi
+         # now convert that to a comma-separated list of C strings
+         eval "set dummy ${SSH_OPTIONS}"; shift
+         SSH_OPTIONS=''
+       for i in "${@}"; do
+           quoted="\"`echo "$i" | sed -e 's/\"/\\\"/'`\""
+           SSH_OPTIONS="${SSH_OPTIONS}${SSH_OPTIONS:+, }$quoted";
+       done
+         { echo "$as_me:$LINENO: result: $SSH_OPTIONS" >&5
+ echo "${ECHO_T}$SSH_OPTIONS" >&6; }
+         # finally, make the various outputs for all of this
+ cat >>confdefs.h <<\_ACEOF
+ #define SSH_SECURITY 1
+ _ACEOF
+ cat >>confdefs.h <<_ACEOF
+ #define SSH "$SSH"
+ _ACEOF
+ cat >>confdefs.h <<_ACEOF
+ #define SSH_OPTIONS $SSH_OPTIONS
+ _ACEOF
+     fi
+      if test x"$SSH_SECURITY" = x"yes"; then
+   WANT_SSH_SECURITY_TRUE=
+   WANT_SSH_SECURITY_FALSE='#'
+ else
+   WANT_SSH_SECURITY_TRUE='#'
+   WANT_SSH_SECURITY_FALSE=
  fi
+     # Specify --with-krb4-security if Kerberos software is in somewhere
+     # other than the listed KRB4_SPOTS.  We only compile kerberos support in
+     # if the right files are there.
+     : ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
+     KRB4_SECURITY="no"
+ # Check whether --with-krb4-security was given.
+ if test "${with_krb4_security+set}" = set; then
+   withval=$with_krb4_security;
+             case "$withval" in
+                 n | no) ;;
+                 y | ye | yes) KRB4_SECURITY="yes" ;;
+                 *) KRB4_SPOTS="$KRB4_SECURITY"
+                    KRB4_SECURITY="yes"
+                    ;;
+             esac
  fi
- ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
- if test -n "$ac_ct_STRIP"; then
-   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
- echo "${ECHO_T}$ac_ct_STRIP" >&6
+     # check the remaining, subsidiary options
+     { echo "$as_me:$LINENO: checking host principal" >&5
+ echo $ECHO_N "checking host principal... $ECHO_C" >&6; }
+ # Check whether --with-server-principal was given.
+ if test "${with_server_principal+set}" = set; then
+   withval=$with_server_principal;
+             case "$withval" in
+                 "" | y | ye | yes | n | no)
+                     { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-server-principal option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-server-principal option." >&2;}
+    { (exit 1); exit 1; }; }
+                   ;;
+                 *) SERVER_HOST_PRINCIPAL="$withval" ;;
+             esac
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+    : ${SERVER_HOST_PRINCIPAL="amanda"}
  fi
  
-   STRIP=$ac_ct_STRIP
+     { echo "$as_me:$LINENO: result: $SERVER_HOST_PRINCIPAL" >&5
+ echo "${ECHO_T}$SERVER_HOST_PRINCIPAL" >&6; }
+     { echo "$as_me:$LINENO: checking server host instance" >&5
+ echo $ECHO_N "checking server host instance... $ECHO_C" >&6; }
+ # Check whether --with-server-instance was given.
+ if test "${with_server_instance+set}" = set; then
+   withval=$with_server_instance;
+             case "$withval" in
+                 "" | y | ye | yes | n | no)
+                     { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-server-instance option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-server-instance option." >&2;}
+    { (exit 1); exit 1; }; }
+                   ;;
+                 *) SERVER_HOST_INSTANCE="$withval" ;;
+             esac
  else
-   STRIP="$ac_cv_prog_STRIP"
+    : ${SERVER_HOST_INSTANCE="amanda"}
  fi
  
+     { echo "$as_me:$LINENO: result: $SERVER_HOST_INSTANCE" >&5
+ echo "${ECHO_T}$SERVER_HOST_INSTANCE" >&6; }
  
- old_CC="$CC"
- old_CFLAGS="$CFLAGS"
+     { echo "$as_me:$LINENO: checking server host key file" >&5
+ echo $ECHO_N "checking server host key file... $ECHO_C" >&6; }
  
- # Set sane defaults for various variables
- test -z "$AR" && AR=ar
- test -z "$AR_FLAGS" && AR_FLAGS=cru
- test -z "$AS" && AS=as
- test -z "$CC" && CC=cc
- test -z "$LTCC" && LTCC=$CC
- test -z "$DLLTOOL" && DLLTOOL=dlltool
- test -z "$LD" && LD=ld
- test -z "$LN_S" && LN_S="ln -s"
- test -z "$MAGIC_CMD" && MAGIC_CMD=file
- test -z "$NM" && NM=nm
- test -z "$SED" && SED=sed
- test -z "$OBJDUMP" && OBJDUMP=objdump
- test -z "$RANLIB" && RANLIB=:
- test -z "$STRIP" && STRIP=:
- test -z "$ac_objext" && ac_objext=o
+ # Check whether --with-server-keyfile was given.
+ if test "${with_server_keyfile+set}" = set; then
+   withval=$with_server_keyfile;
+             case "$withval" in
+                 "" | y | ye | yes | n | no)
+                     { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-server-keyfile option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-server-keyfile option." >&2;}
+    { (exit 1); exit 1; }; }
+                   ;;
+                 *) SERVER_HOST_KEY_FILE="$withval" ;;
+             esac
  
- # Determine commands to create old-style static archives.
- old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
- old_postinstall_cmds='chmod 644 $oldlib'
- old_postuninstall_cmds=
+ else
+    : ${SERVER_HOST_KEY_FILE="/.amanda"}
  
- if test -n "$RANLIB"; then
-   case $host_os in
-   openbsd*)
-     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
-     ;;
-   *)
-     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-     ;;
-   esac
-   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  fi
  
- for cc_temp in $compiler""; do
-   case $cc_temp in
-     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-     \-*) ;;
-     *) break;;
-   esac
- done
- cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+     { echo "$as_me:$LINENO: result: $SERVER_HOST_KEY_FILE" >&5
+ echo "${ECHO_T}$SERVER_HOST_KEY_FILE" >&6; }
  
+     { echo "$as_me:$LINENO: checking client host principle" >&5
+ echo $ECHO_N "checking client host principle... $ECHO_C" >&6; }
  
- # Only perform the check for file, if the check method requires it
- case $deplibs_check_method in
- file_magic*)
-   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
- echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
- if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   case $MAGIC_CMD in
- [\\/*] |  ?:[\\/]*)
-   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-   ;;
- *)
-   lt_save_MAGIC_CMD="$MAGIC_CMD"
-   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-   for ac_dir in $ac_dummy; do
-     IFS="$lt_save_ifs"
-     test -z "$ac_dir" && ac_dir=.
-     if test -f $ac_dir/${ac_tool_prefix}file; then
-       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
-       if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<EOF 1>&2
+ # Check whether --with-client-principal was given.
+ if test "${with_client_principal+set}" = set; then
+   withval=$with_client_principal;
+             case "$withval" in
+                 "" | y | ye | yes | n | no)
+                     { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-client-principal option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-client-principal option." >&2;}
+    { (exit 1); exit 1; }; }
+                   ;;
+                 *) CLIENT_HOST_PRINCIPAL="$withval" ;;
+             esac
  
- *** Warning: the command libtool uses to detect shared libraries,
- *** $file_magic_cmd, produces output that libtool cannot recognize.
- *** The result is that libtool may fail to recognize shared libraries
- *** as such.  This will affect the creation of libtool libraries that
- *** depend on shared libraries, but programs linked with such libtool
- *** libraries will work regardless of this problem.  Nevertheless, you
- *** may want to report the problem to your system manager and/or to
- *** bug-libtool@gnu.org
+ else
+    : ${CLIENT_HOST_PRINCIPAL="rcmd"}
  
- EOF
-         fi ;;
-       esac
-       fi
-       break
-     fi
-   done
-   IFS="$lt_save_ifs"
-   MAGIC_CMD="$lt_save_MAGIC_CMD"
-   ;;
- esac
  fi
  
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if test -n "$MAGIC_CMD"; then
-   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
- echo "${ECHO_T}$MAGIC_CMD" >&6
+     { echo "$as_me:$LINENO: result: $CLIENT_HOST_PRINCIPAL" >&5
+ echo "${ECHO_T}$CLIENT_HOST_PRINCIPAL" >&6; }
+     { echo "$as_me:$LINENO: checking client host instance" >&5
+ echo $ECHO_N "checking client host instance... $ECHO_C" >&6; }
+ # Check whether --with-client-instance was given.
+ if test "${with_client_instance+set}" = set; then
+   withval=$with_client_instance;
+             case "$withval" in
+                 "" | y | ye | yes | n | no)
+                     { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-client-instance option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-client-instance option." >&2;}
+    { (exit 1); exit 1; }; }
+                   ;;
+                 *) CLIENT_HOST_INSTANCE="$withval" ;;
+             esac
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+    : ${CLIENT_HOST_INSTANCE=HOSTNAME_INSTANCE}
  fi
  
- if test -z "$lt_cv_path_MAGIC_CMD"; then
-   if test -n "$ac_tool_prefix"; then
-     echo "$as_me:$LINENO: checking for file" >&5
- echo $ECHO_N "checking for file... $ECHO_C" >&6
- if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+     { echo "$as_me:$LINENO: result: $CLIENT_HOST_INSTANCE" >&5
+ echo "${ECHO_T}$CLIENT_HOST_INSTANCE" >&6; }
+     { echo "$as_me:$LINENO: checking client host key file" >&5
+ echo $ECHO_N "checking client host key file... $ECHO_C" >&6; }
+ # Check whether --with-client-keyfile was given.
+ if test "${with_client_keyfile+set}" = set; then
+   withval=$with_client_keyfile;
+             case "$withval" in
+                 "" | y | ye | yes | n | no)
+                     { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-client-keyfile option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-client-keyfile option." >&2;}
+    { (exit 1); exit 1; }; }
+                   ;;
+                 *) CLIENT_HOST_KEY_FILE="$withval" ;;
+             esac
  else
-   case $MAGIC_CMD in
- [\\/*] |  ?:[\\/]*)
-   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-   ;;
- *)
-   lt_save_MAGIC_CMD="$MAGIC_CMD"
-   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-   for ac_dir in $ac_dummy; do
-     IFS="$lt_save_ifs"
-     test -z "$ac_dir" && ac_dir=.
-     if test -f $ac_dir/file; then
-       lt_cv_path_MAGIC_CMD="$ac_dir/file"
-       if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<EOF 1>&2
+    : ${CLIENT_HOST_KEY_FILE=KEYFILE}
  
- *** Warning: the command libtool uses to detect shared libraries,
- *** $file_magic_cmd, produces output that libtool cannot recognize.
- *** The result is that libtool may fail to recognize shared libraries
- *** as such.  This will affect the creation of libtool libraries that
- *** depend on shared libraries, but programs linked with such libtool
- *** libraries will work regardless of this problem.  Nevertheless, you
- *** may want to report the problem to your system manager and/or to
- *** bug-libtool@gnu.org
+ fi
  
- EOF
-         fi ;;
-       esac
-       fi
-       break
+     # Assume it's either KEYFILE (defined in krb.h), or a string filename...
+     if test "x$CLIENT_HOST_KEY_FILE" != "xKEYFILE"; then
+       # add quotes
+       CLIENT_HOST_KEY_FILE="\"$CLIENT_HOST_KEY_FILE\""
      fi
-   done
-   IFS="$lt_save_ifs"
-   MAGIC_CMD="$lt_save_MAGIC_CMD"
-   ;;
- esac
- fi
+     { echo "$as_me:$LINENO: result: $CLIENT_HOST_KEY_FILE" >&5
+ echo "${ECHO_T}$CLIENT_HOST_KEY_FILE" >&6; }
+     { echo "$as_me:$LINENO: checking ticket lifetime" >&5
+ echo $ECHO_N "checking ticket lifetime... $ECHO_C" >&6; }
+ # Check whether --with-ticket-lifetime was given.
+ if test "${with_ticket_lifetime+set}" = set; then
+   withval=$with_ticket_lifetime;
+             case "$withval" in
+             "" | y | ye | yes | n | no)
+                 { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-ticket-lifetime option." >&5
+ echo "$as_me: error: *** You must supply an argument to the --with-ticket-lifetime option." >&2;}
+    { (exit 1); exit 1; }; }
+               ;;
+             *) TICKET_LIFETIME="$withval" ;;
+             esac
  
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if test -n "$MAGIC_CMD"; then
-   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
- echo "${ECHO_T}$MAGIC_CMD" >&6
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
+    : ${TICKET_LIFETIME=128}
  
-   else
-     MAGIC_CMD=:
-   fi
  fi
  
-   fi
-   ;;
- esac
+     { echo "$as_me:$LINENO: result: $TICKET_LIFETIME" >&5
+ echo "${ECHO_T}$TICKET_LIFETIME" >&6; }
  
- enable_dlopen=no
- enable_win32_dll=no
  
- # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
- if test "${enable_libtool_lock+set}" = set; then
-   enableval="$enable_libtool_lock"
+     if test "x${KRB4_SECURITY}" = "xyes"; then
+         { echo "$as_me:$LINENO: checking for Kerberos and Amanda kerberos4 bits" >&5
+ echo $ECHO_N "checking for Kerberos and Amanda kerberos4 bits... $ECHO_C" >&6; }
+         found="no"
+         for dir in $KRB4_SPOTS; do
+             if test \( -f ${dir}/lib/libkrb.a -o -f ${dir}/lib/libkrb.so \) -a \( -f ${dir}/lib/libdes.a -o -f ${dir}/lib/libdes.so \) ; then
+                 #
+                 # This is the original Kerberos 4.
+                 #
+                 { echo "$as_me:$LINENO: result: found in $dir" >&5
+ echo "${ECHO_T}found in $dir" >&6; }
+                 found="yes"
  
- fi;
- test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+                 #
+                 # This handles BSD/OS.
+                 #
+                 if test -d $dir/include/kerberosIV ; then
+                     CPPFLAGS="$CPPFLAGS -I$dir/include/kerberosIV"
  
+                 else
+                     CPPFLAGS="$CPPFLAGS -I$dir/include"
  
- # Check whether --with-pic or --without-pic was given.
- if test "${with_pic+set}" = set; then
-   withval="$with_pic"
-   pic_mode="$withval"
- else
-   pic_mode=default
- fi;
- test -z "$pic_mode" && pic_mode=default
+                 fi
+                 LDFLAGS="$LDFLAGS -L$dir/lib"
  
- # Use C for the default configuration in the libtool script
- tagname=
- lt_save_CC="$CC"
- 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
+                 LIBS="-lkrb -ldes $LIBS"
  
+                 if test -f ${dir}/lib/libcom_err.a; then
+                     LIBS="-lcom_err $LIBS"
  
- # Source file extension for C test sources.
- ac_ext=c
+                 fi
+                 break
+             elif test \( -f ${dir}/lib/libkrb4.a -o -f ${dir}/lib/libkrb4.so \) &&
+                  test \( -f ${dir}/lib/libcrypto.a -o -f ${dir}/lib/libcrypto.so \) &&
+                  test \( -f ${dir}/lib/libdes425.a -o -f ${dir}/lib/libdes425.so \) ; then
+                 #
+                 # This is Kerberos 5 with Kerberos 4 back-support.
+                 #
+                 { echo "$as_me:$LINENO: result: found in $dir" >&5
+ echo "${ECHO_T}found in $dir" >&6; }
+                 found="yes"
+                 CPPFLAGS="$CPPFLAGS -I$dir/include -I$dir/include/kerberosIV"
+                 LDFLAGS="$LDFLAGS -L$dir/lib"
+                 if test \( -f ${dir}/lib/libkrb5.a -o -f ${dir}/lib/libkrb5.so \) &&
+                    test \( -f ${dir}/lib/libcom_err.a -o -f ${dir}/lib/libcom_err.so \) ; then
+                     LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err $LIBS"
  
- # Object file extension for compiled C test sources.
- objext=o
- objext=$objext
+                 else
+                     LIBS="-lkrb4 -lcrypto -ldes425 $LIBS"
  
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;\n"
+                 fi
+                 break
+             fi
+         done
  
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(){return(0);}\n'
+         if test "x$found" = "xno" ; then
+             { echo "$as_me:$LINENO: result: no libraries found" >&5
+ echo "${ECHO_T}no libraries found" >&6; }
  
+     { echo "$as_me:$LINENO: WARNING: No Kerberos IV libraries were found on your system; disabling krb4-security" >&5
+ echo "$as_me: WARNING: No Kerberos IV libraries were found on your system; disabling krb4-security" >&2;}
  
- # If no C compiler was specified, use CC.
- LTCC=${LTCC-"$CC"}
  
- # Allow CC to be a program name with arguments.
- compiler=$CC
+     cat <<AAW_EOF >>config.warnings
+ No Kerberos IV libraries were found on your system; disabling krb4-security
+ AAW_EOF
  
  
- # save warnings/boilerplate of simple test code
- ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" >conftest.$ac_ext
- eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
- _lt_compiler_boilerplate=`cat conftest.err`
- $rm conftest*
+             KRB4_SECURITY="no"
+         else
  
- ac_outfile=conftest.$ac_objext
- printf "$lt_simple_link_test_code" >conftest.$ac_ext
- eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
- _lt_linker_boilerplate=`cat conftest.err`
- $rm conftest*
+ cat >>confdefs.h <<\_ACEOF
+ #define KRB4_SECURITY 1
+ _ACEOF
  
  
- #
- # Check for any special shared library compilation flags.
- #
- lt_prog_cc_shlib=
- if test "$GCC" = no; then
-   case $host_os in
-   sco3.2v5*)
-     lt_prog_cc_shlib='-belf'
-     ;;
-   esac
- fi
- if test -n "$lt_prog_cc_shlib"; then
-   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
- echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
-   if echo "$old_CC $old_CFLAGS " | grep "[    ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
-   else
-     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
- echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
-     lt_cv_prog_cc_can_build_shared=no
-   fi
- fi
+ cat >>confdefs.h <<_ACEOF
+ #define SERVER_HOST_PRINCIPAL "$SERVER_HOST_PRINCIPAL"
+ _ACEOF
  
  
- #
- # Check to make sure the static flag actually works.
- #
- echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
- echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
- if test "${lt_prog_compiler_static_works+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   lt_prog_compiler_static_works=no
-    save_LDFLAGS="$LDFLAGS"
-    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
-    printf "$lt_simple_link_test_code" > conftest.$ac_ext
-    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-      # The linker can only warn and ignore the option if not recognized
-      # So say no if there are warnings
-      if test -s conftest.err; then
-        # Append any errors to the config.log.
-        cat conftest.err 1>&5
-        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
-        $SED '/^$/d' conftest.err >conftest.er2
-        if diff conftest.exp conftest.er2 >/dev/null; then
-          lt_prog_compiler_static_works=yes
-        fi
-      else
-        lt_prog_compiler_static_works=yes
-      fi
-    fi
-    $rm conftest*
-    LDFLAGS="$save_LDFLAGS"
+ cat >>confdefs.h <<_ACEOF
+ #define SERVER_HOST_INSTANCE "$SERVER_HOST_INSTANCE"
+ _ACEOF
  
- fi
- echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
- echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
  
- if test x"$lt_prog_compiler_static_works" = xyes; then
-     :
- else
-     lt_prog_compiler_static=
- fi
+ cat >>confdefs.h <<_ACEOF
+ #define SERVER_HOST_KEY_FILE "$SERVER_HOST_KEY_FILE"
+ _ACEOF
  
  
+ cat >>confdefs.h <<_ACEOF
+ #define CLIENT_HOST_PRINCIPAL "$CLIENT_HOST_PRINCIPAL"
+ _ACEOF
  
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
  
- lt_prog_compiler_no_builtin_flag=
+ cat >>confdefs.h <<_ACEOF
+ #define CLIENT_HOST_INSTANCE $CLIENT_HOST_INSTANCE
+ _ACEOF
  
- if test "$GCC" = yes; then
-   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
  
+ cat >>confdefs.h <<_ACEOF
+ #define CLIENT_HOST_KEY_FILE $CLIENT_HOST_KEY_FILE
+ _ACEOF
  
- echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
- echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
- if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   lt_cv_prog_compiler_rtti_exceptions=no
-   ac_outfile=conftest.$ac_objext
-    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-    lt_compiler_flag="-fno-rtti -fno-exceptions"
-    # Insert the option either (1) after the last *FLAGS variable, or
-    # (2) before a word containing "conftest.", or (3) at the end.
-    # Note that $ac_compile itself does not contain backslashes and begins
-    # with a dollar sign (not a hyphen), so the echo should work correctly.
-    # The option is referenced via a variable to avoid confusing sed.
-    lt_compile=`echo "$ac_compile" | $SED \
-    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-    -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:25407: $lt_compile\"" >&5)
-    (eval "$lt_compile" 2>conftest.err)
-    ac_status=$?
-    cat conftest.err >&5
-    echo "$as_me:25411: \$? = $ac_status" >&5
-    if (exit $ac_status) && test -s "$ac_outfile"; then
-      # The compiler can only warn and ignore the option if not recognized
-      # So say no if there are warnings other than the usual output.
-      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
-      $SED '/^$/d' conftest.err >conftest.er2
-      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
-        lt_cv_prog_compiler_rtti_exceptions=yes
-      fi
-    fi
-    $rm conftest*
  
- fi
- echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
- echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+ cat >>confdefs.h <<_ACEOF
+ #define TICKET_LIFETIME $TICKET_LIFETIME
+ _ACEOF
  
- if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+         fi
+     fi
+      if test x"$KRB4_SECURITY" = x"yes"; then
+   WANT_KRB4_SECURITY_TRUE=
+   WANT_KRB4_SECURITY_FALSE='#'
  else
-     :
+   WANT_KRB4_SECURITY_TRUE='#'
+   WANT_KRB4_SECURITY_FALSE=
  fi
  
- fi
  
- lt_prog_compiler_wl=
- lt_prog_compiler_pic=
- lt_prog_compiler_static=
  
- echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
- echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+     # Specify --with-krb5-security if Kerberos software is in somewhere
+     # other than the listed KRB5_SPOTS.  We only compile kerberos support in
+     # if the right files are there.
  
-   if test "$GCC" = yes; then
-     lt_prog_compiler_wl='-Wl,'
-     lt_prog_compiler_static='-static'
+     KRB5_SECURITY="no"
+     : ${KRB5_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
  
-     case $host_os in
-       aix*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-       fi
-       ;;
  
-     amigaos*)
-       # FIXME: we need at least 68020 code to build shared libraries, but
-       # adding the `-m68020' flag to GCC prevents building anything better,
-       # like `-m68040'.
-       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
-       ;;
+ # Check whether --with-krb5-security was given.
+ if test "${with_krb5_security+set}" = set; then
+   withval=$with_krb5_security;
+             case "$withval" in
+                 n | no) KRB5_SECURITY=no ;;
+                 y | ye | yes) KRB5_SECURITY=yes ;;
+                 *) KRB5_SPOTS="$KRB5_SECURITY"
+                    KRB5_SECURITY=yes
+                    ;;
+             esac
  
-     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-       # PIC is the default for these OSes.
-       ;;
  
-     mingw* | pw32* | os2*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       lt_prog_compiler_pic='-DDLL_EXPORT'
-       ;;
+ fi
  
-     darwin* | rhapsody*)
-       # PIC is the default on this platform
-       # Common symbols not allowed in MH_DYLIB files
-       lt_prog_compiler_pic='-fno-common'
-       ;;
  
-     msdosdjgpp*)
-       # Just because we use GCC doesn't mean we suddenly get shared libraries
-       # on systems that don't support them.
-       lt_prog_compiler_can_build_shared=no
-       enable_shared=no
-       ;;
+     if test "x$KRB5_SECURITY" = "xyes"; then
+         # if found, force the static versions of these libs (.a) by linking directly
+         # with the .a files.  I don't know how to get -R dependancies checked
+         # in autoconf at this time. -kashmir
+         { echo "$as_me:$LINENO: checking for Kerberos V libraries" >&5
+ echo $ECHO_N "checking for Kerberos V libraries... $ECHO_C" >&6; }
+         KRB5_DIR_FOUND=""
+         for dir in $KRB5_SPOTS; do
+           for lib in lib lib64; do
+             k5libdir=${dir}/${lib}
+             if test \( -f ${k5libdir}/libkrb5.a -o -f ${k5libdir}/libkrb5.so \) -a \( -f ${k5libdir}/libgssapi_krb5.so -o -f ${k5libdir}/libgssapi_krb5.a \) -a \( -f ${k5libdir}/libcom_err.a -o -f ${k5libdir}/libcom_err.so \); then
+                 if test -f ${k5libdir}/libk5crypto.a -o -f ${k5libdir}/libk5crypto.so; then
+                     K5CRYPTO=-lk5crypto
+                 elif test -f ${k5libdir}/libcrypto.a -o -f ${k5libdir}/libcrypto.so; then
+                     K5CRYPTO=-lcrypto
+                 else
+                     K5CRYPTO=""
+                 fi
+                 if test -f ${k5libdir}/libkrb5support.a -o -f ${k5libdir}/libkrb5support.so; then
+                     K5SUPPORT=-lkrb5support
+                 else
+                     K5SUPPORT=""
+                 fi
+                 KRB5_DIR_FOUND=$dir
+                 KRB5_LIBDIR_FOUND=$k5libdir
+                 LIBS="-lgssapi_krb5 -lkrb5 $K5CRYPTO $K5SUPPORT -lcom_err $LIBS"
  
-     sysv4*MP*)
-       if test -d /usr/nec; then
-       lt_prog_compiler_pic=-Kconform_pic
-       fi
-       ;;
+                 break
+             elif test \( -f ${k5libdir}/libkrb5.a -o -f ${k5libdir}/libkrb5.so \) -a \( -f ${k5libdir}/libasn1.a -o -f ${k5libdir}/libasn1.so \) -a \( -f ${k5libdir}/libgssapi.a -o -f ${k5libdir}/libgssapi.so \); then
+                 LIBS="-lgssapi -lkrb5 -lasn1 $LIBS"
  
-     hpux*)
-       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-       # not for PA HP-UX.
-       case $host_cpu in
-       hppa*64*|ia64*)
-       # +Z the default
-       ;;
-       *)
-       lt_prog_compiler_pic='-fPIC'
-       ;;
-       esac
-       ;;
+                 CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL_INCLUDES"
  
-     *)
-       lt_prog_compiler_pic='-fPIC'
-       ;;
-     esac
-   else
-     # PORTME Check for flag to pass linker flags through the system compiler.
-     case $host_os in
-     aix*)
-       lt_prog_compiler_wl='-Wl,'
-       if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-       else
-       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-       darwin*)
-         # PIC is the default on this platform
-         # Common symbols not allowed in MH_DYLIB files
-        case $cc_basename in
-          xlc*)
-          lt_prog_compiler_pic='-qnocommon'
-          lt_prog_compiler_wl='-Wl,'
-          ;;
-        esac
-        ;;
+                 break
+             fi
+           done
+         done
+         if test "$KRB5_DIR_FOUND"; then
+             { echo "$as_me:$LINENO: result: found in $KRB5_DIR_FOUND" >&5
+ echo "${ECHO_T}found in $KRB5_DIR_FOUND" >&6; }
+             #
+             # some OS's, such as NetBSD, stick krb5 includes out of the way...
+             # should probably just use autoconf to look for various include
+             # options and set them, but don't quite want to do that until I've
+             # dug into it a bit more.
+             #
+             if test -d "$KRB5_DIR_FOUND/krb5" ; then
+                 CPPFLAGS="$CPPFLAGS -I$KRB5_DIR_FOUND/include/krb5"
  
-     mingw* | pw32* | os2*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       lt_prog_compiler_pic='-DDLL_EXPORT'
-       ;;
+             else
+                 CPPFLAGS="$CPPFLAGS -I$KRB5_DIR_FOUND/include"
  
-     hpux9* | hpux10* | hpux11*)
-       lt_prog_compiler_wl='-Wl,'
-       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-       # not for PA HP-UX.
-       case $host_cpu in
-       hppa*64*|ia64*)
-       # +Z the default
-       ;;
-       *)
-       lt_prog_compiler_pic='+Z'
-       ;;
-       esac
-       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-       lt_prog_compiler_static='${wl}-a ${wl}archive'
-       ;;
+             fi
  
-     irix5* | irix6* | nonstopux*)
-       lt_prog_compiler_wl='-Wl,'
-       # PIC (with -KPIC) is the default.
-       lt_prog_compiler_static='-non_shared'
-       ;;
+ { echo "$as_me:$LINENO: checking for main in -lkrb5support" >&5
+ echo $ECHO_N "checking for main in -lkrb5support... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_krb5support_main+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lkrb5support  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
-     newsos6)
-       lt_prog_compiler_pic='-KPIC'
-       lt_prog_compiler_static='-Bstatic'
-       ;;
  
-     linux*)
-       case $cc_basename in
-       icc* | ecc*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-KPIC'
-       lt_prog_compiler_static='-static'
-         ;;
-       pgcc* | pgf77* | pgf90* | pgf95*)
-         # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-fpic'
-       lt_prog_compiler_static='-Bstatic'
-         ;;
-       ccc*)
-         lt_prog_compiler_wl='-Wl,'
-         # All Alpha code is PIC.
-         lt_prog_compiler_static='-non_shared'
-         ;;
-       esac
-       ;;
+ int
+ main ()
+ {
+ return main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_krb5support_main=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
-     osf3* | osf4* | osf5*)
-       lt_prog_compiler_wl='-Wl,'
-       # All OSF/1 code is PIC.
-       lt_prog_compiler_static='-non_shared'
-       ;;
+       ac_cv_lib_krb5support_main=no
+ fi
  
-     sco3.2v5*)
-       lt_prog_compiler_pic='-Kpic'
-       lt_prog_compiler_static='-dn'
-       ;;
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_main" >&5
+ echo "${ECHO_T}$ac_cv_lib_krb5support_main" >&6; }
+ if test $ac_cv_lib_krb5support_main = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBKRB5SUPPORT 1
+ _ACEOF
  
-     solaris*)
-       lt_prog_compiler_pic='-KPIC'
-       lt_prog_compiler_static='-Bstatic'
-       case $cc_basename in
-       f77* | f90* | f95*)
-       lt_prog_compiler_wl='-Qoption ld ';;
-       *)
-       lt_prog_compiler_wl='-Wl,';;
-       esac
-       ;;
+   LIBS="-lkrb5support $LIBS"
  
-     sunos4*)
-       lt_prog_compiler_wl='-Qoption ld '
-       lt_prog_compiler_pic='-PIC'
-       lt_prog_compiler_static='-Bstatic'
-       ;;
+ fi
  
-     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-KPIC'
-       lt_prog_compiler_static='-Bstatic'
-       ;;
+             LDFLAGS="$LDFLAGS -L$KRB5_LIBDIR_FOUND"
  
-     sysv4*MP*)
-       if test -d /usr/nec ;then
-       lt_prog_compiler_pic='-Kconform_pic'
-       lt_prog_compiler_static='-Bstatic'
-       fi
-       ;;
  
-     unicos*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_can_build_shared=no
-       ;;
  
-     uts4*)
-       lt_prog_compiler_pic='-pic'
-       lt_prog_compiler_static='-Bstatic'
-       ;;
+ cat >>confdefs.h <<\_ACEOF
+ #define KRB5_SECURITY 1
+ _ACEOF
+         else
+             { echo "$as_me:$LINENO: result: no krb5 system libraries found" >&5
+ echo "${ECHO_T}no krb5 system libraries found" >&6; }
+             { { echo "$as_me:$LINENO: error: No Kerberos V libraries were found on your system; krb5-security cannot be enabled" >&5
+ echo "$as_me: error: No Kerberos V libraries were found on your system; krb5-security cannot be enabled" >&2;}
+    { (exit 1); exit 1; }; }
+             KRB5_SECURITY="no"
+         fi
+     fi
+      if test x"$KRB5_SECURITY" = x"yes"; then
+   WANT_KRB5_SECURITY_TRUE=
+   WANT_KRB5_SECURITY_FALSE='#'
+ else
+   WANT_KRB5_SECURITY_TRUE='#'
+   WANT_KRB5_SECURITY_FALSE=
+ fi
  
-     *)
-       lt_prog_compiler_can_build_shared=no
-       ;;
-     esac
-   fi
  
- echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
- echo "${ECHO_T}$lt_prog_compiler_pic" >&6
  
  #
- # Check to make sure the PIC flag actually works.
+ # Dumpers
  #
- if test -n "$lt_prog_compiler_pic"; then
  
- echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
- echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
- if test "${lt_prog_compiler_pic_works+set}" = set; then
+     for ac_prog in xfsdump
+ 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_path_XFSDUMP+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   lt_prog_compiler_pic_works=no
-   ac_outfile=conftest.$ac_objext
-    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
-    # Insert the option either (1) after the last *FLAGS variable, or
-    # (2) before a word containing "conftest.", or (3) at the end.
-    # Note that $ac_compile itself does not contain backslashes and begins
-    # with a dollar sign (not a hyphen), so the echo should work correctly.
-    # The option is referenced via a variable to avoid confusing sed.
-    lt_compile=`echo "$ac_compile" | $SED \
-    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-    -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:25669: $lt_compile\"" >&5)
-    (eval "$lt_compile" 2>conftest.err)
-    ac_status=$?
-    cat conftest.err >&5
-    echo "$as_me:25673: \$? = $ac_status" >&5
-    if (exit $ac_status) && test -s "$ac_outfile"; then
-      # The compiler can only warn and ignore the option if not recognized
-      # So say no if there are warnings other than the usual output.
-      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
-      $SED '/^$/d' conftest.err >conftest.er2
-      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
-        lt_prog_compiler_pic_works=yes
-      fi
-    fi
-    $rm conftest*
+   case $XFSDUMP in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_XFSDUMP="$XFSDUMP" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $SYSLOCPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_XFSDUMP="$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
- echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
- echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
- if test x"$lt_prog_compiler_pic_works" = xyes; then
-     case $lt_prog_compiler_pic in
-      "" | " "*) ;;
-      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
-      esac
+ XFSDUMP=$ac_cv_path_XFSDUMP
+ if test -n "$XFSDUMP"; then
+   { echo "$as_me:$LINENO: result: $XFSDUMP" >&5
+ echo "${ECHO_T}$XFSDUMP" >&6; }
  else
-     lt_prog_compiler_pic=
-      lt_prog_compiler_can_build_shared=no
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
  
- fi
- case $host_os in
-   # For platforms which do not support PIC, -DPIC is meaningless:
-   *djgpp*)
-     lt_prog_compiler_pic=
-     ;;
-   *)
-     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
-     ;;
- esac
  
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
- echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
- if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+   test -n "$XFSDUMP" && break
+ done
+     for ac_prog in xfsrestore
+ 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_path_XFSRESTORE+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   lt_cv_prog_compiler_c_o=no
-    $rm -r conftest 2>/dev/null
-    mkdir conftest
-    cd conftest
-    mkdir out
-    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-    lt_compiler_flag="-o out/conftest2.$ac_objext"
-    # Insert the option either (1) after the last *FLAGS variable, or
-    # (2) before a word containing "conftest.", or (3) at the end.
-    # Note that $ac_compile itself does not contain backslashes and begins
-    # with a dollar sign (not a hyphen), so the echo should work correctly.
-    lt_compile=`echo "$ac_compile" | $SED \
-    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-    -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:25731: $lt_compile\"" >&5)
-    (eval "$lt_compile" 2>out/conftest.err)
-    ac_status=$?
-    cat out/conftest.err >&5
-    echo "$as_me:25735: \$? = $ac_status" >&5
-    if (exit $ac_status) && test -s out/conftest2.$ac_objext
-    then
-      # The compiler can only warn and ignore the option if not recognized
-      # So say no if there are warnings
-      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
-      $SED '/^$/d' out/conftest.err >out/conftest.er2
-      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-        lt_cv_prog_compiler_c_o=yes
-      fi
-    fi
-    chmod u+w . 2>&5
-    $rm conftest*
-    # SGI C++ compiler will create directory out/ii_files/ for
-    # template instantiation
-    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-    $rm out/* && rmdir out
-    cd ..
-    rmdir conftest
-    $rm conftest*
+   case $XFSRESTORE in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_XFSRESTORE="$XFSRESTORE" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $SYSLOCPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_XFSRESTORE="$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
- echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
- echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
- hard_links="nottested"
- if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
-   # do not overwrite the value of need_locks provided by the user
-   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
- echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-   hard_links=yes
-   $rm conftest*
-   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-   touch conftest.a
-   ln conftest.a conftest.b 2>&5 || hard_links=no
-   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-   echo "$as_me:$LINENO: result: $hard_links" >&5
- echo "${ECHO_T}$hard_links" >&6
-   if test "$hard_links" = no; then
-     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
- echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-     need_locks=warn
-   fi
+ XFSRESTORE=$ac_cv_path_XFSRESTORE
+ if test -n "$XFSRESTORE"; then
+   { echo "$as_me:$LINENO: result: $XFSRESTORE" >&5
+ echo "${ECHO_T}$XFSRESTORE" >&6; }
  else
-   need_locks=no
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
  
- echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
- echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
  
-   runpath_var=
-   allow_undefined_flag=
-   enable_shared_with_static_runtimes=no
-   archive_cmds=
-   archive_expsym_cmds=
-   old_archive_From_new_cmds=
-   old_archive_from_expsyms_cmds=
-   export_dynamic_flag_spec=
-   whole_archive_flag_spec=
-   thread_safe_flag_spec=
-   hardcode_libdir_flag_spec=
-   hardcode_libdir_flag_spec_ld=
-   hardcode_libdir_separator=
-   hardcode_direct=no
-   hardcode_minus_L=no
-   hardcode_shlibpath_var=unsupported
-   link_all_deplibs=unknown
-   hardcode_automatic=no
-   module_cmds=
-   module_expsym_cmds=
-   always_export_symbols=no
-   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-   # include_expsyms should be a list of space-separated symbols to be *always*
-   # included in the symbol list
-   include_expsyms=
-   # exclude_expsyms can be an extended regexp of symbols to exclude
-   # it will be wrapped by ` (' and `)$', so one must not match beginning or
-   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-   # as well as any symbol that contains `d'.
-   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-   # platforms (ab)use it in PIC code, but their linkers get confused if
-   # the symbol is explicitly referenced.  Since portable code cannot
-   # rely on this symbol name, it's probably fine to never include it in
-   # preloaded symbol tables.
-   extract_expsyms_cmds=
-   # Just being paranoid about ensuring that cc_basename is set.
-   for cc_temp in $compiler""; do
-   case $cc_temp in
-     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-     \-*) ;;
-     *) break;;
-   esac
+   test -n "$XFSRESTORE" && break
  done
- cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  
-   case $host_os in
-   cygwin* | mingw* | pw32*)
-     # FIXME: the MSVC++ port hasn't been tested in a loooong time
-     # When not using gcc, we currently assume that we are using
-     # Microsoft Visual C++.
-     if test "$GCC" != yes; then
-       with_gnu_ld=no
-     fi
-     ;;
-   openbsd*)
-     with_gnu_ld=no
-     ;;
-   esac
+     if test "$XFSDUMP" -a "$XFSRESTORE"; then
  
-   ld_shlibs=yes
-   if test "$with_gnu_ld" = yes; then
-     # If archive_cmds runs LD, not CC, wlarc should be empty
-     wlarc='${wl}'
+ cat >>confdefs.h <<_ACEOF
+ #define XFSDUMP "$XFSDUMP"
+ _ACEOF
  
-     # Set some defaults for GNU ld with shared library support. These
-     # are reset later if shared libraries are not supported. Putting them
-     # here allows them to be overridden if necessary.
-     runpath_var=LD_RUN_PATH
-     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-     export_dynamic_flag_spec='${wl}--export-dynamic'
-     # ancient GNU ld didn't support --whole-archive et. al.
-     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-       else
-       whole_archive_flag_spec=
-     fi
-     supports_anon_versioning=no
-     case `$LD -v 2>/dev/null` in
-       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-       *\ 2.11.*) ;; # other 2.11 versions
-       *) supports_anon_versioning=yes ;;
-     esac
  
-     # See if GNU ld supports shared libraries.
-     case $host_os in
-     aix3* | aix4* | aix5*)
-       # On AIX/PPC, the GNU linker is very broken
-       if test "$host_cpu" != ia64; then
-       ld_shlibs=no
-       cat <<EOF 1>&2
+ cat >>confdefs.h <<_ACEOF
+ #define XFSRESTORE "$XFSRESTORE"
+ _ACEOF
  
- *** Warning: the GNU linker, at least up to release 2.9.1, is reported
- *** to be unable to reliably create shared libraries on AIX.
- *** Therefore, libtool is disabling shared libraries support.  If you
- *** really care for shared libraries, you may want to modify your PATH
- *** so that a non-GNU linker is found, and then restart.
  
- EOF
-       fi
-       ;;
+     { echo "$as_me:$LINENO: WARNING: xfsdump causes the setuid-root rundump program to be enabled.  To disable it, just #undef XFSDUMP in config/config.h" >&5
+ echo "$as_me: WARNING: xfsdump causes the setuid-root rundump program to be enabled.  To disable it, just #undef XFSDUMP in config/config.h" >&2;}
  
-     amigaos*)
-       archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-       hardcode_libdir_flag_spec='-L$libdir'
-       hardcode_minus_L=yes
  
-       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-       # that the semantics of dynamic libraries on AmigaOS, at least up
-       # to version 4, is to share data among multiple programs linked
-       # with the same dynamic library.  Since this doesn't match the
-       # behavior of shared libraries on other platforms, we can't use
-       # them.
-       ld_shlibs=no
-       ;;
+     cat <<AAW_EOF >>config.warnings
+ xfsdump causes the setuid-root rundump program to be enabled.  To disable it, just #undef XFSDUMP in config/config.h
+ AAW_EOF
  
-     beos*)
-       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       else
-       ld_shlibs=no
-       fi
-       ;;
  
-     cygwin* | mingw* | pw32*)
-       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
-       # as there is no search path for DLLs.
-       hardcode_libdir_flag_spec='-L$libdir'
-       allow_undefined_flag=unsupported
-       always_export_symbols=no
-       enable_shared_with_static_runtimes=yes
-       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+     fi
  
-       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
-       else
-       ld_shlibs=no
-       fi
-       ;;
  
-     linux*)
-       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  
-       if test $supports_anon_versioning = yes; then
-         archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
-   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-   $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-       fi
-       else
-       ld_shlibs=no
-       fi
-       ;;
  
-     netbsd*)
-       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-       else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-       fi
-       ;;
+     # Extract the first word of "vxdump", so it can be a program name with args.
+ set dummy vxdump; 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_VXDUMP+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $VXDUMP in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_VXDUMP="$VXDUMP" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ as_dummy="$SYSLOCPATH:/usr/lib/fs/vxfs"
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_VXDUMP="$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
  
-     solaris* | sysv5*)
-       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       ld_shlibs=no
-       cat <<EOF 1>&2
+   ;;
+ esac
+ fi
+ VXDUMP=$ac_cv_path_VXDUMP
+ if test -n "$VXDUMP"; then
+   { echo "$as_me:$LINENO: result: $VXDUMP" >&5
+ echo "${ECHO_T}$VXDUMP" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
- *** Warning: The releases 2.8.* of the GNU linker cannot reliably
- *** create shared libraries on Solaris systems.  Therefore, libtool
- *** is disabling shared libraries support.  We urge you to upgrade GNU
- *** binutils to release 2.9.1 or newer.  Another option is to modify
- *** your PATH or compiler configuration so that the native linker is
- *** used, and then restart.
  
- EOF
-       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-       else
-       ld_shlibs=no
-       fi
-       ;;
+     # Extract the first word of "vxrestore", so it can be a program name with args.
+ set dummy vxrestore; 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_VXRESTORE+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $VXRESTORE in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_VXRESTORE="$VXRESTORE" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ as_dummy="$SYSLOCPATH:/usr/lib/fs/vxfs"
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_VXRESTORE="$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
  
-     sunos4*)
-       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-       wlarc=
-       hardcode_direct=yes
-       hardcode_shlibpath_var=no
-       ;;
+   ;;
+ esac
+ fi
+ VXRESTORE=$ac_cv_path_VXRESTORE
+ if test -n "$VXRESTORE"; then
+   { echo "$as_me:$LINENO: result: $VXRESTORE" >&5
+ echo "${ECHO_T}$VXRESTORE" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
-     *)
-       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-       else
-       ld_shlibs=no
-       fi
-       ;;
+     if test "$VXDUMP" -a "$VXRESTORE"; then
+ cat >>confdefs.h <<_ACEOF
+ #define VXDUMP "$VXDUMP"
+ _ACEOF
+ cat >>confdefs.h <<_ACEOF
+ #define VXRESTORE "$VXRESTORE"
+ _ACEOF
+     fi
+     # Extract the first word of "vdump", so it can be a program name with args.
+ set dummy vdump; 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_VDUMP+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $VDUMP in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_VDUMP="$VDUMP" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $SYSLOCPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_VDUMP="$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
+ VDUMP=$ac_cv_path_VDUMP
+ if test -n "$VDUMP"; then
+   { echo "$as_me:$LINENO: result: $VDUMP" >&5
+ echo "${ECHO_T}$VDUMP" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     # Extract the first word of "vrestore", so it can be a program name with args.
+ set dummy vrestore; 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_VRESTORE+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $VRESTORE in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_VRESTORE="$VRESTORE" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $SYSLOCPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_VRESTORE="$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
+ VRESTORE=$ac_cv_path_VRESTORE
+ if test -n "$VRESTORE"; then
+   { echo "$as_me:$LINENO: result: $VRESTORE" >&5
+ echo "${ECHO_T}$VRESTORE" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     if test "$VDUMP" -a "$VRESTORE"; then
+ cat >>confdefs.h <<_ACEOF
+ #define VDUMP "$VDUMP"
+ _ACEOF
+ cat >>confdefs.h <<_ACEOF
+ #define VRESTORE "$VRESTORE"
+ _ACEOF
+     fi
+     # Extract the first word of "grep", so it can be a program name with args.
+ set dummy grep; 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_GREP+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $GREP in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GREP="$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
+   test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="grep"
+   ;;
+ esac
+ fi
+ GREP=$ac_cv_path_GREP
+ if test -n "$GREP"; then
+   { echo "$as_me:$LINENO: result: $GREP" >&5
+ echo "${ECHO_T}$GREP" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+ cat >>confdefs.h <<_ACEOF
+ #define GREP "$GREP"
+ _ACEOF
+     # Set the order of dump programs to look for.  Finding the proper file
+     # system dumping program is problematic.  Some systems, notably HP-UX
+     # and AIX, have both the backup and dump programs.  HP-UX can't use the
+     # the backup program while AIX systems can't use the dump program.  So
+     # a variable is set up here to specify the order of dump programs to
+     # search for on the system.
+     DUMP_PROGRAMS="ufsdump dump backup"
+     dump_returns_1=
+     case "$target" in
+       *-dg-*)
+           DUMP_PROGRAMS="dump "$DUMP_PROGRAMS
+           dump_returns_1=yes
+           ;;
+       *-ibm-aix*)
+           DUMP_PROGRAMS="backup "$DUMP_PROGRAMS
+ cat >>confdefs.h <<\_ACEOF
+ #define AIX_BACKUP 1
+ _ACEOF
+           ;;
+       *-ultrix*)
+           dump_returns_1=yes
+           ;;
      esac
  
-     if test "$ld_shlibs" = no; then
-       runpath_var=
-       hardcode_libdir_flag_spec=
-       export_dynamic_flag_spec=
-       whole_archive_flag_spec=
+     if test -n "$dump_returns_1"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define DUMP_RETURNS_1 1
+ _ACEOF
      fi
-   else
-     # PORTME fill in a description of your system's linker (not GNU ld)
-     case $host_os in
-     aix3*)
-       allow_undefined_flag=unsupported
-       always_export_symbols=yes
-       archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-       # Note: this linker hardcodes the directories in LIBPATH if there
-       # are no directories specified by -L.
-       hardcode_minus_L=yes
-       if test "$GCC" = yes && test -z "$link_static_flag"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct=unsupported
-       fi
-       ;;
  
-     aix4* | aix5*)
-       if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-       else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       else
-         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
+     for ac_prog in $DUMP_PROGRAMS
+ 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_path_DUMP+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $DUMP in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_DUMP="$DUMP" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $SYSLOCPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_DUMP="$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
  
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-       esac
+   ;;
+ esac
+ fi
+ DUMP=$ac_cv_path_DUMP
+ if test -n "$DUMP"; then
+   { echo "$as_me:$LINENO: result: $DUMP" >&5
+ echo "${ECHO_T}$DUMP" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-       fi
  
-       # When large executables or shared objects are built, AIX ld can
-       # have problems creating the table of contents.  If linking a library
-       # or program results in "error TOC overflow" add -mminimal-toc to
-       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+   test -n "$DUMP" && break
+ done
  
-       archive_cmds=''
-       hardcode_direct=yes
-       hardcode_libdir_separator=':'
-       link_all_deplibs=yes
+     for ac_prog in ufsrestore restore
+ 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_path_RESTORE+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $RESTORE in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_RESTORE="$RESTORE" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $SYSLOCPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_RESTORE="$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
  
-       if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         hardcode_direct=yes
-         else
-         # We have old collect2
-         hardcode_direct=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L=yes
-         hardcode_libdir_flag_spec='-L$libdir'
-         hardcode_libdir_separator=
-         fi
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-       else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-       if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-       fi
-       fi
+   ;;
+ esac
+ fi
+ RESTORE=$ac_cv_path_RESTORE
+ if test -n "$RESTORE"; then
+   { echo "$as_me:$LINENO: result: $RESTORE" >&5
+ echo "${ECHO_T}$RESTORE" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   test -n "$RESTORE" && break
+ done
+     # newer versions of GNU tar include a program named 'backup' which
+     # does *not* implement the expected 'dump' interface.  Detect that here
+     # and pretend we never saw it.
+     if test -n "$DUMP"; then
+       if test "`basename $DUMP`" = "backup"; then
+         backup_gnutar=`$DUMP --version | $GREP "GNU tar"`
+         if test $? -eq 0; then
+           DUMP=
+         fi
        fi
+     fi
  
-       # It seems that -bexpall does not export symbols beginning with
-       # underscore (_), so it is better to generate a list of symbols to export.
-       always_export_symbols=yes
-       if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag='-berok'
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
+     if test "$DUMP" -a "$RESTORE"; then
+ cat >>confdefs.h <<_ACEOF
+ #define DUMP "$DUMP"
  _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
  
- int
- main ()
- {
  
-   ;
-   return 0;
- }
+ cat >>confdefs.h <<_ACEOF
+ #define RESTORE "$RESTORE"
  _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-   (eval $ac_link) 2>conftest.er1
+       # check for an estimate flag
+       if test -x $DUMP; then
+           { echo "$as_me:$LINENO: checking whether $DUMP supports -E or -S for estimates" >&5
+ echo $ECHO_N "checking whether $DUMP supports -E or -S for estimates... $ECHO_C" >&6; }
+ if test "${amanda_cv_dump_estimate+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+                   case "$DUMP" in
+                   *dump)
+                       { ac_try='$DUMP 9Ef /dev/null /dev/null/invalid/fs 2>&1
+                           | $GREP -v Dumping
+                           | $GREP -v Date
+                           | $GREP -v Label >conftest.d-E 2>&1'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
    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'
+   (exit $ac_status); }; }
+                       cat conftest.d-E >&5
+                       { ac_try='$DUMP 9Sf /dev/null /dev/null/invalid/fs 2>&1
+                           | $GREP -v Dumping
+                           | $GREP -v Date
+                           | $GREP -v Label >conftest.d-S 2>&1'
    { (eval 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'
+   (exit $ac_status); }; }
+                       cat conftest.d-S >&5
+                       { ac_try='$DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
+                           | $GREP -v Dumping
+                           | $GREP -v Date
+                           | $GREP -v Label >conftest.d 2>&1'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }
+                       cat conftest.d >&5
+                       if { ac_try='cmp conftest.d-E conftest.d 1>&2'
+   { (eval 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
+                           amanda_cv_dump_estimate=E
+                       elif { ac_try='cmp conftest.d-S conftest.d 1>&2'
    { (eval 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
+                           amanda_cv_dump_estimate=S
+                       else
+                           amanda_cv_dump_estimate=no
+                       fi
+                       rm -f conftest.d conftest.d-E conftest.d-S
+                     ;;
+                   *) amanda_cv_dump_estimate=no
+                     ;;
+                   esac
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_dump_estimate" >&5
+ echo "${ECHO_T}$amanda_cv_dump_estimate" >&6; }
+       else
  
- aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`; fi
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+     { echo "$as_me:$LINENO: WARNING: $DUMP is not executable, cannot run -E/-S test" >&5
+ echo "$as_me: WARNING: $DUMP is not executable, cannot run -E/-S test" >&2;}
  
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-        else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag="-z nodefs"
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
+     cat <<AAW_EOF >>config.warnings
+ $DUMP is not executable, cannot run -E/-S test
+ AAW_EOF
  
- int
- main ()
- {
  
-   ;
-   return 0;
- }
+           amanda_cv_dump_estimate=no
+       fi
+       if test "x$amanda_cv_dump_estimate" != xno; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_DUMP_ESTIMATE "$amanda_cv_dump_estimate"
  _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-   (eval $ac_link) 2>conftest.er1
+       fi
+ # Check whether --with-dump-honor-nodump was given.
+ if test "${with_dump_honor_nodump+set}" = set; then
+   withval=$with_dump_honor_nodump;
+           if test -x $DUMP; then
+               { echo "$as_me:$LINENO: checking whether $DUMP supports -h (honor nodump flag)" >&5
+ echo $ECHO_N "checking whether $DUMP supports -h (honor nodump flag)... $ECHO_C" >&6; }
+ if test "${amanda_cv_honor_nodump+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+                   case "$DUMP" in
+                   *dump)
+                       { ac_try='$DUMP 9hf 0 /dev/null /dev/null/invalid/fs 2>&1
+                           | $GREP -v Dumping
+                           | $GREP -v Date
+                           | $GREP -v Label >conftest.d-h 2>&1'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
    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'
+   (exit $ac_status); }; }
+                       cat conftest.d-h >&5
+                       { ac_try='$DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
+                           | $GREP -v Dumping
+                           | $GREP -v Date
+                           | $GREP -v Label >conftest.d 2>&1'
    { (eval 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'
+   (exit $ac_status); }; }
+                       cat conftest.d >&5
+                       if { ac_try='diff conftest.d-h conftest.d 1>&2'
    { (eval 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
+                           amanda_cv_honor_nodump=yes
+                       else
+                           amanda_cv_honor_nodump=no
+                       fi
+                       rm -f conftest.d conftest.d-h
+                     ;;
+                   *) amanda_cv_honor_nodump=no
+                     ;;
+                   esac
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_honor_nodump" >&5
+ echo "${ECHO_T}$amanda_cv_honor_nodump" >&6; }
+           else
  
- aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`; fi
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+     { echo "$as_me:$LINENO: WARNING: $DUMP is not executable, cannot run -h test" >&5
+ echo "$as_me: WARNING: $DUMP is not executable, cannot run -h test" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ $DUMP is not executable, cannot run -h test
+ AAW_EOF
+               amanda_cv_honor_nodump=no
+           fi
+           if test "x$amanda_cv_honor_nodump" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_HONOR_NODUMP 1
+ _ACEOF
+           fi
  
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag=' ${wl}-bernotok'
-         allow_undefined_flag=' ${wl}-berok'
-         # -bexpall does not export symbols beginning with underscore (_)
-         always_export_symbols=yes
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec=' '
-         archive_cmds_need_lc=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-       fi
-       ;;
+     fi
  
-     amigaos*)
-       archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-       hardcode_libdir_flag_spec='-L$libdir'
-       hardcode_minus_L=yes
-       # see comment about different semantics on the GNU ld section
-       ld_shlibs=no
-       ;;
  
-     bsdi[45]*)
-       export_dynamic_flag_spec=-rdynamic
-       ;;
  
-     cygwin* | mingw* | pw32*)
-       # When not using gcc, we currently assume that we are using
-       # Microsoft Visual C++.
-       # hardcode_libdir_flag_spec is actually meaningless, as there is
-       # no search path for DLLs.
-       hardcode_libdir_flag_spec=' '
-       allow_undefined_flag=unsupported
-       # Tell ltmain to make .lib files, not .a files.
-       libext=lib
-       # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
-       # FIXME: Setting linknames here is a bad hack.
-       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-       # The linker will automatically build a .lib file if we build a DLL.
-       old_archive_From_new_cmds='true'
-       # FIXME: Should let the user specify the lib program.
-       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
-       fix_srcfile_path='`cygpath -w "$srcfile"`'
-       enable_shared_with_static_runtimes=yes
-       ;;
  
-     darwin* | rhapsody*)
-       case $host_os in
-         rhapsody* | darwin1.[012])
-          allow_undefined_flag='${wl}-undefined ${wl}suppress'
-          ;;
-        *) # Darwin 1.3 on
-          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-          else
-            case ${MACOSX_DEPLOYMENT_TARGET} in
-              10.[012])
-                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-                ;;
-              10.*)
-                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
-                ;;
-            esac
-          fi
-          ;;
-       esac
-       archive_cmds_need_lc=no
-       hardcode_direct=no
-       hardcode_automatic=yes
-       hardcode_shlibpath_var=unsupported
-       whole_archive_flag_spec=''
-       link_all_deplibs=yes
-     if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-       archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-       module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+     # call with
+ # Check whether --with-gnutar was given.
+ if test "${with_gnutar+set}" = set; then
+   withval=$with_gnutar;
+           # check withval
+           case "$withval" in
+               /*) GNUTAR="$withval";;
+               y|ye|yes) :;;
+               n|no) GNUTAR=no ;;
+               *)  { { echo "$as_me:$LINENO: error: *** You must supply a full pathname to --with-gnutar" >&5
+ echo "$as_me: error: *** You must supply a full pathname to --with-gnutar" >&2;}
+    { (exit 1); exit 1; }; };;
+           esac
+           # done
+ fi
+     if test "x$GNUTAR" = "xno"; then
+       GNUTAR=
      else
-       case $cc_basename in
-         xlc*)
-          output_verbose_link_cmd='echo'
-          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-           ;;
-        *)
-          ld_shlibs=no
-           ;;
-       esac
+       for gnutar_name in gtar gnutar tar; do
+           for ac_prog in $gnutar_name
+ 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_path_GNUTAR+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $GNUTAR in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_GNUTAR="$GNUTAR" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$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
+   fi
+ done
+ done
+ IFS=$as_save_IFS
+   ;;
+ esac
+ fi
+ GNUTAR=$ac_cv_path_GNUTAR
+ if test -n "$GNUTAR"; then
+   { echo "$as_me:$LINENO: result: $GNUTAR" >&5
+ echo "${ECHO_T}$GNUTAR" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   test -n "$GNUTAR" && break
+ done
+           if test -n "$GNUTAR"; then
+             case "`\"$GNUTAR\" --version 2>&1`" in
+              *GNU*tar* | *Free*paxutils* )
+                           # OK, it is GNU tar
+                           break
+                           ;;
+              *)
+                           # warning..
+     { echo "$as_me:$LINENO: WARNING: $GNUTAR is not GNU tar, so it will not be used." >&5
+ echo "$as_me: WARNING: $GNUTAR is not GNU tar, so it will not be used." >&2;}
+     cat <<AAW_EOF >>config.warnings
+ $GNUTAR is not GNU tar, so it will not be used.
+ AAW_EOF
+                           # reset the cache for GNUTAR so AC_PATH_PROGS will search again
+                           GNUTAR=''
+                           unset ac_cv_path_GNUTAR
+                           ;;
+             esac
+           fi
+       done
      fi
-       ;;
  
-     dgux*)
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_libdir_flag_spec='-L$libdir'
-       hardcode_shlibpath_var=no
-       ;;
+     if test "x$GNUTAR" != "x"; then
+       # define unquoted
  
-     freebsd1*)
-       ld_shlibs=no
-       ;;
+ cat >>confdefs.h <<_ACEOF
+ #define GNUTAR "$GNUTAR"
+ _ACEOF
  
-     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-     # support.  Future versions do this automatically, but an explicit c++rt0.o
-     # does not break anything, and helps significantly (at the cost of a little
-     # extra space).
-     freebsd2.2*)
-       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-       hardcode_libdir_flag_spec='-R$libdir'
-       hardcode_direct=yes
-       hardcode_shlibpath_var=no
-       ;;
+     fi
  
-     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-     freebsd2*)
-       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_direct=yes
-       hardcode_minus_L=yes
-       hardcode_shlibpath_var=no
-       ;;
  
-     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-     freebsd* | kfreebsd*-gnu | dragonfly*)
-       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-       hardcode_libdir_flag_spec='-R$libdir'
-       hardcode_direct=yes
-       hardcode_shlibpath_var=no
-       ;;
  
-     hpux9*)
-       if test "$GCC" = yes; then
-       archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-       else
-       archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-       fi
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator=:
-       hardcode_direct=yes
  
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L=yes
-       export_dynamic_flag_spec='${wl}-E'
-       ;;
  
-     hpux10* | hpux11*)
-       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*|ia64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-       else
-       case $host_cpu in
-       hppa*64*|ia64*)
-         archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
-         ;;
-       *)
-         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-         ;;
-       esac
-       fi
-       if test "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-         hardcode_libdir_flag_spec_ld='+b $libdir'
-         hardcode_libdir_separator=:
-         hardcode_direct=no
-         hardcode_shlibpath_var=no
-         ;;
-       ia64*)
-         hardcode_libdir_flag_spec='-L$libdir'
-         hardcode_direct=no
-         hardcode_shlibpath_var=no
  
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L=yes
-         ;;
-       *)
-         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-         hardcode_libdir_separator=:
-         hardcode_direct=yes
-         export_dynamic_flag_spec='${wl}-E'
  
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L=yes
-         ;;
-       esac
-       fi
-       ;;
+ # Check whether --with-smbclient was given.
+ if test "${with_smbclient+set}" = set; then
+   withval=$with_smbclient;
+           case "$withval" in
+               /*) SAMBA_CLIENT="$withval";;
+               y|ye|yes) :;;
+               n|no) SAMBA_CLIENT=no ;;
+               *)  { { echo "$as_me:$LINENO: error: *** You must supply a full pathname to --with-smbclient" >&5
+ echo "$as_me: error: *** You must supply a full pathname to --with-smbclient" >&2;}
+    { (exit 1); exit 1; }; };;
+           esac
  
-     irix5* | irix6* | nonstopux*)
-       if test "$GCC" = yes; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       else
-       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_ld='-rpath $libdir'
-       fi
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator=:
-       link_all_deplibs=yes
-       ;;
  
-     netbsd*)
-       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-       else
-       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+ fi
+ # Check whether --with-samba-user was given.
+ if test "${with_samba_user+set}" = set; then
+   withval=$with_samba_user;  { { echo "$as_me:$LINENO: error: --with-samba-user is no longer supported; place username in 'amandapass'" >&5
+ echo "$as_me: error: --with-samba-user is no longer supported; place username in 'amandapass'" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+     if test "x$SAMBA_CLIENT" != "xno"; then
+       # Extract the first word of "smbclient", so it can be a program name with args.
+ set dummy smbclient; 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_SAMBA_CLIENT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $SAMBA_CLIENT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_SAMBA_CLIENT="$SAMBA_CLIENT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_SAMBA_CLIENT="$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
+ SAMBA_CLIENT=$ac_cv_path_SAMBA_CLIENT
+ if test -n "$SAMBA_CLIENT"; then
+   { echo "$as_me:$LINENO: result: $SAMBA_CLIENT" >&5
+ echo "${ECHO_T}$SAMBA_CLIENT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+       smbversion=0
+       if test ! -z "$SAMBA_CLIENT"; then
+         case "`\"$SAMBA_CLIENT\" '\\\\not.a.host.name\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1`" in
+         *"Unknown host"*)
+                     smbversion=1
+                     ;;
+         *"Connection to not.a.host.name failed"*)
+                     smbversion=2
+                     ;;
+         *)
+     { echo "$as_me:$LINENO: WARNING: $SAMBA_CLIENT does not seem to be smbclient, so it will not be used." >&5
+ echo "$as_me: WARNING: $SAMBA_CLIENT does not seem to be smbclient, so it will not be used." >&2;}
+     cat <<AAW_EOF >>config.warnings
+ $SAMBA_CLIENT does not seem to be smbclient, so it will not be used.
+ AAW_EOF
+                     SAMBA_CLIENT=
+                     ;;
+         esac
+         if test -n "$SAMBA_CLIENT"; then
+ cat >>confdefs.h <<_ACEOF
+ #define SAMBA_CLIENT "$SAMBA_CLIENT"
+ _ACEOF
+ cat >>confdefs.h <<_ACEOF
+ #define SAMBA_VERSION $smbversion
+ _ACEOF
+         fi
        fi
-       hardcode_libdir_flag_spec='-R$libdir'
-       hardcode_direct=yes
-       hardcode_shlibpath_var=no
-       ;;
+     fi
  
-     newsos6)
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_direct=yes
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator=:
-       hardcode_shlibpath_var=no
-       ;;
+      if test -n "$SAMBA_CLIENT"; then
+   WANT_SAMBA_TRUE=
+   WANT_SAMBA_FALSE='#'
+ else
+   WANT_SAMBA_TRUE='#'
+   WANT_SAMBA_FALSE=
+ fi
  
-     openbsd*)
-       hardcode_direct=yes
-       hardcode_shlibpath_var=no
-       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec='${wl}-E'
+     USE_RUNDUMP=no
+     # some systems require rundump unconditionally
+     case "$target" in
+         *-ultrix*) USE_RUNDUMP=yes ;;
+         *-dg-*) USE_RUNDUMP=yes ;;
+     esac
+ # Check whether --with-rundump was given.
+ if test "${with_rundump+set}" = set; then
+   withval=$with_rundump;
+         case "$withval" in
+             n | no) USE_RUNDUMP=no ;;
+             y | ye | yes) USE_RUNDUMP=yes ;;
+             *) { { echo "$as_me:$LINENO: error: You must not supply an argument to --with-rundump option." >&5
+ echo "$as_me: error: You must not supply an argument to --with-rundump option." >&2;}
+    { (exit 1); exit 1; }; };;
+         esac
+ fi
+     if test x"$USE_RUNDUMP" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+ #define USE_RUNDUMP 1
+ _ACEOF
+     fi
+ #
+ # Look for other programs Amanda will use
+ #
+     # Extract the first word of "grep", so it can be a program name with args.
+ set dummy grep; 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_GREP+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $GREP in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GREP="$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
+   test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="grep"
+   ;;
+ esac
+ fi
+ GREP=$ac_cv_path_GREP
+ if test -n "$GREP"; then
+   { echo "$as_me:$LINENO: result: $GREP" >&5
+ echo "${ECHO_T}$GREP" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+ cat >>confdefs.h <<_ACEOF
+ #define GREP "$GREP"
+ _ACEOF
+ { 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"
+     # Extract the first word of "lint", so it can be a program name with args.
+ set dummy lint; 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_AMLINT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $AMLINT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_AMLINT="$AMLINT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ as_dummy="/opt/SUNWspro/bin:$SYSLOCPATH"
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_AMLINT="$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
+ AMLINT=$ac_cv_path_AMLINT
+ if test -n "$AMLINT"; then
+   { echo "$as_me:$LINENO: result: $AMLINT" >&5
+ echo "${ECHO_T}$AMLINT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     if test ! -z "$AMLINT"; then
+       $AMLINT -flags 2>&1 | $GREP -- '-errfmt=' > /dev/null
+       if test $? -eq 0; then
+       AMLINTFLAGS="-n -s -u -m -x"
+       AMLINTFLAGS="$AMLINTFLAGS -errchk=%all"
+       AMLINTFLAGS="$AMLINTFLAGS -errfmt=macro"
+       AMLINTFLAGS="$AMLINTFLAGS -errhdr=no%/usr/include"
+       AMLINTFLAGS="$AMLINTFLAGS -errhdr=%user"
+       AMLINTFLAGS="$AMLINTFLAGS -errsecurity=extended"
+       AMLINTFLAGS="$AMLINTFLAGS -errtags=yes"
+       AMLINTFLAGS="$AMLINTFLAGS -Ncheck=%all"
+       AMLINTFLAGS="$AMLINTFLAGS -Nlevel=2"
+       AMLINTFLAGS="$AMLINTFLAGS -erroff=E_ASGN_NEVER_USED"
+       AMLINTFLAGS="$AMLINTFLAGS,E_ASGN_RESET"
+       AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_CONST_TO_SMALL_INT"
+       AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_TO_SMALL_INT"
+       AMLINTFLAGS="$AMLINTFLAGS,E_CAST_UINT_TO_SIGNED_INT"
+       AMLINTFLAGS="$AMLINTFLAGS,E_CONSTANT_CONDITION"
+       AMLINTFLAGS="$AMLINTFLAGS,E_ENUM_UNUSE"
+       AMLINTFLAGS="$AMLINTFLAGS,E_EXPR_NULL_EFFECT"
+       AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_ALWAYS_IGNOR"
+       AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_MAYBE_IGNORED"
+       AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK0"
+       AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK1"
+       AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK2"
+       AMLINTFLAGS="$AMLINTFLAGS,E_INCL_MNUSD"
+       AMLINTFLAGS="$AMLINTFLAGS,E_INCL_NUSD"
+       AMLINTFLAGS="$AMLINTFLAGS,E_MCR_NODIFF"
+       AMLINTFLAGS="$AMLINTFLAGS,E_NAME_MULTIPLY_DEF"
+       AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_NULL_PSBL"
+       AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_SUSP"
+       AMLINTFLAGS="$AMLINTFLAGS,E_PTRDIFF_OVERFLOW"
+       AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_NULL_PSBL"
+       AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_SUSP"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_ACCESS_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHDIR_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHMOD_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CREAT_WITHOUT_EXCL"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_PATH"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_FOPEN_MODE"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_GETENV_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_MKDIR_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_PRINTF_VAR_FMT"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_RAND_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SCANF_VAR_FMT"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SELECT_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SHELL_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_STRNCPY_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_UMASK_WARN"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SEC_USE_AFTER_STAT"
+       AMLINTFLAGS="$AMLINTFLAGS,E_SIGN_EXTENSION_PSBL"
+       AMLINTFLAGS="$AMLINTFLAGS,E_TYPEDEF_UNUSE"
+       AMLINTFLAGS="$AMLINTFLAGS,E_UNCAL_F"
        else
-        case $host_os in
-        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-          archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          hardcode_libdir_flag_spec='-R$libdir'
-          ;;
-        *)
-          archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-          ;;
-        esac
+       AMLINTFLAGS=""
        fi
-       ;;
+     else
+       # Extract the first word of "splint", so it can be a program name with args.
+ set dummy splint; 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_AMLINT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $AMLINT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_AMLINT="$AMLINT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $SYSLOCPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_AMLINT="$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
  
-     os2*)
-       hardcode_libdir_flag_spec='-L$libdir'
-       hardcode_minus_L=yes
-       allow_undefined_flag=unsupported
-       archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-       ;;
+   ;;
+ esac
+ fi
+ AMLINT=$ac_cv_path_AMLINT
+ if test -n "$AMLINT"; then
+   { echo "$as_me:$LINENO: result: $AMLINT" >&5
+ echo "${ECHO_T}$AMLINT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
-     osf3*)
-       if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       if test ! -z "$AMLINT"; then
+       AMLINT="splint"
        else
-       allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       AMLINT='echo "Error: LINT is not installed" ; false'
        fi
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator=:
-       ;;
+       AMLINTFLAGS='+show-scan +unixlib -weak -globs +usedef +usereleased +impouts -paramimptemp -varuse -warnposix -redef -preproc -fixedformalarray -retval -unrecog -usevarargs -formatcode'
+     fi
  
-     osf4* | osf5*)    # as osf3* with the addition of -msym flag
-       if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-       else
-       allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec='-rpath $libdir'
-       fi
-       hardcode_libdir_separator=:
-       ;;
+ for ac_prog in flex lex
+ 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_LEX+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$LEX"; then
+   ac_cv_prog_LEX="$LEX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_LEX="$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+ done
+ IFS=$as_save_IFS
  
-     sco3.2v5*)
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var=no
-       export_dynamic_flag_spec='${wl}-Bexport'
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ;;
+ fi
+ fi
+ LEX=$ac_cv_prog_LEX
+ if test -n "$LEX"; then
+   { echo "$as_me:$LINENO: result: $LEX" >&5
+ echo "${ECHO_T}$LEX" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
-     solaris*)
-       no_undefined_flag=' -z text'
-       if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-       else
-       wlarc=''
-       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-       fi
-       hardcode_libdir_flag_spec='-R$libdir'
-       hardcode_shlibpath_var=no
-       case $host_os in
-       solaris2.[0-5] | solaris2.[0-5].*) ;;
-       *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
-       *)
-         whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-       esac
-       link_all_deplibs=yes
-       ;;
  
-     sunos4*)
-       if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-       else
-       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-       fi
-       hardcode_libdir_flag_spec='-L$libdir'
-       hardcode_direct=yes
-       hardcode_minus_L=yes
-       hardcode_shlibpath_var=no
-       ;;
+   test -n "$LEX" && break
+ done
+ test -n "$LEX" || LEX=":"
+ if test "x$LEX" != "x:"; then
+   cat >conftest.l <<_ACEOF
+ %%
+ a { ECHO; }
+ b { REJECT; }
+ c { yymore (); }
+ d { yyless (1); }
+ e { yyless (input () != 0); }
+ f { unput (yytext[0]); }
+ . { BEGIN INITIAL; }
+ %%
+ #ifdef YYTEXT_POINTER
+ extern char *yytext;
+ #endif
+ int
+ main (void)
+ {
+   return ! yylex () + ! yywrap ();
+ }
+ _ACEOF
+ { (ac_try="$LEX conftest.l"
+ 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 "$LEX conftest.l") 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }
+ { echo "$as_me:$LINENO: checking lex output file root" >&5
+ echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_lex_root+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test -f lex.yy.c; then
+   ac_cv_prog_lex_root=lex.yy
+ elif test -f lexyy.c; then
+   ac_cv_prog_lex_root=lexyy
+ else
+   { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+ echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+ echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
+ LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+ if test -z "${LEXLIB+set}"; then
+   { echo "$as_me:$LINENO: checking lex library" >&5
+ echo $ECHO_N "checking lex library... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_lex+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+     ac_save_LIBS=$LIBS
+     ac_cv_lib_lex='none needed'
+     for ac_lib in '' -lfl -ll; do
+       LIBS="$ac_lib $ac_save_LIBS"
+       cat >conftest.$ac_ext <<_ACEOF
+ `cat $LEX_OUTPUT_ROOT.c`
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_lex=$ac_lib
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+       test "$ac_cv_lib_lex" != 'none needed' && break
+     done
+     LIBS=$ac_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5
+ echo "${ECHO_T}$ac_cv_lib_lex" >&6; }
+   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
+ fi
+ { echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+ echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   # POSIX says lex can declare yytext either as a pointer or an array; the
+ # default is implementation-dependent.  Figure out which it is, since
+ # not all implementations provide the %pointer and %array declarations.
+ ac_cv_prog_lex_yytext_pointer=no
+ ac_save_LIBS=$LIBS
+ LIBS="$LEXLIB $ac_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ #define YYTEXT_POINTER 1
+ `cat $LEX_OUTPUT_ROOT.c`
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_prog_lex_yytext_pointer=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+ echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; }
+ if test $ac_cv_prog_lex_yytext_pointer = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define YYTEXT_POINTER 1
+ _ACEOF
+ fi
+ rm -f conftest.l $LEX_OUTPUT_ROOT.c
+ fi
+ if test "$LEX" = :; then
+   LEX=${am_missing_run}flex
+ fi
+     # Extract the first word of "ar", so it can be a program name with args.
+ set dummy ar; 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_AR+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $AR in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_AR="$AR" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_AR="$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
+ AR=$ac_cv_path_AR
+ if test -n "$AR"; then
+   { echo "$as_me:$LINENO: result: $AR" >&5
+ echo "${ECHO_T}$AR" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     # Extract the first word of "gettext", so it can be a program name with args.
+ set dummy gettext; 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_GETTEXT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $GETTEXT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_GETTEXT="$GETTEXT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GETTEXT="$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
+ GETTEXT=$ac_cv_path_GETTEXT
+ if test -n "$GETTEXT"; then
+   { echo "$as_me:$LINENO: result: $GETTEXT" >&5
+ echo "${ECHO_T}$GETTEXT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+ for ac_prog in gawk mawk nawk awk
+ 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_AWK+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$AWK"; then
+   ac_cv_prog_AWK="$AWK" # 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 { 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; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   test -n "$AWK" && break
+ done
+ for ac_prog in 'bison -y' byacc
+ 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_YACC+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$YACC"; then
+   ac_cv_prog_YACC="$YACC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_YACC="$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
+ YACC=$ac_cv_prog_YACC
+ if test -n "$YACC"; then
+   { echo "$as_me:$LINENO: result: $YACC" >&5
+ echo "${ECHO_T}$YACC" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   test -n "$YACC" && break
+ done
+ test -n "$YACC" || YACC="yacc"
+ { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+ echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+ if test -z "$MKDIR_P"; then
+   if test "${ac_cv_path_mkdir+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+        done
+ done
+ IFS=$as_save_IFS
+ fi
+   if test "${ac_cv_path_mkdir+set}" = set; then
+     MKDIR_P="$ac_cv_path_mkdir -p"
+   else
+     # As a last resort, use the slow shell script.  Don't cache a
+     # value for MKDIR_P within a source directory, because that will
+     # break other packages using the cache if that directory is
+     # removed, or if the value is a relative name.
+     test -d ./--version && rmdir ./--version
+     MKDIR_P="$ac_install_sh -d"
+   fi
+ fi
+ { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+ echo "${ECHO_T}$MKDIR_P" >&6; }
+     # Extract the first word of "dd", so it can be a program name with args.
+ set dummy dd; 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_DD+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $DD in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_DD="$DD" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_DD="$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
+ DD=$ac_cv_path_DD
+ if test -n "$DD"; then
+   { echo "$as_me:$LINENO: result: $DD" >&5
+ echo "${ECHO_T}$DD" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     # Extract the first word of "bash", so it can be a program name with args.
+ set dummy bash; 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_BASH+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $BASH in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $SYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_BASH="$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
+ BASH=$ac_cv_path_BASH
+ if test -n "$BASH"; then
+   { echo "$as_me:$LINENO: result: $BASH" >&5
+ echo "${ECHO_T}$BASH" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     # Extract the first word of "sort", so it can be a program name with args.
+ set dummy sort; 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_SORT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $SORT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_SORT="$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
+   test -z "$ac_cv_path_SORT" && ac_cv_path_SORT="NONE"
+   ;;
+ esac
+ fi
+ SORT=$ac_cv_path_SORT
+ if test -n "$SORT"; then
+   { echo "$as_me:$LINENO: result: $SORT" >&5
+ echo "${ECHO_T}$SORT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     # sort is only needed in the server build
+     if test x"$SORT" = x"NONE" && $WANT_SERVER; then
+         { { echo "$as_me:$LINENO: error: Set SORT to the path of the sort program." >&5
+ echo "$as_me: error: Set SORT to the path of the sort program." >&2;}
+    { (exit 1); exit 1; }; }
+     fi
+ cat >>confdefs.h <<_ACEOF
+ #define SORT_PATH "$SORT"
+ _ACEOF
+     for ac_prog in Mail mailx mail
+ 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_path_MAILER+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $MAILER in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_MAILER="$MAILER" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_MAILER="$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
+ MAILER=$ac_cv_path_MAILER
+ if test -n "$MAILER"; then
+   { echo "$as_me:$LINENO: result: $MAILER" >&5
+ echo "${ECHO_T}$MAILER" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   test -n "$MAILER" && break
+ done
+ test -n "$MAILER" || MAILER="NONE"
+     if test x"$MAILER" = x"NONE"; then
+     { echo "$as_me:$LINENO: WARNING: WARNING: Amanda cannot send mail reports without a mailer." >&5
+ echo "$as_me: WARNING: WARNING: Amanda cannot send mail reports without a mailer." >&2;}
+     cat <<AAW_EOF >>config.warnings
+ WARNING: Amanda cannot send mail reports without a mailer.
+ AAW_EOF
+     else
+ cat >>confdefs.h <<_ACEOF
+ #define MAILER "$MAILER"
+ _ACEOF
+     fi
+     # Extract the first word of "mt", so it can be a program name with args.
+ set dummy mt; 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_MT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $MT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_MT="$MT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_MT="$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
+   test -z "$ac_cv_path_MT" && ac_cv_path_MT="mt"
+   ;;
+ esac
+ fi
+ MT=$ac_cv_path_MT
+ if test -n "$MT"; then
+   { echo "$as_me:$LINENO: result: $MT" >&5
+ echo "${ECHO_T}$MT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     case "$target" in
+       *-hp-*) MT_FILE_FLAG="-t" ;;
+       *) MT_FILE_FLAG="-f" ;;
+     esac
+ cat >>confdefs.h <<_ACEOF
+ #define MT_FILE_FLAG "$MT_FILE_FLAG"
+ _ACEOF
+     for ac_prog in lpr lp
+ 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_path_PRINT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $PRINT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_PRINT="$PRINT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PRINT="$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
+ PRINT=$ac_cv_path_PRINT
+ if test -n "$PRINT"; then
+   { echo "$as_me:$LINENO: result: $PRINT" >&5
+ echo "${ECHO_T}$PRINT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   test -n "$PRINT" && break
+ done
+     if test ! -z "$PRINT"; then
+ cat >>confdefs.h <<_ACEOF
+ #define LPRCMD "$PRINT"
+ _ACEOF
+       { echo "$as_me:$LINENO: checking which flag to use to select a printer" >&5
+ echo $ECHO_N "checking which flag to use to select a printer... $ECHO_C" >&6; }
+ if test "${amanda_cv_printer_flag+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+           amanda_cv_printer_flag=$PRINTER_FLAG
+           case "$PRINT" in
+               lpr|*/lpr) amanda_cv_printer_flag="-P";;
+               lp|*/lp) amanda_cv_printer_flag="-d";;
+           esac
+ fi
+ { echo "$as_me:$LINENO: result: $amanda_cv_printer_flag" >&5
+ echo "${ECHO_T}$amanda_cv_printer_flag" >&6; }
+       if test ! -z "$amanda_cv_printer_flag"; then
+ cat >>confdefs.h <<_ACEOF
+ #define LPRFLAG "$amanda_cv_printer_flag"
+ _ACEOF
+       else
+     { echo "$as_me:$LINENO: WARNING: WARNING: amanda will always print to the default printer" >&5
+ echo "$as_me: WARNING: WARNING: amanda will always print to the default printer" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ WARNING: amanda will always print to the default printer
+ AAW_EOF
+       fi
+     fi
+     # Extract the first word of "pcat", so it can be a program name with args.
+ set dummy pcat; 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_PCAT+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $PCAT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_PCAT="$PCAT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PCAT="$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
+ PCAT=$ac_cv_path_PCAT
+ if test -n "$PCAT"; then
+   { echo "$as_me:$LINENO: result: $PCAT" >&5
+ echo "${ECHO_T}$PCAT" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     for ac_prog in perl5 perl
+ 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_path_PERL+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $PERL in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PERL="$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
+ PERL=$ac_cv_path_PERL
+ if test -n "$PERL"; then
+   { echo "$as_me:$LINENO: result: $PERL" >&5
+ echo "${ECHO_T}$PERL" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   test -n "$PERL" && break
+ done
+     # Make sure we have perl
+ if test -z "$PERL"; then
+ # Extract the first word of "perl", so it can be a program name with args.
+ set dummy perl; 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_PERL+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$PERL"; then
+   ac_cv_prog_PERL="$PERL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_PERL="perl"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+ done
+ IFS=$as_save_IFS
+ fi
+ fi
+ PERL=$ac_cv_prog_PERL
+ if test -n "$PERL"; then
+   { echo "$as_me:$LINENO: result: $PERL" >&5
+ echo "${ECHO_T}$PERL" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+ fi
+ # Check if version of Perl is sufficient
+ ac_perl_version="5.6.0"
+ if test "x$PERL" != "x"; then
+   { echo "$as_me:$LINENO: checking for perl version greater than or equal to $ac_perl_version" >&5
+ echo $ECHO_N "checking for perl version greater than or equal to $ac_perl_version... $ECHO_C" >&6; }
+   # NB: It would be nice to log the error if there is one, but we cannot rely
+   # on autoconf internals
+   $PERL -e "use $ac_perl_version;" > /dev/null 2>&1
+   if test $? -ne 0; then
+     { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; };
+       { { echo "$as_me:$LINENO: error: Amanda requires at least perl 5.6.0" >&5
+ echo "$as_me: error: Amanda requires at least perl 5.6.0" >&2;}
+    { (exit 1); exit 1; }; }
+   else
+     { echo "$as_me:$LINENO: result: ok" >&5
+ echo "${ECHO_T}ok" >&6; };
+   fi
+ else
+   { echo "$as_me:$LINENO: WARNING: could not find perl" >&5
+ echo "$as_me: WARNING: could not find perl" >&2;}
+ fi
+     for ac_prog in swig
+ 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_path_SWIG+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $SWIG in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_SWIG="$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
+ SWIG=$ac_cv_path_SWIG
+ if test -n "$SWIG"; then
+   { echo "$as_me:$LINENO: result: $SWIG" >&5
+ echo "${ECHO_T}$SWIG" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   test -n "$SWIG" && break
+ done
+         # Extract the first word of "swig", so it can be a program name with args.
+ set dummy swig; 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_SWIG+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $SWIG in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_SWIG="$SWIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_SWIG="$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
+ SWIG=$ac_cv_path_SWIG
+ if test -n "$SWIG"; then
+   { echo "$as_me:$LINENO: result: $SWIG" >&5
+ echo "${ECHO_T}$SWIG" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+         if test -z "$SWIG" ; then
+                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
+         elif test -n "1.3.28" ; then
+                 { echo "$as_me:$LINENO: checking for SWIG version" >&5
+ echo $ECHO_N "checking for SWIG version... $ECHO_C" >&6; }
+                 swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
+                 { echo "$as_me:$LINENO: result: $swig_version" >&5
+ echo "${ECHO_T}$swig_version" >&6; }
+                 if test -n "$swig_version" ; then
+                         # Calculate the required version number components
+                         required=1.3.28
+                         required_major=`echo $required | sed 's/[^0-9].*//'`
+                         if test -z "$required_major" ; then
+                                 required_major=0
+                         fi
+                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+                         required_minor=`echo $required | sed 's/[^0-9].*//'`
+                         if test -z "$required_minor" ; then
+                                 required_minor=0
+                         fi
+                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+                         required_patch=`echo $required | sed 's/[^0-9].*//'`
+                         if test -z "$required_patch" ; then
+                                 required_patch=0
+                         fi
+                         # Calculate the available version number components
+                         available=$swig_version
+                         available_major=`echo $available | sed 's/[^0-9].*//'`
+                         if test -z "$available_major" ; then
+                                 available_major=0
+                         fi
+                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+                         available_minor=`echo $available | sed 's/[^0-9].*//'`
+                         if test -z "$available_minor" ; then
+                                 available_minor=0
+                         fi
+                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+                         available_patch=`echo $available | sed 's/[^0-9].*//'`
+                         if test -z "$available_patch" ; then
+                                 available_patch=0
+                         fi
+                         if test $available_major -ne $required_major \
+                                 -o $available_minor -ne $required_minor \
+                                 -o $available_patch -lt $required_patch ; then
+                                 SWIG='echo "Error: SWIG version >= 1.3.28 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
+                         else
+                                 SWIG_LIB=`$SWIG -swiglib`
+                         fi
+                 else
+                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
+                 fi
+         fi
+ #
+ # Compiler / system characteristics
+ #
+ #
+ # compiler
+ #
+ if test $ac_cv_c_compiler_gnu = yes; then
+     { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+ echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+     ac_pattern="Autoconf.*'x'"
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sgtty.h>
+ Autoconf TIOCGETP
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "$ac_pattern" >/dev/null 2>&1; then
+   ac_cv_prog_gcc_traditional=yes
+ else
+   ac_cv_prog_gcc_traditional=no
+ fi
+ rm -f conftest*
+   if test $ac_cv_prog_gcc_traditional = no; then
+     cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <termio.h>
+ Autoconf TCGETA
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "$ac_pattern" >/dev/null 2>&1; then
+   ac_cv_prog_gcc_traditional=yes
+ fi
+ rm -f conftest*
+   fi
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+ echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; }
+   if test $ac_cv_prog_gcc_traditional = yes; then
+     CC="$CC -traditional"
+   fi
+ fi
+ { 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
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ int
+ main ()
+ {
+ /* FIXME: Include the comments suggested by Paul. */
+ #ifndef __cplusplus
+   /* Ultrix mips cc rejects this.  */
+   typedef int charset[2];
+   const charset cs;
+   /* SunOS 4.1.1 cc rejects this.  */
+   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};
+   /* AIX XL C 1.02.0.0 rejects this.
+      It does not let you subtract one const X* pointer from another in
+      an arm of an if-expression whose if-part is not a constant
+      expression */
+   const char *g = "string";
+   pcpcc = &g + (g ? g-g : 0);
+   /* HPUX 7.0 cc rejects these. */
+   ++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};
+     const int *foo = &x[0];
+     ++foo;
+   }
+   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+     typedef const int *iptr;
+     iptr p = 0;
+     ++p;
+   }
+   { /* AIX XL C 1.02.0.0 rejects this saying
+        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+     struct s { int j; const int *ap[3]; };
+     struct s *b; b->j = 5;
+   }
+   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+     const int foo = 10;
+     if (!foo) return 0;
+   }
+   return !cs[0] && !zero.x;
+ #endif
+   ;
+   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); } && {
+        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
+ fi
+ 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; }
+ if test $ac_cv_c_const = no; then
+ cat >>confdefs.h <<\_ACEOF
+ #define const
+ _ACEOF
+ fi
+ { 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
+   # See if sys/param.h defines the BYTE_ORDER macro.
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+ #include <sys/param.h>
+ int
+ main ()
+ {
+ #if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+       && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
+  bogus endian macros
+ #endif
+   ;
+   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); } && {
+        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.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <sys/types.h>
+ #include <sys/param.h>
+ int
+ main ()
+ {
+ #if BYTE_ORDER != BIG_ENDIAN
+  not big endian
+ #endif
+   ;
+   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); } && {
+        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
+ fi
+ 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.
+ if test "$cross_compiling" = yes; then
+   # try to guess the endianness by grepping values into an object file
+   ac_cv_c_bigendian=unknown
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ 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 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 ()
+ {
+  _ascii (); _ebcdic ();
+   ;
+   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); } && {
+        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
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+   if test "$ac_cv_c_bigendian" = unknown; then
+     ac_cv_c_bigendian=no
+   else
+     # finding both strings is unlikely to happen, but who knows?
+     ac_cv_c_bigendian=unknown
+   fi
+ fi
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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 ()
+ {
+   /* Are we little or big endian?  From Harbison&Steele.  */
+   union
+   {
+     long int l;
+     char c[sizeof (long int)];
+   } u;
+   u.l = 1;
+   return u.c[sizeof (long int) - 1] == 1;
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+ 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'
+   { (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_c_bigendian=no
+ 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_c_bigendian=yes
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ 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; }
+ case $ac_cv_c_bigendian in
+   yes)
+ cat >>confdefs.h <<\_ACEOF
+ #define WORDS_BIGENDIAN 1
+ _ACEOF
+  ;;
+   no)
+      ;;
+   *)
+     { { echo "$as_me:$LINENO: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+ echo "$as_me: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+    { (exit 1); exit 1; }; } ;;
+ esac
+ # GCC_COMPILER is needed in the gnulib Makefile to silence errors
+  if test "x$GCC" = "xyes"; then
+   GCC_COMPILER_TRUE=
+   GCC_COMPILER_FALSE='#'
+ else
+   GCC_COMPILER_TRUE='#'
+   GCC_COMPILER_FALSE=
+ fi
+ #
+ # Warnings
+ #
+     { echo "$as_me:$LINENO: checking for gcc flag -Wparentheses" >&5
+ echo $ECHO_N "checking for gcc flag -Wparentheses... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wparentheses[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wparentheses"
+     else
+       :
+     fi
+     { echo "$as_me:$LINENO: checking for gcc flag -Wdeclaration-after-statement" >&5
+ echo $ECHO_N "checking for gcc flag -Wdeclaration-after-statement... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wdeclaration-after-statement[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wdeclaration-after-statement"
+     else
+       :
+     fi
+     { echo "$as_me:$LINENO: checking for gcc flag -Wmissing-prototypes" >&5
+ echo $ECHO_N "checking for gcc flag -Wmissing-prototypes... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wmissing-prototypes[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wmissing-prototypes"
+     else
+       :
+     fi
+     { echo "$as_me:$LINENO: checking for gcc flag -Wstrict-prototypes" >&5
+ echo $ECHO_N "checking for gcc flag -Wstrict-prototypes... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wstrict-prototypes[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wstrict-prototypes"
+     else
+       :
+     fi
+     { echo "$as_me:$LINENO: checking for gcc flag -Wmissing-declarations" >&5
+ echo $ECHO_N "checking for gcc flag -Wmissing-declarations... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wmissing-declarations[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wmissing-declarations"
+     else
+       :
+     fi
+     { echo "$as_me:$LINENO: checking for gcc flag -Wformat" >&5
+ echo $ECHO_N "checking for gcc flag -Wformat... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wformat[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wformat"
+     else
+       :
+     fi
+     { echo "$as_me:$LINENO: checking for gcc flag -Wsign-compare" >&5
+ echo $ECHO_N "checking for gcc flag -Wsign-compare... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wsign-compare[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wsign-compare"
+     else
+       :
+     fi
+     { echo "$as_me:$LINENO: checking for gcc flag -Wfloat-equal" >&5
+ echo $ECHO_N "checking for gcc flag -Wfloat-equal... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wfloat-equal[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wfloat-equal"
+     else
+       :
+     fi
+     { echo "$as_me:$LINENO: checking for gcc flag -Wold-style-definition" >&5
+ echo $ECHO_N "checking for gcc flag -Wold-style-definition... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wold-style-definition[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wold-style-definition"
+     else
+       :
+     fi
+     # test for -W'warning', then add the 'no-' version.
+     { echo "$as_me:$LINENO: checking for gcc flag -Wstrict-aliasing" >&5
+ echo $ECHO_N "checking for gcc flag -Wstrict-aliasing... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wstrict-aliasing[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wno-strict-aliasing"
+     else
+       :
+     fi
+     # test for -W'warning', then add the 'no-' version.
+     { echo "$as_me:$LINENO: checking for gcc flag -Wunknown-pragmas" >&5
+ echo $ECHO_N "checking for gcc flag -Wunknown-pragmas... $ECHO_C" >&6; }
+     if test "x$GCC" = "xyes"; then
+               $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wunknown-pragmas[^[:alnum:]-]' 2>&1 > /dev/null
+               if test $? -eq 0; then
+           found_warning=yes
+           { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+           found_warning=no
+           { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+       fi
+     else
+       found_warning=no
+       { echo "$as_me:$LINENO: result: no (not using gcc)" >&5
+ echo "${ECHO_T}no (not using gcc)" >&6; }
+     fi
+     if test x"$found_warning" = x"yes"; then
+       AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wno-unknown-pragmas"
+     else
+       :
+     fi
+ #
+ # Libtool
+ #
+ # Check whether --enable-shared was given.
+ if test "${enable_shared+set}" = set; then
+   enableval=$enable_shared; p=${PACKAGE-default}
+     case $enableval in
+     yes) enable_shared=yes ;;
+     no) enable_shared=no ;;
+     *)
+       enable_shared=no
+       # Look at the argument we got.  We use all the common list separators.
+       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+       for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_shared=yes
+       fi
+       done
+       IFS="$lt_save_ifs"
+       ;;
+     esac
+ else
+   enable_shared=yes
+ fi
+ # Check whether --enable-static was given.
+ if test "${enable_static+set}" = set; then
+   enableval=$enable_static; p=${PACKAGE-default}
+     case $enableval in
+     yes) enable_static=yes ;;
+     no) enable_static=no ;;
+     *)
 -     enable_static=no
 -      # Look at the argument we got.  We use all the common list separators.
 -      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 -      for pkg in $enableval; do
 -      IFS="$lt_save_ifs"
 -      if test "X$pkg" = "X$p"; then
 -        enable_static=yes
 -      fi
 -      done
 -      IFS="$lt_save_ifs"
++      lt_prog_compiler_pic_CXX='-fPIC'
+       ;;
+     esac
+ else
+   enable_static=yes
+ fi
+ # Check whether --enable-fast-install was given.
+ if test "${enable_fast_install+set}" = set; then
+   enableval=$enable_fast_install; p=${PACKAGE-default}
+     case $enableval in
+     yes) enable_fast_install=yes ;;
+     no) enable_fast_install=no ;;
+     *)
+       enable_fast_install=no
+       # Look at the argument we got.  We use all the common list separators.
+       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+       for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_fast_install=yes
+       fi
 -      done
 -      IFS="$lt_save_ifs"
 -      ;;
++      ;;
++      chorus*)
++      case $cc_basename in
++      cxch68*)
++        # Green Hills C++ Compiler
++        # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
++        ;;
++      esac
++      ;;
++       darwin*)
++         # PIC is the default on this platform
++         # Common symbols not allowed in MH_DYLIB files
++         case $cc_basename in
++           xlc*)
++           lt_prog_compiler_pic_CXX='-qnocommon'
++           lt_prog_compiler_wl_CXX='-Wl,'
++           ;;
++         esac
++       ;;
++      dgux*)
++      case $cc_basename in
++        ec++*)
++          lt_prog_compiler_pic_CXX='-KPIC'
++          ;;
++        ghcx*)
++          # Green Hills C++ Compiler
++          lt_prog_compiler_pic_CXX='-pic'
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      freebsd* | kfreebsd*-gnu | dragonfly*)
++      # FreeBSD uses GNU C++
++      ;;
++      hpux9* | hpux10* | hpux11*)
++      case $cc_basename in
++        CC*)
++          lt_prog_compiler_wl_CXX='-Wl,'
++          lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
++          if test "$host_cpu" != ia64; then
++            lt_prog_compiler_pic_CXX='+Z'
++          fi
++          ;;
++        aCC*)
++          lt_prog_compiler_wl_CXX='-Wl,'
++          lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
++          case $host_cpu in
++          hppa*64*|ia64*)
++            # +Z the default
++            ;;
++          *)
++            lt_prog_compiler_pic_CXX='+Z'
++            ;;
++          esac
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      irix5* | irix6* | nonstopux*)
++      case $cc_basename in
++        CC*)
++          lt_prog_compiler_wl_CXX='-Wl,'
++          lt_prog_compiler_static_CXX='-non_shared'
++          # CC pic flag -KPIC is the default.
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      linux*)
++      case $cc_basename in
++        KCC*)
++          # KAI C++ Compiler
++          lt_prog_compiler_wl_CXX='--backend -Wl,'
++          lt_prog_compiler_pic_CXX='-fPIC'
++          ;;
++        icpc* | ecpc*)
++          # Intel C++
++          lt_prog_compiler_wl_CXX='-Wl,'
++          lt_prog_compiler_pic_CXX='-KPIC'
++          lt_prog_compiler_static_CXX='-static'
++          ;;
++        pgCC*)
++          # Portland Group C++ compiler.
++          lt_prog_compiler_wl_CXX='-Wl,'
++          lt_prog_compiler_pic_CXX='-fpic'
++          lt_prog_compiler_static_CXX='-Bstatic'
++          ;;
++        cxx*)
++          # Compaq C++
++          # Make sure the PIC flag is empty.  It appears that all Alpha
++          # Linux and Compaq Tru64 Unix objects are PIC.
++          lt_prog_compiler_pic_CXX=
++          lt_prog_compiler_static_CXX='-non_shared'
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      lynxos*)
++      ;;
++      m88k*)
++      ;;
++      mvs*)
++      case $cc_basename in
++        cxx*)
++          lt_prog_compiler_pic_CXX='-W c,exportall'
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      netbsd*)
++      ;;
++      osf3* | osf4* | osf5*)
++      case $cc_basename in
++        KCC*)
++          lt_prog_compiler_wl_CXX='--backend -Wl,'
++          ;;
++        RCC*)
++          # Rational C++ 2.4.1
++          lt_prog_compiler_pic_CXX='-pic'
++          ;;
++        cxx*)
++          # Digital/Compaq C++
++          lt_prog_compiler_wl_CXX='-Wl,'
++          # Make sure the PIC flag is empty.  It appears that all Alpha
++          # Linux and Compaq Tru64 Unix objects are PIC.
++          lt_prog_compiler_pic_CXX=
++          lt_prog_compiler_static_CXX='-non_shared'
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      psos*)
++      ;;
++      sco*)
++      case $cc_basename in
++        CC*)
++          lt_prog_compiler_pic_CXX='-fPIC'
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      solaris*)
++      case $cc_basename in
++        CC*)
++          # Sun C++ 4.2, 5.x and Centerline C++
++          lt_prog_compiler_pic_CXX='-KPIC'
++          lt_prog_compiler_static_CXX='-Bstatic'
++          lt_prog_compiler_wl_CXX='-Qoption ld '
++          ;;
++        gcx*)
++          # Green Hills C++ Compiler
++          lt_prog_compiler_pic_CXX='-PIC'
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      sunos4*)
++      case $cc_basename in
++        CC*)
++          # Sun C++ 4.x
++          lt_prog_compiler_pic_CXX='-pic'
++          lt_prog_compiler_static_CXX='-Bstatic'
++          ;;
++        lcc*)
++          # Lucid
++          lt_prog_compiler_pic_CXX='-pic'
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      tandem*)
++      case $cc_basename in
++        NCC*)
++          # NonStop-UX NCC 3.20
++          lt_prog_compiler_pic_CXX='-KPIC'
++          ;;
++        *)
++          ;;
++      esac
++      ;;
++      unixware*)
++      ;;
++      vxworks*)
++      ;;
++      *)
++      lt_prog_compiler_can_build_shared_CXX=no
++      ;;
+     esac
+ else
+   enable_fast_install=yes
+ fi
+ { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+ echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
+ if test "${lt_cv_path_SED+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   # Loop through the user's path and test for sed and gsed.
+ # Then use that list of sed's as ones to test for truncation.
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for lt_ac_prog in sed gsed; do
+     for ac_exec_ext in '' $ac_executable_extensions; do
+       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+       fi
+     done
+   done
+ done
+ lt_ac_max=0
+ lt_ac_count=0
+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+ # along with /bin/sed that truncates output.
+ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+   test ! -f $lt_ac_sed && continue
+   cat /dev/null > conftest.in
+   lt_ac_count=0
+   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+   # Check for GNU sed and select it if it is found.
+   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+     lt_cv_path_SED=$lt_ac_sed
+     break
+   fi
+   while true; do
+     cat conftest.in conftest.in >conftest.tmp
+     mv conftest.tmp conftest.in
+     cp conftest.in conftest.nl
+     echo >>conftest.nl
+     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+     cmp -s conftest.out conftest.nl || break
+     # 10000 chars as input seems more than enough
+     test $lt_ac_count -gt 10 && break
+     lt_ac_count=`expr $lt_ac_count + 1`
+     if test $lt_ac_count -gt $lt_ac_max; then
+       lt_ac_max=$lt_ac_count
+       lt_cv_path_SED=$lt_ac_sed
+     fi
+   done
+ done
+ fi
++echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
++echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
+ SED=$lt_cv_path_SED
+ { echo "$as_me:$LINENO: result: $SED" >&5
+ echo "${ECHO_T}$SED" >&6; }
+ # Check whether --with-gnu-ld was given.
+ if test "${with_gnu_ld+set}" = set; then
+   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+ else
+   with_gnu_ld=no
+ fi
+ ac_prog=ld
+ if test "$GCC" = yes; then
+   # Check if gcc -print-prog-name=ld gives a path.
+   { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+   case $host in
+   *-*-mingw*)
+     # gcc leaves a trailing carriage return which upsets mingw
+     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+   *)
+     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+   esac
+   case $ac_prog in
+     # Accept absolute paths.
+     [\\/]* | ?:[\\/]*)
+       re_direlt='/[^/][^/]*/\.\./'
+       # Canonicalize the pathname of ld
+       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+       done
+       test -z "$LD" && LD="$ac_prog"
+       ;;
+   "")
+     # If it fails, then pretend we aren't using GCC.
+     ac_prog=ld
+     ;;
+   *)
 -    # If it is relative, then search for the first ld in PATH.
 -    with_gnu_ld=unknown
++    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+     ;;
+   esac
+ elif test "$with_gnu_ld" = yes; then
+   { echo "$as_me:$LINENO: checking for GNU ld" >&5
+ echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+ else
+   { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+ echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+ fi
+ if test "${lt_cv_path_LD+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -z "$LD"; then
+   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+   for ac_dir in $PATH; do
+     IFS="$lt_save_ifs"
+     test -z "$ac_dir" && ac_dir=.
+     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+       lt_cv_path_LD="$ac_dir/$ac_prog"
+       # Check to see if the program is GNU ld.  I'd rather use --version,
+       # but apparently some variants of GNU ld only accept -v.
+       # Break only if it was the GNU/non-GNU ld that we prefer.
+       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+       *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
+       ;;
+       *)
+       test "$with_gnu_ld" != yes && break
+       ;;
+       esac
+     fi
+   done
+   IFS="$lt_save_ifs"
+ else
+   lt_cv_path_LD="$LD" # Let the user override the test with a path.
+ fi
+ fi
+ LD="$lt_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
+ test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+ echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+    { (exit 1); exit 1; }; }
+ { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+ if test "${lt_cv_prog_gnu_ld+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   # I'd rather use --version here, but apparently some GNU lds only accept -v.
+ case `$LD -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+   lt_cv_prog_gnu_ld=yes
+   ;;
+ *)
+   lt_cv_prog_gnu_ld=no
+   ;;
+ esac
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+ echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+ with_gnu_ld=$lt_cv_prog_gnu_ld
++   lt_compiler_flag="-o out/conftest2.$ac_objext"
++   # Insert the option either (1) after the last *FLAGS variable, or
++   # (2) before a word containing "conftest.", or (3) at the end.
++   # Note that $ac_compile itself does not contain backslashes and begins
++   # with a dollar sign (not a hyphen), so the echo should work correctly.
++   lt_compile=`echo "$ac_compile" | $SED \
++   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
++   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
++   -e 's:$: $lt_compiler_flag:'`
++   (eval echo "\"\$as_me:30398: $lt_compile\"" >&5)
++   (eval "$lt_compile" 2>out/conftest.err)
++   ac_status=$?
++   cat out/conftest.err >&5
++   echo "$as_me:30402: \$? = $ac_status" >&5
++   if (exit $ac_status) && test -s out/conftest2.$ac_objext
++   then
++     # The compiler can only warn and ignore the option if not recognized
++     # So say no if there are warnings
++     $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
++     $SED '/^$/d' out/conftest.err >out/conftest.er2
++     if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
++       lt_cv_prog_compiler_c_o_CXX=yes
++     fi
++   fi
++   chmod u+w . 2>&5
++   $rm conftest*
++   # SGI C++ compiler will create directory out/ii_files/ for
++   # template instantiation
++   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
++   $rm out/* && rmdir out
++   cd ..
++   rmdir conftest
++   $rm conftest*
+ { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+ echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
+ if test "${lt_cv_ld_reload_flag+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_cv_ld_reload_flag='-r'
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+ echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
+ reload_flag=$lt_cv_ld_reload_flag
+ case $reload_flag in
+ "" | " "*) ;;
+ *) reload_flag=" $reload_flag" ;;
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
+   darwin*)
+     if test "$GCC" = yes; then
+       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+     else
+       reload_cmds='$LD$reload_flag -o $output$reload_objs'
+     fi
+     ;;
+ esac
  
-     sysv4)
-       case $host_vendor in
-       sni)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds='$CC -r -o $output$reload_objs'
-         hardcode_direct=no
+ { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+ echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
+ if test "${lt_cv_path_NM+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$NM"; then
+   # Let the user override the test.
+   lt_cv_path_NM="$NM"
+ else
+   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+     IFS="$lt_save_ifs"
+     test -z "$ac_dir" && ac_dir=.
+     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+       # Check to see if the nm accepts a BSD-compat flag.
+       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       #   nm: unknown option "B" ignored
+       # Tru64's nm complains that /dev/null is an invalid object file
+       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+       */dev/null* | *'Invalid file or object type'*)
+       lt_cv_path_NM="$tmp_nm -B"
+       break
          ;;
-       motorola)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-       ;;
+       *)
+       case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+       */dev/null*)
+         lt_cv_path_NM="$tmp_nm -p"
+         break
+         ;;
+       *)
+         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+         continue # so that we can try to find one that supports BSD flags
+         ;;
+       esac
        esac
-       runpath_var='LD_RUN_PATH'
-       hardcode_shlibpath_var=no
-       ;;
-     sysv4.3*)
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var=no
-       export_dynamic_flag_spec='-Bexport'
-       ;;
-     sysv4*MP*)
-       if test -d /usr/nec; then
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs=yes
-       fi
-       ;;
-     sysv4.2uw2*)
-       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_direct=yes
-       hardcode_minus_L=no
-       hardcode_shlibpath_var=no
-       hardcode_runpath_var=yes
-       runpath_var=LD_RUN_PATH
-       ;;
-    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
-       no_undefined_flag='${wl}-z ${wl}text'
-       if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       else
-       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       fi
-       runpath_var='LD_RUN_PATH'
-       hardcode_shlibpath_var=no
-       ;;
+     fi
+   done
+   IFS="$lt_save_ifs"
+   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+ fi
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+ echo "${ECHO_T}$lt_cv_path_NM" >&6; }
+ NM="$lt_cv_path_NM"
  
-     sysv5*)
-       no_undefined_flag=' -z text'
-       # $CC -shared without GNU ld will not create a library from C++
-       # object files and a static libstdc++, better avoid it by now
-       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-       hardcode_libdir_flag_spec=
-       hardcode_shlibpath_var=no
-       runpath_var='LD_RUN_PATH'
-       ;;
+ { 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; }
+ else
+   { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+ echo "${ECHO_T}no, using $LN_S" >&6; }
+ fi
  
-     uts4*)
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_libdir_flag_spec='-L$libdir'
-       hardcode_shlibpath_var=no
-       ;;
+ { echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+ echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
+ if test "${lt_cv_deplibs_check_method+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_cv_file_magic_cmd='$MAGIC_CMD'
+ lt_cv_file_magic_test_file=
+ lt_cv_deplibs_check_method='unknown'
+ # Need to set the preceding variable on all platforms that support
+ # interlibrary dependencies.
+ # 'none' -- dependencies not supported.
+ # `unknown' -- same as none, but documents that we really don't know.
+ # 'pass_all' -- all dependencies passed with no checks.
+ # 'test_compile' -- check by making test program.
+ # 'file_magic [[regex]]' -- check by looking for files in library path
+ # which responds to the $file_magic_cmd with a given extended regex.
+ # If you have `file' or equivalent on your system and you're not sure
+ # whether `pass_all' will *always* work, you probably want this one.
  
-     *)
-       ld_shlibs=no
-       ;;
-     esac
-   fi
 -case $host_os in
 -aix4* | aix5*)
 -  lt_cv_deplibs_check_method=pass_all
++  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
++  case $host_os in
++  aix4* | aix5*)
++    # If we're using GNU nm, then we don't want the "-C" option.
++    # -C means demangle to AIX nm, but means don't demangle with GNU nm
++    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
++      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++    else
++      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++    fi
++    ;;
++  pw32*)
++    export_symbols_cmds_CXX="$ltdll_cmds"
+   ;;
 -
 -beos*)
 -  lt_cv_deplibs_check_method=pass_all
++  cygwin* | mingw*)
++    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
++  ;;
++  *)
++    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   ;;
++  esac
  
- echo "$as_me:$LINENO: result: $ld_shlibs" >&5
- echo "${ECHO_T}$ld_shlibs" >&6
- test "$ld_shlibs" = no && can_build_shared=no
+ bsdi[45]*)
+   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+   lt_cv_file_magic_cmd='/usr/bin/file -L'
+   lt_cv_file_magic_test_file=/shlib/libc.so
+   ;;
  
 -cygwin*)
 -  # func_win32_libid is a shell function defined in ltmain.sh
 -  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 -  lt_cv_file_magic_cmd='func_win32_libid'
 -  ;;
 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 +if test "$GCC" = yes; then
 +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 +fi
  
 -mingw* | pw32*)
 -  # Base MSYS/MinGW do not provide the 'file' command needed by
 -  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
 -  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 -  lt_cv_file_magic_cmd='$OBJDUMP -f'
 -  ;;
 +#
 +# Do we need to explicitly link libc?
 +#
- case "x$archive_cmds_need_lc" in
++case "x$archive_cmds_need_lc_CXX" in
 +x|xyes)
 +  # Assume -lc should be added
-   archive_cmds_need_lc=yes
++  archive_cmds_need_lc_CXX=yes
  
 -darwin* | rhapsody*)
 -  lt_cv_deplibs_check_method=pass_all
 -  ;;
 +  if test "$enable_shared" = yes && test "$GCC" = yes; then
-     case $archive_cmds in
++    case $archive_cmds_CXX in
 +    *'~'*)
 +      # FIXME: we may have to deal with multi-command sequences.
 +      ;;
 +    '$CC '*)
 +      # Test whether the compiler implicitly links with -lc since on some
 +      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 +      # to ld, don't add -lc before -lgcc.
 +      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
 +      $rm conftest*
 +      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  
-       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); } 2>conftest.err; then
-         soname=conftest
-         lib=conftest
-         libobjs=conftest.$ac_objext
-         deplibs=
-         wl=$lt_prog_compiler_wl
-         compiler_flags=-v
-         linker_flags=-v
-         verstring=
-         output_objdir=.
-         libname=conftest
-         lt_save_allow_undefined_flag=$allow_undefined_flag
-         allow_undefined_flag=
-         if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }
-         then
-         archive_cmds_need_lc=no
-         else
-         archive_cmds_need_lc=yes
-         fi
-         allow_undefined_flag=$lt_save_allow_undefined_flag
-       else
-         cat conftest.err 1>&5
-       fi
-       $rm conftest*
-       echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
- echo "${ECHO_T}$archive_cmds_need_lc" >&6
-       ;;
-     esac
-   fi
-   ;;
- esac
- echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
- echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
- library_names_spec=
- libname_spec='lib$name'
- soname_spec=
- shrext_cmds=".so"
- postinstall_cmds=
- postuninstall_cmds=
- finish_cmds=
- finish_eval=
- shlibpath_var=
- shlibpath_overrides_runpath=unknown
- version_type=none
- dynamic_linker="$host_os ld.so"
- sys_lib_dlsearch_path_spec="/lib /usr/lib"
- if test "$GCC" = yes; then
-   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-     # if the path contains ";" then we assume it to be the separator
-     # otherwise default to the standard path separator (i.e. ":") - it is
-     # assumed that no part of a normal pathname contains ";" but that should
-     # okay in the real world where ";" in dirpaths is itself problematic.
-     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-   else
-     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-   fi
- else
-   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
- fi
- need_lib_prefix=unknown
- hardcode_into_libs=no
- # when you set need_version to no, make sure it does not cause -set_version
- # flags to be left without arguments
- need_version=unknown
- case $host_os in
- aix3*)
-   version_type=linux
-   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-   shlibpath_var=LIBPATH
-   # AIX 3 has no versioning support, so we append a major version to the name.
-   soname_spec='${libname}${release}${shared_ext}$major'
-   ;;
- aix4* | aix5*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
-   hardcode_into_libs=yes
-   if test "$host_cpu" = ia64; then
-     # AIX 5 supports IA64
-     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-     shlibpath_var=LD_LIBRARY_PATH
-   else
-     # With GCC up to 2.95.x, collect2 would create an import file
-     # for dependence libraries.  The import file would start with
-     # the line `#! .'.  This would cause the generated library to
-     # depend on `.', always an invalid library.  This was fixed in
-     # development snapshots of GCC prior to 3.0.
-     case $host_os in
-       aix4 | aix4.[01] | aix4.[01].*)
-       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-       else
-       can_build_shared=no
-       fi
-       ;;
-     esac
-     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-     # soname into executable. Probably we can add versioning support to
-     # collect2, so additional links can be useful in future.
-     if test "$aix_use_runtimelinking" = yes; then
-       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-       # instead of lib<name>.a to let people know that these are not
-       # typical AIX shared libraries.
-       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     else
-       # We preserve .a as extension for shared libraries through AIX4.2
-       # and later when we are not doing run time linking.
-       library_names_spec='${libname}${release}.a $libname.a'
-       soname_spec='${libname}${release}${shared_ext}$major'
-     fi
-     shlibpath_var=LIBPATH
-   fi
-   ;;
- amigaos*)
-   library_names_spec='$libname.ixlibrary $libname.a'
-   # Create ${libname}_ixlibrary.a entries in /sys/libs.
-   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-   ;;
- beos*)
-   library_names_spec='${libname}${shared_ext}'
-   dynamic_linker="$host_os ld.so"
-   shlibpath_var=LIBRARY_PATH
-   ;;
- bsdi[45]*)
-   version_type=linux
-   need_version=no
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-   soname_spec='${libname}${release}${shared_ext}$major'
-   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-   shlibpath_var=LD_LIBRARY_PATH
-   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-   # the default ld.so.conf also contains /usr/contrib/lib and
-   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-   # libtool to hard-code these into programs
-   ;;
- cygwin* | mingw* | pw32*)
-   version_type=windows
-   shrext_cmds=".dll"
-   need_version=no
-   need_lib_prefix=no
-   case $GCC,$host_os in
-   yes,cygwin* | yes,mingw* | yes,pw32*)
-     library_names_spec='$libname.dll.a'
-     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-     postinstall_cmds='base_file=`basename \${file}`~
-       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-       dldir=$destdir/`dirname \$dlpath`~
-       test -d \$dldir || mkdir -p \$dldir~
-       $install_prog $dir/$dlname \$dldir/$dlname~
-       chmod a+x \$dldir/$dlname'
-     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-       dlpath=$dir/\$dldll~
-        $rm \$dlpath'
-     shlibpath_overrides_runpath=yes
-     case $host_os in
-     cygwin*)
-       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-       ;;
-     mingw*)
-       # MinGW DLLs use traditional 'lib' prefix
-       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-         # It is most probably a Windows format PATH printed by
-         # mingw gcc, but we are running on Cygwin. Gcc prints its search
-         # path with ; separators, and with drive letters. We can handle the
-         # drive letters (cygwin fileutils understands them), so leave them,
-         # especially as we might pass files found there to a mingw objdump,
-         # which wouldn't understand a cygwinified path. Ahh.
-         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-       else
-         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-       fi
-       ;;
-     pw32*)
-       # pw32 DLLs use 'pw' prefix rather than 'lib'
-       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ freebsd* | kfreebsd*-gnu | dragonfly*)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     case $host_cpu in
+     i*86 )
+       # Not sure whether the presence of OpenBSD here was a mistake.
+       # Let's accept both of them until this is cleared up.
+       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+       lt_cv_file_magic_cmd=/usr/bin/file
+       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
        ;;
      esac
 +    ;;
 +
 +  *)
 +    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
 +    ;;
 +  esac
 +  dynamic_linker='Win32 ld.exe'
 +  # FIXME: first we should search . and the directory the executable is in
 +  shlibpath_var=PATH
 +  ;;
 +
 +darwin* | rhapsody*)
 +  dynamic_linker="$host_os dyld"
 +  version_type=darwin
 +  need_lib_prefix=no
 +  need_version=no
 +  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 +  soname_spec='${libname}${release}${major}$shared_ext'
 +  shlibpath_overrides_runpath=yes
 +  shlibpath_var=DYLD_LIBRARY_PATH
 +  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 +  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 +  if test "$GCC" = yes; then
 +    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
 +  else
 +    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 +  fi
 +  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 +  ;;
 +
 +dgux*)
 +  version_type=linux
 +  need_lib_prefix=no
 +  need_version=no
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  ;;
 +
 +freebsd1*)
 +  dynamic_linker=no
 +  ;;
 +
 +kfreebsd*-gnu)
 +  version_type=linux
 +  need_lib_prefix=no
 +  need_version=no
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  shlibpath_overrides_runpath=no
 +  hardcode_into_libs=yes
 +  dynamic_linker='GNU ld.so'
 +  ;;
 +
 +freebsd* | dragonfly*)
 +  # DragonFly does not have aout.  When/if they implement a new
 +  # versioning mechanism, adjust this.
 +  if test -x /usr/bin/objformat; then
 +    objformat=`/usr/bin/objformat`
    else
 -    lt_cv_deplibs_check_method=pass_all
 +    case $host_os in
 +    freebsd[123]*) objformat=aout ;;
 +    *) objformat=elf ;;
 +    esac
    fi
 +  version_type=freebsd-$objformat
 +  case $version_type in
 +    freebsd-elf*)
 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 +      need_version=no
 +      need_lib_prefix=no
 +      ;;
 +    freebsd-*)
 +      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 +      need_version=yes
 +      ;;
 +  esac
 +  shlibpath_var=LD_LIBRARY_PATH
 +  case $host_os in
 +  freebsd2*)
 +    shlibpath_overrides_runpath=yes
 +    ;;
 +  freebsd3.[01]* | freebsdelf3.[01]*)
 +    shlibpath_overrides_runpath=yes
 +    hardcode_into_libs=yes
 +    ;;
 +  *) # from 3.2 on
 +    shlibpath_overrides_runpath=no
 +    hardcode_into_libs=yes
 +    ;;
 +  esac
    ;;
  
  gnu*)
 -  lt_cv_deplibs_check_method=pass_all
 +  version_type=linux
 +  need_lib_prefix=no
 +  need_version=no
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  hardcode_into_libs=yes
    ;;
  
- hpux9* | hpux10* | hpux11*)
-   # Give a soname corresponding to the major version so that dld.sl refuses to
-   # link against other versions.
-   version_type=sunos
-   need_lib_prefix=no
-   need_version=no
+ hpux10.20* | hpux11*)
+   lt_cv_file_magic_cmd=/usr/bin/file
    case $host_cpu in
    ia64*)
 -    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
 -    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 -    ;;
 -  hppa*64*)
 -    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
 -    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 +    shrext_cmds='.so'
 +    hardcode_into_libs=yes
 +    dynamic_linker="$host_os dld.so"
 +    shlibpath_var=LD_LIBRARY_PATH
 +    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +    soname_spec='${libname}${release}${shared_ext}$major'
 +    if test "X$HPUX_IA64_MODE" = X32; then
 +      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 +    else
 +      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 +    fi
 +    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
      ;;
 -  *)
 -    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
 -    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 +   hppa*64*)
 +     shrext_cmds='.sl'
 +     hardcode_into_libs=yes
 +     dynamic_linker="$host_os dld.sl"
 +     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 +     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 +     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +     soname_spec='${libname}${release}${shared_ext}$major'
 +     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 +     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 +     ;;
 +   *)
 +    shrext_cmds='.sl'
 +    dynamic_linker="$host_os dld.sl"
 +    shlibpath_var=SHLIB_PATH
 +    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +    soname_spec='${libname}${release}${shared_ext}$major'
      ;;
    esac
 +  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 +  postinstall_cmds='chmod 555 $lib'
    ;;
  
  irix5* | irix6* | nonstopux*)
 -  case $LD in
 -  *-32|*"-32 ") libmagic=32-bit;;
 -  *-n32|*"-n32 ") libmagic=N32;;
 -  *-64|*"-64 ") libmagic=64-bit;;
 -  *) libmagic=never-match;;
 +  case $host_os in
 +    nonstopux*) version_type=nonstopux ;;
 +    *)
 +      if test "$lt_cv_prog_gnu_ld" = yes; then
 +              version_type=linux
 +      else
 +              version_type=irix
 +      fi ;;
    esac
 -  lt_cv_deplibs_check_method=pass_all
 +  need_lib_prefix=no
 +  need_version=no
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 +  case $host_os in
 +  irix5* | nonstopux*)
 +    libsuff= shlibsuff=
 +    ;;
 +  *)
 +    case $LD in # libtool.m4 will add one of these switches to LD
 +    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 +      libsuff= shlibsuff= libmagic=32-bit;;
 +    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 +      libsuff=32 shlibsuff=N32 libmagic=N32;;
 +    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 +      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 +    *) libsuff= shlibsuff= libmagic=never-match;;
 +    esac
 +    ;;
 +  esac
 +  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 +  shlibpath_overrides_runpath=no
 +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 +  hardcode_into_libs=yes
 +  ;;
 +
 +# No shared lib support for Linux oldld, aout, or coff.
 +linux*oldld* | linux*aout* | linux*coff*)
 +  dynamic_linker=no
    ;;
  
  # This must be Linux ELF.
  linux*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-   soname_spec='${libname}${release}${shared_ext}$major'
-   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-   shlibpath_var=LD_LIBRARY_PATH
-   shlibpath_overrides_runpath=no
-   # This implies no fast_install, which is unacceptable.
-   # Some rework will be needed to allow for fast_install
-   # before this can be enabled.
-   hardcode_into_libs=yes
-   # Append ld.so.conf contents to the search path
-   if test -f /etc/ld.so.conf; then
-     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-   fi
-   # We used to test for /lib/ld.so.1 and disable shared libraries on
-   # powerpc, because MkLinux only supported shared libraries with the
-   # GNU dynamic linker.  Since this was broken with cross compilers,
-   # most powerpc-linux boxes support dynamic linking these days and
-   # people can always --disable-shared, the test was removed, and we
-   # assume the GNU/Linux dynamic linker is in use.
-   dynamic_linker='GNU/Linux ld.so'
-   ;;
- knetbsd*-gnu)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-   soname_spec='${libname}${release}${shared_ext}$major'
-   shlibpath_var=LD_LIBRARY_PATH
-   shlibpath_overrides_runpath=no
-   hardcode_into_libs=yes
-   dynamic_linker='GNU ld.so'
+   lt_cv_deplibs_check_method=pass_all
    ;;
  
  netbsd*)
 -  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 -    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
 +  version_type=sunos
 +  need_lib_prefix=no
 +  need_version=no
 +  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 +    dynamic_linker='NetBSD (a.out) ld.so'
    else
 -    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 +    soname_spec='${libname}${release}${shared_ext}$major'
 +    dynamic_linker='NetBSD ld.elf_so'
    fi
 +  shlibpath_var=LD_LIBRARY_PATH
 +  shlibpath_overrides_runpath=yes
 +  hardcode_into_libs=yes
    ;;
  
 -newos6*)
 -  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
 -  lt_cv_file_magic_cmd=/usr/bin/file
 -  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 +newsos6)
 +  version_type=linux
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  shlibpath_overrides_runpath=yes
    ;;
  
  nto-qnx*)
 -  lt_cv_deplibs_check_method=unknown
 +  version_type=linux
 +  need_lib_prefix=no
 +  need_version=no
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  shlibpath_overrides_runpath=yes
    ;;
  
  openbsd*)
-   version_type=sunos
-   need_lib_prefix=no
-   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-   case $host_os in
-     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-     *)                         need_version=no  ;;
-   esac
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-   shlibpath_var=LD_LIBRARY_PATH
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-     case $host_os in
-       openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-       *)
-       shlibpath_overrides_runpath=yes
-       ;;
-       esac
+     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
    else
-     shlibpath_overrides_runpath=yes
+     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
    fi
    ;;
  
 +os2*)
 +  libname_spec='$name'
 +  shrext_cmds=".dll"
 +  need_lib_prefix=no
 +  library_names_spec='$libname${shared_ext} $libname.a'
 +  dynamic_linker='OS/2 ld.exe'
 +  shlibpath_var=LIBPATH
 +  ;;
 +
  osf3* | osf4* | osf5*)
 -  lt_cv_deplibs_check_method=pass_all
 +  version_type=osf
 +  need_lib_prefix=no
 +  need_version=no
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 +  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
    ;;
  
  sco3.2v5*)
 -  lt_cv_deplibs_check_method=pass_all
 +  version_type=osf
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  shlibpath_var=LD_LIBRARY_PATH
    ;;
  
  solaris*)
 -  lt_cv_deplibs_check_method=pass_all
 +  version_type=linux
 +  need_lib_prefix=no
 +  need_version=no
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  shlibpath_overrides_runpath=yes
 +  hardcode_into_libs=yes
 +  # ldd complains unless libraries are executable
 +  postinstall_cmds='chmod +x $lib'
 +  ;;
 +
 +sunos4*)
 +  version_type=sunos
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 +  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  shlibpath_overrides_runpath=yes
 +  if test "$with_gnu_ld" = yes; then
 +    need_lib_prefix=no
 +  fi
 +  need_version=yes
    ;;
  
  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 +  version_type=linux
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
    case $host_vendor in
 -  motorola)
 -    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
 -    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 -    ;;
 -  ncr)
 -    lt_cv_deplibs_check_method=pass_all
 -    ;;
 -  sequent)
 -    lt_cv_file_magic_cmd='/bin/file'
 -    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
 -    ;;
 -  sni)
 -    lt_cv_file_magic_cmd='/bin/file'
 -    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
 -    lt_cv_file_magic_test_file=/lib/libc.so
 -    ;;
 -  siemens)
 -    lt_cv_deplibs_check_method=pass_all
 -    ;;
 +    sni)
 +      shlibpath_overrides_runpath=no
 +      need_lib_prefix=no
 +      export_dynamic_flag_spec='${wl}-Blargedynsym'
 +      runpath_var=LD_RUN_PATH
 +      ;;
 +    siemens)
 +      need_lib_prefix=no
 +      ;;
 +    motorola)
 +      need_lib_prefix=no
 +      need_version=no
 +      shlibpath_overrides_runpath=no
 +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 +      ;;
    esac
    ;;
  
 -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
 -  lt_cv_deplibs_check_method=pass_all
 +sysv4*MP*)
 +  if test -d /usr/nec ;then
 +    version_type=linux
 +    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 +    soname_spec='$libname${shared_ext}.$major'
 +    shlibpath_var=LD_LIBRARY_PATH
 +  fi
 +  ;;
 +
 +uts4*)
 +  version_type=linux
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  ;;
 +
 +*)
 +  dynamic_linker=no
    ;;
  esac
 +echo "$as_me:$LINENO: result: $dynamic_linker" >&5
 +echo "${ECHO_T}$dynamic_linker" >&6
 +test "$dynamic_linker" = no && can_build_shared=no
  
- hardcode_action=
- if test -n "$hardcode_libdir_flag_spec" || \
-    test -n "$runpath_var" || \
-    test "X$hardcode_automatic" = "Xyes" ; then
 +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-   if test "$hardcode_direct" != no &&
++hardcode_action_CXX=
++if test -n "$hardcode_libdir_flag_spec_CXX" || \
++   test -n "$runpath_var_CXX" || \
++   test "X$hardcode_automatic_CXX" = "Xyes" ; then
 +
 +  # We can hardcode non-existant directories.
-      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
-      test "$hardcode_minus_L" != no; then
++  if test "$hardcode_direct_CXX" != no &&
 +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 +     # have to relink, otherwise we might link with an installed library
 +     # when we should be linking with a yet-to-be-installed one
-     hardcode_action=relink
++     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
++     test "$hardcode_minus_L_CXX" != no; then
 +    # Linking always hardcodes the temporary library directory.
-     hardcode_action=immediate
++    hardcode_action_CXX=relink
 +  else
 +    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-   hardcode_action=unsupported
++    hardcode_action_CXX=immediate
 +  fi
 +else
 +  # We cannot hardcode anything, or else we can only hardcode existing
 +  # directories.
++  hardcode_action_CXX=unsupported
  fi
- echo "$as_me:$LINENO: result: $hardcode_action" >&5
- echo "${ECHO_T}$hardcode_action" >&6
+ { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+ echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
+ file_magic_cmd=$lt_cv_file_magic_cmd
+ deplibs_check_method=$lt_cv_deplibs_check_method
+ test -z "$deplibs_check_method" && deplibs_check_method=unknown
  
- if test "$hardcode_action" = relink; then
++if test "$hardcode_action_CXX" = relink; then
 +  # Fast installation is not supported
 +  enable_fast_install=no
 +elif test "$shlibpath_overrides_runpath" = yes ||
 +     test "$enable_shared" = no; then
 +  # Fast installation is not necessary
 +  enable_fast_install=needless
 +fi
  
 -# If no C compiler was specified, use CC.
 -LTCC=${LTCC-"$CC"}
 +striplib=
 +old_striplib=
 +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 +  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 +  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 +  echo "$as_me:$LINENO: result: yes" >&5
 +echo "${ECHO_T}yes" >&6
 +else
 +# FIXME - insert some real tests, host_os isn't really good enough
 +  case $host_os in
 +   darwin*)
 +       if test -n "$STRIP" ; then
 +         striplib="$STRIP -x"
 +         echo "$as_me:$LINENO: result: yes" >&5
 +echo "${ECHO_T}yes" >&6
 +       else
 +  echo "$as_me:$LINENO: result: no" >&5
 +echo "${ECHO_T}no" >&6
 +fi
 +       ;;
 +   *)
 +  echo "$as_me:$LINENO: result: no" >&5
 +echo "${ECHO_T}no" >&6
 +    ;;
 +  esac
 +fi
  
 -# Allow CC to be a program name with arguments.
 -compiler=$CC
 +if test "x$enable_dlopen" != xyes; then
 +  enable_dlopen=unknown
 +  enable_dlopen_self=unknown
 +  enable_dlopen_self_static=unknown
 +else
 +  lt_cv_dlopen=no
 +  lt_cv_dlopen_libs=
  
-   case $host_os in
-   beos*)
-     lt_cv_dlopen="load_add_on"
-     lt_cv_dlopen_libs=
-     lt_cv_dlopen_self=yes
-     ;;
+ # Check whether --enable-libtool-lock was given.
+ if test "${enable_libtool_lock+set}" = set; then
+   enableval=$enable_libtool_lock;
+ fi
  
-   mingw* | pw32*)
-     lt_cv_dlopen="LoadLibrary"
-     lt_cv_dlopen_libs=
-    ;;
+ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+ # Some flags need to be propagated to the compiler or linker for good
+ # libtool support.
+ case $host in
+ ia64-*-hpux*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+   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
+     case `/usr/bin/file conftest.$ac_objext` in
+     *ELF-32*)
+       HPUX_IA64_MODE="32"
+       ;;
+     *ELF-64*)
+       HPUX_IA64_MODE="64"
+       ;;
+     esac
+   fi
+   rm -rf conftest*
+   ;;
+ *-*-irix6*)
+   # Find out which ABI we are using.
+   echo '#line 32904 "configure"' > conftest.$ac_ext
+   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
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+     case `/usr/bin/file conftest.$ac_objext` in
+     *32-bit*)
+       LD="${LD-ld} -melf32bsmip"
+       ;;
+     *N32*)
+       LD="${LD-ld} -melf32bmipn32"
+       ;;
+     *64-bit*)
+       LD="${LD-ld} -melf64bmip"
+       ;;
+     esac
+    else
+     case `/usr/bin/file conftest.$ac_objext` in
+     *32-bit*)
+       LD="${LD-ld} -32"
+       ;;
+     *N32*)
+       LD="${LD-ld} -n32"
+       ;;
+     *64-bit*)
+       LD="${LD-ld} -64"
+       ;;
+     esac
+    fi
+   fi
+   rm -rf conftest*
+   ;;
  
-   cygwin*)
-     lt_cv_dlopen="dlopen"
-     lt_cv_dlopen_libs=
-    ;;
+ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+   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
+     case `/usr/bin/file conftest.o` in
+     *32-bit*)
+       case $host in
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_i386"
+           ;;
+         ppc64-*linux*|powerpc64-*linux*)
+           LD="${LD-ld} -m elf32ppclinux"
+           ;;
+         s390x-*linux*)
+           LD="${LD-ld} -m elf_s390"
+           ;;
+         sparc64-*linux*)
+           LD="${LD-ld} -m elf32_sparc"
+           ;;
+       esac
+       ;;
+     *64-bit*)
+       case $host in
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+         ppc*-*linux*|powerpc*-*linux*)
+           LD="${LD-ld} -m elf64ppc"
+           ;;
+         s390*-*linux*)
+           LD="${LD-ld} -m elf64_s390"
+           ;;
+         sparc*-*linux*)
+           LD="${LD-ld} -m elf64_sparc"
+           ;;
+       esac
+       ;;
+     esac
+   fi
+   rm -rf conftest*
+   ;;
  
-   darwin*)
-   # if libdl is installed we need to link against it
-     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
- echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
- if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ *-*-sco3.2v5*)
+   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+   SAVE_CFLAGS="$CFLAGS"
+   CFLAGS="$CFLAGS -belf"
+   { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+ echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
+ if test "${lt_cv_cc_needs_belf+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  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
 -
 -     cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-ldl  $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 dlopen ();
  int
  main ()
  {
 -
 +dlopen ();
    ;
    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
-   ac_cv_lib_dl_dlopen=yes
+   (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
+   lt_cv_cc_needs_belf=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_lib_dl_dlopen=no
      lt_cv_cc_needs_belf=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
 -     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
 -
 +LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
- echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
- if test $ac_cv_lib_dl_dlopen = yes; then
-   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
- else
+ { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+ echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
+   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+     CFLAGS="$SAVE_CFLAGS"
+   fi
+   ;;
  
 -esac
 +    lt_cv_dlopen="dyld"
 +    lt_cv_dlopen_libs=
 +    lt_cv_dlopen_self=yes
  
 -need_locks="$enable_libtool_lock"
 +fi
  
 +   ;;
  
-   *)
-     echo "$as_me:$LINENO: checking for shl_load" >&5
- echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
- if test "${ac_cv_func_shl_load+set}" = set; then
+ for ac_header in dlfcn.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   # 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>
 +/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 +#define shl_load innocuous_shl_load
 +
 +/* System header to define __stub macros and hopefully few prototypes,
 +    which can conflict with char shl_load (); 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 shl_load
 +
 +/* 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 shl_load ();
 +/* 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_shl_load) || defined (__stub___shl_load)
 +choke me
 +#else
 +char (*f) () = shl_load;
 +#endif
 +#ifdef __cplusplus
 +}
 +#endif
 +
 +int
 +main ()
 +{
 +return f != shl_load;
 +  ;
 +  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
+ 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 -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_shl_load=yes
+   (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_cv_func_shl_load=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+       ac_header_compiler=no
  fi
- echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
- echo "${ECHO_T}$ac_cv_func_shl_load" >&6
- if test $ac_cv_func_shl_load = yes; then
-   lt_cv_dlopen="shl_load"
- else
-   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
- echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
- if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldld  $LIBS"
+ 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; }
  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 { (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
 +
 +/* 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 shl_load ();
 +int
 +main ()
 +{
 +shl_load ();
 +  ;
 +  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_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); } &&
-        { 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_dld_shl_load=yes
+   (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
  sed 's/^/| /' conftest.$ac_ext >&5
  
 -  ac_header_preproc=no
 +ac_cv_lib_dld_shl_load=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_dld_shl_load" >&5
- echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
- if test $ac_cv_lib_dld_shl_load = yes; then
-   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
- else
-   echo "$as_me:$LINENO: checking for dlopen" >&5
- echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
- if test "${ac_cv_func_dlopen+set}" = set; then
+ 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;}
+     ;;
+ esac
+ { 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
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
-    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
- #define dlopen innocuous_dlopen
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char dlopen (); below.
-     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-     <limits.h> exists even on freestanding compilers.  */
+   eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ 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
 -  cat >>confdefs.h <<_ACEOF
 -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
 +#ifdef __STDC__
 +# include <limits.h>
 +#else
 +# include <assert.h>
 +#endif
  
 -fi
 +#undef dlopen
  
 -done
 +/* 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 dlopen ();
 +/* 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_dlopen) || defined (__stub___dlopen)
 +choke me
 +#else
 +char (*f) () = dlopen;
 +#endif
 +#ifdef __cplusplus
 +}
 +#endif
  
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ if test -z "$CXX"; then
+   if test -n "$CCC"; then
+     CXX=$CCC
+   else
+     if test -n "$ac_tool_prefix"; then
+   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+   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_CXX+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$CXX"; then
+   ac_cv_prog_CXX="$CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_CXX="$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
+ CXX=$ac_cv_prog_CXX
+ if test -n "$CXX"; then
+   { echo "$as_me:$LINENO: result: $CXX" >&5
+ echo "${ECHO_T}$CXX" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+     test -n "$CXX" && break
+   done
+ fi
+ if test -z "$CXX"; then
+   ac_ct_CXX=$CXX
+   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ 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_CXX+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$ac_ct_CXX"; then
+   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 { 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_CXX="$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_CXX=$ac_cv_prog_ac_ct_CXX
+ if test -n "$ac_ct_CXX"; then
+   { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+ echo "${ECHO_T}$ac_ct_CXX" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   test -n "$ac_ct_CXX" && break
+ done
+   if test "x$ac_ct_CXX" = x; then
+     CXX="g++"
+   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@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@gnu.org." >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     CXX=$ac_ct_CXX
+   fi
+ fi
+   fi
+ fi
+ # Provide some information about the compiler.
+ echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ ac_compiler=`set X $ac_compile; echo $2`
+ { (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); }
+ { (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); }
+ { (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); }
+ { 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_cxx_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 f != dlopen;
    ;
    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
+ 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 -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_dlopen=yes
+   (exit $ac_status); } && {
+        test -z "$ac_cxx_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_cv_func_dlopen=no
      ac_compiler_gnu=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
  fi
echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
- echo "${ECHO_T}$ac_cv_func_dlopen" >&6
- if test $ac_cv_func_dlopen = yes; then
-   lt_cv_dlopen="dlopen"
- else
  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
- echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
- if test "${ac_cv_lib_dl_dlopen+set}" = set; then
{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+ echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+ GXX=`test $ac_compiler_gnu = yes && echo yes`
+ ac_test_CXXFLAGS=${CXXFLAGS+set}
+ ac_save_CXXFLAGS=$CXXFLAGS
{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+ echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_cxx_g+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldl  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+    ac_cxx_werror_flag=yes
+    ac_cv_prog_cxx_g=no
+    CXXFLAGS="-g"
+    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 dlopen ();
  int
  main ()
  {
 -
 +dlopen ();
    ;
    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
+ 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 -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_dl_dlopen=yes
+   (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_prog_cxx_g=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5
- echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
- if test $ac_cv_lib_dl_dlopen = yes; then
-   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
- else
-   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
- echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
- if test "${ac_cv_lib_svld_dlopen+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsvld  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+       CXXFLAGS=""
+       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 dlopen ();
  int
  main ()
  {
- dlopen ();
    ;
    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
+ 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 -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_svld_dlopen=yes
+   (exit $ac_status); } && {
+        test -z "$ac_cxx_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_cv_lib_svld_dlopen=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_svld_dlopen" >&5
- echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
- if test $ac_cv_lib_svld_dlopen = yes; then
-   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
- else
-   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
- echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
- if test "${ac_cv_lib_dld_dld_link+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldld  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+       ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+        CXXFLAGS="-g"
+        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 dld_link ();
  int
  main ()
  {
- dld_link ();
    ;
    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
+ 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 -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_dld_dld_link=yes
+   (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_prog_cxx_g=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_dld_dld_link=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_dld_dld_link" >&5
- echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
- if test $ac_cv_lib_dld_dld_link = yes; then
-   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
- fi
  
  fi
  
- fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
  fi
-     ;;
-   esac
-   if test "x$lt_cv_dlopen" != xno; then
-     enable_dlopen=yes
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+ echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+ if test "$ac_test_CXXFLAGS" = set; then
+   CXXFLAGS=$ac_save_CXXFLAGS
+ elif test $ac_cv_prog_cxx_g = yes; then
+   if test "$GXX" = yes; then
+     CXXFLAGS="-g -O2"
    else
-     enable_dlopen=no
+     CXXFLAGS="-g"
+   fi
+ else
+   if test "$GXX" = yes; then
+     CXXFLAGS="-O2"
+   else
+     CXXFLAGS=
    fi
+ fi
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
 -depcc="$CXX"  am_compiler_list=
 +  case $lt_cv_dlopen in
 +  dlopen)
 +    save_CPPFLAGS="$CPPFLAGS"
 +    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 +
 +    save_LDFLAGS="$LDFLAGS"
 +    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 +
 +    save_LIBS="$LIBS"
 +    LIBS="$lt_cv_dlopen_libs $LIBS"
  
    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
- echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
- if test "${lt_cv_dlopen_self+set}" = set; then
{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+ echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+ if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 -  # We make a subdir and do the tests there.  Otherwise we can end up
 -  # making bogus files that we don't know about and never remove.  For
 -  # instance it was reported that on HP-UX the gcc test will end up
 -  # making a dummy file named `D' -- because `-MD' means `put the output
 -  # in D'.
 -  mkdir conftest.dir
 -  # Copy depcomp to subdir because otherwise we won't find it if we're
 -  # using a relative directory.
 -  cp "$am_depcomp" conftest.dir
 -  cd conftest.dir
 -  # We will build objects and dependencies in a subdirectory because
 -  # it helps to detect inapplicable dependency modes.  For instance
 -  # both Tru64's cc and ICC support -MD to output dependencies as a
 -  # side effect of compilation, but ICC will put the dependencies in
 -  # the current directory while Tru64 will put them in the object
 -  # directory.
 -  mkdir sub
 +        if test "$cross_compiling" = yes; then :
 +  lt_cv_dlopen_self=cross
 +else
 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 +  lt_status=$lt_dlunknown
 +  cat > conftest.$ac_ext <<EOF
- #line 27979 "configure"
++#line 31775 "configure"
 +#include "confdefs.h"
  
 -  am_cv_CXX_dependencies_compiler_type=none
 -  if test "$am_compiler_list" = ""; then
 -     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
 -  fi
 -  for depmode in $am_compiler_list; do
 -    # Setup a source with many dependencies, because some compilers
 -    # like to wrap large dependency lists on column 80 (with \), and
 -    # we should not choose a depcomp mode which is confused by this.
 -    #
 -    # We need to recreate these files for each test, as the compiler may
 -    # overwrite some of them when testing with obscure command lines.
 -    # This happens at least with the AIX C compiler.
 -    : > sub/conftest.c
 -    for i in 1 2 3 4 5 6; do
 -      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 -      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 -      # Solaris 8's {/usr,}/bin/sh.
 -      touch sub/conftst$i.h
 -    done
 -    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 +#if HAVE_DLFCN_H
 +#include <dlfcn.h>
 +#endif
 +
 +#include <stdio.h>
 +
 +#ifdef RTLD_GLOBAL
 +#  define LT_DLGLOBAL         RTLD_GLOBAL
 +#else
 +#  ifdef DL_GLOBAL
 +#    define LT_DLGLOBAL               DL_GLOBAL
 +#  else
 +#    define LT_DLGLOBAL               0
 +#  endif
 +#endif
 +
 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 +   find out it does not work in some platform. */
 +#ifndef LT_DLLAZY_OR_NOW
 +#  ifdef RTLD_LAZY
 +#    define LT_DLLAZY_OR_NOW          RTLD_LAZY
 +#  else
 +#    ifdef DL_LAZY
 +#      define LT_DLLAZY_OR_NOW                DL_LAZY
 +#    else
 +#      ifdef RTLD_NOW
 +#        define LT_DLLAZY_OR_NOW      RTLD_NOW
 +#      else
 +#        ifdef DL_NOW
 +#          define LT_DLLAZY_OR_NOW    DL_NOW
 +#        else
 +#          define LT_DLLAZY_OR_NOW    0
 +#        endif
 +#      endif
 +#    endif
 +#  endif
 +#endif
  
- #ifdef __cplusplus
- extern "C" void exit (int);
- #endif
+     case $depmode in
+     nosideeffect)
+       # after this tag, mechanisms are not by side-effect, so they'll
+       # only be used when explicitly requested
+       if test "x$enable_dependency_tracking" = xyes; then
+       continue
+       else
+       break
+       fi
+       ;;
+     none) break ;;
+     esac
+     # We check with `-c' and `-o' for the sake of the "dashmstdout"
+     # mode.  It turns out that the SunPro C++ compiler does not properly
+     # handle `-M -o', and we need to detect this.
+     if depmode=$depmode \
+        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+          >/dev/null 2>conftest.err &&
+        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+       # icc doesn't choke on unknown options, it will just issue warnings
+       # or remarks (even with -Werror).  So we grep stderr for any message
+       # that says an option was ignored or not supported.
+       # When given -MP, icc 7.0 and 7.1 complain thusly:
+       #   icc: Command line warning: ignoring option '-M'; no argument required
+       # The diagnosis changed in icc 8.0:
+       #   icc: Command line remark: option '-MP' not supported
+       if (grep 'ignoring option' conftest.err ||
+           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+         am_cv_CXX_dependencies_compiler_type=$depmode
+         break
+       fi
+     fi
+   done
  
 -  cd ..
 -  rm -rf conftest.dir
 -else
 -  am_cv_CXX_dependencies_compiler_type=none
 -fi
 +void fnord() { int i=42;}
 +int main ()
 +{
 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 +  int status = $lt_dlunknown;
  
-   if (self)
-     {
-       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-       /* dlclose (self); */
-     }
+ fi
+ { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+ echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+ CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
  
-     exit (status);
- }
- EOF
-   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); } && test -s conftest${ac_exeext} 2>/dev/null; then
-     (./conftest; exit; ) >&5 2>/dev/null
-     lt_status=$?
-     case x$lt_status in
-       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
-     esac
-   else :
-     # compilation failed
-     lt_cv_dlopen_self=no
-   fi
+  if
+   test "x$enable_dependency_tracking" != xno \
+   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+   am__fastdepCXX_TRUE=
+   am__fastdepCXX_FALSE='#'
+ else
+   am__fastdepCXX_TRUE='#'
+   am__fastdepCXX_FALSE=
  fi
 +rm -fr conftest*
  
  
- fi
- echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
- echo "${ECHO_T}$lt_cv_dlopen_self" >&6
  
-     if test "x$lt_cv_dlopen_self" = xyes; then
-       LDFLAGS="$LDFLAGS $link_static_flag"
-       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
- echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
- if test "${lt_cv_dlopen_self_static+set}" = set; then
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+     (test "X$CXX" != "Xg++"))) ; then
+   ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_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; }
+ if test -z "$CXXCPP"; then
+   if test "${ac_cv_prog_CXXCPP+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-         if test "$cross_compiling" = yes; then :
-   lt_cv_dlopen_self_static=cross
+       # Double quotes because CXXCPP needs to be expanded
+     for CXXCPP in "$CXX -E" "/lib/cpp"
+     do
+       ac_preproc_ok=false
+ for ac_cxx_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 { (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 && {
+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        }; then
+   :
  else
 -  echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 +  lt_status=$lt_dlunknown
 +  cat > conftest.$ac_ext <<EOF
- #line 28077 "configure"
++#line 31873 "configure"
 +#include "confdefs.h"
  
- #if HAVE_DLFCN_H
- #include <dlfcn.h>
- #endif
+   # Broken: fails on valid input.
+ continue
+ fi
  
- #include <stdio.h>
+ rm -f conftest.err conftest.$ac_ext
  
- #ifdef RTLD_GLOBAL
- #  define LT_DLGLOBAL         RTLD_GLOBAL
- #else
- #  ifdef DL_GLOBAL
- #    define LT_DLGLOBAL               DL_GLOBAL
- #  else
- #    define LT_DLGLOBAL               0
- #  endif
- #endif
+   # OK, works on sane cases.  Now check whether nonexistent 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 { (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 && {
+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        }; then
+   # Broken: success on invalid input.
+ continue
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-    find out it does not work in some platform. */
- #ifndef LT_DLLAZY_OR_NOW
- #  ifdef RTLD_LAZY
- #    define LT_DLLAZY_OR_NOW          RTLD_LAZY
- #  else
- #    ifdef DL_LAZY
- #      define LT_DLLAZY_OR_NOW                DL_LAZY
- #    else
- #      ifdef RTLD_NOW
- #        define LT_DLLAZY_OR_NOW      RTLD_NOW
- #      else
- #        ifdef DL_NOW
- #          define LT_DLLAZY_OR_NOW    DL_NOW
- #        else
- #          define LT_DLLAZY_OR_NOW    0
- #        endif
- #      endif
- #    endif
- #  endif
- #endif
+   # Passes both tests.
+ ac_preproc_ok=:
+ break
+ fi
  
- #ifdef __cplusplus
- extern "C" void exit (int);
- #endif
+ 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
 +void fnord() { int i=42;}
 +int main ()
 +{
 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 +  int status = $lt_dlunknown;
  
 -    done
 -    ac_cv_prog_CXXCPP=$CXXCPP
 +  if (self)
 +    {
 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 +      /* dlclose (self); */
 +    }
  
-     exit (status);
- }
- EOF
-   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-   (eval $ac_link) 2>&5
+ fi
+   CXXCPP=$ac_cv_prog_CXXCPP
+ else
+   ac_cv_prog_CXXCPP=$CXXCPP
+ fi
+ { echo "$as_me:$LINENO: result: $CXXCPP" >&5
+ echo "${ECHO_T}$CXXCPP" >&6; }
+ ac_preproc_ok=false
+ for ac_cxx_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 { (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); } && test -s conftest${ac_exeext} 2>/dev/null; then
-     (./conftest; exit; ) >&5 2>/dev/null
-     lt_status=$?
-     case x$lt_status in
-       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
-     esac
-   else :
-     # compilation failed
-     lt_cv_dlopen_self_static=no
-   fi
- fi
- rm -fr conftest*
+   (exit $ac_status); } >/dev/null && {
+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        }; then
+   :
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
 -  # Broken: fails on valid input.
 -continue
  fi
- echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
- echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
-     fi
  
-     CPPFLAGS="$save_CPPFLAGS"
-     LDFLAGS="$save_LDFLAGS"
-     LIBS="$save_LIBS"
-     ;;
-   esac
+ rm -f conftest.err conftest.$ac_ext
  
-   case $lt_cv_dlopen_self in
-   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-   *) enable_dlopen_self=unknown ;;
-   esac
+   # OK, works on sane cases.  Now check whether nonexistent 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 { (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 && {
+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+        test ! -s conftest.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
 +  case $lt_cv_dlopen_self_static in
 +  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 +  *) enable_dlopen_self_static=unknown ;;
 +  esac
  fi
  
- # Report which librarie types wil actually be built
- echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
- echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $can_build_shared" >&5
- echo "${ECHO_T}$can_build_shared" >&6
- echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
- echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
- test "$can_build_shared" = "no" && enable_shared=no
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
-   test "$enable_shared" = yes && enable_static=no
-   if test -n "$RANLIB"; then
-     archive_cmds="$archive_cmds~\$RANLIB \$lib"
-     postinstall_cmds='$RANLIB $lib'
-   fi
-   ;;
- aix4* | aix5*)
-   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-     test "$enable_shared" = yes && enable_static=no
-   fi
-     ;;
- esac
- echo "$as_me:$LINENO: result: $enable_shared" >&5
- echo "${ECHO_T}$enable_shared" >&6
- echo "$as_me:$LINENO: checking whether to build static libraries" >&5
- echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- echo "$as_me:$LINENO: result: $enable_static" >&5
- echo "${ECHO_T}$enable_static" >&6
+ 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 \"$CXXCPP\" fails sanity check
 -See \`config.log' for more details." >&5
 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }
 -fi
 +# The else clause should only fire when bootstrapping the
 +# libtool distribution, otherwise you forgot to ship ltmain.sh
 +# with your package, and you will get complaints that there are
 +# no rules to generate ltmain.sh.
 +if test -f "$ltmain"; then
 +  # See if we are running on zsh, and set the options which allow our commands through
 +  # without removal of \ escapes.
 +  if test -n "${ZSH_VERSION+set}" ; then
 +    setopt NO_GLOB_SUBST
 +  fi
 +  # Now quote all the things that may contain metacharacters while being
 +  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 +  # variables and quote the copies for generation of the libtool script.
 +  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
 +    SED SHELL STRIP \
 +    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 +    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 +    deplibs_check_method reload_flag reload_cmds need_locks \
 +    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 +    lt_cv_sys_global_symbol_to_c_name_address \
 +    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 +    old_postinstall_cmds old_postuninstall_cmds \
-     compiler \
-     CC \
-     LD \
-     lt_prog_compiler_wl \
-     lt_prog_compiler_pic \
-     lt_prog_compiler_static \
-     lt_prog_compiler_no_builtin_flag \
-     export_dynamic_flag_spec \
-     thread_safe_flag_spec \
-     whole_archive_flag_spec \
-     enable_shared_with_static_runtimes \
-     old_archive_cmds \
-     old_archive_from_new_cmds \
-     predep_objects \
-     postdep_objects \
-     predeps \
-     postdeps \
-     compiler_lib_search_path \
-     archive_cmds \
-     archive_expsym_cmds \
-     postinstall_cmds \
-     postuninstall_cmds \
-     old_archive_from_expsyms_cmds \
-     allow_undefined_flag \
-     no_undefined_flag \
-     export_symbols_cmds \
-     hardcode_libdir_flag_spec \
-     hardcode_libdir_flag_spec_ld \
-     hardcode_libdir_separator \
-     hardcode_automatic \
-     module_cmds \
-     module_expsym_cmds \
-     lt_cv_prog_compiler_c_o \
-     exclude_expsyms \
-     include_expsyms; do
-     case $var in
-     old_archive_cmds | \
-     old_archive_from_new_cmds | \
-     archive_cmds | \
-     archive_expsym_cmds | \
-     module_cmds | \
-     module_expsym_cmds | \
-     old_archive_from_expsyms_cmds | \
-     export_symbols_cmds | \
-     extract_expsyms_cmds | reload_cmds | finish_cmds | \
-     postinstall_cmds | postuninstall_cmds | \
-     old_postinstall_cmds | old_postuninstall_cmds | \
-     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-       # Double-quote double-evaled strings.
-       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-       ;;
-     *)
-       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-       ;;
-     esac
-   done
-   case $lt_echo in
-   *'\$0 --fallback-echo"')
-     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-     ;;
-   esac
- cfgfile="${ofile}T"
-   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-   $rm -f "$cfgfile"
-   { echo "$as_me:$LINENO: creating $ofile" >&5
- echo "$as_me: creating $ofile" >&6;}
-   cat <<__EOF__ >> "$cfgfile"
- #! $SHELL
- # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
- # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
- # NOTE: Changes made to this file will be lost: look at ltmain.sh.
- #
- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
- # Free Software Foundation, Inc.
- #
- # This file is part of GNU Libtool:
- # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
- #
- # This program 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.
- # A sed program that does not truncate output.
- SED=$lt_SED
++    compiler_CXX \
++    CC_CXX \
++    LD_CXX \
++    lt_prog_compiler_wl_CXX \
++    lt_prog_compiler_pic_CXX \
++    lt_prog_compiler_static_CXX \
++    lt_prog_compiler_no_builtin_flag_CXX \
++    export_dynamic_flag_spec_CXX \
++    thread_safe_flag_spec_CXX \
++    whole_archive_flag_spec_CXX \
++    enable_shared_with_static_runtimes_CXX \
++    old_archive_cmds_CXX \
++    old_archive_from_new_cmds_CXX \
++    predep_objects_CXX \
++    postdep_objects_CXX \
++    predeps_CXX \
++    postdeps_CXX \
++    compiler_lib_search_path_CXX \
++    archive_cmds_CXX \
++    archive_expsym_cmds_CXX \
++    postinstall_cmds_CXX \
++    postuninstall_cmds_CXX \
++    old_archive_from_expsyms_cmds_CXX \
++    allow_undefined_flag_CXX \
++    no_undefined_flag_CXX \
++    export_symbols_cmds_CXX \
++    hardcode_libdir_flag_spec_CXX \
++    hardcode_libdir_flag_spec_ld_CXX \
++    hardcode_libdir_separator_CXX \
++    hardcode_automatic_CXX \
++    module_cmds_CXX \
++    module_expsym_cmds_CXX \
++    lt_cv_prog_compiler_c_o_CXX \
++    exclude_expsyms_CXX \
++    include_expsyms_CXX; do
  
- # Sed that helps us avoid accidentally triggering echo(1) options like -n.
- Xsed="$SED -e 1s/^X//"
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
- # The HP-UX ksh and POSIX shell print the target directory to stdout
- # if CDPATH is set.
- (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+ fi
  
- # The names of the tagged configurations supported by this script.
- available_tags=
  
- # ### BEGIN LIBTOOL CONFIG
+ ac_ext=f
+ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+ if test -n "$ac_tool_prefix"; then
+   for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+   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_F77+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$F77"; then
+   ac_cv_prog_F77="$F77" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_F77="$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
  
- # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+ fi
+ fi
+ F77=$ac_cv_prog_F77
+ if test -n "$F77"; then
+   { echo "$as_me:$LINENO: result: $F77" >&5
+ echo "${ECHO_T}$F77" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
- # Shell to use when invoking shell scripts.
- SHELL=$lt_SHELL
  
- # Whether or not to build shared libraries.
- build_libtool_libs=$enable_shared
+     test -n "$F77" && break
+   done
+ fi
+ if test -z "$F77"; then
+   ac_ct_F77=$F77
+   for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+ 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_F77+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$ac_ct_F77"; then
+   ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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 { 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_F77="$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+ done
+ IFS=$as_save_IFS
  
- # Whether or not to build static libraries.
- build_old_libs=$enable_static
+ fi
+ fi
+ ac_ct_F77=$ac_cv_prog_ac_ct_F77
+ if test -n "$ac_ct_F77"; then
+   { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+ echo "${ECHO_T}$ac_ct_F77" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
- # Whether or not to add -lc for building shared libraries.
- build_libtool_need_lc=$archive_cmds_need_lc
  
- # Whether or not to disallow shared libs when runtime libs are static
- allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+   test -n "$ac_ct_F77" && break
+ done
  
- # Whether or not to optimize for fast installation.
- fast_install=$enable_fast_install
+   if test "x$ac_ct_F77" = x; then
+     F77=""
+   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@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@gnu.org." >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     F77=$ac_ct_F77
+   fi
+ fi
  
 +# The host system.
 +host_alias=$host_alias
 +host=$host
 +host_os=$host_os
  
- # The build system.
- build_alias=$build_alias
- build=$build
- build_os=$build_os
+ # Provide some information about the compiler.
+ echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
+ ac_compiler=`set X $ac_compile; echo $2`
+ { (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); }
+ { (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); }
+ { (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); }
+ rm -f a.out
  
- # An echo program that does not interpret backslashes.
- echo=$lt_echo
+ # If we don't use `.F' as extension, the preprocessor is not run on the
+ # input file.  (Note that this only needs to work for GNU compilers.)
+ ac_save_ext=$ac_ext
+ ac_ext=F
+ { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+ echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
+ if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+       program main
+ #ifndef __GNUC__
+        choke me
+ #endif
  
- # The archiver.
- AR=$lt_AR
- AR_FLAGS=$lt_AR_FLAGS
+       end
+ _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_f77_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
  
- # A C compiler.
- LTCC=$lt_LTCC
+       ac_compiler_gnu=no
+ fi
  
- # A language-specific compiler.
- CC=$lt_compiler
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_f77_compiler_gnu=$ac_compiler_gnu
  
- # Is the compiler the GNU C compiler?
- with_gcc=$GCC
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+ echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
+ ac_ext=$ac_save_ext
+ ac_test_FFLAGS=${FFLAGS+set}
+ ac_save_FFLAGS=$FFLAGS
+ FFLAGS=
+ { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+ echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_f77_g+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   FFLAGS=-g
+ cat >conftest.$ac_ext <<_ACEOF
+       program main
  
- # An ERE matcher.
- EGREP=$lt_EGREP
+       end
+ _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_f77_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_prog_f77_g=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # The linker used to build libraries.
- LD=$lt_LD
+       ac_cv_prog_f77_g=no
+ fi
  
- # Whether we need hard or soft links.
- LN_S=$lt_LN_S
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
- # A BSD-compatible nm program.
- NM=$lt_NM
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+ echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
+ if test "$ac_test_FFLAGS" = set; then
+   FFLAGS=$ac_save_FFLAGS
+ elif test $ac_cv_prog_f77_g = yes; then
+   if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+     FFLAGS="-g -O2"
+   else
+     FFLAGS="-g"
+   fi
+ else
+   if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+     FFLAGS="-O2"
+   else
+     FFLAGS=
+   fi
+ fi
  
 -G77=`test $ac_compiler_gnu = yes && echo yes`
 -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
 +# A symbol stripping program
 +STRIP=$lt_STRIP
  
 +# Used to examine libraries when file_magic_cmd begins "file"
 +MAGIC_CMD=$MAGIC_CMD
  
 +# Used on cygwin: DLL creation program.
 +DLLTOOL="$DLLTOOL"
  
 -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
 +# Used on cygwin: object dumper.
 +OBJDUMP="$OBJDUMP"
  
- # Used on cygwin: assembler.
- AS="$AS"
+ # find the maximum length of command line arguments
+ { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+ echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
+ if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+     i=0
+   teststring="ABCD"
  
 -  case $build_os in
 -  msdosdjgpp*)
 -    # On DJGPP, this test can blow up pretty badly due to problems in libc
 -    # (any single argument exceeding 2000 bytes causes a buffer overrun
 -    # during glob expansion).  Even if it were fixed, the result of this
 -    # check would be larger than it should be.
 -    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 -    ;;
 +# The name of the directory that contains temporary libtool files.
 +objdir=$objdir
  
 -  gnu*)
 -    # Under GNU Hurd, this test is not required because there is
 -    # no limit to the length of command line arguments.
 -    # Libtool will interpret -1 as no limit whatsoever
 -    lt_cv_sys_max_cmd_len=-1;
 -    ;;
 +# How to create reloadable object files.
 +reload_flag=$lt_reload_flag
 +reload_cmds=$lt_reload_cmds
  
 -  cygwin* | mingw*)
 -    # On Win9x/ME, this test blows up -- it succeeds, but takes
 -    # about 5 minutes as the teststring grows exponentially.
 -    # Worse, since 9x/ME are not pre-emptively multitasking,
 -    # you end up with a "frozen" computer, even though with patience
 -    # the test eventually succeeds (with a max line length of 256k).
 -    # Instead, let's just punt: use the minimum linelength reported by
 -    # all of the supported platforms: 8192 (on NT/2K/XP).
 -    lt_cv_sys_max_cmd_len=8192;
 -    ;;
 +# How to pass a linker flag through the compiler.
- wl=$lt_lt_prog_compiler_wl
++wl=$lt_lt_prog_compiler_wl_CXX
  
 -  amigaos*)
 -    # On AmigaOS with pdksh, this test takes hours, literally.
 -    # So we just punt and use a minimum line length of 8192.
 -    lt_cv_sys_max_cmd_len=8192;
 -    ;;
 +# Object file suffix (normally "o").
 +objext="$ac_objext"
 +
 +# Old archive suffix (normally "a").
 +libext="$libext"
 +
 +# Shared library suffix (normally ".so").
 +shrext_cmds='$shrext_cmds'
  
- # Executable file suffix (normally "").
- exeext="$exeext"
+   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+     # This has been around since 386BSD, at least.  Likely further.
+     if test -x /sbin/sysctl; then
+       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+     elif test -x /usr/sbin/sysctl; then
+       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+     else
+       lt_cv_sys_max_cmd_len=65536     # usable default for all BSDs
+     fi
+     # And add a safety zone
+     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+     ;;
+   osf*)
+     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+     # nice to cause kernel panics so lets avoid the loop below.
+     # First set a reasonable default.
+     lt_cv_sys_max_cmd_len=16384
+     #
+     if test -x /sbin/sysconfig; then
+       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+         *1*) lt_cv_sys_max_cmd_len=-1 ;;
+       esac
+     fi
+     ;;
+   *)
+     # If test is not a shell built-in, we'll probably end up computing a
+     # maximum length that is only half of the actual maximum length, but
+     # we can't tell.
+     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+              = "XX$teststring") >/dev/null 2>&1 &&
+           new_result=`expr "X$teststring" : ".*" 2>&1` &&
+           lt_cv_sys_max_cmd_len=$new_result &&
+           test $i != 17 # 1/2 MB should be enough
+     do
+       i=`expr $i + 1`
+       teststring=$teststring$teststring
+     done
+     teststring=
+     # Add a significant safety factor because C++ compilers can tack on massive
+     # amounts of additional arguments before passing them to the linker.
+     # It appears as though 1/2 is a usable value.
+     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+     ;;
+   esac
  
 -fi
 +# Additional compiler flags for building library objects.
- pic_flag=$lt_lt_prog_compiler_pic
++pic_flag=$lt_lt_prog_compiler_pic_CXX
 +pic_mode=$pic_mode
  
- # What is the maximum length of a command?
- max_cmd_len=$lt_cv_sys_max_cmd_len
+ if test -n $lt_cv_sys_max_cmd_len ; then
+   { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+ echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: none" >&5
+ echo "${ECHO_T}none" >&6; }
+ fi
  
- compiler_c_o=$lt_lt_cv_prog_compiler_c_o
 +# Does compiler simultaneously support -c and -o options?
++compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
  
 +# Must we lock files when doing compilation?
 +need_locks=$lt_need_locks
  
 +# Do we need the lib prefix for modules?
 +need_lib_prefix=$need_lib_prefix
  
- # Do we need a version for libraries?
- need_version=$need_version
+ # Check for command to grab the raw symbol name followed by C symbol from nm.
+ { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+ echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
+ if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
  
 -# These are sane defaults that work on at least a few old systems.
 -# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 +# Whether dlopen is supported.
 +dlopen_support=$enable_dlopen
  
 -# Character class describing NM global symbol codes.
 -symcode='[BCDEGRST]'
 +# Whether dlopen of programs is supported.
 +dlopen_self=$enable_dlopen_self
  
 -# Regexp to match symbols that can be accessed directly from C.
 -sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
 +# Whether dlopen of statically linked programs is supported.
 +dlopen_self_static=$enable_dlopen_self_static
  
- # Compiler flag to prevent dynamic linking.
- link_static_flag=$lt_lt_prog_compiler_static
+ # Transform an extracted symbol line into a proper C declaration
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  
 -# Transform an extracted symbol line into symbol name and symbol address
 -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 +# Compiler flag to turn off builtin functions.
- no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
++no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
  
- # Compiler flag to allow reflexive dlopens.
- export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+ # Define system-specific variables.
+ case $host_os in
+ aix*)
+   symcode='[BCDT]'
+   ;;
+ cygwin* | mingw* | pw32*)
+   symcode='[ABCDGISTW]'
+   ;;
+ hpux*) # Its linker distinguishes data from code symbols
+   if test "$host_cpu" = ia64; then
+     symcode='[ABCDEGRST]'
+   fi
+   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+   ;;
+ linux*)
+   if test "$host_cpu" = ia64; then
+     symcode='[ABCDGIRSTW]'
+     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+   fi
+   ;;
+ irix* | nonstopux*)
+   symcode='[BCDEGRST]'
+   ;;
+ osf*)
+   symcode='[BCDEGQRST]'
+   ;;
+ solaris* | sysv5*)
+   symcode='[BDRT]'
+   ;;
+ sysv4)
+   symcode='[DFNSTU]'
+   ;;
+ esac
  
 -# Handle CRLF in mingw tool chain
 -opt_cr=
 -case $build_os in
 -mingw*)
 -  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 -  ;;
 -esac
 +# Compiler flag to generate shared objects directly from archives.
- whole_archive_flag_spec=$lt_whole_archive_flag_spec
++whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
  
 -# If we're using GNU nm, then use its standard symbol codes.
 -case `$NM -V 2>&1` in
 -*GNU* | *'with BFD'*)
 -  symcode='[ABCDGIRSTW]' ;;
 -esac
 +# Compiler flag to generate thread-safe objects.
- thread_safe_flag_spec=$lt_thread_safe_flag_spec
++thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
  
 -# Try without a prefix undercore, then with it.
 -for ac_symprfx in "" "_"; do
 +# Library versioning type.
 +version_type=$version_type
  
# Format of library name prefix.
- libname_spec=$lt_libname_spec
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+   symxfrm="\\1 $ac_symprfx\\2 \\2"
  
- # List of archive names.  First name is the real one, the rest are links.
- # The last name is the one that the linker finds with -lNAME.
- library_names_spec=$lt_library_names_spec
+   # Write the raw and C identifiers.
+   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  
 -  # Check to see that the pipe works correctly.
 -  pipe_works=no
 +# The coded name of the library, if different from the real name.
 +soname_spec=$lt_soname_spec
  
 -  rm -f conftest*
 -  cat > conftest.$ac_ext <<EOF
 -#ifdef __cplusplus
 -extern "C" {
 -#endif
 -char nm_test_var;
 -void nm_test_func(){}
 -#ifdef __cplusplus
 -}
 -#endif
 -int main(){nm_test_var='a';nm_test_func();return(0);}
 -EOF
 +# Commands used to build and install an old-style archive.
 +RANLIB=$lt_RANLIB
- old_archive_cmds=$lt_old_archive_cmds
++old_archive_cmds=$lt_old_archive_cmds_CXX
 +old_postinstall_cmds=$lt_old_postinstall_cmds
 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
  
 -  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
 -    # Now try to grab the symbols.
 -    nlist=conftest.nm
 -    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
 -  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
 -  ac_status=$?
 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); } && test -s "$nlist"; then
 -      # Try sorting and uniquifying the output.
 -      if sort "$nlist" | uniq > "$nlist"T; then
 -      mv -f "$nlist"T "$nlist"
 -      else
 -      rm -f "$nlist"T
 -      fi
 +# Create an old-style archive from a shared archive.
- old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
++old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
  
 -      # Make sure that we snagged all the symbols we need.
 -      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 -      if grep ' nm_test_func$' "$nlist" >/dev/null; then
 -        cat <<EOF > conftest.$ac_ext
 -#ifdef __cplusplus
 -extern "C" {
 -#endif
 +# Create a temporary old-style archive to link instead of a shared archive.
- old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
++old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
  
 -EOF
 -        # Now generate the symbol file.
 -        eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 +# Commands used to build and install a shared archive.
- archive_cmds=$lt_archive_cmds
- archive_expsym_cmds=$lt_archive_expsym_cmds
++archive_cmds=$lt_archive_cmds_CXX
++archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
 +postinstall_cmds=$lt_postinstall_cmds
 +postuninstall_cmds=$lt_postuninstall_cmds
  
 -        cat <<EOF >> conftest.$ac_ext
 -#if defined (__STDC__) && __STDC__
 -# define lt_ptr_t void *
 -#else
 -# define lt_ptr_t char *
 -# define const
 -#endif
 +# Commands used to build a loadable module (assumed same as above if empty)
- module_cmds=$lt_module_cmds
- module_expsym_cmds=$lt_module_expsym_cmds
++module_cmds=$lt_module_cmds_CXX
++module_expsym_cmds=$lt_module_expsym_cmds_CXX
  
 -/* The mapping between symbol names and symbols. */
 -const struct {
 -  const char *name;
 -  lt_ptr_t address;
 -}
 -lt_preloaded_symbols[] =
 -{
 -EOF
 -        $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 -        cat <<\EOF >> conftest.$ac_ext
 -  {0, (lt_ptr_t) 0}
 -};
 +# Commands to strip libraries.
 +old_striplib=$lt_old_striplib
 +striplib=$lt_striplib
  
 -#ifdef __cplusplus
 -}
 -#endif
 -EOF
 -        # Now try linking the two files.
 -        mv conftest.$ac_objext conftstm.$ac_objext
 -        lt_save_LIBS="$LIBS"
 -        lt_save_CFLAGS="$CFLAGS"
 -        LIBS="conftstm.$ac_objext"
 -        CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
 -        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); } && test -s conftest${ac_exeext}; then
 -          pipe_works=yes
 -        fi
 -        LIBS="$lt_save_LIBS"
 -        CFLAGS="$lt_save_CFLAGS"
 -      else
 -        echo "cannot find nm_test_func in $nlist" >&5
 -      fi
 -      else
 -      echo "cannot find nm_test_var in $nlist" >&5
 -      fi
 -    else
 -      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
 -    fi
 -  else
 -    echo "$progname: failed program was:" >&5
 -    cat conftest.$ac_ext >&5
 -  fi
 -  rm -f conftest* conftst*
 +# Dependencies to place before the objects being linked to create a
 +# shared library.
- predep_objects=$lt_predep_objects
++predep_objects=$lt_predep_objects_CXX
  
 -  # Do not use the global_symbol_pipe unless it works.
 -  if test "$pipe_works" = yes; then
 -    break
 -  else
 -    lt_cv_sys_global_symbol_pipe=
 -  fi
 -done
 +# Dependencies to place after the objects being linked to create a
 +# shared library.
- postdep_objects=$lt_postdep_objects
++postdep_objects=$lt_postdep_objects_CXX
  
 -fi
 +# Dependencies to place before the objects being linked to create a
 +# shared library.
- predeps=$lt_predeps
++predeps=$lt_predeps_CXX
  
- # Dependencies to place after the objects being linked to create a
- # shared library.
- postdeps=$lt_postdeps
+ if test -z "$lt_cv_sys_global_symbol_pipe"; then
+   lt_cv_sys_global_symbol_to_cdecl=
+ fi
+ if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+   { echo "$as_me:$LINENO: result: failed" >&5
+ echo "${ECHO_T}failed" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: ok" >&5
+ echo "${ECHO_T}ok" >&6; }
+ fi
  
- # The library search path used internally by the compiler when linking
- # a shared library.
- compiler_lib_search_path=$lt_compiler_lib_search_path
+ { echo "$as_me:$LINENO: checking for objdir" >&5
+ echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
+ if test "${lt_cv_objdir+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   rm -f .libs 2>/dev/null
+ mkdir .libs 2>/dev/null
+ if test -d .libs; then
+   lt_cv_objdir=.libs
+ else
+   # MS-DOS does not allow filenames that begin with a dot.
+   lt_cv_objdir=_libs
+ fi
+ rmdir .libs 2>/dev/null
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+ echo "${ECHO_T}$lt_cv_objdir" >&6; }
+ objdir=$lt_cv_objdir
  
 +# Method to check whether dependent libraries are shared objects.
 +deplibs_check_method=$lt_deplibs_check_method
  
 +# Command to use when deplibs_check_method == file_magic.
 +file_magic_cmd=$lt_file_magic_cmd
  
- allow_undefined_flag=$lt_allow_undefined_flag
 +# Flag that allows shared libraries with undefined symbols to be built.
++allow_undefined_flag=$lt_allow_undefined_flag_CXX
  
- no_undefined_flag=$lt_no_undefined_flag
 +# Flag that forces no undefined symbols.
++no_undefined_flag=$lt_no_undefined_flag_CXX
  
 -case $host_os in
 -aix3*)
 -  # AIX sometimes has problems with the GCC collect2 program.  For some
 -  # reason, if we set the COLLECT_NAMES environment variable, the problems
 -  # vanish in a puff of smoke.
 -  if test "X${COLLECT_NAMES+set}" != Xset; then
 -    COLLECT_NAMES=
 -    export COLLECT_NAMES
 -  fi
 -  ;;
 -esac
 +# Commands used to finish a libtool library installation in a directory.
 +finish_cmds=$lt_finish_cmds
  
- # Same as above, but a single script fragment to be evaled but not shown.
- finish_eval=$lt_finish_eval
+ # Sed substitution that helps us do robust quoting.  It backslashifies
+ # metacharacters that are still active within double-quoted strings.
+ Xsed='sed -e 1s/^X//'
+ sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
  
 -# Same as above, but do not quote variable references.
 -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
 +# Take the output of nm and produce a listing of raw symbols and C names.
 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  
 -# Sed substitution to delay expansion of an escaped shell variable in a
 -# double_quote_subst'ed string.
 -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 +# Transform the output of nm in a proper C declaration
 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  
 -# Sed substitution to avoid accidental globbing in evaled expressions
 -no_glob_subst='s/\*/\\\*/g'
 +# Transform the output of nm in a C name address pair
 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  
 -# Constants:
 -rm="rm -f"
 +# This is the shared library runtime path variable.
 +runpath_var=$runpath_var
  
 -# Global variables:
 -default_ofile=libtool
 -can_build_shared=yes
 +# This is the shared library path variable.
 +shlibpath_var=$shlibpath_var
  
- # Is shlibpath searched before the hard-coded library search path?
- shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+ # All known linkers require a `.a' archive for static linking (except MSVC,
+ # which needs '.lib').
+ libext=a
+ ltmain="$ac_aux_dir/ltmain.sh"
+ ofile="$default_ofile"
+ with_gnu_ld="$lt_cv_prog_gnu_ld"
  
- # How to hardcode a shared library path into an executable.
- hardcode_action=$hardcode_action
+ if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$AR"; then
+   ac_cv_prog_AR="$AR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_AR="${ac_tool_prefix}ar"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+ done
+ IFS=$as_save_IFS
  
- # Whether we should hardcode library paths into libraries.
- hardcode_into_libs=$hardcode_into_libs
+ fi
+ fi
+ AR=$ac_cv_prog_AR
+ if test -n "$AR"; then
+   { echo "$as_me:$LINENO: result: $AR" >&5
+ echo "${ECHO_T}$AR" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
- # Flag to hardcode \$libdir into a binary during linking.
- # This must work even if \$libdir does not exist.
- hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
  
- # If ld is used when linking, flag to hardcode \$libdir into
- # a binary during linking. This must work even if \$libdir does
- # not exist.
- hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+ fi
+ if test -z "$ac_cv_prog_AR"; then
+   ac_ct_AR=$AR
+   # Extract the first word of "ar", so it can be a program name with args.
+ set dummy ar; 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_AR+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$ac_ct_AR"; then
+   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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 { 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_AR="ar"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+ done
+ IFS=$as_save_IFS
  
- # Whether we need a single -rpath flag with a separated argument.
- hardcode_libdir_separator=$lt_hardcode_libdir_separator
+ fi
+ fi
+ ac_ct_AR=$ac_cv_prog_ac_ct_AR
+ if test -n "$ac_ct_AR"; then
+   { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+ echo "${ECHO_T}$ac_ct_AR" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   if test "x$ac_ct_AR" = x; then
+     AR="false"
+   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@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@gnu.org." >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     AR=$ac_ct_AR
+   fi
+ else
+   AR="$ac_cv_prog_AR"
+ fi
+ if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$RANLIB"; then
+   ac_cv_prog_RANLIB="$RANLIB" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+ done
+ IFS=$as_save_IFS
+ fi
+ fi
+ RANLIB=$ac_cv_prog_RANLIB
+ if test -n "$RANLIB"; then
+   { echo "$as_me:$LINENO: result: $RANLIB" >&5
+ echo "${ECHO_T}$RANLIB" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+ fi
+ if test -z "$ac_cv_prog_RANLIB"; then
+   ac_ct_RANLIB=$RANLIB
+   # Extract the first word of "ranlib", so it can be a program name with args.
+ set dummy ranlib; 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_RANLIB+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$ac_ct_RANLIB"; then
+   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 { 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_RANLIB="ranlib"
+     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_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+ if test -n "$ac_ct_RANLIB"; then
+   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+ echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   if test "x$ac_ct_RANLIB" = x; then
+     RANLIB=":"
+   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@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@gnu.org." >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     RANLIB=$ac_ct_RANLIB
+   fi
+ else
+   RANLIB="$ac_cv_prog_RANLIB"
+ fi
+ if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$STRIP"; then
+   ac_cv_prog_STRIP="$STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+ done
+ IFS=$as_save_IFS
  
- # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
- # resulting binary.
- hardcode_direct=$hardcode_direct
+ fi
+ fi
+ STRIP=$ac_cv_prog_STRIP
+ if test -n "$STRIP"; then
+   { echo "$as_me:$LINENO: result: $STRIP" >&5
+ echo "${ECHO_T}$STRIP" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
- # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
- # resulting binary.
- hardcode_minus_L=$hardcode_minus_L
  
- # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
- # the resulting binary.
- hardcode_shlibpath_var=$hardcode_shlibpath_var
+ fi
+ if test -z "$ac_cv_prog_STRIP"; then
+   ac_ct_STRIP=$STRIP
+   # Extract the first word of "strip", so it can be a program name with args.
+ set dummy strip; 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_STRIP+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -n "$ac_ct_STRIP"; then
+   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 { 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_STRIP="strip"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+ done
+ IFS=$as_save_IFS
  
- # Set to yes if building a shared library automatically hardcodes DIR into the library
- # and all subsequent libraries and executables linked against it.
- hardcode_automatic=$hardcode_automatic
+ fi
+ fi
+ ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+ if test -n "$ac_ct_STRIP"; then
+   { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+ echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
- # Variables whose values should be saved in libtool wrapper scripts and
- # restored at relink time.
- variables_saved_for_relink="$variables_saved_for_relink"
+   if test "x$ac_ct_STRIP" = x; then
+     STRIP=":"
+   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@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@gnu.org." >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     STRIP=$ac_ct_STRIP
+   fi
+ else
+   STRIP="$ac_cv_prog_STRIP"
+ fi
  
- # Whether libtool must link a program against all its dependency libraries.
- link_all_deplibs=$link_all_deplibs
++# Symbols that must always be exported.
++include_expsyms=$lt_include_expsyms_CXX
  
- # Compile-time system search path for libraries
- sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 -old_CC="$CC"
 -old_CFLAGS="$CFLAGS"
++# ### END LIBTOOL TAG CONFIG: $tagname
  
- # Run-time system search path for libraries
- sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+ # Set sane defaults for various variables
+ test -z "$AR" && AR=ar
+ test -z "$AR_FLAGS" && AR_FLAGS=cru
+ test -z "$AS" && AS=as
+ test -z "$CC" && CC=cc
+ test -z "$LTCC" && LTCC=$CC
+ test -z "$DLLTOOL" && DLLTOOL=dlltool
+ test -z "$LD" && LD=ld
+ test -z "$LN_S" && LN_S="ln -s"
+ test -z "$MAGIC_CMD" && MAGIC_CMD=file
+ test -z "$NM" && NM=nm
+ test -z "$SED" && SED=sed
+ test -z "$OBJDUMP" && OBJDUMP=objdump
+ test -z "$RANLIB" && RANLIB=:
+ test -z "$STRIP" && STRIP=:
+ test -z "$ac_objext" && ac_objext=o
  
- # Fix the shell variable \$srcfile for the compiler.
- fix_srcfile_path="$fix_srcfile_path"
+ # Determine commands to create old-style static archives.
+ old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+ old_postinstall_cmds='chmod 644 $oldlib'
+ old_postuninstall_cmds=
  
- # Set to yes if exported symbols are required.
- always_export_symbols=$always_export_symbols
+ if test -n "$RANLIB"; then
+   case $host_os in
+   openbsd*)
+     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+     ;;
+   *)
+     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+     ;;
+   esac
+   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ fi
  
- # The commands to list exported symbols.
- export_symbols_cmds=$lt_export_symbols_cmds
+ for cc_temp in $compiler""; do
+   case $cc_temp in
+     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+     \-*) ;;
+     *) break;;
+   esac
+ done
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  
- # The commands to extract the exported symbol list from a shared archive.
- extract_expsyms_cmds=$lt_extract_expsyms_cmds
  
- # Symbols that should not be listed in the preloaded symbols.
- exclude_expsyms=$lt_exclude_expsyms
+ # Only perform the check for file, if the check method requires it
+ case $deplibs_check_method in
+ file_magic*)
+   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+     { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+ echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
+ if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $MAGIC_CMD in
+ [\\/*] |  ?:[\\/]*)
+   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+   ;;
+ *)
+   lt_save_MAGIC_CMD="$MAGIC_CMD"
+   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+   for ac_dir in $ac_dummy; do
+     IFS="$lt_save_ifs"
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/${ac_tool_prefix}file; then
+       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+       if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<EOF 1>&2
  
- # Symbols that must always be exported.
- include_expsyms=$lt_include_expsyms
+ *** Warning: the command libtool uses to detect shared libraries,
+ *** $file_magic_cmd, produces output that libtool cannot recognize.
+ *** The result is that libtool may fail to recognize shared libraries
+ *** as such.  This will affect the creation of libtool libraries that
+ *** depend on shared libraries, but programs linked with such libtool
+ *** libraries will work regardless of this problem.  Nevertheless, you
+ *** may want to report the problem to your system manager and/or to
+ *** bug-libtool@gnu.org
  
- # ### END LIBTOOL CONFIG
+ EOF
+         fi ;;
+       esac
+       fi
+       break
+     fi
+   done
+   IFS="$lt_save_ifs"
+   MAGIC_CMD="$lt_save_MAGIC_CMD"
+   ;;
+ esac
+ fi
  
- __EOF__
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if test -n "$MAGIC_CMD"; then
+   { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+ echo "${ECHO_T}$MAGIC_CMD" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
  
+ if test -z "$lt_cv_path_MAGIC_CMD"; then
+   if test -n "$ac_tool_prefix"; then
+     { echo "$as_me:$LINENO: checking for file" >&5
+ echo $ECHO_N "checking for file... $ECHO_C" >&6; }
+ if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $MAGIC_CMD in
+ [\\/*] |  ?:[\\/]*)
+   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+   ;;
+ *)
+   lt_save_MAGIC_CMD="$MAGIC_CMD"
+   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+   for ac_dir in $ac_dummy; do
+     IFS="$lt_save_ifs"
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/file; then
+       lt_cv_path_MAGIC_CMD="$ac_dir/file"
+       if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<EOF 1>&2
  
-   case $host_os in
-   aix3*)
-     cat <<\EOF >> "$cfgfile"
+ *** Warning: the command libtool uses to detect shared libraries,
+ *** $file_magic_cmd, produces output that libtool cannot recognize.
+ *** The result is that libtool may fail to recognize shared libraries
+ *** as such.  This will affect the creation of libtool libraries that
+ *** depend on shared libraries, but programs linked with such libtool
+ *** libraries will work regardless of this problem.  Nevertheless, you
+ *** may want to report the problem to your system manager and/or to
+ *** bug-libtool@gnu.org
  
- # AIX sometimes has problems with the GCC collect2 program.  For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
-   COLLECT_NAMES=
-   export COLLECT_NAMES
- fi
  EOF
-     ;;
-   esac
-   # We use sed instead of cat because bash on DJGPP gets confused if
-   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-   # text mode, it properly converts lines to CR/LF.  This bash problem
-   # is reportedly fixed, but why not run on old versions too?
-   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-   mv -f "$cfgfile" "$ofile" || \
-     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-   chmod +x "$ofile"
+         fi ;;
+       esac
+       fi
+       break
+     fi
+   done
+   IFS="$lt_save_ifs"
+   MAGIC_CMD="$lt_save_MAGIC_CMD"
+   ;;
+ esac
+ fi
  
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if test -n "$MAGIC_CMD"; then
+   { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+ echo "${ECHO_T}$MAGIC_CMD" >&6; }
  else
-   # If there is no Makefile yet, we rely on a make rule to execute
-   # `config.status --recheck' to rerun these tests and create the
-   # libtool script then.
-   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-   if test -f "$ltmain_in"; then
-     test -f Makefile && make "$ltmain"
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+   else
+     MAGIC_CMD=:
    fi
  fi
  
 -  fi
 -  ;;
 -esac
  
 -enable_dlopen=no
 -enable_win32_dll=no
 +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
  
- CC="$lt_save_CC"
- # Check whether --with-tags or --without-tags was given.
- if test "${with_tags+set}" = set; then
-   withval="$with_tags"
-   tagnames="$withval"
- fi;
- if test -f "$ltmain" && test -n "$tagnames"; then
-   if test ! -f "${ofile}"; then
-     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
- echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
-   fi
-   if test -z "$LTCC"; then
-     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-     if test -z "$LTCC"; then
-       { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
- echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
-     else
-       { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
- echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
-     fi
-   fi
-   # Extract list of available tagged configurations in $ofile.
-   # Note that this assumes the entire list is on one line.
-   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-   for tagname in $tagnames; do
-     IFS="$lt_save_ifs"
-     # Check whether tagname contains only valid characters
-     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
-     "") ;;
-     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
- echo "$as_me: error: invalid tag name: $tagname" >&2;}
-    { (exit 1); exit 1; }; }
-       ;;
-     esac
-     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-     then
-       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
- echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
-    { (exit 1); exit 1; }; }
-     fi
-     # Update the list of available tags.
-     if test -n "$tagname"; then
-       echo appending configuration tag \"$tagname\" to $ofile
-       case $tagname in
-       CXX)
-       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-           (test "X$CXX" != "Xg++"))) ; then
-         ac_ext=cc
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ # Check whether --enable-libtool-lock was given.
+ if test "${enable_libtool_lock+set}" = set; then
+   enableval=$enable_libtool_lock;
+ fi
  
+ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  
++      F77)
++      if test -n "$F77" && test "X$F77" != "Xno"; then
  
+ # Check whether --with-pic was given.
+ if test "${with_pic+set}" = set; then
+   withval=$with_pic; pic_mode="$withval"
+ else
+   pic_mode=default
+ fi
  
- archive_cmds_need_lc_CXX=no
- allow_undefined_flag_CXX=
- always_export_symbols_CXX=no
- archive_expsym_cmds_CXX=
- export_dynamic_flag_spec_CXX=
- hardcode_direct_CXX=no
- hardcode_libdir_flag_spec_CXX=
- hardcode_libdir_flag_spec_ld_CXX=
- hardcode_libdir_separator_CXX=
- hardcode_minus_L_CXX=no
- hardcode_automatic_CXX=no
- module_cmds_CXX=
- module_expsym_cmds_CXX=
- link_all_deplibs_CXX=unknown
- old_archive_cmds_CXX=$old_archive_cmds
- no_undefined_flag_CXX=
- whole_archive_flag_spec_CXX=
- enable_shared_with_static_runtimes_CXX=no
+ test -z "$pic_mode" && pic_mode=default
  
- # Dependencies to place before and after the object being linked:
- predep_objects_CXX=
- postdep_objects_CXX=
- predeps_CXX=
- postdeps_CXX=
- compiler_lib_search_path_CXX=
 -# Use C for the default configuration in the libtool script
 -tagname=
 -lt_save_CC="$CC"
 -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
 -
++archive_cmds_need_lc_F77=no
++allow_undefined_flag_F77=
++always_export_symbols_F77=no
++archive_expsym_cmds_F77=
++export_dynamic_flag_spec_F77=
++hardcode_direct_F77=no
++hardcode_libdir_flag_spec_F77=
++hardcode_libdir_flag_spec_ld_F77=
++hardcode_libdir_separator_F77=
++hardcode_minus_L_F77=no
++hardcode_automatic_F77=no
++module_cmds_F77=
++module_expsym_cmds_F77=
++link_all_deplibs_F77=unknown
++old_archive_cmds_F77=$old_archive_cmds
++no_undefined_flag_F77=
++whole_archive_flag_spec_F77=
++enable_shared_with_static_runtimes_F77=no
  
- # Source file extension for C++ test sources.
- ac_ext=cpp
 -# Source file extension for C test sources.
 -ac_ext=c
++# Source file extension for f77 test sources.
++ac_ext=f
  
- # Object file extension for compiled C++ test sources.
 -# Object file extension for compiled C test sources.
++# Object file extension for compiled f77 test sources.
  objext=o
- objext_CXX=$objext
 -objext=$objext
++objext_F77=$objext
  
  # Code to be used in simple compile tests
--lt_simple_compile_test_code="int some_variable = 0;\n"
++lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
  
  # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
 -lt_simple_link_test_code='int main(){return(0);}\n'
++lt_simple_link_test_code="      program t\n      end\n"
  
 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
  
  # If no C compiler was specified, use CC.
  LTCC=${LTCC-"$CC"}
@@@ -28828,1653 -35078,1405 +35902,1416 @@@ _lt_linker_boilerplate=`cat conftest.er
  $rm conftest*
  
  
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-   lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
-   unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
-   lt_cv_path_LD=$lt_cv_path_LDCXX
- else
-   unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- compiler=$CC
- compiler_CXX=$CC
- for cc_temp in $compiler""; do
-   case $cc_temp in
-     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-     \-*) ;;
-     *) break;;
+ #
+ # Check for any special shared library compilation flags.
+ #
+ lt_prog_cc_shlib=
+ if test "$GCC" = no; then
+   case $host_os in
+   sco3.2v5*)
+     lt_prog_cc_shlib='-belf'
+     ;;
    esac
- done
- cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
- # We don't want -fno-exception wen compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
-   lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
- else
-   lt_prog_compiler_no_builtin_flag_CXX=
  fi
+ if test -n "$lt_prog_cc_shlib"; then
  
- if test "$GXX" = yes; then
-   # Set up default GNU C++ configuration
+     { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
+ echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
  
- # Check whether --with-gnu-ld or --without-gnu-ld was given.
- if test "${with_gnu_ld+set}" = set; then
-   withval="$with_gnu_ld"
-   test "$withval" = no || with_gnu_ld=yes
- else
-   with_gnu_ld=no
- fi;
- ac_prog=ld
- if test "$GCC" = yes; then
-   # Check if gcc -print-prog-name=ld gives a path.
-   echo "$as_me:$LINENO: checking for ld used by $CC" >&5
- echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
-   case $host in
-   *-*-mingw*)
-     # gcc leaves a trailing carriage return which upsets mingw
-     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-   *)
-     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-   esac
-   case $ac_prog in
-     # Accept absolute paths.
-     [\\/]* | ?:[\\/]*)
-       re_direlt='/[^/][^/]*/\.\./'
-       # Canonicalize the pathname of ld
-       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
-       done
-       test -z "$LD" && LD="$ac_prog"
-       ;;
-   "")
-     # If it fails, then pretend we aren't using GCC.
-     ac_prog=ld
-     ;;
-   *)
-     # If it is relative, then search for the first ld in PATH.
-     with_gnu_ld=unknown
-     ;;
-   esac
- elif test "$with_gnu_ld" = yes; then
-   echo "$as_me:$LINENO: checking for GNU ld" >&5
- echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
- else
-   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
- echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
- fi
- if test "${lt_cv_path_LD+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -z "$LD"; then
-   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-   for ac_dir in $PATH; do
-     IFS="$lt_save_ifs"
-     test -z "$ac_dir" && ac_dir=.
-     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-       lt_cv_path_LD="$ac_dir/$ac_prog"
-       # Check to see if the program is GNU ld.  I'd rather use --version,
-       # but apparently some variants of GNU ld only accept -v.
-       # Break only if it was the GNU/non-GNU ld that we prefer.
-       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-       *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-       *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-       esac
-     fi
-   done
-   IFS="$lt_save_ifs"
- else
-   lt_cv_path_LD="$LD" # Let the user override the test with a path.
- fi
- fi
  
- LD="$lt_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
- test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
- echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-    { (exit 1); exit 1; }; }
- echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
- echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
- if test "${lt_cv_prog_gnu_ld+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   # I'd rather use --version here, but apparently some GNU lds only accept -v.
- case `$LD -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
-   lt_cv_prog_gnu_ld=yes
-   ;;
- *)
-   lt_cv_prog_gnu_ld=no
-   ;;
- esac
- fi
- echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
- echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
- with_gnu_ld=$lt_cv_prog_gnu_ld
+     cat <<AAW_EOF >>config.warnings
+ \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries
+ AAW_EOF
  
  
+   if echo "$old_CC $old_CFLAGS " | grep "[    ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
+   else
  
-   # Check if GNU C++ uses GNU ld as the underlying linker, since the
-   # archiving commands below assume that GNU ld is being used.
-   if test "$with_gnu_ld" = yes; then
-     archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-     archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
+ echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
  
-     hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-     export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
  
-     # If archive_cmds runs LD, not CC, wlarc should be empty
-     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-     #     investigate it a little bit more. (MM)
-     wlarc='${wl}'
+     cat <<AAW_EOF >>config.warnings
+ add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure
+ AAW_EOF
  
-     # ancient GNU ld didn't support --whole-archive et. al.
-     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-       grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-     else
-       whole_archive_flag_spec_CXX=
-     fi
-   else
-     with_gnu_ld=no
-     wlarc=
  
-     # A generic and very simple default shared library creation
-     # command for GNU C++ for the case where it uses the native
-     # linker, instead of GNU ld.  If possible, this setting should
-     # overridden to take advantage of the native linker features on
-     # the platform it is being used on.
-     archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+     lt_cv_prog_cc_can_build_shared=no
    fi
+ fi
++    case $host_os in
++      aix*)
++      # All AIX code is PIC.
++      if test "$host_cpu" = ia64; then
++      # AIX 5 now supports IA64 processor
++      lt_prog_compiler_static_F77='-Bstatic'
++      fi
++      ;;
  
-   # Commands to make compiler produce verbose output that lists
-   # what "hidden" libraries, object files and flags are used when
-   # linking a shared library.
-   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+ #
+ # Check to make sure the static flag actually works.
+ #
+ { echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
+ echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6; }
+ if test "${lt_prog_compiler_static_works+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_prog_compiler_static_works=no
+    save_LDFLAGS="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
+    printf "$lt_simple_link_test_code" > conftest.$ac_ext
+    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+      # The linker can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+      if test -s conftest.err; then
+        # Append any errors to the config.log.
+        cat conftest.err 1>&5
+        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
+        $SED '/^$/d' conftest.err >conftest.er2
+        if diff conftest.exp conftest.er2 >/dev/null; then
+          lt_prog_compiler_static_works=yes
+        fi
+      else
+        lt_prog_compiler_static_works=yes
+      fi
+    fi
+    $rm conftest*
+    LDFLAGS="$save_LDFLAGS"
  
- else
-   GXX=no
-   with_gnu_ld=no
-   wlarc=
  fi
+ { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+ echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; }
  
- # PORTME: fill in a description of your system's C++ link characteristics
- echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
- echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
- ld_shlibs_CXX=yes
- case $host_os in
-   aix3*)
-     # FIXME: insert proper C++ library support
-     ld_shlibs_CXX=no
-     ;;
-   aix4* | aix5*)
-     if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-     else
-       aix_use_runtimelinking=no
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-       for ld_flag in $LDFLAGS; do
-         case $ld_flag in
-         *-brtl*)
-           aix_use_runtimelinking=yes
-           break
-           ;;
-         esac
-       done
-       esac
 -if test x"$lt_prog_compiler_static_works" = xyes; then
 -    :
 -else
 -    lt_prog_compiler_static=
 -fi
++    mingw* | pw32* | os2*)
++      # This hack is so that the source file can tell whether it is being
++      # built for inclusion in a dll (and should export symbols for example).
++      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
++      ;;
  
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-     fi
++    darwin* | rhapsody*)
++      # PIC is the default on this platform
++      # Common symbols not allowed in MH_DYLIB files
++      lt_prog_compiler_pic_F77='-fno-common'
++      ;;
  
-     # When large executables or shared objects are built, AIX ld can
-     # have problems creating the table of contents.  If linking a library
-     # or program results in "error TOC overflow" add -mminimal-toc to
-     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
++    msdosdjgpp*)
++      # Just because we use GCC doesn't mean we suddenly get shared libraries
++      # on systems that don't support them.
++      lt_prog_compiler_can_build_shared_F77=no
++      enable_shared=no
++      ;;
  
-     archive_cmds_CXX=''
-     hardcode_direct_CXX=yes
-     hardcode_libdir_separator_CXX=':'
-     link_all_deplibs_CXX=yes
 -## CAVEAT EMPTOR:
 -## There is no encapsulation within the following macros, do not change
 -## the running order or otherwise move them around unless you know exactly
 -## what you are doing...
++    sysv4*MP*)
++      if test -d /usr/nec; then
++      lt_prog_compiler_pic_F77=-Kconform_pic
++      fi
++      ;;
  
-     if test "$GXX" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-       collect2name=`${CC} -print-prog-name=collect2`
-       if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-       then
-         # We have reworked collect2
-         hardcode_direct_CXX=yes
-       else
-         # We have old collect2
-         hardcode_direct_CXX=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L_CXX=yes
-         hardcode_libdir_flag_spec_CXX='-L$libdir'
-         hardcode_libdir_separator_CXX=
-       fi
 -lt_prog_compiler_no_builtin_flag=
++    hpux*)
++      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
++      # not for PA HP-UX.
++      case $host_cpu in
++      hppa*64*|ia64*)
++      # +Z the default
++      ;;
++      *)
++      lt_prog_compiler_pic_F77='-fPIC'
++      ;;
 +      esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-       shared_flag="$shared_flag "'${wl}-G'
-       fi
-     else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-       shared_flag='-G'
-       else
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag='${wl}-G'
-       else
-         shared_flag='${wl}-bM:SRE'
-       fi
-       fi
-     fi
++      ;;
  
-     # It seems that -bexpall does not export symbols beginning with
-     # underscore (_), so it is better to generate a list of symbols to export.
-     always_export_symbols_CXX=yes
-     if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag_CXX='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
+ if test "$GCC" = yes; then
+   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
  
- int
- main ()
- {
  
-   ;
-   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_cxx_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
+ { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+ echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="-fno-rtti -fno-exceptions"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    # The option is referenced via a variable to avoid confusing sed.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:35191: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+    echo "$as_me:35195: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
+      $SED '/^$/d' conftest.err >conftest.er2
+      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
+        lt_cv_prog_compiler_rtti_exceptions=yes
+      fi
+    fi
+    $rm conftest*
  
- aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`; fi
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+ echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+ if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+     :
+ fi
  
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
-       hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ lt_prog_compiler_wl=
+ lt_prog_compiler_pic=
+ lt_prog_compiler_static=
+ { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
  
-       archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-      else
+   if test "$GCC" = yes; then
+     lt_prog_compiler_wl='-Wl,'
+     lt_prog_compiler_static='-static'
+     case $host_os in
+       aix*)
+       # All AIX code is PIC.
        if test "$host_cpu" = ia64; then
-       hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
-       allow_undefined_flag_CXX="-z nodefs"
-       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-       else
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static='-Bstatic'
+       fi
+       ;;
  
- int
- main ()
- {
+     amigaos*)
+       # FIXME: we need at least 68020 code to build shared libraries, but
+       # adding the `-m68020' flag to GCC prevents building anything better,
+       # like `-m68040'.
+       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+       ;;
  
-   ;
-   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_cxx_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
+     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
  
- aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`; fi
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+     mingw* | pw32* | os2*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic='-DDLL_EXPORT'
+       ;;
  
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+     darwin* | rhapsody*)
+       # PIC is the default on this platform
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic='-fno-common'
+       ;;
  
-       hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-       # Warning - without using the other run time loading flags,
-       # -berok will link without error, but may produce a broken library.
-       no_undefined_flag_CXX=' ${wl}-bernotok'
-       allow_undefined_flag_CXX=' ${wl}-berok'
-       # -bexpall does not export symbols beginning with underscore (_)
-       always_export_symbols_CXX=yes
-       # Exported symbols can be pulled into shared objects from archives
-       whole_archive_flag_spec_CXX=' '
-       archive_cmds_need_lc_CXX=yes
-       # This is similar to how AIX traditionally builds its shared libraries.
-       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+     msdosdjgpp*)
+       # Just because we use GCC doesn't mean we suddenly get shared libraries
+       # on systems that don't support them.
+       lt_prog_compiler_can_build_shared=no
+       enable_shared=no
+       ;;
+     sysv4*MP*)
+       if test -d /usr/nec; then
+       lt_prog_compiler_pic=-Kconform_pic
        fi
-     fi
-     ;;
-   chorus*)
-     case $cc_basename in
+       ;;
+     hpux*)
+       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+       # not for PA HP-UX.
+       case $host_cpu in
+       hppa*64*|ia64*)
+       # +Z the default
+       ;;
        *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
+       lt_prog_compiler_pic='-fPIC'
        ;;
-     esac
-     ;;
-   cygwin* | mingw* | pw32*)
-     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
-     # as there is no search path for DLLs.
-     hardcode_libdir_flag_spec_CXX='-L$libdir'
-     allow_undefined_flag_CXX=unsupported
-     always_export_symbols_CXX=no
-     enable_shared_with_static_runtimes_CXX=yes
+       esac
+       ;;
  
-     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-       archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-       cp $export_symbols $output_objdir/$soname.def;
+     *)
+       lt_prog_compiler_pic='-fPIC'
+       ;;
+     esac
+   else
+     # PORTME Check for flag to pass linker flags through the system compiler.
+     case $host_os in
+     aix*)
 -      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_wl_F77='-Wl,'
+       if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
 -      lt_prog_compiler_static='-Bstatic'
++      lt_prog_compiler_static_F77='-Bstatic'
        else
-       echo EXPORTS > $output_objdir/$soname.def;
-       cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
-     else
-       ld_shlibs_CXX=no
-     fi
-   ;;
-       darwin* | rhapsody*)
-         case $host_os in
-         rhapsody* | darwin1.[012])
-          allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
-          ;;
-        *) # Darwin 1.3 on
-          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-            allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-          else
-            case ${MACOSX_DEPLOYMENT_TARGET} in
-              10.[012])
-                allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-                ;;
-              10.*)
-                allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
-                ;;
-            esac
-          fi
 -      lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
++      lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+        case $cc_basename in
+          xlc*)
+          lt_prog_compiler_pic='-qnocommon'
+          lt_prog_compiler_wl='-Wl,'
           ;;
-         esac
-       archive_cmds_need_lc_CXX=no
-       hardcode_direct_CXX=no
-       hardcode_automatic_CXX=yes
-       hardcode_shlibpath_var_CXX=unsupported
-       whole_archive_flag_spec_CXX=''
-       link_all_deplibs_CXX=yes
+        esac
+        ;;
  
-     if test "$GXX" = yes ; then
-       lt_int_apple_cc_single_mod=no
-       output_verbose_link_cmd='echo'
-       if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
-        lt_int_apple_cc_single_mod=yes
-       fi
-       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-        archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-       else
-           archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-         fi
-         module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-             archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-           else
-             archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-           fi
-             module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-       else
-       case $cc_basename in
-         xlc*)
-          output_verbose_link_cmd='echo'
-           archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-           module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-           archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-           module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-           ;;
-        *)
-          ld_shlibs_CXX=no
-           ;;
-       esac
-       fi
-         ;;
+     mingw* | pw32* | os2*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
 -      lt_prog_compiler_pic='-DDLL_EXPORT'
++      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+       ;;
  
-   dgux*)
-     case $cc_basename in
-       ec++*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-       ghcx*)
-       # Green Hills C++ Compiler
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
+     hpux9* | hpux10* | hpux11*)
 -      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_wl_F77='-Wl,'
+       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+       # not for PA HP-UX.
+       case $host_cpu in
+       hppa*64*|ia64*)
+       # +Z the default
        ;;
        *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
 -      lt_prog_compiler_pic='+Z'
++      lt_prog_compiler_pic_F77='+Z'
        ;;
-     esac
-     ;;
-   freebsd[12]*)
-     # C++ shared libraries reported to be fairly broken before switch to ELF
-     ld_shlibs_CXX=no
-     ;;
-   freebsd-elf*)
-     archive_cmds_need_lc_CXX=no
-     ;;
-   freebsd* | kfreebsd*-gnu | dragonfly*)
-     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-     # conventions
-     ld_shlibs_CXX=yes
-     ;;
-   gnu*)
-     ;;
-   hpux9*)
-     hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-     hardcode_libdir_separator_CXX=:
-     export_dynamic_flag_spec_CXX='${wl}-E'
-     hardcode_direct_CXX=yes
-     hardcode_minus_L_CXX=yes # Not in the search PATH,
-                               # but as the default
-                               # location of the library.
-     case $cc_basename in
-     CC*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
+       esac
+       # Is there a better lt_prog_compiler_static that works with the bundled CC?
 -      lt_prog_compiler_static='${wl}-a ${wl}archive'
++      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
        ;;
-     aCC*)
-       archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+     irix5* | irix6* | nonstopux*)
 -      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_wl_F77='-Wl,'
+       # PIC (with -KPIC) is the default.
 -      lt_prog_compiler_static='-non_shared'
++      lt_prog_compiler_static_F77='-non_shared'
        ;;
-     *)
-       if test "$GXX" = yes; then
-         archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-       else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
+     newsos6)
 -      lt_prog_compiler_pic='-KPIC'
 -      lt_prog_compiler_static='-Bstatic'
++      lt_prog_compiler_pic_F77='-KPIC'
++      lt_prog_compiler_static_F77='-Bstatic'
        ;;
-     esac
-     ;;
-   hpux10*|hpux11*)
-     if test $with_gnu_ld = no; then
-       case $host_cpu in
-       hppa*64*)
-       hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-       hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
-       hardcode_libdir_separator_CXX=:
+     linux*)
+       case $cc_basename in
+       icc* | ecc*)
 -      lt_prog_compiler_wl='-Wl,'
 -      lt_prog_compiler_pic='-KPIC'
 -      lt_prog_compiler_static='-static'
++      lt_prog_compiler_wl_F77='-Wl,'
++      lt_prog_compiler_pic_F77='-KPIC'
++      lt_prog_compiler_static_F77='-static'
          ;;
-       ia64*)
-       hardcode_libdir_flag_spec_CXX='-L$libdir'
+       pgcc* | pgf77* | pgf90* | pgf95*)
+         # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fpic'
+       lt_prog_compiler_static='-Bstatic'
          ;;
-       *)
-       hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_CXX=:
-       export_dynamic_flag_spec_CXX='${wl}-E'
+       ccc*)
 -        lt_prog_compiler_wl='-Wl,'
++        lt_prog_compiler_wl_F77='-Wl,'
+         # All Alpha code is PIC.
 -        lt_prog_compiler_static='-non_shared'
++        lt_prog_compiler_static_F77='-non_shared'
          ;;
        esac
-     fi
-     case $host_cpu in
-     hppa*64*)
-       hardcode_direct_CXX=no
-       hardcode_shlibpath_var_CXX=no
        ;;
-     ia64*)
-       hardcode_direct_CXX=no
-       hardcode_shlibpath_var_CXX=no
-       hardcode_minus_L_CXX=yes # Not in the search PATH,
-                                             # but as the default
-                                             # location of the library.
+     osf3* | osf4* | osf5*)
 -      lt_prog_compiler_wl='-Wl,'
++      lt_prog_compiler_wl_F77='-Wl,'
+       # All OSF/1 code is PIC.
 -      lt_prog_compiler_static='-non_shared'
++      lt_prog_compiler_static_F77='-non_shared'
        ;;
-     *)
-       hardcode_direct_CXX=yes
-       hardcode_minus_L_CXX=yes # Not in the search PATH,
-                                             # but as the default
-                                             # location of the library.
+     sco3.2v5*)
 -      lt_prog_compiler_pic='-Kpic'
 -      lt_prog_compiler_static='-dn'
++      lt_prog_compiler_pic_F77='-Kpic'
++      lt_prog_compiler_static_F77='-dn'
        ;;
-     esac
  
-     case $cc_basename in
-       CC*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-       aCC*)
-       case $host_cpu in
-       hppa*64*|ia64*)
-         archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-         ;;
-       *)
-         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       esac
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
+     solaris*)
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-Bstatic'
+       case $cc_basename in
+       f77* | f90* | f95*)
+       lt_prog_compiler_wl='-Qoption ld ';;
        *)
-       if test "$GXX" = yes; then
-         if test $with_gnu_ld = no; then
-           case $host_cpu in
-           ia64*|hppa*64*)
-             archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-             ;;
-           *)
-             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           esac
-         fi
-       else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
-       ;;
-     esac
-     ;;
-   irix5* | irix6*)
-     case $cc_basename in
-       CC*)
-       # SGI C++
-       archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       lt_prog_compiler_wl='-Wl,';;
+       esac
+       ;;
  
-       # Archives containing C++ object files must be created using
-       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
-       ;;
-       *)
-       if test "$GXX" = yes; then
-         if test "$with_gnu_ld" = no; then
-           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-         else
-           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
-         fi
-       fi
-       link_all_deplibs_CXX=yes
-       ;;
+     sunos4*)
 -      lt_prog_compiler_wl='-Qoption ld '
 -      lt_prog_compiler_pic='-PIC'
 -      lt_prog_compiler_static='-Bstatic'
++      lt_prog_compiler_wl_F77='-Qoption ld '
++      lt_prog_compiler_pic_F77='-PIC'
++      lt_prog_compiler_static_F77='-Bstatic'
+       ;;
+     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 -      lt_prog_compiler_wl='-Wl,'
 -      lt_prog_compiler_pic='-KPIC'
 -      lt_prog_compiler_static='-Bstatic'
++      lt_prog_compiler_wl_F77='-Wl,'
++      lt_prog_compiler_pic_F77='-KPIC'
++      lt_prog_compiler_static_F77='-Bstatic'
+       ;;
+     sysv4*MP*)
+       if test -d /usr/nec ;then
 -      lt_prog_compiler_pic='-Kconform_pic'
 -      lt_prog_compiler_static='-Bstatic'
++      lt_prog_compiler_pic_F77='-Kconform_pic'
++      lt_prog_compiler_static_F77='-Bstatic'
+       fi
+       ;;
+     unicos*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_can_build_shared=no
+       ;;
+     uts4*)
 -      lt_prog_compiler_pic='-pic'
 -      lt_prog_compiler_static='-Bstatic'
++      lt_prog_compiler_pic_F77='-pic'
++      lt_prog_compiler_static_F77='-Bstatic'
+       ;;
+     *)
 -      lt_prog_compiler_can_build_shared=no
++      lt_prog_compiler_can_build_shared_F77=no
+       ;;
      esac
-     hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-     hardcode_libdir_separator_CXX=:
-     ;;
-   linux*)
-     case $cc_basename in
-       KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
+   fi
  
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-       archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+ echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
  
-       hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
-       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ #
+ # Check to make sure the PIC flag actually works.
+ #
 -if test -n "$lt_prog_compiler_pic"; then
++if test -n "$lt_prog_compiler_pic_F77"; then
  
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
-       ;;
-       icpc*)
-       # Intel C++
-       with_gnu_ld=yes
-       # version 8.0 and above of icpc choke on multiply defined symbols
-       # if we add $predep_objects and $postdep_objects, however 7.1 and
-       # earlier do not add the objects themselves.
-       case `$CC -V 2>&1` in
-       *"Version 7."*)
-         archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       *)  # Version 8.0 or newer
-         tmp_idyn=
-         case $host_cpu in
-           ia64*) tmp_idyn=' -i_dynamic';;
-         esac
-         archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       esac
-       archive_cmds_need_lc_CXX=no
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-       whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-       ;;
-       pgCC*)
-         # Portland Group C++ compiler
-       archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-       archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+ echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
+ if test "${lt_prog_compiler_pic_works+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
 -  lt_prog_compiler_pic_works=no
++  lt_prog_compiler_pic_works_F77=no
+   ac_outfile=conftest.$ac_objext
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 -   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
++   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    # The option is referenced via a variable to avoid confusing sed.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:35453: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+    echo "$as_me:35457: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
+      $SED '/^$/d' conftest.err >conftest.er2
+      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
+        lt_prog_compiler_pic_works=yes
+      fi
+    fi
+    $rm conftest*
  
-       hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-       whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         ;;
-       cxx*)
-       # Compaq C++
-       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+ fi
+ { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+ echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; }
  
-       runpath_var=LD_RUN_PATH
-       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-       hardcode_libdir_separator_CXX=:
 -if test x"$lt_prog_compiler_pic_works" = xyes; then
 -    case $lt_prog_compiler_pic in
++if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
++    case $lt_prog_compiler_pic_F77 in
+      "" | " "*) ;;
 -     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
++     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+      esac
+ else
 -    lt_prog_compiler_pic=
 -     lt_prog_compiler_can_build_shared=no
++    lt_prog_compiler_pic_F77=
++     lt_prog_compiler_can_build_shared_F77=no
+ fi
  
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-     esac
-     ;;
-   lynxos*)
-     # FIXME: insert proper C++ library support
-     ld_shlibs_CXX=no
-     ;;
-   m88k*)
-     # FIXME: insert proper C++ library support
-     ld_shlibs_CXX=no
-     ;;
-   mvs*)
-     case $cc_basename in
-       cxx*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-       *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-     esac
-     ;;
-   netbsd*)
-     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-       wlarc=
-       hardcode_libdir_flag_spec_CXX='-R$libdir'
-       hardcode_direct_CXX=yes
-       hardcode_shlibpath_var_CXX=no
-     fi
-     # Workaround some broken pre-1.5 toolchains
-     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-     ;;
-   openbsd2*)
-     # C++ shared libraries are fairly broken
-     ld_shlibs_CXX=no
+ fi
+ case $host_os in
+   # For platforms which do not support PIC, -DPIC is meaningless:
+   *djgpp*)
 -    lt_prog_compiler_pic=
++    lt_prog_compiler_pic_F77=
      ;;
-   openbsd*)
-     hardcode_direct_CXX=yes
-     hardcode_shlibpath_var_CXX=no
-     archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-     hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-       export_dynamic_flag_spec_CXX='${wl}-E'
-       whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-     fi
-     output_verbose_link_cmd='echo'
+   *)
 -    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
++    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
      ;;
-   osf3*)
-     case $cc_basename in
-       KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
+ esac
  
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+ echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+ if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
 -  lt_cv_prog_compiler_c_o=no
++  lt_cv_prog_compiler_c_o_F77=no
+    $rm -r conftest 2>/dev/null
+    mkdir conftest
+    cd conftest
+    mkdir out
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       hardcode_libdir_separator_CXX=:
+    lt_compiler_flag="-o out/conftest2.$ac_objext"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:35515: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+    echo "$as_me:35519: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
+      $SED '/^$/d' out/conftest.err >out/conftest.er2
+      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+        lt_cv_prog_compiler_c_o=yes
+      fi
+    fi
+    chmod u+w . 2>&5
+    $rm conftest*
+    # SGI C++ compiler will create directory out/ii_files/ for
+    # template instantiation
+    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+    $rm out/* && rmdir out
+    cd ..
+    rmdir conftest
+    $rm conftest*
  
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+ echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
  
-       ;;
-       RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-       cxx*)
-       allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator_CXX=:
+ hard_links="nottested"
 -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
++if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+   # do not overwrite the value of need_locks provided by the user
+   { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+ echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+   hard_links=yes
+   $rm conftest*
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   touch conftest.a
+   ln conftest.a conftest.b 2>&5 || hard_links=no
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   { echo "$as_me:$LINENO: result: $hard_links" >&5
+ echo "${ECHO_T}$hard_links" >&6; }
+   if test "$hard_links" = no; then
  
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-       *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-         archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+ echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
  
-         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-         hardcode_libdir_separator_CXX=:
  
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+     cat <<AAW_EOF >>config.warnings
+ \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
+ AAW_EOF
  
-       else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
-       ;;
+     need_locks=warn
+   fi
+ else
+   need_locks=no
+ fi
+ { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+   runpath_var=
 -  allow_undefined_flag=
 -  enable_shared_with_static_runtimes=no
 -  archive_cmds=
 -  archive_expsym_cmds=
 -  old_archive_From_new_cmds=
 -  old_archive_from_expsyms_cmds=
 -  export_dynamic_flag_spec=
 -  whole_archive_flag_spec=
 -  thread_safe_flag_spec=
 -  hardcode_libdir_flag_spec=
 -  hardcode_libdir_flag_spec_ld=
 -  hardcode_libdir_separator=
 -  hardcode_direct=no
 -  hardcode_minus_L=no
 -  hardcode_shlibpath_var=unsupported
 -  link_all_deplibs=unknown
 -  hardcode_automatic=no
 -  module_cmds=
 -  module_expsym_cmds=
 -  always_export_symbols=no
 -  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
++  allow_undefined_flag_F77=
++  enable_shared_with_static_runtimes_F77=no
++  archive_cmds_F77=
++  archive_expsym_cmds_F77=
++  old_archive_From_new_cmds_F77=
++  old_archive_from_expsyms_cmds_F77=
++  export_dynamic_flag_spec_F77=
++  whole_archive_flag_spec_F77=
++  thread_safe_flag_spec_F77=
++  hardcode_libdir_flag_spec_F77=
++  hardcode_libdir_flag_spec_ld_F77=
++  hardcode_libdir_separator_F77=
++  hardcode_direct_F77=no
++  hardcode_minus_L_F77=no
++  hardcode_shlibpath_var_F77=unsupported
++  link_all_deplibs_F77=unknown
++  hardcode_automatic_F77=no
++  module_cmds_F77=
++  module_expsym_cmds_F77=
++  always_export_symbols_F77=no
++  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   # include_expsyms should be a list of space-separated symbols to be *always*
+   # included in the symbol list
 -  include_expsyms=
++  include_expsyms_F77=
+   # exclude_expsyms can be an extended regexp of symbols to exclude
+   # it will be wrapped by ` (' and `)$', so one must not match beginning or
+   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+   # as well as any symbol that contains `d'.
 -  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
++  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
+   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+   # platforms (ab)use it in PIC code, but their linkers get confused if
+   # the symbol is explicitly referenced.  Since portable code cannot
+   # rely on this symbol name, it's probably fine to never include it in
+   # preloaded symbol tables.
+   extract_expsyms_cmds=
+   # Just being paranoid about ensuring that cc_basename is set.
+   for cc_temp in $compiler""; do
+   case $cc_temp in
+     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+     \-*) ;;
+     *) break;;
+   esac
+ done
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+   case $host_os in
+   cygwin* | mingw* | pw32*)
+     # FIXME: the MSVC++ port hasn't been tested in a loooong time
+     # When not using gcc, we currently assume that we are using
+     # Microsoft Visual C++.
+     if test "$GCC" != yes; then
+       with_gnu_ld=no
+     fi
+     ;;
+   openbsd*)
+     with_gnu_ld=no
+     ;;
+   esac
 -  ld_shlibs=yes
++  ld_shlibs_F77=yes
+   if test "$with_gnu_ld" = yes; then
+     # If archive_cmds runs LD, not CC, wlarc should be empty
+     wlarc='${wl}'
+     # Set some defaults for GNU ld with shared library support. These
+     # are reset later if shared libraries are not supported. Putting them
+     # here allows them to be overridden if necessary.
+     runpath_var=LD_RUN_PATH
+     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+     export_dynamic_flag_spec='${wl}--export-dynamic'
+     # ancient GNU ld didn't support --whole-archive et. al.
+     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+       else
+       whole_archive_flag_spec=
+     fi
+     supports_anon_versioning=no
+     case `$LD -v 2>/dev/null` in
+       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+       *\ 2.11.*) ;; # other 2.11 versions
+       *) supports_anon_versioning=yes ;;
      esac
-     ;;
-   osf4* | osf5*)
-     case $cc_basename in
-       KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
  
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+     # See if GNU ld supports shared libraries.
+     case $host_os in
+     aix3* | aix4* | aix5*)
+       # On AIX/PPC, the GNU linker is very broken
+       if test "$host_cpu" != ia64; then
 -      ld_shlibs=no
++      ld_shlibs_F77=no
+       cat <<EOF 1>&2
  
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       hardcode_libdir_separator_CXX=:
+ *** Warning: the GNU linker, at least up to release 2.9.1, is reported
+ *** to be unable to reliably create shared libraries on AIX.
+ *** Therefore, libtool is disabling shared libraries support.  If you
+ *** really care for shared libraries, you may want to modify your PATH
+ *** so that a non-GNU linker is found, and then restart.
  
-       # Archives containing C++ object files must be created using
-       # the KAI C++ compiler.
-       old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
-       ;;
-       RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-       cxx*)
-       allow_undefined_flag_CXX=' -expect_unresolved \*'
-       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-         echo "-hidden">> $lib.exp~
-         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
-         $rm $lib.exp'
+ EOF
+       fi
+       ;;
  
-       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-       hardcode_libdir_separator_CXX=:
+     amigaos*)
 -      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 -      hardcode_libdir_flag_spec='-L$libdir'
 -      hardcode_minus_L=yes
++      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
++      hardcode_libdir_flag_spec_F77='-L$libdir'
++      hardcode_minus_L_F77=yes
  
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-       *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-        archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+       # that the semantics of dynamic libraries on AmigaOS, at least up
+       # to version 4, is to share data among multiple programs linked
+       # with the same dynamic library.  Since this doesn't match the
+       # behavior of shared libraries on other platforms, we can't use
+       # them.
 -      ld_shlibs=no
++      ld_shlibs_F77=no
+       ;;
  
-         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-         hardcode_libdir_separator_CXX=:
+     beos*)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 -      allow_undefined_flag=unsupported
++      allow_undefined_flag_F77=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
 -      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       else
 -      ld_shlibs=no
++      ld_shlibs_F77=no
+       fi
+       ;;
  
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+     cygwin* | mingw* | pw32*)
 -      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
++      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+       # as there is no search path for DLLs.
+       hardcode_libdir_flag_spec='-L$libdir'
+       allow_undefined_flag=unsupported
+       always_export_symbols=no
+       enable_shared_with_static_runtimes=yes
+       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
  
 -        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 -      archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
++        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
++      archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
        else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
-       ;;
-     esac
-     ;;
-   psos*)
-     # FIXME: insert proper C++ library support
-     ld_shlibs_CXX=no
-     ;;
-   sco*)
-     archive_cmds_need_lc_CXX=no
-     case $cc_basename in
-       CC*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-       *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-     esac
-     ;;
-   sunos4*)
-     case $cc_basename in
-       CC*)
-       # Sun C++ 4.x
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-       lcc*)
-       # Lucid
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-       *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-     esac
-     ;;
-   solaris*)
-     case $cc_basename in
-       CC*)
-       # Sun C++ 4.2, 5.x and Centerline C++
-         archive_cmds_need_lc_CXX=yes
-       no_undefined_flag_CXX=' -zdefs'
-       archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-       archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+       else
 -      ld_shlibs=no
++      ld_shlibs_F77=no
+       fi
+       ;;
  
-       hardcode_libdir_flag_spec_CXX='-R$libdir'
-       hardcode_shlibpath_var_CXX=no
-       case $host_os in
-         solaris2.[0-5] | solaris2.[0-5].*) ;;
-         *)
-           # The C++ compiler is used as linker so we must use $wl
-           # flag to pass the commands to the underlying system
-           # linker. We must also pass each convience library through
-           # to the system linker between allextract/defaultextract.
-           # The C++ compiler will combine linker options so we
-           # cannot just pass the convience library names through
-           # without $wl.
-           # Supported since Solaris 2.6 (maybe 2.5.1?)
-           whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
-           ;;
+     linux*)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       tmp_addflag=
+       case $cc_basename,$host_cpu in
+       pgcc*)                          # Portland Group C compiler
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
        esac
-       link_all_deplibs_CXX=yes
-       output_verbose_link_cmd='echo'
-       # Archives containing C++ object files must be created using
-       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
-       ;;
-       gcx*)
-       # Green Hills C++ Compiler
-       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-       # The C++ compiler must be used to create the archive.
-       old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-       ;;
-       *)
-       # GNU C++ compiler with Solaris linker
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
-         if $CC --version | grep -v '^2\.7' > /dev/null; then
-           archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         else
-           # g++ 2.7 appears to require `-G' NOT `-shared' on this
-           # platform.
-           archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         fi
+       archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  
-         hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+       if test $supports_anon_versioning = yes; then
+         archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+   $echo "local: *; };" >> $output_objdir/$libname.ver~
+         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
        fi
-       ;;
-     esac
-     ;;
-   sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
-     archive_cmds_need_lc_CXX=no
-     ;;
-   tandem*)
-     case $cc_basename in
-       NCC*)
-       # NonStop-UX NCC 3.20
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-       *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-     esac
-     ;;
-   vxworks*)
-     # FIXME: insert proper C++ library support
-     ld_shlibs_CXX=no
-     ;;
-   *)
-     # FIXME: insert proper C++ library support
-     ld_shlibs_CXX=no
-     ;;
- esac
- echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
- echo "${ECHO_T}$ld_shlibs_CXX" >&6
- test "$ld_shlibs_CXX" = no && can_build_shared=no
+       else
+       ld_shlibs=no
+       fi
+       ;;
  
- GCC_CXX="$GXX"
- LD_CXX="$LD"
+     netbsd*)
+       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 -      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
++      archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+       else
 -      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       fi
+       ;;
  
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
+     solaris* | sysv5*)
+       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 -      ld_shlibs=no
++      ld_shlibs_F77=no
+       cat <<EOF 1>&2
+ *** Warning: The releases 2.8.* of the GNU linker cannot reliably
+ *** create shared libraries on Solaris systems.  Therefore, libtool
+ *** is disabling shared libraries support.  We urge you to upgrade GNU
+ *** binutils to release 2.9.1 or newer.  Another option is to modify
+ *** your PATH or compiler configuration so that the native linker is
+ *** used, and then restart.
  
- cat > conftest.$ac_ext <<EOF
- class Foo
- {
- public:
-   Foo (void) { a = 0; }
- private:
-   int a;
- };
  EOF
 -      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 -      ld_shlibs=no
++      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
++      ld_shlibs_F77=no
+       fi
+       ;;
  
- 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
-   # Parse the compiler output and extract the necessary
-   # objects, libraries and library flags.
+     sunos4*)
 -      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+       wlarc=
 -      hardcode_direct=yes
 -      hardcode_shlibpath_var=no
++      hardcode_direct_F77=yes
++      hardcode_shlibpath_var_F77=no
+       ;;
  
-   # Sentinel used to keep track of whether or not we are before
-   # the conftest object file.
-   pre_test_object_deps_done=no
+     *)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 -      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
 -      ld_shlibs=no
++      ld_shlibs_F77=no
+       fi
+       ;;
+     esac
  
-   # The `*' in the case matches for architectures that use `case' in
-   # $output_verbose_cmd can trigger glob expansion during the loop
-   # eval without this substitution.
-   output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+     if test "$ld_shlibs" = no; then
+       runpath_var=
+       hardcode_libdir_flag_spec=
+       export_dynamic_flag_spec=
+       whole_archive_flag_spec=
+     fi
+   else
+     # PORTME fill in a description of your system's linker (not GNU ld)
+     case $host_os in
+     aix3*)
 -      allow_undefined_flag=unsupported
 -      always_export_symbols=yes
 -      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
++      allow_undefined_flag_F77=unsupported
++      always_export_symbols_F77=yes
++      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+       # Note: this linker hardcodes the directories in LIBPATH if there
+       # are no directories specified by -L.
 -      hardcode_minus_L=yes
++      hardcode_minus_L_F77=yes
+       if test "$GCC" = yes && test -z "$link_static_flag"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
 -      hardcode_direct=unsupported
++      hardcode_direct_F77=unsupported
+       fi
+       ;;
  
-   for p in `eval $output_verbose_link_cmd`; do
-     case $p in
+     aix4* | aix5*)
+       if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+       aix_use_runtimelinking=no
+       exp_sym_flag='-Bexport'
+       no_entry_flag=""
+       else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 -        export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++        export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       else
 -        export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
++        export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       fi
+       aix_use_runtimelinking=no
  
-     -L* | -R* | -l*)
-        # Some compilers place space between "-{L,R}" and the path.
-        # Remove the space.
-        if test $p = "-L" \
-         || test $p = "-R"; then
-        prev=$p
-        continue
-        else
-        prev=
-        fi
+       # Test if we are trying to use run time linking or normal
+       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+       # need to do runtime linking.
+       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         done
+       esac
  
-        if test "$pre_test_object_deps_done" = no; then
-        case $p in
-        -L* | -R*)
-          # Internal compiler library paths should come after those
-          # provided the user.  The postdeps already come after the
-          # user supplied libs so there is no need to process them.
-          if test -z "$compiler_lib_search_path_CXX"; then
-            compiler_lib_search_path_CXX="${prev}${p}"
-          else
-            compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
-          fi
-          ;;
-        # The "-l" case would never come before the object being
-        # linked, so don't bother handling this case.
-        esac
-        else
-        if test -z "$postdeps_CXX"; then
-          postdeps_CXX="${prev}${p}"
-        else
-          postdeps_CXX="${postdeps_CXX} ${prev}${p}"
-        fi
-        fi
-        ;;
+       exp_sym_flag='-bexport'
+       no_entry_flag='-bnoentry'
+       fi
  
-     *.$objext)
-        # This assumes that the test object file only shows up
-        # once in the compiler output.
-        if test "$p" = "conftest.$objext"; then
-        pre_test_object_deps_done=yes
-        continue
-        fi
+       # When large executables or shared objects are built, AIX ld can
+       # have problems creating the table of contents.  If linking a library
+       # or program results in "error TOC overflow" add -mminimal-toc to
+       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  
-        if test "$pre_test_object_deps_done" = no; then
-        if test -z "$predep_objects_CXX"; then
-          predep_objects_CXX="$p"
-        else
-          predep_objects_CXX="$predep_objects_CXX $p"
-        fi
-        else
-        if test -z "$postdep_objects_CXX"; then
-          postdep_objects_CXX="$p"
-        else
-          postdep_objects_CXX="$postdep_objects_CXX $p"
-        fi
-        fi
-        ;;
 -      archive_cmds=''
 -      hardcode_direct=yes
 -      hardcode_libdir_separator=':'
 -      link_all_deplibs=yes
++      archive_cmds_F77=''
++      hardcode_direct_F77=yes
++      hardcode_libdir_separator_F77=':'
++      link_all_deplibs_F77=yes
  
-     *) ;; # Ignore the rest.
+       if test "$GCC" = yes; then
+       case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
 -        hardcode_direct=yes
++        hardcode_direct_F77=yes
+         else
+         # We have old collect2
 -        hardcode_direct=unsupported
++        hardcode_direct_F77=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
 -        hardcode_minus_L=yes
 -        hardcode_libdir_flag_spec='-L$libdir'
 -        hardcode_libdir_separator=
++        hardcode_minus_L_F77=yes
++        hardcode_libdir_flag_spec_F77='-L$libdir'
++        hardcode_libdir_separator_F77=
+         fi
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+       else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+       if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+       fi
+       fi
+       fi
+       # It seems that -bexpall does not export symbols beginning with
+       # underscore (_), so it is better to generate a list of symbols to export.
 -      always_export_symbols=yes
++      always_export_symbols_F77=yes
+       if test "$aix_use_runtimelinking" = yes; then
+       # Warning - without using the other runtime loading flags (-brtl),
+       # -berok will link without error, but may produce a broken library.
 -      allow_undefined_flag='-berok'
++      allow_undefined_flag_F77='-berok'
+        # Determine the default libpath from the value encoded in an empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -
 -int
 -main ()
 -{
++      program main
  
-     esac
-   done
 -  ;
 -  return 0;
 -}
++      end
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
  
-   # Clean up.
-   rm -f a.out a.exe
+ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+ }'`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+ }'`; fi
  else
-   echo "libtool.m4: error: problem compiling CXX test program"
- fi
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- $rm -f confest.$objext
  
- # PORTME: override above test on systems where it is broken
- case $host_os in
- solaris*)
-   case $cc_basename in
-   CC*)
-     # Adding this requires a known-good setup of shared libraries for
-     # Sun compiler versions before 5.6, else PIC objects from an old
-     # archive will be linked into the output, leading to subtle bugs.
-     postdeps_CXX='-lCstd -lCrun'
-     ;;
-   esac
- esac
+ fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
- case " $postdeps_CXX " in
- *" -lc "*) archive_cmds_need_lc_CXX=no ;;
 -       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
 -      archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
++       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
++      archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+       if test "$host_cpu" = ia64; then
 -        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
 -        allow_undefined_flag="-z nodefs"
 -        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
++        hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
++        allow_undefined_flag_F77="-z nodefs"
++        archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -
 -int
 -main ()
 -{
++      program main
 -  ;
 -  return 0;
 -}
++      end
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
  
- lt_prog_compiler_wl_CXX=
- lt_prog_compiler_pic_CXX=
- lt_prog_compiler_static_CXX=
+ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+ }'`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+ }'`; fi
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
- echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
  
-   # C++ specific cases for pic, static, wl, etc.
-   if test "$GXX" = yes; then
-     lt_prog_compiler_wl_CXX='-Wl,'
-     lt_prog_compiler_static_CXX='-static'
+ fi
  
-     case $host_os in
-     aix*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_CXX='-Bstatic'
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 -       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
++       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
 -        no_undefined_flag=' ${wl}-bernotok'
 -        allow_undefined_flag=' ${wl}-berok'
++        no_undefined_flag_F77=' ${wl}-bernotok'
++        allow_undefined_flag_F77=' ${wl}-berok'
+         # -bexpall does not export symbols beginning with underscore (_)
 -        always_export_symbols=yes
++        always_export_symbols_F77=yes
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec=' '
+         archive_cmds_need_lc=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
        fi
        ;;
      amigaos*)
-       # FIXME: we need at least 68020 code to build shared libraries, but
-       # adding the `-m68020' flag to GCC prevents building anything better,
-       # like `-m68040'.
-       lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
 -      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 -      hardcode_libdir_flag_spec='-L$libdir'
 -      hardcode_minus_L=yes
++      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
++      hardcode_libdir_flag_spec_F77='-L$libdir'
++      hardcode_minus_L_F77=yes
+       # see comment about different semantics on the GNU ld section
 -      ld_shlibs=no
++      ld_shlibs_F77=no
        ;;
-     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-       # PIC is the default for these OSes.
+     bsdi[45]*)
+       export_dynamic_flag_spec=-rdynamic
        ;;
-     mingw* | os2* | pw32*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+     cygwin* | mingw* | pw32*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+       # no search path for DLLs.
 -      hardcode_libdir_flag_spec=' '
 -      allow_undefined_flag=unsupported
++      hardcode_libdir_flag_spec_F77=' '
++      allow_undefined_flag_F77=unsupported
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
 -      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
++      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+       # The linker will automatically build a .lib file if we build a DLL.
 -      old_archive_From_new_cmds='true'
++      old_archive_From_new_cmds_F77='true'
+       # FIXME: Should let the user specify the lib program.
 -      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
 -      fix_srcfile_path='`cygpath -w "$srcfile"`'
 -      enable_shared_with_static_runtimes=yes
++      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
++      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
++      enable_shared_with_static_runtimes_F77=yes
        ;;
      darwin* | rhapsody*)
-       # PIC is the default on this platform
-       # Common symbols not allowed in MH_DYLIB files
-       lt_prog_compiler_pic_CXX='-fno-common'
+       case $host_os in
+         rhapsody* | darwin1.[012])
+          allow_undefined_flag='${wl}-undefined ${wl}suppress'
+          ;;
+        *) # Darwin 1.3 on
+          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+          else
+            case ${MACOSX_DEPLOYMENT_TARGET} in
+              10.[012])
+                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+                ;;
+              10.*)
+                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+                ;;
+            esac
+          fi
+          ;;
+       esac
+       archive_cmds_need_lc=no
+       hardcode_direct=no
+       hardcode_automatic=yes
+       hardcode_shlibpath_var=unsupported
+       whole_archive_flag_spec=''
+       link_all_deplibs=yes
+     if test "$GCC" = yes ; then
+       output_verbose_link_cmd='echo'
+         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+       archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+       module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+     else
+       case $cc_basename in
+         xlc*)
+          output_verbose_link_cmd='echo'
+          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           ;;
+        *)
+          ld_shlibs=no
+           ;;
+       esac
+     fi
        ;;
-     *djgpp*)
-       # DJGPP does not support shared libraries at all
-       lt_prog_compiler_pic_CXX=
+     dgux*)
 -      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_libdir_flag_spec='-L$libdir'
 -      hardcode_shlibpath_var=no
++      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_libdir_flag_spec_F77='-L$libdir'
++      hardcode_shlibpath_var_F77=no
        ;;
-     sysv4*MP*)
-       if test -d /usr/nec; then
-       lt_prog_compiler_pic_CXX=-Kconform_pic
-       fi
+     freebsd1*)
 -      ld_shlibs=no
++      ld_shlibs_F77=no
        ;;
-     hpux*)
-       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-       # not for PA HP-UX.
-       case $host_cpu in
-       hppa*64*|ia64*)
-       ;;
-       *)
-       lt_prog_compiler_pic_CXX='-fPIC'
-       ;;
-       esac
+     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+     # support.  Future versions do this automatically, but an explicit c++rt0.o
+     # does not break anything, and helps significantly (at the cost of a little
+     # extra space).
+     freebsd2.2*)
 -      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 -      hardcode_libdir_flag_spec='-R$libdir'
 -      hardcode_direct=yes
 -      hardcode_shlibpath_var=no
++      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
++      hardcode_libdir_flag_spec_F77='-R$libdir'
++      hardcode_direct_F77=yes
++      hardcode_shlibpath_var_F77=no
        ;;
-     *)
-       lt_prog_compiler_pic_CXX='-fPIC'
+     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+     freebsd2*)
 -      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_direct=yes
 -      hardcode_minus_L=yes
 -      hardcode_shlibpath_var=no
++      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_direct_F77=yes
++      hardcode_minus_L_F77=yes
++      hardcode_shlibpath_var_F77=no
        ;;
-     esac
-   else
-     case $host_os in
-       aix4* | aix5*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-         # AIX 5 now supports IA64 processor
-         lt_prog_compiler_static_CXX='-Bstatic'
-       else
-         lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-       chorus*)
-       case $cc_basename in
-       cxch68*)
-         # Green Hills C++ Compiler
-         # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+     freebsd* | kfreebsd*-gnu | dragonfly*)
+       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec='-R$libdir'
+       hardcode_direct=yes
+       hardcode_shlibpath_var=no
+       ;;
+     hpux9*)
+       if test "$GCC" = yes; then
 -      archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++      archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       else
 -      archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++      archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       fi
 -      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
 -      hardcode_libdir_separator=:
 -      hardcode_direct=yes
++      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
++      hardcode_libdir_separator_F77=:
++      hardcode_direct_F77=yes
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
 -      hardcode_minus_L=yes
 -      export_dynamic_flag_spec='${wl}-E'
++      hardcode_minus_L_F77=yes
++      export_dynamic_flag_spec_F77='${wl}-E'
+       ;;
+     hpux10* | hpux11*)
+       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*|ia64*)
 -        archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++        archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
 -        archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++        archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        esac
-       ;;
-        darwin*)
-          # PIC is the default on this platform
-          # Common symbols not allowed in MH_DYLIB files
-          case $cc_basename in
-            xlc*)
-            lt_prog_compiler_pic_CXX='-qnocommon'
-            lt_prog_compiler_wl_CXX='-Wl,'
-            ;;
-          esac
-        ;;
-       dgux*)
-       case $cc_basename in
-         ec++*)
-           lt_prog_compiler_pic_CXX='-KPIC'
-           ;;
-         ghcx*)
-           # Green Hills C++ Compiler
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-       freebsd* | kfreebsd*-gnu | dragonfly*)
-       # FreeBSD uses GNU C++
-       ;;
-       hpux9* | hpux10* | hpux11*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-           if test "$host_cpu" != ia64; then
-             lt_prog_compiler_pic_CXX='+Z'
-           fi
-           ;;
-         aCC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-           case $host_cpu in
-           hppa*64*|ia64*)
-             # +Z the default
-             ;;
-           *)
-             lt_prog_compiler_pic_CXX='+Z'
-             ;;
-           esac
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-       irix5* | irix6* | nonstopux*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='-non_shared'
-           # CC pic flag -KPIC is the default.
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-       linux*)
-       case $cc_basename in
-         KCC*)
-           # KAI C++ Compiler
-           lt_prog_compiler_wl_CXX='--backend -Wl,'
-           lt_prog_compiler_pic_CXX='-fPIC'
-           ;;
-         icpc* | ecpc*)
-           # Intel C++
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-static'
-           ;;
-         pgCC*)
-           # Portland Group C++ compiler.
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-fpic'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-         cxx*)
-           # Compaq C++
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           lt_prog_compiler_pic_CXX=
-           lt_prog_compiler_static_CXX='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-       lynxos*)
-       ;;
-       m88k*)
-       ;;
-       mvs*)
-       case $cc_basename in
-         cxx*)
-           lt_prog_compiler_pic_CXX='-W c,exportall'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-       netbsd*)
-       ;;
-       osf3* | osf4* | osf5*)
-       case $cc_basename in
-         KCC*)
-           lt_prog_compiler_wl_CXX='--backend -Wl,'
-           ;;
-         RCC*)
-           # Rational C++ 2.4.1
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         cxx*)
-           # Digital/Compaq C++
-           lt_prog_compiler_wl_CXX='-Wl,'
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           lt_prog_compiler_pic_CXX=
-           lt_prog_compiler_static_CXX='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-       psos*)
-       ;;
-       sco*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_pic_CXX='-fPIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-       solaris*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           lt_prog_compiler_wl_CXX='-Qoption ld '
-           ;;
-         gcx*)
-           # Green Hills C++ Compiler
-           lt_prog_compiler_pic_CXX='-PIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-       sunos4*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.x
-           lt_prog_compiler_pic_CXX='-pic'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-         lcc*)
-           # Lucid
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         *)
-           ;;
+       else
+       case $host_cpu in
+       hppa*64*|ia64*)
 -        archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
++        archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       *)
 -        archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
++        archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+         ;;
        esac
-       ;;
-       tandem*)
-       case $cc_basename in
-         NCC*)
-           # NonStop-UX NCC 3.20
-           lt_prog_compiler_pic_CXX='-KPIC'
-           ;;
-         *)
-           ;;
+       fi
+       if test "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
 -        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
 -        hardcode_libdir_flag_spec_ld='+b $libdir'
 -        hardcode_libdir_separator=:
 -        hardcode_direct=no
 -        hardcode_shlibpath_var=no
++        hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
++        hardcode_libdir_flag_spec_ld_F77='+b $libdir'
++        hardcode_libdir_separator_F77=:
++        hardcode_direct_F77=no
++        hardcode_shlibpath_var_F77=no
+         ;;
+       ia64*)
 -        hardcode_libdir_flag_spec='-L$libdir'
 -        hardcode_direct=no
 -        hardcode_shlibpath_var=no
++        hardcode_libdir_flag_spec_F77='-L$libdir'
++        hardcode_direct_F77=no
++        hardcode_shlibpath_var_F77=no
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
 -        hardcode_minus_L=yes
++        hardcode_minus_L_F77=yes
+         ;;
+       *)
 -        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
 -        hardcode_libdir_separator=:
 -        hardcode_direct=yes
 -        export_dynamic_flag_spec='${wl}-E'
++        hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
++        hardcode_libdir_separator_F77=:
++        hardcode_direct_F77=yes
++        export_dynamic_flag_spec_F77='${wl}-E'
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
 -        hardcode_minus_L=yes
++        hardcode_minus_L_F77=yes
+         ;;
        esac
-       ;;
-       unixware*)
-       ;;
-       vxworks*)
-       ;;
-       *)
-       lt_prog_compiler_can_build_shared_CXX=no
-       ;;
-     esac
-   fi
+       fi
+       ;;
  
- echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
- echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
+     irix5* | irix6* | nonstopux*)
+       if test "$GCC" = yes; then
 -      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       else
 -      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 -      hardcode_libdir_flag_spec_ld='-rpath $libdir'
++      archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
++      hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+       fi
 -      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 -      hardcode_libdir_separator=:
 -      link_all_deplibs=yes
++      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
++      hardcode_libdir_separator_F77=:
++      link_all_deplibs_F77=yes
+       ;;
  
- #
- # Check to make sure the PIC flag actually works.
- #
- if test -n "$lt_prog_compiler_pic_CXX"; then
+     netbsd*)
+       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 -      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
++      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+       else
 -      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
++      archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+       fi
 -      hardcode_libdir_flag_spec='-R$libdir'
 -      hardcode_direct=yes
 -      hardcode_shlibpath_var=no
++      hardcode_libdir_flag_spec_F77='-R$libdir'
++      hardcode_direct_F77=yes
++      hardcode_shlibpath_var_F77=no
+       ;;
  
- echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
- echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
- if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   lt_prog_compiler_pic_works_CXX=no
-   ac_outfile=conftest.$ac_objext
-    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-    lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
-    # Insert the option either (1) after the last *FLAGS variable, or
-    # (2) before a word containing "conftest.", or (3) at the end.
-    # Note that $ac_compile itself does not contain backslashes and begins
-    # with a dollar sign (not a hyphen), so the echo should work correctly.
-    # The option is referenced via a variable to avoid confusing sed.
-    lt_compile=`echo "$ac_compile" | $SED \
-    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-    -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:30336: $lt_compile\"" >&5)
-    (eval "$lt_compile" 2>conftest.err)
-    ac_status=$?
-    cat conftest.err >&5
-    echo "$as_me:30340: \$? = $ac_status" >&5
-    if (exit $ac_status) && test -s "$ac_outfile"; then
-      # The compiler can only warn and ignore the option if not recognized
-      # So say no if there are warnings other than the usual output.
-      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
-      $SED '/^$/d' conftest.err >conftest.er2
-      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
-        lt_prog_compiler_pic_works_CXX=yes
-      fi
-    fi
-    $rm conftest*
+     newsos6)
 -      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_direct=yes
 -      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 -      hardcode_libdir_separator=:
 -      hardcode_shlibpath_var=no
++      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_direct_F77=yes
++      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
++      hardcode_libdir_separator_F77=:
++      hardcode_shlibpath_var_F77=no
+       ;;
  
- fi
- echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
- echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
+     openbsd*)
 -      hardcode_direct=yes
 -      hardcode_shlibpath_var=no
++      hardcode_direct_F77=yes
++      hardcode_shlibpath_var_F77=no
+       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec='${wl}-E'
+       else
+        case $host_os in
+        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
 -         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 -         hardcode_libdir_flag_spec='-R$libdir'
++         archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++         hardcode_libdir_flag_spec_F77='-R$libdir'
+          ;;
+        *)
 -         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 -         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++         archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++         hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+          ;;
+        esac
+       fi
+       ;;
  
- if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
-     case $lt_prog_compiler_pic_CXX in
-      "" | " "*) ;;
-      *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
-      esac
- else
-     lt_prog_compiler_pic_CXX=
-      lt_prog_compiler_can_build_shared_CXX=no
- fi
+     os2*)
 -      hardcode_libdir_flag_spec='-L$libdir'
 -      hardcode_minus_L=yes
 -      allow_undefined_flag=unsupported
 -      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 -      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
++      hardcode_libdir_flag_spec_F77='-L$libdir'
++      hardcode_minus_L_F77=yes
++      allow_undefined_flag_F77=unsupported
++      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
++      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+       ;;
  
- fi
- case $host_os in
-   # For platforms which do not support PIC, -DPIC is meaningless:
-   *djgpp*)
-     lt_prog_compiler_pic_CXX=
-     ;;
-   *)
-     lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
-     ;;
- esac
+     osf3*)
+       if test "$GCC" = yes; then
 -      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
 -      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++      allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
++      archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       else
 -      allow_undefined_flag=' -expect_unresolved \*'
 -      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
++      allow_undefined_flag_F77=' -expect_unresolved \*'
++      archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       fi
 -      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 -      hardcode_libdir_separator=:
++      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
++      hardcode_libdir_separator_F77=:
+       ;;
  
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
- echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
- if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   lt_cv_prog_compiler_c_o_CXX=no
-    $rm -r conftest 2>/dev/null
-    mkdir conftest
-    cd conftest
-    mkdir out
-    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+     osf4* | osf5*)    # as osf3* with the addition of -msym flag
+       if test "$GCC" = yes; then
 -      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
 -      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 -      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
++      allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
++      archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+       else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  
-    lt_compiler_flag="-o out/conftest2.$ac_objext"
-    # Insert the option either (1) after the last *FLAGS variable, or
-    # (2) before a word containing "conftest.", or (3) at the end.
-    # Note that $ac_compile itself does not contain backslashes and begins
-    # with a dollar sign (not a hyphen), so the echo should work correctly.
-    lt_compile=`echo "$ac_compile" | $SED \
-    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-    -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:30398: $lt_compile\"" >&5)
-    (eval "$lt_compile" 2>out/conftest.err)
-    ac_status=$?
-    cat out/conftest.err >&5
-    echo "$as_me:30402: \$? = $ac_status" >&5
-    if (exit $ac_status) && test -s out/conftest2.$ac_objext
-    then
-      # The compiler can only warn and ignore the option if not recognized
-      # So say no if there are warnings
-      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
-      $SED '/^$/d' out/conftest.err >out/conftest.er2
-      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-        lt_cv_prog_compiler_c_o_CXX=yes
-      fi
-    fi
-    chmod u+w . 2>&5
-    $rm conftest*
-    # SGI C++ compiler will create directory out/ii_files/ for
-    # template instantiation
-    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-    $rm out/* && rmdir out
-    cd ..
-    rmdir conftest
-    $rm conftest*
+       # Both c and cxx compiler support -rpath directly
 -      hardcode_libdir_flag_spec='-rpath $libdir'
++      hardcode_libdir_flag_spec_F77='-rpath $libdir'
+       fi
 -      hardcode_libdir_separator=:
++      hardcode_libdir_separator_F77=:
+       ;;
  
- fi
- echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
- echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
+     sco3.2v5*)
 -      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_shlibpath_var=no
 -      export_dynamic_flag_spec='${wl}-Bexport'
++      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_shlibpath_var_F77=no
++      export_dynamic_flag_spec_F77='${wl}-Bexport'
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ;;
+     solaris*)
+       no_undefined_flag=' -z text'
+       if test "x$archive_cmds" = "x"; then
+         if test "$GCC" = yes; then
+         wlarc='${wl}'
+         if $CC -v --help 2>/dev/null | grep -- -shared  > /dev/null 2> /dev/null; then
+           archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+           archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+         else
+           archive_cmds='$CC ${wl}-G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+           archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+           $CC ${wl}-G ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+           fi
+         else
+         wlarc=''
+           lt_prog_compiler_static='-static'
+         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+           lt_prog_compiler_static='-static'
+       fi
+       fi
 -      hardcode_libdir_flag_spec='-R$libdir'
 -      hardcode_shlibpath_var=no
++      hardcode_libdir_flag_spec_F77='-R$libdir'
++      hardcode_shlibpath_var_F77=no
+       case $host_os in
+       solaris2.[0-5] | solaris2.[0-5].*) ;;
+       *)
+       # The compiler driver will combine linker options so we
+       # cannot just pass the convience library names through
+       # without $wl, iff we do not link with $LD.
+       # Luckily, gcc supports the same syntax we need for Sun Studio.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       case $wlarc in
+       '')
+         whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+       *)
+         whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+       esac ;;
+       esac
 -      link_all_deplibs=yes
++      link_all_deplibs_F77=yes
+       ;;
  
 -      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+     sunos4*)
+       if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
 -      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
++      archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+       else
 -      hardcode_libdir_flag_spec='-L$libdir'
 -      hardcode_direct=yes
 -      hardcode_minus_L=yes
 -      hardcode_shlibpath_var=no
++      archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+       fi
++      hardcode_libdir_flag_spec_F77='-L$libdir'
++      hardcode_direct_F77=yes
++      hardcode_minus_L_F77=yes
++      hardcode_shlibpath_var_F77=no
+       ;;
  
- hard_links="nottested"
- if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
-   # do not overwrite the value of need_locks provided by the user
-   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
- echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-   hard_links=yes
-   $rm conftest*
-   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-   touch conftest.a
-   ln conftest.a conftest.b 2>&5 || hard_links=no
-   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-   echo "$as_me:$LINENO: result: $hard_links" >&5
- echo "${ECHO_T}$hard_links" >&6
-   if test "$hard_links" = no; then
-     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
- echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-     need_locks=warn
-   fi
- else
-   need_locks=no
- fi
+     sysv4)
+       case $host_vendor in
+       sni)
 -        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -        hardcode_direct=yes # is this really true???
++        archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++        hardcode_direct_F77=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
 -        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 -        reload_cmds='$CC -r -o $output$reload_objs'
 -        hardcode_direct=no
++        archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
++        reload_cmds_F77='$CC -r -o $output$reload_objs'
++        hardcode_direct_F77=no
+         ;;
+       motorola)
 -        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -        hardcode_direct=no #Motorola manual says yes, but my tests say they lie
++        archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++        hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+       ;;
+       esac
+       runpath_var='LD_RUN_PATH'
 -      hardcode_shlibpath_var=no
++      hardcode_shlibpath_var_F77=no
+       ;;
  
- echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
- echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+     sysv4.3*)
 -      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_shlibpath_var=no
 -      export_dynamic_flag_spec='-Bexport'
++      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_shlibpath_var_F77=no
++      export_dynamic_flag_spec_F77='-Bexport'
+       ;;
  
-   export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-   case $host_os in
-   aix4* | aix5*)
-     # If we're using GNU nm, then we don't want the "-C" option.
-     # -C means demangle to AIX nm, but means don't demangle with GNU nm
-     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-       export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-     else
-       export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-     fi
-     ;;
-   pw32*)
-     export_symbols_cmds_CXX="$ltdll_cmds"
-   ;;
-   cygwin* | mingw*)
-     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-   ;;
-   *)
-     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-   ;;
-   esac
+     sysv4*MP*)
+       if test -d /usr/nec; then
 -      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_shlibpath_var=no
++      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_shlibpath_var_F77=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
 -      ld_shlibs=yes
++      ld_shlibs_F77=yes
+       fi
+       ;;
  
- echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
- echo "${ECHO_T}$ld_shlibs_CXX" >&6
- test "$ld_shlibs_CXX" = no && can_build_shared=no
+     sysv4.2uw2*)
 -      archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_direct=yes
 -      hardcode_minus_L=no
 -      hardcode_shlibpath_var=no
++      archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_direct_F77=yes
++      hardcode_minus_L_F77=no
++      hardcode_shlibpath_var_F77=no
+       hardcode_runpath_var=yes
+       runpath_var=LD_RUN_PATH
+       ;;
+    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
 -      no_undefined_flag='${wl}-z ${wl}text'
++      no_undefined_flag_F77='${wl}-z ${wl}text'
+       if test "$GCC" = yes; then
 -      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++      archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       else
 -      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++      archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       fi
+       runpath_var='LD_RUN_PATH'
 -      hardcode_shlibpath_var=no
++      hardcode_shlibpath_var_F77=no
+       ;;
+     sysv5*)
 -      no_undefined_flag=' -z text'
++      no_undefined_flag_F77=' -z text'
+       # $CC -shared without GNU ld will not create a library from C++
+       # object files and a static libstdc++, better avoid it by now
 -      archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
++      archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 -      hardcode_libdir_flag_spec=
 -      hardcode_shlibpath_var=no
++      hardcode_libdir_flag_spec_F77=
++      hardcode_shlibpath_var_F77=no
+       runpath_var='LD_RUN_PATH'
+       ;;
+     uts4*)
 -      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_libdir_flag_spec='-L$libdir'
 -      hardcode_shlibpath_var=no
++      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
++      hardcode_libdir_flag_spec_F77='-L$libdir'
++      hardcode_shlibpath_var_F77=no
+       ;;
+     *)
 -      ld_shlibs=no
++      ld_shlibs_F77=no
+       ;;
+     esac
+   fi
+ { echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+ echo "${ECHO_T}$ld_shlibs" >&6; }
+ test "$ld_shlibs" = no && can_build_shared=no
  
  variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  if test "$GCC" = yes; then
  #
  # Do we need to explicitly link libc?
  #
- case "x$archive_cmds_need_lc_CXX" in
 -case "x$archive_cmds_need_lc" in
++case "x$archive_cmds_need_lc_F77" in
  x|xyes)
    # Assume -lc should be added
-   archive_cmds_need_lc_CXX=yes
 -  archive_cmds_need_lc=yes
++  archive_cmds_need_lc_F77=yes
  
    if test "$enable_shared" = yes && test "$GCC" = yes; then
-     case $archive_cmds_CXX in
 -    case $archive_cmds in
++    case $archive_cmds_F77 in
      *'~'*)
        # FIXME: we may have to deal with multi-command sequences.
        ;;
        # Test whether the compiler implicitly links with -lc since on some
        # systems, -lgcc has to come before -lc. If gcc already passes -lc
        # to ld, don't add -lc before -lgcc.
-       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
- echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
        $rm conftest*
        printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  
          lib=conftest
          libobjs=conftest.$ac_objext
          deplibs=
-         wl=$lt_prog_compiler_wl_CXX
 -        wl=$lt_prog_compiler_wl
++        wl=$lt_prog_compiler_wl_F77
          compiler_flags=-v
          linker_flags=-v
          verstring=
          output_objdir=.
          libname=conftest
-         lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
-         allow_undefined_flag_CXX=
-         if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-   (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
 -        lt_save_allow_undefined_flag=$allow_undefined_flag
 -        allow_undefined_flag=
 -        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
 -  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
++        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
++        allow_undefined_flag_F77=
++        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
++  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }
          then
-         archive_cmds_need_lc_CXX=no
 -        archive_cmds_need_lc=no
++        archive_cmds_need_lc_F77=no
          else
-         archive_cmds_need_lc_CXX=yes
 -        archive_cmds_need_lc=yes
++        archive_cmds_need_lc_F77=yes
          fi
-         allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
 -        allow_undefined_flag=$lt_save_allow_undefined_flag
++        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
        else
          cat conftest.err 1>&5
        fi
        $rm conftest*
-       echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
- echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
+       { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+ echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
        ;;
      esac
    fi
    ;;
  esac
  
- echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
- echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+ echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
  library_names_spec=
  libname_spec='lib$name'
  soname_spec=
    dynamic_linker=no
    ;;
  esac
- echo "$as_me:$LINENO: result: $dynamic_linker" >&5
- echo "${ECHO_T}$dynamic_linker" >&6
echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+ echo "${ECHO_T}$dynamic_linker" >&6; }
  test "$dynamic_linker" = no && can_build_shared=no
  
- echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
- echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
- hardcode_action_CXX=
- if test -n "$hardcode_libdir_flag_spec_CXX" || \
-    test -n "$runpath_var_CXX" || \
-    test "X$hardcode_automatic_CXX" = "Xyes" ; then
echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+ echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+ hardcode_action=
+ if test -n "$hardcode_libdir_flag_spec" || \
+    test -n "$runpath_var" || \
+    test "X$hardcode_automatic" = "Xyes" ; then
  
    # We can hardcode non-existant directories.
-   if test "$hardcode_direct_CXX" != no &&
 -  if test "$hardcode_direct" != no &&
++  if test "$hardcode_direct_F77" != no &&
       # If the only mechanism to avoid hardcoding is shlibpath_var, we
       # have to relink, otherwise we might link with an installed library
       # when we should be linking with a yet-to-be-installed one
-      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
-      test "$hardcode_minus_L_CXX" != no; then
 -     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
 -     test "$hardcode_minus_L" != no; then
++     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
++     test "$hardcode_minus_L_F77" != no; then
      # Linking always hardcodes the temporary library directory.
-     hardcode_action_CXX=relink
 -    hardcode_action=relink
++    hardcode_action_F77=relink
    else
      # We can link without hardcoding, and we can hardcode nonexisting dirs.
-     hardcode_action_CXX=immediate
 -    hardcode_action=immediate
++    hardcode_action_F77=immediate
    fi
  else
    # We cannot hardcode anything, or else we can only hardcode existing
    # directories.
-   hardcode_action_CXX=unsupported
 -  hardcode_action=unsupported
++  hardcode_action_F77=unsupported
  fi
echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
- echo "${ECHO_T}$hardcode_action_CXX" >&6
{ echo "$as_me:$LINENO: result: $hardcode_action" >&5
+ echo "${ECHO_T}$hardcode_action" >&6; }
  
- if test "$hardcode_action_CXX" = relink; then
 -if test "$hardcode_action" = relink; then
++if test "$hardcode_action_F77" = relink; then
    # Fast installation is not supported
    enable_fast_install=no
  elif test "$shlibpath_overrides_runpath" = yes ||
  
  striplib=
  old_striplib=
- echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
- echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+ echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
  if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
    test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
    test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-   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
  # FIXME - insert some real tests, host_os isn't really good enough
    case $host_os in
     darwin*)
         if test -n "$STRIP" ; then
           striplib="$STRIP -x"
-          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" >&5
- echo "${ECHO_T}no" >&6
+   echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
         ;;
     *)
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
      ;;
    esac
  fi
  
--if test "x$enable_dlopen" != xyes; then
--  enable_dlopen=unknown
--  enable_dlopen_self=unknown
--  enable_dlopen_self_static=unknown
--else
--  lt_cv_dlopen=no
--  lt_cv_dlopen_libs=
  
--  case $host_os in
--  beos*)
--    lt_cv_dlopen="load_add_on"
--    lt_cv_dlopen_libs=
--    lt_cv_dlopen_self=yes
--    ;;
  
--  mingw* | pw32*)
--    lt_cv_dlopen="LoadLibrary"
--    lt_cv_dlopen_libs=
--   ;;
++# The else clause should only fire when bootstrapping the
++# libtool distribution, otherwise you forgot to ship ltmain.sh
++# with your package, and you will get complaints that there are
++# no rules to generate ltmain.sh.
++if test -f "$ltmain"; then
++  # See if we are running on zsh, and set the options which allow our commands through
++  # without removal of \ escapes.
++  if test -n "${ZSH_VERSION+set}" ; then
++    setopt NO_GLOB_SUBST
++  fi
++  # Now quote all the things that may contain metacharacters while being
++  # careful not to overquote the AC_SUBSTed values.  We take copies of the
++  # variables and quote the copies for generation of the libtool script.
++  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
++    SED SHELL STRIP \
++    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
++    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
++    deplibs_check_method reload_flag reload_cmds need_locks \
++    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
++    lt_cv_sys_global_symbol_to_c_name_address \
++    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
++    old_postinstall_cmds old_postuninstall_cmds \
++    compiler_F77 \
++    CC_F77 \
++    LD_F77 \
++    lt_prog_compiler_wl_F77 \
++    lt_prog_compiler_pic_F77 \
++    lt_prog_compiler_static_F77 \
++    lt_prog_compiler_no_builtin_flag_F77 \
++    export_dynamic_flag_spec_F77 \
++    thread_safe_flag_spec_F77 \
++    whole_archive_flag_spec_F77 \
++    enable_shared_with_static_runtimes_F77 \
++    old_archive_cmds_F77 \
++    old_archive_from_new_cmds_F77 \
++    predep_objects_F77 \
++    postdep_objects_F77 \
++    predeps_F77 \
++    postdeps_F77 \
++    compiler_lib_search_path_F77 \
++    archive_cmds_F77 \
++    archive_expsym_cmds_F77 \
++    postinstall_cmds_F77 \
++    postuninstall_cmds_F77 \
++    old_archive_from_expsyms_cmds_F77 \
++    allow_undefined_flag_F77 \
++    no_undefined_flag_F77 \
++    export_symbols_cmds_F77 \
++    hardcode_libdir_flag_spec_F77 \
++    hardcode_libdir_flag_spec_ld_F77 \
++    hardcode_libdir_separator_F77 \
++    hardcode_automatic_F77 \
++    module_cmds_F77 \
++    module_expsym_cmds_F77 \
++    lt_cv_prog_compiler_c_o_F77 \
++    exclude_expsyms_F77 \
++    include_expsyms_F77; do
  
--  cygwin*)
--    lt_cv_dlopen="dlopen"
--    lt_cv_dlopen_libs=
--   ;;
++    case $var in
++    old_archive_cmds_F77 | \
++    old_archive_from_new_cmds_F77 | \
++    archive_cmds_F77 | \
++    archive_expsym_cmds_F77 | \
++    module_cmds_F77 | \
++    module_expsym_cmds_F77 | \
++    old_archive_from_expsyms_cmds_F77 | \
++    export_symbols_cmds_F77 | \
++    extract_expsyms_cmds | reload_cmds | finish_cmds | \
++    postinstall_cmds | postuninstall_cmds | \
++    old_postinstall_cmds | old_postuninstall_cmds | \
++    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
++      # Double-quote double-evaled strings.
++      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
++      ;;
++    *)
++      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
++      ;;
++    esac
++  done
  
    darwin*)
    # if libdl is installed we need to link against it
-     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
- echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+ echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
  if test "${ac_cv_lib_dl_dlopen+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -31208,71 -37210,68 +38102,69 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- /* 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 dlopen ();
  int
  main ()
  {
- dlopen ();
return dlopen ();
    ;
    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_cxx_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_lib_dl_dlopen=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_dl_dlopen=no
      ac_cv_lib_dl_dlopen=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
  LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
- echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
  if test $ac_cv_lib_dl_dlopen = yes; then
    lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  else
  
--    lt_cv_dlopen="dyld"
--    lt_cv_dlopen_libs=
--    lt_cv_dlopen_self=yes
++# Shell to use when invoking shell scripts.
++SHELL=$lt_SHELL
  
--fi
++# Whether or not to build shared libraries.
++build_libtool_libs=$enable_shared
  
--   ;;
++# Whether or not to build static libraries.
++build_old_libs=$enable_static
  
    *)
-     echo "$as_me:$LINENO: checking for shl_load" >&5
- echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+     echo "$as_me:$LINENO: checking for shl_load" >&5
+ echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
  if test "${ac_cv_func_shl_load+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -31286,86 -37285,77 +38178,76 @@@ cat >>conftest.$ac_ext <<_ACEO
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
  #define shl_load innocuous_shl_load
  
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char shl_load (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
++# The build system.
++build_alias=$build_alias
++build=$build
++build_os=$build_os
  
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
++# An echo program that does not interpret backslashes.
++echo=$lt_echo
  
--#undef shl_load
++# The archiver.
++AR=$lt_AR
++AR_FLAGS=$lt_AR_FLAGS
  
- /* 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 shl_load ();
  /* 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_shl_load) || defined (__stub___shl_load)
+ #if defined __stub_shl_load || defined __stub___shl_load
  choke me
- #else
- char (*f) () = shl_load;
- #endif
- #ifdef __cplusplus
- }
  #endif
  
  int
  main ()
  {
- return f != shl_load;
+ return shl_load ();
    ;
    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_cxx_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_shl_load=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_func_shl_load=no
      ac_cv_func_shl_load=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_shl_load" >&5
- echo "${ECHO_T}$ac_cv_func_shl_load" >&6
echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+ echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
  if test $ac_cv_func_shl_load = yes; then
    lt_cv_dlopen="shl_load"
  else
-   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
- echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+ echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
  if test "${ac_cv_lib_dld_shl_load+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -31378,61 -37368,58 +38260,58 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- /* 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 shl_load ();
  int
  main ()
  {
- shl_load ();
return shl_load ();
    ;
    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_cxx_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_lib_dld_shl_load=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_dld_shl_load=no
      ac_cv_lib_dld_shl_load=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
  LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
- echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+ echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
  if test $ac_cv_lib_dld_shl_load = yes; then
    lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
  else
-   echo "$as_me:$LINENO: checking for dlopen" >&5
- echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for dlopen" >&5
+ echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
  if test "${ac_cv_func_dlopen+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -31446,86 -37433,77 +38325,73 @@@ cat >>conftest.$ac_ext <<_ACEO
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
  #define dlopen innocuous_dlopen
  
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char dlopen (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
++# A symbol stripping program
++STRIP=$lt_STRIP
  
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
++# Used to examine libraries when file_magic_cmd begins "file"
++MAGIC_CMD=$MAGIC_CMD
  
--#undef dlopen
++# Used on cygwin: DLL creation program.
++DLLTOOL="$DLLTOOL"
  
- /* 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 dlopen ();
  /* 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_dlopen) || defined (__stub___dlopen)
+ #if defined __stub_dlopen || defined __stub___dlopen
  choke me
- #else
- char (*f) () = dlopen;
- #endif
- #ifdef __cplusplus
- }
  #endif
  
  int
  main ()
  {
- return f != dlopen;
+ return dlopen ();
    ;
    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_cxx_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_dlopen=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_func_dlopen=no
      ac_cv_func_dlopen=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_dlopen" >&5
- echo "${ECHO_T}$ac_cv_func_dlopen" >&6
echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
  if test $ac_cv_func_dlopen = yes; then
    lt_cv_dlopen="dlopen"
  else
-   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
- echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+ echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
  if test "${ac_cv_lib_dl_dlopen+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -31538,61 -37516,58 +38404,58 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- /* 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 dlopen ();
  int
  main ()
  {
- dlopen ();
return dlopen ();
    ;
    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_cxx_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_lib_dl_dlopen=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_dl_dlopen=no
      ac_cv_lib_dl_dlopen=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
  LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
- echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
  if test $ac_cv_lib_dl_dlopen = yes; then
    lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  else
-   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
- echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+ echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
  if test "${ac_cv_lib_svld_dlopen+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -31605,61 -37580,58 +38468,58 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- /* 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 dlopen ();
  int
  main ()
  {
- dlopen ();
return dlopen ();
    ;
    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_cxx_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_lib_svld_dlopen=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_svld_dlopen=no
      ac_cv_lib_svld_dlopen=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
  LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
- echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
  if test $ac_cv_lib_svld_dlopen = yes; then
    lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
  else
-   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
- echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+ echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
  if test "${ac_cv_lib_dld_dld_link+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
@@@ -31672,97 -37644,94 +38532,108 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- /* 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 dld_link ();
  int
  main ()
  {
- dld_link ();
return dld_link ();
    ;
    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_cxx_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_lib_dld_dld_link=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_dld_dld_link=no
      ac_cv_lib_dld_dld_link=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
  LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
- echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+ echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
  if test $ac_cv_lib_dld_dld_link = yes; then
    lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
  fi
  
++# Do we need the lib prefix for modules?
++need_lib_prefix=$need_lib_prefix
  
--fi
++# Do we need a version for libraries?
++need_version=$need_version
  
++# Whether dlopen is supported.
++dlopen_support=$enable_dlopen
  
--fi
++# Whether dlopen of programs is supported.
++dlopen_self=$enable_dlopen_self
  
++# Whether dlopen of statically linked programs is supported.
++dlopen_self_static=$enable_dlopen_self_static
  
--fi
++# Compiler flag to prevent dynamic linking.
++link_static_flag=$lt_lt_prog_compiler_static_F77
  
++# Compiler flag to turn off builtin functions.
++no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
  
--fi
++# Compiler flag to allow reflexive dlopens.
++export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
  
++# Compiler flag to generate shared objects directly from archives.
++whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
  
--fi
++# Compiler flag to generate thread-safe objects.
++thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
  
--    ;;
--  esac
++# Library versioning type.
++version_type=$version_type
  
--  if test "x$lt_cv_dlopen" != xno; then
--    enable_dlopen=yes
--  else
--    enable_dlopen=no
--  fi
++# Format of library name prefix.
++libname_spec=$lt_libname_spec
  
--  case $lt_cv_dlopen in
--  dlopen)
--    save_CPPFLAGS="$CPPFLAGS"
--    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
++# List of archive names.  First name is the real one, the rest are links.
++# The last name is the one that the linker finds with -lNAME.
++library_names_spec=$lt_library_names_spec
  
--    save_LDFLAGS="$LDFLAGS"
--    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
++# The coded name of the library, if different from the real name.
++soname_spec=$lt_soname_spec
  
--    save_LIBS="$LIBS"
--    LIBS="$lt_cv_dlopen_libs $LIBS"
++# Commands used to build and install an old-style archive.
++RANLIB=$lt_RANLIB
++old_archive_cmds=$lt_old_archive_cmds_F77
++old_postinstall_cmds=$lt_old_postinstall_cmds
++old_postuninstall_cmds=$lt_old_postuninstall_cmds
  
-     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
- echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+ echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
  if test "${lt_cv_dlopen_self+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<EOF
- #line 31775 "configure"
+ #line 37744 "configure"
  #include "confdefs.h"
  
--#if HAVE_DLFCN_H
--#include <dlfcn.h>
--#endif
++# Create a temporary old-style archive to link instead of a shared archive.
++old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
  
--#include <stdio.h>
++# Commands used to build and install a shared archive.
++archive_cmds=$lt_archive_cmds_F77
++archive_expsym_cmds=$lt_archive_expsym_cmds_F77
++postinstall_cmds=$lt_postinstall_cmds
++postuninstall_cmds=$lt_postuninstall_cmds
  
--#ifdef RTLD_GLOBAL
--#  define LT_DLGLOBAL         RTLD_GLOBAL
--#else
--#  ifdef DL_GLOBAL
--#    define LT_DLGLOBAL               DL_GLOBAL
--#  else
--#    define LT_DLGLOBAL               0
--#  endif
--#endif
++# Commands used to build a loadable module (assumed same as above if empty)
++module_cmds=$lt_module_cmds_F77
++module_expsym_cmds=$lt_module_expsym_cmds_F77
  
--/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
--   find out it does not work in some platform. */
--#ifndef LT_DLLAZY_OR_NOW
--#  ifdef RTLD_LAZY
--#    define LT_DLLAZY_OR_NOW          RTLD_LAZY
--#  else
--#    ifdef DL_LAZY
--#      define LT_DLLAZY_OR_NOW                DL_LAZY
--#    else
--#      ifdef RTLD_NOW
--#        define LT_DLLAZY_OR_NOW      RTLD_NOW
--#      else
--#        ifdef DL_NOW
--#          define LT_DLLAZY_OR_NOW    DL_NOW
--#        else
--#          define LT_DLLAZY_OR_NOW    0
--#        endif
--#      endif
--#    endif
--#  endif
--#endif
++# Commands to strip libraries.
++old_striplib=$lt_old_striplib
++striplib=$lt_striplib
  
--#ifdef __cplusplus
--extern "C" void exit (int);
--#endif
++# Dependencies to place before the objects being linked to create a
++# shared library.
++predep_objects=$lt_predep_objects_F77
  
--void fnord() { int i=42;}
--int main ()
--{
--  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
--  int status = $lt_dlunknown;
++# Dependencies to place after the objects being linked to create a
++# shared library.
++postdep_objects=$lt_postdep_objects_F77
  
--  if (self)
--    {
--      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
--      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
--      /* dlclose (self); */
--    }
++# Dependencies to place before the objects being linked to create a
++# shared library.
++predeps=$lt_predeps_F77
  
      exit (status);
  }
  fi
  rm -fr conftest*
  
++# The library search path used internally by the compiler when linking
++# a shared library.
++compiler_lib_search_path=$lt_compiler_lib_search_path_F77
  
  fi
- echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
- echo "${ECHO_T}$lt_cv_dlopen_self" >&6
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+ echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
  
      if test "x$lt_cv_dlopen_self" = xyes; then
        LDFLAGS="$LDFLAGS $link_static_flag"
-       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
- echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+ echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
  if test "${lt_cv_dlopen_self_static+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<EOF
- #line 31873 "configure"
+ #line 37842 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
@@@ -31952,8 -37921,8 +38800,8 @@@ rm -fr conftest
  
  
  fi
- echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
- echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
      fi
  
      CPPFLAGS="$save_CPPFLAGS"
  fi
  
  
+ # Report which librarie types wil actually be built
+ { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+ echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: result: $can_build_shared" >&5
+ echo "${ECHO_T}$can_build_shared" >&6; }
+ { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+ echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+   test "$enable_shared" = yes && enable_static=no
+   if test -n "$RANLIB"; then
+     archive_cmds="$archive_cmds~\$RANLIB \$lib"
+     postinstall_cmds='$RANLIB $lib'
+   fi
+   ;;
+ aix4* | aix5*)
+   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+     test "$enable_shared" = yes && enable_static=no
+   fi
+     ;;
+ esac
+ { echo "$as_me:$LINENO: result: $enable_shared" >&5
+ echo "${ECHO_T}$enable_shared" >&6; }
+ { echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+ echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { echo "$as_me:$LINENO: result: $enable_static" >&5
+ echo "${ECHO_T}$enable_static" >&6; }
  # The else clause should only fire when bootstrapping the
  # libtool distribution, otherwise you forgot to ship ltmain.sh
  # with your package, and you will get complaints that there are
@@@ -31996,51 -38002,51 +38881,51 @@@ if test -f "$ltmain"; the
      lt_cv_sys_global_symbol_to_c_name_address \
      sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
      old_postinstall_cmds old_postuninstall_cmds \
-     compiler_CXX \
-     CC_CXX \
-     LD_CXX \
-     lt_prog_compiler_wl_CXX \
-     lt_prog_compiler_pic_CXX \
-     lt_prog_compiler_static_CXX \
-     lt_prog_compiler_no_builtin_flag_CXX \
-     export_dynamic_flag_spec_CXX \
-     thread_safe_flag_spec_CXX \
-     whole_archive_flag_spec_CXX \
-     enable_shared_with_static_runtimes_CXX \
-     old_archive_cmds_CXX \
-     old_archive_from_new_cmds_CXX \
-     predep_objects_CXX \
-     postdep_objects_CXX \
-     predeps_CXX \
-     postdeps_CXX \
-     compiler_lib_search_path_CXX \
-     archive_cmds_CXX \
-     archive_expsym_cmds_CXX \
-     postinstall_cmds_CXX \
-     postuninstall_cmds_CXX \
-     old_archive_from_expsyms_cmds_CXX \
-     allow_undefined_flag_CXX \
-     no_undefined_flag_CXX \
-     export_symbols_cmds_CXX \
-     hardcode_libdir_flag_spec_CXX \
-     hardcode_libdir_flag_spec_ld_CXX \
-     hardcode_libdir_separator_CXX \
-     hardcode_automatic_CXX \
-     module_cmds_CXX \
-     module_expsym_cmds_CXX \
-     lt_cv_prog_compiler_c_o_CXX \
-     exclude_expsyms_CXX \
-     include_expsyms_CXX; do
+     compiler \
+     CC \
+     LD \
+     lt_prog_compiler_wl \
+     lt_prog_compiler_pic \
+     lt_prog_compiler_static \
+     lt_prog_compiler_no_builtin_flag \
+     export_dynamic_flag_spec \
+     thread_safe_flag_spec \
+     whole_archive_flag_spec \
+     enable_shared_with_static_runtimes \
+     old_archive_cmds \
+     old_archive_from_new_cmds \
+     predep_objects \
+     postdep_objects \
+     predeps \
+     postdeps \
+     compiler_lib_search_path \
+     archive_cmds \
+     archive_expsym_cmds \
+     postinstall_cmds \
+     postuninstall_cmds \
+     old_archive_from_expsyms_cmds \
+     allow_undefined_flag \
+     no_undefined_flag \
+     export_symbols_cmds \
+     hardcode_libdir_flag_spec \
+     hardcode_libdir_flag_spec_ld \
+     hardcode_libdir_separator \
+     hardcode_automatic \
+     module_cmds \
+     module_expsym_cmds \
+     lt_cv_prog_compiler_c_o \
+     exclude_expsyms \
+     include_expsyms; do
  
      case $var in
-     old_archive_cmds_CXX | \
-     old_archive_from_new_cmds_CXX | \
-     archive_cmds_CXX | \
-     archive_expsym_cmds_CXX | \
-     module_cmds_CXX | \
-     module_expsym_cmds_CXX | \
-     old_archive_from_expsyms_cmds_CXX | \
-     export_symbols_cmds_CXX | \
+     old_archive_cmds | \
+     old_archive_from_new_cmds | \
+     archive_cmds | \
+     archive_expsym_cmds | \
+     module_cmds | \
+     module_expsym_cmds | \
+     old_archive_from_expsyms_cmds | \
+     export_symbols_cmds | \
      extract_expsyms_cmds | reload_cmds | finish_cmds | \
      postinstall_cmds | postuninstall_cmds | \
      old_postinstall_cmds | old_postuninstall_cmds | \
      esac
    done
  
-   case $lt_echo in
-   *'\$0 --fallback-echo"')
-     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-     ;;
-   esac
+   case $lt_echo in
+   *'\$0 --fallback-echo"')
+     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+     ;;
+   esac
+ cfgfile="${ofile}T"
+   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+   $rm -f "$cfgfile"
+   { echo "$as_me:$LINENO: creating $ofile" >&5
+ echo "$as_me: creating $ofile" >&6;}
+   cat <<__EOF__ >> "$cfgfile"
+ #! $SHELL
+ # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+ # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+ #
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+ # Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Libtool:
+ # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+ #
+ # This program 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.
+ # A sed program that does not truncate output.
+ SED=$lt_SED
  
- cfgfile="$ofile"
+ # Sed that helps us avoid accidentally triggering echo(1) options like -n.
+ Xsed="$SED -e 1s/^X//"
  
-   cat <<__EOF__ >> "$cfgfile"
- # ### BEGIN LIBTOOL TAG CONFIG: $tagname
+ # The HP-UX ksh and POSIX shell print the target directory to stdout
+ # if CDPATH is set.
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+ # The names of the tagged configurations supported by this script.
+ available_tags=
+ # ### BEGIN LIBTOOL CONFIG
  
  # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  
@@@ -32077,10 -38131,10 +39010,10 @@@ build_libtool_libs=$enable_share
  build_old_libs=$enable_static
  
  # Whether or not to add -lc for building shared libraries.
- build_libtool_need_lc=$archive_cmds_need_lc_CXX
+ build_libtool_need_lc=$archive_cmds_need_lc
  
  # Whether or not to disallow shared libs when runtime libs are static
- allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+ allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
  
  # Whether or not to optimize for fast installation.
  fast_install=$enable_fast_install
@@@ -32106,16 -38160,16 +39039,16 @@@ AR_FLAGS=$lt_AR_FLAG
  LTCC=$lt_LTCC
  
  # A language-specific compiler.
- CC=$lt_compiler_CXX
+ CC=$lt_compiler
  
  # Is the compiler the GNU C compiler?
- with_gcc=$GCC_CXX
+ with_gcc=$GCC
  
  # An ERE matcher.
  EGREP=$lt_EGREP
  
  # The linker used to build libraries.
- LD=$lt_LD_CXX
+ LD=$lt_LD
  
  # Whether we need hard or soft links.
  LN_S=$lt_LN_S
@@@ -32146,7 -38200,7 +39079,7 @@@ reload_flag=$lt_reload_fla
  reload_cmds=$lt_reload_cmds
  
  # How to pass a linker flag through the compiler.
- wl=$lt_lt_prog_compiler_wl_CXX
+ wl=$lt_lt_prog_compiler_wl
  
  # Object file suffix (normally "o").
  objext="$ac_objext"
@@@ -32161,14 -38215,14 +39094,14 @@@ shrext_cmds='$shrext_cmds
  exeext="$exeext"
  
  # Additional compiler flags for building library objects.
- pic_flag=$lt_lt_prog_compiler_pic_CXX
+ pic_flag=$lt_lt_prog_compiler_pic
  pic_mode=$pic_mode
  
  # What is the maximum length of a command?
  max_cmd_len=$lt_cv_sys_max_cmd_len
  
  # Does compiler simultaneously support -c and -o options?
- compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+ compiler_c_o=$lt_lt_cv_prog_compiler_c_o
  
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
@@@ -32189,19 -38243,19 +39122,19 @@@ dlopen_self=$enable_dlopen_sel
  dlopen_self_static=$enable_dlopen_self_static
  
  # Compiler flag to prevent dynamic linking.
- link_static_flag=$lt_lt_prog_compiler_static_CXX
+ link_static_flag=$lt_lt_prog_compiler_static
  
  # Compiler flag to turn off builtin functions.
- no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+ no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
  # Compiler flag to allow reflexive dlopens.
- export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+ export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
  
  # Compiler flag to generate shared objects directly from archives.
- whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+ whole_archive_flag_spec=$lt_whole_archive_flag_spec
  
  # Compiler flag to generate thread-safe objects.
- thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+ thread_safe_flag_spec=$lt_thread_safe_flag_spec
  
  # Library versioning type.
  version_type=$version_type
@@@ -32218,25 -38272,25 +39151,25 @@@ soname_spec=$lt_soname_spe
  
  # Commands used to build and install an old-style archive.
  RANLIB=$lt_RANLIB
- old_archive_cmds=$lt_old_archive_cmds_CXX
+ old_archive_cmds=$lt_old_archive_cmds
  old_postinstall_cmds=$lt_old_postinstall_cmds
  old_postuninstall_cmds=$lt_old_postuninstall_cmds
  
  # Create an old-style archive from a shared archive.
- old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+ old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
  
  # Create a temporary old-style archive to link instead of a shared archive.
- old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+ old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
  
  # Commands used to build and install a shared archive.
- archive_cmds=$lt_archive_cmds_CXX
- archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+ archive_cmds=$lt_archive_cmds
+ archive_expsym_cmds=$lt_archive_expsym_cmds
  postinstall_cmds=$lt_postinstall_cmds
  postuninstall_cmds=$lt_postuninstall_cmds
  
  # Commands used to build a loadable module (assumed same as above if empty)
- module_cmds=$lt_module_cmds_CXX
- module_expsym_cmds=$lt_module_expsym_cmds_CXX
+ module_cmds=$lt_module_cmds
+ module_expsym_cmds=$lt_module_expsym_cmds
  
  # Commands to strip libraries.
  old_striplib=$lt_old_striplib
@@@ -32244,23 -38298,23 +39177,23 @@@ striplib=$lt_stripli
  
  # Dependencies to place before the objects being linked to create a
  # shared library.
- predep_objects=$lt_predep_objects_CXX
+ predep_objects=$lt_predep_objects
  
  # Dependencies to place after the objects being linked to create a
  # shared library.
- postdep_objects=$lt_postdep_objects_CXX
+ postdep_objects=$lt_postdep_objects
  
  # Dependencies to place before the objects being linked to create a
  # shared library.
- predeps=$lt_predeps_CXX
+ predeps=$lt_predeps
  
  # Dependencies to place after the objects being linked to create a
  # shared library.
- postdeps=$lt_postdeps_CXX
+ postdeps=$lt_postdeps
  
  # The library search path used internally by the compiler when linking
  # a shared library.
- compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+ compiler_lib_search_path=$lt_compiler_lib_search_path
  
  # Method to check whether dependent libraries are shared objects.
  deplibs_check_method=$lt_deplibs_check_method
  file_magic_cmd=$lt_file_magic_cmd
  
  # Flag that allows shared libraries with undefined symbols to be built.
- allow_undefined_flag=$lt_allow_undefined_flag_CXX
 -allow_undefined_flag=$lt_allow_undefined_flag
++allow_undefined_flag=$lt_allow_undefined_flag_F77
  
  # Flag that forces no undefined symbols.
- no_undefined_flag=$lt_no_undefined_flag_CXX
 -no_undefined_flag=$lt_no_undefined_flag
++no_undefined_flag=$lt_no_undefined_flag_F77
  
  # Commands used to finish a libtool library installation in a directory.
  finish_cmds=$lt_finish_cmds
@@@ -32299,45 -38353,45 +39232,45 @@@ shlibpath_var=$shlibpath_va
  shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  
  # How to hardcode a shared library path into an executable.
- hardcode_action=$hardcode_action_CXX
 -hardcode_action=$hardcode_action
++hardcode_action=$hardcode_action_F77
  
  # Whether we should hardcode library paths into libraries.
  hardcode_into_libs=$hardcode_into_libs
  
  # Flag to hardcode \$libdir into a binary during linking.
  # This must work even if \$libdir does not exist.
- hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
++hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
  
  # If ld is used when linking, flag to hardcode \$libdir into
  # a binary during linking. This must work even if \$libdir does
  # not exist.
- hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
 -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
++hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
  
  # Whether we need a single -rpath flag with a separated argument.
- hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 -hardcode_libdir_separator=$lt_hardcode_libdir_separator
++hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
  
  # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  # resulting binary.
- hardcode_direct=$hardcode_direct_CXX
 -hardcode_direct=$hardcode_direct
++hardcode_direct=$hardcode_direct_F77
  
  # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  # resulting binary.
- hardcode_minus_L=$hardcode_minus_L_CXX
 -hardcode_minus_L=$hardcode_minus_L
++hardcode_minus_L=$hardcode_minus_L_F77
  
  # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  # the resulting binary.
- hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
 -hardcode_shlibpath_var=$hardcode_shlibpath_var
++hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
  
  # Set to yes if building a shared library automatically hardcodes DIR into the library
  # and all subsequent libraries and executables linked against it.
- hardcode_automatic=$hardcode_automatic_CXX
 -hardcode_automatic=$hardcode_automatic
++hardcode_automatic=$hardcode_automatic_F77
  
  # Variables whose values should be saved in libtool wrapper scripts and
  # restored at relink time.
  variables_saved_for_relink="$variables_saved_for_relink"
  
  # Whether libtool must link a program against all its dependency libraries.
- link_all_deplibs=$link_all_deplibs_CXX
 -link_all_deplibs=$link_all_deplibs
++link_all_deplibs=$link_all_deplibs_F77
  
  # Compile-time system search path for libraries
  sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  
  # Fix the shell variable \$srcfile for the compiler.
- fix_srcfile_path="$fix_srcfile_path_CXX"
 -fix_srcfile_path="$fix_srcfile_path"
++fix_srcfile_path="$fix_srcfile_path_F77"
  
  # Set to yes if exported symbols are required.
- always_export_symbols=$always_export_symbols_CXX
 -always_export_symbols=$always_export_symbols
++always_export_symbols=$always_export_symbols_F77
  
  # The commands to list exported symbols.
- export_symbols_cmds=$lt_export_symbols_cmds_CXX
 -export_symbols_cmds=$lt_export_symbols_cmds
++export_symbols_cmds=$lt_export_symbols_cmds_F77
  
  # The commands to extract the exported symbol list from a shared archive.
  extract_expsyms_cmds=$lt_extract_expsyms_cmds
  
  # Symbols that should not be listed in the preloaded symbols.
- exclude_expsyms=$lt_exclude_expsyms_CXX
 -exclude_expsyms=$lt_exclude_expsyms
++exclude_expsyms=$lt_exclude_expsyms_F77
  
  # Symbols that must always be exported.
- include_expsyms=$lt_include_expsyms_CXX
 -include_expsyms=$lt_include_expsyms
++include_expsyms=$lt_include_expsyms_F77
  
 -# ### END LIBTOOL CONFIG
 +# ### END LIBTOOL TAG CONFIG: $tagname
  
  __EOF__
  
  
 -  case $host_os in
 -  aix3*)
 -    cat <<\EOF >> "$cfgfile"
 -
 -# AIX sometimes has problems with the GCC collect2 program.  For some
 -# reason, if we set the COLLECT_NAMES environment variable, the problems
 -# vanish in a puff of smoke.
 -if test "X${COLLECT_NAMES+set}" != Xset; then
 -  COLLECT_NAMES=
 -  export COLLECT_NAMES
 -fi
 -EOF
 -    ;;
 -  esac
 -
 -  # We use sed instead of cat because bash on DJGPP gets confused if
 -  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 -  # text mode, it properly converts lines to CR/LF.  This bash problem
 -  # is reportedly fixed, but why not run on old versions too?
 -  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 -
 -  mv -f "$cfgfile" "$ofile" || \
 -    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 -  chmod +x "$ofile"
 -
  else
    # If there is no Makefile yet, we rely on a make rule to execute
    # `config.status --recheck' to rerun these tests and create the
@@@ -32385,62 -38464,135 +39318,136 @@@ ac_compile='$CC -c $CFLAGS $CPPFLAGS co
  ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
- CC=$lt_save_CC
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ldcxx=$with_gnu_ld
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+ CC="$lt_save_CC"
  
-       else
-         tagname=""
-       fi
+ # Check whether --with-tags was given.
+ if test "${with_tags+set}" = set; then
+   withval=$with_tags; tagnames="$withval"
+ fi
+ if test -f "$ltmain" && test -n "$tagnames"; then
+   if test ! -f "${ofile}"; then
+     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+ echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ output file \`$ofile' does not exist
+ AAW_EOF
+   fi
+   if test -z "$LTCC"; then
+     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+     if test -z "$LTCC"; then
+     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+ echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ output file \`$ofile' does not look like a libtool script
+ AAW_EOF
+     else
+     { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+ echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+     cat <<AAW_EOF >>config.warnings
+ using \`LTCC=$LTCC', extracted from \`$ofile'
+ AAW_EOF
+     fi
+   fi
+   # Extract list of available tagged configurations in $ofile.
+   # Note that this assumes the entire list is on one line.
+   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+   for tagname in $tagnames; do
+     IFS="$lt_save_ifs"
+     # Check whether tagname contains only valid characters
+     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
+     "") ;;
+     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+ echo "$as_me: error: invalid tag name: $tagname" >&2;}
+    { (exit 1); exit 1; }; }
        ;;
 -    esac
  
-       F77)
-       if test -n "$F77" && test "X$F77" != "Xno"; then
+     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+     then
+       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+ echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+    { (exit 1); exit 1; }; }
+     fi
  
- ac_ext=f
- ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
- ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+     # Update the list of available tags.
+     if test -n "$tagname"; then
+       echo appending configuration tag \"$tagname\" to $ofile
  
+       case $tagname in
+       CXX)
+       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+           (test "X$CXX" != "Xg++"))) ; then
+         ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
- archive_cmds_need_lc_F77=no
- allow_undefined_flag_F77=
- always_export_symbols_F77=no
- archive_expsym_cmds_F77=
- export_dynamic_flag_spec_F77=
- hardcode_direct_F77=no
- hardcode_libdir_flag_spec_F77=
- hardcode_libdir_flag_spec_ld_F77=
- hardcode_libdir_separator_F77=
- hardcode_minus_L_F77=no
- hardcode_automatic_F77=no
- module_cmds_F77=
- module_expsym_cmds_F77=
- link_all_deplibs_F77=unknown
- old_archive_cmds_F77=$old_archive_cmds
- no_undefined_flag_F77=
- whole_archive_flag_spec_F77=
- enable_shared_with_static_runtimes_F77=no
  
- # Source file extension for f77 test sources.
- ac_ext=f
  
- # Object file extension for compiled f77 test sources.
++# Source file extension for Java test sources.
++ac_ext=java
+ archive_cmds_need_lc_CXX=no
+ allow_undefined_flag_CXX=
+ always_export_symbols_CXX=no
+ archive_expsym_cmds_CXX=
+ export_dynamic_flag_spec_CXX=
+ hardcode_direct_CXX=no
+ hardcode_libdir_flag_spec_CXX=
+ hardcode_libdir_flag_spec_ld_CXX=
+ hardcode_libdir_separator_CXX=
+ hardcode_minus_L_CXX=no
+ hardcode_automatic_CXX=no
+ module_cmds_CXX=
+ module_expsym_cmds_CXX=
+ link_all_deplibs_CXX=unknown
+ old_archive_cmds_CXX=$old_archive_cmds
+ no_undefined_flag_CXX=
+ whole_archive_flag_spec_CXX=
+ enable_shared_with_static_runtimes_CXX=no
+ # Dependencies to place before and after the object being linked:
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ predeps_CXX=
+ postdeps_CXX=
+ compiler_lib_search_path_CXX=
+ # Source file extension for C++ test sources.
+ ac_ext=cpp
+ # Object file extension for compiled C++ test sources.
  objext=o
- objext_F77=$objext
 -objext_CXX=$objext
++objext_GCJ=$objext
  
  # Code to be used in simple compile tests
- lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 -lt_simple_compile_test_code="int some_variable = 0;\n"
++lt_simple_compile_test_code="class foo {}\n"
  
  # Code to be used in simple link tests
- lt_simple_link_test_code="      program t\n      end\n"
 -lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
++lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
  
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  
@@@ -32466,10 -38618,26 +39473,10 @@@ $rm conftest
  
  
  # Allow CC to be a program name with arguments.
 -lt_save_CC=$CC
 -lt_save_LD=$LD
 -lt_save_GCC=$GCC
 -GCC=$GXX
 -lt_save_with_gnu_ld=$with_gnu_ld
 -lt_save_path_LD=$lt_cv_path_LD
 -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 -  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 -else
 -  unset lt_cv_prog_gnu_ld
 -fi
 -if test -n "${lt_cv_path_LDCXX+set}"; then
 -  lt_cv_path_LD=$lt_cv_path_LDCXX
 -else
 -  unset lt_cv_path_LD
 -fi
 -test -z "${LDCXX+set}" || LD=$LDCXX
 -CC=${CXX-"c++"}
 +lt_save_CC="$CC"
- CC=${F77-"f77"}
++CC=${GCJ-"gcj"}
  compiler=$CC
- compiler_F77=$CC
+ compiler_CXX=$CC
  for cc_temp in $compiler""; do
    case $cc_temp in
      compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
  cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  
  
- echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
- echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $can_build_shared" >&5
- echo "${ECHO_T}$can_build_shared" >&6
 -# We don't want -fno-exception wen compiling C++ code, so set the
 -# no_builtin_flag separately
 -if test "$GXX" = yes; then
 -  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
 -else
 -  lt_prog_compiler_no_builtin_flag_CXX=
 -fi
++# GCJ did not exist at the time GCC didn't implicitly link libc in.
++archive_cmds_need_lc_GCJ=no
  
- echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
- echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
- test "$can_build_shared" = "no" && enable_shared=no
 -if test "$GXX" = yes; then
 -  # Set up default GNU C++ configuration
++old_archive_cmds_GCJ=$old_archive_cmds
  
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
-   test "$enable_shared" = yes && enable_static=no
-   if test -n "$RANLIB"; then
-     archive_cmds="$archive_cmds~\$RANLIB \$lib"
-     postinstall_cmds='$RANLIB $lib'
-   fi
-   ;;
- aix4* | aix5*)
-   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-     test "$enable_shared" = yes && enable_static=no
-   fi
-   ;;
- esac
- echo "$as_me:$LINENO: result: $enable_shared" >&5
- echo "${ECHO_T}$enable_shared" >&6
++## CAVEAT EMPTOR:
++## There is no encapsulation within the following macros, do not change
++## the running order or otherwise move them around unless you know exactly
++## what you are doing...
  
- echo "$as_me:$LINENO: checking whether to build static libraries" >&5
- echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- echo "$as_me:$LINENO: result: $enable_static" >&5
- echo "${ECHO_T}$enable_static" >&6
+ # Check whether --with-gnu-ld was given.
+ if test "${with_gnu_ld+set}" = set; then
+   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+ else
+   with_gnu_ld=no
+ fi
  
- test "$ld_shlibs_F77" = no && can_build_shared=no
+ ac_prog=ld
+ if test "$GCC" = yes; then
+   # Check if gcc -print-prog-name=ld gives a path.
+   { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+   case $host in
+   *-*-mingw*)
+     # gcc leaves a trailing carriage return which upsets mingw
+     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+   *)
+     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+   esac
+   case $ac_prog in
+     # Accept absolute paths.
+     [\\/]* | ?:[\\/]*)
+       re_direlt='/[^/][^/]*/\.\./'
+       # Canonicalize the pathname of ld
+       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+       done
+       test -z "$LD" && LD="$ac_prog"
+       ;;
+   "")
+     # If it fails, then pretend we aren't using GCC.
+     ac_prog=ld
+     ;;
+   *)
+     # If it is relative, then search for the first ld in PATH.
+     with_gnu_ld=unknown
+     ;;
+   esac
+ elif test "$with_gnu_ld" = yes; then
+   { echo "$as_me:$LINENO: checking for GNU ld" >&5
+ echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+ else
+   { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+ echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+ fi
+ if test "${lt_cv_path_LD+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test -z "$LD"; then
+   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+   for ac_dir in $PATH; do
+     IFS="$lt_save_ifs"
+     test -z "$ac_dir" && ac_dir=.
+     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+       lt_cv_path_LD="$ac_dir/$ac_prog"
+       # Check to see if the program is GNU ld.  I'd rather use --version,
+       # but apparently some variants of GNU ld only accept -v.
+       # Break only if it was the GNU/non-GNU ld that we prefer.
+       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+       *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
+       ;;
+       *)
+       test "$with_gnu_ld" != yes && break
+       ;;
+       esac
+     fi
+   done
+   IFS="$lt_save_ifs"
+ else
+   lt_cv_path_LD="$LD" # Let the user override the test with a path.
+ fi
+ fi
++echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
  
- GCC_F77="$G77"
- LD_F77="$LD"
+ LD="$lt_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
+ test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+ echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+    { (exit 1); exit 1; }; }
+ { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+ if test "${lt_cv_prog_gnu_ld+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   # I'd rather use --version here, but apparently some GNU lds only accept -v.
+ case `$LD -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+   lt_cv_prog_gnu_ld=yes
+   ;;
+ *)
+   lt_cv_prog_gnu_ld=no
+   ;;
+ esac
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+ echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+ with_gnu_ld=$lt_cv_prog_gnu_ld
  
- lt_prog_compiler_wl_F77=
- lt_prog_compiler_pic_F77=
- lt_prog_compiler_static_F77=
++lt_prog_compiler_wl_GCJ=
++lt_prog_compiler_pic_GCJ=
++lt_prog_compiler_static_GCJ=
  
 +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
  
 -  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 -  # archiving commands below assume that GNU ld is being used.
 -  if test "$with_gnu_ld" = yes; then
 -    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 +  if test "$GCC" = yes; then
-     lt_prog_compiler_wl_F77='-Wl,'
-     lt_prog_compiler_static_F77='-static'
++    lt_prog_compiler_wl_GCJ='-Wl,'
++    lt_prog_compiler_static_GCJ='-static'
  
 -    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
 -    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
 +    case $host_os in
 +      aix*)
 +      # All AIX code is PIC.
 +      if test "$host_cpu" = ia64; then
 +      # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_F77='-Bstatic'
++      lt_prog_compiler_static_GCJ='-Bstatic'
 +      fi
 +      ;;
  
 -    # If archive_cmds runs LD, not CC, wlarc should be empty
 -    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 -    #     investigate it a little bit more. (MM)
 -    wlarc='${wl}'
 +    amigaos*)
 +      # FIXME: we need at least 68020 code to build shared libraries, but
 +      # adding the `-m68020' flag to GCC prevents building anything better,
 +      # like `-m68040'.
-       lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
++      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
 +      ;;
  
 -    # ancient GNU ld didn't support --whole-archive et. al.
 -    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 -      grep 'no-whole-archive' > /dev/null; then
 -      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 -    else
 -      whole_archive_flag_spec_CXX=
 -    fi
 -  else
 -    with_gnu_ld=no
 -    wlarc=
 -
 -    # A generic and very simple default shared library creation
 -    # command for GNU C++ for the case where it uses the native
 -    # linker, instead of GNU ld.  If possible, this setting should
 -    # overridden to take advantage of the native linker features on
 -    # the platform it is being used on.
 -    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 -  fi
 +    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 +      # PIC is the default for these OSes.
 +      ;;
  
 -  # Commands to make compiler produce verbose output that lists
 -  # what "hidden" libraries, object files and flags are used when
 -  # linking a shared library.
 -  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 +    mingw* | pw32* | os2*)
 +      # This hack is so that the source file can tell whether it is being
 +      # built for inclusion in a dll (and should export symbols for example).
-       lt_prog_compiler_pic_F77='-DDLL_EXPORT'
++      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
 +      ;;
  
 -else
 -  GXX=no
 -  with_gnu_ld=no
 -  wlarc=
 -fi
 +    darwin* | rhapsody*)
 +      # PIC is the default on this platform
 +      # Common symbols not allowed in MH_DYLIB files
-       lt_prog_compiler_pic_F77='-fno-common'
++      lt_prog_compiler_pic_GCJ='-fno-common'
 +      ;;
 +
 +    msdosdjgpp*)
 +      # Just because we use GCC doesn't mean we suddenly get shared libraries
 +      # on systems that don't support them.
-       lt_prog_compiler_can_build_shared_F77=no
++      lt_prog_compiler_can_build_shared_GCJ=no
 +      enable_shared=no
 +      ;;
  
-     sysv4*MP*)
-       if test -d /usr/nec; then
-       lt_prog_compiler_pic_F77=-Kconform_pic
-       fi
-       ;;
+ # PORTME: fill in a description of your system's C++ link characteristics
+ { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+ ld_shlibs_CXX=yes
+ case $host_os in
+   aix3*)
+     # FIXME: insert proper C++ library support
+     ld_shlibs_CXX=no
+     ;;
+   aix4* | aix5*)
+     if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+       aix_use_runtimelinking=no
+       exp_sym_flag='-Bexport'
+       no_entry_flag=""
+     else
+       aix_use_runtimelinking=no
  
 -      # Test if we are trying to use run time linking or normal
 -      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 -      # need to do runtime linking.
 -      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
 -      for ld_flag in $LDFLAGS; do
 -        case $ld_flag in
 -        *-brtl*)
 -          aix_use_runtimelinking=yes
 -          break
 -          ;;
 -        esac
 -      done
 +    hpux*)
 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 +      # not for PA HP-UX.
 +      case $host_cpu in
 +      hppa*64*|ia64*)
 +      # +Z the default
 +      ;;
 +      *)
-       lt_prog_compiler_pic_F77='-fPIC'
++      lt_prog_compiler_pic_GCJ='-fPIC'
 +      ;;
        esac
 +      ;;
  
-     *)
-       lt_prog_compiler_pic_F77='-fPIC'
-       ;;
-     esac
-   else
-     # PORTME Check for flag to pass linker flags through the system compiler.
-     case $host_os in
-     aix*)
-       lt_prog_compiler_wl_F77='-Wl,'
+       exp_sym_flag='-bexport'
+       no_entry_flag='-bnoentry'
+     fi
+     # When large executables or shared objects are built, AIX ld can
+     # have problems creating the table of contents.  If linking a library
+     # or program results in "error TOC overflow" add -mminimal-toc to
+     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+     archive_cmds_CXX=''
+     hardcode_direct_CXX=yes
+     hardcode_libdir_separator_CXX=':'
+     link_all_deplibs_CXX=yes
+     if test "$GXX" = yes; then
+       case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+       collect2name=`${CC} -print-prog-name=collect2`
+       if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+       then
+         # We have reworked collect2
+         hardcode_direct_CXX=yes
+       else
+         # We have old collect2
+         hardcode_direct_CXX=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L_CXX=yes
+         hardcode_libdir_flag_spec_CXX='-L$libdir'
+         hardcode_libdir_separator_CXX=
+       fi
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+       shared_flag="$shared_flag "'${wl}-G'
+       fi
+     else
+       # not using gcc
        if test "$host_cpu" = ia64; then
 -      # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 -      # chokes on -Wl,-G. The following line is correct:
 -      shared_flag='-G'
 +      # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_F77='-Bstatic'
++      lt_prog_compiler_static_GCJ='-Bstatic'
        else
-       lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
 -      if test "$aix_use_runtimelinking" = yes; then
 -        shared_flag='${wl}-G'
 -      else
 -        shared_flag='${wl}-bM:SRE'
 -      fi
++      lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
        fi
 -    fi
 +      ;;
 +      darwin*)
 +        # PIC is the default on this platform
 +        # Common symbols not allowed in MH_DYLIB files
 +       case $cc_basename in
 +         xlc*)
-          lt_prog_compiler_pic_F77='-qnocommon'
-          lt_prog_compiler_wl_F77='-Wl,'
++         lt_prog_compiler_pic_GCJ='-qnocommon'
++         lt_prog_compiler_wl_GCJ='-Wl,'
 +         ;;
 +       esac
 +       ;;
  
 -    # It seems that -bexpall does not export symbols beginning with
 -    # underscore (_), so it is better to generate a list of symbols to export.
 -    always_export_symbols_CXX=yes
 -    if test "$aix_use_runtimelinking" = yes; then
 -      # Warning - without using the other runtime loading flags (-brtl),
 -      # -berok will link without error, but may produce a broken library.
 -      allow_undefined_flag_CXX='-berok'
 -      # Determine the default libpath from the value encoded in an empty executable.
 -      cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 +    mingw* | pw32* | os2*)
 +      # This hack is so that the source file can tell whether it is being
 +      # built for inclusion in a dll (and should export symbols for example).
-       lt_prog_compiler_pic_F77='-DDLL_EXPORT'
++      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
 +      ;;
  
 -int
 -main ()
 -{
 +    hpux9* | hpux10* | hpux11*)
-       lt_prog_compiler_wl_F77='-Wl,'
++      lt_prog_compiler_wl_GCJ='-Wl,'
 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 +      # not for PA HP-UX.
 +      case $host_cpu in
 +      hppa*64*|ia64*)
 +      # +Z the default
 +      ;;
 +      *)
-       lt_prog_compiler_pic_F77='+Z'
++      lt_prog_compiler_pic_GCJ='+Z'
 +      ;;
 +      esac
 +      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-       lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
++      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
 +      ;;
  
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -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); } && {
 -       test -z "$ac_cxx_werror_flag" ||
 -       test ! -s conftest.err
 -       } && test -s conftest$ac_exeext &&
 -       $as_test_x conftest$ac_exeext; then
 +    irix5* | irix6* | nonstopux*)
-       lt_prog_compiler_wl_F77='-Wl,'
++      lt_prog_compiler_wl_GCJ='-Wl,'
 +      # PIC (with -KPIC) is the default.
-       lt_prog_compiler_static_F77='-non_shared'
++      lt_prog_compiler_static_GCJ='-non_shared'
 +      ;;
  
 -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 -}'`
 -# Check for a 64-bit object if we didn't find anything.
 -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 -}'`; fi
 -else
 -  echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 +    newsos6)
-       lt_prog_compiler_pic_F77='-KPIC'
-       lt_prog_compiler_static_F77='-Bstatic'
++      lt_prog_compiler_pic_GCJ='-KPIC'
++      lt_prog_compiler_static_GCJ='-Bstatic'
 +      ;;
  
-       lt_prog_compiler_wl_F77='-Wl,'
-       lt_prog_compiler_pic_F77='-KPIC'
-       lt_prog_compiler_static_F77='-static'
 +    linux*)
 +      case $cc_basename in
 +      icc* | ecc*)
-       lt_prog_compiler_wl_F77='-Wl,'
-       lt_prog_compiler_pic_F77='-fpic'
-       lt_prog_compiler_static_F77='-Bstatic'
++      lt_prog_compiler_wl_GCJ='-Wl,'
++      lt_prog_compiler_pic_GCJ='-KPIC'
++      lt_prog_compiler_static_GCJ='-static'
 +        ;;
 +      pgcc* | pgf77* | pgf90* | pgf95*)
 +        # Portland Group compilers (*not* the Pentium gcc compiler,
 +      # which looks to be a dead project)
-         lt_prog_compiler_wl_F77='-Wl,'
++      lt_prog_compiler_wl_GCJ='-Wl,'
++      lt_prog_compiler_pic_GCJ='-fpic'
++      lt_prog_compiler_static_GCJ='-Bstatic'
 +        ;;
 +      ccc*)
-         lt_prog_compiler_static_F77='-non_shared'
++        lt_prog_compiler_wl_GCJ='-Wl,'
 +        # All Alpha code is PIC.
++        lt_prog_compiler_static_GCJ='-non_shared'
 +        ;;
 +      esac
 +      ;;
  
 -fi
 +    osf3* | osf4* | osf5*)
-       lt_prog_compiler_wl_F77='-Wl,'
++      lt_prog_compiler_wl_GCJ='-Wl,'
 +      # All OSF/1 code is PIC.
-       lt_prog_compiler_static_F77='-non_shared'
++      lt_prog_compiler_static_GCJ='-non_shared'
 +      ;;
  
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 +    sco3.2v5*)
-       lt_prog_compiler_pic_F77='-Kpic'
-       lt_prog_compiler_static_F77='-dn'
++      lt_prog_compiler_pic_GCJ='-Kpic'
++      lt_prog_compiler_static_GCJ='-dn'
 +      ;;
  
 -      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
 +    solaris*)
-       lt_prog_compiler_pic_F77='-KPIC'
-       lt_prog_compiler_static_F77='-Bstatic'
++      lt_prog_compiler_pic_GCJ='-KPIC'
++      lt_prog_compiler_static_GCJ='-Bstatic'
 +      case $cc_basename in
 +      f77* | f90* | f95*)
-       lt_prog_compiler_wl_F77='-Qoption ld ';;
++      lt_prog_compiler_wl_GCJ='-Qoption ld ';;
 +      *)
-       lt_prog_compiler_wl_F77='-Wl,';;
++      lt_prog_compiler_wl_GCJ='-Wl,';;
 +      esac
 +      ;;
  
 -      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 -     else
 -      if test "$host_cpu" = ia64; then
 -      hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
 -      allow_undefined_flag_CXX="-z nodefs"
 -      archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 -      else
 -      # Determine the default libpath from the value encoded in an empty executable.
 -      cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 +    sunos4*)
-       lt_prog_compiler_wl_F77='-Qoption ld '
-       lt_prog_compiler_pic_F77='-PIC'
-       lt_prog_compiler_static_F77='-Bstatic'
++      lt_prog_compiler_wl_GCJ='-Qoption ld '
++      lt_prog_compiler_pic_GCJ='-PIC'
++      lt_prog_compiler_static_GCJ='-Bstatic'
 +      ;;
  
 -int
 -main ()
 -{
 +    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       lt_prog_compiler_wl_F77='-Wl,'
-       lt_prog_compiler_pic_F77='-KPIC'
-       lt_prog_compiler_static_F77='-Bstatic'
++      lt_prog_compiler_wl_GCJ='-Wl,'
++      lt_prog_compiler_pic_GCJ='-KPIC'
++      lt_prog_compiler_static_GCJ='-Bstatic'
 +      ;;
 +
 +    sysv4*MP*)
 +      if test -d /usr/nec ;then
-       lt_prog_compiler_pic_F77='-Kconform_pic'
-       lt_prog_compiler_static_F77='-Bstatic'
++      lt_prog_compiler_pic_GCJ='-Kconform_pic'
++      lt_prog_compiler_static_GCJ='-Bstatic'
 +      fi
 +      ;;
  
-     unicos*)
-       lt_prog_compiler_wl_F77='-Wl,'
-       lt_prog_compiler_can_build_shared_F77=no
-       ;;
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
  
 -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 -}'`
 -# Check for a 64-bit object if we didn't find anything.
 -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 -}'`; fi
 +    uts4*)
-       lt_prog_compiler_pic_F77='-pic'
-       lt_prog_compiler_static_F77='-Bstatic'
++      lt_prog_compiler_pic_GCJ='-pic'
++      lt_prog_compiler_static_GCJ='-Bstatic'
 +      ;;
 +
-     *)
-       lt_prog_compiler_can_build_shared_F77=no
-       ;;
-     esac
-   fi
 +
- echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
- echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
++fi
 +
- #
- # Check to make sure the PIC flag actually works.
- #
- if test -n "$lt_prog_compiler_pic_F77"; then
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++      conftest$ac_exeext conftest.$ac_ext
++if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 +
- echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
- echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
- if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
++echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
++echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
++if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   lt_prog_compiler_pic_works_F77=no
 -  echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  lt_prog_compiler_pic_works_GCJ=no
 +  ac_outfile=conftest.$ac_objext
 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-    lt_compiler_flag="$lt_prog_compiler_pic_F77"
++   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
 +   # Insert the option either (1) after the last *FLAGS variable, or
 +   # (2) before a word containing "conftest.", or (3) at the end.
 +   # Note that $ac_compile itself does not contain backslashes and begins
 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
 +   # The option is referenced via a variable to avoid confusing sed.
 +   lt_compile=`echo "$ac_compile" | $SED \
 +   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
 +   -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:32758: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:35216: $lt_compile\"" >&5)
 +   (eval "$lt_compile" 2>conftest.err)
 +   ac_status=$?
 +   cat conftest.err >&5
-    echo "$as_me:32762: \$? = $ac_status" >&5
++   echo "$as_me:35220: \$? = $ac_status" >&5
 +   if (exit $ac_status) && test -s "$ac_outfile"; then
 +     # The compiler can only warn and ignore the option if not recognized
 +     # So say no if there are warnings other than the usual output.
 +     $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
 +     $SED '/^$/d' conftest.err >conftest.er2
 +     if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
-        lt_prog_compiler_pic_works_F77=yes
++       lt_prog_compiler_pic_works_GCJ=yes
 +     fi
 +   fi
 +   $rm conftest*
 +
 +fi
- echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
- echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
++echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
++echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
 +
- if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
-     case $lt_prog_compiler_pic_F77 in
++if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
++    case $lt_prog_compiler_pic_GCJ in
 +     "" | " "*) ;;
-      *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
++     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
 +     esac
 +else
-     lt_prog_compiler_pic_F77=
-      lt_prog_compiler_can_build_shared_F77=no
++    lt_prog_compiler_pic_GCJ=
++     lt_prog_compiler_can_build_shared_GCJ=no
 +fi
 +
- fi
- case $host_os in
-   # For platforms which do not support PIC, -DPIC is meaningless:
-   *djgpp*)
-     lt_prog_compiler_pic_F77=
-     ;;
-   *)
-     lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
-     ;;
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++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); } && {
++       test -z "$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
 +
 +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
- if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
++if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
-   lt_cv_prog_compiler_c_o_F77=no
++  lt_cv_prog_compiler_c_o_GCJ=no
 +   $rm -r conftest 2>/dev/null
 +   mkdir conftest
 +   cd conftest
 +   mkdir out
 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 +
 +   lt_compiler_flag="-o out/conftest2.$ac_objext"
 +   # Insert the option either (1) after the last *FLAGS variable, or
 +   # (2) before a word containing "conftest.", or (3) at the end.
 +   # Note that $ac_compile itself does not contain backslashes and begins
 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
 +   lt_compile=`echo "$ac_compile" | $SED \
 +   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
 +   -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:32820: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:35278: $lt_compile\"" >&5)
 +   (eval "$lt_compile" 2>out/conftest.err)
 +   ac_status=$?
 +   cat out/conftest.err >&5
-    echo "$as_me:32824: \$? = $ac_status" >&5
++   echo "$as_me:35282: \$? = $ac_status" >&5
 +   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 +   then
 +     # The compiler can only warn and ignore the option if not recognized
 +     # So say no if there are warnings
 +     $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
 +     $SED '/^$/d' out/conftest.err >out/conftest.er2
 +     if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-        lt_cv_prog_compiler_c_o_F77=yes
++       lt_cv_prog_compiler_c_o_GCJ=yes
 +     fi
 +   fi
 +   chmod u+w . 2>&5
 +   $rm conftest*
 +   # SGI C++ compiler will create directory out/ii_files/ for
 +   # template instantiation
 +   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
 +   $rm out/* && rmdir out
 +   cd ..
 +   rmdir conftest
 +   $rm conftest*
 +
 +fi
- echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
- echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
++echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
  
  
- hard_links="nottested"
- if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
-   # do not overwrite the value of need_locks provided by the user
-   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
- echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-   hard_links=yes
-   $rm conftest*
-   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-   touch conftest.a
-   ln conftest.a conftest.b 2>&5 || hard_links=no
-   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-   echo "$as_me:$LINENO: result: $hard_links" >&5
- echo "${ECHO_T}$hard_links" >&6
-   if test "$hard_links" = no; then
-     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
- echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-     need_locks=warn
-   fi
- else
-   need_locks=no
  fi
  
- echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
- echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
-   runpath_var=
-   allow_undefined_flag_F77=
-   enable_shared_with_static_runtimes_F77=no
-   archive_cmds_F77=
-   archive_expsym_cmds_F77=
-   old_archive_From_new_cmds_F77=
-   old_archive_from_expsyms_cmds_F77=
-   export_dynamic_flag_spec_F77=
-   whole_archive_flag_spec_F77=
-   thread_safe_flag_spec_F77=
-   hardcode_libdir_flag_spec_F77=
-   hardcode_libdir_flag_spec_ld_F77=
-   hardcode_libdir_separator_F77=
-   hardcode_direct_F77=no
-   hardcode_minus_L_F77=no
-   hardcode_shlibpath_var_F77=unsupported
-   link_all_deplibs_F77=unknown
-   hardcode_automatic_F77=no
-   module_cmds_F77=
-   module_expsym_cmds_F77=
-   always_export_symbols_F77=no
-   export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-   # include_expsyms should be a list of space-separated symbols to be *always*
-   # included in the symbol list
-   include_expsyms_F77=
-   # exclude_expsyms can be an extended regexp of symbols to exclude
-   # it will be wrapped by ` (' and `)$', so one must not match beginning or
-   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-   # as well as any symbol that contains `d'.
-   exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
-   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-   # platforms (ab)use it in PIC code, but their linkers get confused if
-   # the symbol is explicitly referenced.  Since portable code cannot
-   # rely on this symbol name, it's probably fine to never include it in
-   # preloaded symbol tables.
-   extract_expsyms_cmds=
-   # Just being paranoid about ensuring that cc_basename is set.
-   for cc_temp in $compiler""; do
-   case $cc_temp in
-     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-     \-*) ;;
-     *) break;;
+       hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+       # Warning - without using the other run time loading flags,
+       # -berok will link without error, but may produce a broken library.
+       no_undefined_flag_CXX=' ${wl}-bernotok'
+       allow_undefined_flag_CXX=' ${wl}-berok'
+       # -bexpall does not export symbols beginning with underscore (_)
+       always_export_symbols_CXX=yes
+       # Exported symbols can be pulled into shared objects from archives
+       whole_archive_flag_spec_CXX=' '
+       archive_cmds_need_lc_CXX=yes
+       # This is similar to how AIX traditionally builds its shared libraries.
+       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+     fi
+     ;;
 -  chorus*)
 -    case $cc_basename in
 -      *)
 -      # FIXME: insert proper C++ library support
 -      ld_shlibs_CXX=no
 -      ;;
 -    esac
++  openbsd*)
++    with_gnu_ld=no
+     ;;
 +  esac
- done
- cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  
-   case $host_os in
    cygwin* | mingw* | pw32*)
-     # FIXME: the MSVC++ port hasn't been tested in a loooong time
-     # When not using gcc, we currently assume that we are using
-     # Microsoft Visual C++.
-     if test "$GCC" != yes; then
-       with_gnu_ld=no
+     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+     # as there is no search path for DLLs.
+     hardcode_libdir_flag_spec_CXX='-L$libdir'
+     allow_undefined_flag_CXX=unsupported
+     always_export_symbols_CXX=no
+     enable_shared_with_static_runtimes_CXX=yes
+     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+       archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+       cp $export_symbols $output_objdir/$soname.def;
+       else
 -      echo EXPORTS > $output_objdir/$soname.def;
 -      cat $export_symbols >> $output_objdir/$soname.def;
 -      fi~
 -      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 -    else
 -      ld_shlibs_CXX=no
++      whole_archive_flag_spec_GCJ=
+     fi
+   ;;
+       darwin* | rhapsody*)
+         case $host_os in
+         rhapsody* | darwin1.[012])
+          allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
+          ;;
+        *) # Darwin 1.3 on
+          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+            allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+          else
+            case ${MACOSX_DEPLOYMENT_TARGET} in
+              10.[012])
+                allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+                ;;
+              10.*)
+                allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
+                ;;
+            esac
+          fi
+          ;;
+         esac
+       archive_cmds_need_lc_CXX=no
+       hardcode_direct_CXX=no
+       hardcode_automatic_CXX=yes
+       hardcode_shlibpath_var_CXX=unsupported
+       whole_archive_flag_spec_CXX=''
+       link_all_deplibs_CXX=yes
+     if test "$GXX" = yes ; then
+       lt_int_apple_cc_single_mod=no
+       output_verbose_link_cmd='echo'
+       if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+        lt_int_apple_cc_single_mod=yes
+       fi
+       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+        archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       else
+           archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+         fi
+         module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+             archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           else
+             archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           fi
+             module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+       else
+       case $cc_basename in
+         xlc*)
+          output_verbose_link_cmd='echo'
+           archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+           module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+           archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           ;;
+        *)
+          ld_shlibs_CXX=no
+           ;;
+       esac
+       fi
+         ;;
+   dgux*)
+     case $cc_basename in
+       ec++*)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       ghcx*)
+       # Green Hills C++ Compiler
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+     esac
+     ;;
+   freebsd[12]*)
+     # C++ shared libraries reported to be fairly broken before switch to ELF
+     ld_shlibs_CXX=no
+     ;;
+   freebsd-elf*)
+     archive_cmds_need_lc_CXX=no
+     ;;
+   freebsd* | kfreebsd*-gnu | dragonfly*)
+     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+     # conventions
+     ld_shlibs_CXX=yes
+     ;;
+   gnu*)
+     ;;
+   hpux9*)
+     hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+     hardcode_libdir_separator_CXX=:
+     export_dynamic_flag_spec_CXX='${wl}-E'
+     hardcode_direct_CXX=yes
+     hardcode_minus_L_CXX=yes # Not in the search PATH,
+                               # but as the default
+                               # location of the library.
+     case $cc_basename in
+     CC*)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+     aCC*)
+       archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+     *)
+       if test "$GXX" = yes; then
+         archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       else
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
+       fi
+       ;;
+     esac
+     ;;
+   hpux10*|hpux11*)
+     if test $with_gnu_ld = no; then
+       case $host_cpu in
+       hppa*64*)
+       hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+       hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+       hardcode_libdir_separator_CXX=:
+         ;;
+       ia64*)
+       hardcode_libdir_flag_spec_CXX='-L$libdir'
+         ;;
+       *)
+       hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator_CXX=:
+       export_dynamic_flag_spec_CXX='${wl}-E'
+         ;;
+       esac
+     fi
+     case $host_cpu in
+     hppa*64*)
+       hardcode_direct_CXX=no
+       hardcode_shlibpath_var_CXX=no
+       ;;
+     ia64*)
+       hardcode_direct_CXX=no
+       hardcode_shlibpath_var_CXX=no
+       hardcode_minus_L_CXX=yes # Not in the search PATH,
+                                             # but as the default
+                                             # location of the library.
+       ;;
+     *)
+       hardcode_direct_CXX=yes
+       hardcode_minus_L_CXX=yes # Not in the search PATH,
+                                             # but as the default
+                                             # location of the library.
+       ;;
+     esac
+     case $cc_basename in
+       CC*)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       aCC*)
+       case $host_cpu in
+       hppa*64*|ia64*)
+         archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+         ;;
+       *)
+         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+         ;;
++      pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
++        whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
++        tmp_addflag=' $pic_flag -Mnomain' ;;
++      ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
++        tmp_addflag=' -i_dynamic' ;;
++      efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
++        tmp_addflag=' -i_dynamic -nofor_main' ;;
++      ifc* | ifort*)                  # Intel Fortran compiler
++        tmp_addflag=' -nofor_main' ;;
+       esac
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+       *)
+       if test "$GXX" = yes; then
+         if test $with_gnu_ld = no; then
+           case $host_cpu in
+           ia64*|hppa*64*)
+             archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+             ;;
+           *)
+             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             ;;
+           esac
+         fi
+       else
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
+       fi
+       ;;
+     esac
+     ;;
+   irix5* | irix6*)
+     case $cc_basename in
+       CC*)
+       # SGI C++
+       archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       # Archives containing C++ object files must be created using
+       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+       # necessary to make sure instantiated templates are included
+       # in the archive.
+       old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+       ;;
+       *)
+       if test "$GXX" = yes; then
+         if test "$with_gnu_ld" = no; then
+           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+         else
+           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+         fi
+       fi
+       link_all_deplibs_CXX=yes
+       ;;
+     esac
+     hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+     hardcode_libdir_separator_CXX=:
+     ;;
+   linux*)
+     case $cc_basename in
+       KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+       archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
+       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+       # Archives containing C++ object files must be created using
+       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+       ;;
+       icpc*)
+       # Intel C++
+       with_gnu_ld=yes
+       # version 8.0 and above of icpc choke on multiply defined symbols
+       # if we add $predep_objects and $postdep_objects, however 7.1 and
+       # earlier do not add the objects themselves.
+       case `$CC -V 2>&1` in
+       *"Version 7."*)
+         archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         ;;
+       *)  # Version 8.0 or newer
+         tmp_idyn=
+         case $host_cpu in
+           ia64*) tmp_idyn=' -i_dynamic';;
+         esac
+         archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         ;;
+       esac
+       archive_cmds_need_lc_CXX=no
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+       whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+       ;;
+       pgCC*)
+         # Portland Group C++ compiler
+       archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+       archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+       hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+       whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         ;;
+       cxx*)
+       # Compaq C++
+       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+       runpath_var=LD_RUN_PATH
+       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+       hardcode_libdir_separator_CXX=:
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+     esac
+     ;;
+   lynxos*)
+     # FIXME: insert proper C++ library support
+     ld_shlibs_CXX=no
+     ;;
+   m88k*)
+     # FIXME: insert proper C++ library support
+     ld_shlibs_CXX=no
+     ;;
+   mvs*)
+     case $cc_basename in
+       cxx*)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+     esac
+     ;;
+   netbsd*)
+     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+       wlarc=
+       hardcode_libdir_flag_spec_CXX='-R$libdir'
+       hardcode_direct_CXX=yes
+       hardcode_shlibpath_var_CXX=no
      fi
+     # Workaround some broken pre-1.5 toolchains
+     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+     ;;
+   openbsd2*)
+     # C++ shared libraries are fairly broken
+     ld_shlibs_CXX=no
      ;;
    openbsd*)
-     with_gnu_ld=no
+     hardcode_direct_CXX=yes
+     hardcode_shlibpath_var_CXX=no
+     archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+     hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+       export_dynamic_flag_spec_CXX='${wl}-E'
+       whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+     fi
+     output_verbose_link_cmd='echo'
      ;;
-   esac
-   ld_shlibs_F77=yes
-   if test "$with_gnu_ld" = yes; then
-     # If archive_cmds runs LD, not CC, wlarc should be empty
-     wlarc='${wl}'
+   osf3*)
+     case $cc_basename in
+       KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
  
-     # Set some defaults for GNU ld with shared library support. These
-     # are reset later if shared libraries are not supported. Putting them
-     # here allows them to be overridden if necessary.
-     runpath_var=LD_RUN_PATH
-     hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
-     export_dynamic_flag_spec_F77='${wl}--export-dynamic'
-     # ancient GNU ld didn't support --whole-archive et. al.
-     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-       else
-       whole_archive_flag_spec_F77=
-     fi
-     supports_anon_versioning=no
-     case `$LD -v 2>/dev/null` in
-       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-       *\ 2.11.*) ;; # other 2.11 versions
-       *) supports_anon_versioning=yes ;;
-     esac
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  
-     # See if GNU ld supports shared libraries.
-     case $host_os in
-     aix3* | aix4* | aix5*)
-       # On AIX/PPC, the GNU linker is very broken
-       if test "$host_cpu" != ia64; then
-       ld_shlibs_F77=no
-       cat <<EOF 1>&2
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       hardcode_libdir_separator_CXX=:
  
- *** Warning: the GNU linker, at least up to release 2.9.1, is reported
- *** to be unable to reliably create shared libraries on AIX.
- *** Therefore, libtool is disabling shared libraries support.  If you
- *** really care for shared libraries, you may want to modify your PATH
- *** so that a non-GNU linker is found, and then restart.
+       # Archives containing C++ object files must be created using
+       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
  
- EOF
-       fi
-       ;;
+       ;;
+       RCC*)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       cxx*)
+       allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  
-     amigaos*)
-       archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-       hardcode_libdir_flag_spec_F77='-L$libdir'
-       hardcode_minus_L_F77=yes
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+       hardcode_libdir_separator_CXX=:
  
-       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-       # that the semantics of dynamic libraries on AmigaOS, at least up
-       # to version 4, is to share data among multiple programs linked
-       # with the same dynamic library.  Since this doesn't match the
-       # behavior of shared libraries on other platforms, we can't use
-       # them.
-       ld_shlibs_F77=no
-       ;;
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+       *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+         archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  
-     beos*)
-       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag_F77=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       else
-       ld_shlibs_F77=no
-       fi
-       ;;
+         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+         hardcode_libdir_separator_CXX=:
  
-     cygwin* | mingw* | pw32*)
-       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
-       # as there is no search path for DLLs.
-       hardcode_libdir_flag_spec_F77='-L$libdir'
-       allow_undefined_flag_F77=unsupported
-       always_export_symbols_F77=no
-       enable_shared_with_static_runtimes_F77=yes
-       export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+         # linking a shared library.
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  
-       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-         archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
        else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
-       else
-       ld_shlibs_F77=no
-       fi
-       ;;
-     linux*)
-       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       if test $supports_anon_versioning = yes; then
-         archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
-   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-   $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
        fi
-       else
-       ld_shlibs_F77=no
-       fi
-       ;;
+       ;;
+     esac
+     ;;
+   osf4* | osf5*)
+     case $cc_basename in
+       KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
  
-     netbsd*)
-       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-       else
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-       fi
-       ;;
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  
-     solaris* | sysv5*)
-       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       ld_shlibs_F77=no
-       cat <<EOF 1>&2
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       hardcode_libdir_separator_CXX=:
  
- *** Warning: The releases 2.8.* of the GNU linker cannot reliably
- *** create shared libraries on Solaris systems.  Therefore, libtool
- *** is disabling shared libraries support.  We urge you to upgrade GNU
- *** binutils to release 2.9.1 or newer.  Another option is to modify
- *** your PATH or compiler configuration so that the native linker is
- *** used, and then restart.
+       # Archives containing C++ object files must be created using
+       # the KAI C++ compiler.
+       old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+       ;;
+       RCC*)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       cxx*)
+       allow_undefined_flag_CXX=' -expect_unresolved \*'
+       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+         echo "-hidden">> $lib.exp~
+         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+         $rm $lib.exp'
  
- EOF
-       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-       else
-       ld_shlibs_F77=no
-       fi
-       ;;
+       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+       hardcode_libdir_separator_CXX=:
  
-     sunos4*)
-       archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-       wlarc=
-       hardcode_direct_F77=yes
-       hardcode_shlibpath_var_F77=no
-       ;;
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+       *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+        archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  
-     *)
-       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-       else
-       ld_shlibs_F77=no
-       fi
-       ;;
-     esac
+         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+         hardcode_libdir_separator_CXX=:
  
-     if test "$ld_shlibs_F77" = no; then
-       runpath_var=
-       hardcode_libdir_flag_spec_F77=
-       export_dynamic_flag_spec_F77=
-       whole_archive_flag_spec_F77=
-     fi
-   else
-     # PORTME fill in a description of your system's linker (not GNU ld)
-     case $host_os in
-     aix3*)
-       allow_undefined_flag_F77=unsupported
-       always_export_symbols_F77=yes
-       archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-       # Note: this linker hardcodes the directories in LIBPATH if there
-       # are no directories specified by -L.
-       hardcode_minus_L_F77=yes
-       if test "$GCC" = yes && test -z "$link_static_flag"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct_F77=unsupported
-       fi
-       ;;
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+         # linking a shared library.
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  
-     aix4* | aix5*)
-       if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-       else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
        else
-         export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
        fi
-       aix_use_runtimelinking=no
+       ;;
+     esac
+     ;;
+   psos*)
+     # FIXME: insert proper C++ library support
+     ld_shlibs_CXX=no
+     ;;
+   sco*)
+     archive_cmds_need_lc_CXX=no
+     case $cc_basename in
+       CC*)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+     esac
+     ;;
+   sunos4*)
+     case $cc_basename in
+       CC*)
+       # Sun C++ 4.x
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       lcc*)
+       # Lucid
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+     esac
+     ;;
+   solaris*)
+     case $cc_basename in
+       CC*)
+       # Sun C++ 4.2, 5.x and Centerline C++
+         archive_cmds_need_lc_CXX=yes
+       no_undefined_flag_CXX=' -zdefs'
+       archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+       archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+       $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
+       hardcode_libdir_flag_spec_CXX='-R$libdir'
+       hardcode_shlibpath_var_CXX=no
+       case $host_os in
+         solaris2.[0-5] | solaris2.[0-5].*) ;;
+         *)
+           # The C++ compiler is used as linker so we must use $wl
+           # flag to pass the commands to the underlying system
+           # linker. We must also pass each convience library through
+           # to the system linker between allextract/defaultextract.
+           # The C++ compiler will combine linker options so we
+           # cannot just pass the convience library names through
+           # without $wl.
+           # Supported since Solaris 2.6 (maybe 2.5.1?)
+           whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+           ;;
        esac
+       link_all_deplibs_CXX=yes
  
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-       fi
+       output_verbose_link_cmd='echo'
  
-       # When large executables or shared objects are built, AIX ld can
-       # have problems creating the table of contents.  If linking a library
-       # or program results in "error TOC overflow" add -mminimal-toc to
-       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+       # Archives containing C++ object files must be created using
+       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+       # necessary to make sure instantiated templates are included
+       # in the archive.
+       old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+       ;;
+       gcx*)
+       # Green Hills C++ Compiler
+       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  
-       archive_cmds_F77=''
-       hardcode_direct_F77=yes
-       hardcode_libdir_separator_F77=':'
-       link_all_deplibs_F77=yes
+       # The C++ compiler must be used to create the archive.
+       old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+       ;;
+       *)
+       # GNU C++ compiler with Solaris linker
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+         if $CC --version | grep -v '^2\.7' > /dev/null; then
+           if $CC -v --help 2>/dev/null | grep -- -shared  > /dev/null 2> /dev/null; then
+             archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  
-       if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         hardcode_direct_F77=yes
+             # Commands to make compiler produce verbose output that lists
+             # what "hidden" libraries, object files and flags are used when
+             # linking a shared library.
+             output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+               lt_prog_compiler_static_CXX='-static'
+           else
+             archive_cmds_CXX='$CC ${wl}-G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC ${wl}-G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+             # Commands to make compiler produce verbose output that lists
+             # what "hidden" libraries, object files and flags are used when
+             # linking a shared library.
+             output_verbose_link_cmd="$CC ${wl}-G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+               lt_prog_compiler_static_CXX='${wl}-Bstatic'
+           fi
          else
-         # We have old collect2
-         hardcode_direct_F77=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L_F77=yes
-         hardcode_libdir_flag_spec_F77='-L$libdir'
-         hardcode_libdir_separator_F77=
+           # g++ 2.7 appears to require `-G' NOT `-shared' on this
+           # platform.
+           archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
          fi
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-       else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-       if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-       fi
+         hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
        fi
-       fi
+       ;;
+     esac
+     ;;
+   sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+     archive_cmds_need_lc_CXX=no
+     ;;
+   tandem*)
+     case $cc_basename in
+       NCC*)
+       # NonStop-UX NCC 3.20
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+       *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+     esac
+     ;;
+   vxworks*)
+     # FIXME: insert proper C++ library support
+     ld_shlibs_CXX=no
+     ;;
+   *)
+     # FIXME: insert proper C++ library support
+     ld_shlibs_CXX=no
+     ;;
+ esac
+ { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+ echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
  
-       # It seems that -bexpall does not export symbols beginning with
-       # underscore (_), so it is better to generate a list of symbols to export.
-       always_export_symbols_F77=yes
-       if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag_F77='-berok'
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-       program main
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
  
-       end
- _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_f77_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
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ cat > conftest.$ac_ext <<EOF
+ class Foo
+ {
+ public:
+   Foo (void) { a = 0; }
+ private:
+   int a;
+ };
+ EOF
+ 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
+   (exit $ac_status); }; then
+   # Parse the compiler output and extract the necessary
+   # objects, libraries and library flags.
  
- aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`; fi
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   # Sentinel used to keep track of whether or not we are before
+   # the conftest object file.
+   pre_test_object_deps_done=no
  
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+   # The `*' in the case matches for architectures that use `case' in
+   # $output_verbose_cmd can trigger glob expansion during the loop
+   # eval without this substitution.
+   output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
  
-        hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-       archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+   for p in `eval $output_verbose_link_cmd`; do
+     case $p in
+     -L* | -R* | -l*)
+        # Some compilers place space between "-{L,R}" and the path.
+        # Remove the space.
+        if test $p = "-L" \
+         || test $p = "-R"; then
+        prev=$p
+        continue
         else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag_F77="-z nodefs"
-         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-       program main
+        prev=
+        fi
  
-       end
- _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_f77_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
+        if test "$pre_test_object_deps_done" = no; then
+        case $p in
+        -L* | -R*)
+          # Internal compiler library paths should come after those
+          # provided the user.  The postdeps already come after the
+          # user supplied libs so there is no need to process them.
+          if test -z "$compiler_lib_search_path_CXX"; then
+            compiler_lib_search_path_CXX="${prev}${p}"
+          else
+            compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+          fi
+          ;;
+        # The "-l" case would never come before the object being
+        # linked, so don't bother handling this case.
+        esac
+        else
+        if test -z "$postdeps_CXX"; then
+          postdeps_CXX="${prev}${p}"
+        else
+          postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+        fi
+        fi
+        ;;
  
- aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
- }'`; fi
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+     *.$objext)
+        # This assumes that the test object file only shows up
+        # once in the compiler output.
+        if test "$p" = "conftest.$objext"; then
+        pre_test_object_deps_done=yes
+        continue
+        fi
+        if test "$pre_test_object_deps_done" = no; then
+        if test -z "$predep_objects_CXX"; then
+          predep_objects_CXX="$p"
+        else
+          predep_objects_CXX="$predep_objects_CXX $p"
+        fi
+        else
+        if test -z "$postdep_objects_CXX"; then
+          postdep_objects_CXX="$p"
+        else
+          postdep_objects_CXX="$postdep_objects_CXX $p"
+        fi
+        fi
+        ;;
  
+     *) ;; # Ignore the rest.
+     esac
+   done
+   # Clean up.
+   rm -f a.out a.exe
+ else
+   echo "libtool.m4: error: problem compiling CXX test program"
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
-        hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag_F77=' ${wl}-bernotok'
-         allow_undefined_flag_F77=' ${wl}-berok'
-         # -bexpall does not export symbols beginning with underscore (_)
-         always_export_symbols_F77=yes
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec_F77=' '
-         archive_cmds_need_lc_F77=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-       fi
-       ;;
+ $rm -f confest.$objext
  
-     amigaos*)
-       archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-       hardcode_libdir_flag_spec_F77='-L$libdir'
-       hardcode_minus_L_F77=yes
-       # see comment about different semantics on the GNU ld section
-       ld_shlibs_F77=no
-       ;;
+ # PORTME: override above test on systems where it is broken
+ case $host_os in
+ solaris*)
+   case $cc_basename in
+   CC*)
+     # Adding this requires a known-good setup of shared libraries for
+     # Sun compiler versions before 5.6, else PIC objects from an old
+     # archive will be linked into the output, leading to subtle bugs.
+     postdeps_CXX='-lCstd -lCrun'
+     ;;
+   esac
+ esac
  
-     bsdi[45]*)
-       export_dynamic_flag_spec_F77=-rdynamic
-       ;;
  
-     cygwin* | mingw* | pw32*)
-       # When not using gcc, we currently assume that we are using
-       # Microsoft Visual C++.
-       # hardcode_libdir_flag_spec is actually meaningless, as there is
-       # no search path for DLLs.
-       hardcode_libdir_flag_spec_F77=' '
-       allow_undefined_flag_F77=unsupported
-       # Tell ltmain to make .lib files, not .a files.
-       libext=lib
-       # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
-       # FIXME: Setting linknames here is a bad hack.
-       archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-       # The linker will automatically build a .lib file if we build a DLL.
-       old_archive_From_new_cmds_F77='true'
-       # FIXME: Should let the user specify the lib program.
-       old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
-       fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
-       enable_shared_with_static_runtimes_F77=yes
-       ;;
+ case " $postdeps_CXX " in
+ *" -lc "*) archive_cmds_need_lc_CXX=no ;;
+ esac
  
-     darwin* | rhapsody*)
-       case $host_os in
-         rhapsody* | darwin1.[012])
-          allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
-          ;;
-        *) # Darwin 1.3 on
-          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-            allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-          else
-            case ${MACOSX_DEPLOYMENT_TARGET} in
-              10.[012])
-                allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-                ;;
-              10.*)
-                allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
-                ;;
-            esac
-          fi
-          ;;
-       esac
-       archive_cmds_need_lc_F77=no
-       hardcode_direct_F77=no
-       hardcode_automatic_F77=yes
-       hardcode_shlibpath_var_F77=unsupported
-       whole_archive_flag_spec_F77=''
-       link_all_deplibs_F77=yes
-     if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-         archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-       module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-       archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-       module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-     else
-       case $cc_basename in
-         xlc*)
-          output_verbose_link_cmd='echo'
-          archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-          module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-           ;;
-        *)
-          ld_shlibs_F77=no
-           ;;
-       esac
-     fi
-       ;;
+ lt_prog_compiler_wl_CXX=
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX=
  
-     dgux*)
-       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_libdir_flag_spec_F77='-L$libdir'
-       hardcode_shlibpath_var_F77=no
-       ;;
+ { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
  
-     freebsd1*)
-       ld_shlibs_F77=no
-       ;;
+   # C++ specific cases for pic, static, wl, etc.
+   if test "$GXX" = yes; then
+     lt_prog_compiler_wl_CXX='-Wl,'
+     lt_prog_compiler_static_CXX='-static'
  
-     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-     # support.  Future versions do this automatically, but an explicit c++rt0.o
-     # does not break anything, and helps significantly (at the cost of a little
-     # extra space).
-     freebsd2.2*)
-       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-       hardcode_libdir_flag_spec_F77='-R$libdir'
-       hardcode_direct_F77=yes
-       hardcode_shlibpath_var_F77=no
+     case $host_os in
+     aix*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_CXX='-Bstatic'
+       fi
        ;;
-     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-     freebsd2*)
-       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_direct_F77=yes
-       hardcode_minus_L_F77=yes
-       hardcode_shlibpath_var_F77=no
+     amigaos*)
+       # FIXME: we need at least 68020 code to build shared libraries, but
+       # adding the `-m68020' flag to GCC prevents building anything better,
+       # like `-m68040'.
+       lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
        ;;
-     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-     freebsd* | kfreebsd*-gnu | dragonfly*)
-       archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-       hardcode_libdir_flag_spec_F77='-R$libdir'
-       hardcode_direct_F77=yes
-       hardcode_shlibpath_var_F77=no
+     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
        ;;
-     hpux9*)
-       if test "$GCC" = yes; then
-       archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-       else
-       archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+     mingw* | os2* | pw32*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+       ;;
+     darwin* | rhapsody*)
+       # PIC is the default on this platform
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic_CXX='-fno-common'
+       ;;
+     *djgpp*)
+       # DJGPP does not support shared libraries at all
+       lt_prog_compiler_pic_CXX=
+       ;;
+     sysv4*MP*)
+       if test -d /usr/nec; then
+       lt_prog_compiler_pic_CXX=-Kconform_pic
        fi
-       hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_F77=:
-       hardcode_direct_F77=yes
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L_F77=yes
-       export_dynamic_flag_spec_F77='${wl}-E'
        ;;
-     hpux10* | hpux11*)
-       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*|ia64*)
-         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+     hpux*)
+       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+       # not for PA HP-UX.
+       case $host_cpu in
+       hppa*64*|ia64*)
+       ;;
+       *)
+       lt_prog_compiler_pic_CXX='-fPIC'
+       ;;
+       esac
+       ;;
+     *)
+       lt_prog_compiler_pic_CXX='-fPIC'
+       ;;
+     esac
+   else
+     case $host_os in
+       aix4* | aix5*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+         # AIX 5 now supports IA64 processor
+         lt_prog_compiler_static_CXX='-Bstatic'
+       else
+         lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+       chorus*)
+       case $cc_basename in
+       cxch68*)
+         # Green Hills C++ Compiler
+         # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
          ;;
        esac
-       else
-       case $host_cpu in
-       hppa*64*|ia64*)
-         archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
-         ;;
-       *)
-         archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-         ;;
+       ;;
+        darwin*)
+          # PIC is the default on this platform
+          # Common symbols not allowed in MH_DYLIB files
+          case $cc_basename in
+            xlc*)
+            lt_prog_compiler_pic_CXX='-qnocommon'
+            lt_prog_compiler_wl_CXX='-Wl,'
+            ;;
+          esac
+        ;;
+       dgux*)
+       case $cc_basename in
+         ec++*)
+           lt_prog_compiler_pic_CXX='-KPIC'
+           ;;
+         ghcx*)
+           # Green Hills C++ Compiler
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+       freebsd* | kfreebsd*-gnu | dragonfly*)
+       # FreeBSD uses GNU C++
+       ;;
+       hpux9* | hpux10* | hpux11*)
+       case $cc_basename in
+         CC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+           if test "$host_cpu" != ia64; then
+             lt_prog_compiler_pic_CXX='+Z'
+           fi
+           ;;
+         aCC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+           case $host_cpu in
+           hppa*64*|ia64*)
+             # +Z the default
+             ;;
+           *)
+             lt_prog_compiler_pic_CXX='+Z'
+             ;;
+           esac
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+       irix5* | irix6* | nonstopux*)
+       case $cc_basename in
+         CC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX='-non_shared'
+           # CC pic flag -KPIC is the default.
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+       linux*)
+       case $cc_basename in
+         KCC*)
+           # KAI C++ Compiler
+           lt_prog_compiler_wl_CXX='--backend -Wl,'
+           lt_prog_compiler_pic_CXX='-fPIC'
+           ;;
+         icpc* | ecpc*)
+           # Intel C++
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-static'
+           ;;
+         pgCC*)
+           # Portland Group C++ compiler.
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-fpic'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           ;;
+         cxx*)
+           # Compaq C++
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           lt_prog_compiler_pic_CXX=
+           lt_prog_compiler_static_CXX='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+       lynxos*)
+       ;;
+       m88k*)
+       ;;
+       mvs*)
+       case $cc_basename in
+         cxx*)
+           lt_prog_compiler_pic_CXX='-W c,exportall'
+           ;;
+         *)
+           ;;
        esac
-       fi
-       if test "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-         hardcode_libdir_flag_spec_ld_F77='+b $libdir'
-         hardcode_libdir_separator_F77=:
-         hardcode_direct_F77=no
-         hardcode_shlibpath_var_F77=no
-         ;;
-       ia64*)
-         hardcode_libdir_flag_spec_F77='-L$libdir'
-         hardcode_direct_F77=no
-         hardcode_shlibpath_var_F77=no
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L_F77=yes
-         ;;
-       *)
-         hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-         hardcode_libdir_separator_F77=:
-         hardcode_direct_F77=yes
-         export_dynamic_flag_spec_F77='${wl}-E'
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L_F77=yes
-         ;;
+       ;;
+       netbsd*)
+       ;;
+       osf3* | osf4* | osf5*)
+       case $cc_basename in
+         KCC*)
+           lt_prog_compiler_wl_CXX='--backend -Wl,'
+           ;;
+         RCC*)
+           # Rational C++ 2.4.1
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         cxx*)
+           # Digital/Compaq C++
+           lt_prog_compiler_wl_CXX='-Wl,'
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           lt_prog_compiler_pic_CXX=
+           lt_prog_compiler_static_CXX='-non_shared'
+           ;;
+         *)
+           ;;
        esac
-       fi
-       ;;
-     irix5* | irix6* | nonstopux*)
-       if test "$GCC" = yes; then
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       else
-       archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
-       fi
-       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator_F77=:
-       link_all_deplibs_F77=yes
-       ;;
+       ;;
+       psos*)
+       ;;
+       sco*)
+       case $cc_basename in
+         CC*)
+           lt_prog_compiler_pic_CXX='-fPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+       solaris*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.2, 5.x and Centerline C++
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           lt_prog_compiler_wl_CXX='-Qoption ld '
+           ;;
+         gcx*)
+           # Green Hills C++ Compiler
+           lt_prog_compiler_pic_CXX='-PIC'
+           ;;
+         *)
+           if $CC -v --help 2>/dev/null | grep -- -static  > /dev/null 2> /dev/null; then
+             lt_prog_compiler_static_CXX='-static'
+           else
+             # GCC with Sun linker
+             lt_prog_compiler_pic_CXX='-KPIC'
+             lt_prog_compiler_static_CXX='${wl}-Bstatic'
+             fi
+           ;;
+       esac
+       ;;
+       sunos4*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.x
+           lt_prog_compiler_pic_CXX='-pic'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           ;;
+         lcc*)
+           # Lucid
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+       tandem*)
+       case $cc_basename in
+         NCC*)
+           # NonStop-UX NCC 3.20
+           lt_prog_compiler_pic_CXX='-KPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+       unixware*)
+       ;;
+       vxworks*)
+       ;;
+       *)
+       lt_prog_compiler_can_build_shared_CXX=no
+       ;;
+     esac
+   fi
  
-     netbsd*)
-       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-       else
-       archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-       fi
-       hardcode_libdir_flag_spec_F77='-R$libdir'
-       hardcode_direct_F77=yes
-       hardcode_shlibpath_var_F77=no
-       ;;
+ { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+ echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
  
-     newsos6)
-       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_direct_F77=yes
-       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator_F77=:
-       hardcode_shlibpath_var_F77=no
-       ;;
+ #
+ # Check to make sure the PIC flag actually works.
+ #
+ if test -n "$lt_prog_compiler_pic_CXX"; then
  
-     openbsd*)
-       hardcode_direct_F77=yes
-       hardcode_shlibpath_var_F77=no
-       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec_F77='${wl}-E'
-       else
-        case $host_os in
-        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-          archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          hardcode_libdir_flag_spec_F77='-R$libdir'
-          ;;
-        *)
-          archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-          ;;
-        esac
-       fi
-       ;;
+ { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+ echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
+ if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    # The option is referenced via a variable to avoid confusing sed.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:40141: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+    echo "$as_me:40145: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
+      $SED '/^$/d' conftest.err >conftest.er2
+      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
+        lt_prog_compiler_pic_works_CXX=yes
+      fi
+    fi
+    $rm conftest*
  
-     os2*)
-       hardcode_libdir_flag_spec_F77='-L$libdir'
-       hardcode_minus_L_F77=yes
-       allow_undefined_flag_F77=unsupported
-       archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-       old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-       ;;
+ fi
+ { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
+ echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; }
  
-     osf3*)
-       if test "$GCC" = yes; then
-       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       else
-       allow_undefined_flag_F77=' -expect_unresolved \*'
-       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       fi
-       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator_F77=:
-       ;;
+ if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+     case $lt_prog_compiler_pic_CXX in
+      "" | " "*) ;;
+      *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+      esac
+ else
+     lt_prog_compiler_pic_CXX=
+      lt_prog_compiler_can_build_shared_CXX=no
+ fi
  
-     osf4* | osf5*)    # as osf3* with the addition of -msym flag
      if test "$GCC" = yes; then
-       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-       else
-       allow_undefined_flag_F77=' -expect_unresolved \*'
-       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+ fi
case $host_os in
+   # For platforms which do not support PIC, -DPIC is meaningless:
+   *djgpp*)
+     lt_prog_compiler_pic_CXX=
+     ;;
+   *)
+     lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+     ;;
+ esac
  
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec_F77='-rpath $libdir'
-       fi
-       hardcode_libdir_separator_F77=:
-       ;;
+ { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+ echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+ if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_cv_prog_compiler_c_o_CXX=no
+    $rm -r conftest 2>/dev/null
+    mkdir conftest
+    cd conftest
+    mkdir out
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  
-     sco3.2v5*)
-       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var_F77=no
-       export_dynamic_flag_spec_F77='${wl}-Bexport'
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ;;
+    lt_compiler_flag="-o out/conftest2.$ac_objext"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:40203: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+    echo "$as_me:40207: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
+      $SED '/^$/d' out/conftest.err >out/conftest.er2
+      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+        lt_cv_prog_compiler_c_o_CXX=yes
+      fi
+    fi
+    chmod u+w . 2>&5
+    $rm conftest*
+    # SGI C++ compiler will create directory out/ii_files/ for
+    # template instantiation
+    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+    $rm out/* && rmdir out
+    cd ..
+    rmdir conftest
+    $rm conftest*
  
-     solaris*)
-       no_undefined_flag_F77=' -z text'
-       if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-       else
-       wlarc=''
-       archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-       fi
-       hardcode_libdir_flag_spec_F77='-R$libdir'
-       hardcode_shlibpath_var_F77=no
-       case $host_os in
-       solaris2.[0-5] | solaris2.[0-5].*) ;;
-       *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
-       *)
-         whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-       esac
-       link_all_deplibs_F77=yes
-       ;;
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+ echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
  
-     sunos4*)
-       if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-       else
-       archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-       fi
-       hardcode_libdir_flag_spec_F77='-L$libdir'
-       hardcode_direct_F77=yes
-       hardcode_minus_L_F77=yes
-       hardcode_shlibpath_var_F77=no
-       ;;
  
-     sysv4)
-       case $host_vendor in
-       sni)
-         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_F77=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds_F77='$CC -r -o $output$reload_objs'
-         hardcode_direct_F77=no
-         ;;
-       motorola)
-         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
-       ;;
-       esac
-       runpath_var='LD_RUN_PATH'
-       hardcode_shlibpath_var_F77=no
-       ;;
+ hard_links="nottested"
+ if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+   # do not overwrite the value of need_locks provided by the user
+   { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+ echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+   hard_links=yes
+   $rm conftest*
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   touch conftest.a
+   ln conftest.a conftest.b 2>&5 || hard_links=no
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   { echo "$as_me:$LINENO: result: $hard_links" >&5
+ echo "${ECHO_T}$hard_links" >&6; }
+   if test "$hard_links" = no; then
  
-     sysv4.3*)
-       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var_F77=no
-       export_dynamic_flag_spec_F77='-Bexport'
-       ;;
+     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+ echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
  
-     sysv4*MP*)
-       if test -d /usr/nec; then
-       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var_F77=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs_F77=yes
-       fi
-       ;;
  
-     sysv4.2uw2*)
-       archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_direct_F77=yes
-       hardcode_minus_L_F77=no
-       hardcode_shlibpath_var_F77=no
-       hardcode_runpath_var=yes
-       runpath_var=LD_RUN_PATH
-       ;;
+     cat <<AAW_EOF >>config.warnings
+ \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
+ AAW_EOF
  
-    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
-       no_undefined_flag_F77='${wl}-z ${wl}text'
-       if test "$GCC" = yes; then
-       archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       else
-       archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       fi
-       runpath_var='LD_RUN_PATH'
-       hardcode_shlibpath_var_F77=no
-       ;;
  
-     sysv5*)
-       no_undefined_flag_F77=' -z text'
-       # $CC -shared without GNU ld will not create a library from C++
-       # object files and a static libstdc++, better avoid it by now
-       archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-       hardcode_libdir_flag_spec_F77=
-       hardcode_shlibpath_var_F77=no
-       runpath_var='LD_RUN_PATH'
-       ;;
+     need_locks=warn
+   fi
+ else
+   need_locks=no
+ fi
  
-     uts4*)
-       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_libdir_flag_spec_F77='-L$libdir'
-       hardcode_shlibpath_var_F77=no
-       ;;
+ { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
  
-     *)
-       ld_shlibs_F77=no
-       ;;
-     esac
-   fi
+   export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   case $host_os in
+   aix4* | aix5*)
+     # If we're using GNU nm, then we don't want the "-C" option.
+     # -C means demangle to AIX nm, but means don't demangle with GNU nm
+     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+       export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+     else
+       export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+     fi
+     ;;
+   pw32*)
+     export_symbols_cmds_CXX="$ltdll_cmds"
+   ;;
+   cygwin* | mingw*)
+     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+   ;;
+   *)
+     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   ;;
+   esac
  
echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
- echo "${ECHO_T}$ld_shlibs_F77" >&6
- test "$ld_shlibs_F77" = no && can_build_shared=no
{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+ echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
  
  variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  if test "$GCC" = yes; then
  #
  # Do we need to explicitly link libc?
  #
- case "x$archive_cmds_need_lc_F77" in
+ case "x$archive_cmds_need_lc_CXX" in
  x|xyes)
    # Assume -lc should be added
-   archive_cmds_need_lc_F77=yes
+   archive_cmds_need_lc_CXX=yes
  
    if test "$enable_shared" = yes && test "$GCC" = yes; then
-     case $archive_cmds_F77 in
+     case $archive_cmds_CXX in
      *'~'*)
        # FIXME: we may have to deal with multi-command sequences.
        ;;
        # Test whether the compiler implicitly links with -lc since on some
        # systems, -lgcc has to come before -lc. If gcc already passes -lc
        # to ld, don't add -lc before -lgcc.
-       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
- echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
        $rm conftest*
        printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  
          lib=conftest
          libobjs=conftest.$ac_objext
          deplibs=
-         wl=$lt_prog_compiler_wl_F77
+         wl=$lt_prog_compiler_wl_CXX
          compiler_flags=-v
          linker_flags=-v
          verstring=
          output_objdir=.
          libname=conftest
-         lt_save_allow_undefined_flag=$allow_undefined_flag_F77
-         allow_undefined_flag_F77=
-         if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-   (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+         lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+         allow_undefined_flag_CXX=
+         if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+   (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }
          then
-         archive_cmds_need_lc_F77=no
+         archive_cmds_need_lc_CXX=no
          else
-         archive_cmds_need_lc_F77=yes
+         archive_cmds_need_lc_CXX=yes
          fi
-         allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+         allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
        else
          cat conftest.err 1>&5
        fi
        $rm conftest*
-       echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
- echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
+       { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+ echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
        ;;
      esac
    fi
    ;;
  esac
  
- echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
- echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+ echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
  library_names_spec=
  libname_spec='lib$name'
  soname_spec=
    dynamic_linker=no
    ;;
  esac
- echo "$as_me:$LINENO: result: $dynamic_linker" >&5
- echo "${ECHO_T}$dynamic_linker" >&6
echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+ echo "${ECHO_T}$dynamic_linker" >&6; }
  test "$dynamic_linker" = no && can_build_shared=no
  
- echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
- echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
- hardcode_action_F77=
- if test -n "$hardcode_libdir_flag_spec_F77" || \
-    test -n "$runpath_var_F77" || \
-    test "X$hardcode_automatic_F77" = "Xyes" ; then
echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+ echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+ hardcode_action_CXX=
+ if test -n "$hardcode_libdir_flag_spec_CXX" || \
+    test -n "$runpath_var_CXX" || \
+    test "X$hardcode_automatic_CXX" = "Xyes" ; then
  
    # We can hardcode non-existant directories.
-   if test "$hardcode_direct_F77" != no &&
+   if test "$hardcode_direct_CXX" != no &&
       # If the only mechanism to avoid hardcoding is shlibpath_var, we
       # have to relink, otherwise we might link with an installed library
       # when we should be linking with a yet-to-be-installed one
-      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
-      test "$hardcode_minus_L_F77" != no; then
+      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+      test "$hardcode_minus_L_CXX" != no; then
      # Linking always hardcodes the temporary library directory.
-     hardcode_action_F77=relink
+     hardcode_action_CXX=relink
    else
      # We can link without hardcoding, and we can hardcode nonexisting dirs.
-     hardcode_action_F77=immediate
+     hardcode_action_CXX=immediate
    fi
  else
    # We cannot hardcode anything, or else we can only hardcode existing
    # directories.
-   hardcode_action_F77=unsupported
+   hardcode_action_CXX=unsupported
  fi
echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
- echo "${ECHO_T}$hardcode_action_F77" >&6
{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+ echo "${ECHO_T}$hardcode_action_CXX" >&6; }
  
- if test "$hardcode_action_F77" = relink; then
+ if test "$hardcode_action_CXX" = relink; then
    # Fast installation is not supported
    enable_fast_install=no
  elif test "$shlibpath_overrides_runpath" = yes ||
  
  striplib=
  old_striplib=
- echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
- echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+ echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
  if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
    test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
    test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-   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
  # FIXME - insert some real tests, host_os isn't really good enough
    case $host_os in
     darwin*)
         if test -n "$STRIP" ; then
           striplib="$STRIP -x"
-          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" >&5
- echo "${ECHO_T}no" >&6
+   echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
         ;;
     *)
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+   echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
      ;;
    esac
  fi
  
+ if test "x$enable_dlopen" != xyes; then
+   enable_dlopen=unknown
+   enable_dlopen_self=unknown
+   enable_dlopen_self_static=unknown
+ else
+   lt_cv_dlopen=no
+   lt_cv_dlopen_libs=
  
- # The else clause should only fire when bootstrapping the
- # libtool distribution, otherwise you forgot to ship ltmain.sh
- # with your package, and you will get complaints that there are
- # no rules to generate ltmain.sh.
- if test -f "$ltmain"; then
-   # See if we are running on zsh, and set the options which allow our commands through
-   # without removal of \ escapes.
-   if test -n "${ZSH_VERSION+set}" ; then
-     setopt NO_GLOB_SUBST
-   fi
-   # Now quote all the things that may contain metacharacters while being
-   # careful not to overquote the AC_SUBSTed values.  We take copies of the
-   # variables and quote the copies for generation of the libtool script.
-   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
-     SED SHELL STRIP \
-     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-     deplibs_check_method reload_flag reload_cmds need_locks \
-     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-     lt_cv_sys_global_symbol_to_c_name_address \
-     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-     old_postinstall_cmds old_postuninstall_cmds \
-     compiler_F77 \
-     CC_F77 \
-     LD_F77 \
-     lt_prog_compiler_wl_F77 \
-     lt_prog_compiler_pic_F77 \
-     lt_prog_compiler_static_F77 \
-     lt_prog_compiler_no_builtin_flag_F77 \
-     export_dynamic_flag_spec_F77 \
-     thread_safe_flag_spec_F77 \
-     whole_archive_flag_spec_F77 \
-     enable_shared_with_static_runtimes_F77 \
-     old_archive_cmds_F77 \
-     old_archive_from_new_cmds_F77 \
-     predep_objects_F77 \
-     postdep_objects_F77 \
-     predeps_F77 \
-     postdeps_F77 \
-     compiler_lib_search_path_F77 \
-     archive_cmds_F77 \
-     archive_expsym_cmds_F77 \
-     postinstall_cmds_F77 \
-     postuninstall_cmds_F77 \
-     old_archive_from_expsyms_cmds_F77 \
-     allow_undefined_flag_F77 \
-     no_undefined_flag_F77 \
-     export_symbols_cmds_F77 \
-     hardcode_libdir_flag_spec_F77 \
-     hardcode_libdir_flag_spec_ld_F77 \
-     hardcode_libdir_separator_F77 \
-     hardcode_automatic_F77 \
-     module_cmds_F77 \
-     module_expsym_cmds_F77 \
-     lt_cv_prog_compiler_c_o_F77 \
-     exclude_expsyms_F77 \
-     include_expsyms_F77; do
-     case $var in
-     old_archive_cmds_F77 | \
-     old_archive_from_new_cmds_F77 | \
-     archive_cmds_F77 | \
-     archive_expsym_cmds_F77 | \
-     module_cmds_F77 | \
-     module_expsym_cmds_F77 | \
-     old_archive_from_expsyms_cmds_F77 | \
-     export_symbols_cmds_F77 | \
-     extract_expsyms_cmds | reload_cmds | finish_cmds | \
-     postinstall_cmds | postuninstall_cmds | \
-     old_postinstall_cmds | old_postuninstall_cmds | \
-     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-       # Double-quote double-evaled strings.
-       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-       ;;
-     *)
-       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-       ;;
-     esac
-   done
-   case $lt_echo in
-   *'\$0 --fallback-echo"')
-     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+   case $host_os in
+   beos*)
+     lt_cv_dlopen="load_add_on"
+     lt_cv_dlopen_libs=
+     lt_cv_dlopen_self=yes
      ;;
-   esac
- cfgfile="$ofile"
-   cat <<__EOF__ >> "$cfgfile"
- # ### BEGIN LIBTOOL TAG CONFIG: $tagname
- # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
- # Shell to use when invoking shell scripts.
- SHELL=$lt_SHELL
- # Whether or not to build shared libraries.
- build_libtool_libs=$enable_shared
  
- # Whether or not to build static libraries.
- build_old_libs=$enable_static
- # Whether or not to add -lc for building shared libraries.
- build_libtool_need_lc=$archive_cmds_need_lc_F77
- # Whether or not to disallow shared libs when runtime libs are static
- allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
- # Whether or not to optimize for fast installation.
- fast_install=$enable_fast_install
- # The host system.
- host_alias=$host_alias
- host=$host
- host_os=$host_os
- # The build system.
- build_alias=$build_alias
- build=$build
- build_os=$build_os
- # An echo program that does not interpret backslashes.
- echo=$lt_echo
- # The archiver.
- AR=$lt_AR
- AR_FLAGS=$lt_AR_FLAGS
- # A C compiler.
- LTCC=$lt_LTCC
- # A language-specific compiler.
- CC=$lt_compiler_F77
- # Is the compiler the GNU C compiler?
- with_gcc=$GCC_F77
- # An ERE matcher.
- EGREP=$lt_EGREP
- # The linker used to build libraries.
- LD=$lt_LD_F77
- # Whether we need hard or soft links.
- LN_S=$lt_LN_S
- # A BSD-compatible nm program.
- NM=$lt_NM
- # A symbol stripping program
- STRIP=$lt_STRIP
- # Used to examine libraries when file_magic_cmd begins "file"
- MAGIC_CMD=$MAGIC_CMD
- # Used on cygwin: DLL creation program.
- DLLTOOL="$DLLTOOL"
- # Used on cygwin: object dumper.
- OBJDUMP="$OBJDUMP"
- # Used on cygwin: assembler.
- AS="$AS"
- # The name of the directory that contains temporary libtool files.
- objdir=$objdir
- # How to create reloadable object files.
- reload_flag=$lt_reload_flag
- reload_cmds=$lt_reload_cmds
- # How to pass a linker flag through the compiler.
- wl=$lt_lt_prog_compiler_wl_F77
- # Object file suffix (normally "o").
- objext="$ac_objext"
- # Old archive suffix (normally "a").
- libext="$libext"
- # Shared library suffix (normally ".so").
- shrext_cmds='$shrext_cmds'
- # Executable file suffix (normally "").
- exeext="$exeext"
- # Additional compiler flags for building library objects.
- pic_flag=$lt_lt_prog_compiler_pic_F77
- pic_mode=$pic_mode
- # What is the maximum length of a command?
- max_cmd_len=$lt_cv_sys_max_cmd_len
- # Does compiler simultaneously support -c and -o options?
- compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
- # Must we lock files when doing compilation?
- need_locks=$lt_need_locks
- # Do we need the lib prefix for modules?
- need_lib_prefix=$need_lib_prefix
+   mingw* | pw32*)
+     lt_cv_dlopen="LoadLibrary"
+     lt_cv_dlopen_libs=
+    ;;
  
- # Do we need a version for libraries?
- need_version=$need_version
+   cygwin*)
+     lt_cv_dlopen="dlopen"
+     lt_cv_dlopen_libs=
+    ;;
  
- # Whether dlopen is supported.
- dlopen_support=$enable_dlopen
+   darwin*)
+   # if libdl is installed we need to link against it
+     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+ echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldl  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
- # Whether dlopen of programs is supported.
- dlopen_self=$enable_dlopen_self
+ /* 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
+ char dlopen ();
+ int
+ main ()
+ {
+ return dlopen ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_dl_dlopen=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # Whether dlopen of statically linked programs is supported.
- dlopen_self_static=$enable_dlopen_self_static
+       ac_cv_lib_dl_dlopen=no
+ fi
  
- # Compiler flag to prevent dynamic linking.
- link_static_flag=$lt_lt_prog_compiler_static_F77
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+ if test $ac_cv_lib_dl_dlopen = yes; then
+   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ else
  
- # Compiler flag to turn off builtin functions.
- no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+     lt_cv_dlopen="dyld"
+     lt_cv_dlopen_libs=
+     lt_cv_dlopen_self=yes
  
- # Compiler flag to allow reflexive dlopens.
- export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+ fi
  
- # Compiler flag to generate shared objects directly from archives.
- whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+    ;;
  
- # Compiler flag to generate thread-safe objects.
- thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+   *)
+     { echo "$as_me:$LINENO: checking for shl_load" >&5
+ echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
+ if test "${ac_cv_func_shl_load+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 shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+ #define shl_load innocuous_shl_load
  
- # Library versioning type.
- version_type=$version_type
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char shl_load (); below.
+     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+     <limits.h> exists even on freestanding compilers.  */
  
- # Format of library name prefix.
- libname_spec=$lt_libname_spec
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
  
- # List of archive names.  First name is the real one, the rest are links.
- # The last name is the one that the linker finds with -lNAME.
- library_names_spec=$lt_library_names_spec
+ #undef shl_load
  
- # The coded name of the library, if different from the real name.
- soname_spec=$lt_soname_spec
+ /* 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
+ char shl_load ();
+ /* 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_shl_load || defined __stub___shl_load
+ choke me
+ #endif
  
- # Commands used to build and install an old-style archive.
- RANLIB=$lt_RANLIB
- old_archive_cmds=$lt_old_archive_cmds_F77
- old_postinstall_cmds=$lt_old_postinstall_cmds
- old_postuninstall_cmds=$lt_old_postuninstall_cmds
+ int
+ main ()
+ {
+ return shl_load ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_func_shl_load=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # Create an old-style archive from a shared archive.
- old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+       ac_cv_func_shl_load=no
+ fi
  
- # Create a temporary old-style archive to link instead of a shared archive.
- old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+ 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_shl_load" >&5
+ echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
+ if test $ac_cv_func_shl_load = yes; then
+   lt_cv_dlopen="shl_load"
+ else
+   { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+ echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldld  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
- # Commands used to build and install a shared archive.
- archive_cmds=$lt_archive_cmds_F77
- archive_expsym_cmds=$lt_archive_expsym_cmds_F77
- postinstall_cmds=$lt_postinstall_cmds
- postuninstall_cmds=$lt_postuninstall_cmds
+ /* 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
+ char shl_load ();
+ int
+ main ()
+ {
+ return shl_load ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_dld_shl_load=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # Commands used to build a loadable module (assumed same as above if empty)
- module_cmds=$lt_module_cmds_F77
- module_expsym_cmds=$lt_module_expsym_cmds_F77
+       ac_cv_lib_dld_shl_load=no
+ fi
  
- # Commands to strip libraries.
- old_striplib=$lt_old_striplib
- striplib=$lt_striplib
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+ echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
+ if test $ac_cv_lib_dld_shl_load = yes; then
+   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+ else
+   { echo "$as_me:$LINENO: checking for dlopen" >&5
+ echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
+ if test "${ac_cv_func_dlopen+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 dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+ #define dlopen innocuous_dlopen
  
- # Dependencies to place before the objects being linked to create a
- # shared library.
- predep_objects=$lt_predep_objects_F77
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char dlopen (); below.
+     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+     <limits.h> exists even on freestanding compilers.  */
  
- # Dependencies to place after the objects being linked to create a
- # shared library.
- postdep_objects=$lt_postdep_objects_F77
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
  
- # Dependencies to place before the objects being linked to create a
- # shared library.
- predeps=$lt_predeps_F77
+ #undef dlopen
  
- # Dependencies to place after the objects being linked to create a
- # shared library.
- postdeps=$lt_postdeps_F77
+ /* 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
+ char dlopen ();
+ /* 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_dlopen || defined __stub___dlopen
+ choke me
+ #endif
  
- # The library search path used internally by the compiler when linking
- # a shared library.
- compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+ int
+ main ()
+ {
+ return dlopen ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_func_dlopen=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # Method to check whether dependent libraries are shared objects.
- deplibs_check_method=$lt_deplibs_check_method
+       ac_cv_func_dlopen=no
+ fi
  
- # Command to use when deplibs_check_method == file_magic.
- file_magic_cmd=$lt_file_magic_cmd
+ 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_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
+ if test $ac_cv_func_dlopen = yes; then
+   lt_cv_dlopen="dlopen"
+ else
+   { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+ echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldl  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
- # Flag that allows shared libraries with undefined symbols to be built.
- allow_undefined_flag=$lt_allow_undefined_flag_F77
+ /* 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
+ char dlopen ();
+ int
+ main ()
+ {
+ return dlopen ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_dl_dlopen=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # Flag that forces no undefined symbols.
- no_undefined_flag=$lt_no_undefined_flag_F77
+       ac_cv_lib_dl_dlopen=no
+ fi
  
- # Commands used to finish a libtool library installation in a directory.
- finish_cmds=$lt_finish_cmds
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+ if test $ac_cv_lib_dl_dlopen = yes; then
+   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ else
+   { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+ echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lsvld  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
- # Same as above, but a single script fragment to be evaled but not shown.
- finish_eval=$lt_finish_eval
+ /* 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
+ char dlopen ();
+ int
+ main ()
+ {
+ return dlopen ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_svld_dlopen=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # Take the output of nm and produce a listing of raw symbols and C names.
- global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+       ac_cv_lib_svld_dlopen=no
+ fi
  
- # Transform the output of nm in a proper C declaration
- global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
+ if test $ac_cv_lib_svld_dlopen = yes; then
+   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+ else
+   { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+ echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldld  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
  
- # Transform the output of nm in a C name address pair
- global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+ /* 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
+ char dld_link ();
+ int
+ main ()
+ {
+ return dld_link ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_dld_dld_link=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- # This is the shared library runtime path variable.
- runpath_var=$runpath_var
+       ac_cv_lib_dld_dld_link=no
+ fi
  
- # This is the shared library path variable.
- shlibpath_var=$shlibpath_var
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+ echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
+ if test $ac_cv_lib_dld_dld_link = yes; then
+   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+ fi
  
- # Is shlibpath searched before the hard-coded library search path?
- shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  
- # How to hardcode a shared library path into an executable.
- hardcode_action=$hardcode_action_F77
+ fi
  
- # Whether we should hardcode library paths into libraries.
- hardcode_into_libs=$hardcode_into_libs
  
- # Flag to hardcode \$libdir into a binary during linking.
- # This must work even if \$libdir does not exist.
- hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+ fi
  
- # If ld is used when linking, flag to hardcode \$libdir into
- # a binary during linking. This must work even if \$libdir does
- # not exist.
- hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
  
- # Whether we need a single -rpath flag with a separated argument.
- hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+ fi
  
- # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
- # resulting binary.
- hardcode_direct=$hardcode_direct_F77
  
- # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
- # resulting binary.
- hardcode_minus_L=$hardcode_minus_L_F77
+ fi
  
- # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
- # the resulting binary.
- hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
  
- # Set to yes if building a shared library automatically hardcodes DIR into the library
- # and all subsequent libraries and executables linked against it.
- hardcode_automatic=$hardcode_automatic_F77
+ fi
  
- # Variables whose values should be saved in libtool wrapper scripts and
- # restored at relink time.
- variables_saved_for_relink="$variables_saved_for_relink"
+     ;;
+   esac
  
- # Whether libtool must link a program against all its dependency libraries.
- link_all_deplibs=$link_all_deplibs_F77
+   if test "x$lt_cv_dlopen" != xno; then
+     enable_dlopen=yes
+   else
+     enable_dlopen=no
+   fi
  
- # Compile-time system search path for libraries
- sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+   case $lt_cv_dlopen in
+   dlopen)
+     save_CPPFLAGS="$CPPFLAGS"
+     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  
- # Run-time system search path for libraries
- sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+     save_LDFLAGS="$LDFLAGS"
+     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  
- # Fix the shell variable \$srcfile for the compiler.
fix_srcfile_path="$fix_srcfile_path_F77"
+     save_LIBS="$LIBS"
    LIBS="$lt_cv_dlopen_libs $LIBS"
  
- # Set to yes if exported symbols are required.
- always_export_symbols=$always_export_symbols_F77
+     { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+ echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
+ if test "${lt_cv_dlopen_self+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         if test "$cross_compiling" = yes; then :
+   lt_cv_dlopen_self=cross
+ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<EOF
+ #line 41555 "configure"
+ #include "confdefs.h"
  
- # The commands to list exported symbols.
- export_symbols_cmds=$lt_export_symbols_cmds_F77
+ #if HAVE_DLFCN_H
+ #include <dlfcn.h>
+ #endif
  
- # The commands to extract the exported symbol list from a shared archive.
- extract_expsyms_cmds=$lt_extract_expsyms_cmds
+ #include <stdio.h>
  
- # Symbols that should not be listed in the preloaded symbols.
- exclude_expsyms=$lt_exclude_expsyms_F77
+ #ifdef RTLD_GLOBAL
+ #  define LT_DLGLOBAL         RTLD_GLOBAL
+ #else
+ #  ifdef DL_GLOBAL
+ #    define LT_DLGLOBAL               DL_GLOBAL
+ #  else
+ #    define LT_DLGLOBAL               0
+ #  endif
+ #endif
  
- # Symbols that must always be exported.
- include_expsyms=$lt_include_expsyms_F77
+ /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+    find out it does not work in some platform. */
+ #ifndef LT_DLLAZY_OR_NOW
+ #  ifdef RTLD_LAZY
+ #    define LT_DLLAZY_OR_NOW          RTLD_LAZY
+ #  else
+ #    ifdef DL_LAZY
+ #      define LT_DLLAZY_OR_NOW                DL_LAZY
+ #    else
+ #      ifdef RTLD_NOW
+ #        define LT_DLLAZY_OR_NOW      RTLD_NOW
+ #      else
+ #        ifdef DL_NOW
+ #          define LT_DLLAZY_OR_NOW    DL_NOW
+ #        else
+ #          define LT_DLLAZY_OR_NOW    0
+ #        endif
+ #      endif
+ #    endif
+ #  endif
+ #endif
  
- # ### END LIBTOOL TAG CONFIG: $tagname
+ #ifdef __cplusplus
+ extern "C" void exit (int);
+ #endif
  
- __EOF__
+ void fnord() { int i=42;}
+ int main ()
+ {
+   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+   int status = $lt_dlunknown;
  
+   if (self)
+     {
+       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+       /* dlclose (self); */
+     }
  
- else
-   # If there is no Makefile yet, we rely on a make rule to execute
-   # `config.status --recheck' to rerun these tests and create the
-   # libtool script then.
-   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-   if test -f "$ltmain_in"; then
-     test -f Makefile && make "$ltmain"
+     exit (status);
+ }
+ EOF
+   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); } && test -s conftest${ac_exeext} 2>/dev/null; then
+     (./conftest; exit; ) >&5 2>/dev/null
+     lt_status=$?
+     case x$lt_status in
+       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+     esac
+   else :
+     # compilation failed
+     lt_cv_dlopen_self=no
    fi
  fi
+ rm -fr conftest*
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+ echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
+     if test "x$lt_cv_dlopen_self" = xyes; then
+       LDFLAGS="$LDFLAGS $link_static_flag"
+       { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+ echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
+ if test "${lt_cv_dlopen_self_static+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         if test "$cross_compiling" = yes; then :
+   lt_cv_dlopen_self_static=cross
+ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<EOF
+ #line 41653 "configure"
+ #include "confdefs.h"
  
+ #if HAVE_DLFCN_H
+ #include <dlfcn.h>
+ #endif
  
- 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
+ #include <stdio.h>
  
- CC="$lt_save_CC"
+ #ifdef RTLD_GLOBAL
+ #  define LT_DLGLOBAL         RTLD_GLOBAL
+ #else
+ #  ifdef DL_GLOBAL
+ #    define LT_DLGLOBAL               DL_GLOBAL
+ #  else
+ #    define LT_DLGLOBAL               0
+ #  endif
+ #endif
  
-       else
-         tagname=""
-       fi
-       ;;
+ /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+    find out it does not work in some platform. */
+ #ifndef LT_DLLAZY_OR_NOW
+ #  ifdef RTLD_LAZY
+ #    define LT_DLLAZY_OR_NOW          RTLD_LAZY
+ #  else
+ #    ifdef DL_LAZY
+ #      define LT_DLLAZY_OR_NOW                DL_LAZY
+ #    else
+ #      ifdef RTLD_NOW
+ #        define LT_DLLAZY_OR_NOW      RTLD_NOW
+ #      else
+ #        ifdef DL_NOW
+ #          define LT_DLLAZY_OR_NOW    DL_NOW
+ #        else
+ #          define LT_DLLAZY_OR_NOW    0
+ #        endif
+ #      endif
+ #    endif
+ #  endif
+ #endif
  
-       GCJ)
-       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+ #ifdef __cplusplus
+ extern "C" void exit (int);
+ #endif
  
+ void fnord() { int i=42;}
+ int main ()
+ {
+   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+   int status = $lt_dlunknown;
  
+   if (self)
+     {
+       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+       /* dlclose (self); */
+     }
  
- # Source file extension for Java test sources.
- ac_ext=java
+     exit (status);
+ }
+ EOF
+   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); } && test -s conftest${ac_exeext} 2>/dev/null; then
+     (./conftest; exit; ) >&5 2>/dev/null
+     lt_status=$?
+     case x$lt_status in
+       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+     esac
+   else :
+     # compilation failed
+     lt_cv_dlopen_self_static=no
+   fi
+ fi
+ rm -fr conftest*
  
- # Object file extension for compiled Java test sources.
- objext=o
- objext_GCJ=$objext
  
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="class foo {}\n"
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
+     fi
  
- # Code to be used in simple link tests
- lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+     CPPFLAGS="$save_CPPFLAGS"
+     LDFLAGS="$save_LDFLAGS"
+     LIBS="$save_LIBS"
+     ;;
+   esac
  
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+   case $lt_cv_dlopen_self in
+   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+   *) enable_dlopen_self=unknown ;;
+   esac
  
- # If no C compiler was specified, use CC.
- LTCC=${LTCC-"$CC"}
+   case $lt_cv_dlopen_self_static in
+   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+   *) enable_dlopen_self_static=unknown ;;
+   esac
+ fi
  
- # Allow CC to be a program name with arguments.
- compiler=$CC
  
+ # The else clause should only fire when bootstrapping the
+ # libtool distribution, otherwise you forgot to ship ltmain.sh
+ # with your package, and you will get complaints that there are
+ # no rules to generate ltmain.sh.
+ if test -f "$ltmain"; then
+   # See if we are running on zsh, and set the options which allow our commands through
+   # without removal of \ escapes.
+   if test -n "${ZSH_VERSION+set}" ; then
+     setopt NO_GLOB_SUBST
+   fi
+   # Now quote all the things that may contain metacharacters while being
+   # careful not to overquote the AC_SUBSTed values.  We take copies of the
+   # variables and quote the copies for generation of the libtool script.
+   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+     SED SHELL STRIP \
+     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+     deplibs_check_method reload_flag reload_cmds need_locks \
+     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+     lt_cv_sys_global_symbol_to_c_name_address \
+     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+     old_postinstall_cmds old_postuninstall_cmds \
+     compiler_CXX \
+     CC_CXX \
+     LD_CXX \
+     lt_prog_compiler_wl_CXX \
+     lt_prog_compiler_pic_CXX \
+     lt_prog_compiler_static_CXX \
+     lt_prog_compiler_no_builtin_flag_CXX \
+     export_dynamic_flag_spec_CXX \
+     thread_safe_flag_spec_CXX \
+     whole_archive_flag_spec_CXX \
+     enable_shared_with_static_runtimes_CXX \
+     old_archive_cmds_CXX \
+     old_archive_from_new_cmds_CXX \
+     predep_objects_CXX \
+     postdep_objects_CXX \
+     predeps_CXX \
+     postdeps_CXX \
+     compiler_lib_search_path_CXX \
+     archive_cmds_CXX \
+     archive_expsym_cmds_CXX \
+     postinstall_cmds_CXX \
+     postuninstall_cmds_CXX \
+     old_archive_from_expsyms_cmds_CXX \
+     allow_undefined_flag_CXX \
+     no_undefined_flag_CXX \
+     export_symbols_cmds_CXX \
+     hardcode_libdir_flag_spec_CXX \
+     hardcode_libdir_flag_spec_ld_CXX \
+     hardcode_libdir_separator_CXX \
+     hardcode_automatic_CXX \
+     module_cmds_CXX \
+     module_expsym_cmds_CXX \
+     lt_cv_prog_compiler_c_o_CXX \
+     exclude_expsyms_CXX \
+     include_expsyms_CXX; do
  
- # save warnings/boilerplate of simple test code
- ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" >conftest.$ac_ext
- eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
- _lt_compiler_boilerplate=`cat conftest.err`
- $rm conftest*
+     case $var in
+     old_archive_cmds_CXX | \
+     old_archive_from_new_cmds_CXX | \
+     archive_cmds_CXX | \
+     archive_expsym_cmds_CXX | \
+     module_cmds_CXX | \
+     module_expsym_cmds_CXX | \
+     old_archive_from_expsyms_cmds_CXX | \
+     export_symbols_cmds_CXX | \
+     extract_expsyms_cmds | reload_cmds | finish_cmds | \
+     postinstall_cmds | postuninstall_cmds | \
+     old_postinstall_cmds | old_postuninstall_cmds | \
+     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+       # Double-quote double-evaled strings.
+       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+       ;;
+     *)
+       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+       ;;
+     esac
+   done
  
- ac_outfile=conftest.$ac_objext
- printf "$lt_simple_link_test_code" >conftest.$ac_ext
- eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
- _lt_linker_boilerplate=`cat conftest.err`
- $rm conftest*
+   case $lt_echo in
+   *'\$0 --fallback-echo"')
+     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+     ;;
+   esac
  
+ cfgfile="$ofile"
  
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- CC=${GCJ-"gcj"}
- compiler=$CC
- compiler_GCJ=$CC
- for cc_temp in $compiler""; do
-   case $cc_temp in
-     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-     \-*) ;;
-     *) break;;
-   esac
- done
- cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+   cat <<__EOF__ >> "$cfgfile"
+ # ### BEGIN LIBTOOL TAG CONFIG: $tagname
  
+ # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  
- # GCJ did not exist at the time GCC didn't implicitly link libc in.
- archive_cmds_need_lc_GCJ=no
+ # Shell to use when invoking shell scripts.
+ SHELL=$lt_SHELL
  
- old_archive_cmds_GCJ=$old_archive_cmds
+ # Whether or not to build shared libraries.
+ build_libtool_libs=$enable_shared
  
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
+ # Whether or not to build static libraries.
+ build_old_libs=$enable_static
  
- lt_prog_compiler_no_builtin_flag_GCJ=
+ # Whether or not to add -lc for building shared libraries.
+ build_libtool_need_lc=$archive_cmds_need_lc_CXX
  
- if test "$GCC" = yes; then
-   lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+ # Whether or not to disallow shared libs when runtime libs are static
+ allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
  
+ # Whether or not to optimize for fast installation.
+ fast_install=$enable_fast_install
  
- echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
- echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
- if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   lt_cv_prog_compiler_rtti_exceptions=no
-   ac_outfile=conftest.$ac_objext
-    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-    lt_compiler_flag="-fno-rtti -fno-exceptions"
-    # Insert the option either (1) after the last *FLAGS variable, or
-    # (2) before a word containing "conftest.", or (3) at the end.
-    # Note that $ac_compile itself does not contain backslashes and begins
-    # with a dollar sign (not a hyphen), so the echo should work correctly.
-    # The option is referenced via a variable to avoid confusing sed.
-    lt_compile=`echo "$ac_compile" | $SED \
-    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-    -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:34954: $lt_compile\"" >&5)
-    (eval "$lt_compile" 2>conftest.err)
-    ac_status=$?
-    cat conftest.err >&5
-    echo "$as_me:34958: \$? = $ac_status" >&5
-    if (exit $ac_status) && test -s "$ac_outfile"; then
-      # The compiler can only warn and ignore the option if not recognized
-      # So say no if there are warnings other than the usual output.
-      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
-      $SED '/^$/d' conftest.err >conftest.er2
-      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
-        lt_cv_prog_compiler_rtti_exceptions=yes
-      fi
-    fi
-    $rm conftest*
+ # The host system.
+ host_alias=$host_alias
+ host=$host
+ host_os=$host_os
  
- fi
- echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
- echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+ # The build system.
+ build_alias=$build_alias
+ build=$build
+ build_os=$build_os
  
- if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-     lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
- else
-     :
- fi
+ # An echo program that does not interpret backslashes.
+ echo=$lt_echo
  
- fi
+ # The archiver.
+ AR=$lt_AR
+ AR_FLAGS=$lt_AR_FLAGS
  
- lt_prog_compiler_wl_GCJ=
- lt_prog_compiler_pic_GCJ=
- lt_prog_compiler_static_GCJ=
+ # A C compiler.
+ LTCC=$lt_LTCC
  
- echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
- echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+ # A language-specific compiler.
+ CC=$lt_compiler_CXX
  
-   if test "$GCC" = yes; then
-     lt_prog_compiler_wl_GCJ='-Wl,'
-     lt_prog_compiler_static_GCJ='-static'
+ # Is the compiler the GNU C compiler?
+ with_gcc=$GCC_CXX
  
-     case $host_os in
-       aix*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_GCJ='-Bstatic'
-       fi
-       ;;
+ # An ERE matcher.
+ EGREP=$lt_EGREP
  
-     amigaos*)
-       # FIXME: we need at least 68020 code to build shared libraries, but
-       # adding the `-m68020' flag to GCC prevents building anything better,
-       # like `-m68040'.
-       lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
-       ;;
+ # The linker used to build libraries.
+ LD=$lt_LD_CXX
  
-     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-       # PIC is the default for these OSes.
-       ;;
+ # Whether we need hard or soft links.
+ LN_S=$lt_LN_S
  
-     mingw* | pw32* | os2*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
-       ;;
+ # A BSD-compatible nm program.
+ NM=$lt_NM
  
-     darwin* | rhapsody*)
-       # PIC is the default on this platform
-       # Common symbols not allowed in MH_DYLIB files
-       lt_prog_compiler_pic_GCJ='-fno-common'
-       ;;
+ # A symbol stripping program
+ STRIP=$lt_STRIP
  
-     msdosdjgpp*)
-       # Just because we use GCC doesn't mean we suddenly get shared libraries
-       # on systems that don't support them.
-       lt_prog_compiler_can_build_shared_GCJ=no
-       enable_shared=no
-       ;;
+ # Used to examine libraries when file_magic_cmd begins "file"
+ MAGIC_CMD=$MAGIC_CMD
  
-     sysv4*MP*)
-       if test -d /usr/nec; then
-       lt_prog_compiler_pic_GCJ=-Kconform_pic
-       fi
-       ;;
+ # Used on cygwin: DLL creation program.
+ DLLTOOL="$DLLTOOL"
  
-     hpux*)
-       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-       # not for PA HP-UX.
-       case $host_cpu in
-       hppa*64*|ia64*)
-       # +Z the default
-       ;;
-       *)
-       lt_prog_compiler_pic_GCJ='-fPIC'
-       ;;
-       esac
-       ;;
+ # Used on cygwin: object dumper.
+ OBJDUMP="$OBJDUMP"
  
-     *)
-       lt_prog_compiler_pic_GCJ='-fPIC'
-       ;;
-     esac
-   else
-     # PORTME Check for flag to pass linker flags through the system compiler.
-     case $host_os in
-     aix*)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_GCJ='-Bstatic'
-       else
-       lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-       darwin*)
-         # PIC is the default on this platform
-         # Common symbols not allowed in MH_DYLIB files
-        case $cc_basename in
-          xlc*)
-          lt_prog_compiler_pic_GCJ='-qnocommon'
-          lt_prog_compiler_wl_GCJ='-Wl,'
-          ;;
-        esac
-        ;;
+ # Used on cygwin: assembler.
+ AS="$AS"
  
-     mingw* | pw32* | os2*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
-       ;;
+ # The name of the directory that contains temporary libtool files.
+ objdir=$objdir
  
-     hpux9* | hpux10* | hpux11*)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-       # not for PA HP-UX.
-       case $host_cpu in
-       hppa*64*|ia64*)
-       # +Z the default
-       ;;
-       *)
-       lt_prog_compiler_pic_GCJ='+Z'
-       ;;
-       esac
-       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-       lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
-       ;;
+ # How to create reloadable object files.
+ reload_flag=$lt_reload_flag
+ reload_cmds=$lt_reload_cmds
  
-     irix5* | irix6* | nonstopux*)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       # PIC (with -KPIC) is the default.
-       lt_prog_compiler_static_GCJ='-non_shared'
-       ;;
+ # How to pass a linker flag through the compiler.
+ wl=$lt_lt_prog_compiler_wl_CXX
  
-     newsos6)
-       lt_prog_compiler_pic_GCJ='-KPIC'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-       ;;
+ # Object file suffix (normally "o").
+ objext="$ac_objext"
  
-     linux*)
-       case $cc_basename in
-       icc* | ecc*)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       lt_prog_compiler_pic_GCJ='-KPIC'
-       lt_prog_compiler_static_GCJ='-static'
-         ;;
-       pgcc* | pgf77* | pgf90* | pgf95*)
-         # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       lt_prog_compiler_pic_GCJ='-fpic'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-         ;;
-       ccc*)
-         lt_prog_compiler_wl_GCJ='-Wl,'
-         # All Alpha code is PIC.
-         lt_prog_compiler_static_GCJ='-non_shared'
-         ;;
-       esac
-       ;;
+ # Old archive suffix (normally "a").
+ libext="$libext"
  
-     osf3* | osf4* | osf5*)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       # All OSF/1 code is PIC.
-       lt_prog_compiler_static_GCJ='-non_shared'
-       ;;
+ # Shared library suffix (normally ".so").
+ shrext_cmds='$shrext_cmds'
  
-     sco3.2v5*)
-       lt_prog_compiler_pic_GCJ='-Kpic'
-       lt_prog_compiler_static_GCJ='-dn'
-       ;;
+ # Executable file suffix (normally "").
+ exeext="$exeext"
  
-     solaris*)
-       lt_prog_compiler_pic_GCJ='-KPIC'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-       case $cc_basename in
-       f77* | f90* | f95*)
-       lt_prog_compiler_wl_GCJ='-Qoption ld ';;
-       *)
-       lt_prog_compiler_wl_GCJ='-Wl,';;
-       esac
-       ;;
+ # Additional compiler flags for building library objects.
+ pic_flag=$lt_lt_prog_compiler_pic_CXX
+ pic_mode=$pic_mode
  
-     sunos4*)
-       lt_prog_compiler_wl_GCJ='-Qoption ld '
-       lt_prog_compiler_pic_GCJ='-PIC'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-       ;;
+ # What is the maximum length of a command?
+ max_cmd_len=$lt_cv_sys_max_cmd_len
  
-     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       lt_prog_compiler_pic_GCJ='-KPIC'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-       ;;
+ # Does compiler simultaneously support -c and -o options?
+ compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+ # Must we lock files when doing compilation?
+ need_locks=$lt_need_locks
  
-     sysv4*MP*)
-       if test -d /usr/nec ;then
-       lt_prog_compiler_pic_GCJ='-Kconform_pic'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-       fi
-       ;;
+ # Do we need the lib prefix for modules?
+ need_lib_prefix=$need_lib_prefix
  
-     unicos*)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       lt_prog_compiler_can_build_shared_GCJ=no
-       ;;
+ # Do we need a version for libraries?
+ need_version=$need_version
  
-     uts4*)
-       lt_prog_compiler_pic_GCJ='-pic'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-       ;;
+ # Whether dlopen is supported.
+ dlopen_support=$enable_dlopen
  
-     *)
-       lt_prog_compiler_can_build_shared_GCJ=no
-       ;;
-     esac
-   fi
+ # Whether dlopen of programs is supported.
+ dlopen_self=$enable_dlopen_self
  
- echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
- echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
+ # Whether dlopen of statically linked programs is supported.
+ dlopen_self_static=$enable_dlopen_self_static
  
- #
- # Check to make sure the PIC flag actually works.
- #
- if test -n "$lt_prog_compiler_pic_GCJ"; then
+ # Compiler flag to prevent dynamic linking.
+ link_static_flag=$lt_lt_prog_compiler_static_CXX
  
- echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
- echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
- if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   lt_prog_compiler_pic_works_GCJ=no
-   ac_outfile=conftest.$ac_objext
-    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-    lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
-    # Insert the option either (1) after the last *FLAGS variable, or
-    # (2) before a word containing "conftest.", or (3) at the end.
-    # Note that $ac_compile itself does not contain backslashes and begins
-    # with a dollar sign (not a hyphen), so the echo should work correctly.
-    # The option is referenced via a variable to avoid confusing sed.
-    lt_compile=`echo "$ac_compile" | $SED \
-    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-    -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:35216: $lt_compile\"" >&5)
-    (eval "$lt_compile" 2>conftest.err)
-    ac_status=$?
-    cat conftest.err >&5
-    echo "$as_me:35220: \$? = $ac_status" >&5
-    if (exit $ac_status) && test -s "$ac_outfile"; then
-      # The compiler can only warn and ignore the option if not recognized
-      # So say no if there are warnings other than the usual output.
-      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
-      $SED '/^$/d' conftest.err >conftest.er2
-      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
-        lt_prog_compiler_pic_works_GCJ=yes
-      fi
-    fi
-    $rm conftest*
+ # Compiler flag to turn off builtin functions.
+ no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
  
- fi
- echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
- echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
+ # Compiler flag to allow reflexive dlopens.
+ export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
  
- if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
-     case $lt_prog_compiler_pic_GCJ in
-      "" | " "*) ;;
-      *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
-      esac
- else
-     lt_prog_compiler_pic_GCJ=
-      lt_prog_compiler_can_build_shared_GCJ=no
- fi
+ # Compiler flag to generate shared objects directly from archives.
+ whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
  
- fi
- case $host_os in
-   # For platforms which do not support PIC, -DPIC is meaningless:
-   *djgpp*)
-     lt_prog_compiler_pic_GCJ=
-     ;;
-   *)
-     lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
-     ;;
- esac
+ # Compiler flag to generate thread-safe objects.
+ thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
  
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
- echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
- if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   lt_cv_prog_compiler_c_o_GCJ=no
-    $rm -r conftest 2>/dev/null
-    mkdir conftest
-    cd conftest
-    mkdir out
-    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ # Library versioning type.
+ version_type=$version_type
  
-    lt_compiler_flag="-o out/conftest2.$ac_objext"
-    # Insert the option either (1) after the last *FLAGS variable, or
-    # (2) before a word containing "conftest.", or (3) at the end.
-    # Note that $ac_compile itself does not contain backslashes and begins
-    # with a dollar sign (not a hyphen), so the echo should work correctly.
-    lt_compile=`echo "$ac_compile" | $SED \
-    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-    -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:35278: $lt_compile\"" >&5)
-    (eval "$lt_compile" 2>out/conftest.err)
-    ac_status=$?
-    cat out/conftest.err >&5
-    echo "$as_me:35282: \$? = $ac_status" >&5
-    if (exit $ac_status) && test -s out/conftest2.$ac_objext
-    then
-      # The compiler can only warn and ignore the option if not recognized
-      # So say no if there are warnings
-      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
-      $SED '/^$/d' out/conftest.err >out/conftest.er2
-      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-        lt_cv_prog_compiler_c_o_GCJ=yes
-      fi
-    fi
-    chmod u+w . 2>&5
-    $rm conftest*
-    # SGI C++ compiler will create directory out/ii_files/ for
-    # template instantiation
-    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-    $rm out/* && rmdir out
-    cd ..
-    rmdir conftest
-    $rm conftest*
+ # Format of library name prefix.
+ libname_spec=$lt_libname_spec
  
- fi
- echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
- echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
+ # List of archive names.  First name is the real one, the rest are links.
+ # The last name is the one that the linker finds with -lNAME.
+ library_names_spec=$lt_library_names_spec
  
+ # The coded name of the library, if different from the real name.
+ soname_spec=$lt_soname_spec
  
- hard_links="nottested"
- if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
-   # do not overwrite the value of need_locks provided by the user
-   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
- echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-   hard_links=yes
-   $rm conftest*
-   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-   touch conftest.a
-   ln conftest.a conftest.b 2>&5 || hard_links=no
-   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-   echo "$as_me:$LINENO: result: $hard_links" >&5
- echo "${ECHO_T}$hard_links" >&6
-   if test "$hard_links" = no; then
-     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
- echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-     need_locks=warn
-   fi
- else
-   need_locks=no
- fi
+ # Commands used to build and install an old-style archive.
+ RANLIB=$lt_RANLIB
+ old_archive_cmds=$lt_old_archive_cmds_CXX
+ old_postinstall_cmds=$lt_old_postinstall_cmds
+ old_postuninstall_cmds=$lt_old_postuninstall_cmds
  
- echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
- echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+ # Create an old-style archive from a shared archive.
+ old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
  
-   runpath_var=
-   allow_undefined_flag_GCJ=
-   enable_shared_with_static_runtimes_GCJ=no
-   archive_cmds_GCJ=
-   archive_expsym_cmds_GCJ=
-   old_archive_From_new_cmds_GCJ=
-   old_archive_from_expsyms_cmds_GCJ=
-   export_dynamic_flag_spec_GCJ=
-   whole_archive_flag_spec_GCJ=
-   thread_safe_flag_spec_GCJ=
-   hardcode_libdir_flag_spec_GCJ=
-   hardcode_libdir_flag_spec_ld_GCJ=
-   hardcode_libdir_separator_GCJ=
-   hardcode_direct_GCJ=no
-   hardcode_minus_L_GCJ=no
-   hardcode_shlibpath_var_GCJ=unsupported
-   link_all_deplibs_GCJ=unknown
-   hardcode_automatic_GCJ=no
-   module_cmds_GCJ=
-   module_expsym_cmds_GCJ=
-   always_export_symbols_GCJ=no
-   export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-   # include_expsyms should be a list of space-separated symbols to be *always*
-   # included in the symbol list
-   include_expsyms_GCJ=
-   # exclude_expsyms can be an extended regexp of symbols to exclude
-   # it will be wrapped by ` (' and `)$', so one must not match beginning or
-   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-   # as well as any symbol that contains `d'.
-   exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
-   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-   # platforms (ab)use it in PIC code, but their linkers get confused if
-   # the symbol is explicitly referenced.  Since portable code cannot
-   # rely on this symbol name, it's probably fine to never include it in
-   # preloaded symbol tables.
-   extract_expsyms_cmds=
-   # Just being paranoid about ensuring that cc_basename is set.
-   for cc_temp in $compiler""; do
-   case $cc_temp in
-     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-     \-*) ;;
-     *) break;;
-   esac
- done
- cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ # Create a temporary old-style archive to link instead of a shared archive.
+ old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
  
-   case $host_os in
-   cygwin* | mingw* | pw32*)
-     # FIXME: the MSVC++ port hasn't been tested in a loooong time
-     # When not using gcc, we currently assume that we are using
-     # Microsoft Visual C++.
-     if test "$GCC" != yes; then
-       with_gnu_ld=no
-     fi
-     ;;
-   openbsd*)
-     with_gnu_ld=no
-     ;;
-   esac
+ # Commands used to build and install a shared archive.
+ archive_cmds=$lt_archive_cmds_CXX
+ archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+ postinstall_cmds=$lt_postinstall_cmds
+ postuninstall_cmds=$lt_postuninstall_cmds
  
-   ld_shlibs_GCJ=yes
-   if test "$with_gnu_ld" = yes; then
-     # If archive_cmds runs LD, not CC, wlarc should be empty
-     wlarc='${wl}'
+ # Commands used to build a loadable module (assumed same as above if empty)
+ module_cmds=$lt_module_cmds_CXX
+ module_expsym_cmds=$lt_module_expsym_cmds_CXX
  
-     # Set some defaults for GNU ld with shared library support. These
-     # are reset later if shared libraries are not supported. Putting them
-     # here allows them to be overridden if necessary.
-     runpath_var=LD_RUN_PATH
-     hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
-     export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
-     # ancient GNU ld didn't support --whole-archive et. al.
-     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-       else
-       whole_archive_flag_spec_GCJ=
-     fi
-     supports_anon_versioning=no
-     case `$LD -v 2>/dev/null` in
-       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-       *\ 2.11.*) ;; # other 2.11 versions
-       *) supports_anon_versioning=yes ;;
-     esac
+ # Commands to strip libraries.
+ old_striplib=$lt_old_striplib
+ striplib=$lt_striplib
  
-     # See if GNU ld supports shared libraries.
-     case $host_os in
-     aix3* | aix4* | aix5*)
-       # On AIX/PPC, the GNU linker is very broken
-       if test "$host_cpu" != ia64; then
-       ld_shlibs_GCJ=no
-       cat <<EOF 1>&2
+ # Dependencies to place before the objects being linked to create a
+ # shared library.
+ predep_objects=$lt_predep_objects_CXX
  
- *** Warning: the GNU linker, at least up to release 2.9.1, is reported
- *** to be unable to reliably create shared libraries on AIX.
- *** Therefore, libtool is disabling shared libraries support.  If you
- *** really care for shared libraries, you may want to modify your PATH
- *** so that a non-GNU linker is found, and then restart.
+ # Dependencies to place after the objects being linked to create a
+ # shared library.
+ postdep_objects=$lt_postdep_objects_CXX
  
- EOF
-       fi
-       ;;
+ # Dependencies to place before the objects being linked to create a
+ # shared library.
+ predeps=$lt_predeps_CXX
  
-     amigaos*)
-       archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-       hardcode_libdir_flag_spec_GCJ='-L$libdir'
-       hardcode_minus_L_GCJ=yes
+ # Dependencies to place after the objects being linked to create a
+ # shared library.
+ postdeps=$lt_postdeps_CXX
  
-       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-       # that the semantics of dynamic libraries on AmigaOS, at least up
-       # to version 4, is to share data among multiple programs linked
-       # with the same dynamic library.  Since this doesn't match the
-       # behavior of shared libraries on other platforms, we can't use
-       # them.
-       ld_shlibs_GCJ=no
-       ;;
+ # The library search path used internally by the compiler when linking
+ # a shared library.
+ compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
  
-     beos*)
-       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag_GCJ=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       else
-       ld_shlibs_GCJ=no
-       fi
-       ;;
+ # Method to check whether dependent libraries are shared objects.
+ deplibs_check_method=$lt_deplibs_check_method
  
-     cygwin* | mingw* | pw32*)
-       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
-       # as there is no search path for DLLs.
-       hardcode_libdir_flag_spec_GCJ='-L$libdir'
-       allow_undefined_flag_GCJ=unsupported
-       always_export_symbols_GCJ=no
-       enable_shared_with_static_runtimes_GCJ=yes
-       export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ # Command to use when deplibs_check_method == file_magic.
+ file_magic_cmd=$lt_file_magic_cmd
  
-       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-         archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
-       else
-       ld_shlibs_GCJ=no
-       fi
-       ;;
+ # Flag that allows shared libraries with undefined symbols to be built.
+ allow_undefined_flag=$lt_allow_undefined_flag_CXX
  
-     linux*)
-       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ # Flag that forces no undefined symbols.
+ no_undefined_flag=$lt_no_undefined_flag_CXX
  
 -# Commands used to finish a libtool library installation in a directory.
 -finish_cmds=$lt_finish_cmds
 -
 -# Same as above, but a single script fragment to be evaled but not shown.
 -finish_eval=$lt_finish_eval
 -
 -# Take the output of nm and produce a listing of raw symbols and C names.
 -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 -
 -# Transform the output of nm in a proper C declaration
 -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 -
 -# Transform the output of nm in a C name address pair
 -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 -
 -# This is the shared library runtime path variable.
 -runpath_var=$runpath_var
 -
 -# This is the shared library path variable.
 -shlibpath_var=$shlibpath_var
 -
 -# Is shlibpath searched before the hard-coded library search path?
 -shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 -
 -# How to hardcode a shared library path into an executable.
 -hardcode_action=$hardcode_action_CXX
 +      if test $supports_anon_versioning = yes; then
 +        archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
 +  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 +  $echo "local: *; };" >> $output_objdir/$libname.ver~
 +        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 +      fi
 +      else
 +      ld_shlibs_GCJ=no
 +      fi
 +      ;;
  
 -# Whether we should hardcode library paths into libraries.
 -hardcode_into_libs=$hardcode_into_libs
 +    netbsd*)
 +      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 +      archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 +      wlarc=
 +      else
 +      archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 +      archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 +      fi
 +      ;;
  
 -# Flag to hardcode \$libdir into a binary during linking.
 -# This must work even if \$libdir does not exist.
 -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 +    solaris* | sysv5*)
 +      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 +      ld_shlibs_GCJ=no
 +      cat <<EOF 1>&2
  
 -# If ld is used when linking, flag to hardcode \$libdir into
 -# a binary during linking. This must work even if \$libdir does
 -# not exist.
 -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 +*** create shared libraries on Solaris systems.  Therefore, libtool
 +*** is disabling shared libraries support.  We urge you to upgrade GNU
 +*** binutils to release 2.9.1 or newer.  Another option is to modify
 +*** your PATH or compiler configuration so that the native linker is
 +*** used, and then restart.
  
 -# Whether we need a single -rpath flag with a separated argument.
 -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 +EOF
 +      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 +      archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 +      archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 +      else
 +      ld_shlibs_GCJ=no
 +      fi
 +      ;;
  
 -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 -# resulting binary.
 -hardcode_direct=$hardcode_direct_CXX
 +    sunos4*)
 +      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 +      wlarc=
 +      hardcode_direct_GCJ=yes
 +      hardcode_shlibpath_var_GCJ=no
 +      ;;
  
 -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 -# resulting binary.
 -hardcode_minus_L=$hardcode_minus_L_CXX
 +    *)
 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 +      archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 +      archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 +      else
 +      ld_shlibs_GCJ=no
 +      fi
 +      ;;
 +    esac
  
 -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 -# the resulting binary.
 -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
 +    if test "$ld_shlibs_GCJ" = no; then
 +      runpath_var=
 +      hardcode_libdir_flag_spec_GCJ=
 +      export_dynamic_flag_spec_GCJ=
 +      whole_archive_flag_spec_GCJ=
 +    fi
 +  else
 +    # PORTME fill in a description of your system's linker (not GNU ld)
 +    case $host_os in
 +    aix3*)
 +      allow_undefined_flag_GCJ=unsupported
 +      always_export_symbols_GCJ=yes
 +      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 +      # Note: this linker hardcodes the directories in LIBPATH if there
 +      # are no directories specified by -L.
 +      hardcode_minus_L_GCJ=yes
 +      if test "$GCC" = yes && test -z "$link_static_flag"; then
 +      # Neither direct hardcoding nor static linking is supported with a
 +      # broken collect2.
 +      hardcode_direct_GCJ=unsupported
 +      fi
 +      ;;
  
 -# Set to yes if building a shared library automatically hardcodes DIR into the library
 -# and all subsequent libraries and executables linked against it.
 -hardcode_automatic=$hardcode_automatic_CXX
 +    aix4* | aix5*)
 +      if test "$host_cpu" = ia64; then
 +      # On IA64, the linker does run time linking by default, so we don't
 +      # have to do anything special.
 +      aix_use_runtimelinking=no
 +      exp_sym_flag='-Bexport'
 +      no_entry_flag=""
 +      else
 +      # If we're using GNU nm, then we don't want the "-C" option.
 +      # -C means demangle to AIX nm, but means don't demangle with GNU nm
 +      if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 +        export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 +      else
 +        export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 +      fi
 +      aix_use_runtimelinking=no
  
 -# Variables whose values should be saved in libtool wrapper scripts and
 -# restored at relink time.
 -variables_saved_for_relink="$variables_saved_for_relink"
 +      # Test if we are trying to use run time linking or normal
 +      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 +      # need to do runtime linking.
 +      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
 +        for ld_flag in $LDFLAGS; do
 +        if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 +          aix_use_runtimelinking=yes
 +          break
 +        fi
 +        done
 +      esac
  
 -# Whether libtool must link a program against all its dependency libraries.
 -link_all_deplibs=$link_all_deplibs_CXX
 +      exp_sym_flag='-bexport'
 +      no_entry_flag='-bnoentry'
 +      fi
  
 -# Compile-time system search path for libraries
 -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 +      # When large executables or shared objects are built, AIX ld can
 +      # have problems creating the table of contents.  If linking a library
 +      # or program results in "error TOC overflow" add -mminimal-toc to
 +      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 +      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  
 -# Run-time system search path for libraries
 -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 +      archive_cmds_GCJ=''
 +      hardcode_direct_GCJ=yes
 +      hardcode_libdir_separator_GCJ=':'
 +      link_all_deplibs_GCJ=yes
  
 -# Fix the shell variable \$srcfile for the compiler.
 -fix_srcfile_path="$fix_srcfile_path_CXX"
 +      if test "$GCC" = yes; then
 +      case $host_os in aix4.[012]|aix4.[012].*)
 +      # We only want to do this on AIX 4.2 and lower, the check
 +      # below for broken collect2 doesn't work under 4.3+
 +        collect2name=`${CC} -print-prog-name=collect2`
 +        if test -f "$collect2name" && \
 +         strings "$collect2name" | grep resolve_lib_name >/dev/null
 +        then
 +        # We have reworked collect2
 +        hardcode_direct_GCJ=yes
 +        else
 +        # We have old collect2
 +        hardcode_direct_GCJ=unsupported
 +        # It fails to find uninstalled libraries when the uninstalled
 +        # path is not listed in the libpath.  Setting hardcode_minus_L
 +        # to unsupported forces relinking
 +        hardcode_minus_L_GCJ=yes
 +        hardcode_libdir_flag_spec_GCJ='-L$libdir'
 +        hardcode_libdir_separator_GCJ=
 +        fi
 +      esac
 +      shared_flag='-shared'
 +      if test "$aix_use_runtimelinking" = yes; then
 +        shared_flag="$shared_flag "'${wl}-G'
 +      fi
 +      else
 +      # not using gcc
 +      if test "$host_cpu" = ia64; then
 +      # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 +      # chokes on -Wl,-G. The following line is correct:
 +        shared_flag='-G'
 +      else
 +      if test "$aix_use_runtimelinking" = yes; then
 +          shared_flag='${wl}-G'
 +        else
 +          shared_flag='${wl}-bM:SRE'
 +      fi
 +      fi
 +      fi
  
 -# Set to yes if exported symbols are required.
 -always_export_symbols=$always_export_symbols_CXX
 +      # It seems that -bexpall does not export symbols beginning with
 +      # underscore (_), so it is better to generate a list of symbols to export.
 +      always_export_symbols_GCJ=yes
 +      if test "$aix_use_runtimelinking" = yes; then
 +      # Warning - without using the other runtime loading flags (-brtl),
 +      # -berok will link without error, but may produce a broken library.
 +      allow_undefined_flag_GCJ='-berok'
 +       # Determine the default libpath from the value encoded in an empty executable.
 +       cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
  
 -# The commands to list exported symbols.
 -export_symbols_cmds=$lt_export_symbols_cmds_CXX
 +int
 +main ()
 +{
  
 -# The commands to extract the exported symbol list from a shared archive.
 -extract_expsyms_cmds=$lt_extract_expsyms_cmds
 +  ;
 +  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
  
 -# Symbols that should not be listed in the preloaded symbols.
 -exclude_expsyms=$lt_exclude_expsyms_CXX
 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 +}'`
 +# Check for a 64-bit object if we didn't find anything.
 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 +}'`; fi
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -# Symbols that must always be exported.
 -include_expsyms=$lt_include_expsyms_CXX
 +fi
 +rm -f conftest.err conftest.$ac_objext \
 +      conftest$ac_exeext conftest.$ac_ext
 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
 -# ### END LIBTOOL TAG CONFIG: $tagname
 +       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
 +      archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 +       else
 +      if test "$host_cpu" = ia64; then
 +        hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
 +        allow_undefined_flag_GCJ="-z nodefs"
 +        archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 +      else
 +       # Determine the default libpath from the value encoded in an empty executable.
 +       cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
  
 -__EOF__
 +int
 +main ()
 +{
  
 +  ;
 +  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
  
 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 +}'`
 +# Check for a 64-bit object if we didn't find anything.
 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 +}'`; fi
  else
 -  # If there is no Makefile yet, we rely on a make rule to execute
 -  # `config.status --recheck' to rerun these tests and create the
 -  # libtool script then.
 -  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 -  if test -f "$ltmain_in"; then
 -    test -f Makefile && make "$ltmain"
 -  fi
 -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: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -CC=$lt_save_CC
 -LDCXX=$LD
 -LD=$lt_save_LD
 -GCC=$lt_save_GCC
 -with_gnu_ldcxx=$with_gnu_ld
 -with_gnu_ld=$lt_save_with_gnu_ld
 -lt_cv_path_LDCXX=$lt_cv_path_LD
 -lt_cv_path_LD=$lt_save_path_LD
 -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 +fi
 +rm -f conftest.err conftest.$ac_objext \
 +      conftest$ac_exeext conftest.$ac_ext
 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
 -      else
 -        tagname=""
 +       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
 +        # Warning - without using the other run time loading flags,
 +        # -berok will link without error, but may produce a broken library.
 +        no_undefined_flag_GCJ=' ${wl}-bernotok'
 +        allow_undefined_flag_GCJ=' ${wl}-berok'
 +        # -bexpall does not export symbols beginning with underscore (_)
 +        always_export_symbols_GCJ=yes
 +        # Exported symbols can be pulled into shared objects from archives
 +        whole_archive_flag_spec_GCJ=' '
 +        archive_cmds_need_lc_GCJ=yes
 +        # This is similar to how AIX traditionally builds its shared libraries.
 +        archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
        fi
 -      ;;
 -
 -      F77)
 -      if test -n "$F77" && test "X$F77" != "Xno"; then
 +      fi
 +      ;;
  
 -ac_ext=f
 -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
 -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 -ac_compiler_gnu=$ac_cv_f77_compiler_gnu
 +    amigaos*)
 +      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 +      hardcode_minus_L_GCJ=yes
 +      # see comment about different semantics on the GNU ld section
 +      ld_shlibs_GCJ=no
 +      ;;
  
 +    bsdi[45]*)
 +      export_dynamic_flag_spec_GCJ=-rdynamic
 +      ;;
  
 -archive_cmds_need_lc_F77=no
 -allow_undefined_flag_F77=
 -always_export_symbols_F77=no
 -archive_expsym_cmds_F77=
 -export_dynamic_flag_spec_F77=
 -hardcode_direct_F77=no
 -hardcode_libdir_flag_spec_F77=
 -hardcode_libdir_flag_spec_ld_F77=
 -hardcode_libdir_separator_F77=
 -hardcode_minus_L_F77=no
 -hardcode_automatic_F77=no
 -module_cmds_F77=
 -module_expsym_cmds_F77=
 -link_all_deplibs_F77=unknown
 -old_archive_cmds_F77=$old_archive_cmds
 -no_undefined_flag_F77=
 -whole_archive_flag_spec_F77=
 -enable_shared_with_static_runtimes_F77=no
 +    cygwin* | mingw* | pw32*)
 +      # When not using gcc, we currently assume that we are using
 +      # Microsoft Visual C++.
 +      # hardcode_libdir_flag_spec is actually meaningless, as there is
 +      # no search path for DLLs.
 +      hardcode_libdir_flag_spec_GCJ=' '
 +      allow_undefined_flag_GCJ=unsupported
 +      # Tell ltmain to make .lib files, not .a files.
 +      libext=lib
 +      # Tell ltmain to make .dll files, not .so files.
 +      shrext_cmds=".dll"
 +      # FIXME: Setting linknames here is a bad hack.
 +      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 +      # The linker will automatically build a .lib file if we build a DLL.
 +      old_archive_From_new_cmds_GCJ='true'
 +      # FIXME: Should let the user specify the lib program.
 +      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
 +      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
 +      enable_shared_with_static_runtimes_GCJ=yes
 +      ;;
  
 -# Source file extension for f77 test sources.
 -ac_ext=f
 +    darwin* | rhapsody*)
 +      case $host_os in
 +        rhapsody* | darwin1.[012])
 +         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
 +         ;;
 +       *) # Darwin 1.3 on
 +         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 +           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 +         else
 +           case ${MACOSX_DEPLOYMENT_TARGET} in
 +             10.[012])
 +               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 +               ;;
 +             10.*)
 +               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
 +               ;;
 +           esac
 +         fi
 +         ;;
 +      esac
 +      archive_cmds_need_lc_GCJ=no
 +      hardcode_direct_GCJ=no
 +      hardcode_automatic_GCJ=yes
 +      hardcode_shlibpath_var_GCJ=unsupported
 +      whole_archive_flag_spec_GCJ=''
 +      link_all_deplibs_GCJ=yes
 +    if test "$GCC" = yes ; then
 +      output_verbose_link_cmd='echo'
 +        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 +      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 +      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 +      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 +      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 +    else
 +      case $cc_basename in
 +        xlc*)
 +         output_verbose_link_cmd='echo'
 +         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 +         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 +         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 +          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 +          ;;
 +       *)
 +         ld_shlibs_GCJ=no
 +          ;;
 +      esac
 +    fi
 +      ;;
  
 -# Object file extension for compiled f77 test sources.
 -objext=o
 -objext_F77=$objext
 +    dgux*)
 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 +      hardcode_shlibpath_var_GCJ=no
 +      ;;
  
 -# Code to be used in simple compile tests
 -lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 +    freebsd1*)
 +      ld_shlibs_GCJ=no
 +      ;;
 +
 +    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 +    # support.  Future versions do this automatically, but an explicit c++rt0.o
 +    # does not break anything, and helps significantly (at the cost of a little
 +    # extra space).
 +    freebsd2.2*)
 +      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 +      hardcode_libdir_flag_spec_GCJ='-R$libdir'
 +      hardcode_direct_GCJ=yes
 +      hardcode_shlibpath_var_GCJ=no
 +      ;;
  
-     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-     freebsd2*)
-       archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_direct_GCJ=yes
-       hardcode_minus_L_GCJ=yes
-       hardcode_shlibpath_var_GCJ=no
-       ;;
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="      program t\n      end\n"
  
-     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-     freebsd* | kfreebsd*-gnu | dragonfly*)
-       archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-       hardcode_libdir_flag_spec_GCJ='-R$libdir'
-       hardcode_direct_GCJ=yes
-       hardcode_shlibpath_var_GCJ=no
-       ;;
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  
-     hpux9*)
-       if test "$GCC" = yes; then
-       archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-       else
-       archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-       fi
-       hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_GCJ=:
-       hardcode_direct_GCJ=yes
+ # If no C compiler was specified, use CC.
+ LTCC=${LTCC-"$CC"}
  
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L_GCJ=yes
-       export_dynamic_flag_spec_GCJ='${wl}-E'
-       ;;
+ # Allow CC to be a program name with arguments.
+ compiler=$CC
  
-     hpux10* | hpux11*)
-       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*|ia64*)
-         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-       else
-       case $host_cpu in
-       hppa*64*|ia64*)
-         archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
-         ;;
-       *)
-         archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-         ;;
-       esac
-       fi
-       if test "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-         hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
-         hardcode_libdir_separator_GCJ=:
-         hardcode_direct_GCJ=no
-         hardcode_shlibpath_var_GCJ=no
-         ;;
-       ia64*)
-         hardcode_libdir_flag_spec_GCJ='-L$libdir'
-         hardcode_direct_GCJ=no
-         hardcode_shlibpath_var_GCJ=no
  
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L_GCJ=yes
-         ;;
-       *)
-         hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-         hardcode_libdir_separator_GCJ=:
-         hardcode_direct_GCJ=yes
-         export_dynamic_flag_spec_GCJ='${wl}-E'
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+ printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+ _lt_compiler_boilerplate=`cat conftest.err`
+ $rm conftest*
  
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L_GCJ=yes
-         ;;
-       esac
-       fi
-       ;;
+ ac_outfile=conftest.$ac_objext
+ printf "$lt_simple_link_test_code" >conftest.$ac_ext
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+ _lt_linker_boilerplate=`cat conftest.err`
+ $rm conftest*
  
-     irix5* | irix6* | nonstopux*)
-       if test "$GCC" = yes; then
-       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       else
-       archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
-       fi
-       hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator_GCJ=:
-       link_all_deplibs_GCJ=yes
-       ;;
  
-     netbsd*)
-       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-       else
-       archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-       fi
-       hardcode_libdir_flag_spec_GCJ='-R$libdir'
-       hardcode_direct_GCJ=yes
-       hardcode_shlibpath_var_GCJ=no
-       ;;
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ CC=${F77-"f77"}
+ compiler=$CC
+ compiler_F77=$CC
+ for cc_temp in $compiler""; do
+   case $cc_temp in
+     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+     \-*) ;;
+     *) break;;
+   esac
+ done
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+ echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: result: $can_build_shared" >&5
+ echo "${ECHO_T}$can_build_shared" >&6; }
+ { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+ echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+   test "$enable_shared" = yes && enable_static=no
+   if test -n "$RANLIB"; then
+     archive_cmds="$archive_cmds~\$RANLIB \$lib"
+     postinstall_cmds='$RANLIB $lib'
+   fi
+   ;;
+ aix4* | aix5*)
+   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+     test "$enable_shared" = yes && enable_static=no
+   fi
+   ;;
+ esac
+ { echo "$as_me:$LINENO: result: $enable_shared" >&5
+ echo "${ECHO_T}$enable_shared" >&6; }
+ { echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+ echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { echo "$as_me:$LINENO: result: $enable_static" >&5
+ echo "${ECHO_T}$enable_static" >&6; }
  
 -test "$ld_shlibs_F77" = no && can_build_shared=no
 +    newsos6)
 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 +      hardcode_direct_GCJ=yes
 +      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
 +      hardcode_libdir_separator_GCJ=:
 +      hardcode_shlibpath_var_GCJ=no
 +      ;;
  
 -GCC_F77="$G77"
 -LD_F77="$LD"
 +    openbsd*)
 +      hardcode_direct_GCJ=yes
 +      hardcode_shlibpath_var_GCJ=no
 +      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 +      archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 +      archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 +      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
 +      export_dynamic_flag_spec_GCJ='${wl}-E'
 +      else
 +       case $host_os in
 +       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
 +         archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 +         hardcode_libdir_flag_spec_GCJ='-R$libdir'
 +         ;;
 +       *)
 +         archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 +         hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
 +         ;;
 +       esac
 +      fi
 +      ;;
  
 -lt_prog_compiler_wl_F77=
 -lt_prog_compiler_pic_F77=
 -lt_prog_compiler_static_F77=
 +    os2*)
 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 +      hardcode_minus_L_GCJ=yes
 +      allow_undefined_flag_GCJ=unsupported
 +      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 +      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 +      ;;
  
-     osf3*)
-       if test "$GCC" = yes; then
-       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       else
-       allow_undefined_flag_GCJ=' -expect_unresolved \*'
-       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       fi
-       hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator_GCJ=:
-       ;;
+ { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
  
 -  if test "$GCC" = yes; then
 -    lt_prog_compiler_wl_F77='-Wl,'
 -    lt_prog_compiler_static_F77='-static'
 +    osf4* | osf5*)    # as osf3* with the addition of -msym flag
 +      if test "$GCC" = yes; then
 +      allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
 +      archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 +      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
 +      else
 +      allow_undefined_flag_GCJ=' -expect_unresolved \*'
 +      archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 +      archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 +      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  
 -    case $host_os in
 -      aix*)
 -      # All AIX code is PIC.
 -      if test "$host_cpu" = ia64; then
 -      # AIX 5 now supports IA64 processor
 -      lt_prog_compiler_static_F77='-Bstatic'
 +      # Both c and cxx compiler support -rpath directly
 +      hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
        fi
 +      hardcode_libdir_separator_GCJ=:
        ;;
  
 -    amigaos*)
 -      # FIXME: we need at least 68020 code to build shared libraries, but
 -      # adding the `-m68020' flag to GCC prevents building anything better,
 -      # like `-m68040'.
 -      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
 +    sco3.2v5*)
 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 +      hardcode_shlibpath_var_GCJ=no
 +      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
 +      runpath_var=LD_RUN_PATH
 +      hardcode_runpath_var=yes
        ;;
  
 -    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 -      # PIC is the default for these OSes.
 +    solaris*)
 +      no_undefined_flag_GCJ=' -z text'
 +      if test "$GCC" = yes; then
 +      wlarc='${wl}'
 +      archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 +      archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 +        $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 +      else
 +      wlarc=''
 +      archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 +      archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 +      $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 +      fi
 +      hardcode_libdir_flag_spec_GCJ='-R$libdir'
 +      hardcode_shlibpath_var_GCJ=no
 +      case $host_os in
 +      solaris2.[0-5] | solaris2.[0-5].*) ;;
 +      *)
 +      # The compiler driver will combine linker options so we
 +      # cannot just pass the convience library names through
 +      # without $wl, iff we do not link with $LD.
 +      # Luckily, gcc supports the same syntax we need for Sun Studio.
 +      # Supported since Solaris 2.6 (maybe 2.5.1?)
 +      case $wlarc in
 +      '')
 +        whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
 +      *)
 +        whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
 +      esac ;;
 +      esac
 +      link_all_deplibs_GCJ=yes
        ;;
  
 -    mingw* | pw32* | os2*)
 -      # This hack is so that the source file can tell whether it is being
 -      # built for inclusion in a dll (and should export symbols for example).
 -      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
 +    sunos4*)
 +      if test "x$host_vendor" = xsequent; then
 +      # Use $CC to link under sequent, because it throws in some extra .o
 +      # files that make .init and .fini sections work.
 +      archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 +      else
 +      archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 +      fi
 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 +      hardcode_direct_GCJ=yes
 +      hardcode_minus_L_GCJ=yes
 +      hardcode_shlibpath_var_GCJ=no
        ;;
  
 -    darwin* | rhapsody*)
 -      # PIC is the default on this platform
 -      # Common symbols not allowed in MH_DYLIB files
 -      lt_prog_compiler_pic_F77='-fno-common'
 +    sysv4)
 +      case $host_vendor in
 +      sni)
 +        archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 +        hardcode_direct_GCJ=yes # is this really true???
 +      ;;
 +      siemens)
 +        ## LD is ld it makes a PLAMLIB
 +        ## CC just makes a GrossModule.
 +        archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 +        reload_cmds_GCJ='$CC -r -o $output$reload_objs'
 +        hardcode_direct_GCJ=no
 +        ;;
 +      motorola)
 +        archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 +        hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
 +      ;;
 +      esac
 +      runpath_var='LD_RUN_PATH'
 +      hardcode_shlibpath_var_GCJ=no
        ;;
  
 -    msdosdjgpp*)
 -      # Just because we use GCC doesn't mean we suddenly get shared libraries
 -      # on systems that don't support them.
 -      lt_prog_compiler_can_build_shared_F77=no
 -      enable_shared=no
 +    sysv4.3*)
 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 +      hardcode_shlibpath_var_GCJ=no
 +      export_dynamic_flag_spec_GCJ='-Bexport'
        ;;
  
      sysv4*MP*)
        if test -d /usr/nec; then
 -      lt_prog_compiler_pic_F77=-Kconform_pic
 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 +      hardcode_shlibpath_var_GCJ=no
 +      runpath_var=LD_RUN_PATH
 +      hardcode_runpath_var=yes
 +      ld_shlibs_GCJ=yes
 +      fi
 +      ;;
 +
 +    sysv4.2uw2*)
 +      archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 +      hardcode_direct_GCJ=yes
 +      hardcode_minus_L_GCJ=no
 +      hardcode_shlibpath_var_GCJ=no
 +      hardcode_runpath_var=yes
 +      runpath_var=LD_RUN_PATH
 +      ;;
 +
 +   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
 +      no_undefined_flag_GCJ='${wl}-z ${wl}text'
 +      if test "$GCC" = yes; then
 +      archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 +      else
 +      archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        fi
 +      runpath_var='LD_RUN_PATH'
 +      hardcode_shlibpath_var_GCJ=no
 +      ;;
 +
 +    sysv5*)
 +      no_undefined_flag_GCJ=' -z text'
 +      # $CC -shared without GNU ld will not create a library from C++
 +      # object files and a static libstdc++, better avoid it by now
 +      archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 +      archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 +              $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 +      hardcode_libdir_flag_spec_GCJ=
 +      hardcode_shlibpath_var_GCJ=no
 +      runpath_var='LD_RUN_PATH'
        ;;
  
-     uts4*)
-       archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_libdir_flag_spec_GCJ='-L$libdir'
-       hardcode_shlibpath_var_GCJ=no
+     hpux*)
+       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+       # not for PA HP-UX.
+       case $host_cpu in
+       hppa*64*|ia64*)
+       # +Z the default
+       ;;
+       *)
+       lt_prog_compiler_pic_F77='-fPIC'
+       ;;
+       esac
        ;;
  
      *)
 -      lt_prog_compiler_pic_F77='-fPIC'
 +      ld_shlibs_GCJ=no
 +      ;;
 +    esac
 +  fi
 +
 +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6
 +test "$ld_shlibs_GCJ" = no && can_build_shared=no
 +
 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 +if test "$GCC" = yes; then
 +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 +fi
 +
 +#
 +# Do we need to explicitly link libc?
 +#
 +case "x$archive_cmds_need_lc_GCJ" in
 +x|xyes)
 +  # Assume -lc should be added
 +  archive_cmds_need_lc_GCJ=yes
 +
 +  if test "$enable_shared" = yes && test "$GCC" = yes; then
 +    case $archive_cmds_GCJ in
 +    *'~'*)
 +      # FIXME: we may have to deal with multi-command sequences.
 +      ;;
 +    '$CC '*)
 +      # Test whether the compiler implicitly links with -lc since on some
 +      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 +      # to ld, don't add -lc before -lgcc.
 +      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
 +      $rm conftest*
 +      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 +
 +      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); } 2>conftest.err; then
 +        soname=conftest
 +        lib=conftest
 +        libobjs=conftest.$ac_objext
 +        deplibs=
 +        wl=$lt_prog_compiler_wl_GCJ
 +        compiler_flags=-v
 +        linker_flags=-v
 +        verstring=
 +        output_objdir=.
 +        libname=conftest
 +        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
 +        allow_undefined_flag_GCJ=
 +        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
 +  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
 +  ac_status=$?
 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 +  (exit $ac_status); }
 +        then
 +        archive_cmds_need_lc_GCJ=no
 +        else
 +        archive_cmds_need_lc_GCJ=yes
 +        fi
 +        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
 +      else
 +        cat conftest.err 1>&5
 +      fi
 +      $rm conftest*
 +      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
        ;;
      esac
 +  fi
 +  ;;
 +esac
 +
 +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
 +library_names_spec=
 +libname_spec='lib$name'
 +soname_spec=
 +shrext_cmds=".so"
 +postinstall_cmds=
 +postuninstall_cmds=
 +finish_cmds=
 +finish_eval=
 +shlibpath_var=
 +shlibpath_overrides_runpath=unknown
 +version_type=none
 +dynamic_linker="$host_os ld.so"
 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
 +if test "$GCC" = yes; then
 +  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 +  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
 +    # if the path contains ";" then we assume it to be the separator
 +    # otherwise default to the standard path separator (i.e. ":") - it is
 +    # assumed that no part of a normal pathname contains ";" but that should
 +    # okay in the real world where ";" in dirpaths is itself problematic.
 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
    else
 -    # PORTME Check for flag to pass linker flags through the system compiler.
 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 +  fi
 +else
 +  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 +fi
 +need_lib_prefix=unknown
 +hardcode_into_libs=no
 +
 +# when you set need_version to no, make sure it does not cause -set_version
 +# flags to be left without arguments
 +need_version=unknown
 +
 +case $host_os in
 +aix3*)
 +  version_type=linux
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 +  shlibpath_var=LIBPATH
 +
 +  # AIX 3 has no versioning support, so we append a major version to the name.
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  ;;
 +
 +aix4* | aix5*)
 +  version_type=linux
 +  need_lib_prefix=no
 +  need_version=no
 +  hardcode_into_libs=yes
 +  if test "$host_cpu" = ia64; then
 +    # AIX 5 supports IA64
 +    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 +    shlibpath_var=LD_LIBRARY_PATH
 +  else
 +    # With GCC up to 2.95.x, collect2 would create an import file
 +    # for dependence libraries.  The import file would start with
 +    # the line `#! .'.  This would cause the generated library to
 +    # depend on `.', always an invalid library.  This was fixed in
 +    # development snapshots of GCC prior to 3.0.
      case $host_os in
 -    aix*)
 -      lt_prog_compiler_wl_F77='-Wl,'
 -      if test "$host_cpu" = ia64; then
 -      # AIX 5 now supports IA64 processor
 -      lt_prog_compiler_static_F77='-Bstatic'
 +      aix4 | aix4.[01] | aix4.[01].*)
 +      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 +         echo ' yes '
 +         echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 +      :
        else
 -      lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
 +      can_build_shared=no
        fi
        ;;
-     esac
-     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-     # soname into executable. Probably we can add versioning support to
-     # collect2, so additional links can be useful in future.
-     if test "$aix_use_runtimelinking" = yes; then
-       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-       # instead of lib<name>.a to let people know that these are not
-       # typical AIX shared libraries.
-       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     else
-       # We preserve .a as extension for shared libraries through AIX4.2
-       # and later when we are not doing run time linking.
-       library_names_spec='${libname}${release}.a $libname.a'
-       soname_spec='${libname}${release}${shared_ext}$major'
-     fi
-     shlibpath_var=LIBPATH
-   fi
-   ;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+        case $cc_basename in
+          xlc*)
+          lt_prog_compiler_pic_F77='-qnocommon'
+          lt_prog_compiler_wl_F77='-Wl,'
+          ;;
+        esac
+        ;;
  
 -    mingw* | pw32* | os2*)
 -      # This hack is so that the source file can tell whether it is being
 -      # built for inclusion in a dll (and should export symbols for example).
 -      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
 -      ;;
 +amigaos*)
 +  library_names_spec='$libname.ixlibrary $libname.a'
 +  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 +  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
 +  ;;
  
- beos*)
-   library_names_spec='${libname}${shared_ext}'
-   dynamic_linker="$host_os ld.so"
-   shlibpath_var=LIBRARY_PATH
-   ;;
+     hpux9* | hpux10* | hpux11*)
+       lt_prog_compiler_wl_F77='-Wl,'
+       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+       # not for PA HP-UX.
+       case $host_cpu in
+       hppa*64*|ia64*)
+       # +Z the default
+       ;;
+       *)
+       lt_prog_compiler_pic_F77='+Z'
+       ;;
+       esac
+       # Is there a better lt_prog_compiler_static that works with the bundled CC?
+       lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+       ;;
  
 -    irix5* | irix6* | nonstopux*)
 -      lt_prog_compiler_wl_F77='-Wl,'
 -      # PIC (with -KPIC) is the default.
 -      lt_prog_compiler_static_F77='-non_shared'
 -      ;;
 +bsdi[45]*)
 +  version_type=linux
 +  need_version=no
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 +  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 +  # the default ld.so.conf also contains /usr/contrib/lib and
 +  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 +  # libtool to hard-code these into programs
 +  ;;
  
 -    newsos6)
 -      lt_prog_compiler_pic_F77='-KPIC'
 -      lt_prog_compiler_static_F77='-Bstatic'
 -      ;;
 +cygwin* | mingw* | pw32*)
 +  version_type=windows
 +  shrext_cmds=".dll"
 +  need_version=no
 +  need_lib_prefix=no
  
-   case $GCC,$host_os in
-   yes,cygwin* | yes,mingw* | yes,pw32*)
-     library_names_spec='$libname.dll.a'
-     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-     postinstall_cmds='base_file=`basename \${file}`~
-       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-       dldir=$destdir/`dirname \$dlpath`~
-       test -d \$dldir || mkdir -p \$dldir~
-       $install_prog $dir/$dlname \$dldir/$dlname~
-       chmod a+x \$dldir/$dlname'
-     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-       dlpath=$dir/\$dldll~
-        $rm \$dlpath'
-     shlibpath_overrides_runpath=yes
+     linux*)
+       case $cc_basename in
+       icc* | ecc*)
+       lt_prog_compiler_wl_F77='-Wl,'
+       lt_prog_compiler_pic_F77='-KPIC'
+       lt_prog_compiler_static_F77='-static'
+         ;;
+       pgcc* | pgf77* | pgf90* | pgf95*)
+         # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       lt_prog_compiler_wl_F77='-Wl,'
+       lt_prog_compiler_pic_F77='-fpic'
+       lt_prog_compiler_static_F77='-Bstatic'
+         ;;
+       ccc*)
+         lt_prog_compiler_wl_F77='-Wl,'
+         # All Alpha code is PIC.
+         lt_prog_compiler_static_F77='-non_shared'
+         ;;
+       esac
+       ;;
  
 -    osf3* | osf4* | osf5*)
 -      lt_prog_compiler_wl_F77='-Wl,'
 -      # All OSF/1 code is PIC.
 -      lt_prog_compiler_static_F77='-non_shared'
 +    case $host_os in
 +    cygwin*)
 +      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 +      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 +      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
        ;;
 -
 -    sco3.2v5*)
 -      lt_prog_compiler_pic_F77='-Kpic'
 -      lt_prog_compiler_static_F77='-dn'
 +    mingw*)
 +      # MinGW DLLs use traditional 'lib' prefix
 +      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 +      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 +      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
 +        # It is most probably a Windows format PATH printed by
 +        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 +        # path with ; separators, and with drive letters. We can handle the
 +        # drive letters (cygwin fileutils understands them), so leave them,
 +        # especially as we might pass files found there to a mingw objdump,
 +        # which wouldn't understand a cygwinified path. Ahh.
 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 +      else
 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 +      fi
        ;;
-     pw32*)
-       # pw32 DLLs use 'pw' prefix rather than 'lib'
-       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+     solaris*)
+       lt_prog_compiler_pic_F77='-KPIC'
+       lt_prog_compiler_static_F77='-Bstatic'
+       case $cc_basename in
+       f77* | f90* | f95*)
+       lt_prog_compiler_wl_F77='-Qoption ld ';;
+       *)
+       lt_prog_compiler_wl_F77='-Wl,';;
+       esac
        ;;
 +    esac
 +    ;;
  
 -    sunos4*)
 -      lt_prog_compiler_wl_F77='-Qoption ld '
 -      lt_prog_compiler_pic_F77='-PIC'
 -      lt_prog_compiler_static_F77='-Bstatic'
 -      ;;
 -
 -    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 -      lt_prog_compiler_wl_F77='-Wl,'
 -      lt_prog_compiler_pic_F77='-KPIC'
 -      lt_prog_compiler_static_F77='-Bstatic'
 -      ;;
 +  *)
 +    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
 +    ;;
 +  esac
 +  dynamic_linker='Win32 ld.exe'
 +  # FIXME: first we should search . and the directory the executable is in
 +  shlibpath_var=PATH
 +  ;;
  
 -    sysv4*MP*)
 -      if test -d /usr/nec ;then
 -      lt_prog_compiler_pic_F77='-Kconform_pic'
 -      lt_prog_compiler_static_F77='-Bstatic'
 -      fi
 -      ;;
 +darwin* | rhapsody*)
 +  dynamic_linker="$host_os dyld"
 +  version_type=darwin
 +  need_lib_prefix=no
 +  need_version=no
 +  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 +  soname_spec='${libname}${release}${major}$shared_ext'
 +  shlibpath_overrides_runpath=yes
 +  shlibpath_var=DYLD_LIBRARY_PATH
 +  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 +  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 +  if test "$GCC" = yes; then
 +    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
 +  else
 +    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 +  fi
 +  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 +  ;;
 +
 +dgux*)
 +  version_type=linux
 +  need_lib_prefix=no
 +  need_version=no
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  ;;
  
- freebsd1*)
-   dynamic_linker=no
-   ;;
+     unicos*)
+       lt_prog_compiler_wl_F77='-Wl,'
+       lt_prog_compiler_can_build_shared_F77=no
+       ;;
  
- kfreebsd*-gnu)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-   soname_spec='${libname}${release}${shared_ext}$major'
-   shlibpath_var=LD_LIBRARY_PATH
-   shlibpath_overrides_runpath=no
-   hardcode_into_libs=yes
-   dynamic_linker='GNU ld.so'
-   ;;
+     uts4*)
+       lt_prog_compiler_pic_F77='-pic'
+       lt_prog_compiler_static_F77='-Bstatic'
+       ;;
  
 -    *)
 -      lt_prog_compiler_can_build_shared_F77=no
 -      ;;
 +freebsd* | dragonfly*)
 +  # DragonFly does not have aout.  When/if they implement a new
 +  # versioning mechanism, adjust this.
 +  if test -x /usr/bin/objformat; then
 +    objformat=`/usr/bin/objformat`
 +  else
 +    case $host_os in
 +    freebsd[123]*) objformat=aout ;;
 +    *) objformat=elf ;;
      esac
    fi
 +  version_type=freebsd-$objformat
 +  case $version_type in
 +    freebsd-elf*)
 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 +      need_version=no
 +      need_lib_prefix=no
 +      ;;
 +    freebsd-*)
 +      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 +      need_version=yes
 +      ;;
 +  esac
 +  shlibpath_var=LD_LIBRARY_PATH
 +  case $host_os in
 +  freebsd2*)
 +    shlibpath_overrides_runpath=yes
 +    ;;
 +  freebsd3.[01]* | freebsdelf3.[01]*)
 +    shlibpath_overrides_runpath=yes
 +    hardcode_into_libs=yes
 +    ;;
 +  *) # from 3.2 on
 +    shlibpath_overrides_runpath=no
 +    hardcode_into_libs=yes
 +    ;;
 +  esac
 +  ;;
  
- gnu*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-   soname_spec='${libname}${release}${shared_ext}$major'
-   shlibpath_var=LD_LIBRARY_PATH
-   hardcode_into_libs=yes
-   ;;
+ { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+ echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
  
 -#
 -# Check to make sure the PIC flag actually works.
 -#
 -if test -n "$lt_prog_compiler_pic_F77"; then
 +hpux9* | hpux10* | hpux11*)
 +  # Give a soname corresponding to the major version so that dld.sl refuses to
 +  # link against other versions.
 +  version_type=sunos
 +  need_lib_prefix=no
 +  need_version=no
 +  case $host_cpu in
 +  ia64*)
 +    shrext_cmds='.so'
 +    hardcode_into_libs=yes
 +    dynamic_linker="$host_os dld.so"
 +    shlibpath_var=LD_LIBRARY_PATH
 +    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +    soname_spec='${libname}${release}${shared_ext}$major'
 +    if test "X$HPUX_IA64_MODE" = X32; then
 +      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 +    else
 +      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 +    fi
 +    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 +    ;;
 +   hppa*64*)
 +     shrext_cmds='.sl'
 +     hardcode_into_libs=yes
 +     dynamic_linker="$host_os dld.sl"
 +     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 +     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 +     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +     soname_spec='${libname}${release}${shared_ext}$major'
 +     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 +     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 +     ;;
 +   *)
 +    shrext_cmds='.sl'
 +    dynamic_linker="$host_os dld.sl"
 +    shlibpath_var=SHLIB_PATH
 +    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +    soname_spec='${libname}${release}${shared_ext}$major'
 +    ;;
 +  esac
 +  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 +  postinstall_cmds='chmod 555 $lib'
 +  ;;
  
- irix5* | irix6* | nonstopux*)
-   case $host_os in
-     nonstopux*) version_type=nonstopux ;;
-     *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-   esac
-   need_lib_prefix=no
-   need_version=no
-   soname_spec='${libname}${release}${shared_ext}$major'
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-   case $host_os in
-   irix5* | nonstopux*)
-     libsuff= shlibsuff=
+ { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+ echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
+ if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_prog_compiler_pic_works_F77=no
+   ac_outfile=conftest.$ac_objext
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="$lt_prog_compiler_pic_F77"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    # The option is referenced via a variable to avoid confusing sed.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:42538: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+    echo "$as_me:42542: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
+      $SED '/^$/d' conftest.err >conftest.er2
+      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
+        lt_prog_compiler_pic_works_F77=yes
+      fi
+    fi
+    $rm conftest*
+ fi
+ { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
+ echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; }
+ if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+     case $lt_prog_compiler_pic_F77 in
+      "" | " "*) ;;
+      *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+      esac
+ else
+     lt_prog_compiler_pic_F77=
+      lt_prog_compiler_can_build_shared_F77=no
+ fi
+ fi
+ case $host_os in
+   # For platforms which do not support PIC, -DPIC is meaningless:
+   *djgpp*)
+     lt_prog_compiler_pic_F77=
      ;;
    *)
 -    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
 +    case $LD in # libtool.m4 will add one of these switches to LD
 +    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 +      libsuff= shlibsuff= libmagic=32-bit;;
 +    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 +      libsuff=32 shlibsuff=N32 libmagic=N32;;
 +    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 +      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 +    *) libsuff= shlibsuff= libmagic=never-match;;
 +    esac
      ;;
 -esac
 +  esac
 +  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 +  shlibpath_overrides_runpath=no
 +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 +  hardcode_into_libs=yes
 +  ;;
  
- # No shared lib support for Linux oldld, aout, or coff.
- linux*oldld* | linux*aout* | linux*coff*)
-   dynamic_linker=no
-   ;;
+ { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+ echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+ if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_cv_prog_compiler_c_o_F77=no
+    $rm -r conftest 2>/dev/null
+    mkdir conftest
+    cd conftest
+    mkdir out
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  
- # This must be Linux ELF.
- linux*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-   soname_spec='${libname}${release}${shared_ext}$major'
-   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-   shlibpath_var=LD_LIBRARY_PATH
-   shlibpath_overrides_runpath=no
-   # This implies no fast_install, which is unacceptable.
-   # Some rework will be needed to allow for fast_install
-   # before this can be enabled.
-   hardcode_into_libs=yes
+    lt_compiler_flag="-o out/conftest2.$ac_objext"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:42600: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+    echo "$as_me:42604: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
+      $SED '/^$/d' out/conftest.err >out/conftest.er2
+      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+        lt_cv_prog_compiler_c_o_F77=yes
+      fi
+    fi
+    chmod u+w . 2>&5
+    $rm conftest*
+    # SGI C++ compiler will create directory out/ii_files/ for
+    # template instantiation
+    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+    $rm out/* && rmdir out
+    cd ..
+    rmdir conftest
+    $rm conftest*
  
-   # Append ld.so.conf contents to the search path
-   if test -f /etc/ld.so.conf; then
-     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-   fi
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+ echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
  
 +  # We used to test for /lib/ld.so.1 and disable shared libraries on
 +  # powerpc, because MkLinux only supported shared libraries with the
 +  # GNU dynamic linker.  Since this was broken with cross compilers,
 +  # most powerpc-linux boxes support dynamic linking these days and
 +  # people can always --disable-shared, the test was removed, and we
 +  # assume the GNU/Linux dynamic linker is in use.
 +  dynamic_linker='GNU/Linux ld.so'
 +  ;;
  
- knetbsd*-gnu)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-   soname_spec='${libname}${release}${shared_ext}$major'
-   shlibpath_var=LD_LIBRARY_PATH
-   shlibpath_overrides_runpath=no
-   hardcode_into_libs=yes
-   dynamic_linker='GNU ld.so'
-   ;;
+ hard_links="nottested"
+ if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+   # do not overwrite the value of need_locks provided by the user
+   { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+ echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+   hard_links=yes
+   $rm conftest*
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   touch conftest.a
+   ln conftest.a conftest.b 2>&5 || hard_links=no
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   { echo "$as_me:$LINENO: result: $hard_links" >&5
+ echo "${ECHO_T}$hard_links" >&6; }
+   if test "$hard_links" = no; then
  
- netbsd*)
-   version_type=sunos
-   need_lib_prefix=no
-   need_version=no
-   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-     dynamic_linker='NetBSD (a.out) ld.so'
-   else
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     dynamic_linker='NetBSD ld.elf_so'
-   fi
-   shlibpath_var=LD_LIBRARY_PATH
-   shlibpath_overrides_runpath=yes
-   hardcode_into_libs=yes
-   ;;
+     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+ echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
  
- newsos6)
-   version_type=linux
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-   shlibpath_var=LD_LIBRARY_PATH
-   shlibpath_overrides_runpath=yes
-   ;;
  
- nto-qnx*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-   soname_spec='${libname}${release}${shared_ext}$major'
-   shlibpath_var=LD_LIBRARY_PATH
-   shlibpath_overrides_runpath=yes
-   ;;
+     cat <<AAW_EOF >>config.warnings
+ \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
+ AAW_EOF
+     need_locks=warn
+   fi
+ else
+   need_locks=no
+ fi
+ { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+   runpath_var=
+   allow_undefined_flag_F77=
+   enable_shared_with_static_runtimes_F77=no
+   archive_cmds_F77=
+   archive_expsym_cmds_F77=
+   old_archive_From_new_cmds_F77=
+   old_archive_from_expsyms_cmds_F77=
+   export_dynamic_flag_spec_F77=
+   whole_archive_flag_spec_F77=
+   thread_safe_flag_spec_F77=
+   hardcode_libdir_flag_spec_F77=
+   hardcode_libdir_flag_spec_ld_F77=
+   hardcode_libdir_separator_F77=
+   hardcode_direct_F77=no
+   hardcode_minus_L_F77=no
+   hardcode_shlibpath_var_F77=unsupported
+   link_all_deplibs_F77=unknown
+   hardcode_automatic_F77=no
+   module_cmds_F77=
+   module_expsym_cmds_F77=
+   always_export_symbols_F77=no
+   export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   # include_expsyms should be a list of space-separated symbols to be *always*
+   # included in the symbol list
+   include_expsyms_F77=
+   # exclude_expsyms can be an extended regexp of symbols to exclude
+   # it will be wrapped by ` (' and `)$', so one must not match beginning or
+   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+   # as well as any symbol that contains `d'.
+   exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
+   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+   # platforms (ab)use it in PIC code, but their linkers get confused if
+   # the symbol is explicitly referenced.  Since portable code cannot
+   # rely on this symbol name, it's probably fine to never include it in
+   # preloaded symbol tables.
+   extract_expsyms_cmds=
+   # Just being paranoid about ensuring that cc_basename is set.
+   for cc_temp in $compiler""; do
+   case $cc_temp in
+     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+     \-*) ;;
+     *) break;;
+   esac
+ done
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  
 +openbsd*)
 +  version_type=sunos
 +  need_lib_prefix=no
 +  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
    case $host_os in
 -  cygwin* | mingw* | pw32*)
 -    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 -    # When not using gcc, we currently assume that we are using
 -    # Microsoft Visual C++.
 -    if test "$GCC" != yes; then
 -      with_gnu_ld=no
 -    fi
 -    ;;
 -  openbsd*)
 -    with_gnu_ld=no
 -    ;;
 +    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
 +    *)                         need_version=no  ;;
    esac
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-   shlibpath_var=LD_LIBRARY_PATH
-   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+   ld_shlibs_F77=yes
+   if test "$with_gnu_ld" = yes; then
+     # If archive_cmds runs LD, not CC, wlarc should be empty
+     wlarc='${wl}'
+     # Set some defaults for GNU ld with shared library support. These
+     # are reset later if shared libraries are not supported. Putting them
+     # here allows them to be overridden if necessary.
+     runpath_var=LD_RUN_PATH
+     hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+     export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+     # ancient GNU ld didn't support --whole-archive et. al.
+     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+       whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+       else
+       whole_archive_flag_spec_F77=
+     fi
+     supports_anon_versioning=no
+     case `$LD -v 2>/dev/null` in
+       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+       *\ 2.11.*) ;; # other 2.11 versions
+       *) supports_anon_versioning=yes ;;
+     esac
+     # See if GNU ld supports shared libraries.
      case $host_os in
 -    aix3* | aix4* | aix5*)
 -      # On AIX/PPC, the GNU linker is very broken
 -      if test "$host_cpu" != ia64; then
 -      ld_shlibs_F77=no
 -      cat <<EOF 1>&2
 +      openbsd2.[89] | openbsd2.[89].*)
 +      shlibpath_overrides_runpath=no
 +      ;;
 +      *)
 +      shlibpath_overrides_runpath=yes
 +      ;;
 +      esac
 +  else
 +    shlibpath_overrides_runpath=yes
 +  fi
 +  ;;
  
 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 -*** to be unable to reliably create shared libraries on AIX.
 -*** Therefore, libtool is disabling shared libraries support.  If you
 -*** really care for shared libraries, you may want to modify your PATH
 -*** so that a non-GNU linker is found, and then restart.
 +os2*)
 +  libname_spec='$name'
 +  shrext_cmds=".dll"
 +  need_lib_prefix=no
 +  library_names_spec='$libname${shared_ext} $libname.a'
 +  dynamic_linker='OS/2 ld.exe'
 +  shlibpath_var=LIBPATH
 +  ;;
  
 -EOF
 -      fi
 -      ;;
 +osf3* | osf4* | osf5*)
 +  version_type=osf
 +  need_lib_prefix=no
 +  need_version=no
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 +  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 +  ;;
  
 -    amigaos*)
 -      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 -      hardcode_libdir_flag_spec_F77='-L$libdir'
 -      hardcode_minus_L_F77=yes
 +sco3.2v5*)
 +  version_type=osf
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  ;;
  
 -      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 -      # that the semantics of dynamic libraries on AmigaOS, at least up
 -      # to version 4, is to share data among multiple programs linked
 -      # with the same dynamic library.  Since this doesn't match the
 -      # behavior of shared libraries on other platforms, we can't use
 -      # them.
 -      ld_shlibs_F77=no
 -      ;;
 +solaris*)
 +  version_type=linux
 +  need_lib_prefix=no
 +  need_version=no
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  shlibpath_overrides_runpath=yes
 +  hardcode_into_libs=yes
 +  # ldd complains unless libraries are executable
 +  postinstall_cmds='chmod +x $lib'
 +  ;;
  
 -    beos*)
 -      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 -      allow_undefined_flag_F77=unsupported
 -      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 -      # support --undefined.  This deserves some investigation.  FIXME
 -      archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -      else
 -      ld_shlibs_F77=no
 -      fi
 -      ;;
 +sunos4*)
 +  version_type=sunos
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 +  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  shlibpath_overrides_runpath=yes
 +  if test "$with_gnu_ld" = yes; then
 +    need_lib_prefix=no
 +  fi
 +  need_version=yes
 +  ;;
  
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-   version_type=linux
-   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-   soname_spec='${libname}${release}${shared_ext}$major'
-   shlibpath_var=LD_LIBRARY_PATH
-   case $host_vendor in
-     sni)
-       shlibpath_overrides_runpath=no
-       need_lib_prefix=no
-       export_dynamic_flag_spec='${wl}-Blargedynsym'
-       runpath_var=LD_RUN_PATH
+     cygwin* | mingw* | pw32*)
+       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+       # as there is no search path for DLLs.
+       hardcode_libdir_flag_spec_F77='-L$libdir'
+       allow_undefined_flag_F77=unsupported
+       always_export_symbols_F77=no
+       enable_shared_with_static_runtimes_F77=yes
+       export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+         archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+       else
+       ld_shlibs_F77=no
+       fi
        ;;
-     siemens)
-       need_lib_prefix=no
+     linux*)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       tmp_addflag=
+       case $cc_basename,$host_cpu in
+       pgcc*)                          # Portland Group C compiler
+         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       esac
+       archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       if test $supports_anon_versioning = yes; then
+         archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+   $echo "local: *; };" >> $output_objdir/$libname.ver~
+         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+       fi
+       else
+       ld_shlibs_F77=no
+       fi
        ;;
 -
 -    netbsd*)
 -      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 -      archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 -      wlarc=
 -      else
 -      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -      archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 -      fi
 +    motorola)
 +      need_lib_prefix=no
 +      need_version=no
 +      shlibpath_overrides_runpath=no
 +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
        ;;
 +  esac
 +  ;;
  
 -    solaris* | sysv5*)
 -      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 -      ld_shlibs_F77=no
 -      cat <<EOF 1>&2
 +sysv4*MP*)
 +  if test -d /usr/nec ;then
 +    version_type=linux
 +    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 +    soname_spec='$libname${shared_ext}.$major'
 +    shlibpath_var=LD_LIBRARY_PATH
 +  fi
 +  ;;
  
 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 -*** create shared libraries on Solaris systems.  Therefore, libtool
 -*** is disabling shared libraries support.  We urge you to upgrade GNU
 -*** binutils to release 2.9.1 or newer.  Another option is to modify
 -*** your PATH or compiler configuration so that the native linker is
 -*** used, and then restart.
 +uts4*)
 +  version_type=linux
 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +  soname_spec='${libname}${release}${shared_ext}$major'
 +  shlibpath_var=LD_LIBRARY_PATH
 +  ;;
  
 -EOF
 -      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 -      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -      archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 -      else
 -      ld_shlibs_F77=no
 -      fi
 -      ;;
 +*)
 +  dynamic_linker=no
 +  ;;
 +esac
 +echo "$as_me:$LINENO: result: $dynamic_linker" >&5
 +echo "${ECHO_T}$dynamic_linker" >&6
 +test "$dynamic_linker" = no && can_build_shared=no
  
 -    sunos4*)
 -      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 -      wlarc=
 -      hardcode_direct_F77=yes
 -      hardcode_shlibpath_var_F77=no
 -      ;;
 +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
 +hardcode_action_GCJ=
 +if test -n "$hardcode_libdir_flag_spec_GCJ" || \
 +   test -n "$runpath_var_GCJ" || \
 +   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
  
-   # We can hardcode non-existant directories.
-   if test "$hardcode_direct_GCJ" != no &&
-      # If the only mechanism to avoid hardcoding is shlibpath_var, we
-      # have to relink, otherwise we might link with an installed library
-      # when we should be linking with a yet-to-be-installed one
-      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
-      test "$hardcode_minus_L_GCJ" != no; then
-     # Linking always hardcodes the temporary library directory.
-     hardcode_action_GCJ=relink
-   else
-     # We can link without hardcoding, and we can hardcode nonexisting dirs.
-     hardcode_action_GCJ=immediate
-   fi
- else
-   # We cannot hardcode anything, or else we can only hardcode existing
-   # directories.
-   hardcode_action_GCJ=unsupported
- fi
- echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
- echo "${ECHO_T}$hardcode_action_GCJ" >&6
+     *)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
+       ld_shlibs_F77=no
+       fi
+       ;;
+     esac
  
- if test "$hardcode_action_GCJ" = relink; then
-   # Fast installation is not supported
-   enable_fast_install=no
- elif test "$shlibpath_overrides_runpath" = yes ||
-      test "$enable_shared" = no; then
-   # Fast installation is not necessary
-   enable_fast_install=needless
- fi
+     if test "$ld_shlibs_F77" = no; then
+       runpath_var=
+       hardcode_libdir_flag_spec_F77=
+       export_dynamic_flag_spec_F77=
+       whole_archive_flag_spec_F77=
+     fi
+   else
+     # PORTME fill in a description of your system's linker (not GNU ld)
+     case $host_os in
+     aix3*)
+       allow_undefined_flag_F77=unsupported
+       always_export_symbols_F77=yes
+       archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+       # Note: this linker hardcodes the directories in LIBPATH if there
+       # are no directories specified by -L.
+       hardcode_minus_L_F77=yes
+       if test "$GCC" = yes && test -z "$link_static_flag"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct_F77=unsupported
+       fi
+       ;;
  
 -    aix4* | aix5*)
 -      if test "$host_cpu" = ia64; then
 -      # On IA64, the linker does run time linking by default, so we don't
 -      # have to do anything special.
 -      aix_use_runtimelinking=no
 -      exp_sym_flag='-Bexport'
 -      no_entry_flag=""
 -      else
 -      # If we're using GNU nm, then we don't want the "-C" option.
 -      # -C means demangle to AIX nm, but means don't demangle with GNU nm
 -      if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 -        export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 -      else
 -        export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 -      fi
 -      aix_use_runtimelinking=no
 +striplib=
 +old_striplib=
 +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 +  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 +  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 +  echo "$as_me:$LINENO: result: yes" >&5
 +echo "${ECHO_T}yes" >&6
 +else
 +# FIXME - insert some real tests, host_os isn't really good enough
 +  case $host_os in
 +   darwin*)
 +       if test -n "$STRIP" ; then
 +         striplib="$STRIP -x"
 +         echo "$as_me:$LINENO: result: yes" >&5
 +echo "${ECHO_T}yes" >&6
 +       else
 +  echo "$as_me:$LINENO: result: no" >&5
 +echo "${ECHO_T}no" >&6
 +fi
 +       ;;
 +   *)
 +  echo "$as_me:$LINENO: result: no" >&5
 +echo "${ECHO_T}no" >&6
 +    ;;
 +  esac
 +fi
  
 -      # Test if we are trying to use run time linking or normal
 -      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 -      # need to do runtime linking.
 -      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
 -        for ld_flag in $LDFLAGS; do
 -        if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 -          aix_use_runtimelinking=yes
 -          break
 -        fi
 -        done
 -      esac
 +if test "x$enable_dlopen" != xyes; then
 +  enable_dlopen=unknown
 +  enable_dlopen_self=unknown
 +  enable_dlopen_self_static=unknown
 +else
 +  lt_cv_dlopen=no
 +  lt_cv_dlopen_libs=
  
 -      exp_sym_flag='-bexport'
 -      no_entry_flag='-bnoentry'
 -      fi
 +  case $host_os in
 +  beos*)
 +    lt_cv_dlopen="load_add_on"
 +    lt_cv_dlopen_libs=
 +    lt_cv_dlopen_self=yes
 +    ;;
  
 -      # When large executables or shared objects are built, AIX ld can
 -      # have problems creating the table of contents.  If linking a library
 -      # or program results in "error TOC overflow" add -mminimal-toc to
 -      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 -      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 +  mingw* | pw32*)
 +    lt_cv_dlopen="LoadLibrary"
 +    lt_cv_dlopen_libs=
 +   ;;
  
-   cygwin*)
-     lt_cv_dlopen="dlopen"
-     lt_cv_dlopen_libs=
-    ;;
 -      archive_cmds_F77=''
 -      hardcode_direct_F77=yes
 -      hardcode_libdir_separator_F77=':'
 -      link_all_deplibs_F77=yes
++  cygwin*)
++    lt_cv_dlopen="dlopen"
++    lt_cv_dlopen_libs=
++   ;;
+       if test "$GCC" = yes; then
+       case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+         hardcode_direct_F77=yes
+         else
+         # We have old collect2
+         hardcode_direct_F77=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L_F77=yes
+         hardcode_libdir_flag_spec_F77='-L$libdir'
+         hardcode_libdir_separator_F77=
+         fi
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+       else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+       if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+       fi
+       fi
+       fi
 -      # It seems that -bexpall does not export symbols beginning with
 -      # underscore (_), so it is better to generate a list of symbols to export.
 -      always_export_symbols_F77=yes
 -      if test "$aix_use_runtimelinking" = yes; then
 -      # Warning - without using the other runtime loading flags (-brtl),
 -      # -berok will link without error, but may produce a broken library.
 -      allow_undefined_flag_F77='-berok'
 -       # Determine the default libpath from the value encoded in an empty executable.
 -       cat >conftest.$ac_ext <<_ACEOF
 -      program main
 -
 -      end
++/* 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 dlopen ();
++int
++main ()
++{
++dlopen ();
++  ;
++  return 0;
++}
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_f77_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+ }'`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+ }'`; fi
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 -       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
 -      archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 -       else
 -      if test "$host_cpu" = ia64; then
 -        hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
 -        allow_undefined_flag_F77="-z nodefs"
 -        archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 -      else
 -       # Determine the default libpath from the value encoded in an empty executable.
 -       cat >conftest.$ac_ext <<_ACEOF
 -      program main
++/* 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 shl_load ();
++/* 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_shl_load) || defined (__stub___shl_load)
++choke me
++#else
++char (*f) () = shl_load;
++#endif
++#ifdef __cplusplus
++}
++#endif
 -      end
++int
++main ()
++{
++return f != shl_load;
++  ;
++  return 0;
++}
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_f77_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+ }'`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+ }'`; fi
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+        hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
+         no_undefined_flag_F77=' ${wl}-bernotok'
+         allow_undefined_flag_F77=' ${wl}-berok'
+         # -bexpall does not export symbols beginning with underscore (_)
+         always_export_symbols_F77=yes
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec_F77=' '
+         archive_cmds_need_lc_F77=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+       fi
+       ;;
+     amigaos*)
+       archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+       hardcode_libdir_flag_spec_F77='-L$libdir'
+       hardcode_minus_L_F77=yes
+       # see comment about different semantics on the GNU ld section
+       ld_shlibs_F77=no
+       ;;
+     bsdi[45]*)
+       export_dynamic_flag_spec_F77=-rdynamic
+       ;;
+     cygwin* | mingw* | pw32*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+       # no search path for DLLs.
+       hardcode_libdir_flag_spec_F77=' '
+       allow_undefined_flag_F77=unsupported
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+       # The linker will automatically build a .lib file if we build a DLL.
+       old_archive_From_new_cmds_F77='true'
+       # FIXME: Should let the user specify the lib program.
+       old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+       fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
+       enable_shared_with_static_runtimes_F77=yes
+       ;;
+     darwin* | rhapsody*)
+       case $host_os in
+         rhapsody* | darwin1.[012])
+          allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
+          ;;
+        *) # Darwin 1.3 on
+          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+            allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+          else
+            case ${MACOSX_DEPLOYMENT_TARGET} in
+              10.[012])
+                allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+                ;;
+              10.*)
+                allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
+                ;;
+            esac
+          fi
+          ;;
+       esac
+       archive_cmds_need_lc_F77=no
+       hardcode_direct_F77=no
+       hardcode_automatic_F77=yes
+       hardcode_shlibpath_var_F77=unsupported
+       whole_archive_flag_spec_F77=''
+       link_all_deplibs_F77=yes
+     if test "$GCC" = yes ; then
+       output_verbose_link_cmd='echo'
+         archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+       archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+       module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+     else
+       case $cc_basename in
+         xlc*)
+          output_verbose_link_cmd='echo'
+          archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           ;;
+        *)
+          ld_shlibs_F77=no
+           ;;
+       esac
+     fi
+       ;;
+     dgux*)
+       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_libdir_flag_spec_F77='-L$libdir'
+       hardcode_shlibpath_var_F77=no
+       ;;
+     freebsd1*)
+       ld_shlibs_F77=no
+       ;;
+     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+     # support.  Future versions do this automatically, but an explicit c++rt0.o
+     # does not break anything, and helps significantly (at the cost of a little
+     # extra space).
+     freebsd2.2*)
+       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+       hardcode_libdir_flag_spec_F77='-R$libdir'
+       hardcode_direct_F77=yes
+       hardcode_shlibpath_var_F77=no
+       ;;
+     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+     freebsd2*)
+       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_direct_F77=yes
+       hardcode_minus_L_F77=yes
+       hardcode_shlibpath_var_F77=no
+       ;;
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+     freebsd* | kfreebsd*-gnu | dragonfly*)
+       archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec_F77='-R$libdir'
+       hardcode_direct_F77=yes
+       hardcode_shlibpath_var_F77=no
+       ;;
+     hpux9*)
+       if test "$GCC" = yes; then
+       archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       else
+       archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       fi
+       hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator_F77=:
+       hardcode_direct_F77=yes
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       hardcode_minus_L_F77=yes
+       export_dynamic_flag_spec_F77='${wl}-E'
+       ;;
+     hpux10* | hpux11*)
+       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*|ia64*)
+         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+       else
+       case $host_cpu in
+       hppa*64*|ia64*)
+         archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       *)
+         archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       esac
+       fi
+       if test "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+         hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+         hardcode_libdir_separator_F77=:
+         hardcode_direct_F77=no
+         hardcode_shlibpath_var_F77=no
+         ;;
+       ia64*)
+         hardcode_libdir_flag_spec_F77='-L$libdir'
+         hardcode_direct_F77=no
+         hardcode_shlibpath_var_F77=no
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L_F77=yes
+         ;;
+       *)
+         hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+         hardcode_libdir_separator_F77=:
+         hardcode_direct_F77=yes
+         export_dynamic_flag_spec_F77='${wl}-E'
  
-   darwin*)
-   # if libdl is installed we need to link against it
-     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
- echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
- if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldl  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L_F77=yes
+         ;;
+       esac
+       fi
+       ;;
  
- /* 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 dlopen ();
- int
- main ()
- {
- dlopen ();
-   ;
-   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_dl_dlopen=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+     irix5* | irix6* | nonstopux*)
+       if test "$GCC" = yes; then
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       else
+       archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+       fi
+       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+       hardcode_libdir_separator_F77=:
+       link_all_deplibs_F77=yes
+       ;;
  
- ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5
- echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
- if test $ac_cv_lib_dl_dlopen = yes; then
-   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
- else
+     netbsd*)
+       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+       else
+       archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+       fi
+       hardcode_libdir_flag_spec_F77='-R$libdir'
+       hardcode_direct_F77=yes
+       hardcode_shlibpath_var_F77=no
+       ;;
  
-     lt_cv_dlopen="dyld"
-     lt_cv_dlopen_libs=
-     lt_cv_dlopen_self=yes
+     newsos6)
+       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_direct_F77=yes
+       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+       hardcode_libdir_separator_F77=:
+       hardcode_shlibpath_var_F77=no
+       ;;
  
- fi
+     openbsd*)
+       hardcode_direct_F77=yes
+       hardcode_shlibpath_var_F77=no
+       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+       hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_F77='${wl}-E'
+       else
+        case $host_os in
+        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+          archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+          hardcode_libdir_flag_spec_F77='-R$libdir'
+          ;;
+        *)
+          archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+          hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+          ;;
+        esac
+       fi
+       ;;
  
-    ;;
+     os2*)
+       hardcode_libdir_flag_spec_F77='-L$libdir'
+       hardcode_minus_L_F77=yes
+       allow_undefined_flag_F77=unsupported
+       archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+       old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+       ;;
  
-   *)
-     echo "$as_me:$LINENO: checking for shl_load" >&5
- echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
- if test "${ac_cv_func_shl_load+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 shl_load to an innocuous variant, in case <limits.h> declares shl_load.
-    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
- #define shl_load innocuous_shl_load
+     osf3*)
+       if test "$GCC" = yes; then
+       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       else
+       allow_undefined_flag_F77=' -expect_unresolved \*'
+       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       fi
+       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+       hardcode_libdir_separator_F77=:
+       ;;
  
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char shl_load (); below.
-     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-     <limits.h> exists even on freestanding compilers.  */
+     osf4* | osf5*)    # as osf3* with the addition of -msym flag
+       if test "$GCC" = yes; then
+       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+       else
+       allow_undefined_flag_F77=' -expect_unresolved \*'
+       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec_F77='-rpath $libdir'
+       fi
+       hardcode_libdir_separator_F77=:
+       ;;
  
- #undef shl_load
+     sco3.2v5*)
+       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_shlibpath_var_F77=no
+       export_dynamic_flag_spec_F77='${wl}-Bexport'
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ;;
  
- /* 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 shl_load ();
- /* 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_shl_load) || defined (__stub___shl_load)
- choke me
- #else
- char (*f) () = shl_load;
- #endif
- #ifdef __cplusplus
- }
- #endif
+     solaris*)
+       no_undefined_flag_F77=' -z text'
+       if test "x$archive_cmds" = "x"; then
+         if test "$GCC" = yes; then
+         wlarc='${wl}'
+         if $CC -v --help 2>/dev/null | grep -- -shared  > /dev/null 2> /dev/null; then
+           archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+           archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+         else
+           archive_cmds_F77='$CC ${wl}-G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+           archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+           $CC ${wl}-G ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+           fi
+         else
+         wlarc=''
+           lt_prog_compiler_static_F77='-static'
+         archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+           lt_prog_compiler_static_F77='-static'
+       fi
+       fi
+       hardcode_libdir_flag_spec_F77='-R$libdir'
+       hardcode_shlibpath_var_F77=no
+       case $host_os in
+       solaris2.[0-5] | solaris2.[0-5].*) ;;
+       *)
+       # The compiler driver will combine linker options so we
+       # cannot just pass the convience library names through
+       # without $wl, iff we do not link with $LD.
+       # Luckily, gcc supports the same syntax we need for Sun Studio.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       case $wlarc in
+       '')
+         whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+       *)
+         whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+       esac ;;
+       esac
+       link_all_deplibs_F77=yes
+       ;;
  
- int
- main ()
- {
- return f != shl_load;
-   ;
-   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_shl_load=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+     sunos4*)
+       if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+       else
+       archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+       fi
+       hardcode_libdir_flag_spec_F77='-L$libdir'
+       hardcode_direct_F77=yes
+       hardcode_minus_L_F77=yes
+       hardcode_shlibpath_var_F77=no
+       ;;
  
- ac_cv_func_shl_load=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
- echo "${ECHO_T}$ac_cv_func_shl_load" >&6
- if test $ac_cv_func_shl_load = yes; then
-   lt_cv_dlopen="shl_load"
- else
-   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
- echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
- if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldld  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
+     sysv4)
+       case $host_vendor in
+       sni)
+         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_F77=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         reload_cmds_F77='$CC -r -o $output$reload_objs'
+         hardcode_direct_F77=no
+         ;;
+       motorola)
+         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+       ;;
+       esac
+       runpath_var='LD_RUN_PATH'
+       hardcode_shlibpath_var_F77=no
+       ;;
  
 -    sysv4.3*)
 -      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_shlibpath_var_F77=no
 -      export_dynamic_flag_spec_F77='-Bexport'
 -      ;;
 +/* 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 shl_load ();
 +int
 +main ()
 +{
 +shl_load ();
 +  ;
 +  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_dld_shl_load=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -    sysv4*MP*)
 -      if test -d /usr/nec; then
 -      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_shlibpath_var_F77=no
 -      runpath_var=LD_RUN_PATH
 -      hardcode_runpath_var=yes
 -      ld_shlibs_F77=yes
 -      fi
 -      ;;
 +ac_cv_lib_dld_shl_load=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_dld_shl_load" >&5
 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
 +if test $ac_cv_lib_dld_shl_load = yes; then
 +  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
 +else
 +  echo "$as_me:$LINENO: checking for dlopen" >&5
 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
 +if test "${ac_cv_func_dlopen+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 dlopen to an innocuous variant, in case <limits.h> declares dlopen.
 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 +#define dlopen innocuous_dlopen
  
 -    sysv4.2uw2*)
 -      archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_direct_F77=yes
 -      hardcode_minus_L_F77=no
 -      hardcode_shlibpath_var_F77=no
 -      hardcode_runpath_var=yes
 -      runpath_var=LD_RUN_PATH
 -      ;;
 +/* System header to define __stub macros and hopefully few prototypes,
 +    which can conflict with char dlopen (); below.
 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 +    <limits.h> exists even on freestanding compilers.  */
  
 -   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
 -      no_undefined_flag_F77='${wl}-z ${wl}text'
 -      if test "$GCC" = yes; then
 -      archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 -      else
 -      archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 -      fi
 -      runpath_var='LD_RUN_PATH'
 -      hardcode_shlibpath_var_F77=no
 -      ;;
 +#ifdef __STDC__
 +# include <limits.h>
 +#else
 +# include <assert.h>
 +#endif
  
 -    sysv5*)
 -      no_undefined_flag_F77=' -z text'
 -      # $CC -shared without GNU ld will not create a library from C++
 -      # object files and a static libstdc++, better avoid it by now
 -      archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 -              $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 -      hardcode_libdir_flag_spec_F77=
 -      hardcode_shlibpath_var_F77=no
 -      runpath_var='LD_RUN_PATH'
 -      ;;
 +#undef dlopen
  
 -    uts4*)
 -      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_libdir_flag_spec_F77='-L$libdir'
 -      hardcode_shlibpath_var_F77=no
 -      ;;
 +/* 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 dlopen ();
 +/* 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_dlopen) || defined (__stub___dlopen)
 +choke me
 +#else
 +char (*f) () = dlopen;
 +#endif
 +#ifdef __cplusplus
 +}
 +#endif
  
 -    *)
 -      ld_shlibs_F77=no
 -      ;;
 -    esac
 -  fi
 +int
 +main ()
 +{
 +return f != dlopen;
 +  ;
 +  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_dlopen=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_func_dlopen=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+ echo "${ECHO_T}$ld_shlibs_F77" >&6; }
+ test "$ld_shlibs_F77" = no && can_build_shared=no
+ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+ if test "$GCC" = yes; then
+   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  fi
 +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6
 +if test $ac_cv_func_dlopen = yes; then
 +  lt_cv_dlopen="dlopen"
 +else
 +  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-ldl  $LIBS"
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
  
 -#
 -# Do we need to explicitly link libc?
 -#
 -case "x$archive_cmds_need_lc_F77" in
 -x|xyes)
 -  # Assume -lc should be added
 -  archive_cmds_need_lc_F77=yes
 +/* 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 dlopen ();
 +int
 +main ()
 +{
 +dlopen ();
 +  ;
 +  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_dl_dlopen=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5
- echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
- if test $ac_cv_lib_dl_dlopen = yes; then
-   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
- else
-   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
- echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
- if test "${ac_cv_lib_svld_dlopen+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsvld  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
+   if test "$enable_shared" = yes && test "$GCC" = yes; then
+     case $archive_cmds_F77 in
+     *'~'*)
+       # FIXME: we may have to deal with multi-command sequences.
+       ;;
+     '$CC '*)
+       # Test whether the compiler implicitly links with -lc since on some
+       # systems, -lgcc has to come before -lc. If gcc already passes -lc
+       # to ld, don't add -lc before -lgcc.
+       { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+       $rm conftest*
+       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  
 -      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 -  (eval $ac_compile) 2>&5
 +/* 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 dlopen ();
 +int
 +main ()
 +{
 +dlopen ();
 +  ;
 +  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); } 2>conftest.err; then
 -        soname=conftest
 -        lib=conftest
 -        libobjs=conftest.$ac_objext
 -        deplibs=
 -        wl=$lt_prog_compiler_wl_F77
 -        compiler_flags=-v
 -        linker_flags=-v
 -        verstring=
 -        output_objdir=.
 -        libname=conftest
 -        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
 -        allow_undefined_flag_F77=
 -        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
 -  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&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_svld_dlopen=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+   (exit $ac_status); }
+         then
+         archive_cmds_need_lc_F77=no
+         else
+         archive_cmds_need_lc_F77=yes
+         fi
+         allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+       else
+         cat conftest.err 1>&5
+       fi
+       $rm conftest*
+       { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+ echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
+       ;;
+     esac
+   fi
+   ;;
+ esac
  
- ac_cv_lib_svld_dlopen=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_svld_dlopen" >&5
- echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
- if test $ac_cv_lib_svld_dlopen = yes; then
-   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
- else
-   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
- echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
- if test "${ac_cv_lib_dld_dld_link+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+ echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+ library_names_spec=
+ libname_spec='lib$name'
+ soname_spec=
+ shrext_cmds=".so"
+ postinstall_cmds=
+ postuninstall_cmds=
+ finish_cmds=
+ finish_eval=
+ shlibpath_var=
+ shlibpath_overrides_runpath=unknown
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
+ if test "$GCC" = yes; then
+   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+     # if the path contains ";" then we assume it to be the separator
+     # otherwise default to the standard path separator (i.e. ":") - it is
+     # assumed that no part of a normal pathname contains ";" but that should
+     # okay in the real world where ";" in dirpaths is itself problematic.
+     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+   else
+     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+   fi
  else
 -  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 -fi
 -need_lib_prefix=unknown
 -hardcode_into_libs=no
 -
 -# when you set need_version to no, make sure it does not cause -set_version
 -# flags to be left without arguments
 -need_version=unknown
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-ldld  $LIBS"
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
  
 -case $host_os in
 -aix3*)
 -  version_type=linux
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 -  shlibpath_var=LIBPATH
 +/* 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 dld_link ();
 +int
 +main ()
 +{
 +dld_link ();
 +  ;
 +  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_dld_dld_link=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -  # AIX 3 has no versioning support, so we append a major version to the name.
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  ;;
 +ac_cv_lib_dld_dld_link=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_dld_dld_link" >&5
 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
 +if test $ac_cv_lib_dld_dld_link = yes; then
 +  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
 +fi
  
 -aix4* | aix5*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  hardcode_into_libs=yes
 -  if test "$host_cpu" = ia64; then
 -    # AIX 5 supports IA64
 -    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 -    shlibpath_var=LD_LIBRARY_PATH
 -  else
 -    # With GCC up to 2.95.x, collect2 would create an import file
 -    # for dependence libraries.  The import file would start with
 -    # the line `#! .'.  This would cause the generated library to
 -    # depend on `.', always an invalid library.  This was fixed in
 -    # development snapshots of GCC prior to 3.0.
 -    case $host_os in
 -      aix4 | aix4.[01] | aix4.[01].*)
 -      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 -         echo ' yes '
 -         echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 -      :
 -      else
 -      can_build_shared=no
 -      fi
 -      ;;
 -    esac
 -    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 -    # soname into executable. Probably we can add versioning support to
 -    # collect2, so additional links can be useful in future.
 -    if test "$aix_use_runtimelinking" = yes; then
 -      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 -      # instead of lib<name>.a to let people know that these are not
 -      # typical AIX shared libraries.
 -      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -    else
 -      # We preserve .a as extension for shared libraries through AIX4.2
 -      # and later when we are not doing run time linking.
 -      library_names_spec='${libname}${release}.a $libname.a'
 -      soname_spec='${libname}${release}${shared_ext}$major'
 -    fi
 -    shlibpath_var=LIBPATH
 -  fi
 -  ;;
  
 -amigaos*)
 -  library_names_spec='$libname.ixlibrary $libname.a'
 -  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 -  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
 -  ;;
 +fi
  
 -beos*)
 -  library_names_spec='${libname}${shared_ext}'
 -  dynamic_linker="$host_os ld.so"
 -  shlibpath_var=LIBRARY_PATH
 -  ;;
  
- fi
+ bsdi[45]*)
+   version_type=linux
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+   # the default ld.so.conf also contains /usr/contrib/lib and
+   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+   # libtool to hard-code these into programs
+   ;;
  
 -cygwin* | mingw* | pw32*)
 -  version_type=windows
 -  shrext_cmds=".dll"
 -  need_version=no
 -  need_lib_prefix=no
  
- fi
+   case $GCC,$host_os in
+   yes,cygwin* | yes,mingw* | yes,pw32*)
+     library_names_spec='$libname.dll.a'
+     # DLL is installed to $(libdir)/../bin by postinstall_cmds
+     postinstall_cmds='base_file=`basename \${file}`~
+       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+       dldir=$destdir/`dirname \$dlpath`~
+       test -d \$dldir || mkdir -p \$dldir~
+       $install_prog $dir/$dlname \$dldir/$dlname~
+       chmod a+x \$dldir/$dlname'
+     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+       dlpath=$dir/\$dldll~
+        $rm \$dlpath'
+     shlibpath_overrides_runpath=yes
+     case $host_os in
+     cygwin*)
+       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+       ;;
+     mingw*)
+       # MinGW DLLs use traditional 'lib' prefix
+       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+         # It is most probably a Windows format PATH printed by
+         # mingw gcc, but we are running on Cygwin. Gcc prints its search
+         # path with ; separators, and with drive letters. We can handle the
+         # drive letters (cygwin fileutils understands them), so leave them,
+         # especially as we might pass files found there to a mingw objdump,
+         # which wouldn't understand a cygwinified path. Ahh.
+         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+       else
+         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+       fi
+       ;;
+     pw32*)
+       # pw32 DLLs use 'pw' prefix rather than 'lib'
+       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+       ;;
+     esac
+     ;;
  
 -  *)
 -    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
 -    ;;
 -  esac
 -  dynamic_linker='Win32 ld.exe'
 -  # FIXME: first we should search . and the directory the executable is in
 -  shlibpath_var=PATH
 -  ;;
  
- fi
+ darwin* | rhapsody*)
+   dynamic_linker="$host_os dyld"
+   version_type=darwin
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+   soname_spec='${libname}${release}${major}$shared_ext'
+   shlibpath_overrides_runpath=yes
+   shlibpath_var=DYLD_LIBRARY_PATH
+   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+   if test "$GCC" = yes; then
+     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+   else
+     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+   fi
+   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+   ;;
  
 -dgux*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  ;;
  
 -freebsd1*)
 -  dynamic_linker=no
 -  ;;
 +fi
  
 -kfreebsd*-gnu)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=no
 -  hardcode_into_libs=yes
 -  dynamic_linker='GNU ld.so'
 -  ;;
 +    ;;
 +  esac
  
-   if test "x$lt_cv_dlopen" != xno; then
-     enable_dlopen=yes
+ freebsd* | dragonfly*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+   if test -x /usr/bin/objformat; then
+     objformat=`/usr/bin/objformat`
    else
-     enable_dlopen=no
+     case $host_os in
+     freebsd[123]*) objformat=aout ;;
+     *) objformat=elf ;;
+     esac
    fi
+   version_type=freebsd-$objformat
+   case $version_type in
+     freebsd-elf*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+       need_version=no
+       need_lib_prefix=no
+       ;;
+     freebsd-*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+       need_version=yes
+       ;;
+   esac
+   shlibpath_var=LD_LIBRARY_PATH
+   case $host_os in
+   freebsd2*)
+     shlibpath_overrides_runpath=yes
+     ;;
+   freebsd3.[01]* | freebsdelf3.[01]*)
+     shlibpath_overrides_runpath=yes
+     hardcode_into_libs=yes
+     ;;
+   *) # from 3.2 on
+     shlibpath_overrides_runpath=no
+     hardcode_into_libs=yes
+     ;;
+   esac
+   ;;
  
 -gnu*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  hardcode_into_libs=yes
 -  ;;
 +  case $lt_cv_dlopen in
 +  dlopen)
 +    save_CPPFLAGS="$CPPFLAGS"
 +    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  
-     save_LDFLAGS="$LDFLAGS"
-     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+ hpux9* | hpux10* | hpux11*)
+   # Give a soname corresponding to the major version so that dld.sl refuses to
+   # link against other versions.
+   version_type=sunos
+   need_lib_prefix=no
+   need_version=no
+   case $host_cpu in
+   ia64*)
+     shrext_cmds='.so'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.so"
+     shlibpath_var=LD_LIBRARY_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     if test "X$HPUX_IA64_MODE" = X32; then
+       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+     else
+       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+     fi
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+    hppa*64*)
+      shrext_cmds='.sl'
+      hardcode_into_libs=yes
+      dynamic_linker="$host_os dld.sl"
+      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+      soname_spec='${libname}${release}${shared_ext}$major'
+      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+      ;;
+    *)
+     shrext_cmds='.sl'
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=SHLIB_PATH
+     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     ;;
+   esac
+   # HP-UX runs *really* slowly unless shared libraries are mode 555.
+   postinstall_cmds='chmod 555 $lib'
+   ;;
  
 -irix5* | irix6* | nonstopux*)
 -  case $host_os in
 -    nonstopux*) version_type=nonstopux ;;
 -    *)
 -      if test "$lt_cv_prog_gnu_ld" = yes; then
 -              version_type=linux
 -      else
 -              version_type=irix
 -      fi ;;
 -  esac
 -  need_lib_prefix=no
 -  need_version=no
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 -  case $host_os in
 -  irix5* | nonstopux*)
 -    libsuff= shlibsuff=
 -    ;;
 -  *)
 -    case $LD in # libtool.m4 will add one of these switches to LD
 -    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 -      libsuff= shlibsuff= libmagic=32-bit;;
 -    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 -      libsuff=32 shlibsuff=N32 libmagic=N32;;
 -    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 -      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 -    *) libsuff= shlibsuff= libmagic=never-match;;
 -    esac
 -    ;;
 -  esac
 -  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 -  shlibpath_overrides_runpath=no
 -  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 -  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 -  hardcode_into_libs=yes
 -  ;;
 +    save_LIBS="$LIBS"
 +    LIBS="$lt_cv_dlopen_libs $LIBS"
  
 -# No shared lib support for Linux oldld, aout, or coff.
 -linux*oldld* | linux*aout* | linux*coff*)
 -  dynamic_linker=no
 -  ;;
 +    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
 +if test "${lt_cv_dlopen_self+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +        if test "$cross_compiling" = yes; then :
 +  lt_cv_dlopen_self=cross
 +else
 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 +  lt_status=$lt_dlunknown
 +  cat > conftest.$ac_ext <<EOF
 +#line 37526 "configure"
 +#include "confdefs.h"
  
 -# This must be Linux ELF.
 -linux*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=no
 -  # This implies no fast_install, which is unacceptable.
 -  # Some rework will be needed to allow for fast_install
 -  # before this can be enabled.
 -  hardcode_into_libs=yes
 +#if HAVE_DLFCN_H
 +#include <dlfcn.h>
 +#endif
  
- #include <stdio.h>
+   # Append ld.so.conf contents to the search path
+   if test -f /etc/ld.so.conf; then
+     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+   fi
  
 -  # We used to test for /lib/ld.so.1 and disable shared libraries on
 -  # powerpc, because MkLinux only supported shared libraries with the
 -  # GNU dynamic linker.  Since this was broken with cross compilers,
 -  # most powerpc-linux boxes support dynamic linking these days and
 -  # people can always --disable-shared, the test was removed, and we
 -  # assume the GNU/Linux dynamic linker is in use.
 -  dynamic_linker='GNU/Linux ld.so'
 -  ;;
 -
 -knetbsd*-gnu)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=no
 -  hardcode_into_libs=yes
 -  dynamic_linker='GNU ld.so'
 -  ;;
 +#ifdef RTLD_GLOBAL
 +#  define LT_DLGLOBAL         RTLD_GLOBAL
 +#else
 +#  ifdef DL_GLOBAL
 +#    define LT_DLGLOBAL               DL_GLOBAL
 +#  else
 +#    define LT_DLGLOBAL               0
 +#  endif
 +#endif
  
 -netbsd*)
 -  version_type=sunos
 -  need_lib_prefix=no
 -  need_version=no
 -  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 -    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 -    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 -    dynamic_linker='NetBSD (a.out) ld.so'
 -  else
 -    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 -    soname_spec='${libname}${release}${shared_ext}$major'
 -    dynamic_linker='NetBSD ld.elf_so'
 -  fi
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  hardcode_into_libs=yes
 -  ;;
 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 +   find out it does not work in some platform. */
 +#ifndef LT_DLLAZY_OR_NOW
 +#  ifdef RTLD_LAZY
 +#    define LT_DLLAZY_OR_NOW          RTLD_LAZY
 +#  else
 +#    ifdef DL_LAZY
 +#      define LT_DLLAZY_OR_NOW                DL_LAZY
 +#    else
 +#      ifdef RTLD_NOW
 +#        define LT_DLLAZY_OR_NOW      RTLD_NOW
 +#      else
 +#        ifdef DL_NOW
 +#          define LT_DLLAZY_OR_NOW    DL_NOW
 +#        else
 +#          define LT_DLLAZY_OR_NOW    0
 +#        endif
 +#      endif
 +#    endif
 +#  endif
 +#endif
  
 -newsos6)
 -  version_type=linux
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  ;;
 +#ifdef __cplusplus
 +extern "C" void exit (int);
 +#endif
  
 -nto-qnx*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  ;;
 +void fnord() { int i=42;}
 +int main ()
 +{
 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 +  int status = $lt_dlunknown;
 +
 +  if (self)
 +    {
 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 +      /* dlclose (self); */
 +    }
  
-     exit (status);
- }
- EOF
-   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); } && test -s conftest${ac_exeext} 2>/dev/null; then
-     (./conftest; exit; ) >&5 2>/dev/null
-     lt_status=$?
-     case x$lt_status in
-       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
-     esac
-   else :
-     # compilation failed
-     lt_cv_dlopen_self=no
+ openbsd*)
+   version_type=sunos
+   need_lib_prefix=no
+   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+   case $host_os in
+     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+     *)                         need_version=no  ;;
+   esac
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+     case $host_os in
+       openbsd2.[89] | openbsd2.[89].*)
+       shlibpath_overrides_runpath=no
+       ;;
+       *)
+       shlibpath_overrides_runpath=yes
+       ;;
+       esac
+   else
+     shlibpath_overrides_runpath=yes
    fi
 -  ;;
 +fi
 +rm -fr conftest*
  
 -os2*)
 -  libname_spec='$name'
 -  shrext_cmds=".dll"
 -  need_lib_prefix=no
 -  library_names_spec='$libname${shared_ext} $libname.a'
 -  dynamic_linker='OS/2 ld.exe'
 -  shlibpath_var=LIBPATH
 -  ;;
  
 -osf3* | osf4* | osf5*)
 -  version_type=osf
 -  need_lib_prefix=no
 -  need_version=no
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 -  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 -  ;;
 +fi
 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6
  
 -sco3.2v5*)
 -  version_type=osf
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  ;;
 +    if test "x$lt_cv_dlopen_self" = xyes; then
 +      LDFLAGS="$LDFLAGS $link_static_flag"
 +      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
 +if test "${lt_cv_dlopen_self_static+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +        if test "$cross_compiling" = yes; then :
 +  lt_cv_dlopen_self_static=cross
 +else
 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 +  lt_status=$lt_dlunknown
 +  cat > conftest.$ac_ext <<EOF
 +#line 37624 "configure"
 +#include "confdefs.h"
  
 -solaris*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  hardcode_into_libs=yes
 -  # ldd complains unless libraries are executable
 -  postinstall_cmds='chmod +x $lib'
 -  ;;
 +#if HAVE_DLFCN_H
 +#include <dlfcn.h>
 +#endif
  
 -sunos4*)
 -  version_type=sunos
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 -  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  if test "$with_gnu_ld" = yes; then
 -    need_lib_prefix=no
 -  fi
 -  need_version=yes
 -  ;;
 +#include <stdio.h>
  
 -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 -  version_type=linux
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  case $host_vendor in
 -    sni)
 -      shlibpath_overrides_runpath=no
 -      need_lib_prefix=no
 -      export_dynamic_flag_spec='${wl}-Blargedynsym'
 -      runpath_var=LD_RUN_PATH
 -      ;;
 -    siemens)
 -      need_lib_prefix=no
 -      ;;
 -    motorola)
 -      need_lib_prefix=no
 -      need_version=no
 -      shlibpath_overrides_runpath=no
 -      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 -      ;;
 -  esac
 -  ;;
 +#ifdef RTLD_GLOBAL
 +#  define LT_DLGLOBAL         RTLD_GLOBAL
 +#else
 +#  ifdef DL_GLOBAL
 +#    define LT_DLGLOBAL               DL_GLOBAL
 +#  else
 +#    define LT_DLGLOBAL               0
 +#  endif
 +#endif
  
 -sysv4*MP*)
 -  if test -d /usr/nec ;then
 -    version_type=linux
 -    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 -    soname_spec='$libname${shared_ext}.$major'
 -    shlibpath_var=LD_LIBRARY_PATH
 -  fi
 -  ;;
 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 +   find out it does not work in some platform. */
 +#ifndef LT_DLLAZY_OR_NOW
 +#  ifdef RTLD_LAZY
 +#    define LT_DLLAZY_OR_NOW          RTLD_LAZY
 +#  else
 +#    ifdef DL_LAZY
 +#      define LT_DLLAZY_OR_NOW                DL_LAZY
 +#    else
 +#      ifdef RTLD_NOW
 +#        define LT_DLLAZY_OR_NOW      RTLD_NOW
 +#      else
 +#        ifdef DL_NOW
 +#          define LT_DLLAZY_OR_NOW    DL_NOW
 +#        else
 +#          define LT_DLLAZY_OR_NOW    0
 +#        endif
 +#      endif
 +#    endif
 +#  endif
 +#endif
  
 -uts4*)
 -  version_type=linux
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  ;;
 +#ifdef __cplusplus
 +extern "C" void exit (int);
 +#endif
  
- void fnord() { int i=42;}
- int main ()
- {
-   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-   int status = $lt_dlunknown;
+ *)
+   dynamic_linker=no
+   ;;
+ esac
+ { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+ echo "${ECHO_T}$dynamic_linker" >&6; }
+ test "$dynamic_linker" = no && can_build_shared=no
  
-   if (self)
-     {
-       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-       /* dlclose (self); */
-     }
+ { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+ echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+ hardcode_action_F77=
+ if test -n "$hardcode_libdir_flag_spec_F77" || \
+    test -n "$runpath_var_F77" || \
+    test "X$hardcode_automatic_F77" = "Xyes" ; then
  
 -  # We can hardcode non-existant directories.
 -  if test "$hardcode_direct_F77" != no &&
 -     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 -     # have to relink, otherwise we might link with an installed library
 -     # when we should be linking with a yet-to-be-installed one
 -     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
 -     test "$hardcode_minus_L_F77" != no; then
 -    # Linking always hardcodes the temporary library directory.
 -    hardcode_action_F77=relink
 -  else
 -    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 -    hardcode_action_F77=immediate
 +    exit (status);
 +}
 +EOF
 +  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); } && test -s conftest${ac_exeext} 2>/dev/null; then
 +    (./conftest; exit; ) >&5 2>/dev/null
 +    lt_status=$?
 +    case x$lt_status in
 +      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
 +      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
 +      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
 +    esac
 +  else :
 +    # compilation failed
 +    lt_cv_dlopen_self_static=no
    fi
 -else
 -  # We cannot hardcode anything, or else we can only hardcode existing
 -  # directories.
 -  hardcode_action_F77=unsupported
  fi
- rm -fr conftest*
+ { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+ echo "${ECHO_T}$hardcode_action_F77" >&6; }
  
 -if test "$hardcode_action_F77" = relink; then
 -  # Fast installation is not supported
 -  enable_fast_install=no
 -elif test "$shlibpath_overrides_runpath" = yes ||
 -     test "$enable_shared" = no; then
 -  # Fast installation is not necessary
 -  enable_fast_install=needless
  fi
 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
 +    fi
  
-     CPPFLAGS="$save_CPPFLAGS"
-     LDFLAGS="$save_LDFLAGS"
-     LIBS="$save_LIBS"
+ striplib=
+ old_striplib=
+ { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+ echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
+ if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+   { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+ else
+ # FIXME - insert some real tests, host_os isn't really good enough
+   case $host_os in
+    darwin*)
+        if test -n "$STRIP" ; then
+          striplib="$STRIP -x"
+          { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+        else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+        ;;
+    *)
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
      ;;
    esac
 -fi
  
 +  case $lt_cv_dlopen_self in
 +  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 +  *) enable_dlopen_self=unknown ;;
 +  esac
 +
 +  case $lt_cv_dlopen_self_static in
 +  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 +  *) enable_dlopen_self_static=unknown ;;
 +  esac
 +fi
  
  
  # The else clause should only fire when bootstrapping the
@@@ -37747,51 -44258,51 +45958,51 @@@ if test -f "$ltmain"; the
      lt_cv_sys_global_symbol_to_c_name_address \
      sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
      old_postinstall_cmds old_postuninstall_cmds \
 -    compiler_F77 \
 -    CC_F77 \
 -    LD_F77 \
 -    lt_prog_compiler_wl_F77 \
 -    lt_prog_compiler_pic_F77 \
 -    lt_prog_compiler_static_F77 \
 -    lt_prog_compiler_no_builtin_flag_F77 \
 -    export_dynamic_flag_spec_F77 \
 -    thread_safe_flag_spec_F77 \
 -    whole_archive_flag_spec_F77 \
 -    enable_shared_with_static_runtimes_F77 \
 -    old_archive_cmds_F77 \
 -    old_archive_from_new_cmds_F77 \
 -    predep_objects_F77 \
 -    postdep_objects_F77 \
 -    predeps_F77 \
 -    postdeps_F77 \
 -    compiler_lib_search_path_F77 \
 -    archive_cmds_F77 \
 -    archive_expsym_cmds_F77 \
 -    postinstall_cmds_F77 \
 -    postuninstall_cmds_F77 \
 -    old_archive_from_expsyms_cmds_F77 \
 -    allow_undefined_flag_F77 \
 -    no_undefined_flag_F77 \
 -    export_symbols_cmds_F77 \
 -    hardcode_libdir_flag_spec_F77 \
 -    hardcode_libdir_flag_spec_ld_F77 \
 -    hardcode_libdir_separator_F77 \
 -    hardcode_automatic_F77 \
 -    module_cmds_F77 \
 -    module_expsym_cmds_F77 \
 -    lt_cv_prog_compiler_c_o_F77 \
 -    exclude_expsyms_F77 \
 -    include_expsyms_F77; do
 +    compiler_GCJ \
 +    CC_GCJ \
 +    LD_GCJ \
 +    lt_prog_compiler_wl_GCJ \
 +    lt_prog_compiler_pic_GCJ \
 +    lt_prog_compiler_static_GCJ \
 +    lt_prog_compiler_no_builtin_flag_GCJ \
 +    export_dynamic_flag_spec_GCJ \
 +    thread_safe_flag_spec_GCJ \
 +    whole_archive_flag_spec_GCJ \
 +    enable_shared_with_static_runtimes_GCJ \
 +    old_archive_cmds_GCJ \
 +    old_archive_from_new_cmds_GCJ \
 +    predep_objects_GCJ \
 +    postdep_objects_GCJ \
 +    predeps_GCJ \
 +    postdeps_GCJ \
 +    compiler_lib_search_path_GCJ \
 +    archive_cmds_GCJ \
 +    archive_expsym_cmds_GCJ \
 +    postinstall_cmds_GCJ \
 +    postuninstall_cmds_GCJ \
 +    old_archive_from_expsyms_cmds_GCJ \
 +    allow_undefined_flag_GCJ \
 +    no_undefined_flag_GCJ \
 +    export_symbols_cmds_GCJ \
 +    hardcode_libdir_flag_spec_GCJ \
 +    hardcode_libdir_flag_spec_ld_GCJ \
 +    hardcode_libdir_separator_GCJ \
 +    hardcode_automatic_GCJ \
 +    module_cmds_GCJ \
 +    module_expsym_cmds_GCJ \
 +    lt_cv_prog_compiler_c_o_GCJ \
 +    exclude_expsyms_GCJ \
 +    include_expsyms_GCJ; do
  
      case $var in
 -    old_archive_cmds_F77 | \
 -    old_archive_from_new_cmds_F77 | \
 -    archive_cmds_F77 | \
 -    archive_expsym_cmds_F77 | \
 -    module_cmds_F77 | \
 -    module_expsym_cmds_F77 | \
 -    old_archive_from_expsyms_cmds_F77 | \
 -    export_symbols_cmds_F77 | \
 +    old_archive_cmds_GCJ | \
 +    old_archive_from_new_cmds_GCJ | \
 +    archive_cmds_GCJ | \
 +    archive_expsym_cmds_GCJ | \
 +    module_cmds_GCJ | \
 +    module_expsym_cmds_GCJ | \
 +    old_archive_from_expsyms_cmds_GCJ | \
 +    export_symbols_cmds_GCJ | \
      extract_expsyms_cmds | reload_cmds | finish_cmds | \
      postinstall_cmds | postuninstall_cmds | \
      old_postinstall_cmds | old_postuninstall_cmds | \
@@@ -37828,10 -44339,10 +46039,10 @@@ build_libtool_libs=$enable_share
  build_old_libs=$enable_static
  
  # Whether or not to add -lc for building shared libraries.
 -build_libtool_need_lc=$archive_cmds_need_lc_F77
 +build_libtool_need_lc=$archive_cmds_need_lc_GCJ
  
  # Whether or not to disallow shared libs when runtime libs are static
 -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
 +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
  
  # Whether or not to optimize for fast installation.
  fast_install=$enable_fast_install
@@@ -37857,16 -44368,16 +46068,16 @@@ AR_FLAGS=$lt_AR_FLAG
  LTCC=$lt_LTCC
  
  # A language-specific compiler.
 -CC=$lt_compiler_F77
 +CC=$lt_compiler_GCJ
  
  # Is the compiler the GNU C compiler?
 -with_gcc=$GCC_F77
 +with_gcc=$GCC_GCJ
  
  # An ERE matcher.
  EGREP=$lt_EGREP
  
  # The linker used to build libraries.
 -LD=$lt_LD_F77
 +LD=$lt_LD_GCJ
  
  # Whether we need hard or soft links.
  LN_S=$lt_LN_S
@@@ -37897,7 -44408,7 +46108,7 @@@ reload_flag=$lt_reload_fla
  reload_cmds=$lt_reload_cmds
  
  # How to pass a linker flag through the compiler.
 -wl=$lt_lt_prog_compiler_wl_F77
 +wl=$lt_lt_prog_compiler_wl_GCJ
  
  # Object file suffix (normally "o").
  objext="$ac_objext"
@@@ -37912,14 -44423,14 +46123,14 @@@ shrext_cmds='$shrext_cmds
  exeext="$exeext"
  
  # Additional compiler flags for building library objects.
 -pic_flag=$lt_lt_prog_compiler_pic_F77
 +pic_flag=$lt_lt_prog_compiler_pic_GCJ
  pic_mode=$pic_mode
  
  # What is the maximum length of a command?
  max_cmd_len=$lt_cv_sys_max_cmd_len
  
  # Does compiler simultaneously support -c and -o options?
 -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
 +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
  
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
@@@ -37940,19 -44451,19 +46151,19 @@@ dlopen_self=$enable_dlopen_sel
  dlopen_self_static=$enable_dlopen_self_static
  
  # Compiler flag to prevent dynamic linking.
 -link_static_flag=$lt_lt_prog_compiler_static_F77
 +link_static_flag=$lt_lt_prog_compiler_static_GCJ
  
  # Compiler flag to turn off builtin functions.
 -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
 +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
  
  # Compiler flag to allow reflexive dlopens.
 -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
 +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
  
  # Compiler flag to generate shared objects directly from archives.
 -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
 +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
  
  # Compiler flag to generate thread-safe objects.
 -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
 +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
  
  # Library versioning type.
  version_type=$version_type
@@@ -37969,25 -44480,25 +46180,25 @@@ soname_spec=$lt_soname_spe
  
  # Commands used to build and install an old-style archive.
  RANLIB=$lt_RANLIB
 -old_archive_cmds=$lt_old_archive_cmds_F77
 +old_archive_cmds=$lt_old_archive_cmds_GCJ
  old_postinstall_cmds=$lt_old_postinstall_cmds
  old_postuninstall_cmds=$lt_old_postuninstall_cmds
  
  # Create an old-style archive from a shared archive.
 -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
  
  # Create a temporary old-style archive to link instead of a shared archive.
 -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
 +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
  
  # Commands used to build and install a shared archive.
 -archive_cmds=$lt_archive_cmds_F77
 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77
 +archive_cmds=$lt_archive_cmds_GCJ
 +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
  postinstall_cmds=$lt_postinstall_cmds
  postuninstall_cmds=$lt_postuninstall_cmds
  
  # Commands used to build a loadable module (assumed same as above if empty)
 -module_cmds=$lt_module_cmds_F77
 -module_expsym_cmds=$lt_module_expsym_cmds_F77
 +module_cmds=$lt_module_cmds_GCJ
 +module_expsym_cmds=$lt_module_expsym_cmds_GCJ
  
  # Commands to strip libraries.
  old_striplib=$lt_old_striplib
@@@ -37995,23 -44506,23 +46206,23 @@@ striplib=$lt_stripli
  
  # Dependencies to place before the objects being linked to create a
  # shared library.
 -predep_objects=$lt_predep_objects_F77
 +predep_objects=$lt_predep_objects_GCJ
  
  # Dependencies to place after the objects being linked to create a
  # shared library.
 -postdep_objects=$lt_postdep_objects_F77
 +postdep_objects=$lt_postdep_objects_GCJ
  
  # Dependencies to place before the objects being linked to create a
  # shared library.
 -predeps=$lt_predeps_F77
 +predeps=$lt_predeps_GCJ
  
  # Dependencies to place after the objects being linked to create a
  # shared library.
 -postdeps=$lt_postdeps_F77
 +postdeps=$lt_postdeps_GCJ
  
  # The library search path used internally by the compiler when linking
  # a shared library.
 -compiler_lib_search_path=$lt_compiler_lib_search_path_F77
 +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
  
  # Method to check whether dependent libraries are shared objects.
  deplibs_check_method=$lt_deplibs_check_method
  file_magic_cmd=$lt_file_magic_cmd
  
  # Flag that allows shared libraries with undefined symbols to be built.
 -allow_undefined_flag=$lt_allow_undefined_flag_F77
 +allow_undefined_flag=$lt_allow_undefined_flag_GCJ
  
  # Flag that forces no undefined symbols.
 -no_undefined_flag=$lt_no_undefined_flag_F77
 +no_undefined_flag=$lt_no_undefined_flag_GCJ
  
  # Commands used to finish a libtool library installation in a directory.
  finish_cmds=$lt_finish_cmds
@@@ -38050,45 -44561,45 +46261,45 @@@ shlibpath_var=$shlibpath_va
  shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  
  # How to hardcode a shared library path into an executable.
 -hardcode_action=$hardcode_action_F77
 +hardcode_action=$hardcode_action_GCJ
  
  # Whether we should hardcode library paths into libraries.
  hardcode_into_libs=$hardcode_into_libs
  
  # Flag to hardcode \$libdir into a binary during linking.
  # This must work even if \$libdir does not exist.
 -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
 +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
  
  # If ld is used when linking, flag to hardcode \$libdir into
  # a binary during linking. This must work even if \$libdir does
  # not exist.
- hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+ hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
  
  # Whether we need a single -rpath flag with a separated argument.
- hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+ hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
  
  # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  # resulting binary.
- hardcode_direct=$hardcode_direct_GCJ
+ hardcode_direct=$hardcode_direct_F77
  
  # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  # resulting binary.
- hardcode_minus_L=$hardcode_minus_L_GCJ
+ hardcode_minus_L=$hardcode_minus_L_F77
  
  # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  # the resulting binary.
- hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+ hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
  
  # Set to yes if building a shared library automatically hardcodes DIR into the library
  # and all subsequent libraries and executables linked against it.
- hardcode_automatic=$hardcode_automatic_GCJ
+ hardcode_automatic=$hardcode_automatic_F77
  
  # Variables whose values should be saved in libtool wrapper scripts and
  # restored at relink time.
  variables_saved_for_relink="$variables_saved_for_relink"
  
  # Whether libtool must link a program against all its dependency libraries.
- link_all_deplibs=$link_all_deplibs_GCJ
+ link_all_deplibs=$link_all_deplibs_F77
  
  # Compile-time system search path for libraries
  sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  # Run-time system search path for libraries
  sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  
 -    mingw* | pw32* | os2*)
 -      # This hack is so that the source file can tell whether it is being
 -      # built for inclusion in a dll (and should export symbols for example).
 -      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
 -      ;;
+ # Fix the shell variable \$srcfile for the compiler.
+ fix_srcfile_path="$fix_srcfile_path_F77"
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols_F77
+ # The commands to list exported symbols.
+ export_symbols_cmds=$lt_export_symbols_cmds_F77
+ # The commands to extract the exported symbol list from a shared archive.
+ extract_expsyms_cmds=$lt_extract_expsyms_cmds
+ # Symbols that should not be listed in the preloaded symbols.
+ exclude_expsyms=$lt_exclude_expsyms_F77
+ # Symbols that must always be exported.
+ include_expsyms=$lt_include_expsyms_F77
+ # ### END LIBTOOL TAG CONFIG: $tagname
+ __EOF__
+ else
+   # If there is no Makefile yet, we rely on a make rule to execute
+   # `config.status --recheck' to rerun these tests and create the
+   # libtool script then.
+   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+   if test -f "$ltmain_in"; then
+     test -f Makefile && make "$ltmain"
+   fi
+ 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
+ CC="$lt_save_CC"
+       else
+         tagname=""
+       fi
+       ;;
+       GCJ)
+       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+ # Source file extension for Java test sources.
+ ac_ext=java
+ # Object file extension for compiled Java test sources.
+ objext=o
+ objext_GCJ=$objext
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="class foo {}\n"
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ # If no C compiler was specified, use CC.
+ LTCC=${LTCC-"$CC"}
+ # Allow CC to be a program name with arguments.
+ compiler=$CC
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+ printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+ _lt_compiler_boilerplate=`cat conftest.err`
+ $rm conftest*
+ ac_outfile=conftest.$ac_objext
+ printf "$lt_simple_link_test_code" >conftest.$ac_ext
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+ _lt_linker_boilerplate=`cat conftest.err`
+ $rm conftest*
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ CC=${GCJ-"gcj"}
+ compiler=$CC
+ compiler_GCJ=$CC
+ for cc_temp in $compiler""; do
+   case $cc_temp in
+     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+     \-*) ;;
+     *) break;;
+   esac
+ done
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ # GCJ did not exist at the time GCC didn't implicitly link libc in.
+ archive_cmds_need_lc_GCJ=no
+ old_archive_cmds_GCJ=$old_archive_cmds
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ lt_prog_compiler_no_builtin_flag_GCJ=
+ if test "$GCC" = yes; then
+   lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+ { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+ echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="-fno-rtti -fno-exceptions"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    # The option is referenced via a variable to avoid confusing sed.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:44747: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+    echo "$as_me:44751: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
+      $SED '/^$/d' conftest.err >conftest.er2
+      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
+        lt_cv_prog_compiler_rtti_exceptions=yes
+      fi
+    fi
+    $rm conftest*
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+ echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+ if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+     lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+ else
+     :
+ fi
+ fi
+ lt_prog_compiler_wl_GCJ=
+ lt_prog_compiler_pic_GCJ=
+ lt_prog_compiler_static_GCJ=
+ { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+   if test "$GCC" = yes; then
+     lt_prog_compiler_wl_GCJ='-Wl,'
+     lt_prog_compiler_static_GCJ='-static'
+     case $host_os in
+       aix*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_GCJ='-Bstatic'
+       fi
+       ;;
+     amigaos*)
+       # FIXME: we need at least 68020 code to build shared libraries, but
+       # adding the `-m68020' flag to GCC prevents building anything better,
+       # like `-m68040'.
+       lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+       ;;
+     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+     mingw* | pw32* | os2*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+       ;;
+     darwin* | rhapsody*)
+       # PIC is the default on this platform
+       # Common symbols not allowed in MH_DYLIB files
+       lt_prog_compiler_pic_GCJ='-fno-common'
+       ;;
+     msdosdjgpp*)
+       # Just because we use GCC doesn't mean we suddenly get shared libraries
+       # on systems that don't support them.
+       lt_prog_compiler_can_build_shared_GCJ=no
+       enable_shared=no
+       ;;
+     sysv4*MP*)
+       if test -d /usr/nec; then
+       lt_prog_compiler_pic_GCJ=-Kconform_pic
+       fi
+       ;;
+     hpux*)
+       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+       # not for PA HP-UX.
+       case $host_cpu in
+       hppa*64*|ia64*)
+       # +Z the default
+       ;;
+       *)
+       lt_prog_compiler_pic_GCJ='-fPIC'
+       ;;
+       esac
+       ;;
+     *)
+       lt_prog_compiler_pic_GCJ='-fPIC'
+       ;;
+     esac
+   else
+     # PORTME Check for flag to pass linker flags through the system compiler.
+     case $host_os in
+     aix*)
+       lt_prog_compiler_wl_GCJ='-Wl,'
+       if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_GCJ='-Bstatic'
+       else
+       lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+        case $cc_basename in
+          xlc*)
+          lt_prog_compiler_pic_GCJ='-qnocommon'
+          lt_prog_compiler_wl_GCJ='-Wl,'
+          ;;
+        esac
+        ;;
 -    irix5* | irix6* | nonstopux*)
 -      lt_prog_compiler_wl_GCJ='-Wl,'
 -      # PIC (with -KPIC) is the default.
 -      lt_prog_compiler_static_GCJ='-non_shared'
 -      ;;
++# Whether we need a single -rpath flag with a separated argument.
++hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+     hpux9* | hpux10* | hpux11*)
+       lt_prog_compiler_wl_GCJ='-Wl,'
+       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+       # not for PA HP-UX.
+       case $host_cpu in
+       hppa*64*|ia64*)
+       # +Z the default
+       ;;
+       *)
+       lt_prog_compiler_pic_GCJ='+Z'
+       ;;
+       esac
+       # Is there a better lt_prog_compiler_static that works with the bundled CC?
+       lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+       ;;
 -    newsos6)
 -      lt_prog_compiler_pic_GCJ='-KPIC'
 -      lt_prog_compiler_static_GCJ='-Bstatic'
 -      ;;
++# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
++# resulting binary.
++hardcode_minus_L=$hardcode_minus_L_GCJ
 -    osf3* | osf4* | osf5*)
 -      lt_prog_compiler_wl_GCJ='-Wl,'
 -      # All OSF/1 code is PIC.
 -      lt_prog_compiler_static_GCJ='-non_shared'
 -      ;;
++# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
++# the resulting binary.
++hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+     linux*)
+       case $cc_basename in
+       icc* | ecc*)
+       lt_prog_compiler_wl_GCJ='-Wl,'
+       lt_prog_compiler_pic_GCJ='-KPIC'
+       lt_prog_compiler_static_GCJ='-static'
+         ;;
+       pgcc* | pgf77* | pgf90* | pgf95*)
+         # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       lt_prog_compiler_wl_GCJ='-Wl,'
+       lt_prog_compiler_pic_GCJ='-fpic'
+       lt_prog_compiler_static_GCJ='-Bstatic'
+         ;;
+       ccc*)
+         lt_prog_compiler_wl_GCJ='-Wl,'
+         # All Alpha code is PIC.
+         lt_prog_compiler_static_GCJ='-non_shared'
+         ;;
+       esac
+       ;;
 -    sco3.2v5*)
 -      lt_prog_compiler_pic_GCJ='-Kpic'
 -      lt_prog_compiler_static_GCJ='-dn'
 -      ;;
++# Variables whose values should be saved in libtool wrapper scripts and
++# restored at relink time.
++variables_saved_for_relink="$variables_saved_for_relink"
 -    sunos4*)
 -      lt_prog_compiler_wl_GCJ='-Qoption ld '
 -      lt_prog_compiler_pic_GCJ='-PIC'
 -      lt_prog_compiler_static_GCJ='-Bstatic'
 -      ;;
++# Whether libtool must link a program against all its dependency libraries.
++link_all_deplibs=$link_all_deplibs_GCJ
+     solaris*)
+       lt_prog_compiler_pic_GCJ='-KPIC'
+       lt_prog_compiler_static_GCJ='-Bstatic'
+       case $cc_basename in
+       f77* | f90* | f95*)
+       lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+       *)
+       lt_prog_compiler_wl_GCJ='-Wl,';;
+       esac
+       ;;
 -    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 -      lt_prog_compiler_wl_GCJ='-Wl,'
 -      lt_prog_compiler_pic_GCJ='-KPIC'
 -      lt_prog_compiler_static_GCJ='-Bstatic'
 -      ;;
++# Run-time system search path for libraries
++sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 +# Fix the shell variable \$srcfile for the compiler.
 +fix_srcfile_path="$fix_srcfile_path_GCJ"
  
 -    sysv4*MP*)
 -      if test -d /usr/nec ;then
 -      lt_prog_compiler_pic_GCJ='-Kconform_pic'
 -      lt_prog_compiler_static_GCJ='-Bstatic'
 -      fi
 -      ;;
 +# Set to yes if exported symbols are required.
 +always_export_symbols=$always_export_symbols_GCJ
  
- # The commands to list exported symbols.
- export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+     unicos*)
+       lt_prog_compiler_wl_GCJ='-Wl,'
+       lt_prog_compiler_can_build_shared_GCJ=no
+       ;;
  
- # The commands to extract the exported symbol list from a shared archive.
- extract_expsyms_cmds=$lt_extract_expsyms_cmds
+     uts4*)
+       lt_prog_compiler_pic_GCJ='-pic'
+       lt_prog_compiler_static_GCJ='-Bstatic'
+       ;;
  
 -    *)
 -      lt_prog_compiler_can_build_shared_GCJ=no
 -      ;;
 -    esac
 -  fi
 +# Symbols that should not be listed in the preloaded symbols.
 +exclude_expsyms=$lt_exclude_expsyms_GCJ
  
- # Symbols that must always be exported.
- include_expsyms=$lt_include_expsyms_GCJ
+ { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+ echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
  
 -#
 -# Check to make sure the PIC flag actually works.
 -#
 -if test -n "$lt_prog_compiler_pic_GCJ"; then
 +# ### END LIBTOOL TAG CONFIG: $tagname
  
- __EOF__
+ { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+ echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
+ if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_prog_compiler_pic_works_GCJ=no
+   ac_outfile=conftest.$ac_objext
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    # The option is referenced via a variable to avoid confusing sed.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:45009: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+    echo "$as_me:45013: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
+      $SED '/^$/d' conftest.err >conftest.er2
+      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
+        lt_prog_compiler_pic_works_GCJ=yes
+      fi
+    fi
+    $rm conftest*
  
+ fi
+ { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+ echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; }
  
 -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
 -    case $lt_prog_compiler_pic_GCJ in
 -     "" | " "*) ;;
 -     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
 -     esac
  else
 -    lt_prog_compiler_pic_GCJ=
 -     lt_prog_compiler_can_build_shared_GCJ=no
 +  # If there is no Makefile yet, we rely on a make rule to execute
 +  # `config.status --recheck' to rerun these tests and create the
 +  # libtool script then.
 +  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 +  if test -f "$ltmain_in"; then
 +    test -f Makefile && make "$ltmain"
 +  fi
  fi
  
+ fi
+ case $host_os in
+   # For platforms which do not support PIC, -DPIC is meaningless:
+   *djgpp*)
+     lt_prog_compiler_pic_GCJ=
+     ;;
+   *)
+     lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+     ;;
+ esac
  
- 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
- CC="$lt_save_CC"
-       else
-         tagname=""
-       fi
-       ;;
-       RC)
- # Source file extension for RC test sources.
- ac_ext=rc
+ { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+ echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+ if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   lt_cv_prog_compiler_c_o_GCJ=no
+    $rm -r conftest 2>/dev/null
+    mkdir conftest
+    cd conftest
+    mkdir out
+    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  
- # Object file extension for compiled RC test sources.
- objext=o
- objext_RC=$objext
+    lt_compiler_flag="-o out/conftest2.$ac_objext"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+    # Note that $ac_compile itself does not contain backslashes and begins
+    # with a dollar sign (not a hyphen), so the echo should work correctly.
+    lt_compile=`echo "$ac_compile" | $SED \
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+    (eval echo "\"\$as_me:45071: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+    echo "$as_me:45075: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
+      $SED '/^$/d' out/conftest.err >out/conftest.er2
+      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+        lt_cv_prog_compiler_c_o_GCJ=yes
+      fi
+    fi
+    chmod u+w . 2>&5
+    $rm conftest*
+    # SGI C++ compiler will create directory out/ii_files/ for
+    # template instantiation
+    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+    $rm out/* && rmdir out
+    cd ..
+    rmdir conftest
+    $rm conftest*
  
- # Code to be used in simple compile tests
- lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+ echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
  
 +# Code to be used in simple link tests
 +lt_simple_link_test_code="$lt_simple_compile_test_code"
  
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ hard_links="nottested"
+ if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+   # do not overwrite the value of need_locks provided by the user
+   { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+ echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+   hard_links=yes
+   $rm conftest*
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   touch conftest.a
+   ln conftest.a conftest.b 2>&5 || hard_links=no
+   ln conftest.a conftest.b 2>/dev/null && hard_links=no
+   { echo "$as_me:$LINENO: result: $hard_links" >&5
+ echo "${ECHO_T}$hard_links" >&6; }
+   if test "$hard_links" = no; then
  
- # If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
+     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
  
- # Allow CC to be a program name with arguments.
- compiler=$CC
  
+     cat <<AAW_EOF >>config.warnings
+ \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
+ AAW_EOF
  
- # save warnings/boilerplate of simple test code
- ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" >conftest.$ac_ext
- eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
- _lt_compiler_boilerplate=`cat conftest.err`
- $rm conftest*
  
- ac_outfile=conftest.$ac_objext
- printf "$lt_simple_link_test_code" >conftest.$ac_ext
- eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
- _lt_linker_boilerplate=`cat conftest.err`
- $rm conftest*
+     need_locks=warn
+   fi
+ else
+   need_locks=no
+ fi
  
+ { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
  
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- CC=${RC-"windres"}
- compiler=$CC
- compiler_RC=$CC
- for cc_temp in $compiler""; do
+   runpath_var=
+   allow_undefined_flag_GCJ=
+   enable_shared_with_static_runtimes_GCJ=no
+   archive_cmds_GCJ=
+   archive_expsym_cmds_GCJ=
+   old_archive_From_new_cmds_GCJ=
+   old_archive_from_expsyms_cmds_GCJ=
+   export_dynamic_flag_spec_GCJ=
+   whole_archive_flag_spec_GCJ=
+   thread_safe_flag_spec_GCJ=
+   hardcode_libdir_flag_spec_GCJ=
+   hardcode_libdir_flag_spec_ld_GCJ=
+   hardcode_libdir_separator_GCJ=
+   hardcode_direct_GCJ=no
+   hardcode_minus_L_GCJ=no
+   hardcode_shlibpath_var_GCJ=unsupported
+   link_all_deplibs_GCJ=unknown
+   hardcode_automatic_GCJ=no
+   module_cmds_GCJ=
+   module_expsym_cmds_GCJ=
+   always_export_symbols_GCJ=no
+   export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   # include_expsyms should be a list of space-separated symbols to be *always*
+   # included in the symbol list
+   include_expsyms_GCJ=
+   # exclude_expsyms can be an extended regexp of symbols to exclude
+   # it will be wrapped by ` (' and `)$', so one must not match beginning or
+   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+   # as well as any symbol that contains `d'.
+   exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+   # platforms (ab)use it in PIC code, but their linkers get confused if
+   # the symbol is explicitly referenced.  Since portable code cannot
+   # rely on this symbol name, it's probably fine to never include it in
+   # preloaded symbol tables.
+   extract_expsyms_cmds=
+   # Just being paranoid about ensuring that cc_basename is set.
+   for cc_temp in $compiler""; do
    case $cc_temp in
      compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
      distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
  done
  cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  
 -  case $host_os in
 -  cygwin* | mingw* | pw32*)
 -    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 -    # When not using gcc, we currently assume that we are using
 -    # Microsoft Visual C++.
 -    if test "$GCC" != yes; then
 -      with_gnu_ld=no
 -    fi
 -    ;;
 -  openbsd*)
 -    with_gnu_ld=no
 +lt_cv_prog_compiler_c_o_RC=yes
 +
 +# The else clause should only fire when bootstrapping the
 +# libtool distribution, otherwise you forgot to ship ltmain.sh
 +# with your package, and you will get complaints that there are
 +# no rules to generate ltmain.sh.
 +if test -f "$ltmain"; then
 +  # See if we are running on zsh, and set the options which allow our commands through
 +  # without removal of \ escapes.
 +  if test -n "${ZSH_VERSION+set}" ; then
 +    setopt NO_GLOB_SUBST
 +  fi
 +  # Now quote all the things that may contain metacharacters while being
 +  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 +  # variables and quote the copies for generation of the libtool script.
 +  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
 +    SED SHELL STRIP \
 +    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 +    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 +    deplibs_check_method reload_flag reload_cmds need_locks \
 +    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 +    lt_cv_sys_global_symbol_to_c_name_address \
 +    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 +    old_postinstall_cmds old_postuninstall_cmds \
 +    compiler_RC \
 +    CC_RC \
 +    LD_RC \
 +    lt_prog_compiler_wl_RC \
 +    lt_prog_compiler_pic_RC \
 +    lt_prog_compiler_static_RC \
 +    lt_prog_compiler_no_builtin_flag_RC \
 +    export_dynamic_flag_spec_RC \
 +    thread_safe_flag_spec_RC \
 +    whole_archive_flag_spec_RC \
 +    enable_shared_with_static_runtimes_RC \
 +    old_archive_cmds_RC \
 +    old_archive_from_new_cmds_RC \
 +    predep_objects_RC \
 +    postdep_objects_RC \
 +    predeps_RC \
 +    postdeps_RC \
 +    compiler_lib_search_path_RC \
 +    archive_cmds_RC \
 +    archive_expsym_cmds_RC \
 +    postinstall_cmds_RC \
 +    postuninstall_cmds_RC \
 +    old_archive_from_expsyms_cmds_RC \
 +    allow_undefined_flag_RC \
 +    no_undefined_flag_RC \
 +    export_symbols_cmds_RC \
 +    hardcode_libdir_flag_spec_RC \
 +    hardcode_libdir_flag_spec_ld_RC \
 +    hardcode_libdir_separator_RC \
 +    hardcode_automatic_RC \
 +    module_cmds_RC \
 +    module_expsym_cmds_RC \
 +    lt_cv_prog_compiler_c_o_RC \
 +    exclude_expsyms_RC \
 +    include_expsyms_RC; do
 +
 +    case $var in
 +    old_archive_cmds_RC | \
 +    old_archive_from_new_cmds_RC | \
 +    archive_cmds_RC | \
 +    archive_expsym_cmds_RC | \
 +    module_cmds_RC | \
 +    module_expsym_cmds_RC | \
 +    old_archive_from_expsyms_cmds_RC | \
 +    export_symbols_cmds_RC | \
 +    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 +    postinstall_cmds | postuninstall_cmds | \
 +    old_postinstall_cmds | old_postuninstall_cmds | \
 +    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 +      # Double-quote double-evaled strings.
 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 +      ;;
 +    *)
 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 +      ;;
 +    esac
 +  done
 +
 +  case $lt_echo in
 +  *'\$0 --fallback-echo"')
 +    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
      ;;
    esac
  
 -  ld_shlibs_GCJ=yes
 -  if test "$with_gnu_ld" = yes; then
 -    # If archive_cmds runs LD, not CC, wlarc should be empty
 -    wlarc='${wl}'
 +cfgfile="$ofile"
 +
 +  cat <<__EOF__ >> "$cfgfile"
 +# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 +
 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 +
 +# Shell to use when invoking shell scripts.
 +SHELL=$lt_SHELL
 +
 +# Whether or not to build shared libraries.
 +build_libtool_libs=$enable_shared
 +
 +# Whether or not to build static libraries.
 +build_old_libs=$enable_static
 +
 +# Whether or not to add -lc for building shared libraries.
 +build_libtool_need_lc=$archive_cmds_need_lc_RC
 +
 +# Whether or not to disallow shared libs when runtime libs are static
 +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
 +
 +# Whether or not to optimize for fast installation.
 +fast_install=$enable_fast_install
 +
 +# The host system.
 +host_alias=$host_alias
 +host=$host
 +host_os=$host_os
 +
 +# The build system.
 +build_alias=$build_alias
 +build=$build
 +build_os=$build_os
 +
 +# An echo program that does not interpret backslashes.
 +echo=$lt_echo
 +
 +# The archiver.
 +AR=$lt_AR
 +AR_FLAGS=$lt_AR_FLAGS
 +
 +# A C compiler.
 +LTCC=$lt_LTCC
 +
 +# A language-specific compiler.
 +CC=$lt_compiler_RC
 +
 +# Is the compiler the GNU C compiler?
 +with_gcc=$GCC_RC
 +
 +# An ERE matcher.
 +EGREP=$lt_EGREP
 +
 +# The linker used to build libraries.
 +LD=$lt_LD_RC
 +
 +# Whether we need hard or soft links.
 +LN_S=$lt_LN_S
 +
 +# A BSD-compatible nm program.
 +NM=$lt_NM
 +
 +# A symbol stripping program
 +STRIP=$lt_STRIP
 +
 +# Used to examine libraries when file_magic_cmd begins "file"
 +MAGIC_CMD=$MAGIC_CMD
 +
 +# Used on cygwin: DLL creation program.
 +DLLTOOL="$DLLTOOL"
 +
 +# Used on cygwin: object dumper.
 +OBJDUMP="$OBJDUMP"
  
- # Used on cygwin: assembler.
- AS="$AS"
+     # Set some defaults for GNU ld with shared library support. These
+     # are reset later if shared libraries are not supported. Putting them
+     # here allows them to be overridden if necessary.
+     runpath_var=LD_RUN_PATH
+     hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+     export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
+     # ancient GNU ld didn't support --whole-archive et. al.
+     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+       whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+       else
+       whole_archive_flag_spec_GCJ=
+     fi
+     supports_anon_versioning=no
+     case `$LD -v 2>/dev/null` in
+       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+       *\ 2.11.*) ;; # other 2.11 versions
+       *) supports_anon_versioning=yes ;;
+     esac
  
- # The name of the directory that contains temporary libtool files.
- objdir=$objdir
+     # See if GNU ld supports shared libraries.
+     case $host_os in
+     aix3* | aix4* | aix5*)
+       # On AIX/PPC, the GNU linker is very broken
+       if test "$host_cpu" != ia64; then
+       ld_shlibs_GCJ=no
+       cat <<EOF 1>&2
  
 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 -*** to be unable to reliably create shared libraries on AIX.
 -*** Therefore, libtool is disabling shared libraries support.  If you
 -*** really care for shared libraries, you may want to modify your PATH
 -*** so that a non-GNU linker is found, and then restart.
 +# How to create reloadable object files.
 +reload_flag=$lt_reload_flag
 +reload_cmds=$lt_reload_cmds
  
 -EOF
 -      fi
 -      ;;
 +# How to pass a linker flag through the compiler.
 +wl=$lt_lt_prog_compiler_wl_RC
  
 -    amigaos*)
 -      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 -      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 -      hardcode_minus_L_GCJ=yes
 +# Object file suffix (normally "o").
 +objext="$ac_objext"
  
 -      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 -      # that the semantics of dynamic libraries on AmigaOS, at least up
 -      # to version 4, is to share data among multiple programs linked
 -      # with the same dynamic library.  Since this doesn't match the
 -      # behavior of shared libraries on other platforms, we can't use
 -      # them.
 -      ld_shlibs_GCJ=no
 -      ;;
 +# Old archive suffix (normally "a").
 +libext="$libext"
  
 -    beos*)
 -      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 -      allow_undefined_flag_GCJ=unsupported
 -      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 -      # support --undefined.  This deserves some investigation.  FIXME
 -      archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -      else
 -      ld_shlibs_GCJ=no
 -      fi
 -      ;;
 +# Shared library suffix (normally ".so").
 +shrext_cmds='$shrext_cmds'
  
- # Executable file suffix (normally "").
- exeext="$exeext"
+     cygwin* | mingw* | pw32*)
+       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+       # as there is no search path for DLLs.
+       hardcode_libdir_flag_spec_GCJ='-L$libdir'
+       allow_undefined_flag_GCJ=unsupported
+       always_export_symbols_GCJ=no
+       enable_shared_with_static_runtimes_GCJ=yes
+       export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
  
- # Additional compiler flags for building library objects.
- pic_flag=$lt_lt_prog_compiler_pic_RC
- pic_mode=$pic_mode
+       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+         archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+       else
+       ld_shlibs_GCJ=no
+       fi
+       ;;
  
- # What is the maximum length of a command?
- max_cmd_len=$lt_cv_sys_max_cmd_len
+     linux*)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       tmp_addflag=
+       case $cc_basename,$host_cpu in
+       pgcc*)                          # Portland Group C compiler
+         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       esac
+       archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  
- # Does compiler simultaneously support -c and -o options?
- compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+       if test $supports_anon_versioning = yes; then
+         archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+   $echo "local: *; };" >> $output_objdir/$libname.ver~
+         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+       fi
+       else
+       ld_shlibs_GCJ=no
+       fi
+       ;;
  
 -    netbsd*)
 -      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 -      archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 -      wlarc=
 -      else
 -      archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -      archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 -      fi
 -      ;;
 +# Must we lock files when doing compilation?
 +need_locks=$lt_need_locks
  
 -    solaris* | sysv5*)
 -      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 -      ld_shlibs_GCJ=no
 -      cat <<EOF 1>&2
 +# Do we need the lib prefix for modules?
 +need_lib_prefix=$need_lib_prefix
  
 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 -*** create shared libraries on Solaris systems.  Therefore, libtool
 -*** is disabling shared libraries support.  We urge you to upgrade GNU
 -*** binutils to release 2.9.1 or newer.  Another option is to modify
 -*** your PATH or compiler configuration so that the native linker is
 -*** used, and then restart.
 +# Do we need a version for libraries?
 +need_version=$need_version
  
 -EOF
 -      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 -      archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 -      archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 -      else
 -      ld_shlibs_GCJ=no
 -      fi
 -      ;;
 +# Whether dlopen is supported.
 +dlopen_support=$enable_dlopen
  
 -    sunos4*)
 -      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 -      wlarc=
 -      hardcode_direct_GCJ=yes
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
 +# Whether dlopen of programs is supported.
 +dlopen_self=$enable_dlopen_self
  
- # Whether dlopen of statically linked programs is supported.
- dlopen_self_static=$enable_dlopen_self_static
+     *)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
+       ld_shlibs_GCJ=no
+       fi
+       ;;
+     esac
  
- # Compiler flag to prevent dynamic linking.
- link_static_flag=$lt_lt_prog_compiler_static_RC
+     if test "$ld_shlibs_GCJ" = no; then
+       runpath_var=
+       hardcode_libdir_flag_spec_GCJ=
+       export_dynamic_flag_spec_GCJ=
+       whole_archive_flag_spec_GCJ=
+     fi
+   else
+     # PORTME fill in a description of your system's linker (not GNU ld)
+     case $host_os in
+     aix3*)
+       allow_undefined_flag_GCJ=unsupported
+       always_export_symbols_GCJ=yes
+       archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+       # Note: this linker hardcodes the directories in LIBPATH if there
+       # are no directories specified by -L.
+       hardcode_minus_L_GCJ=yes
+       if test "$GCC" = yes && test -z "$link_static_flag"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct_GCJ=unsupported
+       fi
+       ;;
  
 -    aix4* | aix5*)
 -      if test "$host_cpu" = ia64; then
 -      # On IA64, the linker does run time linking by default, so we don't
 -      # have to do anything special.
 -      aix_use_runtimelinking=no
 -      exp_sym_flag='-Bexport'
 -      no_entry_flag=""
 -      else
 -      # If we're using GNU nm, then we don't want the "-C" option.
 -      # -C means demangle to AIX nm, but means don't demangle with GNU nm
 -      if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 -        export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 -      else
 -        export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 -      fi
 -      aix_use_runtimelinking=no
 +# Compiler flag to turn off builtin functions.
 +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
  
 -      # Test if we are trying to use run time linking or normal
 -      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 -      # need to do runtime linking.
 -      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
 -        for ld_flag in $LDFLAGS; do
 -        if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 -          aix_use_runtimelinking=yes
 -          break
 -        fi
 -        done
 -      esac
 +# Compiler flag to allow reflexive dlopens.
 +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
  
 -      exp_sym_flag='-bexport'
 -      no_entry_flag='-bnoentry'
 -      fi
 +# Compiler flag to generate shared objects directly from archives.
 +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
  
 -      # When large executables or shared objects are built, AIX ld can
 -      # have problems creating the table of contents.  If linking a library
 -      # or program results in "error TOC overflow" add -mminimal-toc to
 -      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 -      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 +# Compiler flag to generate thread-safe objects.
 +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
  
 -      archive_cmds_GCJ=''
 -      hardcode_direct_GCJ=yes
 -      hardcode_libdir_separator_GCJ=':'
 -      link_all_deplibs_GCJ=yes
 +# Library versioning type.
 +version_type=$version_type
  
- # Format of library name prefix.
- libname_spec=$lt_libname_spec
+       if test "$GCC" = yes; then
+       case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+         hardcode_direct_GCJ=yes
+         else
+         # We have old collect2
+         hardcode_direct_GCJ=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L_GCJ=yes
+         hardcode_libdir_flag_spec_GCJ='-L$libdir'
+         hardcode_libdir_separator_GCJ=
+         fi
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+       else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+       if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+       fi
+       fi
+       fi
  
 -      # It seems that -bexpall does not export symbols beginning with
 -      # underscore (_), so it is better to generate a list of symbols to export.
 -      always_export_symbols_GCJ=yes
 -      if test "$aix_use_runtimelinking" = yes; then
 -      # Warning - without using the other runtime loading flags (-brtl),
 -      # -berok will link without error, but may produce a broken library.
 -      allow_undefined_flag_GCJ='-berok'
 -       # Determine the default libpath from the value encoded in an empty executable.
 -       cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 +# List of archive names.  First name is the real one, the rest are links.
 +# The last name is the one that the linker finds with -lNAME.
 +library_names_spec=$lt_library_names_spec
  
 -int
 -main ()
 -{
 +# The coded name of the library, if different from the real name.
 +soname_spec=$lt_soname_spec
  
- # Commands used to build and install an old-style archive.
- RANLIB=$lt_RANLIB
- old_archive_cmds=$lt_old_archive_cmds_RC
- old_postinstall_cmds=$lt_old_postinstall_cmds
- old_postuninstall_cmds=$lt_old_postuninstall_cmds
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
  
 -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 -}'`
 -# Check for a 64-bit object if we didn't find anything.
 -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 -}'`; fi
 -else
 -  echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 +# Create an old-style archive from a shared archive.
 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
  
- # Create a temporary old-style archive to link instead of a shared archive.
- old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
  
- # Commands used to build and install a shared archive.
- archive_cmds=$lt_archive_cmds_RC
- archive_expsym_cmds=$lt_archive_expsym_cmds_RC
- postinstall_cmds=$lt_postinstall_cmds
- postuninstall_cmds=$lt_postuninstall_cmds
+ fi
  
- # Commands used to build a loadable module (assumed same as above if empty)
- module_cmds=$lt_module_cmds_RC
- module_expsym_cmds=$lt_module_expsym_cmds_RC
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
 -       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
 -      archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 -       else
 -      if test "$host_cpu" = ia64; then
 -        hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
 -        allow_undefined_flag_GCJ="-z nodefs"
 -        archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 -      else
 -       # Determine the default libpath from the value encoded in an empty executable.
 -       cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 +# Commands to strip libraries.
 +old_striplib=$lt_old_striplib
 +striplib=$lt_striplib
  
 -int
 -main ()
 -{
 +# Dependencies to place before the objects being linked to create a
 +# shared library.
 +predep_objects=$lt_predep_objects_RC
  
- # Dependencies to place after the objects being linked to create a
- # shared library.
- postdep_objects=$lt_postdep_objects_RC
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
  
 -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 -}'`
 -# Check for a 64-bit object if we didn't find anything.
 -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 -}'`; fi
 -else
 -  echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 +# Dependencies to place before the objects being linked to create a
 +# shared library.
 +predeps=$lt_predeps_RC
  
- # Dependencies to place after the objects being linked to create a
- # shared library.
- postdeps=$lt_postdeps_RC
  
- # The library search path used internally by the compiler when linking
- # a shared library.
- compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+ fi
  
- # Method to check whether dependent libraries are shared objects.
- deplibs_check_method=$lt_deplibs_check_method
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
- # Command to use when deplibs_check_method == file_magic.
- file_magic_cmd=$lt_file_magic_cmd
+        hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
+         no_undefined_flag_GCJ=' ${wl}-bernotok'
+         allow_undefined_flag_GCJ=' ${wl}-berok'
+         # -bexpall does not export symbols beginning with underscore (_)
+         always_export_symbols_GCJ=yes
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec_GCJ=' '
+         archive_cmds_need_lc_GCJ=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+       fi
+       ;;
  
 -    amigaos*)
 -      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 -      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 -      hardcode_minus_L_GCJ=yes
 -      # see comment about different semantics on the GNU ld section
 -      ld_shlibs_GCJ=no
 -      ;;
 +# Flag that allows shared libraries with undefined symbols to be built.
 +allow_undefined_flag=$lt_allow_undefined_flag_RC
  
- # Flag that forces no undefined symbols.
- no_undefined_flag=$lt_no_undefined_flag_RC
+     bsdi[45]*)
+       export_dynamic_flag_spec_GCJ=-rdynamic
+       ;;
  
- # Commands used to finish a libtool library installation in a directory.
- finish_cmds=$lt_finish_cmds
+     cygwin* | mingw* | pw32*)
+       # When not using gcc, we currently assume that we are using
+       # Microsoft Visual C++.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+       # no search path for DLLs.
+       hardcode_libdir_flag_spec_GCJ=' '
+       allow_undefined_flag_GCJ=unsupported
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+       # The linker will automatically build a .lib file if we build a DLL.
+       old_archive_From_new_cmds_GCJ='true'
+       # FIXME: Should let the user specify the lib program.
+       old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+       fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
+       enable_shared_with_static_runtimes_GCJ=yes
+       ;;
  
- # Same as above, but a single script fragment to be evaled but not shown.
- finish_eval=$lt_finish_eval
+     darwin* | rhapsody*)
+       case $host_os in
+         rhapsody* | darwin1.[012])
+          allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
+          ;;
+        *) # Darwin 1.3 on
+          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+            allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+          else
+            case ${MACOSX_DEPLOYMENT_TARGET} in
+              10.[012])
+                allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+                ;;
+              10.*)
+                allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
+                ;;
+            esac
+          fi
+          ;;
+       esac
+       archive_cmds_need_lc_GCJ=no
+       hardcode_direct_GCJ=no
+       hardcode_automatic_GCJ=yes
+       hardcode_shlibpath_var_GCJ=unsupported
+       whole_archive_flag_spec_GCJ=''
+       link_all_deplibs_GCJ=yes
+     if test "$GCC" = yes ; then
+       output_verbose_link_cmd='echo'
+         archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+       archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+       module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+     else
+       case $cc_basename in
+         xlc*)
+          output_verbose_link_cmd='echo'
+          archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           ;;
+        *)
+          ld_shlibs_GCJ=no
+           ;;
+       esac
+     fi
+       ;;
  
 -    dgux*)
 -      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
 +# Take the output of nm and produce a listing of raw symbols and C names.
 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  
 -    freebsd1*)
 -      ld_shlibs_GCJ=no
 -      ;;
 +# Transform the output of nm in a proper C declaration
 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  
 -    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 -    # support.  Future versions do this automatically, but an explicit c++rt0.o
 -    # does not break anything, and helps significantly (at the cost of a little
 -    # extra space).
 -    freebsd2.2*)
 -      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 -      hardcode_libdir_flag_spec_GCJ='-R$libdir'
 -      hardcode_direct_GCJ=yes
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
 +# Transform the output of nm in a C name address pair
 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  
 -    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 -    freebsd2*)
 -      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_direct_GCJ=yes
 -      hardcode_minus_L_GCJ=yes
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
 +# This is the shared library runtime path variable.
 +runpath_var=$runpath_var
  
- # This is the shared library path variable.
- shlibpath_var=$shlibpath_var
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+     freebsd* | kfreebsd*-gnu | dragonfly*)
+       archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec_GCJ='-R$libdir'
+       hardcode_direct_GCJ=yes
+       hardcode_shlibpath_var_GCJ=no
+       ;;
  
 -    hpux9*)
 -      if test "$GCC" = yes; then
 -      archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 -      else
 -      archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 -      fi
 -      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
 -      hardcode_libdir_separator_GCJ=:
 -      hardcode_direct_GCJ=yes
 +# Is shlibpath searched before the hard-coded library search path?
 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  
 -      # hardcode_minus_L: Not really in the search PATH,
 -      # but as the default location of the library.
 -      hardcode_minus_L_GCJ=yes
 -      export_dynamic_flag_spec_GCJ='${wl}-E'
 -      ;;
 +# How to hardcode a shared library path into an executable.
 +hardcode_action=$hardcode_action_RC
  
- # Whether we should hardcode library paths into libraries.
- hardcode_into_libs=$hardcode_into_libs
+     hpux10* | hpux11*)
+       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*|ia64*)
+         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+       else
+       case $host_cpu in
+       hppa*64*|ia64*)
+         archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       *)
+         archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       esac
+       fi
+       if test "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+         hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+         hardcode_libdir_separator_GCJ=:
+         hardcode_direct_GCJ=no
+         hardcode_shlibpath_var_GCJ=no
+         ;;
+       ia64*)
+         hardcode_libdir_flag_spec_GCJ='-L$libdir'
+         hardcode_direct_GCJ=no
+         hardcode_shlibpath_var_GCJ=no
  
 -        # hardcode_minus_L: Not really in the search PATH,
 -        # but as the default location of the library.
 -        hardcode_minus_L_GCJ=yes
 -        ;;
 -      *)
 -        hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
 -        hardcode_libdir_separator_GCJ=:
 -        hardcode_direct_GCJ=yes
 -        export_dynamic_flag_spec_GCJ='${wl}-E'
 +# Flag to hardcode \$libdir into a binary during linking.
 +# This must work even if \$libdir does not exist.
 +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
  
 -        # hardcode_minus_L: Not really in the search PATH,
 -        # but as the default location of the library.
 -        hardcode_minus_L_GCJ=yes
 -        ;;
 -      esac
 -      fi
 -      ;;
 +# If ld is used when linking, flag to hardcode \$libdir into
 +# a binary during linking. This must work even if \$libdir does
 +# not exist.
 +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
  
 -    irix5* | irix6* | nonstopux*)
 -      if test "$GCC" = yes; then
 -      archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 -      else
 -      archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 -      hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
 -      fi
 -      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
 -      hardcode_libdir_separator_GCJ=:
 -      link_all_deplibs_GCJ=yes
 -      ;;
 +# Whether we need a single -rpath flag with a separated argument.
 +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
  
 -    netbsd*)
 -      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 -      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 -      else
 -      archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 -      fi
 -      hardcode_libdir_flag_spec_GCJ='-R$libdir'
 -      hardcode_direct_GCJ=yes
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
 +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 +# resulting binary.
 +hardcode_direct=$hardcode_direct_RC
  
 -    newsos6)
 -      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_direct_GCJ=yes
 -      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
 -      hardcode_libdir_separator_GCJ=:
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
 +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 +# resulting binary.
 +hardcode_minus_L=$hardcode_minus_L_RC
  
- # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
- # the resulting binary.
- hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+     openbsd*)
+       hardcode_direct_GCJ=yes
+       hardcode_shlibpath_var_GCJ=no
+       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+       hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_GCJ='${wl}-E'
+       else
+        case $host_os in
+        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+          archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+          hardcode_libdir_flag_spec_GCJ='-R$libdir'
+          ;;
+        *)
+          archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+          hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+          ;;
+        esac
+       fi
+       ;;
  
 -    os2*)
 -      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 -      hardcode_minus_L_GCJ=yes
 -      allow_undefined_flag_GCJ=unsupported
 -      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 -      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 -      ;;
 +# Set to yes if building a shared library automatically hardcodes DIR into the library
 +# and all subsequent libraries and executables linked against it.
 +hardcode_automatic=$hardcode_automatic_RC
  
 -    osf3*)
 -      if test "$GCC" = yes; then
 -      allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
 -      archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 -      else
 -      allow_undefined_flag_GCJ=' -expect_unresolved \*'
 -      archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 -      fi
 -      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
 -      hardcode_libdir_separator_GCJ=:
 -      ;;
 +# Variables whose values should be saved in libtool wrapper scripts and
 +# restored at relink time.
 +variables_saved_for_relink="$variables_saved_for_relink"
  
- # Whether libtool must link a program against all its dependency libraries.
- link_all_deplibs=$link_all_deplibs_RC
+     osf4* | osf5*)    # as osf3* with the addition of -msym flag
+       if test "$GCC" = yes; then
+       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+       else
+       allow_undefined_flag_GCJ=' -expect_unresolved \*'
+       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  
 -      # Both c and cxx compiler support -rpath directly
 -      hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
 -      fi
 -      hardcode_libdir_separator_GCJ=:
 -      ;;
 +# Compile-time system search path for libraries
 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  
 -    sco3.2v5*)
 -      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_shlibpath_var_GCJ=no
 -      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
 -      runpath_var=LD_RUN_PATH
 -      hardcode_runpath_var=yes
 -      ;;
 +# Run-time system search path for libraries
 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  
- # Fix the shell variable \$srcfile for the compiler.
- fix_srcfile_path="$fix_srcfile_path_RC"
+     solaris*)
+       no_undefined_flag_GCJ=' -z text'
+       if test "x$archive_cmds" = "x"; then
+         if test "$GCC" = yes; then
+         wlarc='${wl}'
+         if $CC -v --help 2>/dev/null | grep -- -shared  > /dev/null 2> /dev/null; then
+           archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+           archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+         else
+           archive_cmds_GCJ='$CC ${wl}-G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+           archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+           $CC ${wl}-G ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+           fi
+         else
+         wlarc=''
+           lt_prog_compiler_static_GCJ='-static'
+         archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+           lt_prog_compiler_static_GCJ='-static'
+       fi
+       fi
+       hardcode_libdir_flag_spec_GCJ='-R$libdir'
+       hardcode_shlibpath_var_GCJ=no
+       case $host_os in
+       solaris2.[0-5] | solaris2.[0-5].*) ;;
+       *)
+       # The compiler driver will combine linker options so we
+       # cannot just pass the convience library names through
+       # without $wl, iff we do not link with $LD.
+       # Luckily, gcc supports the same syntax we need for Sun Studio.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       case $wlarc in
+       '')
+         whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+       *)
+         whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+       esac ;;
+       esac
+       link_all_deplibs_GCJ=yes
+       ;;
  
 -    sunos4*)
 -      if test "x$host_vendor" = xsequent; then
 -      # Use $CC to link under sequent, because it throws in some extra .o
 -      # files that make .init and .fini sections work.
 -      archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 -      else
 -      archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 -      fi
 -      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 -      hardcode_direct_GCJ=yes
 -      hardcode_minus_L_GCJ=yes
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
 +# Set to yes if exported symbols are required.
 +always_export_symbols=$always_export_symbols_RC
  
 -    sysv4)
 -      case $host_vendor in
 -      sni)
 -        archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -        hardcode_direct_GCJ=yes # is this really true???
 -      ;;
 -      siemens)
 -        ## LD is ld it makes a PLAMLIB
 -        ## CC just makes a GrossModule.
 -        archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 -        reload_cmds_GCJ='$CC -r -o $output$reload_objs'
 -        hardcode_direct_GCJ=no
 -        ;;
 -      motorola)
 -        archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -        hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
 -      ;;
 -      esac
 -      runpath_var='LD_RUN_PATH'
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
 +# The commands to list exported symbols.
 +export_symbols_cmds=$lt_export_symbols_cmds_RC
  
 -    sysv4.3*)
 -      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_shlibpath_var_GCJ=no
 -      export_dynamic_flag_spec_GCJ='-Bexport'
 -      ;;
 +# The commands to extract the exported symbol list from a shared archive.
 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
  
 -    sysv4*MP*)
 -      if test -d /usr/nec; then
 -      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_shlibpath_var_GCJ=no
 -      runpath_var=LD_RUN_PATH
 -      hardcode_runpath_var=yes
 -      ld_shlibs_GCJ=yes
 -      fi
 -      ;;
 +# Symbols that should not be listed in the preloaded symbols.
 +exclude_expsyms=$lt_exclude_expsyms_RC
  
 -    sysv4.2uw2*)
 -      archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_direct_GCJ=yes
 -      hardcode_minus_L_GCJ=no
 -      hardcode_shlibpath_var_GCJ=no
 -      hardcode_runpath_var=yes
 -      runpath_var=LD_RUN_PATH
 -      ;;
 +# Symbols that must always be exported.
 +include_expsyms=$lt_include_expsyms_RC
  
 -   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
 -      no_undefined_flag_GCJ='${wl}-z ${wl}text'
 -      if test "$GCC" = yes; then
 -      archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 -      else
 -      archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 -      fi
 -      runpath_var='LD_RUN_PATH'
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
 +# ### END LIBTOOL TAG CONFIG: $tagname
  
 -    sysv5*)
 -      no_undefined_flag_GCJ=' -z text'
 -      # $CC -shared without GNU ld will not create a library from C++
 -      # object files and a static libstdc++, better avoid it by now
 -      archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 -              $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 -      hardcode_libdir_flag_spec_GCJ=
 -      hardcode_shlibpath_var_GCJ=no
 -      runpath_var='LD_RUN_PATH'
 -      ;;
 +__EOF__
  
 -    uts4*)
 -      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 -      hardcode_libdir_flag_spec_GCJ='-L$libdir'
 -      hardcode_shlibpath_var_GCJ=no
 -      ;;
  
 -    *)
 -      ld_shlibs_GCJ=no
 -      ;;
 -    esac
 +else
 +  # If there is no Makefile yet, we rely on a make rule to execute
 +  # `config.status --recheck' to rerun these tests and create the
 +  # libtool script then.
 +  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 +  if test -f "$ltmain_in"; then
 +    test -f Makefile && make "$ltmain"
    fi
 +fi
  
+ { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+ echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
+ test "$ld_shlibs_GCJ" = no && can_build_shared=no
  
 -variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 -if test "$GCC" = yes; then
 -  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 -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
  
 -#
 -# Do we need to explicitly link libc?
 -#
 -case "x$archive_cmds_need_lc_GCJ" in
 -x|xyes)
 -  # Assume -lc should be added
 -  archive_cmds_need_lc_GCJ=yes
 +CC="$lt_save_CC"
 +
 +      ;;
  
-       *)
-       { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
- echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
-    { (exit 1); exit 1; }; }
-       ;;
-       esac
+   if test "$enable_shared" = yes && test "$GCC" = yes; then
+     case $archive_cmds_GCJ in
+     *'~'*)
+       # FIXME: we may have to deal with multi-command sequences.
+       ;;
+     '$CC '*)
+       # Test whether the compiler implicitly links with -lc since on some
+       # systems, -lgcc has to come before -lc. If gcc already passes -lc
+       # to ld, don't add -lc before -lgcc.
+       { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+       $rm conftest*
+       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  
-       # Append the new tag name to the list of available tags.
-       if test -n "$tagname" ; then
-       available_tags="$available_tags $tagname"
-     fi
-     fi
-   done
-   IFS="$lt_save_ifs"
+       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); } 2>conftest.err; then
+         soname=conftest
+         lib=conftest
+         libobjs=conftest.$ac_objext
+         deplibs=
+         wl=$lt_prog_compiler_wl_GCJ
+         compiler_flags=-v
+         linker_flags=-v
+         verstring=
+         output_objdir=.
+         libname=conftest
+         lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+         allow_undefined_flag_GCJ=
+         if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+   (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }
+         then
+         archive_cmds_need_lc_GCJ=no
+         else
+         archive_cmds_need_lc_GCJ=yes
+         fi
+         allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+       else
+         cat conftest.err 1>&5
+       fi
+       $rm conftest*
+       { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+ echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
+       ;;
+     esac
+   fi
+   ;;
+ esac
  
-   # Now substitute the updated list of available tags.
-   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-     mv "${ofile}T" "$ofile"
-     chmod +x "$ofile"
+ { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+ echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+ library_names_spec=
+ libname_spec='lib$name'
+ soname_spec=
+ shrext_cmds=".so"
+ postinstall_cmds=
+ postuninstall_cmds=
+ finish_cmds=
+ finish_eval=
+ shlibpath_var=
+ shlibpath_overrides_runpath=unknown
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
+ if test "$GCC" = yes; then
+   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+     # if the path contains ";" then we assume it to be the separator
+     # otherwise default to the standard path separator (i.e. ":") - it is
+     # assumed that no part of a normal pathname contains ";" but that should
+     # okay in the real world where ";" in dirpaths is itself problematic.
+     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
    else
 -    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 +    rm -f "${ofile}T"
 +    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
 +   { (exit 1); exit 1; }; }
    fi
 -else
 -  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  fi
 -need_lib_prefix=unknown
 -hardcode_into_libs=no
  
 -# when you set need_version to no, make sure it does not cause -set_version
 -# flags to be left without arguments
 -need_version=unknown
  
 -case $host_os in
 -aix3*)
 -  version_type=linux
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 -  shlibpath_var=LIBPATH
  
 -  # AIX 3 has no versioning support, so we append a major version to the name.
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  ;;
 +# This can be used to rebuild libtool when needed
 +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 +
 +# Always use our own libtool.
 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 +
 +# Prevent multiple expansion
 +
 +
 +
  
 -aix4* | aix5*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  hardcode_into_libs=yes
 -  if test "$host_cpu" = ia64; then
 -    # AIX 5 supports IA64
 -    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 -    shlibpath_var=LD_LIBRARY_PATH
 -  else
 -    # With GCC up to 2.95.x, collect2 would create an import file
 -    # for dependence libraries.  The import file would start with
 -    # the line `#! .'.  This would cause the generated library to
 -    # depend on `.', always an invalid library.  This was fixed in
 -    # development snapshots of GCC prior to 3.0.
 -    case $host_os in
 -      aix4 | aix4.[01] | aix4.[01].*)
 -      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 -         echo ' yes '
 -         echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 -      :
 -      else
 -      can_build_shared=no
 -      fi
 -      ;;
 -    esac
 -    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 -    # soname into executable. Probably we can add versioning support to
 -    # collect2, so additional links can be useful in future.
 -    if test "$aix_use_runtimelinking" = yes; then
 -      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 -      # instead of lib<name>.a to let people know that these are not
 -      # typical AIX shared libraries.
 -      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -    else
 -      # We preserve .a as extension for shared libraries through AIX4.2
 -      # and later when we are not doing run time linking.
 -      library_names_spec='${libname}${release}.a $libname.a'
 -      soname_spec='${libname}${release}${shared_ext}$major'
 -    fi
 -    shlibpath_var=LIBPATH
 -  fi
 -  ;;
  
 -amigaos*)
 -  library_names_spec='$libname.ixlibrary $libname.a'
 -  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 -  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
 -  ;;
  
 -beos*)
 -  library_names_spec='${libname}${shared_ext}'
 -  dynamic_linker="$host_os ld.so"
 -  shlibpath_var=LIBRARY_PATH
 -  ;;
  
+ bsdi[45]*)
+   version_type=linux
+   need_version=no
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+   soname_spec='${libname}${release}${shared_ext}$major'
+   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
+   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+   # the default ld.so.conf also contains /usr/contrib/lib and
+   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+   # libtool to hard-code these into programs
+   ;;
  
 -cygwin* | mingw* | pw32*)
 -  version_type=windows
 -  shrext_cmds=".dll"
 -  need_version=no
 -  need_lib_prefix=no
  
+   case $GCC,$host_os in
+   yes,cygwin* | yes,mingw* | yes,pw32*)
+     library_names_spec='$libname.dll.a'
+     # DLL is installed to $(libdir)/../bin by postinstall_cmds
+     postinstall_cmds='base_file=`basename \${file}`~
+       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+       dldir=$destdir/`dirname \$dlpath`~
+       test -d \$dldir || mkdir -p \$dldir~
+       $install_prog $dir/$dlname \$dldir/$dlname~
+       chmod a+x \$dldir/$dlname'
+     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+       dlpath=$dir/\$dldll~
+        $rm \$dlpath'
+     shlibpath_overrides_runpath=yes
  
+     case $host_os in
+     cygwin*)
+       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+       ;;
+     mingw*)
+       # MinGW DLLs use traditional 'lib' prefix
+       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+         # It is most probably a Windows format PATH printed by
+         # mingw gcc, but we are running on Cygwin. Gcc prints its search
+         # path with ; separators, and with drive letters. We can handle the
+         # drive letters (cygwin fileutils understands them), so leave them,
+         # especially as we might pass files found there to a mingw objdump,
+         # which wouldn't understand a cygwinified path. Ahh.
+         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+       else
+         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+       fi
+       ;;
+     pw32*)
+       # pw32 DLLs use 'pw' prefix rather than 'lib'
+       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+       ;;
+     esac
+     ;;
  
 -  *)
 -    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
 -    ;;
 -  esac
 -  dynamic_linker='Win32 ld.exe'
 -  # FIXME: first we should search . and the directory the executable is in
 -  shlibpath_var=PATH
 -  ;;
  
+ darwin* | rhapsody*)
+   dynamic_linker="$host_os dyld"
+   version_type=darwin
+   need_lib_prefix=no
+   need_version=no
+   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+   soname_spec='${libname}${release}${major}$shared_ext'
+   shlibpath_overrides_runpath=yes
+   shlibpath_var=DYLD_LIBRARY_PATH
+   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+   if test "$GCC" = yes; then
+     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+   else
+     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+   fi
+   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+   ;;
  
 -dgux*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  ;;
  
 -freebsd1*)
 -  dynamic_linker=no
 -  ;;
  
 -kfreebsd*-gnu)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=no
 -  hardcode_into_libs=yes
 -  dynamic_linker='GNU ld.so'
 -  ;;
  
+ freebsd* | dragonfly*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+   if test -x /usr/bin/objformat; then
+     objformat=`/usr/bin/objformat`
+   else
+     case $host_os in
+     freebsd[123]*) objformat=aout ;;
+     *) objformat=elf ;;
+     esac
+   fi
+   version_type=freebsd-$objformat
+   case $version_type in
+     freebsd-elf*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+       need_version=no
+       need_lib_prefix=no
+       ;;
+     freebsd-*)
+       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+       need_version=yes
+       ;;
+   esac
+   shlibpath_var=LD_LIBRARY_PATH
+   case $host_os in
+   freebsd2*)
+     shlibpath_overrides_runpath=yes
+     ;;
+   freebsd3.[01]* | freebsdelf3.[01]*)
+     shlibpath_overrides_runpath=yes
+     hardcode_into_libs=yes
+     ;;
+   *) # from 3.2 on
+     shlibpath_overrides_runpath=no
+     hardcode_into_libs=yes
+     ;;
+   esac
+   ;;
  
 -gnu*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  hardcode_into_libs=yes
 -  ;;
  
+ hpux9* | hpux10* | hpux11*)
+   # Give a soname corresponding to the major version so that dld.sl refuses to
+   # link against other versions.
+   version_type=sunos
+   need_lib_prefix=no
+   need_version=no
+   case $host_cpu in
+   ia64*)
+     shrext_cmds='.so'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.so"
+     shlibpath_var=LD_LIBRARY_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     if test "X$HPUX_IA64_MODE" = X32; then
+       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+     else
+       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+     fi
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+    hppa*64*)
+      shrext_cmds='.sl'
+      hardcode_into_libs=yes
+      dynamic_linker="$host_os dld.sl"
+      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+      soname_spec='${libname}${release}${shared_ext}$major'
+      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+      ;;
+    *)
+     shrext_cmds='.sl'
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=SHLIB_PATH
+     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     ;;
+   esac
+   # HP-UX runs *really* slowly unless shared libraries are mode 555.
+   postinstall_cmds='chmod 555 $lib'
+   ;;
  
 -irix5* | irix6* | nonstopux*)
 -  case $host_os in
 -    nonstopux*) version_type=nonstopux ;;
 -    *)
 -      if test "$lt_cv_prog_gnu_ld" = yes; then
 -              version_type=linux
 -      else
 -              version_type=irix
 -      fi ;;
 -  esac
 -  need_lib_prefix=no
 -  need_version=no
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 -  case $host_os in
 -  irix5* | nonstopux*)
 -    libsuff= shlibsuff=
 -    ;;
 -  *)
 -    case $LD in # libtool.m4 will add one of these switches to LD
 -    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 -      libsuff= shlibsuff= libmagic=32-bit;;
 -    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 -      libsuff=32 shlibsuff=N32 libmagic=N32;;
 -    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 -      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 -    *) libsuff= shlibsuff= libmagic=never-match;;
 -    esac
 -    ;;
 -  esac
 -  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 -  shlibpath_overrides_runpath=no
 -  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 -  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 -  hardcode_into_libs=yes
 -  ;;
  
 -# No shared lib support for Linux oldld, aout, or coff.
 -linux*oldld* | linux*aout* | linux*coff*)
 -  dynamic_linker=no
 -  ;;
  
 -# This must be Linux ELF.
 -linux*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=no
 -  # This implies no fast_install, which is unacceptable.
 -  # Some rework will be needed to allow for fast_install
 -  # before this can be enabled.
 -  hardcode_into_libs=yes
  
- if test $ac_cv_c_compiler_gnu = yes; then
-     echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
- echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
- if test "${ac_cv_prog_gcc_traditional+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-     ac_pattern="Autoconf.*'x'"
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <sgtty.h>
- Autoconf TIOCGETP
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "$ac_pattern" >/dev/null 2>&1; then
-   ac_cv_prog_gcc_traditional=yes
- else
-   ac_cv_prog_gcc_traditional=no
- fi
- rm -f conftest*
+   # Append ld.so.conf contents to the search path
+   if test -f /etc/ld.so.conf; then
+     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+   fi
  
 -  # We used to test for /lib/ld.so.1 and disable shared libraries on
 -  # powerpc, because MkLinux only supported shared libraries with the
 -  # GNU dynamic linker.  Since this was broken with cross compilers,
 -  # most powerpc-linux boxes support dynamic linking these days and
 -  # people can always --disable-shared, the test was removed, and we
 -  # assume the GNU/Linux dynamic linker is in use.
 -  dynamic_linker='GNU/Linux ld.so'
 -  ;;
  
 -knetbsd*-gnu)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=no
 -  hardcode_into_libs=yes
 -  dynamic_linker='GNU ld.so'
 -  ;;
 +  if test $ac_cv_prog_gcc_traditional = no; then
 +    cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
 +#include <termio.h>
 +Autoconf TCGETA
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "$ac_pattern" >/dev/null 2>&1; then
 +  ac_cv_prog_gcc_traditional=yes
 +fi
 +rm -f conftest*
  
 -netbsd*)
 -  version_type=sunos
 -  need_lib_prefix=no
 -  need_version=no
 -  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 -    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 -    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 -    dynamic_linker='NetBSD (a.out) ld.so'
 -  else
 -    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 -    soname_spec='${libname}${release}${shared_ext}$major'
 -    dynamic_linker='NetBSD ld.elf_so'
    fi
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  hardcode_into_libs=yes
 -  ;;
 -
 -newsos6)
 -  version_type=linux
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  ;;
 -
 -nto-qnx*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  ;;
 -
 -openbsd*)
 -  version_type=sunos
 -  need_lib_prefix=no
 -  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 -  case $host_os in
 -    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
 -    *)                         need_version=no  ;;
 -  esac
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 -  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 -    case $host_os in
 -      openbsd2.[89] | openbsd2.[89].*)
 -      shlibpath_overrides_runpath=no
 -      ;;
 -      *)
 -      shlibpath_overrides_runpath=yes
 -      ;;
 -      esac
 -  else
 -    shlibpath_overrides_runpath=yes
 +fi
 +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
 +  if test $ac_cv_prog_gcc_traditional = yes; then
 +    CC="$CC -traditional"
    fi
 -  ;;
 +fi
  
 -os2*)
 -  libname_spec='$name'
 -  shrext_cmds=".dll"
 -  need_lib_prefix=no
 -  library_names_spec='$libname${shared_ext} $libname.a'
 -  dynamic_linker='OS/2 ld.exe'
 -  shlibpath_var=LIBPATH
 -  ;;
 +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
 +  cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
  
 -osf3* | osf4* | osf5*)
 -  version_type=osf
 -  need_lib_prefix=no
 -  need_version=no
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 -  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 -  ;;
 +int
 +main ()
 +{
 +/* FIXME: Include the comments suggested by Paul. */
 +#ifndef __cplusplus
 +  /* Ultrix mips cc rejects this.  */
 +  typedef int charset[2];
 +  const charset x;
 +  /* SunOS 4.1.1 cc rejects this.  */
 +  char const *const *ccp;
 +  char **p;
 +  /* NEC SVR4.0.2 mips cc rejects this.  */
 +  struct point {int x, y;};
 +  static struct point const zero = {0,0};
 +  /* AIX XL C 1.02.0.0 rejects this.
 +     It does not let you subtract one const X* pointer from another in
 +     an arm of an if-expression whose if-part is not a constant
 +     expression */
 +  const char *g = "string";
 +  ccp = &g + (g ? g-g : 0);
 +  /* HPUX 7.0 cc rejects these. */
 +  ++ccp;
 +  p = (char**) ccp;
 +  ccp = (char const *const *) p;
 +  { /* SCO 3.2v4 cc rejects this.  */
 +    char *t;
 +    char const *s = 0 ? (char *) 0 : (char const *) 0;
  
 -sco3.2v5*)
 -  version_type=osf
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  ;;
 +    *t++ = 0;
 +  }
 +  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
 +    int x[] = {25, 17};
 +    const int *foo = &x[0];
 +    ++foo;
 +  }
 +  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
 +    typedef const int *iptr;
 +    iptr p = 0;
 +    ++p;
 +  }
 +  { /* AIX XL C 1.02.0.0 rejects this saying
 +       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
 +    struct s { int j; const int *ap[3]; };
 +    struct s *b; b->j = 5;
 +  }
 +  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
 +    const int foo = 10;
 +  }
 +#endif
  
 -solaris*)
 -  version_type=linux
 -  need_lib_prefix=no
 -  need_version=no
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  hardcode_into_libs=yes
 -  # ldd complains unless libraries are executable
 -  postinstall_cmds='chmod +x $lib'
 -  ;;
 +  ;
 +  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_c_const=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_c_const=no
- fi
- rm -f 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
- if test $ac_cv_c_const = no; then
 -sunos4*)
++openbsd*)
+   version_type=sunos
++  need_lib_prefix=no
++  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
++  case $host_os in
++    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
++    *)                         need_version=no  ;;
++  esac
+   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 -  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+   shlibpath_var=LD_LIBRARY_PATH
 -  shlibpath_overrides_runpath=yes
 -  if test "$with_gnu_ld" = yes; then
 -    need_lib_prefix=no
++  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++    case $host_os in
++      openbsd2.[89] | openbsd2.[89].*)
++      shlibpath_overrides_runpath=no
++      ;;
++      *)
++      shlibpath_overrides_runpath=yes
++      ;;
++      esac
++  else
++    shlibpath_overrides_runpath=yes
+   fi
 -  need_version=yes
+   ;;
  
 -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 -  version_type=linux
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  case $host_vendor in
 -    sni)
 -      shlibpath_overrides_runpath=no
 -      need_lib_prefix=no
 -      export_dynamic_flag_spec='${wl}-Blargedynsym'
 -      runpath_var=LD_RUN_PATH
 -      ;;
 -    siemens)
 -      need_lib_prefix=no
 -      ;;
 -    motorola)
 -      need_lib_prefix=no
 -      need_version=no
 -      shlibpath_overrides_runpath=no
 -      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 -      ;;
 -  esac
 -  ;;
 +cat >>confdefs.h <<\_ACEOF
 +#define const
 +_ACEOF
  
 -sysv4*MP*)
 -  if test -d /usr/nec ;then
 -    version_type=linux
 -    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 -    soname_spec='$libname${shared_ext}.$major'
 -    shlibpath_var=LD_LIBRARY_PATH
 -  fi
 -  ;;
 +fi
  
 -uts4*)
 -  version_type=linux
 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 -  soname_spec='${libname}${release}${shared_ext}$major'
 -  shlibpath_var=LD_LIBRARY_PATH
 -  ;;
 +
 +      echo "$as_me:$LINENO: checking for working unsigned long constants" >&5
 +echo $ECHO_N "checking for working unsigned long constants... $ECHO_C" >&6
 +if test "${amanda_cv_c_unsigned_long_constants+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 ()
 +{
 +
 +                      long l = 1ul;
  
-   ;
-   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
-   amanda_cv_c_unsigned_long_constants=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ *)
+   dynamic_linker=no
+   ;;
+ esac
+ { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+ echo "${ECHO_T}$dynamic_linker" >&6; }
+ test "$dynamic_linker" = no && can_build_shared=no
  
- amanda_cv_c_unsigned_long_constants=no
+ { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+ echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+ hardcode_action_GCJ=
+ if test -n "$hardcode_libdir_flag_spec_GCJ" || \
+    test -n "$runpath_var_GCJ" || \
+    test "X$hardcode_automatic_GCJ" = "Xyes" ; then
  
 -  # We can hardcode non-existant directories.
 -  if test "$hardcode_direct_GCJ" != no &&
 -     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 -     # have to relink, otherwise we might link with an installed library
 -     # when we should be linking with a yet-to-be-installed one
 -     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
 -     test "$hardcode_minus_L_GCJ" != no; then
 -    # Linking always hardcodes the temporary library directory.
 -    hardcode_action_GCJ=relink
 -  else
 -    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 -    hardcode_action_GCJ=immediate
 -  fi
 -else
 -  # We cannot hardcode anything, or else we can only hardcode existing
 -  # directories.
 -  hardcode_action_GCJ=unsupported
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+ echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
  
 -if test "$hardcode_action_GCJ" = relink; then
 -  # Fast installation is not supported
 -  enable_fast_install=no
 -elif test "$shlibpath_overrides_runpath" = yes ||
 -     test "$enable_shared" = no; then
 -  # Fast installation is not necessary
 -  enable_fast_install=needless
  fi
 +echo "$as_me:$LINENO: result: $amanda_cv_c_unsigned_long_constants" >&5
 +echo "${ECHO_T}$amanda_cv_c_unsigned_long_constants" >&6
 +      if test "$amanda_cv_c_unsigned_long_constants" = yes; then
 +
 +cat >>confdefs.h <<\_ACEOF
 +#define HAVE_UNSIGNED_LONG_CONSTANTS 1
 +_ACEOF
 +
 +      fi
  
- echo "$as_me:$LINENO: checking for off_t" >&5
- echo $ECHO_N "checking for off_t... $ECHO_C" >&6
- if test "${ac_cv_type_off_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 ((off_t *) 0)
-   return 0;
- if (sizeof (off_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_off_t=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_off_t=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
- echo "${ECHO_T}$ac_cv_type_off_t" >&6
- if test $ac_cv_type_off_t = yes; then
-   :
+ striplib=
+ old_striplib=
+ { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+ echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
+ if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+   { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
  else
- cat >>confdefs.h <<_ACEOF
- #define off_t long
- _ACEOF
+ # FIXME - insert some real tests, host_os isn't really good enough
+   case $host_os in
+    darwin*)
+        if test -n "$STRIP" ; then
+          striplib="$STRIP -x"
+          { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+        else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+ fi
+        ;;
+    *)
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+     ;;
+   esac
  fi
  
 -if test "x$enable_dlopen" != xyes; then
 -  enable_dlopen=unknown
 -  enable_dlopen_self=unknown
 -  enable_dlopen_self_static=unknown
 +echo "$as_me:$LINENO: checking for pid_t" >&5
 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
 +if test "${ac_cv_type_pid_t+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  lt_cv_dlopen=no
 -  lt_cv_dlopen_libs=
 +  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 ((pid_t *) 0)
 +  return 0;
 +if (sizeof (pid_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_pid_t=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -  case $host_os in
 -  beos*)
 -    lt_cv_dlopen="load_add_on"
 -    lt_cv_dlopen_libs=
 -    lt_cv_dlopen_self=yes
 -    ;;
 +ac_cv_type_pid_t=no
 +fi
 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
 +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6
 +if test $ac_cv_type_pid_t = yes; then
 +  :
 +else
  
 -  mingw* | pw32*)
 -    lt_cv_dlopen="LoadLibrary"
 -    lt_cv_dlopen_libs=
 -   ;;
 +cat >>confdefs.h <<_ACEOF
 +#define pid_t int
 +_ACEOF
  
 -  cygwin*)
 -    lt_cv_dlopen="dlopen"
 -    lt_cv_dlopen_libs=
 -   ;;
 +fi
  
- 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
+   darwin*)
+   # if libdl is installed we need to link against it
+     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+ echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_dl_dlopen+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-ldl  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 +  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
+ /* 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
+ char dlopen ();
  int
  main ()
  {
- if ((size_t *) 0)
-   return 0;
- if (sizeof (size_t))
-   return 0;
+ return dlopen ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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_size_t=yes
+   (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_lib_dl_dlopen=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_type_size_t=no
      ac_cv_lib_dl_dlopen=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
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
-   :
{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+ if test $ac_cv_lib_dl_dlopen = yes; then
+   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  else
  
 -    lt_cv_dlopen="dyld"
 -    lt_cv_dlopen_libs=
 -    lt_cv_dlopen_self=yes
 +cat >>confdefs.h <<_ACEOF
 +#define size_t unsigned
 +_ACEOF
  
  fi
  
 -   ;;
  
- echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
- echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
- if test "${ac_cv_type_uid_t+set}" = set; then
+   *)
+     { echo "$as_me:$LINENO: checking for shl_load" >&5
+ echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
+ if test "${ac_cv_func_shl_load+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 -/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define shl_load innocuous_shl_load
 +#include <sys/types.h>
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char shl_load (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "uid_t" >/dev/null 2>&1; then
 +  ac_cv_type_uid_t=yes
 +else
 +  ac_cv_type_uid_t=no
 +fi
 +rm -f conftest*
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
 +fi
 +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6
 +if test $ac_cv_type_uid_t = no; then
  
 -#undef shl_load
 +cat >>confdefs.h <<\_ACEOF
 +#define uid_t int
 +_ACEOF
 +
 +
 +cat >>confdefs.h <<\_ACEOF
 +#define gid_t int
 +_ACEOF
 +
 +fi
  
- echo "$as_me:$LINENO: checking return type of signal handlers" >&5
- echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
- if test "${ac_cv_type_signal+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 <sys/types.h>
- #include <signal.h>
- #ifdef signal
- # undef signal
- #endif
+ /* 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" void (*signal (int, void (*)(int)))(int);
- #else
- void (*signal ()) ();
+ extern "C"
+ #endif
+ char shl_load ();
+ /* 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_shl_load || defined __stub___shl_load
+ choke me
  #endif
  
  int
  main ()
  {
int i;
return shl_load ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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_signal=void
+   (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_shl_load=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_type_signal=int
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_cv_func_shl_load=no
  fi
- echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
- echo "${ECHO_T}$ac_cv_type_signal" >&6
- cat >>confdefs.h <<_ACEOF
- #define RETSIGTYPE $ac_cv_type_signal
- _ACEOF
  
- echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
- echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
- if test "${ac_cv_struct_tm+set}" = set; then
+ 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_shl_load" >&5
+ echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
+ if test $ac_cv_func_shl_load = yes; then
+   lt_cv_dlopen="shl_load"
+ else
+   { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+ echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_dld_shl_load+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-ldld  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 +  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 +#include <sys/types.h>
 +#include <time.h>
  
+ /* 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
+ char shl_load ();
  int
  main ()
  {
struct tm *tp; tp->tm_sec;
return shl_load ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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_struct_tm=time.h
+   (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_lib_dld_shl_load=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_struct_tm=sys/time.h
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
- echo "${ECHO_T}$ac_cv_struct_tm" >&6
- if test $ac_cv_struct_tm = sys/time.h; then
- cat >>confdefs.h <<\_ACEOF
- #define TM_IN_SYS_TIME 1
- _ACEOF
+       ac_cv_lib_dld_shl_load=no
  fi
  
- for ac_prog in flex lex
- 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_LEX+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test -n "$LEX"; then
-   ac_cv_prog_LEX="$LEX" # 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_LEX="$ac_prog"
-     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
- done
- fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
- LEX=$ac_cv_prog_LEX
- if test -n "$LEX"; then
-   echo "$as_me:$LINENO: result: $LEX" >&5
- echo "${ECHO_T}$LEX" >&6
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+ echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
+ if test $ac_cv_lib_dld_shl_load = yes; then
+   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
  else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
-   test -n "$LEX" && break
- done
- test -n "$LEX" || LEX=":"
- if test -z "$LEXLIB"
- then
-   echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
- echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
- if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+   { echo "$as_me:$LINENO: checking for dlopen" >&5
+ echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
+ if test "${ac_cv_func_dlopen+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lfl  $LIBS"
 +cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 -/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define dlopen innocuous_dlopen
 -
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char dlopen (); 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 dlopen
  
- /* 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 yywrap ();
+ char dlopen ();
+ /* 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_dlopen || defined __stub___dlopen
+ choke me
+ #endif
  int
  main ()
  {
yywrap ();
return dlopen ();
    ;
    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
-   ac_cv_lib_fl_yywrap=yes
+   (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_dlopen=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_lib_fl_yywrap=no
      ac_cv_func_dlopen=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
 +LIBS=$ac_check_lib_save_LIBS
  fi
echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
- echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
- if test $ac_cv_lib_fl_yywrap = yes; then
-   LEXLIB="-lfl"
{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
+ if test $ac_cv_func_dlopen = yes; then
+   lt_cv_dlopen="dlopen"
  else
-   echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
- echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
- if test "${ac_cv_lib_l_yywrap+set}" = set; then
+   { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+ echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_dl_dlopen+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    ac_check_lib_save_LIBS=$LIBS
 -LIBS="-ldl  $LIBS"
 +LIBS="-ll  $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
@@@ -39393,4924 -47072,3421 +48501,3994 @@@ cat confdefs.h >>conftest.$ac_ex
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
- /* 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 yywrap ();
+ char dlopen ();
  int
  main ()
  {
yywrap ();
return dlopen ();
    ;
    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
-   ac_cv_lib_l_yywrap=yes
+   (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_lib_dl_dlopen=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_lib_l_yywrap=no
      ac_cv_lib_dl_dlopen=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
  LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
- echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
- if test $ac_cv_lib_l_yywrap = yes; then
-   LEXLIB="-ll"
- fi
- fi
- fi
- if test "x$LEX" != "x:"; then
-   echo "$as_me:$LINENO: checking lex output file root" >&5
- echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
- if test "${ac_cv_prog_lex_root+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   # The minimal lex program is just a single line: %%.  But some broken lexes
- # (Solaris, I think it was) want two %% lines, so accommodate them.
- cat >conftest.l <<_ACEOF
- %%
- %%
- _ACEOF
- { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
-   (eval $LEX conftest.l) 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }
- if test -f lex.yy.c; then
-   ac_cv_prog_lex_root=lex.yy
- elif test -f lexyy.c; then
-   ac_cv_prog_lex_root=lexyy
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+ if test $ac_cv_lib_dl_dlopen = yes; then
+   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  else
-   { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
- echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
-    { (exit 1); exit 1; }; }
- fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
- echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
- rm -f conftest.l
- LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
- echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
- echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
- if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+   { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+ echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_svld_dlopen+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lsvld  $LIBS"
 +  # POSIX says lex can declare yytext either as a pointer or an array; the
 +# default is implementation-dependent. Figure out which it is, since
 +# not all implementations provide the %pointer and %array declarations.
 +ac_cv_prog_lex_yytext_pointer=no
 +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
 +ac_save_LIBS=$LIBS
 +LIBS="$LIBS $LEXLIB"
  cat >conftest.$ac_ext <<_ACEOF
- `cat $LEX_OUTPUT_ROOT.c`
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ /* 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
+ char dlopen ();
+ int
+ main ()
+ {
+ return dlopen ();
+   ;
+   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
-   ac_cv_prog_lex_yytext_pointer=yes
+   (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_lib_svld_dlopen=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_exeext conftest.$ac_ext
- LIBS=$ac_save_LIBS
- rm -f "${LEX_OUTPUT_ROOT}.c"
- fi
- echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
- echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
- if test $ac_cv_prog_lex_yytext_pointer = yes; then
- cat >>confdefs.h <<\_ACEOF
- #define YYTEXT_POINTER 1
- _ACEOF
+       ac_cv_lib_svld_dlopen=no
  fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
- if test "$LEX" = :; then
-   LEX=${am_missing_run}flex
- fi
- 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 "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+ echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
+ if test $ac_cv_lib_svld_dlopen = yes; then
+   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+ else
+   { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+ echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_dld_dld_link+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-ldld  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 +  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>
  
+ /* 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
+ char dld_link ();
  int
  main ()
  {
+ return dld_link ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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_lib_dld_dld_link=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_header_stdc=no
+       ac_cv_lib_dld_dld_link=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+ echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
+ if test $ac_cv_lib_dld_dld_link = yes; then
+   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
  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
-   :
+ fi
+     ;;
+   esac
+   if test "x$lt_cv_dlopen" != xno; then
+     enable_dlopen=yes
+   else
+     enable_dlopen=no
+   fi
+   case $lt_cv_dlopen in
+   dlopen)
+     save_CPPFLAGS="$CPPFLAGS"
+     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+     save_LDFLAGS="$LDFLAGS"
+     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+     save_LIBS="$LIBS"
+     LIBS="$lt_cv_dlopen_libs $LIBS"
+     { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+ echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
+ if test "${lt_cv_dlopen_self+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 <ctype.h>
- #if ((' ' & 0x0FF) == 0x020)
- # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+         if test "$cross_compiling" = yes; then :
+   lt_cv_dlopen_self=cross
+ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<EOF
+ #line 47300 "configure"
+ #include "confdefs.h"
+ #if HAVE_DLFCN_H
+ #include <dlfcn.h>
+ #endif
+ #include <stdio.h>
+ #ifdef RTLD_GLOBAL
+ #  define LT_DLGLOBAL         RTLD_GLOBAL
  #else
 -#  ifdef DL_GLOBAL
 -#    define LT_DLGLOBAL               DL_GLOBAL
 -#  else
 -#    define LT_DLGLOBAL               0
 -#  endif
 -#endif
 -
 -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 -   find out it does not work in some platform. */
 -#ifndef LT_DLLAZY_OR_NOW
 -#  ifdef RTLD_LAZY
 -#    define LT_DLLAZY_OR_NOW          RTLD_LAZY
 -#  else
 -#    ifdef DL_LAZY
 -#      define LT_DLLAZY_OR_NOW                DL_LAZY
 -#    else
 -#      ifdef RTLD_NOW
 -#        define LT_DLLAZY_OR_NOW      RTLD_NOW
 -#      else
 -#        ifdef DL_NOW
 -#          define LT_DLLAZY_OR_NOW    DL_NOW
 -#        else
 -#          define LT_DLLAZY_OR_NOW    0
 -#        endif
 -#      endif
 -#    endif
 -#  endif
 -#endif
 -
 -#ifdef __cplusplus
 -extern "C" void exit (int);
 +# define ISLOWER(c) \
 +                 (('a' <= (c) && (c) <= 'i') \
 +                   || ('j' <= (c) && (c) <= 'r') \
 +                   || ('s' <= (c) && (c) <= 'z'))
 +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
  #endif
  
 -void fnord() { int i=42;}
 -int main ()
 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 +int
 +main ()
  {
 -  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 -  int status = $lt_dlunknown;
 -
 -  if (self)
 -    {
 -      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 -      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 -      /* dlclose (self); */
 -    }
 -
 -    exit (status);
 +  int i;
 +  for (i = 0; i < 256; i++)
 +    if (XOR (islower (i), ISLOWER (i))
 +      || toupper (i) != TOUPPER (i))
 +      exit(2);
 +  exit (0);
  }
 -EOF
 -  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 +_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
+   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+     (./conftest; exit; ) >&5 2>/dev/null
+     lt_status=$?
+     case x$lt_status in
+       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+     esac
+   else :
+     # compilation failed
+     lt_cv_dlopen_self=no
+   fi
+ fi
 -rm -fr conftest*
 -
 -
++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+ echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
+     if test "x$lt_cv_dlopen_self" = xyes; then
+       LDFLAGS="$LDFLAGS $link_static_flag"
+       { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+ echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
+ if test "${lt_cv_dlopen_self_static+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+         if test "$cross_compiling" = yes; then :
+   lt_cv_dlopen_self_static=cross
+ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<EOF
+ #line 47398 "configure"
+ #include "confdefs.h"
+ #if HAVE_DLFCN_H
+ #include <dlfcn.h>
+ #endif
+ #include <stdio.h>
+ #ifdef RTLD_GLOBAL
+ #  define LT_DLGLOBAL         RTLD_GLOBAL
+ #else
+ #  ifdef DL_GLOBAL
+ #    define LT_DLGLOBAL               DL_GLOBAL
+ #  else
+ #    define LT_DLGLOBAL               0
+ #  endif
+ #endif
+ /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+    find out it does not work in some platform. */
+ #ifndef LT_DLLAZY_OR_NOW
+ #  ifdef RTLD_LAZY
+ #    define LT_DLLAZY_OR_NOW          RTLD_LAZY
+ #  else
+ #    ifdef DL_LAZY
+ #      define LT_DLLAZY_OR_NOW                DL_LAZY
+ #    else
+ #      ifdef RTLD_NOW
+ #        define LT_DLLAZY_OR_NOW      RTLD_NOW
+ #      else
+ #        ifdef DL_NOW
+ #          define LT_DLLAZY_OR_NOW    DL_NOW
+ #        else
+ #          define LT_DLLAZY_OR_NOW    0
+ #        endif
+ #      endif
+ #    endif
+ #  endif
+ #endif
+ #ifdef __cplusplus
+ extern "C" void exit (int);
+ #endif
+ void fnord() { int i=42;}
+ int main ()
+ {
+   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+   int status = $lt_dlunknown;
+   if (self)
+     {
+       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+       /* dlclose (self); */
+     }
+     exit (status);
+ }
+ EOF
+   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); } && test -s conftest${ac_exeext} 2>/dev/null; then
+     (./conftest; exit; ) >&5 2>/dev/null
+     lt_status=$?
+     case x$lt_status in
+       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+     esac
+   else :
+     # compilation failed
+     lt_cv_dlopen_self_static=no
+   fi
  fi
 -rm -fr conftest*
 -
 -
  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
{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
+     fi
  
 -    CPPFLAGS="$save_CPPFLAGS"
 -    LDFLAGS="$save_LDFLAGS"
 -    LIBS="$save_LIBS"
 -    ;;
 -  esac
 -
 -  case $lt_cv_dlopen_self in
 -  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 -  *) enable_dlopen_self=unknown ;;
 -  esac
 +cat >>confdefs.h <<\_ACEOF
 +#define STDC_HEADERS 1
 +_ACEOF
  
 -  case $lt_cv_dlopen_self_static in
 -  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 -  *) enable_dlopen_self_static=unknown ;;
 -  esac
  fi
  
  
 -# The else clause should only fire when bootstrapping the
 -# libtool distribution, otherwise you forgot to ship ltmain.sh
 -# with your package, and you will get complaints that there are
 -# no rules to generate ltmain.sh.
 -if test -f "$ltmain"; then
 -  # See if we are running on zsh, and set the options which allow our commands through
 -  # without removal of \ escapes.
 -  if test -n "${ZSH_VERSION+set}" ; then
 -    setopt NO_GLOB_SUBST
 -  fi
 -  # Now quote all the things that may contain metacharacters while being
 -  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 -  # variables and quote the copies for generation of the libtool script.
 -  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
 -    SED SHELL STRIP \
 -    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 -    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 -    deplibs_check_method reload_flag reload_cmds need_locks \
 -    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 -    lt_cv_sys_global_symbol_to_c_name_address \
 -    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 -    old_postinstall_cmds old_postuninstall_cmds \
 -    compiler_GCJ \
 -    CC_GCJ \
 -    LD_GCJ \
 -    lt_prog_compiler_wl_GCJ \
 -    lt_prog_compiler_pic_GCJ \
 -    lt_prog_compiler_static_GCJ \
 -    lt_prog_compiler_no_builtin_flag_GCJ \
 -    export_dynamic_flag_spec_GCJ \
 -    thread_safe_flag_spec_GCJ \
 -    whole_archive_flag_spec_GCJ \
 -    enable_shared_with_static_runtimes_GCJ \
 -    old_archive_cmds_GCJ \
 -    old_archive_from_new_cmds_GCJ \
 -    predep_objects_GCJ \
 -    postdep_objects_GCJ \
 -    predeps_GCJ \
 -    postdeps_GCJ \
 -    compiler_lib_search_path_GCJ \
 -    archive_cmds_GCJ \
 -    archive_expsym_cmds_GCJ \
 -    postinstall_cmds_GCJ \
 -    postuninstall_cmds_GCJ \
 -    old_archive_from_expsyms_cmds_GCJ \
 -    allow_undefined_flag_GCJ \
 -    no_undefined_flag_GCJ \
 -    export_symbols_cmds_GCJ \
 -    hardcode_libdir_flag_spec_GCJ \
 -    hardcode_libdir_flag_spec_ld_GCJ \
 -    hardcode_libdir_separator_GCJ \
 -    hardcode_automatic_GCJ \
 -    module_cmds_GCJ \
 -    module_expsym_cmds_GCJ \
 -    lt_cv_prog_compiler_c_o_GCJ \
 -    exclude_expsyms_GCJ \
 -    include_expsyms_GCJ; do
  
 -    case $var in
 -    old_archive_cmds_GCJ | \
 -    old_archive_from_new_cmds_GCJ | \
 -    archive_cmds_GCJ | \
 -    archive_expsym_cmds_GCJ | \
 -    module_cmds_GCJ | \
 -    module_expsym_cmds_GCJ | \
 -    old_archive_from_expsyms_cmds_GCJ | \
 -    export_symbols_cmds_GCJ | \
 -    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 -    postinstall_cmds | postuninstall_cmds | \
 -    old_postinstall_cmds | old_postuninstall_cmds | \
 -    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 -      # Double-quote double-evaled strings.
 -      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 -      ;;
 -    *)
 -      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 -      ;;
 -    esac
 -  done
 +echo "$as_me:$LINENO: checking for socklen_t" >&5
 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
 +if test "${ac_cv_type_socklen_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.  */
 +#include <sys/types.h>
 +#if STDC_HEADERS
 +#include <stdlib.h>
 +#include <stddef.h>
 +#endif
 +#include <sys/socket.h>
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
 +  ac_cv_type_socklen_t=yes
 +else
 +  ac_cv_type_socklen_t=no
 +fi
 +rm -f conftest*
  
 -  case $lt_echo in
 -  *'\$0 --fallback-echo"')
 -    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
 -    ;;
 -  esac
 +fi
 +echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
 +echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
 +if test "x$ac_cv_type_socklen_t" = xno; then
  
 -cfgfile="$ofile"
 +cat >>confdefs.h <<\_ACEOF
 +#define socklen_t int
 +_ACEOF
  
 -  cat <<__EOF__ >> "$cfgfile"
 -# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 +fi
  
 -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 +echo "$as_me:$LINENO: checking for sa_family_t" >&5
 +echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6
 +if test "${ac_cv_type_sa_family_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.  */
 +#include <sys/types.h>
 +#if STDC_HEADERS
 +#include <stdlib.h>
 +#include <stddef.h>
 +#endif
 +#include <sys/socket.h>
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "(^|[^a-zA-Z_0-9])sa_family_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
 +  ac_cv_type_sa_family_t=yes
 +else
 +  ac_cv_type_sa_family_t=no
 +fi
 +rm -f conftest*
  
 -# Shell to use when invoking shell scripts.
 -SHELL=$lt_SHELL
 +fi
 +echo "$as_me:$LINENO: result: $ac_cv_type_sa_family_t" >&5
 +echo "${ECHO_T}$ac_cv_type_sa_family_t" >&6
 +if test "x$ac_cv_type_sa_family_t" = xno; then
  
 -# Whether or not to build shared libraries.
 -build_libtool_libs=$enable_shared
 +cat >>confdefs.h <<\_ACEOF
 +#define sa_family_t unsigned short
 +_ACEOF
  
 -# Whether or not to build static libraries.
 -build_old_libs=$enable_static
 +fi
  
 -# Whether or not to add -lc for building shared libraries.
 -build_libtool_need_lc=$archive_cmds_need_lc_GCJ
  
 -# Whether or not to disallow shared libs when runtime libs are static
 -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
  
 -# Whether or not to optimize for fast installation.
 -fast_install=$enable_fast_install
  
+ # The host system.
+ host_alias=$host_alias
+ host=$host
+ host_os=$host_os
  
+ # The build system.
+ build_alias=$build_alias
+ build=$build
+ build_os=$build_os
  
 -# An echo program that does not interpret backslashes.
 -echo=$lt_echo
  
 -# The archiver.
 -AR=$lt_AR
 -AR_FLAGS=$lt_AR_FLAGS
 +ac_header_dirent=no
 +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
 +  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
 +echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $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.  */
 +#include <sys/types.h>
 +#include <$ac_hdr>
  
 -# A C compiler.
 -LTCC=$lt_LTCC
 +int
 +main ()
 +{
 +if ((DIR *) 0)
 +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
 +  eval "$as_ac_Header=yes"
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -# A language-specific compiler.
 -CC=$lt_compiler_GCJ
 +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_hdr" | $as_tr_cpp` 1
 +_ACEOF
  
 -# Is the compiler the GNU C compiler?
 -with_gcc=$GCC_GCJ
 +ac_header_dirent=$ac_hdr; break
 +fi
  
 -# An ERE matcher.
 -EGREP=$lt_EGREP
 +done
 +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 +if test $ac_header_dirent = dirent.h; then
 +  echo "$as_me:$LINENO: checking for library containing opendir" >&5
 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
 +if test "${ac_cv_search_opendir+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +  ac_func_search_save_LIBS=$LIBS
 +ac_cv_search_opendir=no
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
  
 -# The linker used to build libraries.
 -LD=$lt_LD_GCJ
 +/* 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 opendir ();
 +int
 +main ()
 +{
 +opendir ();
 +  ;
 +  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_search_opendir="none required"
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -# Whether we need hard or soft links.
 -LN_S=$lt_LN_S
 +fi
 +rm -f conftest.err conftest.$ac_objext \
 +      conftest$ac_exeext conftest.$ac_ext
 +if test "$ac_cv_search_opendir" = no; then
 +  for ac_lib in dir; do
 +    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 +    cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
  
 -# A BSD-compatible nm program.
 -NM=$lt_NM
 +/* 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 opendir ();
 +int
 +main ()
 +{
 +opendir ();
 +  ;
 +  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_search_opendir="-l$ac_lib"
 +break
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -# A symbol stripping program
 -STRIP=$lt_STRIP
 +fi
 +rm -f conftest.err conftest.$ac_objext \
 +      conftest$ac_exeext conftest.$ac_ext
 +  done
 +fi
 +LIBS=$ac_func_search_save_LIBS
 +fi
 +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
 +echo "${ECHO_T}$ac_cv_search_opendir" >&6
 +if test "$ac_cv_search_opendir" != no; then
 +  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
  
 -# Used to examine libraries when file_magic_cmd begins "file"
 -MAGIC_CMD=$MAGIC_CMD
 +fi
  
 -# Used on cygwin: DLL creation program.
 -DLLTOOL="$DLLTOOL"
 +else
 +  echo "$as_me:$LINENO: checking for library containing opendir" >&5
 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
 +if test "${ac_cv_search_opendir+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +  ac_func_search_save_LIBS=$LIBS
 +ac_cv_search_opendir=no
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
  
 -# Used on cygwin: object dumper.
 -OBJDUMP="$OBJDUMP"
 +/* 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 opendir ();
 +int
 +main ()
 +{
 +opendir ();
 +  ;
 +  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_search_opendir="none required"
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -# Used on cygwin: assembler.
 -AS="$AS"
 +fi
 +rm -f conftest.err conftest.$ac_objext \
 +      conftest$ac_exeext conftest.$ac_ext
 +if test "$ac_cv_search_opendir" = no; then
 +  for ac_lib in x; do
 +    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 +    cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
  
 -# The name of the directory that contains temporary libtool files.
 -objdir=$objdir
 +/* 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 opendir ();
 +int
 +main ()
 +{
 +opendir ();
 +  ;
 +  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_search_opendir="-l$ac_lib"
 +break
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -# How to create reloadable object files.
 -reload_flag=$lt_reload_flag
 -reload_cmds=$lt_reload_cmds
 +fi
 +rm -f conftest.err conftest.$ac_objext \
 +      conftest$ac_exeext conftest.$ac_ext
 +  done
 +fi
 +LIBS=$ac_func_search_save_LIBS
 +fi
 +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
 +echo "${ECHO_T}$ac_cv_search_opendir" >&6
 +if test "$ac_cv_search_opendir" != no; then
 +  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
  
- fi
+ # How to pass a linker flag through the compiler.
+ wl=$lt_lt_prog_compiler_wl_GCJ
  
 -# Object file suffix (normally "o").
 -objext="$ac_objext"
 +fi
  
 -# Old archive suffix (normally "a").
 -libext="$libext"
  
 -# Shared library suffix (normally ".so").
 -shrext_cmds='$shrext_cmds'
  
 -# Executable file suffix (normally "").
 -exeext="$exeext"
  
+ # Additional compiler flags for building library objects.
+ pic_flag=$lt_lt_prog_compiler_pic_GCJ
+ pic_mode=$pic_mode
  
 -# What is the maximum length of a command?
 -max_cmd_len=$lt_cv_sys_max_cmd_len
 +for ac_header in sys/wait.h wait.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
+ # Does compiler simultaneously support -c and -o options?
+ compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
  
- # 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
+ # Must we lock files when doing compilation?
+ need_locks=$lt_need_locks
  
 -# Do we need the lib prefix for modules?
 -need_lib_prefix=$need_lib_prefix
 +  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
  
 -# Do we need a version for libraries?
 -need_version=$need_version
 +# 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 the AC_PACKAGE_NAME lists.  ##
 +## ------------------------------------------ ##
 +_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
  
 -# Whether dlopen is supported.
 -dlopen_support=$enable_dlopen
 +fi
 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
 +  cat >>confdefs.h <<_ACEOF
 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
  
 -# Whether dlopen of programs is supported.
 -dlopen_self=$enable_dlopen_self
 +fi
  
 -# Whether dlopen of statically linked programs is supported.
 -dlopen_self_static=$enable_dlopen_self_static
 +done
  
- echo "$as_me:$LINENO: checking whether wait uses union wait" >&5
- echo $ECHO_N "checking whether wait uses union wait... $ECHO_C" >&6
- if test "${cf_cv_arg_union_wait+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.  */
+ # Compiler flag to prevent dynamic linking.
+ link_static_flag=$lt_lt_prog_compiler_static_GCJ
  
- #include <sys/types.h>
+ # Compiler flag to turn off builtin functions.
+ no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
  
- #if HAVE_SYS_WAIT_H
- # include <sys/wait.h>
- #else
- # if HAVE_WAIT_H
- #  include <wait.h>
- # endif
- #endif
+ # Compiler flag to allow reflexive dlopens.
+ export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
  
- #ifdef __STDC__
- pid_t wait(union wait *);
- #endif
+ # Compiler flag to generate shared objects directly from archives.
+ whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
  
- int
- main ()
- {
+ # Compiler flag to generate thread-safe objects.
+ thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
  
 -# Library versioning type.
 -version_type=$version_type
 +  union wait x; int i;
 +  wait(&x); i = WIFEXITED(x)
  
 -# Format of library name prefix.
 -libname_spec=$lt_libname_spec
 +  ;
 +  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
 +  cf_cv_arg_union_wait=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 -# List of archive names.  First name is the real one, the rest are links.
 -# The last name is the one that the linker finds with -lNAME.
 -library_names_spec=$lt_library_names_spec
 +cf_cv_arg_union_wait=no
 +fi
 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
 +echo "$as_me:$LINENO: result: $cf_cv_arg_union_wait" >&5
 +echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
 +if test $cf_cv_arg_union_wait = yes; then
  
 -# The coded name of the library, if different from the real name.
 -soname_spec=$lt_soname_spec
 +cat >>confdefs.h <<\_ACEOF
 +#define WAIT_USES_UNION 1
 +_ACEOF
  
- fi
- for ac_header in sys/wait.h wait.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 the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _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
- echo "$as_me:$LINENO: checking whether wait uses int" >&5
- echo $ECHO_N "checking whether wait uses int... $ECHO_C" >&6
- if test "${cf_cv_arg_int+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 <sys/types.h>
- #if HAVE_SYS_WAIT_H
- # include <sys/wait.h>
- #else
- # if HAVE_WAIT_H
- #  include <wait.h>
- # endif
- #endif
- #ifdef __STDC__
- pid_t wait(int *);
- #endif
- int
- main ()
- {
-   int x; int i;
-   wait(&x); i = WIFEXITED(x)
-   ;
-   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
-   cf_cv_arg_int=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- cf_cv_arg_int=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $cf_cv_arg_int" >&5
- echo "${ECHO_T}$cf_cv_arg_int" >&6
- if test $cf_cv_arg_int = yes; then
- cat >>confdefs.h <<\_ACEOF
- #define WAIT_USES_INT 1
- _ACEOF
- fi
- echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
- echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
- if test "${ac_cv_header_time+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 <sys/types.h>
- #include <sys/time.h>
- #include <time.h>
- int
- main ()
- {
- if ((struct tm *) 0)
- 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_header_time=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_header_time=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
- echo "${ECHO_T}$ac_cv_header_time" >&6
- if test $ac_cv_header_time = yes; then
- cat >>confdefs.h <<\_ACEOF
- #define TIME_WITH_SYS_TIME 1
- _ACEOF
- fi
+ # Commands used to build and install an old-style archive.
+ RANLIB=$lt_RANLIB
+ old_archive_cmds=$lt_old_archive_cmds_GCJ
+ old_postinstall_cmds=$lt_old_postinstall_cmds
+ old_postuninstall_cmds=$lt_old_postuninstall_cmds
  
+ # Create an old-style archive from a shared archive.
+ old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
  
+ # Create a temporary old-style archive to link instead of a shared archive.
+ old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
  
- for ac_header in \
-       arpa/inet.h \
-       camlib.h \
-       cam/cam.h \
-       cam/scsi/scsi_message.h \
-       chio.h \
-       db.h \
-       dbm.h \
-       fcntl.h \
-       fnmatch.h \
-       fstab.h \
-       grp.h \
-       history.h \
-       libc.h \
-       libgen.h \
-       limits.h \
-       linux/zftape.h \
-       math.h \
-       mntent.h \
-       mnttab.h \
-       ndbm.h \
-       netdb.h \
-       netinet/in_systm.h \
-       readline.h \
-       readline/history.h \
-       readline/readline.h \
-       scsi/sg.h \
-       scsi/scsi_ioctl.h \
-       stdarg.h \
-       stdlib.h \
-       string.h \
-       strings.h \
-       sys/chio.h \
-       sys/dsreq.h \
-       sys/fcntl.h \
-       sys/file.h \
-       sys/ioctl.h \
-       sys/ipc.h \
-       sys/mman.h \
-       sys/mntent.h \
-       sys/mtio.h \
-       sys/param.h \
-       sys/scarray.h \
-       sys/gscdds.h \
-       sys/scsiio.h \
-       sys/scsi.h \
-       sys/scsi/impl/uscsi.h \
-       sys/scsi/scsi/ioctl.h \
-       sys/select.h \
-       sys/shm.h \
-       sys/stat.h \
-       sys/statfs.h \
-       sys/statvfs.h \
-       sys/tape.h \
-       sys/time.h \
-       sys/types.h \
-       sys/uio.h \
-       sys/vfs.h \
-       sys/vfstab.h \
-       syslog.h \
-       unistd.h \
-       vtblc.h \
+ # Commands used to build and install a shared archive.
+ archive_cmds=$lt_archive_cmds_GCJ
+ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+ postinstall_cmds=$lt_postinstall_cmds
+ postuninstall_cmds=$lt_postuninstall_cmds
+ # Commands used to build a loadable module (assumed same as above if empty)
+ module_cmds=$lt_module_cmds_GCJ
+ module_expsym_cmds=$lt_module_expsym_cmds_GCJ
  
 -# Commands to strip libraries.
 -old_striplib=$lt_old_striplib
 -striplib=$lt_striplib
++for ac_header in sys/wait.h wait.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
+ # Dependencies to place before the objects being linked to create a
+ # shared library.
+ predep_objects=$lt_predep_objects_GCJ
  
- # 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
+ # Dependencies to place after the objects being linked to create a
+ # shared library.
+ postdep_objects=$lt_postdep_objects_GCJ
  
-   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
+ # Dependencies to place before the objects being linked to create a
+ # shared library.
+ predeps=$lt_predeps_GCJ
  
- # 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 the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _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
+ # Dependencies to place after the objects being linked to create a
+ # shared library.
+ postdeps=$lt_postdeps_GCJ
  
- fi
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+ # The library search path used internally by the compiler when linking
+ # a shared library.
+ compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
  
 -# Method to check whether dependent libraries are shared objects.
 -deplibs_check_method=$lt_deplibs_check_method
 +fi
  
 -# Command to use when deplibs_check_method == file_magic.
 -file_magic_cmd=$lt_file_magic_cmd
 +done
  
+ # Flag that allows shared libraries with undefined symbols to be built.
+ allow_undefined_flag=$lt_allow_undefined_flag_GCJ
  
+ # Flag that forces no undefined symbols.
+ no_undefined_flag=$lt_no_undefined_flag_GCJ
  
- for ac_header in netinet/ip.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.  */
- #include <sys/socket.h>
- #if HAVE_SYS_TYPES_H
- #include <sys/types.h>
 -# Commands used to finish a libtool library installation in a directory.
 -finish_cmds=$lt_finish_cmds
++#if HAVE_SYS_WAIT_H
++# include <sys/wait.h>
++#else
++# if HAVE_WAIT_H
++#  include <wait.h>
++# endif
 +#endif
- #ifdef HAVE_NETINET_IN_SYSTM_H
- #include <netinet/in_systm.h>
 -# Same as above, but a single script fragment to be evaled but not shown.
 -finish_eval=$lt_finish_eval
++#ifdef __STDC__
++pid_t wait(int *);
 +#endif
- #include <netinet/in.h>
  
 -# Take the output of nm and produce a listing of raw symbols and C names.
 -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
++int
++main ()
++{
  
- #include <$ac_header>
 -# Transform the output of nm in a proper C declaration
 -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
++  int x; int i;
++  wait(&x); i = WIFEXITED(x)
 -# Transform the output of nm in a C name address pair
 -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
++  ;
++  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
-   eval "$as_ac_Header=yes"
++  cf_cv_arg_int=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_Header=no"
 -# This is the shared library runtime path variable.
 -runpath_var=$runpath_var
++cf_cv_arg_int=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
++echo "$as_me:$LINENO: result: $cf_cv_arg_int" >&5
++echo "${ECHO_T}$cf_cv_arg_int" >&6
++if test $cf_cv_arg_int = yes; then
 -# This is the shared library path variable.
 -shlibpath_var=$shlibpath_var
++cat >>confdefs.h <<\_ACEOF
++#define WAIT_USES_INT 1
 +_ACEOF
  
 -# Is shlibpath searched before the hard-coded library search path?
 -shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 +fi
  
- done
- for ac_header in sys/mount.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.  */
- #ifdef HAVE_SYS_PARAM_H
- #include <sys/param.h>
- #endif
+ # How to hardcode a shared library path into an executable.
+ hardcode_action=$hardcode_action_GCJ
  
- #include <$ac_header>
 -# Whether we should hardcode library paths into libraries.
 -hardcode_into_libs=$hardcode_into_libs
++int
++main ()
++{
++if ((struct tm *) 0)
++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
-   eval "$as_ac_Header=yes"
++  ac_cv_header_time=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
+ # Flag to hardcode \$libdir into a binary during linking.
+ # This must work even if \$libdir does not exist.
+ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
+ # If ld is used when linking, flag to hardcode \$libdir into
+ # a binary during linking. This must work even if \$libdir does
+ # not exist.
+ hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+ # Whether we need a single -rpath flag with a separated argument.
+ hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+ # resulting binary.
+ hardcode_direct=$hardcode_direct_GCJ
+ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+ # resulting binary.
+ hardcode_minus_L=$hardcode_minus_L_GCJ
+ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+ # the resulting binary.
+ hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+ # Set to yes if building a shared library automatically hardcodes DIR into the library
+ # and all subsequent libraries and executables linked against it.
+ hardcode_automatic=$hardcode_automatic_GCJ
 -# Variables whose values should be saved in libtool wrapper scripts and
 -# restored at relink time.
 -variables_saved_for_relink="$variables_saved_for_relink"
+ # Whether libtool must link a program against all its dependency libraries.
+ link_all_deplibs=$link_all_deplibs_GCJ
 -# Compile-time system search path for libraries
 -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 -# Run-time system search path for libraries
 -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+ # Fix the shell variable \$srcfile for the compiler.
+ fix_srcfile_path="$fix_srcfile_path_GCJ"
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols_GCJ
+ # The commands to list exported symbols.
+ export_symbols_cmds=$lt_export_symbols_cmds_GCJ
 -# The commands to extract the exported symbol list from a shared archive.
 -extract_expsyms_cmds=$lt_extract_expsyms_cmds
+ # Symbols that should not be listed in the preloaded symbols.
+ exclude_expsyms=$lt_exclude_expsyms_GCJ
+ # Symbols that must always be exported.
+ include_expsyms=$lt_include_expsyms_GCJ
 -# ### END LIBTOOL TAG CONFIG: $tagname
 -__EOF__
 -else
 -  # If there is no Makefile yet, we rely on a make rule to execute
 -  # `config.status --recheck' to rerun these tests and create the
 -  # libtool script then.
 -  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 -  if test -f "$ltmain_in"; then
 -    test -f Makefile && make "$ltmain"
 -  fi
 -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
 -CC="$lt_save_CC"
+       else
+         tagname=""
+       fi
+       ;;
+       RC)
+ # Source file extension for RC test sources.
+ ac_ext=rc
+ # Object file extension for compiled RC test sources.
+ objext=o
+ objext_RC=$objext
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="$lt_simple_compile_test_code"
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ # If no C compiler was specified, use CC.
+ LTCC=${LTCC-"$CC"}
+ # Allow CC to be a program name with arguments.
+ compiler=$CC
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+ printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+ _lt_compiler_boilerplate=`cat conftest.err`
+ $rm conftest*
+ ac_outfile=conftest.$ac_objext
+ printf "$lt_simple_link_test_code" >conftest.$ac_ext
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
+ _lt_linker_boilerplate=`cat conftest.err`
+ $rm conftest*
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ CC=${RC-"windres"}
+ compiler=$CC
+ compiler_RC=$CC
+ for cc_temp in $compiler""; do
+   case $cc_temp in
+     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+     \-*) ;;
+     *) break;;
+   esac
+ done
+ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+ lt_cv_prog_compiler_c_o_RC=yes
+ # The else clause should only fire when bootstrapping the
+ # libtool distribution, otherwise you forgot to ship ltmain.sh
+ # with your package, and you will get complaints that there are
+ # no rules to generate ltmain.sh.
+ if test -f "$ltmain"; then
+   # See if we are running on zsh, and set the options which allow our commands through
+   # without removal of \ escapes.
+   if test -n "${ZSH_VERSION+set}" ; then
+     setopt NO_GLOB_SUBST
+   fi
+   # Now quote all the things that may contain metacharacters while being
+   # careful not to overquote the AC_SUBSTed values.  We take copies of the
+   # variables and quote the copies for generation of the libtool script.
+   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+     SED SHELL STRIP \
+     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+     deplibs_check_method reload_flag reload_cmds need_locks \
+     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+     lt_cv_sys_global_symbol_to_c_name_address \
+     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+     old_postinstall_cmds old_postuninstall_cmds \
+     compiler_RC \
+     CC_RC \
+     LD_RC \
+     lt_prog_compiler_wl_RC \
+     lt_prog_compiler_pic_RC \
+     lt_prog_compiler_static_RC \
+     lt_prog_compiler_no_builtin_flag_RC \
+     export_dynamic_flag_spec_RC \
+     thread_safe_flag_spec_RC \
+     whole_archive_flag_spec_RC \
+     enable_shared_with_static_runtimes_RC \
+     old_archive_cmds_RC \
+     old_archive_from_new_cmds_RC \
+     predep_objects_RC \
+     postdep_objects_RC \
+     predeps_RC \
+     postdeps_RC \
+     compiler_lib_search_path_RC \
+     archive_cmds_RC \
+     archive_expsym_cmds_RC \
+     postinstall_cmds_RC \
+     postuninstall_cmds_RC \
+     old_archive_from_expsyms_cmds_RC \
+     allow_undefined_flag_RC \
+     no_undefined_flag_RC \
+     export_symbols_cmds_RC \
+     hardcode_libdir_flag_spec_RC \
+     hardcode_libdir_flag_spec_ld_RC \
+     hardcode_libdir_separator_RC \
+     hardcode_automatic_RC \
+     module_cmds_RC \
+     module_expsym_cmds_RC \
+     lt_cv_prog_compiler_c_o_RC \
+     exclude_expsyms_RC \
+     include_expsyms_RC; do
+     case $var in
+     old_archive_cmds_RC | \
+     old_archive_from_new_cmds_RC | \
+     archive_cmds_RC | \
+     archive_expsym_cmds_RC | \
+     module_cmds_RC | \
+     module_expsym_cmds_RC | \
+     old_archive_from_expsyms_cmds_RC | \
+     export_symbols_cmds_RC | \
+     extract_expsyms_cmds | reload_cmds | finish_cmds | \
+     postinstall_cmds | postuninstall_cmds | \
+     old_postinstall_cmds | old_postuninstall_cmds | \
+     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+       # Double-quote double-evaled strings.
+       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+       ;;
+     *)
+       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+       ;;
+     esac
+   done
+   case $lt_echo in
+   *'\$0 --fallback-echo"')
+     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+     ;;
+   esac
+ cfgfile="$ofile"
+   cat <<__EOF__ >> "$cfgfile"
+ # ### BEGIN LIBTOOL TAG CONFIG: $tagname
+ # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+ # Shell to use when invoking shell scripts.
+ SHELL=$lt_SHELL
+ # Whether or not to build shared libraries.
+ build_libtool_libs=$enable_shared
+ # Whether or not to build static libraries.
+ build_old_libs=$enable_static
+ # Whether or not to add -lc for building shared libraries.
+ build_libtool_need_lc=$archive_cmds_need_lc_RC
+ # Whether or not to disallow shared libs when runtime libs are static
+ allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+ # Whether or not to optimize for fast installation.
+ fast_install=$enable_fast_install
+ # The host system.
+ host_alias=$host_alias
+ host=$host
+ host_os=$host_os
+ # The build system.
+ build_alias=$build_alias
+ build=$build
+ build_os=$build_os
+ # An echo program that does not interpret backslashes.
+ echo=$lt_echo
+ # The archiver.
+ AR=$lt_AR
+ AR_FLAGS=$lt_AR_FLAGS
+ # A C compiler.
+ LTCC=$lt_LTCC
+ # A language-specific compiler.
+ CC=$lt_compiler_RC
+ # Is the compiler the GNU C compiler?
+ with_gcc=$GCC_RC
+ # An ERE matcher.
+ EGREP=$lt_EGREP
+ # The linker used to build libraries.
+ LD=$lt_LD_RC
+ # Whether we need hard or soft links.
+ LN_S=$lt_LN_S
+ # A BSD-compatible nm program.
+ NM=$lt_NM
+ # A symbol stripping program
+ STRIP=$lt_STRIP
+ # Used to examine libraries when file_magic_cmd begins "file"
+ MAGIC_CMD=$MAGIC_CMD
+ # Used on cygwin: DLL creation program.
+ DLLTOOL="$DLLTOOL"
+ # Used on cygwin: object dumper.
+ OBJDUMP="$OBJDUMP"
+ # Used on cygwin: assembler.
+ AS="$AS"
+ # The name of the directory that contains temporary libtool files.
+ objdir=$objdir
+ # How to create reloadable object files.
+ reload_flag=$lt_reload_flag
+ reload_cmds=$lt_reload_cmds
+ # How to pass a linker flag through the compiler.
+ wl=$lt_lt_prog_compiler_wl_RC
+ # Object file suffix (normally "o").
+ objext="$ac_objext"
+ # Old archive suffix (normally "a").
+ libext="$libext"
+ # Shared library suffix (normally ".so").
+ shrext_cmds='$shrext_cmds'
+ # Executable file suffix (normally "").
+ exeext="$exeext"
+ # Additional compiler flags for building library objects.
+ pic_flag=$lt_lt_prog_compiler_pic_RC
+ pic_mode=$pic_mode
+ # What is the maximum length of a command?
+ max_cmd_len=$lt_cv_sys_max_cmd_len
+ # Does compiler simultaneously support -c and -o options?
+ compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+ # Must we lock files when doing compilation?
+ need_locks=$lt_need_locks
  
- fi
+ # Do we need the lib prefix for modules?
+ need_lib_prefix=$need_lib_prefix
  
- done
+ # Do we need a version for libraries?
+ need_version=$need_version
  
+ # Whether dlopen is supported.
+ dlopen_support=$enable_dlopen
  
- NO_SCSI_CHANGER_MODE=true
- NO_CHIO_CHANGER_MODE=true
+ # Whether dlopen of programs is supported.
+ dlopen_self=$enable_dlopen_self
  
- 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
-   # See if sys/param.h defines the BYTE_ORDER macro.
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <sys/types.h>
- #include <sys/param.h>
+ # Whether dlopen of statically linked programs is supported.
+ dlopen_self_static=$enable_dlopen_self_static
  
- int
- main ()
- {
- #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
-  bogus endian macros
- #endif
+ # Compiler flag to prevent dynamic linking.
+ link_static_flag=$lt_lt_prog_compiler_static_RC
  
-   ;
-   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
-   # It does; now see whether it defined to BIG_ENDIAN or not.
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <sys/types.h>
- #include <sys/param.h>
+ # Compiler flag to turn off builtin functions.
+ no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
  
- int
- main ()
- {
- #if BYTE_ORDER != BIG_ENDIAN
-  not big endian
- #endif
+ # Compiler flag to allow reflexive dlopens.
+ export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
  
-   ;
-   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_c_bigendian=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ # Compiler flag to generate shared objects directly from archives.
+ whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
  
- ac_cv_c_bigendian=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ # Compiler flag to generate thread-safe objects.
+ thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
  
- # 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
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- 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 };
- 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 };
- void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
- int
- main ()
- {
-  _ascii (); _ebcdic ();
-   ;
-   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
-   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
-   ac_cv_c_bigendian=yes
- fi
- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-   if test "$ac_cv_c_bigendian" = unknown; then
-     ac_cv_c_bigendian=no
-   else
-     # finding both strings is unlikely to happen, but who knows?
-     ac_cv_c_bigendian=unknown
-   fi
- fi
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ # Library versioning type.
+ version_type=$version_type
  
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- 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 ()
- {
-   /* Are we little or big endian?  From Harbison&Steele.  */
-   union
-   {
-     long l;
-     char c[sizeof (long)];
-   } u;
-   u.l = 1;
-   exit (u.c[sizeof (long) - 1] == 1);
- }
- _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_c_bigendian=no
- else
-   echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ # Format of library name prefix.
+ libname_spec=$lt_libname_spec
  
- ( 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
- fi
- fi
- rm -f 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
- case $ac_cv_c_bigendian in
-   yes)
+ # List of archive names.  First name is the real one, the rest are links.
+ # The last name is the one that the linker finds with -lNAME.
+ library_names_spec=$lt_library_names_spec
  
- cat >>confdefs.h <<\_ACEOF
- #define WORDS_BIGENDIAN 1
- _ACEOF
-  ;;
-   no)
-      ;;
-   *)
-     { { echo "$as_me:$LINENO: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&5
- echo "$as_me: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
-    { (exit 1); exit 1; }; } ;;
- esac
+ # The coded name of the library, if different from the real name.
+ soname_spec=$lt_soname_spec
  
+ # Commands used to build and install an old-style archive.
+ RANLIB=$lt_RANLIB
+ old_archive_cmds=$lt_old_archive_cmds_RC
+ old_postinstall_cmds=$lt_old_postinstall_cmds
+ old_postuninstall_cmds=$lt_old_postuninstall_cmds
  
- if test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
-     echo "$as_me:$LINENO: checking for HP/UX-like scsi changer support" >&5
- echo $ECHO_N "checking for HP/UX-like scsi changer support... $ECHO_C" >&6
- if test "${amanda_cv_hpux_scsi_chio+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.  */
+ # Create an old-style archive from a shared archive.
+ old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
  
- #include <sys/scsi.h>
+ # Create a temporary old-style archive to link instead of a shared archive.
+ old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
  
- int
- main ()
- {
+ # Commands used to build and install a shared archive.
+ archive_cmds=$lt_archive_cmds_RC
+ archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+ postinstall_cmds=$lt_postinstall_cmds
+ postuninstall_cmds=$lt_postuninstall_cmds
  
-       static struct element_addresses changer_info;
-       int i = SIOC_ELEMENT_ADDRESSES;
-       int j = SIOC_ELEMENT_STATUS;
-       int k = SIOC_MOVE_MEDIUM;
+ # Commands used to build a loadable module (assumed same as above if empty)
+ module_cmds=$lt_module_cmds_RC
+ module_expsym_cmds=$lt_module_expsym_cmds_RC
  
-   ;
-   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
-   amanda_cv_hpux_scsi_chio=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ # Commands to strip libraries.
+ old_striplib=$lt_old_striplib
+ striplib=$lt_striplib
  
- amanda_cv_hpux_scsi_chio=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_hpux_scsi_chio" >&5
- echo "${ECHO_T}$amanda_cv_hpux_scsi_chio" >&6
-     if test x"$amanda_cv_hpux_scsi_chio" = x"yes"; then
+ # Dependencies to place before the objects being linked to create a
+ # shared library.
+ predep_objects=$lt_predep_objects_RC
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_HPUX_SCSI_CHIO 1
- _ACEOF
+ # Dependencies to place after the objects being linked to create a
+ # shared library.
+ postdep_objects=$lt_postdep_objects_RC
  
-       NO_SCSI_CHANGER_MODE=false
-     fi
- fi
+ # Dependencies to place before the objects being linked to create a
+ # shared library.
+ predeps=$lt_predeps_RC
  
- if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
-    test x"$ac_cv_header_scsi_scsi_ioctl_h" = x"yes"; then
-       echo "$as_me:$LINENO: checking for Linux like scsi support (ioctl)" >&5
- echo $ECHO_N "checking for Linux like scsi support (ioctl)... $ECHO_C" >&6
- if test "${amanda_cv_linux_scsi+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.  */
+ # Dependencies to place after the objects being linked to create a
+ # shared library.
+ postdeps=$lt_postdeps_RC
  
- #include <scsi/scsi_ioctl.h>
- #include <sys/mtio.h>
+ # The library search path used internally by the compiler when linking
+ # a shared library.
+ compiler_lib_search_path=$lt_compiler_lib_search_path_RC
  
- int
- main ()
- {
+ # Method to check whether dependent libraries are shared objects.
+ deplibs_check_method=$lt_deplibs_check_method
  
-       int device;
-       char *Command;
-       ioctl(device, SCSI_IOCTL_SEND_COMMAND, Command);
+ # Command to use when deplibs_check_method == file_magic.
+ file_magic_cmd=$lt_file_magic_cmd
  
-   ;
-   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
-   amanda_cv_linux_scsi=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ # Flag that allows shared libraries with undefined symbols to be built.
+ allow_undefined_flag=$lt_allow_undefined_flag_RC
  
- amanda_cv_linux_scsi=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_linux_scsi" >&5
- echo "${ECHO_T}$amanda_cv_linux_scsi" >&6
- fi
+ # Flag that forces no undefined symbols.
+ no_undefined_flag=$lt_no_undefined_flag_RC
  
- if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
-    test x"$ac_cv_header_scsi_sg_h" = x"yes"; then
-       echo "$as_me:$LINENO: checking for Linux like scsi support (sg)" >&5
- echo $ECHO_N "checking for Linux like scsi support (sg)... $ECHO_C" >&6
- if test "${amanda_cv_linux_sg_scsi+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.  */
+ # Commands used to finish a libtool library installation in a directory.
+ finish_cmds=$lt_finish_cmds
  
- #include <sys/types.h>
- #include <scsi/sg.h>
- #include <sys/mtio.h>
+ # Same as above, but a single script fragment to be evaled but not shown.
+ finish_eval=$lt_finish_eval
  
- int
- main ()
- {
+ # Take the output of nm and produce a listing of raw symbols and C names.
+ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  
-       int device;
-       struct sg_header *psg_header;
-       char *buffer;
-       write(device, buffer, 1);
+ # Transform the output of nm in a proper C declaration
+ global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  
-   ;
-   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
-   amanda_cv_linux_sg_scsi=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ # Transform the output of nm in a C name address pair
+ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  
- amanda_cv_linux_sg_scsi=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_linux_sg_scsi" >&5
- echo "${ECHO_T}$amanda_cv_linux_sg_scsi" >&6
- fi
+ # This is the shared library runtime path variable.
+ runpath_var=$runpath_var
  
- if test x"$amanda_cv_linux_scsi" = x"yes" ||
-  test x"$amanda_cv_linux_sg_scsi" = x"yes";then
+ # This is the shared library path variable.
+ shlibpath_var=$shlibpath_var
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_LINUX_LIKE_SCSI 1
- _ACEOF
+ # Is shlibpath searched before the hard-coded library search path?
+ shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  
-       NO_SCSI_CHANGER_MODE=false
- fi
+ # How to hardcode a shared library path into an executable.
+ hardcode_action=$hardcode_action_RC
  
- if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
-    test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
-       echo "$as_me:$LINENO: checking for HP-UX like scsi support" >&5
- echo $ECHO_N "checking for HP-UX like scsi support... $ECHO_C" >&6
- if test "${amanda_cv_hpux_scsi+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.  */
+ # Whether we should hardcode library paths into libraries.
+ hardcode_into_libs=$hardcode_into_libs
  
- #include <stdio.h>
- #include <sys/ioctl.h>
- #include <sys/scsi.h>
- #include <sys/mtio.h>
+ # Flag to hardcode \$libdir into a binary during linking.
+ # This must work even if \$libdir does not exist.
+ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+ # If ld is used when linking, flag to hardcode \$libdir into
+ # a binary during linking. This must work even if \$libdir does
+ # not exist.
+ hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+ # Whether we need a single -rpath flag with a separated argument.
+ hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+ # resulting binary.
+ hardcode_direct=$hardcode_direct_RC
+ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+ # resulting binary.
+ hardcode_minus_L=$hardcode_minus_L_RC
+ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+ # the resulting binary.
+ hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+ # Set to yes if building a shared library automatically hardcodes DIR into the library
+ # and all subsequent libraries and executables linked against it.
+ hardcode_automatic=$hardcode_automatic_RC
+ # Variables whose values should be saved in libtool wrapper scripts and
+ # restored at relink time.
+ variables_saved_for_relink="$variables_saved_for_relink"
+ # Whether libtool must link a program against all its dependency libraries.
+ link_all_deplibs=$link_all_deplibs_RC
  
- int
- main ()
- {
+ # Compile-time system search path for libraries
+ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  
-       int device;
-       char *Command;
-       ioctl(device, SIOC_IO, Command);
+ # Run-time system search path for libraries
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  
-   ;
-   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
-   amanda_cv_hpux_scsi=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ # Fix the shell variable \$srcfile for the compiler.
+ fix_srcfile_path="$fix_srcfile_path_RC"
  
- amanda_cv_hpux_scsi=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_hpux_scsi" >&5
- echo "${ECHO_T}$amanda_cv_hpux_scsi" >&6
-       if test x"$amanda_cv_hpux_scsi" = x"yes";then
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols_RC
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_HPUX_LIKE_SCSI 1
- _ACEOF
+ # The commands to list exported symbols.
+ export_symbols_cmds=$lt_export_symbols_cmds_RC
  
-               NO_SCSI_CHANGER_MODE=false
-               NO_CHIO_CHANGER_MODE=false
-       fi
- fi
+ # The commands to extract the exported symbol list from a shared archive.
+ extract_expsyms_cmds=$lt_extract_expsyms_cmds
  
- if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
-    test x"$ac_cv_header_sys_dsreq_h" = x"yes"; then
-       echo "$as_me:$LINENO: checking for Irix like scsi support" >&5
- echo $ECHO_N "checking for Irix like scsi support... $ECHO_C" >&6
- if test "${amanda_cv_irix_scsi+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.  */
+ # Symbols that should not be listed in the preloaded symbols.
+ exclude_expsyms=$lt_exclude_expsyms_RC
  
- #include <sys/types.h>
- #include <sys/dsreq.h>
- #include <sys/mtio.h>
+ # Symbols that must always be exported.
+ include_expsyms=$lt_include_expsyms_RC
  
- int
- main ()
- {
+ # ### END LIBTOOL TAG CONFIG: $tagname
+ __EOF__
  
 +      int device=1;
 +      char Command;
 +      ioctl(device, DS_ENTER, &Command);
  
-   ;
-   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
-   amanda_cv_irix_scsi=yes
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- amanda_cv_irix_scsi=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+   # If there is no Makefile yet, we rely on a make rule to execute
+   # `config.status --recheck' to rerun these tests and create the
+   # libtool script then.
+   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+   if test -f "$ltmain_in"; then
+     test -f Makefile && make "$ltmain"
+   fi
  fi
- echo "$as_me:$LINENO: result: $amanda_cv_irix_scsi" >&5
- echo "${ECHO_T}$amanda_cv_irix_scsi" >&6
-       if test x"$amanda_cv_irix_scsi" = x"yes";then
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_IRIX_LIKE_SCSI 1
- _ACEOF
  
-               NO_SCSI_CHANGER_MODE=false
-       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
+ CC="$lt_save_CC"
+       ;;
+       *)
+       { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+ echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+    { (exit 1); exit 1; }; }
+       ;;
+       esac
+       # Append the new tag name to the list of available tags.
+       if test -n "$tagname" ; then
+       available_tags="$available_tags $tagname"
+     fi
+     fi
+   done
+   IFS="$lt_save_ifs"
+   # Now substitute the updated list of available tags.
+   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+     mv "${ofile}T" "$ofile"
+     chmod +x "$ofile"
+   else
+     rm -f "${ofile}T"
+     { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+ echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+    { (exit 1); exit 1; }; }
+   fi
  fi
  
 +if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
 +   test x"$ac_cv_header_sys_scsi_impl_uscsi_h" = x"yes"; then
 +      echo "$as_me:$LINENO: checking for Solaris-like scsi support" >&5
 +echo $ECHO_N "checking for Solaris-like scsi support... $ECHO_C" >&6
 +if test "${amanda_cv_solaris_scsi+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 <sys/types.h>
- #include <sys/scsi/impl/uscsi.h>
- #include <sys/mtio.h>
  
- int
- main ()
- {
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+ # Prevent multiple expansion
  
-       int device;
-       char *Command;
-       ioctl(device, USCSICMD, Command);
  
-   ;
-   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
-   amanda_cv_solaris_scsi=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- amanda_cv_solaris_scsi=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_solaris_scsi" >&5
- echo "${ECHO_T}$amanda_cv_solaris_scsi" >&6
-       if test x"$amanda_cv_solaris_scsi" = x"yes";then
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_SOLARIS_LIKE_SCSI 1
- _ACEOF
  
-               NO_SCSI_CHANGER_MODE=false
-       fi
- fi
  
- if test x"$ac_cv_header_sys_tape_h" = x"yes" &&
-    test x"$ac_cv_header_sys_scarray_h" = x"yes" &&
-    test x"$ac_cv_header_sys_gscdds_h" = x"yes"; then
-       echo "$as_me:$LINENO: checking for AIX like scsi support" >&5
- echo $ECHO_N "checking for AIX like scsi support... $ECHO_C" >&6
- if test "${amanda_cv_aix_scsi+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 <sys/types.h>
- #include <sys/scarray.h>
- #include <sys/tape.h>
  
- int
- main ()
- {
  
-       int device;
-       char *Command;
-       ioctl(device, STIOCMD, Command);
  
 +  ;
 +  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
 +  amanda_cv_aix_scsi=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 +amanda_cv_aix_scsi=no
 +fi
 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
 +echo "$as_me:$LINENO: result: $amanda_cv_aix_scsi" >&5
 +echo "${ECHO_T}$amanda_cv_aix_scsi" >&6
 +      if test x"$amanda_cv_aix_scsi" = x"yes";then
  
 +cat >>confdefs.h <<\_ACEOF
 +#define HAVE_AIX_LIKE_SCSI 1
 +_ACEOF
  
 +              NO_SCSI_CHANGER_MODE=false
 +      fi
 +fi
 +if test x"$ac_cv_header_cam_cam_h" = x"yes";then
 +      echo "$as_me:$LINENO: checking for CAM like scsi support" >&5
 +echo $ECHO_N "checking for CAM like scsi support... $ECHO_C" >&6
 +if test "${amanda_cv_cam_scsi+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 <stdio.h>
 +# include <fcntl.h>
 +# include <cam/cam.h>
 +# include <cam/cam_ccb.h>
 +# include <cam/scsi/scsi_message.h>
 +# include <cam/scsi/scsi_pass.h>
 +# include <camlib.h>
  
- int
- main ()
- {
  
-       struct cam_device *curdev;
  
-       curdev = cam_open_pass("", O_RDWR, NULL);
  
-   ;
-   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
-   amanda_cv_cam_scsi=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
  
- amanda_cv_cam_scsi=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+     # Check whether --enable-static-binary was given.
+ if test "${enable_static_binary+set}" = set; then
+   enableval=$enable_static_binary;
+           case "$withval" in
+           "" | y | ye | yes)
+               AMANDA_STATIC_LDFLAGS=-static
+               if test x"$enable_static" = x"no"; then
+                       { { echo "$as_me:$LINENO: error: *** --enable-static-binary is incompatible with --disable-static" >&5
+ echo "$as_me: error: *** --enable-static-binary is incompatible with --disable-static" >&2;}
+    { (exit 1); exit 1; }; }
+               fi
+               ;;
+           *n | no)
+               AMANDA_STATIC_LDFLAGS=
+               ;;
+           esac
  fi
- echo "$as_me:$LINENO: result: $amanda_cv_cam_scsi" >&5
- echo "${ECHO_T}$amanda_cv_cam_scsi" >&6
-       if test x"$amanda_cv_cam_scsi" = x"yes";then
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_CAM_LIKE_SCSI 1
- _ACEOF
  
-               NO_SCSI_CHANGER_MODE=false
  
- echo "$as_me:$LINENO: checking for main in -lcam" >&5
- echo $ECHO_N "checking for main in -lcam... $ECHO_C" >&6
- if test "${ac_cv_lib_cam_main+set}" = set; then
+ #
+ # headers
+ #
+ { 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
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lcam  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   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 ()
  {
- main ();
    ;
    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
+ 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 -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_cam_main=yes
+   (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_lib_cam_main=no
      ac_cv_header_stdc=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_cam_main" >&5
- echo "${ECHO_T}$ac_cv_lib_cam_main" >&6
- if test $ac_cv_lib_cam_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBCAM 1
- _ACEOF
  
-   LIBS="-lcam $LIBS"
- fi
-       fi
- fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
- if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
-    test x"$ac_cv_header_sys_scsiio_h" = x"yes"; then
-     echo "$as_me:$LINENO: checking for BSD like scsi support" >&5
- echo $ECHO_N "checking for BSD like scsi support... $ECHO_C" >&6
- if test "${amanda_cv_bsd_scsi+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+ 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>
  
- #include <sys/types.h>
- #include <sys/scsiio.h>
- #include <sys/mtio.h>
- int
- main ()
- {
-     int device=1;
-     char Command;
-     ioctl(device, SCIOCCOMMAND, &Command);
-   ;
-   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
-   amanda_cv_bsd_scsi=yes
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "memchr" >/dev/null 2>&1; then
+   :
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- amanda_cv_bsd_scsi=no
+   ac_cv_header_stdc=no
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f conftest*
  fi
- echo "$as_me:$LINENO: result: $amanda_cv_bsd_scsi" >&5
- echo "${ECHO_T}$amanda_cv_bsd_scsi" >&6
-     if test x"$amanda_cv_bsd_scsi" = x"yes";then
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_BSD_LIKE_SCSI 1
+ 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>
  
-        NO_SCSI_CHANGER_MODE=false
-     fi
+ _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*
  
 +if test x"$ac_cv_header_chio_h" = x"yes" ||
 +   test x"$ac_cv_header_sys_chio_h" = x"yes"; then
 +         if test x"$ac_cv_header_camlib_h" != x"yes"; then
 +     if $NO_SCSI_CHANGER_MODE; then
 +       NO_SCSI_CHANGER_MODE=false
 +     else
 +       NO_CHIO_CHANGER_MODE=false
 +     fi
 +   fi
  fi
  
- echo "$as_me:$LINENO: checking for main in -lcur_colr" >&5
- echo $ECHO_N "checking for main in -lcur_colr... $ECHO_C" >&6
- if test "${ac_cv_lib_cur_colr_main+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ 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
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lcur_colr  $LIBS"
 +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>
+ #include <stdlib.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 ()
  {
- main ();
-   ;
+   int i;
+   for (i = 0; i < 256; i++)
+     if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+       return 2;
    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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest$ac_exeext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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_cur_colr_main=yes
+   :
  else
-   echo "$as_me: failed program was:" >&5
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_cur_colr_main=no
+ ( exit $ac_status )
+ ac_cv_header_stdc=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_cur_colr_main" >&5
- echo "${ECHO_T}$ac_cv_lib_cur_colr_main" >&6
- if test $ac_cv_lib_cur_colr_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBCUR_COLR 1
- _ACEOF
  
-   LIBS="-lcur_colr $LIBS"
  
  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
  
echo "$as_me:$LINENO: checking for main in -lintl" >&5
- echo $ECHO_N "checking for main in -lintl... $ECHO_C" >&6
- if test "${ac_cv_lib_intl_main+set}" = set; then
{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+ echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
+ if test "${ac_cv_header_time+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lintl  $LIBS"
 +cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 -#include <sys/types.h>
 -#include <sys/time.h>
 -#include <time.h>
 +
  
  int
  main ()
  {
 -if ((struct tm *) 0)
 -return 0;
 +main ();
    ;
    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
+ 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 -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_intl_main=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_header_time=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_lib_intl_main=no
      ac_cv_header_time=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_intl_main" >&5
- echo "${ECHO_T}$ac_cv_lib_intl_main" >&6
- if test $ac_cv_lib_intl_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBINTL 1
- _ACEOF
+ { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+ echo "${ECHO_T}$ac_cv_header_time" >&6; }
+ if test $ac_cv_header_time = yes; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define TIME_WITH_SYS_TIME 1
 -_ACEOF
 +  LIBS="-lintl $LIBS"
  
  fi
  
  
 +case "$target" in
 +    *sgi-irix*)
  
- echo "$as_me:$LINENO: checking for main in -lsocket" >&5
- echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
- if test "${ac_cv_lib_socket_main+set}" = set; then
+ for ac_header in arpa/inet.h \
+       grp.h \
+       libc.h \
+       libgen.h \
+       limits.h \
+       math.h \
+       netdb.h \
+       netinet/in.h \
+       stdarg.h \
+       stdlib.h \
+       string.h \
+       strings.h \
+       sys/file.h \
+       sys/ioctl.h \
+       sys/ipc.h \
+       sys/mntent.h \
+       sys/param.h \
+       sys/select.h \
+       sys/stat.h \
+       sys/shm.h \
+       sys/time.h \
+       sys/types.h \
+       sys/uio.h \
+       syslog.h \
+       unistd.h \
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsocket  $LIBS"
+   # 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>
 +
 +
 +int
 +main ()
 +{
 +main ();
 +  ;
 +  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
+ 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 -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_socket_main=yes
+   (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_cv_lib_socket_main=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_socket_main" >&5
- echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
- if test $ac_cv_lib_socket_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBSOCKET 1
- _ACEOF
-   LIBS="-lsocket $LIBS"
+       ac_header_compiler=no
  fi
  
-                       ;;
-     *)
+ 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; }
  
- echo "$as_me:$LINENO: checking for main in -lresolv" >&5
- echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
- if test "${ac_cv_lib_resolv_main+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lresolv  $LIBS"
+ # 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>
 +
 +
 +int
 +main ()
 +{
 +main ();
 +  ;
 +  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_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); } &&
-        { 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_resolv_main=yes
+   (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
  sed 's/^/| /' conftest.$ac_ext >&5
  
 -  ac_header_preproc=no
 +ac_cv_lib_resolv_main=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+ 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;}
+     ;;
+ esac
+ { 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: $ac_cv_lib_resolv_main" >&5
- echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
- if test $ac_cv_lib_resolv_main = yes; then
+ 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
    cat >>confdefs.h <<_ACEOF
 -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +#define HAVE_LIBRESOLV 1
  _ACEOF
  
 -fi
 +  LIBS="-lresolv $LIBS"
  
 -done
 +fi
  
  
- echo "$as_me:$LINENO: checking for main in -lnsl" >&5
- echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
- if test "${ac_cv_lib_nsl_main+set}" = set; then
+ #
+ # Types
+ #
+ { echo "$as_me:$LINENO: checking if sockaddr_storage struct exists" >&5
+ echo $ECHO_N "checking if sockaddr_storage struct exists... $ECHO_C" >&6; }
+     if test "${ac_cv_has_sockaddr_storage+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lnsl  $LIBS"
 +cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  
+ #     include <sys/types.h>
+ #     include <sys/socket.h>
  int
  main ()
  {
- main ();
+ u_int i = sizeof (struct sockaddr_storage)
    ;
    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
+ 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 -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_nsl_main=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_has_sockaddr_storage=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_nsl_main=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+       ac_cv_has_sockaddr_storage=no
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
- echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
- if test $ac_cv_lib_nsl_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBNSL 1
- _ACEOF
-   LIBS="-lnsl $LIBS"
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
+     { echo "$as_me:$LINENO: result: $ac_cv_has_sockaddr_storage" >&5
+ echo "${ECHO_T}$ac_cv_has_sockaddr_storage" >&6; }
+     if test $ac_cv_has_sockaddr_storage = yes ; then
  
- echo "$as_me:$LINENO: checking for main in -lsocket" >&5
- echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
- if test "${ac_cv_lib_socket_main+set}" = set; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_SOCKADDR_STORAGE 1
+ _ACEOF
+     fi
+ { echo "$as_me:$LINENO: checking for int" >&5
+ echo $ECHO_N "checking for int... $ECHO_C" >&6; }
+ if test "${ac_cv_type_int+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lsocket  $LIBS"
 +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
+ typedef int ac__type_new_;
  int
  main ()
  {
- main ();
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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_socket_main=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_int=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_socket_main=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+       ac_cv_type_int=no
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
- echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
- if test $ac_cv_lib_socket_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBSOCKET 1
- _ACEOF
-   LIBS="-lsocket $LIBS"
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+ { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
+ echo "${ECHO_T}$ac_cv_type_int" >&6; }
  
- echo "$as_me:$LINENO: checking for main in -lsun" >&5
- echo $ECHO_N "checking for main in -lsun... $ECHO_C" >&6
- if test "${ac_cv_lib_sun_main+set}" = set; then
+ # The cast to long int 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.
+ { echo "$as_me:$LINENO: checking size of int" >&5
+ echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_int+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsun  $LIBS"
+   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
+    typedef int ac__type_sizeof_;
  int
  main ()
  {
- main ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_sun_main=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_sun_main=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_sun_main" >&5
- echo "${ECHO_T}$ac_cv_lib_sun_main" >&6
- if test $ac_cv_lib_sun_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBSUN 1
- _ACEOF
-   LIBS="-lsun $LIBS"
- fi
-                       ;;
- esac
- echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
- echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
- if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ltermcap  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
- /* 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 tgetent ();
+ $ac_includes_default
+    typedef int ac__type_sizeof_;
  int
  main ()
  {
- tgetent ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_termcap_tgetent=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid; break
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_termcap_tgetent=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_termcap_tgetent" >&5
- echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6
- if test $ac_cv_lib_termcap_tgetent = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBTERMCAP 1
- _ACEOF
-   LIBS="-ltermcap $LIBS"
+       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
  
- if test "x$ac_cv_lib_termcap_tgetent" != xyes; then
- echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5
- echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6
- if test "${ac_cv_lib_curses_tgetent+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lcurses  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   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.  */
- /* 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 tgetent ();
+ $ac_includes_default
+    typedef int ac__type_sizeof_;
  int
  main ()
  {
- tgetent ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_curses_tgetent=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_curses_tgetent=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_curses_tgetent" >&5
- echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6
- if test $ac_cv_lib_curses_tgetent = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBCURSES 1
- _ACEOF
-   LIBS="-lcurses $LIBS"
- fi
-     if test "x$ac_cv_lib_curses_tgetent" != xyes; then
- echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5
- echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6
- if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lncurses  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
- /* 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 tgetent ();
+ $ac_includes_default
+    typedef int ac__type_sizeof_;
  int
  main ()
  {
- tgetent ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_ncurses_tgetent=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_lo=$ac_mid; break
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_ncurses_tgetent=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+       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
- echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5
- echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6
- if test $ac_cv_lib_ncurses_tgetent = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBNCURSES 1
- _ACEOF
  
-   LIBS="-lncurses $LIBS"
+ rm -f core 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
  
-     fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- if test "x$ac_cv_lib_termcap_tgetent" = xyes ||
-    test "x$ac_cv_lib_curses_tgetent" = xyes ||
-    test "x$ac_cv_lib_ncurses_tgetent" = xyes; then
  
- echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
- echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
- if test "${ac_cv_lib_readline_readline+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lreadline  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+ rm -f core 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.  */
- /* 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 readline ();
+ $ac_includes_default
+    typedef int ac__type_sizeof_;
  int
  main ()
  {
- readline ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_readline_readline=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_readline_readline=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_readline_readline" >&5
- echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
- if test $ac_cv_lib_readline_readline = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBREADLINE 1
- _ACEOF
-   LIBS="-lreadline $LIBS"
- fi
-     if test "x$ac_cv_lib_readline_readline" = xyes; then
-       READLINE_LIBS="-lreadline"
-     else
-       { echo "$as_me:$LINENO: WARNING: *** No readline library, no history and command line editing in amrecover!" >&5
- echo "$as_me: WARNING: *** No readline library, no history and command line editing in amrecover!" >&2;}
-     fi
- else
-     { echo "$as_me:$LINENO: WARNING: *** No terminal library, no history and command line editing in amrecover!" >&5
- echo "$as_me: WARNING: *** No terminal library, no history and command line editing in amrecover!" >&2;}
+       ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
  
- if test "x$ac_cv_header_linux_zftape_h" = xyes; then
-     if test "x$ac_cv_header_vtblc_h" = xyes; then
- echo "$as_me:$LINENO: checking for main in -lvtblc" >&5
- echo $ECHO_N "checking for main in -lvtblc... $ECHO_C" >&6
- if test "${ac_cv_lib_vtblc_main+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_int=$ac_lo;;
+ '') if test "$ac_cv_type_int" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (int)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_int=0
+    fi ;;
+ esac
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lvtblc  $LIBS"
 +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
+    typedef int ac__type_sizeof_;
+ static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+ main ()
+ {
  
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+     {
+       long int i = longval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
+   else
+     {
+       unsigned long int i = ulongval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
  
- int
- main ()
- {
- main ();
    ;
    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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest$ac_exeext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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_vtblc_main=yes
+   ac_cv_sizeof_int=`cat conftest.val`
  else
 -  echo "$as_me: program exited with status $ac_status" >&5
 -echo "$as_me: failed program was:" >&5
 +  echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_vtblc_main=no
+ ( exit $ac_status )
+ if test "$ac_cv_type_int" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (int)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_int=0
+    fi
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_vtblc_main" >&5
- echo "${ECHO_T}$ac_cv_lib_vtblc_main" >&6
- if test $ac_cv_lib_vtblc_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBVTBLC 1
- _ACEOF
+ rm -f conftest.val
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
  
-   LIBS="-lvtblc $LIBS"
  
- fi
  
-         if test "x$ac_cv_lib_vtblc_main" != xyes; then
-             { echo "$as_me:$LINENO: WARNING: *** vtblc library not found - no QIC volume table support!" >&5
- echo "$as_me: WARNING: *** vtblc library not found - no QIC volume table support!" >&2;}
-         fi
-     else
-         { echo "$as_me:$LINENO: WARNING: *** vtblc headers not found - no QIC volume table support!" >&5
- echo "$as_me: WARNING: *** vtblc headers not found - no QIC volume table support!" >&2;}
-     fi
- fi
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_INT $ac_cv_sizeof_int
+ _ACEOF
  
  
echo "$as_me:$LINENO: checking for modf in -lm" >&5
- echo $ECHO_N "checking for modf in -lm... $ECHO_C" >&6
- if test "${ac_cv_lib_m_modf+set}" = set; then
{ echo "$as_me:$LINENO: checking for long" >&5
+ echo $ECHO_N "checking for long... $ECHO_C" >&6; }
+ if test "${ac_cv_type_long+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lm  $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 modf ();
+ $ac_includes_default
+ typedef long ac__type_new_;
  int
  main ()
  {
- modf ();
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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_m_modf=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_long=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_m_modf=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+       ac_cv_type_long=no
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_m_modf" >&5
- echo "${ECHO_T}$ac_cv_lib_m_modf" >&6
- if test $ac_cv_lib_m_modf = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBM 1
- _ACEOF
-   LIBS="-lm $LIBS"
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+ { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+ echo "${ECHO_T}$ac_cv_type_long" >&6; }
  
- echo "$as_me:$LINENO: checking for mt_flags mtget structure element" >&5
- echo $ECHO_N "checking for mt_flags mtget structure element... $ECHO_C" >&6
- mt_flags_result="found"
+ # The cast to long int 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.
+ { echo "$as_me:$LINENO: checking size of long" >&5
+ echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_long+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   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.  */
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/mtio.h>
+ $ac_includes_default
+    typedef long ac__type_sizeof_;
  int
  main ()
  {
-     struct mtget buf;
-     long ds;
-     ds = buf.mt_flags;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 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
+ 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
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_MT_FLAGS 1
- _ACEOF
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- mt_flags_result="not found"
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $mt_flags_result" >&5
- echo "${ECHO_T}$mt_flags_result" >&6
- echo "$as_me:$LINENO: checking for mt_fileno mtget structure element" >&5
- echo $ECHO_N "checking for mt_fileno mtget structure element... $ECHO_C" >&6
- mt_fileno_result="found"
- cat >conftest.$ac_ext <<_ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/mtio.h>
+ $ac_includes_default
+    typedef long ac__type_sizeof_;
  int
  main ()
  {
-     struct mtget buf;
-     long ds;
-     ds = buf.mt_fileno;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $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
+ 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
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_MT_FILENO 1
- _ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid; break
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- mt_fileno_result="not found"
+       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
- echo "$as_me:$LINENO: result: $mt_fileno_result" >&5
- echo "${ECHO_T}$mt_fileno_result" >&6
  
- echo "$as_me:$LINENO: checking for mt_blkno mtget structure element" >&5
- echo $ECHO_N "checking for mt_blkno mtget structure element... $ECHO_C" >&6
- mt_blkno_result="found"
- cat >conftest.$ac_ext <<_ACEOF
+ rm -f core 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.  */
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/mtio.h>
+ $ac_includes_default
+    typedef long ac__type_sizeof_;
  int
  main ()
  {
-     struct mtget buf;
-     long ds;
-     ds = buf.mt_blkno;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 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
+ 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
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_MT_BLKNO 1
- _ACEOF
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- mt_blkno_result="not found"
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $mt_blkno_result" >&5
- echo "${ECHO_T}$mt_blkno_result" >&6
- echo "$as_me:$LINENO: checking for mt_dsreg mtget structure element" >&5
- echo $ECHO_N "checking for mt_dsreg mtget structure element... $ECHO_C" >&6
- mt_dsreg_result="found"
- cat >conftest.$ac_ext <<_ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/mtio.h>
+ $ac_includes_default
+    typedef long ac__type_sizeof_;
  int
  main ()
  {
-     struct mtget buf;
-     long ds;
-     ds = buf.mt_dsreg;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $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
+ 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_lo=$ac_mid; break
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_MT_DSREG 1
- _ACEOF
+       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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- mt_dsreg_result="not found"
+       ac_lo= ac_hi=
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $mt_dsreg_result" >&5
- echo "${ECHO_T}$mt_dsreg_result" >&6
  
- echo "$as_me:$LINENO: checking for mt_erreg mtget structure element" >&5
- echo $ECHO_N "checking for mt_erreg mtget structure element... $ECHO_C" >&6
- mt_erreg_result="found"
- cat >conftest.$ac_ext <<_ACEOF
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f core 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.  */
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/mtio.h>
+ $ac_includes_default
+    typedef long ac__type_sizeof_;
  int
  main ()
  {
-     struct mtget buf;
-     long ds;
-     ds = buf.mt_erreg;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $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
+ 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
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_MT_ERREG 1
- _ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- mt_erreg_result="not found"
+       ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 +echo "$as_me:$LINENO: result: $mt_erreg_result" >&5
 +echo "${ECHO_T}$mt_erreg_result" >&6
  
- DB_HEADER=
- DB_LIB=
- save_LIBS="$LIBS"
- echo "$as_me:$LINENO: checking for dbm_open in -lc" >&5
- echo $ECHO_N "checking for dbm_open in -lc... $ECHO_C" >&6
- if test "${ac_cv_lib_c_dbm_open+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_long=$ac_lo;;
+ '') if test "$ac_cv_type_long" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_long=0
+    fi ;;
+ esac
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lc  $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 dbm_open ();
+ $ac_includes_default
+    typedef long ac__type_sizeof_;
+ static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
  int
  main ()
  {
- dbm_open ();
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+     {
+       long int i = longval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
+   else
+     {
+       unsigned long int i = ulongval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
    ;
    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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest$ac_exeext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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_c_dbm_open=yes
+   ac_cv_sizeof_long=`cat conftest.val`
  else
-   echo "$as_me: failed program was:" >&5
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_c_dbm_open=no
+ ( exit $ac_status )
+ if test "$ac_cv_type_long" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_long=0
+    fi
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_c_dbm_open" >&5
- echo "${ECHO_T}$ac_cv_lib_c_dbm_open" >&6
- if test $ac_cv_lib_c_dbm_open = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBC 1
- _ACEOF
+ rm -f conftest.val
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
  
-   LIBS="-lc $LIBS"
  
- fi
  
- LIBS="$save_LIBS"
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_LONG $ac_cv_sizeof_long
+ _ACEOF
  
- case "$DB_STYLE" in
-     db)
-       if test "x$ac_cv_header_db_h" = xyes; then
  
echo "$as_me:$LINENO: checking for main in -ldb" >&5
- echo $ECHO_N "checking for main in -ldb... $ECHO_C" >&6
- if test "${ac_cv_lib_db_main+set}" = set; then
{ 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
 -  cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-ldb  $LIBS"
 +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
+ typedef long long ac__type_new_;
  int
  main ()
  {
- main ();
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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_db_main=yes
+   (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_lib_db_main=no
      ac_cv_type_long_long=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_db_main" >&5
- echo "${ECHO_T}$ac_cv_lib_db_main" >&6
- if test $ac_cv_lib_db_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBDB 1
- _ACEOF
-   LIBS="-ldb $LIBS"
  
+ 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; }
  
-           if test "x$ac_cv_lib_db_main" = xyes; then
- echo "$as_me:$LINENO: checking for dbm_open in -ldb" >&5
- echo $ECHO_N "checking for dbm_open in -ldb... $ECHO_C" >&6
- if test "${ac_cv_lib_db_dbm_open+set}" = set; then
+ # The cast to long int 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.
+ { echo "$as_me:$LINENO: checking size of long long" >&5
+ echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_long_long+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldb  $LIBS"
+   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.  */
- /* 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 dbm_open ();
+ $ac_includes_default
+    typedef long long ac__type_sizeof_;
  int
  main ()
  {
- dbm_open ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_db_dbm_open=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_db_dbm_open=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_db_dbm_open" >&5
- echo "${ECHO_T}$ac_cv_lib_db_dbm_open" >&6
- if test $ac_cv_lib_db_dbm_open = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBDB 1
- _ACEOF
-   LIBS="-ldb $LIBS"
- fi
-               if test "x$ac_cv_lib_db_dbm_open" = xyes; then
-                   DB_HEADER=db.h
-                   DB_LIB=db
-               else
-                   DB_STYLE=
-                   { echo "$as_me:$LINENO: WARNING: *** db database library requested but dbm_open not found in -ldb." >&5
- echo "$as_me: WARNING: *** db database library requested but dbm_open not found in -ldb." >&2;}
-               fi
-           else
-               if test "x$ac_cv_lib_c_dbm_open" = xyes; then
-                   DB_HEADER=db.h
-                   DB_LIB=c
-               else
-                   DB_STYLE=
-                   { echo "$as_me:$LINENO: WARNING: *** db library requested but -ldb doesn't exist and dbm_open cannot be found." >&5
- echo "$as_me: WARNING: *** db library requested but -ldb doesn't exist and dbm_open cannot be found." >&2;}
-               fi
-           fi
-       else
-           DB_STYLE=
-           { echo "$as_me:$LINENO: WARNING: *** db database library requested but db.h not found." >&5
- echo "$as_me: WARNING: *** db database library requested but db.h not found." >&2;}
-       fi
-       ;;
-     dbm)
-       if test "x$ac_cv_header_dbm_h" = xyes; then
- echo "$as_me:$LINENO: checking for main in -ldbm" >&5
- echo $ECHO_N "checking for main in -ldbm... $ECHO_C" >&6
- if test "${ac_cv_lib_dbm_main+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldbm  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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
+    typedef long long ac__type_sizeof_;
  int
  main ()
  {
- main ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_dbm_main=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_dbm_main=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_dbm_main" >&5
- echo "${ECHO_T}$ac_cv_lib_dbm_main" >&6
- if test $ac_cv_lib_dbm_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBDBM 1
- _ACEOF
-   LIBS="-ldbm $LIBS"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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
  
-           if test "x$ac_cv_lib_dbm_main" = xyes; then
- echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5
- echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6
- if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ldbm  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   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.  */
- /* 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 dbm_open ();
+ $ac_includes_default
+    typedef long long ac__type_sizeof_;
  int
  main ()
  {
- dbm_open ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
    ;
    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
+ 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 -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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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
+    typedef long long ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
+   ;
+   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
-   ac_cv_lib_dbm_dbm_open=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_lo=$ac_mid; break
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_dbm_dbm_open=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+       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
- echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_dbm_open" >&5
- echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6
- if test $ac_cv_lib_dbm_dbm_open = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBDBM 1
- _ACEOF
  
-   LIBS="-ldbm $LIBS"
+ rm -f core 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
  
-               if test "x$ac_cv_lib_dbm_dbm_open" = xyes; then
-                   DB_HEADER=dbm.h
-                   DB_LIB=dbm
-               else
-                   DB_STYLE=
-                   { echo "$as_me:$LINENO: WARNING: *** dbm database library requested but dbm_open not found in -ldbm." >&5
- echo "$as_me: WARNING: *** dbm database library requested but dbm_open not found in -ldbm." >&2;}
-               fi
-           else
-               if test "x$ac_cv_lib_c_dbm_open" = xyes; then
-                   DB_HEADER=dbm.h
-                   DB_LIB=c
-               else
-                   DB_STYLE=
-                   { echo "$as_me:$LINENO: WARNING: *** dbm library requested but -ldbm doesn't exist and dbm_open cannot be found." >&5
- echo "$as_me: WARNING: *** dbm library requested but -ldbm doesn't exist and dbm_open cannot be found." >&2;}
-               fi
-           fi
-       else
-           DB_STYLE=
-           { echo "$as_me:$LINENO: WARNING: *** dbm database library requested but dbm.h not found." >&5
- echo "$as_me: WARNING: *** dbm database library requested but dbm.h not found." >&2;}
-       fi
-       ;;
-     gdbm)
-       if test "x$ac_cv_header_ndbm_h" = xyes; then
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
  
- echo "$as_me:$LINENO: checking for main in -lgdbm" >&5
- echo $ECHO_N "checking for main in -lgdbm... $ECHO_C" >&6
- if test "${ac_cv_lib_gdbm_main+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lgdbm  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+ rm -f core 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
+    typedef long long ac__type_sizeof_;
  int
  main ()
  {
- main ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_gdbm_main=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_gdbm_main=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_gdbm_main" >&5
- echo "${ECHO_T}$ac_cv_lib_gdbm_main" >&6
- if test $ac_cv_lib_gdbm_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBGDBM 1
- _ACEOF
-   LIBS="-lgdbm $LIBS"
+       ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
  
-           if test "x$ac_cv_lib_gdbm_main" = xyes; then
- echo "$as_me:$LINENO: checking for dbm_open in -lgdbm" >&5
- echo $ECHO_N "checking for dbm_open in -lgdbm... $ECHO_C" >&6
- if test "${ac_cv_lib_gdbm_dbm_open+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_long_long=$ac_lo;;
+ '') if test "$ac_cv_type_long_long" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (long long)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_long_long=0
+    fi ;;
+ esac
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lgdbm  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   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 dbm_open ();
+ $ac_includes_default
+    typedef long long ac__type_sizeof_;
+ static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
  int
  main ()
  {
- dbm_open ();
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+     {
+       long int i = longval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
+   else
+     {
+       unsigned long int i = ulongval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
    ;
    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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest$ac_exeext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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_gdbm_dbm_open=yes
+   ac_cv_sizeof_long_long=`cat conftest.val`
  else
-   echo "$as_me: failed program was:" >&5
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_gdbm_dbm_open=no
+ ( exit $ac_status )
+ if test "$ac_cv_type_long_long" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (long long)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_long_long=0
+    fi
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_dbm_open" >&5
- echo "${ECHO_T}$ac_cv_lib_gdbm_dbm_open" >&6
- if test $ac_cv_lib_gdbm_dbm_open = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBGDBM 1
- _ACEOF
+ rm -f conftest.val
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
  
-   LIBS="-lgdbm $LIBS"
  
- fi
  
-               if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then
-                   DB_HEADER=ndbm.h
-                   DB_LIB=gdbm
-               else
-                   DB_STYLE=
-                   { echo "$as_me:$LINENO: WARNING: *** gdbm database library requested but -lgdbm not found." >&5
- echo "$as_me: WARNING: *** gdbm database library requested but -lgdbm not found." >&2;}
-               fi
-           else
-               if test "x$ac_cv_lib_c_dbm_open" = xyes; then
-                   DB_HEADER=ndbm.h
-                   DB_LIB=c
-               else
-                   DB_STYLE=
-                   { echo "$as_me:$LINENO: WARNING: *** gdbm library requested but -lgdbm doesn't exist and dbm_open cannot be found." >&5
- echo "$as_me: WARNING: *** gdbm library requested but -lgdbm doesn't exist and dbm_open cannot be found." >&2;}
-               fi
-           fi
-       else
-           DB_STYLE=
-           { echo "$as_me:$LINENO: WARNING: *** gdbm database library requested but ndbm.h not found." >&5
- echo "$as_me: WARNING: *** gdbm database library requested but ndbm.h not found." >&2;}
-       fi
-       ;;
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+ _ACEOF
  
 +    ndbm)
 +      if test "x$ac_cv_header_ndbm_h" = xyes; then
  
echo "$as_me:$LINENO: checking for main in -lndbm" >&5
- echo $ECHO_N "checking for main in -lndbm... $ECHO_C" >&6
- if test "${ac_cv_lib_ndbm_main+set}" = set; then
{ echo "$as_me:$LINENO: checking for intmax_t" >&5
+ echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_intmax_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lndbm  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   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
+ typedef intmax_t ac__type_new_;
  int
  main ()
  {
- main ();
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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_ndbm_main=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_intmax_t=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_ndbm_main=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+       ac_cv_type_intmax_t=no
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_main" >&5
- echo "${ECHO_T}$ac_cv_lib_ndbm_main" >&6
- if test $ac_cv_lib_ndbm_main = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBNDBM 1
- _ACEOF
-   LIBS="-lndbm $LIBS"
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+ { echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5
+ echo "${ECHO_T}$ac_cv_type_intmax_t" >&6; }
  
-           if test "x$ac_cv_lib_ndbm_main" = xyes; then
- echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
- echo $ECHO_N "checking for dbm_open in -lndbm... $ECHO_C" >&6
- if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
+ # The cast to long int 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.
+ { echo "$as_me:$LINENO: checking size of intmax_t" >&5
+ echo $ECHO_N "checking size of intmax_t... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_intmax_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lndbm  $LIBS"
+   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.  */
- /* 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 dbm_open ();
+ $ac_includes_default
+    typedef intmax_t ac__type_sizeof_;
  int
  main ()
  {
- dbm_open ();
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_ndbm_dbm_open=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_ndbm_dbm_open=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_ndbm_dbm_open" >&5
- echo "${ECHO_T}$ac_cv_lib_ndbm_dbm_open" >&6
- if test $ac_cv_lib_ndbm_dbm_open = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBNDBM 1
- _ACEOF
-   LIBS="-lndbm $LIBS"
- fi
-               if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then
-                   DB_HEADER=ndbm.h
-                   DB_LIB=ndbm
-               else
-                   DB_STYLE=
-                   { echo "$as_me:$LINENO: WARNING: *** ndbm database library requested but -lndbm not found." >&5
- echo "$as_me: WARNING: *** ndbm database library requested but -lndbm not found." >&2;}
-               fi
-           else
-               if test "x$ac_cv_lib_c_dbm_open" = xyes; then
-                   DB_HEADER=ndbm.h
-                   DB_LIB=c
-               else
-                   DB_STYLE=
-                   { echo "$as_me:$LINENO: WARNING: *** ndbm library requested but -lndbm doesn't exist and dbm_open cannot be found." >&5
- echo "$as_me: WARNING: *** ndbm library requested but -lndbm doesn't exist and dbm_open cannot be found." >&2;}
-               fi
-           fi
-       else
-           DB_STYLE=
-           { echo "$as_me:$LINENO: WARNING: *** ndbm database library requested but ndbm.h not found." >&5
- echo "$as_me: WARNING: *** ndbm database library requested but ndbm.h not found." >&2;}
-       fi
-       ;;
-     text)
-       DB_HEADER=
-       DB_LIB=
-       ;;
- esac
- if test -z "$DB_STYLE"; then
-     DB_STYLE=text
-     DB_HEADER=
-     DB_LIB=
- fi
- if test "x$DB_STYLE" = xtext; then
- cat >>confdefs.h <<\_ACEOF
- #define TEXTDB 1
- _ACEOF
- else
-     echo "$as_me:$LINENO: checking for database" >&5
- echo $ECHO_N "checking for database... $ECHO_C" >&6
-     echo "$as_me:$LINENO: result: header is $DB_HEADER, linking against -l$DB_LIB" >&5
- echo "${ECHO_T}header is $DB_HEADER, linking against -l$DB_LIB" >&6
-     case "$DB_STYLE" in
-       db)
- cat >>confdefs.h <<\_ACEOF
- #define USE_DB_H 1
- _ACEOF
-    ;;
-       dbm)
- cat >>confdefs.h <<\_ACEOF
- #define USE_DBM_H 1
- _ACEOF
-   ;;
-       gdbm)
- cat >>confdefs.h <<\_ACEOF
- #define USE_GDBM_H 1
- _ACEOF
-  ;;
-       ndbm)
- cat >>confdefs.h <<\_ACEOF
- #define USE_NDBM_H 1
- _ACEOF
-  ;;
-     esac
-     echo "$as_me:$LINENO: checking for struct datum declared in header files" >&5
- echo $ECHO_N "checking for struct datum declared in header files... $ECHO_C" >&6
- if test "${amanda_cv_struct_datum+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-           cat >conftest.$ac_ext <<_ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
- #if defined(USE_DB_H)
- #  include <db.h>
- #else
- #  if defined(USE_DBM_H)
- #    include <dbm.h>
- #  else
- #    if defined(USE_NDBM_H)
- #      include <ndbm.h>
- #    endif
- #  endif
- #endif
+ $ac_includes_default
+    typedef intmax_t ac__type_sizeof_;
  int
  main ()
  {
-                   datum a;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $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
+ 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
-   amanda_cv_struct_datum=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid; break
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- amanda_cv_struct_datum=no
+       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
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_struct_datum" >&5
- echo "${ECHO_T}$amanda_cv_struct_datum" >&6
-     if test "x$amanda_cv_struct_datum" = xyes; then
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_STRUCT_DATUM 1
- _ACEOF
-     fi
- fi
- case "$DB_STYLE" in
-     db) DB_EXT=.db;;
-     gdbm) DB_EXT='""';;
-     dbm | ndbm) DB_EXT=".dir .pag";;
-     text) DB_EXT='""';;
-     *) DB_EXT=;;
- esac
  
- echo "$as_me:$LINENO: checking whether _POSIX2_RE_DUP_MAX is defined" >&5
- echo $ECHO_N "checking whether _POSIX2_RE_DUP_MAX is defined... $ECHO_C" >&6
- if test "${amanda_cv_have__posix2_re_dup_max+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   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
+    typedef intmax_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
  
- #include <limits.h>
- #ifdef _POSIX2_RE_DUP_MAX
-   yes
- #endif
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "yes" >/dev/null 2>&1; then
-   amanda_cv_have__posix2_re_dup_max=yes
- else
-   amanda_cv_have__posix2_re_dup_max=no
- fi
- rm -f conftest*
- fi
- echo "$as_me:$LINENO: result: $amanda_cv_have__posix2_re_dup_max" >&5
- echo "${ECHO_T}$amanda_cv_have__posix2_re_dup_max" >&6
- if test "x$amanda_cv_have__posix2_re_dup_max" = xyes; then
- cat >>confdefs.h <<\_ACEOF
- #define HAVE__POSIX2_RE_DUP_MAX 1
+   ;
+   return 0;
+ }
  _ACEOF
- fi
- echo "$as_me:$LINENO: checking whether CHAR_MIN is defined" >&5
- echo $ECHO_N "checking whether CHAR_MIN is defined... $ECHO_C" >&6
- if test "${amanda_cv_have_char_min+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_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
+   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
+    typedef intmax_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
  
- #include <limits.h>
- #ifdef CHAR_MIN
-   yes
- #endif
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "yes" >/dev/null 2>&1; then
-   amanda_cv_have_char_min=yes
+ 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
+   ac_lo=$ac_mid; break
  else
-   amanda_cv_have_char_min=no
+   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*
  
+ rm -f core 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
 +echo "$as_me:$LINENO: result: $amanda_cv_have_char_min" >&5
 +echo "${ECHO_T}$amanda_cv_have_char_min" >&6
 +if test "x$amanda_cv_have_char_min" = xyes; then
 +
 +cat >>confdefs.h <<\_ACEOF
 +#define HAVE_CHAR_MIN 1
 +_ACEOF
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
- echo "$as_me:$LINENO: checking whether CHAR_MAX is defined" >&5
- echo $ECHO_N "checking whether CHAR_MAX is defined... $ECHO_C" >&6
- if test "${amanda_cv_have_char_max+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+ rm -f core 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
+    typedef intmax_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
  
- #include <limits.h>
- #ifdef CHAR_MAX
-   yes
- #endif
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "yes" >/dev/null 2>&1; then
-   amanda_cv_have_char_max=yes
+ 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
+   ac_hi=$ac_mid
  else
 -  echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 +  amanda_cv_have_char_max=no
 +fi
 +rm -f conftest*
 +
 +fi
 +echo "$as_me:$LINENO: result: $amanda_cv_have_char_max" >&5
 +echo "${ECHO_T}$amanda_cv_have_char_max" >&6
 +if test "x$amanda_cv_have_char_max" = xyes; then
 +
 +cat >>confdefs.h <<\_ACEOF
 +#define HAVE_CHAR_MAX 1
 +_ACEOF
  
+       ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
  
- echo "$as_me:$LINENO: checking whether CHAR_BIT is defined" >&5
- echo $ECHO_N "checking whether CHAR_BIT is defined... $ECHO_C" >&6
- if test "${amanda_cv_have_char_bit+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_intmax_t=$ac_lo;;
+ '') if test "$ac_cv_type_intmax_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (intmax_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_intmax_t=0
+    fi ;;
+ esac
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
+ $ac_includes_default
+    typedef intmax_t ac__type_sizeof_;
+ static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+ main ()
+ {
  
- #include <limits.h>
- #ifdef CHAR_BIT
-   yes
- #endif
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+     {
+       long int i = longval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
+   else
+     {
+       unsigned long int i = ulongval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
  
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "yes" >/dev/null 2>&1; then
-   amanda_cv_have_char_bit=yes
+ rm -f conftest$ac_exeext
+ 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'
+   { (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_sizeof_intmax_t=`cat conftest.val`
  else
-   amanda_cv_have_char_bit=no
- fi
- rm -f conftest*
+   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 )
+ if test "$ac_cv_type_intmax_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (intmax_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_intmax_t=0
+    fi
  fi
- echo "$as_me:$LINENO: result: $amanda_cv_have_char_bit" >&5
- echo "${ECHO_T}$amanda_cv_have_char_bit" >&6
- if test "x$amanda_cv_have_char_bit" = xyes; then
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f conftest.val
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sizeof_intmax_t" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_intmax_t" >&6; }
  
 +cat >>confdefs.h <<\_ACEOF
 +#define HAVE_CHAR_BIT 1
 +_ACEOF
  
- fi
  
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t
+ _ACEOF
  
- ice_have_accept=no
  
- for ac_func in accept
- 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 off_t" >&5
+ echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_off_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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
+ $ac_includes_default
+ typedef off_t ac__type_new_;
  int
  main ()
  {
- return f != $ac_func;
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_off_t=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
+       ac_cv_type_off_t=no
  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
-  ice_have_accept=yes
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- done
+ { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+ echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
  
- if test "${ice_have_accept}" = yes; then
- echo "$as_me:$LINENO: checking for accept declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for accept declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_accept_decl+set}" = set; then
+ # The cast to long int 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.
+ { echo "$as_me:$LINENO: checking size of off_t" >&5
+ echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_off_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
- ice_cv_have_accept_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
- # Check for ordinary declaration
+   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.  */
- #include <$header>
+ $ac_includes_default
+    typedef off_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
  
 -  ;
 -  return 0;
 -}
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}accept[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_accept_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_accept_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_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
+   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.  */
- #include <$header>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}accept[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_accept_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_accept_decl" = yes; then
-       break
- fi
- done
- fi
- echo "$as_me:$LINENO: result: $ice_cv_have_accept_decl" >&5
- echo "${ECHO_T}$ice_cv_have_accept_decl" >&6
- if test "$ice_cv_have_accept_decl" = yes; then
+ $ac_includes_default
+    typedef off_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
  
 -  ;
 -  return 0;
 -}
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_ACCEPT_DECL 1
  _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
+   ac_hi=$ac_mid; break
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- fi
+       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
  
- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
- # for constant arguments.  Useless!
- echo "$as_me:$LINENO: checking for working alloca.h" >&5
- echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
- if test "${ac_cv_working_alloca_h+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   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.  */
- #include <alloca.h>
+ $ac_includes_default
+    typedef off_t ac__type_sizeof_;
  int
  main ()
  {
- char *p = (char *) alloca (2 * sizeof (int));
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_working_alloca_h=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_working_alloca_h=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
- echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
- if test $ac_cv_working_alloca_h = yes; then
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_ALLOCA_H 1
- _ACEOF
- fi
- echo "$as_me:$LINENO: checking for alloca" >&5
- echo $ECHO_N "checking for alloca... $ECHO_C" >&6
- if test "${ac_cv_func_alloca_works+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   cat >conftest.$ac_ext <<_ACEOF
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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.  */
- #ifdef __GNUC__
- # define alloca __builtin_alloca
- #else
- # ifdef _MSC_VER
- #  include <malloc.h>
- #  define alloca _alloca
- # else
- #  if HAVE_ALLOCA_H
- #   include <alloca.h>
- #  else
- #   ifdef _AIX
-  #pragma alloca
- #   else
- #    ifndef alloca /* predefined by HP cc +Olibcalls */
- char *alloca ();
- #    endif
- #   endif
- #  endif
- # endif
- #endif
+ $ac_includes_default
+    typedef off_t ac__type_sizeof_;
  int
  main ()
  {
- char *p = (char *) alloca (1);
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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_alloca_works=yes
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_lo=$ac_mid; break
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_func_alloca_works=no
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+       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
- echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
- echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
- if test $ac_cv_func_alloca_works = yes; then
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_ALLOCA 1
- _ACEOF
- else
-   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble.  Some versions do not even contain alloca or
- # contain a buggy version.  If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.$ac_objext
- cat >>confdefs.h <<\_ACEOF
- #define C_ALLOCA 1
- _ACEOF
  
- echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
- echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
- if test "${ac_cv_os_cray+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core 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.  */
 +#if defined(CRAY) && ! defined(CRAY2)
 +webecray
 +#else
 +wenotbecray
 +#endif
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "webecray" >/dev/null 2>&1; then
-   ac_cv_os_cray=yes
- else
-   ac_cv_os_cray=no
+       ac_lo= ac_hi=
  fi
- rm -f conftest*
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
- echo "${ECHO_T}$ac_cv_os_cray" >&6
- if test $ac_cv_os_cray = yes; then
-   for ac_func in _getb67 GETB67 getb67; 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
+ rm -f core 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.  */
- /* 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
+ $ac_includes_default
+    typedef off_t ac__type_sizeof_;
  int
  main ()
  {
- return f != $ac_func;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid
  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 CRAY_STACKSEG_END $ac_func
- _ACEOF
-     break
- fi
-   done
+       ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
  
- echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
- echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
- if test "${ac_cv_c_stack_direction+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test "$cross_compiling" = yes; then
-   ac_cv_c_stack_direction=0
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_off_t=$ac_lo;;
+ '') if test "$ac_cv_type_off_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (off_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_off_t=0
+    fi ;;
+ esac
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
+ $ac_includes_default
+    typedef off_t ac__type_sizeof_;
+ static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
  int
 -main ()
 +find_stack_direction ()
  {
-   static char *addr = 0;
-   auto char dummy;
-   if (addr == 0)
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
      {
-       addr = &dummy;
-       return find_stack_direction ();
+       long int i = longval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%ld\n", i);
      }
    else
-     return (&dummy > addr) ? 1 : -1;
- }
+     {
+       unsigned long int i = ulongval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
  
 -  ;
 -  return 0;
 +int
 +main ()
 +{
 +  exit (find_stack_direction () < 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
-   ac_cv_c_stack_direction=1
+   ac_cv_sizeof_off_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 )
- ac_cv_c_stack_direction=-1
+ if test "$ac_cv_type_off_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (off_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_off_t=0
+    fi
  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
+ rm -f conftest.val
  fi
echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
- echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
  
- cat >>confdefs.h <<_ACEOF
- #define STACK_DIRECTION $ac_cv_c_stack_direction
- _ACEOF
  
  
- fi
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
+ _ACEOF
  
  
- for ac_func in atexit
- 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 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
    cat >conftest.$ac_ext <<_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
+ $ac_includes_default
+ typedef size_t ac__type_new_;
  int
  main ()
  {
- return f != $ac_func;
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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"
+   (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
  
- eval "$as_ac_var=no"
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+       ac_cv_type_size_t=no
  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
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- done
+ { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+ echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
  
- ice_have_atof=no
- for ac_func in atof
- 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
+ # The cast to long int 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.
+ { echo "$as_me:$LINENO: checking size of size_t" >&5
+ echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_size_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   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.  */
- /* 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
+ $ac_includes_default
+    typedef size_t ac__type_sizeof_;
  int
  main ()
  {
- return f != $ac_func;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
    ;
    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
+ 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 -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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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
+    typedef size_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
+   ;
+   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
-   eval "$as_ac_var=yes"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid; break
  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
-  ice_have_atof=yes
+       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
 +done
  
- if test "${ice_have_atof}" = yes; then
- echo "$as_me:$LINENO: checking for atof declaration in stdlib.h" >&5
- echo $ECHO_N "checking for atof declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_atof_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- ice_cv_have_atof_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
+       cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
+ $ac_includes_default
+    typedef size_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
  
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}atof[         ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_atof_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_atof_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_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
+   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.  */
- #include <$header>
+ $ac_includes_default
+    typedef size_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
  
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}atof[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_atof_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_atof_decl" = yes; then
-       break
- fi
- done
+ 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
+   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
  
- echo "$as_me:$LINENO: result: $ice_cv_have_atof_decl" >&5
- echo "${ECHO_T}$ice_cv_have_atof_decl" >&6
- if test "$ice_cv_have_atof_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_ATOF_DECL 1
- _ACEOF
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- fi
+       ac_lo= ac_hi=
  fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
  
- ice_have_atoi=no
- for ac_func in atoi
- 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
+ rm -f core 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.  */
- /* 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
+ $ac_includes_default
+    typedef size_t ac__type_sizeof_;
  int
  main ()
  {
- return f != $ac_func;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid
  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
-  ice_have_atoi=yes
+       ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
- done
  
- if test "${ice_have_atoi}" = yes; then
- echo "$as_me:$LINENO: checking for atoi declaration in stdlib.h" >&5
- echo $ECHO_N "checking for atoi declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_atoi_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_size_t=$ac_lo;;
+ '') if test "$ac_cv_type_size_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (size_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_size_t=0
+    fi ;;
+ esac
  else
- ice_cv_have_atoi_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
+   cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
+ $ac_includes_default
+    typedef size_t ac__type_sizeof_;
+ static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+ main ()
+ {
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}atoi[         ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_atoi_decl=yes
- fi
- rm -f conftest*
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+     {
+       long int i = longval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
+   else
+     {
+       unsigned long int i = ulongval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
  
- if test "$ice_cv_have_atoi_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
+   ;
+   return 0;
+ }
  _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
+ rm -f conftest$ac_exeext
+ 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'
+   { (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_sizeof_size_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
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}atoi[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_atoi_decl=yes
+ ( exit $ac_status )
+ if test "$ac_cv_type_size_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (size_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_size_t=0
+    fi
  fi
- rm -f conftest*
- if test "$ice_cv_have_atoi_decl" = yes; then
-       break
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
- done
+ rm -f conftest.val
  fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
  
- echo "$as_me:$LINENO: result: $ice_cv_have_atoi_decl" >&5
- echo "${ECHO_T}$ice_cv_have_atoi_decl" >&6
- if test "$ice_cv_have_atoi_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_ATOI_DECL 1
+ #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
  _ACEOF
  
- fi
- fi
  
- ice_have_atol=no
- for ac_func in atol
- 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 ssize_t" >&5
+ echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_ssize_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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
+ $ac_includes_default
+ typedef ssize_t ac__type_new_;
  int
  main ()
  {
- return f != $ac_func;
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_ssize_t=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
+       ac_cv_type_ssize_t=no
  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
-  ice_have_atol=yes
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- done
+ { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
+ echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
  
- if test "${ice_have_atol}" = yes; then
- echo "$as_me:$LINENO: checking for atol declaration in stdlib.h" >&5
- echo $ECHO_N "checking for atol declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_atol_decl+set}" = set; then
+ # The cast to long int 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.
+ { echo "$as_me:$LINENO: checking size of ssize_t" >&5
+ echo $ECHO_N "checking size of ssize_t... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_ssize_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
- ice_cv_have_atol_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}atol[         ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_atol_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_atol_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
+   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.  */
- #include <$header>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}atol[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_atol_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_atol_decl" = yes; then
-       break
- fi
- done
- fi
- echo "$as_me:$LINENO: result: $ice_cv_have_atol_decl" >&5
- echo "${ECHO_T}$ice_cv_have_atol_decl" >&6
- if test "$ice_cv_have_atol_decl" = yes; then
+ $ac_includes_default
+    typedef ssize_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_ATOL_DECL 1
+   ;
+   return 0;
+ }
  _ACEOF
- fi
- fi
- ice_have_atoll=no
- for ac_func in atoll
- 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
+ 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
+   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.  */
- /* 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
+ $ac_includes_default
+    typedef ssize_t ac__type_sizeof_;
  int
  main ()
  {
- return f != $ac_func;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid; break
  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
-  ice_have_atoll=yes
+       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
 +done
  
- if test "${ice_have_atoll}" = yes; then
- echo "$as_me:$LINENO: checking for atoll declaration in stdlib.h" >&5
- echo $ECHO_N "checking for atoll declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_atoll_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- ice_cv_have_atoll_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
+       cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
+ $ac_includes_default
+    typedef ssize_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
  
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}atoll[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_atoll_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_atoll_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_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
+   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.  */
- #include <$header>
+ $ac_includes_default
+    typedef ssize_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
  
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}atoll[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_atoll_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_atoll_decl" = yes; then
-       break
- fi
- done
+ 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
+   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
  
- echo "$as_me:$LINENO: result: $ice_cv_have_atoll_decl" >&5
- echo "${ECHO_T}$ice_cv_have_atoll_decl" >&6
- if test "$ice_cv_have_atoll_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_ATOLL_DECL 1
- _ACEOF
+ rm -f core 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
 +fi
 +
  
- ice_have_strtol=no
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
  
- for ac_func in strtol
- 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
+ rm -f core 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.  */
- /* 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
+ $ac_includes_default
+    typedef ssize_t ac__type_sizeof_;
  int
  main ()
  {
- return f != $ac_func;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid
  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
-  ice_have_strtol=yes
+       ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
 +done
  
- if test "${ice_have_strtol}" = yes; then
- echo "$as_me:$LINENO: checking for strtol declaration in stdlib.h" >&5
- echo $ECHO_N "checking for strtol declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_strtol_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_ssize_t=$ac_lo;;
+ '') if test "$ac_cv_type_ssize_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (ssize_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (ssize_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_ssize_t=0
+    fi ;;
+ esac
  else
- ice_cv_have_strtol_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
+   cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
+ $ac_includes_default
+    typedef ssize_t ac__type_sizeof_;
+ static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+ main ()
+ {
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strtol[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_strtol_decl=yes
- fi
- rm -f conftest*
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+     {
+       long int i = longval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
+   else
+     {
+       unsigned long int i = ulongval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
  
- if test "$ice_cv_have_strtol_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
+   ;
+   return 0;
+ }
  _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
+ rm -f conftest$ac_exeext
+ 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'
+   { (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_sizeof_ssize_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
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strtol[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_strtol_decl=yes
+ ( exit $ac_status )
+ if test "$ac_cv_type_ssize_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (ssize_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (ssize_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_ssize_t=0
+    fi
  fi
- rm -f conftest*
- if test "$ice_cv_have_strtol_decl" = yes; then
-       break
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
- done
+ rm -f conftest.val
  fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sizeof_ssize_t" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_ssize_t" >&6; }
  
- echo "$as_me:$LINENO: result: $ice_cv_have_strtol_decl" >&5
- echo "${ECHO_T}$ice_cv_have_strtol_decl" >&6
- if test "$ice_cv_have_strtol_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_STRTOL_DECL 1
+ #define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
  _ACEOF
  
- fi
- fi
- ice_have_strtoll=no
  
- for ac_func in strtoll
- 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 time_t" >&5
+ echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_time_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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
+ $ac_includes_default
+ typedef time_t ac__type_new_;
  int
  main ()
  {
- return f != $ac_func;
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_time_t=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
-  ice_have_strtoll=yes
- fi
- done
- if test "${ice_have_strtoll}" = yes; then
- echo "$as_me:$LINENO: checking for strtoll declaration in stdlib.h" >&5
- echo $ECHO_N "checking for strtoll declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_strtoll_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ice_cv_have_strtoll_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strtoll[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_strtoll_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_strtoll_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strtoll[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_strtoll_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_strtoll_decl" = yes; then
-       break
- fi
- done
+       ac_cv_type_time_t=no
  fi
  
- echo "$as_me:$LINENO: result: $ice_cv_have_strtoll_decl" >&5
- echo "${ECHO_T}$ice_cv_have_strtoll_decl" >&6
- if test "$ice_cv_have_strtoll_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_STRTOLL_DECL 1
- _ACEOF
- fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+ { echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
+ echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
  
- for ac_func in basename
- 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
+ # The cast to long int 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.
{ echo "$as_me:$LINENO: checking size of time_t" >&5
+ echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_time_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   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.  */
- /* 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"
+ $ac_includes_default
+    typedef time_t ac__type_sizeof_;
+ int
+ main ()
  {
- #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
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
  
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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
+    typedef time_t ac__type_sizeof_;
  int
  main ()
  {
- return f != $ac_func;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_hi=$ac_mid; break
  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
+       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
 +done
 +
 +
 +ice_have_bind=no
  
- for ac_func in bind
- 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
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   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.  */
- /* 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
+ $ac_includes_default
+    typedef time_t ac__type_sizeof_;
  int
  main ()
  {
- return f != $ac_func;
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
    ;
    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
+ 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 -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
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; 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
+    typedef time_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
+   ;
+   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
-   eval "$as_ac_var=yes"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_lo=$ac_mid; break
  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
-  ice_have_bind=yes
+       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
 +done
  
- if test "${ice_have_bind}" = yes; then
- echo "$as_me:$LINENO: checking for bind declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for bind declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_bind_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
  else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- ice_cv_have_bind_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
+       ac_lo= ac_hi=
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f core 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.  */
- #include <$header>
+ $ac_includes_default
+    typedef time_t ac__type_sizeof_;
+ int
+ main ()
+ {
+ static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
  
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}bind[         ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_bind_decl=yes
- fi
- rm -f conftest*
+ 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
+   ac_hi=$ac_mid
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_bind_decl" = yes; then
-       break
+       ac_lo=`expr '(' $ac_mid ')' + 1`
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_time_t=$ac_lo;;
+ '') if test "$ac_cv_type_time_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (time_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_time_t=0
+    fi ;;
+ esac
+ else
+   cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
+ $ac_includes_default
+    typedef time_t ac__type_sizeof_;
+ static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+ main ()
+ {
+   FILE *f = fopen ("conftest.val", "w");
+   if (! f)
+     return 1;
+   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+     {
+       long int i = longval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%ld\n", i);
+     }
+   else
+     {
+       unsigned long int i = ulongval ();
+       if (i != ((long int) (sizeof (ac__type_sizeof_))))
+       return 1;
+       fprintf (f, "%lu\n", i);
+     }
+   return ferror (f) || fclose (f) != 0;
  
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}bind[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_bind_decl=yes
- fi
- rm -f conftest*
+ rm -f conftest$ac_exeext
+ 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'
+   { (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_sizeof_time_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
  
- if test "$ice_cv_have_bind_decl" = yes; then
-       break
+ ( exit $ac_status )
+ if test "$ac_cv_type_time_t" = yes; then
+      { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot compute sizeof (time_t)
+ See \`config.log' for more details." >&2;}
+    { (exit 77); exit 77; }; }
+    else
+      ac_cv_sizeof_time_t=0
+    fi
  fi
- done
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f conftest.val
  fi
+ { echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
+ echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
  
- echo "$as_me:$LINENO: result: $ice_cv_have_bind_decl" >&5
- echo "${ECHO_T}$ice_cv_have_bind_decl" >&6
- if test "$ice_cv_have_bind_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_BIND_DECL 1
+ #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
  _ACEOF
  
- fi
- fi
- ice_have_bcopy=no
  
- for ac_func in bcopy
- 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 off_t" >&5
+ echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_off_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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
+ $ac_includes_default
+ typedef off_t ac__type_new_;
  int
  main ()
  {
- return f != $ac_func;
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_off_t=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
-  ice_have_bcopy=yes
+       ac_cv_type_off_t=no
  fi
- done
  
- if test "${ice_have_bcopy}" = yes; then
- echo "$as_me:$LINENO: checking for bcopy declaration in string.h strings.h stdlib.h" >&5
- echo $ECHO_N "checking for bcopy declaration in string.h strings.h stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_bcopy_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+ echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
+ if test $ac_cv_type_off_t = yes; then
+   :
  else
  
- ice_cv_have_bcopy_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in string.h strings.h stdlib.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
+ cat >>confdefs.h <<_ACEOF
+ #define off_t long int
  _ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
 +#include <$header>
  
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "${ice_re_word}bcopy[        ]*\(" >/dev/null 2>&1; then
 +  ice_cv_have_bcopy_decl=yes
  fi
 +rm -f conftest*
  
- if test "$ice_cv_have_bcopy_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
+ { echo "$as_me:$LINENO: checking for pid_t" >&5
+ echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_pid_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.  */
- #include <$header>
+ $ac_includes_default
+ typedef pid_t ac__type_new_;
+ int
+ main ()
+ {
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}bcopy[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_bcopy_decl=yes
- fi
- rm -f conftest*
+ 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
+   ac_cv_type_pid_t=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_bcopy_decl" = yes; then
-       break
+       ac_cv_type_pid_t=no
  fi
- done
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ice_cv_have_bcopy_decl" >&5
- echo "${ECHO_T}$ice_cv_have_bcopy_decl" >&6
- if test "$ice_cv_have_bcopy_decl" = yes; then
+ { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+ echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
+ if test $ac_cv_type_pid_t = yes; then
+   :
+ else
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_BCOPY_DECL 1
+ #define pid_t int
  _ACEOF
  
  fi
- fi
- ice_have_bzero=no
  
- for ac_func in bzero
- 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 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
    cat >conftest.$ac_ext <<_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
+ $ac_includes_default
+ typedef size_t ac__type_new_;
  int
  main ()
  {
- return f != $ac_func;
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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"
+   (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
  
- eval "$as_ac_var=no"
+       ac_cv_type_size_t=no
  fi
- rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
rm -f core conftest.err conftest.$ac_objext 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
+ { 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 int
  _ACEOF
-  ice_have_bzero=yes
  fi
 +done
  
- if test "${ice_have_bzero}" = yes; then
- echo "$as_me:$LINENO: checking for bzero declaration in string.h strings.h stdlib.h" >&5
- echo $ECHO_N "checking for bzero declaration in string.h strings.h stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_bzero_decl+set}" = set; then
+ { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
+ echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
+ if test "${ac_cv_type_uid_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
- ice_cv_have_bzero_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in string.h strings.h stdlib.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
+   cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
+ #include <sys/types.h>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "uid_t" >/dev/null 2>&1; then
+   ac_cv_type_uid_t=yes
+ else
+   ac_cv_type_uid_t=no
+ fi
+ rm -f conftest*
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+ echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
+ if test $ac_cv_type_uid_t = no; then
+ cat >>confdefs.h <<\_ACEOF
+ #define uid_t int
+ _ACEOF
  
+ cat >>confdefs.h <<\_ACEOF
+ #define gid_t int
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}bzero[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_bzero_decl=yes
- fi
- rm -f conftest*
  
- if test "$ice_cv_have_bzero_decl" = yes; then
-       break
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
+ { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+ echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
+ if test "${ac_cv_type_signal+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 <$header>
+ #include <sys/types.h>
+ #include <signal.h>
  
+ int
+ main ()
+ {
+ return *(signal (0, 0)) (0) == 1;
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}bzero[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_bzero_decl=yes
- fi
- rm -f conftest*
+ 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
+   ac_cv_type_signal=int
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_bzero_decl" = yes; then
-       break
+       ac_cv_type_signal=void
  fi
- done
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ice_cv_have_bzero_decl" >&5
- echo "${ECHO_T}$ice_cv_have_bzero_decl" >&6
- if test "$ice_cv_have_bzero_decl" = yes; then
+ { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+ echo "${ECHO_T}$ac_cv_type_signal" >&6; }
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_BZERO_DECL 1
+ #define RETSIGTYPE $ac_cv_type_signal
  _ACEOF
  
- fi
- fi
  
echo "$as_me:$LINENO: checking whether closedir returns void" >&5
- echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
- if test "${ac_cv_func_closedir_void+set}" = set; then
{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+ echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
+ if test "${ac_cv_struct_tm+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +  if test "$cross_compiling" = yes; then
 +  ac_cv_func_closedir_void=yes
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
- #include <$ac_header_dirent>
- #ifndef __cplusplus
- int closedir ();
- #endif
+ #include <sys/types.h>
+ #include <time.h>
  
  int
  main ()
  {
- exit (closedir (opendir (".")) != 0);
+ struct tm tm;
+                                    int *p = &tm.tm_sec;
+                                    return !p;
    ;
    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
+ 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
-   ac_cv_func_closedir_void=no
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_struct_tm=time.h
  else
 -  echo "$as_me: failed program was:" >&5
 +  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_func_closedir_void=yes
- fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       ac_cv_struct_tm=sys/time.h
  fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
- echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
- if test $ac_cv_func_closedir_void = yes; then
{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+ echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
+ if test $ac_cv_struct_tm = sys/time.h; then
  
  cat >>confdefs.h <<\_ACEOF
- #define CLOSEDIR_VOID 1
+ #define TM_IN_SYS_TIME 1
  _ACEOF
  
  fi
  
  
- ice_have_closelog=no
- for ac_func in closelog
- 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
+       ## lifted from config/gnulib/socklen.m4
+             { echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
+ echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6; }
+       if test "${gl_cv_socklen_t_equiv+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   # Systems have either "struct sockaddr *" or
+        # "void *" as the second argument to getpeername
+        gl_cv_socklen_t_equiv=
+        for arg2 in "struct sockaddr" void; do
+          for t in socklen_t int size_t "unsigned int" "long int" "unsigned long int"; do
+            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
+ #include <sys/types.h>
+               #include <sys/socket.h>
  
+               int getpeername (int, $arg2 *, $t *);
  int
  main ()
  {
- return f != $ac_func;
+ $t len;
+               getpeername (0, 0, &len);
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   gl_cv_socklen_t_equiv="$t"
  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
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+            test "$gl_cv_socklen_t_equiv" != "" && break
+          done
+          test "$gl_cv_socklen_t_equiv" != "" && break
+        done
  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
+       ## end lifting from config/gnulib/socklen.m4
+       # fallback if the check fails
+       if test "$gl_cv_socklen_t_equiv" = ""; then
+       gl_cv_socklen_t_equiv=socklen_t
+       fi
+       { echo "$as_me:$LINENO: result: $gl_cv_socklen_t_equiv" >&5
+ echo "${ECHO_T}$gl_cv_socklen_t_equiv" >&6; }
+ cat >>confdefs.h <<_ACEOF
+ #define socklen_t_equiv $gl_cv_socklen_t_equiv
  _ACEOF
 + ice_have_closelog=yes
 +fi
 +done
  
- if test "${ice_have_closelog}" = yes; then
- echo "$as_me:$LINENO: checking for closelog declaration in syslog.h" >&5
- echo $ECHO_N "checking for closelog declaration in syslog.h... $ECHO_C" >&6
- if test "${ice_cv_have_closelog_decl+set}" = set; then
+     { echo "$as_me:$LINENO: checking for sa_family_t" >&5
+ echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_sa_family_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +
 +ice_cv_have_closelog_decl=no
 +ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
 +ice_re_word='(^|[^a-zA-Z0-9_])'
 +for header in syslog.h; do
 +# Check for ordinary declaration
 +cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}closelog[     ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_closelog_decl=yes
- fi
- rm -f conftest*
+ #ifdef STDC_HEADERS
+ #include <stdlib.h>
+ #include <stddef.h>
+ #endif
+ #include <sys/socket.h>
  
- if test "$ice_cv_have_closelog_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
  
+ typedef sa_family_t ac__type_new_;
+ int
+ main ()
+ {
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}closelog[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_closelog_decl=yes
- fi
- rm -f conftest*
+ 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
+   ac_cv_type_sa_family_t=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_closelog_decl" = yes; then
-       break
+       ac_cv_type_sa_family_t=no
  fi
- done
  
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
+ { echo "$as_me:$LINENO: result: $ac_cv_type_sa_family_t" >&5
+ echo "${ECHO_T}$ac_cv_type_sa_family_t" >&6; }
+ if test $ac_cv_type_sa_family_t = yes; then
+   :
+ else
  
- echo "$as_me:$LINENO: result: $ice_cv_have_closelog_decl" >&5
- echo "${ECHO_T}$ice_cv_have_closelog_decl" >&6
- if test "$ice_cv_have_closelog_decl" = yes; then
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_CLOSELOG_DECL 1
+ cat >>confdefs.h <<\_ACEOF
+ #define sa_family_t unsigned short
  _ACEOF
  
- fi
  fi
  
  
- ice_have_connect=no
  
- for ac_func in connect
- 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 in_port_t" >&5
+ echo $ECHO_N "checking for in_port_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_in_port_t+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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>
+ #ifdef STDC_HEADERS
+ #include <stdlib.h>
+ #include <stddef.h>
  #endif
+ #include <netinet/in.h>
  
- #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
  
+ typedef in_port_t ac__type_new_;
  int
  main ()
  {
- return f != $ac_func;
+ if ((ac__type_new_ *) 0)
+   return 0;
+ if (sizeof (ac__type_new_))
+   return 0;
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_type_in_port_t=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_type_in_port_t=no
  fi
- rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
rm -f core conftest.err conftest.$ac_objext 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
+ { echo "$as_me:$LINENO: result: $ac_cv_type_in_port_t" >&5
+ echo "${ECHO_T}$ac_cv_type_in_port_t" >&6; }
+ if test $ac_cv_type_in_port_t = yes; then
+   :
+ else
+ cat >>confdefs.h <<\_ACEOF
+ #define in_port_t unsigned short
  _ACEOF
-  ice_have_connect=yes
  fi
- done
  
- if test "${ice_have_connect}" = yes; then
- echo "$as_me:$LINENO: checking for connect declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for connect declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_connect_decl+set}" = set; then
+ for ac_header in sys/wait.h wait.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
- ice_cv_have_connect_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
- # Check for ordinary declaration
+   # 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.  */
- #include <$header>
+ $ac_includes_default
+ #include <$ac_header>
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}connect[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_connect_decl=yes
- fi
- rm -f conftest*
+ 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
+   ac_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_connect_decl" = yes; then
-       break
+       ac_header_compiler=no
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ 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; }
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
+ #include <$ac_header>
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}connect[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_connect_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_connect_decl" = yes; then
-       break
- fi
- done
+ 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 && {
+        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
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+   ac_header_preproc=no
  fi
  
- echo "$as_me:$LINENO: result: $ice_cv_have_connect_decl" >&5
- echo "${ECHO_T}$ice_cv_have_connect_decl" >&6
- if test "$ice_cv_have_connect_decl" = yes; then
+ rm -f conftest.err conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6; }
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_CONNECT_DECL 1
- _ACEOF
+ # 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;}
  
+     ;;
+ esac
+ { 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
+ 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
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  
+ fi
  
- ice_have_dbm_open=no
+ done
  
- for ac_func in dbm_open
- 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 whether wait uses union wait" >&5
+ echo $ECHO_N "checking whether wait uses union wait... $ECHO_C" >&6; }
+ if test "${cf_cv_arg_union_wait+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+         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.  */
+ #include <sys/types.h>
  
- #ifdef __STDC__
- # include <limits.h>
+ #if HAVE_SYS_WAIT_H
+ # include <sys/wait.h>
  #else
- # include <assert.h>
+ # if HAVE_WAIT_H
+ #  include <wait.h>
+ # endif
  #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
- }
+ #ifdef __STDC__
+ pid_t wait(union wait *);
  #endif
  
  int
  main ()
  {
- return f != $ac_func;
+   union wait x; int i;
+   wait(&x); i = WIFEXITED(x)
    ;
    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
+ 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
+   cf_cv_arg_union_wait=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       cf_cv_arg_union_wait=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $cf_cv_arg_union_wait" >&5
+ echo "${ECHO_T}$cf_cv_arg_union_wait" >&6; }
+     if test $cf_cv_arg_union_wait = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define WAIT_USES_UNION 1
+ _ACEOF
+     fi
+ for ac_header in sys/wait.h wait.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ 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; }
+ 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 { (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_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"
+   (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
  
- eval "$as_ac_var=no"
- fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+       ac_header_compiler=no
  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
-  ice_have_dbm_open=yes
- fi
- done
  
- if test "${ice_have_dbm_open}" = yes; then
- echo "$as_me:$LINENO: checking for dbm_open declaration in ${DB_HEADER-no/db/header/file}" >&5
- echo $ECHO_N "checking for dbm_open declaration in ${DB_HEADER-no/db/header/file}... $ECHO_C" >&6
- if test "${ice_cv_have_dbm_open_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+ 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; }
  
- ice_cv_have_dbm_open_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in ${DB_HEADER-no/db/header/file}; do
- # Check for ordinary declaration
+ # 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 <$header>
+ #include <$ac_header>
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}dbm_open[     ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_dbm_open_decl=yes
- fi
- rm -f conftest*
+ 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 && {
+        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
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_dbm_open_decl" = yes; then
-       break
+   ac_header_preproc=no
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}dbm_open[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_dbm_open_decl=yes
- fi
- rm -f conftest*
+ rm -f conftest.err conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6; }
  
- if test "$ice_cv_have_dbm_open_decl" = yes; then
-       break
- fi
- done
+ # 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;}
  
+     ;;
+ esac
+ { 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  
- echo "$as_me:$LINENO: result: $ice_cv_have_dbm_open_decl" >&5
- echo "${ECHO_T}$ice_cv_have_dbm_open_decl" >&6
- if test "$ice_cv_have_dbm_open_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_DBM_OPEN_DECL 1
+ 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
- fi
  
+ done
  
- for ac_func in endmntent
- 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 whether wait uses int" >&5
+ echo $ECHO_N "checking whether wait uses int... $ECHO_C" >&6; }
+ if test "${cf_cv_arg_int+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+         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.  */
+ #include <sys/types.h>
  
- #ifdef __STDC__
- # include <limits.h>
+ #if HAVE_SYS_WAIT_H
+ # include <sys/wait.h>
  #else
- # include <assert.h>
+ # if HAVE_WAIT_H
+ #  include <wait.h>
+ # endif
  #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
- }
+ #ifdef __STDC__
+ pid_t wait(int *);
  #endif
  
  int
  main ()
  {
- return f != $ac_func;
+   int x; int i;
+   wait(&x); i = WIFEXITED(x)
    ;
    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
+ 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 -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"
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   cf_cv_arg_int=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       cf_cv_arg_int=no
  fi
- rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
rm -f core conftest.err conftest.$ac_objext 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
+ { echo "$as_me:$LINENO: result: $cf_cv_arg_int" >&5
+ echo "${ECHO_T}$cf_cv_arg_int" >&6; }
+ if test $cf_cv_arg_int = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define WAIT_USES_INT 1
  _ACEOF
  
  fi
 +done
  
  
- ice_have_fclose=no
+ #
+ # Libraries
+ #
+ # cur_colr is on some HP's
  
- for ac_func in fclose
- 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 main in -lcur_colr" >&5
+ echo $ECHO_N "checking for main in -lcur_colr... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_cur_colr_main+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lcur_colr  $LIBS"
+ 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 main ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_lib_cur_colr_main=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_lib_cur_colr_main=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
+ LIBS=$ac_check_lib_save_LIBS
  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
{ echo "$as_me:$LINENO: result: $ac_cv_lib_cur_colr_main" >&5
+ echo "${ECHO_T}$ac_cv_lib_cur_colr_main" >&6; }
+ if test $ac_cv_lib_cur_colr_main = yes; then
    cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ #define HAVE_LIBCUR_COLR 1
  _ACEOF
-  ice_have_fclose=yes
+   LIBS="-lcur_colr $LIBS"
  fi
- done
  
- if test "${ice_have_fclose}" = yes; then
echo "$as_me:$LINENO: checking for fclose declaration in stdio.h" >&5
- echo $ECHO_N "checking for fclose declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_fclose_decl+set}" = set; then
{ echo "$as_me:$LINENO: checking for main in -lintl" >&5
+ echo $ECHO_N "checking for main in -lintl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_intl_main+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
- ice_cv_have_fclose_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
- # Check for ordinary declaration
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lintl  $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fclose[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_fclose_decl=yes
- fi
- rm -f conftest*
  
- if test "$ice_cv_have_fclose_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
  
+ int
+ main ()
+ {
+ return main ();
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fclose[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_fclose_decl=yes
- fi
- rm -f conftest*
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_intl_main=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_fclose_decl" = yes; then
-       break
+       ac_cv_lib_intl_main=no
  fi
- done
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ice_cv_have_fclose_decl" >&5
- echo "${ECHO_T}$ice_cv_have_fclose_decl" >&6
- if test "$ice_cv_have_fclose_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_FCLOSE_DECL 1
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_main" >&5
+ echo "${ECHO_T}$ac_cv_lib_intl_main" >&6; }
+ if test $ac_cv_lib_intl_main = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBINTL 1
  _ACEOF
  
- fi
+   LIBS="-lintl $LIBS"
  fi
  
  
- ice_have_fflush=no
+     # Make sure we don't use -lnsl and -lsun on Irix systems.
+     case "$target" in
+       *sgi-irix*)
  
- for ac_func in fflush
- 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 main in -lsocket" >&5
+ echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_socket_main+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lsocket  $LIBS"
+ 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 main ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_lib_socket_main=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_lib_socket_main=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
+ LIBS=$ac_check_lib_save_LIBS
  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
{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
+ echo "${ECHO_T}$ac_cv_lib_socket_main" >&6; }
+ if test $ac_cv_lib_socket_main = yes; then
    cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-  ice_have_fflush=yes
- fi
- done
- if test "${ice_have_fflush}" = yes; then
- echo "$as_me:$LINENO: checking for fflush declaration in stdio.h" >&5
- echo $ECHO_N "checking for fflush declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_fflush_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ice_cv_have_fflush_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fflush[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_fflush_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_fflush_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
+ #define HAVE_LIBSOCKET 1
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fflush[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_fflush_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_fflush_decl" = yes; then
-       break
- fi
- done
- fi
- echo "$as_me:$LINENO: result: $ice_cv_have_fflush_decl" >&5
- echo "${ECHO_T}$ice_cv_have_fflush_decl" >&6
- if test "$ice_cv_have_fflush_decl" = yes; then
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_FFLUSH_DECL 1
- _ACEOF
+   LIBS="-lsocket $LIBS"
  
  fi
- fi
  
+                           ;;
+       *)
  
- ice_have_flock=no
- for ac_func in flock
- 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 main in -lresolv" >&5
+ echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_resolv_main+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
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lresolv  $LIBS"
+ 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 f != $ac_func;
+ return main ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_lib_resolv_main=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_lib_resolv_main=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
+ LIBS=$ac_check_lib_save_LIBS
  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
{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
+ echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6; }
+ if test $ac_cv_lib_resolv_main = yes; then
    cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ #define HAVE_LIBRESOLV 1
  _ACEOF
-  ice_have_flock=yes
+   LIBS="-lresolv $LIBS"
  fi
- done
  
- if test "${ice_have_flock}" = yes; then
echo "$as_me:$LINENO: checking for flock declaration in sys/file.h" >&5
- echo $ECHO_N "checking for flock declaration in sys/file.h... $ECHO_C" >&6
- if test "${ice_cv_have_flock_decl+set}" = set; then
{ echo "$as_me:$LINENO: checking for main in -lnsl" >&5
+ echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_nsl_main+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
- ice_cv_have_flock_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/file.h; do
- # Check for ordinary declaration
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lnsl  $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
  
+ int
+ main ()
+ {
+ return main ();
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}flock[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_flock_decl=yes
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_nsl_main=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_lib_nsl_main=no
  fi
- rm -f conftest*
  
- if test "$ice_cv_have_flock_decl" = yes; then
-       break
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
+ echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6; }
+ if test $ac_cv_lib_nsl_main = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNSL 1
+ _ACEOF
+   LIBS="-lnsl $LIBS"
+ fi
++done
+ { echo "$as_me:$LINENO: checking for main in -lsocket" >&5
+ echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_socket_main+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lsocket  $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
  
+ int
+ main ()
+ {
+ return main ();
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}flock[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_flock_decl=yes
- fi
- rm -f conftest*
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_socket_main=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_flock_decl" = yes; then
-       break
+       ac_cv_lib_socket_main=no
  fi
- done
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ice_cv_have_flock_decl" >&5
- echo "${ECHO_T}$ice_cv_have_flock_decl" >&6
- if test "$ice_cv_have_flock_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_FLOCK_DECL 1
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
+ echo "${ECHO_T}$ac_cv_lib_socket_main" >&6; }
+ if test $ac_cv_lib_socket_main = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBSOCKET 1
  _ACEOF
  
- fi
- fi
+   LIBS="-lsocket $LIBS"
  
+ fi
  
- ice_have_fprintf=no
  
- for ac_func in fprintf
- 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 main in -lsun" >&5
+ echo $ECHO_N "checking for main in -lsun... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_sun_main+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lsun  $LIBS"
+ 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 main ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_lib_sun_main=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_lib_sun_main=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
+ LIBS=$ac_check_lib_save_LIBS
  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
{ echo "$as_me:$LINENO: result: $ac_cv_lib_sun_main" >&5
+ echo "${ECHO_T}$ac_cv_lib_sun_main" >&6; }
+ if test $ac_cv_lib_sun_main = yes; then
    cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ #define HAVE_LIBSUN 1
  _ACEOF
-  ice_have_fprintf=yes
+   LIBS="-lsun $LIBS"
  fi
- done
  
- if test "${ice_have_fprintf}" = yes; then
- echo "$as_me:$LINENO: checking for fprintf declaration in stdio.h" >&5
- echo $ECHO_N "checking for fprintf declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_fprintf_decl+set}" = set; then
+                           ;;
+     esac
+     # search for pkg-config, which the glib configuration uses, adding a few
+     # system-specific search paths.
+     # Extract the first word of "pkg-config", so it can be a program name with args.
+ set dummy pkg-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_PKG_CONFIG+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
+   case $PKG_CONFIG in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ as_dummy="$LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin"
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PKG_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
+ IFS=$as_save_IFS
  
- ice_cv_have_fprintf_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fprintf[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_fprintf_decl=yes
+   ;;
+ esac
+ fi
+ PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+ if test -n "$PKG_CONFIG"; then
+   { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+ echo "${ECHO_T}$PKG_CONFIG" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
- rm -f conftest*
  
- if test "$ice_cv_have_fprintf_decl" = yes; then
-       break
+     case "$target" in
+       sparc-sun-solaris2.8) # Solaris 8
+           # give the linker a runtime search path; pkg-config doesn't supply this.
+           # Users could also specify this with LD_LIBRARY_PATH to both ./configure
+           # and make.  Adding this support here makes straight './configure; make'
+           # "just work" on Solaris 8
+           if test -n "$PKG_CONFIG"; then
+               glib_R_flag=`$PKG_CONFIG glib-2.0 --libs-only-L 2>/dev/null | sed -e 's/-L/-R/g'`
+               LDFLAGS="$LDFLAGS $glib_R_flag"
+           fi
+           ;;
+     esac
+     # Check whether --enable-glibtest was given.
+ if test "${enable_glibtest+set}" = set; then
+   enableval=$enable_glibtest;
+ else
+   enable_glibtest=yes
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fprintf[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_fprintf_decl=yes
+   pkg_config_args=glib-2.0
+   for module in . gmodule gobject gthread
+   do
+       case "$module" in
+          gmodule)
+              pkg_config_args="$pkg_config_args gmodule-2.0"
+          ;;
+          gmodule-no-export)
+              pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
+          ;;
+          gobject)
+              pkg_config_args="$pkg_config_args gobject-2.0"
+          ;;
+          gthread)
+              pkg_config_args="$pkg_config_args gthread-2.0"
+          ;;
+       esac
+   done
+ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}pkg-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_PKG_CONFIG+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $PKG_CONFIG in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_PKG_CONFIG="$PKG_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PKG_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
+ IFS=$as_save_IFS
+   ;;
+ esac
+ fi
+ PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+ if test -n "$PKG_CONFIG"; then
+   { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+ echo "${ECHO_T}$PKG_CONFIG" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
- rm -f conftest*
  
- if test "$ice_cv_have_fprintf_decl" = yes; then
-       break
  fi
+ if test -z "$ac_cv_path_PKG_CONFIG"; then
+   ac_pt_PKG_CONFIG=$PKG_CONFIG
+   # Extract the first word of "pkg-config", so it can be a program name with args.
+ set dummy pkg-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_ac_pt_PKG_CONFIG+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   case $ac_pt_PKG_CONFIG in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_ac_pt_PKG_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
+ IFS=$as_save_IFS
  
+   ;;
+ esac
+ fi
+ ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+ if test -n "$ac_pt_PKG_CONFIG"; then
+   { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+ echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
  
- echo "$as_me:$LINENO: result: $ice_cv_have_fprintf_decl" >&5
- echo "${ECHO_T}$ice_cv_have_fprintf_decl" >&6
- if test "$ice_cv_have_fprintf_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_FPRINTF_DECL 1
- _ACEOF
+   if test "x$ac_pt_PKG_CONFIG" = x; then
+     PKG_CONFIG=""
+   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@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@gnu.org." >&2;}
+ ac_tool_warned=yes ;;
+ esac
+     PKG_CONFIG=$ac_pt_PKG_CONFIG
+   fi
+ else
+   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+ fi
  
  fi
+ if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.16
+       { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+ echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+       else
+               { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+               PKG_CONFIG=""
+       fi
  fi
  
+   no_glib=""
  
- ice_have_fputc=no
+   if test "x$PKG_CONFIG" = x ; then
+     no_glib=yes
+     PKG_CONFIG=no
+   fi
  
- for ac_func in fputc
- 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
+   min_glib_version=2.2.0
+   { echo "$as_me:$LINENO: checking for GLIB - version >= $min_glib_version" >&5
+ echo $ECHO_N "checking for GLIB - version >= $min_glib_version... $ECHO_C" >&6; }
+   if test x$PKG_CONFIG != xno ; then
+     ## don't try to run the test against uninstalled libtool libs
+     if $PKG_CONFIG --uninstalled $pkg_config_args; then
+         echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
+         enable_glibtest=no
+     fi
+     if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
+         :
+     else
+         no_glib=yes
+     fi
+   fi
+   if test x"$no_glib" = x ; then
+     GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
+     GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
+     GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+     GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
+     GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
+     glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
+            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+     glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
+            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+     glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
+            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+     if test "x$enable_glibtest" = "xyes" ; then
+       ac_save_CFLAGS="$CFLAGS"
+       ac_save_LIBS="$LIBS"
+       CFLAGS="$CFLAGS $GLIB_CFLAGS"
+       LIBS="$GLIB_LIBS $LIBS"
+       rm -f conf.glibtest
+       if test "$cross_compiling" = yes; then
+   echo $ac_n "cross compiling; assumed OK... $ac_c"
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  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.  */
+ #include <glib.h>
+ #include <stdio.h>
+ #include <stdlib.h>
  
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
+ int
+ main ()
+ {
+   int major, minor, micro;
+   char *tmp_version;
  
- #undef $ac_func
+   system ("touch conf.glibtest");
  
- /* 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
+   /* HP/UX 9 (%@#!) writes to sscanf strings */
+   tmp_version = g_strdup("$min_glib_version");
+   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+      printf("%s, bad version string\n", "$min_glib_version");
+      exit(1);
+    }
+   if ((glib_major_version != $glib_config_major_version) ||
+       (glib_minor_version != $glib_config_minor_version) ||
+       (glib_micro_version != $glib_config_micro_version))
+     {
+       printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
+              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+              glib_major_version, glib_minor_version, glib_micro_version);
+       printf ("*** was found! If pkg-config was correct, then it is best\n");
+       printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
+       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+       printf("*** required on your system.\n");
+       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+       printf("*** to point to the correct configuration files\n");
+     }
+   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+          (glib_minor_version != GLIB_MINOR_VERSION) ||
+            (glib_micro_version != GLIB_MICRO_VERSION))
+     {
+       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+            GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+       printf("*** library (version %d.%d.%d)\n",
+            glib_major_version, glib_minor_version, glib_micro_version);
+     }
+   else
+     {
+       if ((glib_major_version > major) ||
+         ((glib_major_version == major) && (glib_minor_version > minor)) ||
+         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+       {
+         return 0;
+        }
+      else
+       {
+         printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
+                glib_major_version, glib_minor_version, glib_micro_version);
+         printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
+              major, minor, micro);
+         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+         printf("***\n");
+         printf("*** If you have already installed a sufficiently new version, this error\n");
+         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+         printf("*** being found. The easiest way to fix this is to remove the old version\n");
+         printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
+         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+         printf("*** so that the correct libraries are found at run-time))\n");
+       }
+     }
+   return 1;
  }
- #endif
+ _ACEOF
+ rm -f conftest$ac_exeext
+ 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'
+   { (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: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ ( exit $ac_status )
+ no_glib=yes
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+        CFLAGS="$ac_save_CFLAGS"
+        LIBS="$ac_save_LIBS"
+      fi
+   fi
+   if test "x$no_glib" = x ; then
+      { echo "$as_me:$LINENO: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5
+ echo "${ECHO_T}yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; }
+      :
+   else
+      { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+      if test "$PKG_CONFIG" = "no" ; then
+        echo "*** A new enough version of pkg-config was not found."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig/"
+      else
+        if test -f conf.glibtest ; then
+         :
+        else
+           echo "*** Could not run GLIB test program, checking why..."
+           ac_save_CFLAGS="$CFLAGS"
+           ac_save_LIBS="$LIBS"
+           CFLAGS="$CFLAGS $GLIB_CFLAGS"
+           LIBS="$LIBS $GLIB_LIBS"
+           cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <glib.h>
+ #include <stdio.h>
  
  int
  main ()
  {
return f != $ac_func;
 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
    ;
    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
-   eval "$as_ac_var=yes"
+   (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 "*** The test program compiled, but did not run. This usually means"
+           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+           echo "*** is required on your system"
+         echo "***"
+           echo "*** If you have an old version installed, it is best to remove it, although"
+           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+        echo "*** The test program failed to compile or link. See the file config.log for the"
+           echo "*** exact error that occured. This usually means GLIB is incorrectly installed."
  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
- if test `eval echo '${'$as_ac_var'}'` = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-  ice_have_fputc=yes
- fi
- done
+           CFLAGS="$ac_save_CFLAGS"
+           LIBS="$ac_save_LIBS"
+        fi
+      fi
+      GLIB_CFLAGS=""
+      GLIB_LIBS=""
+      GLIB_GENMARSHAL=""
+      GOBJECT_QUERY=""
+      GLIB_MKENUMS=""
+       { { echo "$as_me:$LINENO: error: glib not found or too old; See http://wiki.zmanda.com/index.php/Installation for help" >&5
+ echo "$as_me: error: glib not found or too old; See http://wiki.zmanda.com/index.php/Installation for help" >&2;}
+    { (exit 1); exit 1; }; }
  
- if test "${ice_have_fputc}" = yes; then
- echo "$as_me:$LINENO: checking for fputc declaration in stdio.h" >&5
- echo $ECHO_N "checking for fputc declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_fputc_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+   fi
  
- ice_cv_have_fputc_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fputc[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_fputc_decl=yes
- fi
- rm -f conftest*
  
- if test "$ice_cv_have_fputc_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fputc[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_fputc_decl=yes
- fi
- rm -f conftest*
  
- if test "$ice_cv_have_fputc_decl" = yes; then
-       break
- fi
- done
+   rm -f conf.glibtest
  
- fi
+     CFLAGS="$CFLAGS $GLIB_CFLAGS"
  
- echo "$as_me:$LINENO: result: $ice_cv_have_fputc_decl" >&5
- echo "${ECHO_T}$ice_cv_have_fputc_decl" >&6
- if test "$ice_cv_have_fputc_decl" = yes; then
+     CPPFLAGS="$CPPFLAGS $GLIB_CPPFLAGS"
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_FPUTC_DECL 1
- _ACEOF
+     LIBS="$GLIB_LIBS $LIBS"
+ # Check whether --with-readline was given.
+ if test "${with_readline+set}" = set; then
+   withval=$with_readline;
+             case "$withval" in
+                 y | ye | yes | n | no) : ;;
+                 *) { { echo "$as_me:$LINENO: error: *** --with-readline does not take a value" >&5
+ echo "$as_me: error: *** --with-readline does not take a value" >&2;}
+    { (exit 1); exit 1; }; }
+             esac
+             want_readline="$withval"
+ else
+             want_readline="maybe" # meaning "only if we can find it"
  
  fi
- fi
  
- ice_have_fputs=no
  
- for ac_func in fputs
- 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
+     # unless the user said "no", look for readline.
+     if test x"$want_readline" != x"no"; then
+         # we need a tgetent() somewhere..
+         proceed="false"
+         { echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
+ echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ltermcap  $LIBS"
+ 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
+ /* 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.  */
- 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
- }
+ extern "C"
  #endif
+ char tgetent ();
  int
  main ()
  {
- return f != $ac_func;
+ return tgetent ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_lib_termcap_tgetent=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_lib_termcap_tgetent=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
+ LIBS=$ac_check_lib_save_LIBS
  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
-  ice_have_fputs=yes
- fi
- done
- if test "${ice_have_fputs}" = yes; then
- echo "$as_me:$LINENO: checking for fputs declaration in stdio.h" >&5
- echo $ECHO_N "checking for fputs declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_fputs_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5
+ echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6; }
+ if test $ac_cv_lib_termcap_tgetent = yes; then
  
- ice_cv_have_fputs_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
+             READLINE_LIBS="-ltermcap"
+             proceed="true"
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fputs[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_fputs_decl=yes
- fi
- rm -f conftest*
+ else
  
- if test "$ice_cv_have_fputs_decl" = yes; then
-       break
- fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
+             { echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5
+ echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_curses_tgetent+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lcurses  $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
  
+ /* 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
+ char tgetent ();
+ int
+ main ()
+ {
+ return tgetent ();
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fputs[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_fputs_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_fputs_decl" = yes; then
-       break
- fi
- done
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_curses_tgetent=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+       ac_cv_lib_curses_tgetent=no
  fi
  
- echo "$as_me:$LINENO: result: $ice_cv_have_fputs_decl" >&5
- echo "${ECHO_T}$ice_cv_have_fputs_decl" >&6
- if test "$ice_cv_have_fputs_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_FPUTS_DECL 1
- _ACEOF
- fi
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5
+ echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6; }
+ if test $ac_cv_lib_curses_tgetent = yes; then
  
+                 READLINE_LIBS="-lcurses"
+                 proceed="true"
  
- ice_have_fread=no
+ else
  
- for ac_func in fread
- 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 tgetent in -lncurses" >&5
+ echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lncurses  $LIBS"
+ 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
+ /* 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.  */
- 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
- }
+ extern "C"
  #endif
+ char tgetent ();
  int
  main ()
  {
- return f != $ac_func;
+ return tgetent ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_lib_ncurses_tgetent=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_lib_ncurses_tgetent=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
+ LIBS=$ac_check_lib_save_LIBS
  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
-  ice_have_fread=yes
{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5
+ echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6; }
+ if test $ac_cv_lib_ncurses_tgetent = yes; then
+                     READLINE_LIBS="-lncurses"
+                     proceed="true"
  fi
- done
  
- if test "${ice_have_fread}" = yes; then
- echo "$as_me:$LINENO: checking for fread declaration in stdio.h stdlib.h" >&5
- echo $ECHO_N "checking for fread declaration in stdio.h stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_fread_decl+set}" = set; then
+ fi
+ fi
+         if $proceed; then
+             proceed="false"
+ for ac_header in history.h readline.h readline/history.h readline/readline.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
- ice_cv_have_fread_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h stdlib.h; do
- # Check for ordinary declaration
+   # 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.  */
- #include <$header>
+ $ac_includes_default
+ #include <$ac_header>
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fread[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_fread_decl=yes
- fi
- rm -f conftest*
+ 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
+   ac_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_fread_decl" = yes; then
-       break
+       ac_header_compiler=no
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ 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; }
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
+ #include <$ac_header>
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fread[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_fread_decl=yes
- fi
- rm -f conftest*
+ 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 && {
+        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
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_fread_decl" = yes; then
-       break
+   ac_header_preproc=no
  fi
- done
  
- 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: $ice_cv_have_fread_decl" >&5
- echo "${ECHO_T}$ice_cv_have_fread_decl" >&6
- if test "$ice_cv_have_fread_decl" = yes; then
+ # 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 >>confdefs.h <<_ACEOF
- #define HAVE_FREAD_DECL 1
- _ACEOF
+     ;;
+ esac
+ { 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
+ 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
+   cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+                 # found at least one of the headers, so we can proceed.
+                 proceed="true"
  fi
  
+ done
  
- ice_have_fseek=no
+         fi
  
- for ac_func in fseek
- 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
+         if $proceed; then
+             proceed="false"
+             { echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
+ echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_readline_readline+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lreadline $READLINE_LIBS $LIBS"
+ 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
+ /* 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.  */
- 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
- }
+ extern "C"
  #endif
+ char readline ();
  int
  main ()
  {
- return f != $ac_func;
+ return readline ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_lib_readline_readline=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
-  ice_have_fseek=yes
- fi
- done
- if test "${ice_have_fseek}" = yes; then
- echo "$as_me:$LINENO: checking for fseek declaration in stdio.h" >&5
- echo $ECHO_N "checking for fseek declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_fseek_decl+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ice_cv_have_fseek_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
- # Check for ordinary declaration
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fseek[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_fseek_decl=yes
+       ac_cv_lib_readline_readline=no
  fi
- rm -f conftest*
  
- if test "$ice_cv_have_fseek_decl" = yes; then
-       break
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
+ echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
+ if test $ac_cv_lib_readline_readline = yes; then
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fseek[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_fseek_decl=yes
- fi
- rm -f conftest*
+                 READLINE_LIBS="-lreadline $READLINE_LIBS"
+                 proceed="true"
  
- if test "$ice_cv_have_fseek_decl" = yes; then
-       break
  fi
- done
  
- fi
        fi
  
- echo "$as_me:$LINENO: result: $ice_cv_have_fseek_decl" >&5
- echo "${ECHO_T}$ice_cv_have_fseek_decl" >&6
- if test "$ice_cv_have_fseek_decl" = yes; then
+         if $proceed; then
+             # we have readline!
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_FSEEK_DECL 1
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_READLINE 1
  _ACEOF
  
- fi
- fi
+         else
+             # no readline.  if the user *really* wanted it, bail out.
+             if test x"$want_readline" = x"yes"; then
+                 { { echo "$as_me:$LINENO: error: *** No readline implementation found.  Try using --with-libraries and --with-includes" >&5
+ echo "$as_me: error: *** No readline implementation found.  Try using --with-libraries and --with-includes" >&2;}
+    { (exit 1); exit 1; }; }
+             fi
+             READLINE_LIBS=""
+         fi
+     fi
  
  
- ice_have_fwrite=no
  
- for ac_func in fwrite
- 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 modf in -lm" >&5
+ echo $ECHO_N "checking for modf in -lm... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_m_modf+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lm  $LIBS"
+ 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
+ /* 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.  */
- 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
- }
+ extern "C"
  #endif
+ char modf ();
  int
  main ()
  {
- return f != $ac_func;
+ return modf ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_lib_m_modf=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_lib_m_modf=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
+ LIBS=$ac_check_lib_save_LIBS
  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
{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_modf" >&5
+ echo "${ECHO_T}$ac_cv_lib_m_modf" >&6; }
+ if test $ac_cv_lib_m_modf = yes; then
    cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ #define HAVE_LIBM 1
  _ACEOF
-  ice_have_fwrite=yes
+   LIBS="-lm $LIBS"
  fi
- done
  
- if test "${ice_have_fwrite}" = yes; then
- echo "$as_me:$LINENO: checking for fwrite declaration in stdio.h stdlib.h" >&5
- echo $ECHO_N "checking for fwrite declaration in stdio.h stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_fwrite_decl+set}" = set; then
+     if test "${ac_cv_header_execinfo_h+set}" = set; then
+   { echo "$as_me:$LINENO: checking for execinfo.h" >&5
+ echo $ECHO_N "checking for execinfo.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_execinfo_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_header_execinfo_h" >&5
+ echo "${ECHO_T}$ac_cv_header_execinfo_h" >&6; }
  else
- ice_cv_have_fwrite_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h stdlib.h; do
- # Check for ordinary declaration
+   # Is the header compilable?
+ { echo "$as_me:$LINENO: checking execinfo.h usability" >&5
+ echo $ECHO_N "checking execinfo.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.  */
- #include <$header>
+ $ac_includes_default
+ #include <execinfo.h>
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fwrite[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_fwrite_decl=yes
- fi
- rm -f conftest*
+ 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
+   ac_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- if test "$ice_cv_have_fwrite_decl" = yes; then
-       break
+       ac_header_compiler=no
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ 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 execinfo.h presence" >&5
+ echo $ECHO_N "checking execinfo.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 <$header>
+ #include <execinfo.h>
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}fwrite[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_fwrite_decl=yes
- fi
- rm -f conftest*
- if test "$ice_cv_have_fwrite_decl" = yes; then
-       break
- fi
- done
+ 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 && {
+        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
+ sed 's/^/| /' conftest.$ac_ext >&5
  
+   ac_header_preproc=no
  fi
  
- echo "$as_me:$LINENO: result: $ice_cv_have_fwrite_decl" >&5
- echo "${ECHO_T}$ice_cv_have_fwrite_decl" >&6
- if test "$ice_cv_have_fwrite_decl" = yes; then
+ rm -f conftest.err conftest.$ac_ext
+ { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6; }
  
- cat >>confdefs.h <<_ACEOF
- #define HAVE_FWRITE_DECL 1
- _ACEOF
+ # 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: execinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: execinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+     { echo "$as_me:$LINENO: WARNING: execinfo.h: proceeding with the compiler's result" >&5
+ echo "$as_me: WARNING: execinfo.h: proceeding with the compiler's result" >&2;}
+     ac_header_preproc=yes
+     ;;
+   no:yes:* )
+     { echo "$as_me:$LINENO: WARNING: execinfo.h: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: execinfo.h: present but cannot be compiled" >&2;}
+     { echo "$as_me:$LINENO: WARNING: execinfo.h:     check for missing prerequisite headers?" >&5
+ echo "$as_me: WARNING: execinfo.h:     check for missing prerequisite headers?" >&2;}
+     { echo "$as_me:$LINENO: WARNING: execinfo.h: see the Autoconf documentation" >&5
+ echo "$as_me: WARNING: execinfo.h: see the Autoconf documentation" >&2;}
+     { echo "$as_me:$LINENO: WARNING: execinfo.h:     section \"Present But Cannot Be Compiled\"" >&5
+ echo "$as_me: WARNING: execinfo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+     { echo "$as_me:$LINENO: WARNING: execinfo.h: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: execinfo.h: proceeding with the preprocessor's result" >&2;}
+     { echo "$as_me:$LINENO: WARNING: execinfo.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: execinfo.h: in the future, the compiler will take precedence" >&2;}
  
+     ;;
+ esac
+ { echo "$as_me:$LINENO: checking for execinfo.h" >&5
+ echo $ECHO_N "checking for execinfo.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_execinfo_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_cv_header_execinfo_h=$ac_header_preproc
  fi
- fi
+ { echo "$as_me:$LINENO: result: $ac_cv_header_execinfo_h" >&5
+ echo "${ECHO_T}$ac_cv_header_execinfo_h" >&6; }
  
+ fi
+ if test $ac_cv_header_execinfo_h = yes; then
  
- for ac_func in getfsent
- 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 backtrace_symbols_fd" >&5
+ echo $ECHO_N "checking for backtrace_symbols_fd... $ECHO_C" >&6; }
+ if test "${ac_cv_func_backtrace_symbols_fd+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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.
+ /* Define backtrace_symbols_fd to an innocuous variant, in case <limits.h> declares backtrace_symbols_fd.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
- #define $ac_func innocuous_$ac_func
+ #define backtrace_symbols_fd innocuous_backtrace_symbols_fd
  
  /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char $ac_func (); below.
+     which can conflict with char backtrace_symbols_fd (); below.
      Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
      <limits.h> exists even on freestanding compilers.  */
  
  # include <assert.h>
  #endif
  
- #undef $ac_func
+ #undef backtrace_symbols_fd
  
- /* 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 ();
+ char backtrace_symbols_fd ();
  /* 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_backtrace_symbols_fd || defined __stub___backtrace_symbols_fd
  choke me
- #else
- char (*f) () = $ac_func;
- #endif
- #ifdef __cplusplus
- }
  #endif
  
  int
  main ()
  {
- return f != $ac_func;
+ return backtrace_symbols_fd ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_backtrace_symbols_fd=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_func_backtrace_symbols_fd=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
- if test `eval echo '${'$as_ac_var'}'` = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ { echo "$as_me:$LINENO: result: $ac_cv_func_backtrace_symbols_fd" >&5
+ echo "${ECHO_T}$ac_cv_func_backtrace_symbols_fd" >&6; }
+ if test $ac_cv_func_backtrace_symbols_fd = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_GLIBC_BACKTRACE 1
  _ACEOF
  
  fi
- done
  
  
 -fi
 +ice_have_gethostname=no
  
- for ac_func in gethostname
+ #
+ # Declarations
+ #
+ # Checks for library functions and if the function is declared in
+ # an appropriate header file.  Functions which exist, but for which
+ # no declaration is available, are declared in common-src/amanda.h.
+ # It's not clear that any existing system implements but does not
+ # declare common functions such as these.
+ #
+ ice_have_accept=no
+ for ac_func in accept
  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
@@@ -48902,87 -54965,79 +57009,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_gethostname=yes
+  ice_have_accept=yes
  fi
  done
  
- if test "${ice_have_gethostname}" = yes; then
echo "$as_me:$LINENO: checking for gethostname declaration in unistd.h" >&5
- echo $ECHO_N "checking for gethostname declaration in unistd.h... $ECHO_C" >&6
- if test "${ice_cv_have_gethostname_decl+set}" = set; then
+ if test "${ice_have_accept}" = yes; then
{ echo "$as_me:$LINENO: checking for accept declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for accept declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_accept_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_gethostname_decl=no
+ ice_cv_have_accept_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in unistd.h; do
+ for header in sys/types.h sys/socket.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -48994,12 -55049,12 +57093,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}gethostname[  ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_gethostname_decl=yes
+   $EGREP "${ice_re_word}accept[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_accept_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_gethostname_decl" = yes; then
+ if test "$ice_cv_have_accept_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -49013,243 -55068,218 +57112,220 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}gethostname[  ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_gethostname_decl=yes
+   $EGREP "${ice_re_word}accept[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_accept_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_gethostname_decl" = yes; then
+ if test "$ice_cv_have_accept_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_gethostname_decl" >&5
- echo "${ECHO_T}$ice_cv_have_gethostname_decl" >&6
- if test "$ice_cv_have_gethostname_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_accept_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_accept_decl" >&6; }
+ if test "$ice_cv_have_accept_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_GETHOSTNAME_DECL 1
+ #define HAVE_ACCEPT_DECL 1
  _ACEOF
  
  fi
  fi
  
- # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
- echo "$as_me:$LINENO: checking for getmntent in -lsun" >&5
- echo $ECHO_N "checking for getmntent in -lsun... $ECHO_C" >&6
- if test "${ac_cv_lib_sun_getmntent+set}" = set; then
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments.  Useless!
+ { echo "$as_me:$LINENO: checking for working alloca.h" >&5
+ echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
+ if test "${ac_cv_working_alloca_h+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lsun  $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 getmntent ();
+ #include <alloca.h>
  int
  main ()
  {
- getmntent ();
+ char *p = (char *) alloca (2 * sizeof (int));
+                         if (p) return 0;
    ;
    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
-   ac_cv_lib_sun_getmntent=yes
+   (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_working_alloca_h=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_lib_sun_getmntent=no
      ac_cv_working_alloca_h=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
 +LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_sun_getmntent" >&5
- echo "${ECHO_T}$ac_cv_lib_sun_getmntent" >&6
- if test $ac_cv_lib_sun_getmntent = yes; then
-   LIBS="-lsun $LIBS"
- else
-   echo "$as_me:$LINENO: checking for getmntent in -lseq" >&5
- echo $ECHO_N "checking for getmntent in -lseq... $ECHO_C" >&6
- if test "${ac_cv_lib_seq_getmntent+set}" = set; then
+ { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+ echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
+ if test $ac_cv_working_alloca_h = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_ALLOCA_H 1
+ _ACEOF
+ fi
+ { echo "$as_me:$LINENO: checking for alloca" >&5
+ echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
+ if test "${ac_cv_func_alloca_works+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lseq  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   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"
+ #ifdef __GNUC__
+ # define alloca __builtin_alloca
+ #else
+ # ifdef _MSC_VER
+ #  include <malloc.h>
+ #  define alloca _alloca
+ # else
+ #  ifdef HAVE_ALLOCA_H
+ #   include <alloca.h>
+ #  else
+ #   ifdef _AIX
+  #pragma alloca
+ #   else
+ #    ifndef alloca /* predefined by HP cc +Olibcalls */
+ char *alloca ();
+ #    endif
+ #   endif
+ #  endif
+ # endif
  #endif
- /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
- char getmntent ();
  int
  main ()
  {
- getmntent ();
+ char *p = (char *) alloca (1);
+                                   if (p) return 0;
    ;
    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
-   ac_cv_lib_seq_getmntent=yes
+   (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_alloca_works=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
ac_cv_lib_seq_getmntent=no
      ac_cv_func_alloca_works=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
- LIBS=$ac_check_lib_save_LIBS
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_seq_getmntent" >&5
- echo "${ECHO_T}$ac_cv_lib_seq_getmntent" >&6
- if test $ac_cv_lib_seq_getmntent = yes; then
-   LIBS="-lseq $LIBS"
+ { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+ echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
+ if test $ac_cv_func_alloca_works = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_ALLOCA 1
+ _ACEOF
  else
-   echo "$as_me:$LINENO: checking for getmntent in -lgen" >&5
- echo $ECHO_N "checking for getmntent in -lgen... $ECHO_C" >&6
- if test "${ac_cv_lib_gen_getmntent+set}" = set; then
+   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble.  Some versions do not even contain alloca or
+ # contain a buggy version.  If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+ cat >>confdefs.h <<\_ACEOF
+ #define C_ALLOCA 1
+ _ACEOF
+ { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+ echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
+ if test "${ac_cv_os_cray+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lgen  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   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"
+ #if defined CRAY && ! defined CRAY2
+ webecray
+ #else
+ wenotbecray
  #endif
- /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
- char getmntent ();
- int
- main ()
- {
- getmntent ();
-   ;
-   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_gen_getmntent=yes
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "webecray" >/dev/null 2>&1; then
+   ac_cv_os_cray=yes
  else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_gen_getmntent=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_gen_getmntent" >&5
- echo "${ECHO_T}$ac_cv_lib_gen_getmntent" >&6
- if test $ac_cv_lib_gen_getmntent = yes; then
-   LIBS="-lgen $LIBS"
- fi
+   ac_cv_os_cray=no
  fi
 -rm -f conftest*
  
  fi
- for ac_func in getmntent
- 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: result: $ac_cv_os_cray" >&5
+ echo "${ECHO_T}$ac_cv_os_cray" >&6; }
+ if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; 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 { 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
@@@ -49275,86 -55305,158 +57351,158 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
+ cat >>confdefs.h <<_ACEOF
+ #define CRAY_STACKSEG_END $ac_func
  _ACEOF
  
+     break
  fi
- done
  
+   done
+ fi
+ { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+ echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
+ if test "${ac_cv_c_stack_direction+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test "$cross_compiling" = yes; then
+   ac_cv_c_stack_direction=0
+ 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
+ find_stack_direction ()
+ {
+   static char *addr = 0;
+   auto char dummy;
+   if (addr == 0)
+     {
+       addr = &dummy;
+       return find_stack_direction ();
+     }
+   else
+     return (&dummy > addr) ? 1 : -1;
+ }
+ int
+ main ()
+ {
+   return find_stack_direction () < 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+ 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'
+   { (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_c_stack_direction=1
+ 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_c_stack_direction=-1
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
  
  
- ice_have_getopt=no
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+ echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
  
- for ac_func in getopt
+ cat >>confdefs.h <<_ACEOF
+ #define STACK_DIRECTION $ac_cv_c_stack_direction
+ _ACEOF
+ fi
+ for ac_func in atexit
  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
@@@ -49380,149 -55482,77 +57528,141 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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)
- choke me
- #else
- char (*f) () = $ac_func;
- #endif
- #ifdef __cplusplus
- }
+ #if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
  #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
 + ice_have_getopt=yes
 +fi
 +done
  
 +if test "${ice_have_getopt}" = yes; then
 +echo "$as_me:$LINENO: checking for getopt declaration in stdlib.h unistd.h libc.h" >&5
 +echo $ECHO_N "checking for getopt declaration in stdlib.h unistd.h libc.h... $ECHO_C" >&6
 +if test "${ice_cv_have_getopt_decl+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +
 +ice_cv_have_getopt_decl=no
 +ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
 +ice_re_word='(^|[^a-zA-Z0-9_])'
 +for header in stdlib.h unistd.h libc.h; do
 +# Check for ordinary declaration
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
 +#include <$header>
 +
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "${ice_re_word}getopt[       ]*\(" >/dev/null 2>&1; then
 +  ice_cv_have_getopt_decl=yes
 +fi
 +rm -f conftest*
 +
 +if test "$ice_cv_have_getopt_decl" = yes; then
 +      break
 +fi
 +# Check for "fixed" declaration like "getpid _PARAMS((int))"
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
 +#include <$header>
 +
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "${ice_re_word}getopt[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
 +  ice_cv_have_getopt_decl=yes
 +fi
 +rm -f conftest*
 +
 +if test "$ice_cv_have_getopt_decl" = yes; then
 +      break
  fi
  done
  
 +fi
 +
 +echo "$as_me:$LINENO: result: $ice_cv_have_getopt_decl" >&5
 +echo "${ECHO_T}$ice_cv_have_getopt_decl" >&6
 +if test "$ice_cv_have_getopt_decl" = yes; then
 +
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETOPT_DECL 1
 +_ACEOF
 +
 +fi
 +fi
 +
  
- ice_have_getpeername=no
+ ice_have_atof=no
  
- for ac_func in getpeername
+ for ac_func in atof
  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
@@@ -49548,87 -55578,79 +57688,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_getpeername=yes
+  ice_have_atof=yes
  fi
  done
  
- if test "${ice_have_getpeername}" = yes; then
echo "$as_me:$LINENO: checking for getpeername declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for getpeername declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_getpeername_decl+set}" = set; then
+ if test "${ice_have_atof}" = yes; then
{ echo "$as_me:$LINENO: checking for atof declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for atof declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_atof_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_getpeername_decl=no
+ ice_cv_have_atof_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
+ for header in stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -49640,12 -55662,12 +57772,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}getpeername[  ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_getpeername_decl=yes
+   $EGREP "${ice_re_word}atof[         ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_atof_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_getpeername_decl" = yes; then
+ if test "$ice_cv_have_atof_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -49659,36 -55681,38 +57791,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}getpeername[  ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_getpeername_decl=yes
+   $EGREP "${ice_re_word}atof[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_atof_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_getpeername_decl" = yes; then
+ if test "$ice_cv_have_atof_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_getpeername_decl" >&5
- echo "${ECHO_T}$ice_cv_have_getpeername_decl" >&6
- if test "$ice_cv_have_getpeername_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_atof_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_atof_decl" >&6; }
+ if test "$ice_cv_have_atof_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_GETPEERNAME_DECL 1
+ #define HAVE_ATOF_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- for ac_func in getpgrp
+ ice_have_atol=no
+ for ac_func in atol
  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
@@@ -49714,148 -55738,141 +57848,145 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
+  ice_have_atol=yes
  fi
  done
  
- echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
- echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
- if test "${ac_cv_func_getpgrp_void+set}" = set; then
+ if test "${ice_have_atol}" = yes; then
+ { echo "$as_me:$LINENO: checking for atol declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for atol declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_atol_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   # Use it with a single arg.
+ ice_cv_have_atol_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in stdlib.h; do
+ # Check for ordinary declaration
  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 ()
- {
- getpgrp (0);
-   ;
-   return 0;
- }
+ #include <$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_cv_func_getpgrp_void=no
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}atol[         ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_atol_decl=yes
+ fi
+ rm -f conftest*
  
- ac_cv_func_getpgrp_void=yes
+ if test "$ice_cv_have_atol_decl" = yes; then
+       break
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}atol[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_atol_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_atol_decl" = yes; then
+       break
+ fi
+ done
  
  fi
 +echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
 +echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
 +if test $ac_cv_func_getpgrp_void = yes; then
  
- cat >>confdefs.h <<\_ACEOF
- #define GETPGRP_VOID 1
+ { echo "$as_me:$LINENO: result: $ice_cv_have_atol_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_atol_decl" >&6; }
+ if test "$ice_cv_have_atol_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_ATOL_DECL 1
  _ACEOF
  
  fi
+ fi
  
  
- ice_have_getsockname=no
+ ice_have_atoll=no
  
- for ac_func in getsockname
+ for ac_func in atoll
  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
@@@ -49881,87 -55898,79 +58012,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_getsockname=yes
+  ice_have_atoll=yes
  fi
  done
  
- if test "${ice_have_getsockname}" = yes; then
echo "$as_me:$LINENO: checking for getsockname declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for getsockname declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_getsockname_decl+set}" = set; then
+ if test "${ice_have_atoll}" = yes; then
{ echo "$as_me:$LINENO: checking for atoll declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for atoll declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_atoll_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_getsockname_decl=no
+ ice_cv_have_atoll_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
+ for header in stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -49973,12 -55982,12 +58096,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}getsockname[  ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_getsockname_decl=yes
+   $EGREP "${ice_re_word}atoll[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_atoll_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_getsockname_decl" = yes; then
+ if test "$ice_cv_have_atoll_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -49992,38 -56001,38 +58115,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}getsockname[  ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_getsockname_decl=yes
+   $EGREP "${ice_re_word}atoll[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_atoll_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_getsockname_decl" = yes; then
+ if test "$ice_cv_have_atoll_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_getsockname_decl" >&5
- echo "${ECHO_T}$ice_cv_have_getsockname_decl" >&6
- if test "$ice_cv_have_getsockname_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_atoll_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_atoll_decl" >&6; }
+ if test "$ice_cv_have_atoll_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_GETSOCKNAME_DECL 1
+ #define HAVE_ATOLL_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_getsockopt=no
+ ice_have_strtol=no
  
- for ac_func in getsockopt
+ for ac_func in strtol
  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
@@@ -50049,87 -56058,79 +58172,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_getsockopt=yes
+  ice_have_strtol=yes
  fi
  done
  
- if test "${ice_have_getsockopt}" = yes; then
echo "$as_me:$LINENO: checking for getsockopt declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for getsockopt declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_getsockopt_decl+set}" = set; then
+ if test "${ice_have_strtol}" = yes; then
{ echo "$as_me:$LINENO: checking for strtol declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for strtol declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_strtol_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_getsockopt_decl=no
+ ice_cv_have_strtol_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
+ for header in stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -50141,12 -56142,12 +58256,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}getsockopt[   ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_getsockopt_decl=yes
+   $EGREP "${ice_re_word}strtol[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_strtol_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_getsockopt_decl" = yes; then
+ if test "$ice_cv_have_strtol_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -50160,38 -56161,38 +58275,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}getsockopt[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_getsockopt_decl=yes
+   $EGREP "${ice_re_word}strtol[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_strtol_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_getsockopt_decl" = yes; then
+ if test "$ice_cv_have_strtol_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_getsockopt_decl" >&5
- echo "${ECHO_T}$ice_cv_have_getsockopt_decl" >&6
- if test "$ice_cv_have_getsockopt_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_strtol_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_strtol_decl" >&6; }
+ if test "$ice_cv_have_strtol_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_GETSOCKOPT_DECL 1
+ #define HAVE_STRTOL_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_gettimeofday=no
+ ice_have_strtoll=no
  
- for ac_func in gettimeofday
+ for ac_func in strtoll
  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
@@@ -50217,87 -56218,79 +58332,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_gettimeofday=yes
+  ice_have_strtoll=yes
  fi
  done
  
- if test "${ice_have_gettimeofday}" = yes; then
echo "$as_me:$LINENO: checking for gettimeofday declaration in time.h sys/time.h" >&5
- echo $ECHO_N "checking for gettimeofday declaration in time.h sys/time.h... $ECHO_C" >&6
- if test "${ice_cv_have_gettimeofday_decl+set}" = set; then
+ if test "${ice_have_strtoll}" = yes; then
{ echo "$as_me:$LINENO: checking for strtoll declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for strtoll declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_strtoll_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_gettimeofday_decl=no
+ ice_cv_have_strtoll_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in time.h sys/time.h; do
+ for header in stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -50309,12 -56302,12 +58416,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}gettimeofday[         ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_gettimeofday_decl=yes
+   $EGREP "${ice_re_word}strtoll[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_strtoll_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_gettimeofday_decl" = yes; then
+ if test "$ice_cv_have_strtoll_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -50328,121 -56321,132 +58435,127 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}gettimeofday[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_gettimeofday_decl=yes
+   $EGREP "${ice_re_word}strtoll[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_strtoll_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_gettimeofday_decl" = yes; then
+ if test "$ice_cv_have_strtoll_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_gettimeofday_decl" >&5
- echo "${ECHO_T}$ice_cv_have_gettimeofday_decl" >&6
- if test "$ice_cv_have_gettimeofday_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_strtoll_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_strtoll_decl" >&6; }
+ if test "$ice_cv_have_strtoll_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_GETTIMEOFDAY_DECL 1
+ #define HAVE_STRTOLL_DECL 1
  _ACEOF
  
  fi
  fi
  
  
-       echo "$as_me:$LINENO: checking for gettimeofday number of arguments" >&5
- echo $ECHO_N "checking for gettimeofday number of arguments... $ECHO_C" >&6
- if test "${amanda_cv_gettimeofday_args+set}" = set; then
+ for ac_func in basename
+ 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 { 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
 +
 +              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>
 +#ifdef TIME_WITH_SYS_TIME
 +#  include <sys/time.h>
 +#  include <time.h>
  #else
- #  ifdef HAVE_SYS_TIME_H
- #    include <sys/time.h>
- #  else
- #    include <time.h>
- #  endif
+ # include <assert.h>
+ #endif
+ #undef $ac_func
+ /* 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
+ 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
  #endif
  
  int
  main ()
  {
-                       struct timeval val;
-                       struct timezone zone;
-                       gettimeofday(&val, &zone);
+ return $ac_func ();
    ;
    return 0;
  }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
-   amanda_cv_gettimeofday_args=2
+   (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
  
- amanda_cv_gettimeofday_args=1
+       eval "$as_ac_var=no"
  fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $amanda_cv_gettimeofday_args" >&5
- echo "${ECHO_T}$amanda_cv_gettimeofday_args" >&6
-       if test "$amanda_cv_gettimeofday_args" = 2; then
cat >>confdefs.h <<\_ACEOF
- #define HAVE_TWO_ARG_GETTIMEOFDAY 1
+ 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
  
 -fi
 -done
 +      fi
 +
 +
  
  
+ ice_have_bind=no
  
- for ac_func in getvfsent initgroups isascii
+ for ac_func in bind
  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
@@@ -50468,85 -56472,141 +58581,140 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
+  ice_have_bind=yes
+ fi
+ done
+ if test "${ice_have_bind}" = yes; then
+ { echo "$as_me:$LINENO: checking for bind declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for bind declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_bind_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ice_cv_have_bind_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in sys/types.h sys/socket.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}bind[         ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_bind_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_bind_decl" = yes; then
+       break
+ fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}bind[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_bind_decl=yes
+ fi
+ rm -f conftest*
  
+ if test "$ice_cv_have_bind_decl" = yes; then
+       break
  fi
  done
  
 -fi
  
- ice_have_initgroups=no
+ { echo "$as_me:$LINENO: result: $ice_cv_have_bind_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_bind_decl" >&6; }
+ if test "$ice_cv_have_bind_decl" = yes; then
  
- for ac_func in initgroups
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_BIND_DECL 1
+ _ACEOF
+ fi
+ fi
+ ice_have_bcopy=no
+ for ac_func in bcopy
  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
@@@ -50572,87 -56632,79 +58740,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_initgroups=yes
+  ice_have_bcopy=yes
  fi
  done
  
- if test "${ice_have_initgroups}" = yes; then
echo "$as_me:$LINENO: checking for initgroups declaration in grp.h sys/types.h unistd.h libc.h" >&5
- echo $ECHO_N "checking for initgroups declaration in grp.h sys/types.h unistd.h libc.h... $ECHO_C" >&6
- if test "${ice_cv_have_initgroups_decl+set}" = set; then
+ if test "${ice_have_bcopy}" = yes; then
{ echo "$as_me:$LINENO: checking for bcopy declaration in string.h strings.h stdlib.h" >&5
+ echo $ECHO_N "checking for bcopy declaration in string.h strings.h stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_bcopy_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_initgroups_decl=no
+ ice_cv_have_bcopy_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in grp.h sys/types.h unistd.h libc.h; do
+ for header in string.h strings.h stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -50664,12 -56716,12 +58824,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}initgroups[   ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_initgroups_decl=yes
+   $EGREP "${ice_re_word}bcopy[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_bcopy_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_initgroups_decl" = yes; then
+ if test "$ice_cv_have_bcopy_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -50683,38 -56735,38 +58843,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}initgroups[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_initgroups_decl=yes
+   $EGREP "${ice_re_word}bcopy[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_bcopy_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_initgroups_decl" = yes; then
+ if test "$ice_cv_have_bcopy_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_initgroups_decl" >&5
- echo "${ECHO_T}$ice_cv_have_initgroups_decl" >&6
- if test "$ice_cv_have_initgroups_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_bcopy_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_bcopy_decl" >&6; }
+ if test "$ice_cv_have_bcopy_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_INITGROUPS_DECL 1
+ #define HAVE_BCOPY_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_ioctl=no
+ ice_have_bzero=no
  
- for ac_func in ioctl
+ for ac_func in bzero
  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
@@@ -50740,87 -56792,79 +58900,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_ioctl=yes
+  ice_have_bzero=yes
  fi
  done
  
- if test "${ice_have_ioctl}" = yes; then
echo "$as_me:$LINENO: checking for ioctl declaration in sys/ioctl.h unistd.h libc.h" >&5
- echo $ECHO_N "checking for ioctl declaration in sys/ioctl.h unistd.h libc.h... $ECHO_C" >&6
- if test "${ice_cv_have_ioctl_decl+set}" = set; then
+ if test "${ice_have_bzero}" = yes; then
{ echo "$as_me:$LINENO: checking for bzero declaration in string.h strings.h stdlib.h" >&5
+ echo $ECHO_N "checking for bzero declaration in string.h strings.h stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_bzero_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_ioctl_decl=no
+ ice_cv_have_bzero_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/ioctl.h unistd.h libc.h; do
+ for header in string.h strings.h stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -50832,12 -56876,12 +58984,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}ioctl[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_ioctl_decl=yes
+   $EGREP "${ice_re_word}bzero[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_bzero_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_ioctl_decl" = yes; then
+ if test "$ice_cv_have_bzero_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -50851,38 -56895,110 +59003,110 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}ioctl[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_ioctl_decl=yes
+   $EGREP "${ice_re_word}bzero[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_bzero_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_ioctl_decl" = yes; then
+ if test "$ice_cv_have_bzero_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_ioctl_decl" >&5
- echo "${ECHO_T}$ice_cv_have_ioctl_decl" >&6
- if test "$ice_cv_have_ioctl_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_bzero_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_bzero_decl" >&6; }
+ if test "$ice_cv_have_bzero_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_IOCTL_DECL 1
+ #define HAVE_BZERO_DECL 1
  _ACEOF
  
  fi
  fi
  
+ { echo "$as_me:$LINENO: checking whether closedir returns void" >&5
+ echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6; }
+ if test "${ac_cv_func_closedir_void+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   if test "$cross_compiling" = yes; then
+   ac_cv_func_closedir_void=yes
+ 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_dirent>
+ #ifndef __cplusplus
+ int closedir ();
+ #endif
  
- ice_have_isnormal=no
+ int
+ main ()
+ {
+ return closedir (opendir (".")) != 0;
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+ 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'
+   { (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_closedir_void=no
+ else
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
  
- for ac_func in isnormal
+ ( exit $ac_status )
+ ac_cv_func_closedir_void=yes
+ fi
+ 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_closedir_void" >&5
+ echo "${ECHO_T}$ac_cv_func_closedir_void" >&6; }
+ if test $ac_cv_func_closedir_void = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define CLOSEDIR_VOID 1
+ _ACEOF
+ fi
+ ice_have_closelog=no
+ for ac_func in closelog
  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
@@@ -50908,87 -57024,79 +59132,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_isnormal=yes
+  ice_have_closelog=yes
  fi
  done
  
- if test "${ice_have_isnormal}" = yes; then
echo "$as_me:$LINENO: checking for isnormal declaration in math.h" >&5
- echo $ECHO_N "checking for isnormal declaration in math.h... $ECHO_C" >&6
- if test "${ice_cv_have_isnormal_decl+set}" = set; then
+ if test "${ice_have_closelog}" = yes; then
{ echo "$as_me:$LINENO: checking for closelog declaration in syslog.h" >&5
+ echo $ECHO_N "checking for closelog declaration in syslog.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_closelog_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_isnormal_decl=no
+ ice_cv_have_closelog_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in math.h; do
+ for header in syslog.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -51000,12 -57108,12 +59216,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}isnormal[     ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_isnormal_decl=yes
+   $EGREP "${ice_re_word}closelog[     ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_closelog_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_isnormal_decl" = yes; then
+ if test "$ice_cv_have_closelog_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -51019,38 -57127,38 +59235,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}isnormal[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_isnormal_decl=yes
+   $EGREP "${ice_re_word}closelog[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_closelog_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_isnormal_decl" = yes; then
+ if test "$ice_cv_have_closelog_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_isnormal_decl" >&5
- echo "${ECHO_T}$ice_cv_have_isnormal_decl" >&6
- if test "$ice_cv_have_isnormal_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_closelog_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_closelog_decl" >&6; }
+ if test "$ice_cv_have_closelog_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_ISNORMAL_DECL 1
+ #define HAVE_CLOSELOG_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_listen=no
+ ice_have_connect=no
  
- for ac_func in listen
+ for ac_func in connect
  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
@@@ -51076,84 -57184,76 +59292,76 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_listen=yes
+  ice_have_connect=yes
  fi
  done
  
- if test "${ice_have_listen}" = yes; then
echo "$as_me:$LINENO: checking for listen declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for listen declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_listen_decl+set}" = set; then
+ if test "${ice_have_connect}" = yes; then
{ echo "$as_me:$LINENO: checking for connect declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for connect declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_connect_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_listen_decl=no
+ ice_cv_have_connect_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
  for header in sys/types.h sys/socket.h; do
@@@ -51168,12 -57268,12 +59376,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}listen[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_listen_decl=yes
+   $EGREP "${ice_re_word}connect[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_connect_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_listen_decl" = yes; then
+ if test "$ice_cv_have_connect_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -51187,38 -57287,38 +59395,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}listen[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_listen_decl=yes
+   $EGREP "${ice_re_word}connect[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_connect_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_listen_decl" = yes; then
+ if test "$ice_cv_have_connect_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_listen_decl" >&5
- echo "${ECHO_T}$ice_cv_have_listen_decl" >&6
- if test "$ice_cv_have_listen_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_connect_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_connect_decl" >&6; }
+ if test "$ice_cv_have_connect_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_LISTEN_DECL 1
+ #define HAVE_CONNECT_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_lstat=no
+ ice_have_fclose=no
  
- for ac_func in lstat
+ for ac_func in fclose
  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
@@@ -51244,87 -57344,79 +59452,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_lstat=yes
+  ice_have_fclose=yes
  fi
  done
  
- if test "${ice_have_lstat}" = yes; then
echo "$as_me:$LINENO: checking for lstat declaration in sys/types.h sys/stat.h" >&5
- echo $ECHO_N "checking for lstat declaration in sys/types.h sys/stat.h... $ECHO_C" >&6
- if test "${ice_cv_have_lstat_decl+set}" = set; then
+ if test "${ice_have_fclose}" = yes; then
{ echo "$as_me:$LINENO: checking for fclose declaration in stdio.h" >&5
+ echo $ECHO_N "checking for fclose declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_fclose_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_lstat_decl=no
+ ice_cv_have_fclose_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/stat.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -51336,12 -57428,12 +59536,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}lstat[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_lstat_decl=yes
+   $EGREP "${ice_re_word}fclose[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_fclose_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_lstat_decl" = yes; then
+ if test "$ice_cv_have_fclose_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -51355,38 -57447,38 +59555,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}lstat[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_lstat_decl=yes
+   $EGREP "${ice_re_word}fclose[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_fclose_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_lstat_decl" = yes; then
+ if test "$ice_cv_have_fclose_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_lstat_decl" >&5
- echo "${ECHO_T}$ice_cv_have_lstat_decl" >&6
- if test "$ice_cv_have_lstat_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_fclose_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_fclose_decl" >&6; }
+ if test "$ice_cv_have_fclose_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_LSTAT_DECL 1
+ #define HAVE_FCLOSE_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_malloc=no
+ ice_have_fflush=no
  
- for ac_func in malloc
+ for ac_func in fflush
  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
@@@ -51412,87 -57504,79 +59612,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_malloc=yes
+  ice_have_fflush=yes
  fi
  done
  
- if test "${ice_have_malloc}" = yes; then
echo "$as_me:$LINENO: checking for malloc declaration in stdlib.h" >&5
- echo $ECHO_N "checking for malloc declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_malloc_decl+set}" = set; then
+ if test "${ice_have_fflush}" = yes; then
{ echo "$as_me:$LINENO: checking for fflush declaration in stdio.h" >&5
+ echo $ECHO_N "checking for fflush declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_fflush_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_malloc_decl=no
+ ice_cv_have_fflush_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -51504,12 -57588,12 +59696,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}malloc[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_malloc_decl=yes
+   $EGREP "${ice_re_word}fflush[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_fflush_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_malloc_decl" = yes; then
+ if test "$ice_cv_have_fflush_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -51523,38 -57607,38 +59715,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}malloc[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_malloc_decl=yes
+   $EGREP "${ice_re_word}fflush[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_fflush_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_malloc_decl" = yes; then
+ if test "$ice_cv_have_fflush_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_malloc_decl" >&5
- echo "${ECHO_T}$ice_cv_have_malloc_decl" >&6
- if test "$ice_cv_have_malloc_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_fflush_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_fflush_decl" >&6; }
+ if test "$ice_cv_have_fflush_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_MALLOC_DECL 1
+ #define HAVE_FFLUSH_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_memmove=no
+ ice_have_fprintf=no
  
- for ac_func in memmove
+ for ac_func in fprintf
  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
@@@ -51580,87 -57664,79 +59772,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_memmove=yes
+  ice_have_fprintf=yes
  fi
  done
  
- if test "${ice_have_memmove}" = yes; then
echo "$as_me:$LINENO: checking for memmove declaration in string.h strings.h" >&5
- echo $ECHO_N "checking for memmove declaration in string.h strings.h... $ECHO_C" >&6
- if test "${ice_cv_have_memmove_decl+set}" = set; then
+ if test "${ice_have_fprintf}" = yes; then
{ echo "$as_me:$LINENO: checking for fprintf declaration in stdio.h" >&5
+ echo $ECHO_N "checking for fprintf declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_fprintf_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_memmove_decl=no
+ ice_cv_have_fprintf_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in string.h strings.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -51672,12 -57748,12 +59856,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}memmove[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_memmove_decl=yes
+   $EGREP "${ice_re_word}fprintf[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_fprintf_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_memmove_decl" = yes; then
+ if test "$ice_cv_have_fprintf_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -51691,38 -57767,38 +59875,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}memmove[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_memmove_decl=yes
+   $EGREP "${ice_re_word}fprintf[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_fprintf_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_memmove_decl" = yes; then
+ if test "$ice_cv_have_fprintf_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_memmove_decl" >&5
- echo "${ECHO_T}$ice_cv_have_memmove_decl" >&6
- if test "$ice_cv_have_memmove_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_fprintf_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_fprintf_decl" >&6; }
+ if test "$ice_cv_have_fprintf_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_MEMMOVE_DECL 1
+ #define HAVE_FPRINTF_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_memset=no
+ ice_have_fputc=no
  
- for ac_func in memset
+ for ac_func in fputc
  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
@@@ -51748,87 -57824,79 +59932,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_memset=yes
+  ice_have_fputc=yes
  fi
  done
  
- if test "${ice_have_memset}" = yes; then
echo "$as_me:$LINENO: checking for memset declaration in string.h strings.h" >&5
- echo $ECHO_N "checking for memset declaration in string.h strings.h... $ECHO_C" >&6
- if test "${ice_cv_have_memset_decl+set}" = set; then
+ if test "${ice_have_fputc}" = yes; then
{ echo "$as_me:$LINENO: checking for fputc declaration in stdio.h" >&5
+ echo $ECHO_N "checking for fputc declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_fputc_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_memset_decl=no
+ ice_cv_have_fputc_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in string.h strings.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -51840,12 -57908,12 +60016,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}memset[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_memset_decl=yes
+   $EGREP "${ice_re_word}fputc[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_fputc_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_memset_decl" = yes; then
+ if test "$ice_cv_have_fputc_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -51859,36 -57927,38 +60035,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}memset[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_memset_decl=yes
+   $EGREP "${ice_re_word}fputc[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_fputc_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_memset_decl" = yes; then
+ if test "$ice_cv_have_fputc_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_memset_decl" >&5
- echo "${ECHO_T}$ice_cv_have_memset_decl" >&6
- if test "$ice_cv_have_memset_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_fputc_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_fputc_decl" >&6; }
+ if test "$ice_cv_have_fputc_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_MEMSET_DECL 1
+ #define HAVE_FPUTC_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- for ac_func in mkdir
+ ice_have_fputs=no
+ for ac_func in fputs
  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
@@@ -51914,85 -57984,141 +60092,140 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
+  ice_have_fputs=yes
+ fi
+ done
+ if test "${ice_have_fputs}" = yes; then
+ { echo "$as_me:$LINENO: checking for fputs declaration in stdio.h" >&5
+ echo $ECHO_N "checking for fputs declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_fputs_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ice_cv_have_fputs_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in stdio.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}fputs[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_fputs_decl=yes
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+ rm -f conftest*
+ if test "$ice_cv_have_fputs_decl" = yes; then
+       break
  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
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
  _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}fputs[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_fputs_decl=yes
+ fi
+ rm -f conftest*
  
+ if test "$ice_cv_have_fputs_decl" = yes; then
+       break
  fi
  done
  
 -fi
  
- ice_have_mkstemp=no
+ { echo "$as_me:$LINENO: result: $ice_cv_have_fputs_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_fputs_decl" >&6; }
+ if test "$ice_cv_have_fputs_decl" = yes; then
  
- for ac_func in mkstemp
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_FPUTS_DECL 1
+ _ACEOF
+ fi
+ fi
+ ice_have_fread=no
+ for ac_func in fread
  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
@@@ -52018,87 -58144,79 +60251,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_mkstemp=yes
+  ice_have_fread=yes
  fi
  done
  
- if test "${ice_have_mkstemp}" = yes; then
echo "$as_me:$LINENO: checking for mkstemp declaration in stdlib.h" >&5
- echo $ECHO_N "checking for mkstemp declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_mkstemp_decl+set}" = set; then
+ if test "${ice_have_fread}" = yes; then
{ echo "$as_me:$LINENO: checking for fread declaration in stdio.h stdlib.h" >&5
+ echo $ECHO_N "checking for fread declaration in stdio.h stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_fread_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_mkstemp_decl=no
+ ice_cv_have_fread_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
+ for header in stdio.h stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -52110,12 -58228,12 +60335,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}mkstemp[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_mkstemp_decl=yes
+   $EGREP "${ice_re_word}fread[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_fread_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_mkstemp_decl" = yes; then
+ if test "$ice_cv_have_fread_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -52129,38 -58247,38 +60354,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}mkstemp[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_mkstemp_decl=yes
+   $EGREP "${ice_re_word}fread[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_fread_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_mkstemp_decl" = yes; then
+ if test "$ice_cv_have_fread_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_mkstemp_decl" >&5
- echo "${ECHO_T}$ice_cv_have_mkstemp_decl" >&6
- if test "$ice_cv_have_mkstemp_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_fread_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_fread_decl" >&6; }
+ if test "$ice_cv_have_fread_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_MKSTEMP_DECL 1
+ #define HAVE_FREAD_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_mktemp=no
+ ice_have_fseek=no
  
- for ac_func in mktemp
+ for ac_func in fseek
  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
@@@ -52186,87 -58304,79 +60411,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_mktemp=yes
+  ice_have_fseek=yes
  fi
  done
  
- if test "${ice_have_mktemp}" = yes; then
echo "$as_me:$LINENO: checking for mktemp declaration in stdlib.h" >&5
- echo $ECHO_N "checking for mktemp declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_mktemp_decl+set}" = set; then
+ if test "${ice_have_fseek}" = yes; then
{ echo "$as_me:$LINENO: checking for fseek declaration in stdio.h" >&5
+ echo $ECHO_N "checking for fseek declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_fseek_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_mktemp_decl=no
+ ice_cv_have_fseek_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -52278,12 -58388,12 +60495,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}mktemp[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_mktemp_decl=yes
+   $EGREP "${ice_re_word}fseek[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_fseek_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_mktemp_decl" = yes; then
+ if test "$ice_cv_have_fseek_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -52297,38 -58407,38 +60514,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}mktemp[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_mktemp_decl=yes
+   $EGREP "${ice_re_word}fseek[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_fseek_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_mktemp_decl" = yes; then
+ if test "$ice_cv_have_fseek_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_mktemp_decl" >&5
- echo "${ECHO_T}$ice_cv_have_mktemp_decl" >&6
- if test "$ice_cv_have_mktemp_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_fseek_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_fseek_decl" >&6; }
+ if test "$ice_cv_have_fseek_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_MKTEMP_DECL 1
+ #define HAVE_FSEEK_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_mktime=no
+ ice_have_fwrite=no
  
- for ac_func in mktime
+ for ac_func in fwrite
  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
@@@ -52354,87 -58464,79 +60571,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_mktime=yes
+  ice_have_fwrite=yes
  fi
  done
  
- if test "${ice_have_mktime}" = yes; then
echo "$as_me:$LINENO: checking for mktime declaration in time.h sys/time.h" >&5
- echo $ECHO_N "checking for mktime declaration in time.h sys/time.h... $ECHO_C" >&6
- if test "${ice_cv_have_mktime_decl+set}" = set; then
+ if test "${ice_have_fwrite}" = yes; then
{ echo "$as_me:$LINENO: checking for fwrite declaration in stdio.h stdlib.h" >&5
+ echo $ECHO_N "checking for fwrite declaration in stdio.h stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_fwrite_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_mktime_decl=no
+ ice_cv_have_fwrite_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in time.h sys/time.h; do
+ for header in stdio.h stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -52446,12 -58548,12 +60655,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}mktime[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_mktime_decl=yes
+   $EGREP "${ice_re_word}fwrite[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_fwrite_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_mktime_decl" = yes; then
+ if test "$ice_cv_have_fwrite_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -52465,289 -58567,227 +60674,256 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}mktime[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_mktime_decl=yes
+   $EGREP "${ice_re_word}fwrite[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_fwrite_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_mktime_decl" = yes; then
+ if test "$ice_cv_have_fwrite_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_mktime_decl" >&5
- echo "${ECHO_T}$ice_cv_have_mktime_decl" >&6
- if test "$ice_cv_have_mktime_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_fwrite_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_fwrite_decl" >&6; }
+ if test "$ice_cv_have_fwrite_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_MKTIME_DECL 1
+ #define HAVE_FWRITE_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- for ac_header in stdlib.h unistd.h
+ for ac_func in getgrgid_r
  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
+ 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 { as_var=$as_ac_var; 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
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 +  # 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>
+ /* 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 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
+ 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
+ #endif
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
  _ACEOF
- rm -f conftest.$ac_objext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-   (eval $ac_compile) 2>conftest.er1
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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_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
+   (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
  
- ac_header_compiler=no
+       eval "$as_ac_var=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
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++for ac_func in getpwuid_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 { 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
 +/* 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 the AC_PACKAGE_NAME lists.  ##
- ## ------------------------------------------ ##
- _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 getpagesize
- 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.  */
++/* 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
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
  fi
 -done
 -
 -
 -for ac_func in getpwuid_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 { 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
 -/* 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 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
 -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
 -#endif
 -
 -int
 -main ()
 -{
 -return $ac_func ();
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -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); } && {
 -       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"
 -fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -fi
 -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
 -
 -fi
  done
  
- echo "$as_me:$LINENO: checking for working mmap" >&5
- echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
- if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+ ice_have_gethostname=no
+ for ac_func in gethostname
+ 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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test "$cross_compiling" = yes; then
-   ac_cv_func_mmap_fixed_mapped=no
  else
    cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- $ac_includes_default
- /* malloc might have been renamed as rpl_malloc. */
- #undef malloc
- /* Thanks to Mike Haertel and Jim Avera for this test.
-    Here is a matrix of mmap possibilities:
-       mmap private not fixed
-       mmap private fixed at somewhere currently unmapped
-       mmap private fixed at somewhere already mapped
-       mmap shared not fixed
-       mmap shared fixed at somewhere currently unmapped
-       mmap shared fixed at somewhere already mapped
-    For private mappings, we should verify that changes cannot be read()
-    back from the file, nor mmap's back from the file at a different
-    address.  (There have been systems where private was not correctly
-    implemented like the infamous i386 svr4.0, and systems where the
-    VM page cache was not coherent with the file system buffer cache
-    like early versions of FreeBSD and possibly contemporary NetBSD.)
-    For shared mappings, we should conversely verify that changes get
-    propagated back to all the places they're supposed to be.
-    Grep wants private fixed already mapped.
-    The main things grep needs to know about mmap are:
-    * does it exist and is it safe to write into the mmap'd area
-    * how to use it (BSD variants)  */
+ /* 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
  
- #include <fcntl.h>
- #include <sys/mman.h>
+ /* 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.  */
  
- #if !STDC_HEADERS && !HAVE_STDLIB_H
- char *malloc ();
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
  #endif
  
- /* This mess was copied from the GNU getpagesize.h.  */
- #if !HAVE_GETPAGESIZE
- /* Assume that all systems that can run configure have sys/param.h.  */
- # if !HAVE_SYS_PARAM_H
- #  define HAVE_SYS_PARAM_H 1
- # endif
- # ifdef _SC_PAGESIZE
- #  define getpagesize() sysconf(_SC_PAGESIZE)
- # else /* no _SC_PAGESIZE */
- #  if HAVE_SYS_PARAM_H
- #   include <sys/param.h>
- #   ifdef EXEC_PAGESIZE
- #    define getpagesize() EXEC_PAGESIZE
- #   else /* no EXEC_PAGESIZE */
- #    ifdef NBPG
- #     define getpagesize() NBPG * CLSIZE
- #     ifndef CLSIZE
- #      define CLSIZE 1
- #     endif /* no CLSIZE */
- #    else /* no NBPG */
- #     ifdef NBPC
- #      define getpagesize() NBPC
- #     else /* no NBPC */
- #      ifdef PAGESIZE
- #       define getpagesize() PAGESIZE
- #      endif /* PAGESIZE */
- #     endif /* no NBPC */
- #    endif /* no NBPG */
- #   endif /* no EXEC_PAGESIZE */
- #  else /* no HAVE_SYS_PARAM_H */
- #   define getpagesize() 8192 /* punt totally */
- #  endif /* no HAVE_SYS_PARAM_H */
- # endif /* no _SC_PAGESIZE */
+ #undef $ac_func
  
- #endif /* no HAVE_GETPAGESIZE */
+ /* 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
+ 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
+ #endif
  
  int
  main ()
  {
-   char *data, *data2, *data3;
-   int i, pagesize;
-   int fd;
-   pagesize = getpagesize ();
-   /* First, make a file with some known garbage in it. */
-   data = (char *) malloc (pagesize);
-   if (!data)
-     exit (1);
-   for (i = 0; i < pagesize; ++i)
-     *(data + i) = rand ();
-   umask (0);
-   fd = creat ("conftest.mmap", 0600);
-   if (fd < 0)
-     exit (1);
-   if (write (fd, data, pagesize) != pagesize)
-     exit (1);
-   close (fd);
-   /* Next, try to mmap the file at a fixed address which already has
-      something else allocated at it.  If we can, also make sure that
-      we see the same garbage.  */
-   fd = open ("conftest.mmap", O_RDWR);
-   if (fd < 0)
-     exit (1);
-   data2 = (char *) malloc (2 * pagesize);
-   if (!data2)
-     exit (1);
-   data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
-   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
-                    MAP_PRIVATE | MAP_FIXED, fd, 0L))
-     exit (1);
-   for (i = 0; i < pagesize; ++i)
-     if (*(data + i) != *(data2 + i))
-       exit (1);
-   /* Finally, make sure that changes to the mapped area do not
-      percolate back to the file as seen by read().  (This is a bug on
-      some variants of i386 svr4.0.)  */
-   for (i = 0; i < pagesize; ++i)
-     *(data2 + i) = *(data2 + i) + 1;
-   data3 = (char *) malloc (pagesize);
-   if (!data3)
-     exit (1);
-   if (read (fd, data3, pagesize) != pagesize)
-     exit (1);
-   for (i = 0; i < pagesize; ++i)
-     if (*(data + i) != *(data3 + i))
-       exit (1);
-   close (fd);
-   exit (0);
+ return $ac_func ();
+   ;
+   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
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); }; }; then
-   ac_cv_func_mmap_fixed_mapped=yes
+   (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: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
+   echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ( exit $ac_status )
- ac_cv_func_mmap_fixed_mapped=no
+       eval "$as_ac_var=no"
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  fi
+ 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
+  ice_have_gethostname=yes
  fi
- echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
- echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
- if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ done
+ if test "${ice_have_gethostname}" = yes; then
+ { echo "$as_me:$LINENO: checking for gethostname declaration in unistd.h" >&5
+ echo $ECHO_N "checking for gethostname declaration in unistd.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_gethostname_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ice_cv_have_gethostname_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in unistd.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_MMAP 1
  _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}gethostname[  ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_gethostname_decl=yes
+ fi
+ rm -f conftest*
  
+ if test "$ice_cv_have_gethostname_decl" = yes; then
+       break
  fi
- rm -f conftest.mmap
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}gethostname[  ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_gethostname_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_gethostname_decl" = yes; then
+       break
+ fi
+ done
  
+ fi
  
- for ac_func in on_exit
+ { echo "$as_me:$LINENO: result: $ice_cv_have_gethostname_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_gethostname_decl" >&6; }
+ if test "$ice_cv_have_gethostname_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_GETHOSTNAME_DECL 1
+ _ACEOF
+ fi
+ fi
+ ice_have_getopt=no
+ for ac_func in getopt
  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
@@@ -52948,85 -58972,141 +61108,141 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
+  ice_have_getopt=yes
+ fi
+ done
+ if test "${ice_have_getopt}" = yes; then
+ { echo "$as_me:$LINENO: checking for getopt declaration in stdlib.h unistd.h libc.h" >&5
+ echo $ECHO_N "checking for getopt declaration in stdlib.h unistd.h libc.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_getopt_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ice_cv_have_getopt_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in stdlib.h unistd.h libc.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}getopt[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_getopt_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_getopt_decl" = yes; then
+       break
+ fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}getopt[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_getopt_decl=yes
+ fi
+ rm -f conftest*
  
+ if test "$ice_cv_have_getopt_decl" = yes; then
+       break
  fi
  done
  
+ fi
  
- ice_have_openlog=no
+ { echo "$as_me:$LINENO: result: $ice_cv_have_getopt_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_getopt_decl" >&6; }
+ if test "$ice_cv_have_getopt_decl" = yes; then
  
- for ac_func in openlog
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_GETOPT_DECL 1
+ _ACEOF
+ fi
+ fi
+ ice_have_getpeername=no
+ for ac_func in getpeername
  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
@@@ -53052,87 -59132,79 +61268,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_openlog=yes
+  ice_have_getpeername=yes
  fi
  done
  
- if test "${ice_have_openlog}" = yes; then
echo "$as_me:$LINENO: checking for openlog declaration in syslog.h" >&5
- echo $ECHO_N "checking for openlog declaration in syslog.h... $ECHO_C" >&6
- if test "${ice_cv_have_openlog_decl+set}" = set; then
+ if test "${ice_have_getpeername}" = yes; then
{ echo "$as_me:$LINENO: checking for getpeername declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for getpeername declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_getpeername_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_openlog_decl=no
+ ice_cv_have_getpeername_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in syslog.h; do
+ for header in sys/types.h sys/socket.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -53144,12 -59216,12 +61352,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}openlog[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_openlog_decl=yes
+   $EGREP "${ice_re_word}getpeername[  ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_getpeername_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_openlog_decl" = yes; then
+ if test "$ice_cv_have_getpeername_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -53163,38 -59235,179 +61371,179 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}openlog[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_openlog_decl=yes
+   $EGREP "${ice_re_word}getpeername[  ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_getpeername_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_openlog_decl" = yes; then
+ if test "$ice_cv_have_getpeername_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_openlog_decl" >&5
- echo "${ECHO_T}$ice_cv_have_openlog_decl" >&6
- if test "$ice_cv_have_openlog_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_getpeername_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_getpeername_decl" >&6; }
+ if test "$ice_cv_have_getpeername_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_OPENLOG_DECL 1
+ #define HAVE_GETPEERNAME_DECL 1
  _ACEOF
  
  fi
  fi
  
+ { echo "$as_me:$LINENO: checking for getpgrp" >&5
+ echo $ECHO_N "checking for getpgrp... $ECHO_C" >&6; }
+ if test "${ac_cv_func_getpgrp+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 getpgrp to an innocuous variant, in case <limits.h> declares getpgrp.
+    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+ #define getpgrp innocuous_getpgrp
  
- ice_have_pclose=no
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char getpgrp (); below.
+     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+     <limits.h> exists even on freestanding compilers.  */
  
- for ac_func in pclose
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
+ #undef getpgrp
+ /* 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
+ char getpgrp ();
+ /* 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_getpgrp || defined __stub___getpgrp
+ choke me
+ #endif
+ int
+ main ()
+ {
+ return getpgrp ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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_getpgrp=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_func_getpgrp=no
+ fi
+ 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_getpgrp" >&5
+ echo "${ECHO_T}$ac_cv_func_getpgrp" >&6; }
+ { echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
+ echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
+ if test "${ac_cv_func_getpgrp_void+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   # Use it with a single arg.
+ 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 ()
+ {
+ getpgrp (0);
+   ;
+   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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   ac_cv_func_getpgrp_void=no
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_func_getpgrp_void=yes
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
+ echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
+ if test $ac_cv_func_getpgrp_void = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define GETPGRP_VOID 1
+ _ACEOF
+ fi
+ ice_have_getsockname=no
+ for ac_func in getsockname
  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
@@@ -53220,87 -59433,79 +61569,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_pclose=yes
+  ice_have_getsockname=yes
  fi
  done
  
- if test "${ice_have_pclose}" = yes; then
echo "$as_me:$LINENO: checking for pclose declaration in stdio.h" >&5
- echo $ECHO_N "checking for pclose declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_pclose_decl+set}" = set; then
+ if test "${ice_have_getsockname}" = yes; then
{ echo "$as_me:$LINENO: checking for getsockname declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for getsockname declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_getsockname_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_pclose_decl=no
+ ice_cv_have_getsockname_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
+ for header in sys/types.h sys/socket.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -53312,12 -59517,12 +61653,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}pclose[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_pclose_decl=yes
+   $EGREP "${ice_re_word}getsockname[  ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_getsockname_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_pclose_decl" = yes; then
+ if test "$ice_cv_have_getsockname_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -53331,38 -59536,38 +61672,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}pclose[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_pclose_decl=yes
+   $EGREP "${ice_re_word}getsockname[  ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_getsockname_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_pclose_decl" = yes; then
+ if test "$ice_cv_have_getsockname_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_pclose_decl" >&5
- echo "${ECHO_T}$ice_cv_have_pclose_decl" >&6
- if test "$ice_cv_have_pclose_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_getsockname_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_getsockname_decl" >&6; }
+ if test "$ice_cv_have_getsockname_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_PCLOSE_DECL 1
+ #define HAVE_GETSOCKNAME_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_perror=no
+ ice_have_getsockopt=no
  
- for ac_func in perror
+ for ac_func in getsockopt
  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
@@@ -53388,87 -59593,79 +61729,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_perror=yes
+  ice_have_getsockopt=yes
  fi
  done
  
- if test "${ice_have_perror}" = yes; then
echo "$as_me:$LINENO: checking for perror declaration in stdio.h" >&5
- echo $ECHO_N "checking for perror declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_perror_decl+set}" = set; then
+ if test "${ice_have_getsockopt}" = yes; then
{ echo "$as_me:$LINENO: checking for getsockopt declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for getsockopt declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_getsockopt_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_perror_decl=no
+ ice_cv_have_getsockopt_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
+ for header in sys/types.h sys/socket.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -53480,12 -59677,12 +61813,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}perror[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_perror_decl=yes
+   $EGREP "${ice_re_word}getsockopt[   ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_getsockopt_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_perror_decl" = yes; then
+ if test "$ice_cv_have_getsockopt_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -53499,38 -59696,38 +61832,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}perror[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_perror_decl=yes
+   $EGREP "${ice_re_word}getsockopt[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_getsockopt_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_perror_decl" = yes; then
+ if test "$ice_cv_have_getsockopt_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_perror_decl" >&5
- echo "${ECHO_T}$ice_cv_have_perror_decl" >&6
- if test "$ice_cv_have_perror_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_getsockopt_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_getsockopt_decl" >&6; }
+ if test "$ice_cv_have_getsockopt_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_PERROR_DECL 1
+ #define HAVE_GETSOCKOPT_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_printf=no
+ ice_have_initgroups=no
  
- for ac_func in printf
+ for ac_func in initgroups
  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
@@@ -53556,87 -59753,79 +61889,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_printf=yes
+  ice_have_initgroups=yes
  fi
  done
  
- if test "${ice_have_printf}" = yes; then
echo "$as_me:$LINENO: checking for printf declaration in stdio.h" >&5
- echo $ECHO_N "checking for printf declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_printf_decl+set}" = set; then
+ if test "${ice_have_initgroups}" = yes; then
{ echo "$as_me:$LINENO: checking for initgroups declaration in grp.h sys/types.h unistd.h libc.h" >&5
+ echo $ECHO_N "checking for initgroups declaration in grp.h sys/types.h unistd.h libc.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_initgroups_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_printf_decl=no
+ ice_cv_have_initgroups_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
+ for header in grp.h sys/types.h unistd.h libc.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -53648,12 -59837,12 +61973,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}printf[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_printf_decl=yes
+   $EGREP "${ice_re_word}initgroups[   ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_initgroups_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_printf_decl" = yes; then
+ if test "$ice_cv_have_initgroups_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -53667,36 -59856,38 +61992,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}printf[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_printf_decl=yes
+   $EGREP "${ice_re_word}initgroups[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_initgroups_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_printf_decl" = yes; then
+ if test "$ice_cv_have_initgroups_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_printf_decl" >&5
- echo "${ECHO_T}$ice_cv_have_printf_decl" >&6
- if test "$ice_cv_have_printf_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_initgroups_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_initgroups_decl" >&6; }
+ if test "$ice_cv_have_initgroups_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_PRINTF_DECL 1
+ #define HAVE_INITGROUPS_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- for ac_func in putenv
+ ice_have_ioctl=no
+ for ac_func in ioctl
  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
@@@ -53722,85 -59913,141 +62049,140 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
+  ice_have_ioctl=yes
+ fi
+ done
  
+ if test "${ice_have_ioctl}" = yes; then
+ { echo "$as_me:$LINENO: checking for ioctl declaration in sys/ioctl.h unistd.h libc.h" >&5
+ echo $ECHO_N "checking for ioctl declaration in sys/ioctl.h unistd.h libc.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_ioctl_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ice_cv_have_ioctl_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in sys/ioctl.h unistd.h libc.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}ioctl[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_ioctl_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_ioctl_decl" = yes; then
+       break
+ fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}ioctl[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_ioctl_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_ioctl_decl" = yes; then
+       break
  fi
  done
  
 -fi
  
- ice_have_puts=no
+ { echo "$as_me:$LINENO: result: $ice_cv_have_ioctl_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_ioctl_decl" >&6; }
+ if test "$ice_cv_have_ioctl_decl" = yes; then
  
- for ac_func in puts
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_IOCTL_DECL 1
+ _ACEOF
+ fi
+ fi
+ ice_have_isnormal=no
+ for ac_func in isnormal
  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
@@@ -53826,87 -60073,79 +62208,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_puts=yes
+  ice_have_isnormal=yes
  fi
  done
  
- if test "${ice_have_puts}" = yes; then
echo "$as_me:$LINENO: checking for puts declaration in stdio.h" >&5
- echo $ECHO_N "checking for puts declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_puts_decl+set}" = set; then
+ if test "${ice_have_isnormal}" = yes; then
{ echo "$as_me:$LINENO: checking for isnormal declaration in math.h" >&5
+ echo $ECHO_N "checking for isnormal declaration in math.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_isnormal_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_puts_decl=no
+ ice_cv_have_isnormal_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
+ for header in math.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -53918,12 -60157,12 +62292,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}puts[         ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_puts_decl=yes
+   $EGREP "${ice_re_word}isnormal[     ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_isnormal_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_puts_decl" = yes; then
+ if test "$ice_cv_have_isnormal_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -53937,38 -60176,38 +62311,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}puts[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_puts_decl=yes
+   $EGREP "${ice_re_word}isnormal[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_isnormal_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_puts_decl" = yes; then
+ if test "$ice_cv_have_isnormal_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_puts_decl" >&5
- echo "${ECHO_T}$ice_cv_have_puts_decl" >&6
- if test "$ice_cv_have_puts_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_isnormal_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_isnormal_decl" >&6; }
+ if test "$ice_cv_have_isnormal_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_PUTS_DECL 1
+ #define HAVE_ISNORMAL_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_realloc=no
+ ice_have_listen=no
  
- for ac_func in realloc
+ for ac_func in listen
  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
@@@ -53994,87 -60233,79 +62368,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_realloc=yes
+  ice_have_listen=yes
  fi
  done
  
- if test "${ice_have_realloc}" = yes; then
echo "$as_me:$LINENO: checking for realloc declaration in stdlib.h" >&5
- echo $ECHO_N "checking for realloc declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_realloc_decl+set}" = set; then
+ if test "${ice_have_listen}" = yes; then
{ echo "$as_me:$LINENO: checking for listen declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for listen declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_listen_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_realloc_decl=no
+ ice_cv_have_listen_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
 -for header in sys/types.h sys/socket.h; do
 +for header in stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -54086,12 -60317,12 +62452,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}realloc[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_realloc_decl=yes
+   $EGREP "${ice_re_word}listen[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_listen_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_realloc_decl" = yes; then
+ if test "$ice_cv_have_listen_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -54105,38 -60336,38 +62471,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}realloc[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_realloc_decl=yes
+   $EGREP "${ice_re_word}listen[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_listen_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_realloc_decl" = yes; then
+ if test "$ice_cv_have_listen_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_realloc_decl" >&5
- echo "${ECHO_T}$ice_cv_have_realloc_decl" >&6
- if test "$ice_cv_have_realloc_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_listen_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_listen_decl" >&6; }
+ if test "$ice_cv_have_listen_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_REALLOC_DECL 1
+ #define HAVE_LISTEN_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_recvfrom=no
+ ice_have_lstat=no
  
- for ac_func in recvfrom
+ for ac_func in lstat
  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
@@@ -54162,87 -60393,79 +62528,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_recvfrom=yes
+  ice_have_lstat=yes
  fi
  done
  
- if test "${ice_have_recvfrom}" = yes; then
echo "$as_me:$LINENO: checking for recvfrom declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for recvfrom declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_recvfrom_decl+set}" = set; then
+ if test "${ice_have_lstat}" = yes; then
{ echo "$as_me:$LINENO: checking for lstat declaration in sys/types.h sys/stat.h" >&5
+ echo $ECHO_N "checking for lstat declaration in sys/types.h sys/stat.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_lstat_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_recvfrom_decl=no
+ ice_cv_have_lstat_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
+ for header in sys/types.h sys/stat.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -54254,12 -60477,12 +62612,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}recvfrom[     ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_recvfrom_decl=yes
+   $EGREP "${ice_re_word}lstat[        ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_lstat_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_recvfrom_decl" = yes; then
+ if test "$ice_cv_have_lstat_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -54273,38 -60496,38 +62631,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}recvfrom[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_recvfrom_decl=yes
+   $EGREP "${ice_re_word}lstat[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_lstat_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_recvfrom_decl" = yes; then
+ if test "$ice_cv_have_lstat_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_recvfrom_decl" >&5
- echo "${ECHO_T}$ice_cv_have_recvfrom_decl" >&6
- if test "$ice_cv_have_recvfrom_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_lstat_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_lstat_decl" >&6; }
+ if test "$ice_cv_have_lstat_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_RECVFROM_DECL 1
+ #define HAVE_LSTAT_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_remove=no
+ ice_have_malloc=no
  
- for ac_func in remove
+ for ac_func in malloc
  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
@@@ -54330,87 -60553,79 +62688,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_remove=yes
+  ice_have_malloc=yes
  fi
  done
  
- if test "${ice_have_remove}" = yes; then
echo "$as_me:$LINENO: checking for remove declaration in stdio.h" >&5
- echo $ECHO_N "checking for remove declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_remove_decl+set}" = set; then
+ if test "${ice_have_malloc}" = yes; then
{ echo "$as_me:$LINENO: checking for malloc declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for malloc declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_malloc_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_remove_decl=no
+ ice_cv_have_malloc_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
+ for header in stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -54422,12 -60637,12 +62772,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}remove[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_remove_decl=yes
+   $EGREP "${ice_re_word}malloc[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_malloc_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_remove_decl" = yes; then
+ if test "$ice_cv_have_malloc_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -54441,38 -60656,38 +62791,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}remove[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_remove_decl=yes
+   $EGREP "${ice_re_word}malloc[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_malloc_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_remove_decl" = yes; then
+ if test "$ice_cv_have_malloc_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_remove_decl" >&5
- echo "${ECHO_T}$ice_cv_have_remove_decl" >&6
- if test "$ice_cv_have_remove_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_malloc_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_malloc_decl" >&6; }
+ if test "$ice_cv_have_malloc_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_REMOVE_DECL 1
+ #define HAVE_MALLOC_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_rename=no
+ ice_have_memmove=no
  
- for ac_func in rename
+ for ac_func in memmove
  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
@@@ -54498,87 -60713,79 +62848,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_rename=yes
+  ice_have_memmove=yes
  fi
  done
  
- if test "${ice_have_rename}" = yes; then
echo "$as_me:$LINENO: checking for rename declaration in stdio.h" >&5
- echo $ECHO_N "checking for rename declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_rename_decl+set}" = set; then
+ if test "${ice_have_memmove}" = yes; then
{ echo "$as_me:$LINENO: checking for memmove declaration in string.h strings.h" >&5
+ echo $ECHO_N "checking for memmove declaration in string.h strings.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_memmove_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_rename_decl=no
+ ice_cv_have_memmove_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
+ for header in string.h strings.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -54590,12 -60797,12 +62932,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}rename[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_rename_decl=yes
+   $EGREP "${ice_re_word}memmove[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_memmove_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_rename_decl" = yes; then
+ if test "$ice_cv_have_memmove_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -54609,38 -60816,38 +62951,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}rename[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_rename_decl=yes
+   $EGREP "${ice_re_word}memmove[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_memmove_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_rename_decl" = yes; then
+ if test "$ice_cv_have_memmove_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_rename_decl" >&5
- echo "${ECHO_T}$ice_cv_have_rename_decl" >&6
- if test "$ice_cv_have_rename_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_memmove_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_memmove_decl" >&6; }
+ if test "$ice_cv_have_memmove_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_RENAME_DECL 1
+ #define HAVE_MEMMOVE_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_rewind=no
+ ice_have_memset=no
  
- for ac_func in rewind
+ for ac_func in memset
  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
@@@ -54666,87 -60873,79 +63008,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_rewind=yes
+  ice_have_memset=yes
  fi
  done
  
- if test "${ice_have_rewind}" = yes; then
echo "$as_me:$LINENO: checking for rewind declaration in stdio.h" >&5
- echo $ECHO_N "checking for rewind declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_rewind_decl+set}" = set; then
+ if test "${ice_have_memset}" = yes; then
{ echo "$as_me:$LINENO: checking for memset declaration in string.h strings.h" >&5
+ echo $ECHO_N "checking for memset declaration in string.h strings.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_memset_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_rewind_decl=no
+ ice_cv_have_memset_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
+ for header in string.h strings.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -54758,12 -60957,12 +63092,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}rewind[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_rewind_decl=yes
+   $EGREP "${ice_re_word}memset[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_memset_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_rewind_decl" = yes; then
+ if test "$ice_cv_have_memset_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -54777,36 -60976,38 +63111,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}rewind[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_rewind_decl=yes
+   $EGREP "${ice_re_word}memset[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_memset_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_rewind_decl" = yes; then
+ if test "$ice_cv_have_memset_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_rewind_decl" >&5
- echo "${ECHO_T}$ice_cv_have_rewind_decl" >&6
- if test "$ice_cv_have_rewind_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_memset_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_memset_decl" >&6; }
+ if test "$ice_cv_have_memset_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_REWIND_DECL 1
+ #define HAVE_MEMSET_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- for ac_func in rmdir
+ ice_have_mkstemp=no
+ for ac_func in mkstemp
  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
@@@ -54832,85 -61033,141 +63168,136 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
 -# Check for "fixed" declaration like "getpid _PARAMS((int))"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$header>
 -
+ 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
+  ice_have_mkstemp=yes
+ fi
+ done
+ if test "${ice_have_mkstemp}" = yes; then
+ { echo "$as_me:$LINENO: checking for mkstemp declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for mkstemp declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_mkstemp_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ice_cv_have_mkstemp_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in stdlib.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}mkstemp[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_mkstemp_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_mkstemp_decl" = yes; then
+       break
+ 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
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}mkstemp[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_mkstemp_decl=yes
+ fi
+ rm -f conftest*
  
+ if test "$ice_cv_have_mkstemp_decl" = yes; then
+       break
  fi
  done
  
 -fi
  
- ice_have_ruserok=no
+ { echo "$as_me:$LINENO: result: $ice_cv_have_mkstemp_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_mkstemp_decl" >&6; }
+ if test "$ice_cv_have_mkstemp_decl" = yes; then
  
- for ac_func in ruserok
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_MKSTEMP_DECL 1
+ _ACEOF
+ fi
+ fi
+ ice_have_mktemp=no
+ for ac_func in mktemp
  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
@@@ -54936,87 -61193,79 +63323,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_ruserok=yes
+  ice_have_mktemp=yes
  fi
  done
  
- if test "${ice_have_ruserok}" = yes; then
echo "$as_me:$LINENO: checking for ruserok declaration in netdb.h sys/socket.h libc.h unistd.h" >&5
- echo $ECHO_N "checking for ruserok declaration in netdb.h sys/socket.h libc.h unistd.h... $ECHO_C" >&6
- if test "${ice_cv_have_ruserok_decl+set}" = set; then
+ if test "${ice_have_mktemp}" = yes; then
{ echo "$as_me:$LINENO: checking for mktemp declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for mktemp declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_mktemp_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_ruserok_decl=no
+ ice_cv_have_mktemp_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in netdb.h sys/socket.h libc.h unistd.h; do
+ for header in stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -55028,12 -61277,12 +63407,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}ruserok[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_ruserok_decl=yes
+   $EGREP "${ice_re_word}mktemp[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_mktemp_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_ruserok_decl" = yes; then
+ if test "$ice_cv_have_mktemp_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -55047,38 -61296,38 +63426,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}ruserok[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_ruserok_decl=yes
+   $EGREP "${ice_re_word}mktemp[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_mktemp_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_ruserok_decl" = yes; then
+ if test "$ice_cv_have_mktemp_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_ruserok_decl" >&5
- echo "${ECHO_T}$ice_cv_have_ruserok_decl" >&6
- if test "$ice_cv_have_ruserok_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_mktemp_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_mktemp_decl" >&6; }
+ if test "$ice_cv_have_mktemp_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_RUSEROK_DECL 1
+ #define HAVE_MKTEMP_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_select=no
+ ice_have_mktime=no
  
- for ac_func in select
+ for ac_func in mktime
  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
@@@ -55104,220 -61353,235 +63483,227 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_select=yes
 - ice_have_mktime=yes
 -fi
 -done
 -
 -if test "${ice_have_mktime}" = yes; then
 -{ echo "$as_me:$LINENO: checking for mktime declaration in time.h sys/time.h" >&5
 -echo $ECHO_N "checking for mktime declaration in time.h sys/time.h... $ECHO_C" >&6; }
 -if test "${ice_cv_have_mktime_decl+set}" = set; then
 -  echo $ECHO_N "(cached) $ECHO_C" >&6
 -else
 -
 -ice_cv_have_mktime_decl=no
 -ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
 -ice_re_word='(^|[^a-zA-Z0-9_])'
 -for header in time.h sys/time.h; do
 -# Check for ordinary declaration
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$header>
 -
 -_ACEOF
 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 -  $EGREP "${ice_re_word}mktime[       ]*\(" >/dev/null 2>&1; then
 -  ice_cv_have_mktime_decl=yes
 -fi
 -rm -f conftest*
 -
 -if test "$ice_cv_have_mktime_decl" = yes; then
 -      break
 -fi
 -# Check for "fixed" declaration like "getpid _PARAMS((int))"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$header>
 -
 -_ACEOF
 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 -  $EGREP "${ice_re_word}mktime[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
 -  ice_cv_have_mktime_decl=yes
 -fi
 -rm -f conftest*
 -
 -if test "$ice_cv_have_mktime_decl" = yes; then
 -      break
 -fi
 -done
 -
 -fi
 -
 -{ echo "$as_me:$LINENO: result: $ice_cv_have_mktime_decl" >&5
 -echo "${ECHO_T}$ice_cv_have_mktime_decl" >&6; }
 -if test "$ice_cv_have_mktime_decl" = yes; then
 -
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_MKTIME_DECL 1
 -_ACEOF
 -
 -fi
 -fi
 -
 -
 -for ac_func in on_exit
 -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 { 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
 -/* 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 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
 -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
 -#endif
 -
 -int
 -main ()
 -{
 -return $ac_func ();
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -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); } && {
 -       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"
 -fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -fi
 -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
++ ice_have_mktime=yes
 +fi
 +done
 +
- if test "${ice_have_select}" = yes; then
- echo "$as_me:$LINENO: checking for select declaration in sys/types.h sys/socket.h sys/select.h time.h sys/time.h" >&5
- echo $ECHO_N "checking for select declaration in sys/types.h sys/socket.h sys/select.h time.h sys/time.h... $ECHO_C" >&6
- if test "${ice_cv_have_select_decl+set}" = set; then
++if test "${ice_have_mktime}" = yes; then
++{ echo "$as_me:$LINENO: checking for mktime declaration in time.h sys/time.h" >&5
++echo $ECHO_N "checking for mktime declaration in time.h sys/time.h... $ECHO_C" >&6; }
++if test "${ice_cv_have_mktime_decl+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +
- ice_cv_have_select_decl=no
++ice_cv_have_mktime_decl=no
 +ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
 +ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h sys/select.h time.h sys/time.h; do
++for header in time.h sys/time.h; do
 +# Check for ordinary declaration
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
 +#include <$header>
 +
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}select[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_select_decl=yes
++  $EGREP "${ice_re_word}mktime[       ]*\(" >/dev/null 2>&1; then
++  ice_cv_have_mktime_decl=yes
 +fi
 +rm -f conftest*
 +
- if test "$ice_cv_have_select_decl" = yes; then
++if test "$ice_cv_have_mktime_decl" = yes; then
 +      break
 +fi
 +# Check for "fixed" declaration like "getpid _PARAMS((int))"
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
 +#include <$header>
 +
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}select[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_select_decl=yes
++  $EGREP "${ice_re_word}mktime[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
++  ice_cv_have_mktime_decl=yes
 +fi
 +rm -f conftest*
 +
- if test "$ice_cv_have_select_decl" = yes; then
++if test "$ice_cv_have_mktime_decl" = yes; then
 +      break
 +fi
 +done
 +
 +fi
 +
- echo "$as_me:$LINENO: result: $ice_cv_have_select_decl" >&5
- echo "${ECHO_T}$ice_cv_have_select_decl" >&6
- if test "$ice_cv_have_select_decl" = yes; then
++{ echo "$as_me:$LINENO: result: $ice_cv_have_mktime_decl" >&5
++echo "${ECHO_T}$ice_cv_have_mktime_decl" >&6; }
++if test "$ice_cv_have_mktime_decl" = yes; then
 +
 +cat >>confdefs.h <<_ACEOF
- #define HAVE_SELECT_DECL 1
++#define HAVE_MKTIME_DECL 1
 +_ACEOF
 +
 +fi
 +fi
 +
 +
-       echo "$as_me:$LINENO: checking for select() argument type" >&5
- echo $ECHO_N "checking for select() argument type... $ECHO_C" >&6
- if test "${amanda_cv_select_arg_type+set}" = set; then
++for ac_func in on_exit
++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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +
 +              rm -f conftest.c
 +              cat <<EOF >conftest.$ac_ext
 +#include "confdefs.h"
 +#ifdef HAVE_SYS_TIME_H
 +# include <sys/time.h>
 +#endif
 +#ifdef HAVE_SYS_TYPES_H
 +# include <sys/types.h>
 +#endif
 +#ifdef HAVE_SYS_SELECT_H
 +#  include <sys/select.h>
 +#endif
- #ifdef HAVE_SYS_SOCKET_H
- #  include <sys/socket.h>
++
++#undef $ac_func
++
++/* 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
- #ifdef HAVE_UNISTD_H
- # include <unistd.h>
++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
 +#endif
 +
 +int main()
 +{
- #ifdef FD_SET_POINTER
-       (void)select(0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, 0);
- #else
-       (void)select(0, (int *) 0, (int *) 0, (int *) 0, 0);
- #endif
-       return 0;
++return $ac_func ();
++  ;
++  return 0;
 +}
- EOF
-                                                                                                                               amanda_cv_select_arg_type=no
-               select_compile="${CC-cc} -c $CFLAGS $CPPFLAGS"
-               $select_compile -DFD_SET_POINTER conftest.$ac_ext 1>conftest.fd_set 2>&1
-               if test $? -ne 0; then
-                   amanda_cv_select_arg_type=int
-               fi
-               if test "$amanda_cv_select_arg_type" = no; then
-                   $select_compile conftest.$ac_ext 1>conftest.int 2>&1
-                   if test $? -ne 0; then
-                       amanda_cv_select_arg_type=fd_set
-                   fi
-               fi
-               if test "$amanda_cv_select_arg_type" = no; then
-                   wc_fdset=`wc -l <conftest.fd_set`
-                   wc_int=`wc -l <conftest.int`
-                   if test "$wc_fdset" -le "$wc_int"; then
-                       amanda_cv_select_arg_type=fd_set
-                   else
-                       amanda_cv_select_arg_type=int
-                   fi
-               fi
-               rm -f conftest*
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++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); } && {
++       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"
 +fi
- echo "$as_me:$LINENO: result: $amanda_cv_select_arg_type" >&5
- echo "${ECHO_T}$amanda_cv_select_arg_type" >&6
 +
- cat >>confdefs.h <<_ACEOF
- #define SELECT_ARG_TYPE $amanda_cv_select_arg_type
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++      conftest$ac_exeext conftest.$ac_ext
++fi
++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
  
+ fi
+ done
  
  
+ ice_have_openlog=no
  
- ice_have_sendto=no
- for ac_func in sendto
+ for ac_func in openlog
  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
@@@ -55343,87 -61607,79 +63729,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_sendto=yes
+  ice_have_openlog=yes
  fi
  done
  
- if test "${ice_have_sendto}" = yes; then
echo "$as_me:$LINENO: checking for sendto declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for sendto declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_sendto_decl+set}" = set; then
+ if test "${ice_have_openlog}" = yes; then
{ echo "$as_me:$LINENO: checking for openlog declaration in syslog.h" >&5
+ echo $ECHO_N "checking for openlog declaration in syslog.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_openlog_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_sendto_decl=no
+ ice_cv_have_openlog_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
+ for header in syslog.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -55435,12 -61691,12 +63813,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}sendto[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_sendto_decl=yes
+   $EGREP "${ice_re_word}openlog[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_openlog_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_sendto_decl" = yes; then
+ if test "$ice_cv_have_openlog_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -55454,38 -61710,38 +63832,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}sendto[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_sendto_decl=yes
+   $EGREP "${ice_re_word}openlog[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_openlog_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_sendto_decl" = yes; then
+ if test "$ice_cv_have_openlog_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_sendto_decl" >&5
- echo "${ECHO_T}$ice_cv_have_sendto_decl" >&6
- if test "$ice_cv_have_sendto_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_openlog_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_openlog_decl" >&6; }
+ if test "$ice_cv_have_openlog_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SENDTO_DECL 1
+ #define HAVE_OPENLOG_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_setegid=no
+ ice_have_pclose=no
  
- for ac_func in setegid
+ for ac_func in pclose
  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
@@@ -55511,87 -61767,79 +63889,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_setegid=yes
+  ice_have_pclose=yes
  fi
  done
  
- if test "${ice_have_setegid}" = yes; then
echo "$as_me:$LINENO: checking for setegid declaration in unistd.h" >&5
- echo $ECHO_N "checking for setegid declaration in unistd.h... $ECHO_C" >&6
- if test "${ice_cv_have_setegid_decl+set}" = set; then
+ if test "${ice_have_pclose}" = yes; then
{ echo "$as_me:$LINENO: checking for pclose declaration in stdio.h" >&5
+ echo $ECHO_N "checking for pclose declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_pclose_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_setegid_decl=no
+ ice_cv_have_pclose_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in unistd.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -55603,12 -61851,12 +63973,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setegid[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_setegid_decl=yes
+   $EGREP "${ice_re_word}pclose[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_pclose_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setegid_decl" = yes; then
+ if test "$ice_cv_have_pclose_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -55622,38 -61870,38 +63992,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setegid[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_setegid_decl=yes
+   $EGREP "${ice_re_word}pclose[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_pclose_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setegid_decl" = yes; then
+ if test "$ice_cv_have_pclose_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_setegid_decl" >&5
- echo "${ECHO_T}$ice_cv_have_setegid_decl" >&6
- if test "$ice_cv_have_setegid_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_pclose_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_pclose_decl" >&6; }
+ if test "$ice_cv_have_pclose_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SETEGID_DECL 1
+ #define HAVE_PCLOSE_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_seteuid=no
+ ice_have_perror=no
  
- for ac_func in seteuid
+ for ac_func in perror
  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
@@@ -55679,87 -61927,79 +64049,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_seteuid=yes
+  ice_have_perror=yes
  fi
  done
  
- if test "${ice_have_seteuid}" = yes; then
echo "$as_me:$LINENO: checking for seteuid declaration in unistd.h" >&5
- echo $ECHO_N "checking for seteuid declaration in unistd.h... $ECHO_C" >&6
- if test "${ice_cv_have_seteuid_decl+set}" = set; then
+ if test "${ice_have_perror}" = yes; then
{ echo "$as_me:$LINENO: checking for perror declaration in stdio.h" >&5
+ echo $ECHO_N "checking for perror declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_perror_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_seteuid_decl=no
+ ice_cv_have_perror_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in unistd.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -55771,12 -62011,12 +64133,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}seteuid[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_seteuid_decl=yes
+   $EGREP "${ice_re_word}perror[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_perror_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_seteuid_decl" = yes; then
+ if test "$ice_cv_have_perror_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -55790,36 -62030,38 +64152,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}seteuid[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_seteuid_decl=yes
+   $EGREP "${ice_re_word}perror[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_perror_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_seteuid_decl" = yes; then
+ if test "$ice_cv_have_perror_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_seteuid_decl" >&5
- echo "${ECHO_T}$ice_cv_have_seteuid_decl" >&6
- if test "$ice_cv_have_seteuid_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_perror_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_perror_decl" >&6; }
+ if test "$ice_cv_have_perror_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SETEUID_DECL 1
+ #define HAVE_PERROR_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- for ac_func in setmntent
+ ice_have_printf=no
+ for ac_func in printf
  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
@@@ -55845,83 -62087,139 +64209,139 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
+  ice_have_printf=yes
+ fi
+ done
+ if test "${ice_have_printf}" = yes; then
+ { echo "$as_me:$LINENO: checking for printf declaration in stdio.h" >&5
+ echo $ECHO_N "checking for printf declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_printf_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ice_cv_have_printf_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in stdio.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}printf[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_printf_decl=yes
+ fi
+ rm -f conftest*
  
+ if test "$ice_cv_have_printf_decl" = yes; then
+       break
+ fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}printf[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_printf_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_printf_decl" = yes; then
+       break
  fi
  done
  
+ fi
  
- for ac_func in shquote
+ { echo "$as_me:$LINENO: result: $ice_cv_have_printf_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_printf_decl" >&6; }
+ if test "$ice_cv_have_printf_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_PRINTF_DECL 1
+ _ACEOF
+ fi
+ fi
+ for ac_func in putenv
  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
@@@ -55947,68 -62245,60 +64367,60 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
  done
  
  
+ ice_have_puts=no
  
- ice_have_setresgid=no
- for ac_func in setresgid
+ for ac_func in puts
  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
@@@ -56052,87 -62341,79 +64463,76 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-   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
+ 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); }; }; 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
-  ice_have_setresgid=yes
+  ice_have_puts=yes
  fi
  done
  
- if test "${ice_have_setresgid}" = yes; then
echo "$as_me:$LINENO: checking for setresgid declaration in unistd.h" >&5
- echo $ECHO_N "checking for setresgid declaration in unistd.h... $ECHO_C" >&6
- if test "${ice_cv_have_setresgid_decl+set}" = set; then
+ if test "${ice_have_puts}" = yes; then
{ echo "$as_me:$LINENO: checking for puts declaration in stdio.h" >&5
+ echo $ECHO_N "checking for puts declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_puts_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_setresgid_decl=no
+ ice_cv_have_puts_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in unistd.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -56144,12 -62425,12 +64544,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setresgid[    ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_setresgid_decl=yes
+   $EGREP "${ice_re_word}puts[         ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_puts_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setresgid_decl" = yes; then
+ if test "$ice_cv_have_puts_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -56163,38 -62444,38 +64563,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setresgid[    ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_setresgid_decl=yes
+   $EGREP "${ice_re_word}puts[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_puts_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setresgid_decl" = yes; then
+ if test "$ice_cv_have_puts_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_setresgid_decl" >&5
- echo "${ECHO_T}$ice_cv_have_setresgid_decl" >&6
- if test "$ice_cv_have_setresgid_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_puts_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_puts_decl" >&6; }
+ if test "$ice_cv_have_puts_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SETRESGID_DECL 1
+ #define HAVE_PUTS_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_setresuid=no
+ ice_have_realloc=no
  
- for ac_func in setresuid
+ for ac_func in realloc
  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
@@@ -56220,87 -62501,79 +64620,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_setresuid=yes
+  ice_have_realloc=yes
  fi
  done
  
- if test "${ice_have_setresuid}" = yes; then
echo "$as_me:$LINENO: checking for setresuid declaration in unistd.h" >&5
- echo $ECHO_N "checking for setresuid declaration in unistd.h... $ECHO_C" >&6
- if test "${ice_cv_have_setresuid_decl+set}" = set; then
+ if test "${ice_have_realloc}" = yes; then
{ echo "$as_me:$LINENO: checking for realloc declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for realloc declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_realloc_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_setresuid_decl=no
+ ice_cv_have_realloc_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in unistd.h; do
+ for header in stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -56312,12 -62585,12 +64704,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setresuid[    ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_setresuid_decl=yes
+   $EGREP "${ice_re_word}realloc[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_realloc_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setresuid_decl" = yes; then
+ if test "$ice_cv_have_realloc_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -56331,38 -62604,38 +64723,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setresuid[    ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_setresuid_decl=yes
+   $EGREP "${ice_re_word}realloc[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_realloc_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setresuid_decl" = yes; then
+ if test "$ice_cv_have_realloc_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_setresuid_decl" >&5
- echo "${ECHO_T}$ice_cv_have_setresuid_decl" >&6
- if test "$ice_cv_have_setresuid_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_realloc_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_realloc_decl" >&6; }
+ if test "$ice_cv_have_realloc_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SETRESUID_DECL 1
+ #define HAVE_REALLOC_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_snprintf=no
+ ice_have_recvfrom=no
  
- for ac_func in snprintf
+ for ac_func in recvfrom
  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
@@@ -56388,87 -62661,79 +64780,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_snprintf=yes
+  ice_have_recvfrom=yes
  fi
  done
  
- if test "${ice_have_snprintf}" = yes; then
echo "$as_me:$LINENO: checking for snprintf declaration in stdio.h" >&5
- echo $ECHO_N "checking for snprintf declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_snprintf_decl+set}" = set; then
+ if test "${ice_have_recvfrom}" = yes; then
{ echo "$as_me:$LINENO: checking for recvfrom declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for recvfrom declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_recvfrom_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_snprintf_decl=no
+ ice_cv_have_recvfrom_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h; do
+ for header in sys/types.h sys/socket.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -56480,12 -62745,12 +64864,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}snprintf[     ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_snprintf_decl=yes
+   $EGREP "${ice_re_word}recvfrom[     ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_recvfrom_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_snprintf_decl" = yes; then
+ if test "$ice_cv_have_recvfrom_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -56499,38 -62764,38 +64883,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}snprintf[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_snprintf_decl=yes
+   $EGREP "${ice_re_word}recvfrom[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_recvfrom_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_snprintf_decl" = yes; then
+ if test "$ice_cv_have_recvfrom_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_snprintf_decl" >&5
- echo "${ECHO_T}$ice_cv_have_snprintf_decl" >&6
- if test "$ice_cv_have_snprintf_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_recvfrom_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_recvfrom_decl" >&6; }
+ if test "$ice_cv_have_recvfrom_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SNPRINTF_DECL 1
+ #define HAVE_RECVFROM_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_vsnprintf=no
+ ice_have_remove=no
  
- for ac_func in vsnprintf
+ for ac_func in remove
  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
@@@ -56556,84 -62821,76 +64940,76 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_vsnprintf=yes
+  ice_have_remove=yes
  fi
  done
  
- if test "${ice_have_vsnprintf}" = yes; then
echo "$as_me:$LINENO: checking for vsnprintf declaration in stdio.h" >&5
- echo $ECHO_N "checking for vsnprintf declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_vsnprintf_decl+set}" = set; then
+ if test "${ice_have_remove}" = yes; then
{ echo "$as_me:$LINENO: checking for remove declaration in stdio.h" >&5
+ echo $ECHO_N "checking for remove declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_remove_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_vsnprintf_decl=no
+ ice_cv_have_remove_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
  for header in stdio.h; do
@@@ -56648,12 -62905,12 +65024,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}vsnprintf[    ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_vsnprintf_decl=yes
+   $EGREP "${ice_re_word}remove[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_remove_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_vsnprintf_decl" = yes; then
+ if test "$ice_cv_have_remove_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -56667,136 -62924,38 +65043,75 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}vsnprintf[    ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_vsnprintf_decl=yes
+   $EGREP "${ice_re_word}remove[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_remove_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_vsnprintf_decl" = yes; then
+ if test "$ice_cv_have_remove_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_vsnprintf_decl" >&5
- echo "${ECHO_T}$ice_cv_have_vsnprintf_decl" >&6
- if test "$ice_cv_have_vsnprintf_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_remove_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_remove_decl" >&6; }
+ if test "$ice_cv_have_remove_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_VSNPRINTF_DECL 1
- _ACEOF
- fi
- fi
- echo "$as_me:$LINENO: checking for setpgid" >&5
- echo $ECHO_N "checking for setpgid... $ECHO_C" >&6
- if test "${ac_cv_func_setpgid+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 setpgid to an innocuous variant, in case <limits.h> declares setpgid.
-    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
- #define setpgid innocuous_setpgid
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char setpgid (); 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 setpgid
- /* 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 setpgid ();
- /* 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_setpgid) || defined (__stub___setpgid)
- choke me
- #else
- char (*f) () = setpgid;
- #endif
- #ifdef __cplusplus
- }
- #endif
- int
- main ()
- {
- return f != setpgid;
-   ;
-   return 0;
- }
+ #define HAVE_REMOVE_DECL 1
  _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_setpgid=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 +ac_cv_func_setpgid=no
  fi
 +rm -f conftest.err conftest.$ac_objext \
 +      conftest$ac_exeext conftest.$ac_ext
  fi
 +echo "$as_me:$LINENO: result: $ac_cv_func_setpgid" >&5
 +echo "${ECHO_T}$ac_cv_func_setpgid" >&6
 +if test $ac_cv_func_setpgid = yes; then
 +
 +
 +cat >>confdefs.h <<\_ACEOF
 +#define HAVE_SETPGID 1
 +_ACEOF
  
  
- ice_have_setpgid=no
+ ice_have_rename=no
  
- for ac_func in setpgid
+ for ac_func in rename
  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
@@@ -56822,87 -62981,79 +65137,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_setpgid=yes
+  ice_have_rename=yes
  fi
  done
  
- if test "${ice_have_setpgid}" = yes; then
echo "$as_me:$LINENO: checking for setpgid declaration in sys/types.h unistd.h" >&5
- echo $ECHO_N "checking for setpgid declaration in sys/types.h unistd.h... $ECHO_C" >&6
- if test "${ice_cv_have_setpgid_decl+set}" = set; then
+ if test "${ice_have_rename}" = yes; then
{ echo "$as_me:$LINENO: checking for rename declaration in stdio.h" >&5
+ echo $ECHO_N "checking for rename declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_rename_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_setpgid_decl=no
+ ice_cv_have_rename_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h unistd.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -56914,12 -63065,12 +65221,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setpgid[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_setpgid_decl=yes
+   $EGREP "${ice_re_word}rename[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_rename_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setpgid_decl" = yes; then
+ if test "$ice_cv_have_rename_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -56933,35 -63084,38 +65240,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setpgid[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_setpgid_decl=yes
+   $EGREP "${ice_re_word}rename[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_rename_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setpgid_decl" = yes; then
+ if test "$ice_cv_have_rename_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_setpgid_decl" >&5
- echo "${ECHO_T}$ice_cv_have_setpgid_decl" >&6
- if test "$ice_cv_have_setpgid_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_rename_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_rename_decl" >&6; }
+ if test "$ice_cv_have_rename_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SETPGID_DECL 1
+ #define HAVE_RENAME_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- fi
+ ice_have_rewind=no
  
- echo "$as_me:$LINENO: checking for setpgrp" >&5
- echo $ECHO_N "checking for setpgrp... $ECHO_C" >&6
- if test "${ac_cv_func_setpgrp+set}" = set; then
+ for ac_func in rewind
+ 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 { 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
  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.
 +/* Define setpgrp to an innocuous variant, in case <limits.h> declares setpgrp.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
 +#define setpgrp innocuous_setpgrp
  
  /* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 +    which can conflict with char setpgrp (); below.
      Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
      <limits.h> exists even on freestanding compilers.  */
  
  # include <assert.h>
  #endif
  
 -#undef $ac_func
 +#undef setpgrp
  
- /* 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 setpgrp ();
+ 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_setpgrp) || defined (__stub___setpgrp)
+ #if defined __stub_$ac_func || defined __stub___$ac_func
  choke me
- #else
- char (*f) () = setpgrp;
- #endif
- #ifdef __cplusplus
- }
  #endif
  
  int
  main ()
  {
- return f != setpgrp;
+ 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
-   ac_cv_func_setpgrp=yes
+   (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
  
- ac_cv_func_setpgrp=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: $ac_cv_func_setpgrp" >&5
- echo "${ECHO_T}$ac_cv_func_setpgrp" >&6
- if test $ac_cv_func_setpgrp = yes; then
-   echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
- echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
- if test "${ac_cv_func_setpgrp_void+set}" = set; then
+ 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
+  ice_have_rewind=yes
+ fi
+ done
+ if test "${ice_have_rewind}" = yes; then
+ { echo "$as_me:$LINENO: checking for rewind declaration in stdio.h" >&5
+ echo $ECHO_N "checking for rewind declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_rewind_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   if test "$cross_compiling" = yes; then
-   { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
- echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
-    { (exit 1); exit 1; }; }
- else
-   cat >conftest.$ac_ext <<_ACEOF
+ ice_cv_have_rewind_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in stdio.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 -#include <$header>
 +#if HAVE_UNISTD_H
 +# include <unistd.h>
 +#endif
  
 +int
 +main ()
 +{
 +/* If this system has a BSD-style setpgrp which takes arguments,
 +  setpgrp(1, 1) will fail with ESRCH and return -1, in that case
 +  exit successfully. */
 +  exit (setpgrp (1,1) == -1 ? 0 : 1);
 +  ;
 +  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_func_setpgrp_void=no
- else
-   echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}rewind[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_rewind_decl=yes
+ fi
+ rm -f conftest*
  
- ( exit $ac_status )
- ac_cv_func_setpgrp_void=yes
+ if test "$ice_cv_have_rewind_decl" = yes; then
+       break
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}rewind[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_rewind_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_rewind_decl" = yes; then
+       break
  fi
 -done
 -
  fi
 +echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
 +echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
 +if test $ac_cv_func_setpgrp_void = yes; then
  
- cat >>confdefs.h <<\_ACEOF
- #define SETPGRP_VOID 1
+ { echo "$as_me:$LINENO: result: $ice_cv_have_rewind_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_rewind_decl" >&6; }
+ if test "$ice_cv_have_rewind_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_REWIND_DECL 1
  _ACEOF
  
  fi
 +
  fi
  
  
- ice_have_setpgrp=no
+ ice_have_ruserok=no
  
- for ac_func in setpgrp
+ for ac_func in ruserok
  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
@@@ -57150,87 -63301,79 +65471,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_setpgrp=yes
+  ice_have_ruserok=yes
  fi
  done
  
- if test "${ice_have_setpgrp}" = yes; then
echo "$as_me:$LINENO: checking for setpgrp declaration in sys/types.h unistd.h libc.h" >&5
- echo $ECHO_N "checking for setpgrp declaration in sys/types.h unistd.h libc.h... $ECHO_C" >&6
- if test "${ice_cv_have_setpgrp_decl+set}" = set; then
+ if test "${ice_have_ruserok}" = yes; then
{ echo "$as_me:$LINENO: checking for ruserok declaration in netdb.h sys/socket.h libc.h unistd.h" >&5
+ echo $ECHO_N "checking for ruserok declaration in netdb.h sys/socket.h libc.h unistd.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_ruserok_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_setpgrp_decl=no
+ ice_cv_have_ruserok_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h unistd.h libc.h; do
+ for header in netdb.h sys/socket.h libc.h unistd.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -57242,12 -63385,12 +65555,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setpgrp[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_setpgrp_decl=yes
+   $EGREP "${ice_re_word}ruserok[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_ruserok_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setpgrp_decl" = yes; then
+ if test "$ice_cv_have_ruserok_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -57261,39 -63404,38 +65574,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setpgrp[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_setpgrp_decl=yes
+   $EGREP "${ice_re_word}ruserok[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_ruserok_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setpgrp_decl" = yes; then
+ if test "$ice_cv_have_ruserok_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_setpgrp_decl" >&5
- echo "${ECHO_T}$ice_cv_have_setpgrp_decl" >&6
- if test "$ice_cv_have_setpgrp_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_ruserok_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_ruserok_decl" >&6; }
+ if test "$ice_cv_have_ruserok_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SETPGRP_DECL 1
+ #define HAVE_RUSEROK_DECL 1
  _ACEOF
  
  fi
  fi
  
  
+ ice_have_select=no
  
- ice_have_setsockopt=no
- for ac_func in setsockopt
+ for ac_func in select
  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
@@@ -57319,87 -63461,79 +65631,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_setsockopt=yes
+  ice_have_select=yes
  fi
  done
  
- if test "${ice_have_setsockopt}" = yes; then
echo "$as_me:$LINENO: checking for setsockopt declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for setsockopt declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_setsockopt_decl+set}" = set; then
+ if test "${ice_have_select}" = yes; then
{ echo "$as_me:$LINENO: checking for select declaration in sys/types.h sys/socket.h sys/select.h time.h sys/time.h" >&5
+ echo $ECHO_N "checking for select declaration in sys/types.h sys/socket.h sys/select.h time.h sys/time.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_select_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_setsockopt_decl=no
+ ice_cv_have_select_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
+ for header in sys/types.h sys/socket.h sys/select.h time.h sys/time.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -57411,12 -63545,12 +65715,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setsockopt[   ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_setsockopt_decl=yes
+   $EGREP "${ice_re_word}select[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_select_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setsockopt_decl" = yes; then
+ if test "$ice_cv_have_select_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -57430,24 -63564,24 +65734,24 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}setsockopt[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_setsockopt_decl=yes
+   $EGREP "${ice_re_word}select[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_select_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_setsockopt_decl" = yes; then
+ if test "$ice_cv_have_select_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_setsockopt_decl" >&5
- echo "${ECHO_T}$ice_cv_have_setsockopt_decl" >&6
- if test "$ice_cv_have_setsockopt_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_select_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_select_decl" >&6; }
+ if test "$ice_cv_have_select_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SETSOCKOPT_DECL 1
+ #define HAVE_SELECT_DECL 1
  _ACEOF
  
  fi
  
  
  
- for ac_func in shmget
+ for ac_header in sys/time.h \
+           sys/types.h \
+           sys/select.h \
+           sys/socket.h \
+           unistd.h \
  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
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ 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
+ ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+ echo "${ECHO_T}$ac_res" >&6; }
  else
-   cat >conftest.$ac_ext <<_ACEOF
+   # 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.  */
- /* 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;
- }
+ $ac_includes_default
+ #include <$ac_header>
  _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-   (eval $ac_link) 2>conftest.er1
+ 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 -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
+   (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
+ fi
+ 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; }
+ 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 { (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); }; }; then
-   eval "$as_ac_var=yes"
+   (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
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+   ac_header_preproc=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
+ 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;}
+     ;;
+ esac
+ { 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_var'}'`" >&5
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
- if test `eval echo '${'$as_ac_var'}'` = yes; then
+ 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
    cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
+ fi
  
-       echo "$as_me:$LINENO: checking for shmdt() argument type" >&5
- echo $ECHO_N "checking for shmdt() argument type... $ECHO_C" >&6
- if test "${amanda_cv_shmdt_arg_type+set}" = set; then
+ done
+       { echo "$as_me:$LINENO: checking for select() argument type" >&5
+ echo $ECHO_N "checking for select() argument type... $ECHO_C" >&6; }
+ if test "${amanda_cv_select_arg_type+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
-               if test "$ac_cv_func_shmget" = yes; then
-                   cat <<EOF >conftest.$ac_ext
+               rm -f conftest.c
+               cat <<EOF >conftest.$ac_ext
  #include "confdefs.h"
+ #ifdef TIME_WITH_SYS_TIME
+ #  include <sys/time.h>
+ #  include <time.h>
+ #else
+ #  ifdef HAVE_SYS_TIME_H
+ #    include <sys/time.h>
+ #  else
+ #    include <time.h>
+ #  endif
+ #endif
  #ifdef HAVE_SYS_TYPES_H
  # include <sys/types.h>
  #endif
- #ifdef HAVE_SYS_IPC_H
- # include <sys/ipc.h>
+ #ifdef HAVE_SYS_SELECT_H
+ #  include <sys/select.h>
  #endif
- #ifdef HAVE_SYS_SHM_H
- # include <sys/shm.h>
+ #ifdef HAVE_SYS_SOCKET_H
+ #  include <sys/socket.h>
  #endif
- #ifdef __cplusplus
- extern "C" void *shmat(int, void *, int);
- #else
- void *shmat();
+ #ifdef HAVE_UNISTD_H
+ # include <unistd.h>
  #endif
  
  int main()
  {
-     int i;
-     return 0;
+ #ifdef FD_SET_POINTER
+       (void)select(0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, 0);
+ #else
+       (void)select(0, (int *) 0, (int *) 0, (int *) 0, 0);
+ #endif
+       return 0;
  }
  EOF
-                   ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >/dev/null 2>/dev/null
-                   if test $? = 0; then
-                       amanda_cv_shmdt_arg_type=void
+               # Figure out the select argument type by first trying to
+               # compile with the fd_set argument.  If the compile fails,
+               # then we know to use the int.  If it suceeds, then try to
+               # use the int.  If the int fails, then use fd_set.  If
+               # both suceeed, then do a line count on the number of
+               # lines that the compiler spit out, assuming that the
+               # compile outputing more lines had more errors.
+               amanda_cv_select_arg_type=no
+               select_compile="${CC-cc} -c $CFLAGS $CPPFLAGS"
+               $select_compile -DFD_SET_POINTER conftest.$ac_ext 1>conftest.fd_set 2>&1
+               if test $? -ne 0; then
+                   amanda_cv_select_arg_type=int
+               fi
+               if test "$amanda_cv_select_arg_type" = no; then
+                   $select_compile conftest.$ac_ext 1>conftest.int 2>&1
+                   if test $? -ne 0; then
+                       amanda_cv_select_arg_type=fd_set
+                   fi
+               fi
+               if test "$amanda_cv_select_arg_type" = no; then
+                   wc_fdset=`wc -l <conftest.fd_set`
+                   wc_int=`wc -l <conftest.int`
+                   if test "$wc_fdset" -le "$wc_int"; then
+                       amanda_cv_select_arg_type=fd_set
                    else
-                       amanda_cv_shmdt_arg_type=char
+                       amanda_cv_select_arg_type=int
                    fi
-                   rm -f conftest*
-               else
-                   amanda_cv_shmdt_arg_type=nothing
                fi
+               rm -f conftest*
  
  
  fi
echo "$as_me:$LINENO: result: $amanda_cv_shmdt_arg_type" >&5
- echo "${ECHO_T}$amanda_cv_shmdt_arg_type" >&6
{ echo "$as_me:$LINENO: result: $amanda_cv_select_arg_type" >&5
+ echo "${ECHO_T}$amanda_cv_select_arg_type" >&6; }
  
  cat >>confdefs.h <<_ACEOF
- #define SHM_ARG_TYPE $amanda_cv_shmdt_arg_type
- _ACEOF
-       case "$FORCE_MMAP" in
-       n | no)
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_SYSVSHM 1
+ #define SELECT_ARG_TYPE $amanda_cv_select_arg_type
  _ACEOF
  
-         ;;
-       esac
  
  
- fi
- done
  
- ice_have_shmat=no
+ ice_have_sendto=no
  
- for ac_func in shmat
+ for ac_func in sendto
  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
@@@ -57655,87 -63857,79 +66027,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_shmat=yes
+  ice_have_sendto=yes
  fi
  done
  
- if test "${ice_have_shmat}" = yes; then
echo "$as_me:$LINENO: checking for shmat declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
- echo $ECHO_N "checking for shmat declaration in sys/types.h sys/ipc.h sys/shm.h... $ECHO_C" >&6
- if test "${ice_cv_have_shmat_decl+set}" = set; then
+ if test "${ice_have_sendto}" = yes; then
{ echo "$as_me:$LINENO: checking for sendto declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for sendto declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_sendto_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_shmat_decl=no
+ ice_cv_have_sendto_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/ipc.h sys/shm.h; do
+ for header in sys/types.h sys/socket.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -57747,12 -63941,12 +66111,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}shmat[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_shmat_decl=yes
+   $EGREP "${ice_re_word}sendto[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_sendto_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_shmat_decl" = yes; then
+ if test "$ice_cv_have_sendto_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -57766,38 -63960,38 +66130,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}shmat[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_shmat_decl=yes
+   $EGREP "${ice_re_word}sendto[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_sendto_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_shmat_decl" = yes; then
+ if test "$ice_cv_have_sendto_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_shmat_decl" >&5
- echo "${ECHO_T}$ice_cv_have_shmat_decl" >&6
- if test "$ice_cv_have_shmat_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_sendto_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_sendto_decl" >&6; }
+ if test "$ice_cv_have_sendto_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SHMAT_DECL 1
+ #define HAVE_SENDTO_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_shmctl=no
+ ice_have_setegid=no
  
- for ac_func in shmctl
+ for ac_func in setegid
  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
@@@ -57823,87 -64017,79 +66187,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_shmctl=yes
+  ice_have_setegid=yes
  fi
  done
  
- if test "${ice_have_shmctl}" = yes; then
echo "$as_me:$LINENO: checking for shmctl declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
- echo $ECHO_N "checking for shmctl declaration in sys/types.h sys/ipc.h sys/shm.h... $ECHO_C" >&6
- if test "${ice_cv_have_shmctl_decl+set}" = set; then
+ if test "${ice_have_setegid}" = yes; then
{ echo "$as_me:$LINENO: checking for setegid declaration in unistd.h" >&5
+ echo $ECHO_N "checking for setegid declaration in unistd.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_setegid_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_shmctl_decl=no
+ ice_cv_have_setegid_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/ipc.h sys/shm.h; do
+ for header in unistd.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -57915,12 -64101,12 +66271,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}shmctl[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_shmctl_decl=yes
+   $EGREP "${ice_re_word}setegid[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_setegid_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_shmctl_decl" = yes; then
+ if test "$ice_cv_have_setegid_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -57934,38 -64120,38 +66290,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}shmctl[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_shmctl_decl=yes
+   $EGREP "${ice_re_word}setegid[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_setegid_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_shmctl_decl" = yes; then
+ if test "$ice_cv_have_setegid_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_shmctl_decl" >&5
- echo "${ECHO_T}$ice_cv_have_shmctl_decl" >&6
- if test "$ice_cv_have_shmctl_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_setegid_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_setegid_decl" >&6; }
+ if test "$ice_cv_have_setegid_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SHMCTL_DECL 1
+ #define HAVE_SETEGID_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_shmdt=no
+ ice_have_seteuid=no
  
- for ac_func in shmdt
+ for ac_func in seteuid
  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
@@@ -57991,87 -64177,79 +66347,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_shmdt=yes
+  ice_have_seteuid=yes
  fi
  done
  
- if test "${ice_have_shmdt}" = yes; then
echo "$as_me:$LINENO: checking for shmdt declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
- echo $ECHO_N "checking for shmdt declaration in sys/types.h sys/ipc.h sys/shm.h... $ECHO_C" >&6
- if test "${ice_cv_have_shmdt_decl+set}" = set; then
+ if test "${ice_have_seteuid}" = yes; then
{ echo "$as_me:$LINENO: checking for seteuid declaration in unistd.h" >&5
+ echo $ECHO_N "checking for seteuid declaration in unistd.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_seteuid_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_shmdt_decl=no
+ ice_cv_have_seteuid_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/ipc.h sys/shm.h; do
+ for header in unistd.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -58083,12 -64261,12 +66431,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}shmdt[        ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_shmdt_decl=yes
+   $EGREP "${ice_re_word}seteuid[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_seteuid_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_shmdt_decl" = yes; then
+ if test "$ice_cv_have_seteuid_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -58102,38 -64280,38 +66450,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}shmdt[        ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_shmdt_decl=yes
+   $EGREP "${ice_re_word}seteuid[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_seteuid_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_shmdt_decl" = yes; then
+ if test "$ice_cv_have_seteuid_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_shmdt_decl" >&5
- echo "${ECHO_T}$ice_cv_have_shmdt_decl" >&6
- if test "$ice_cv_have_shmdt_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_seteuid_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_seteuid_decl" >&6; }
+ if test "$ice_cv_have_seteuid_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SHMDT_DECL 1
+ #define HAVE_SETEUID_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_shmget=no
+ ice_have_setresgid=no
  
- for ac_func in shmget
+ for ac_func in setresgid
  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
@@@ -58159,87 -64337,79 +66507,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_shmget=yes
+  ice_have_setresgid=yes
  fi
  done
  
- if test "${ice_have_shmget}" = yes; then
echo "$as_me:$LINENO: checking for shmget declaration in sys/types.h sys/ipc.h sys/shm.h" >&5
- echo $ECHO_N "checking for shmget declaration in sys/types.h sys/ipc.h sys/shm.h... $ECHO_C" >&6
- if test "${ice_cv_have_shmget_decl+set}" = set; then
+ if test "${ice_have_setresgid}" = yes; then
{ echo "$as_me:$LINENO: checking for setresgid declaration in unistd.h" >&5
+ echo $ECHO_N "checking for setresgid declaration in unistd.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_setresgid_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_shmget_decl=no
+ ice_cv_have_setresgid_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/ipc.h sys/shm.h; do
+ for header in unistd.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -58251,12 -64421,12 +66591,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}shmget[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_shmget_decl=yes
+   $EGREP "${ice_re_word}setresgid[    ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_setresgid_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_shmget_decl" = yes; then
+ if test "$ice_cv_have_setresgid_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -58270,60 -64440,38 +66610,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}shmget[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_shmget_decl=yes
+   $EGREP "${ice_re_word}setresgid[    ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_setresgid_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_shmget_decl" = yes; then
+ if test "$ice_cv_have_setresgid_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_shmget_decl" >&5
- echo "${ECHO_T}$ice_cv_have_shmget_decl" >&6
- if test "$ice_cv_have_shmget_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_setresgid_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_setresgid_decl" >&6; }
+ if test "$ice_cv_have_setresgid_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SHMGET_DECL 1
+ #define HAVE_SETRESGID_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- if test "x$ac_cv_func_mmap_fixed_mapped" != xyes; then
-     case "$FORCE_MMAP" in
-     n | no)
-       if test "x$ac_cv_func_shmget" != xyes; then
-           { echo "$as_me:$LINENO: WARNING: *** Neither shmget() nor mmap() found!" >&5
- echo "$as_me: WARNING: *** Neither shmget() nor mmap() found!" >&2;}
-           { echo "$as_me:$LINENO: WARNING: *** This system will not support the Amanda server." >&5
- echo "$as_me: WARNING: *** This system will not support the Amanda server." >&2;}
-           NO_SERVER_MODE=true
-       fi
-       ;;
-     y | ye | yes)
-       { echo "$as_me:$LINENO: WARNING: *** --with-mmap used on a system with no mmap() support!" >&5
- echo "$as_me: WARNING: *** --with-mmap used on a system with no mmap() support!" >&2;}
-       { echo "$as_me:$LINENO: WARNING: *** This system will not support the Amanda server." >&5
- echo "$as_me: WARNING: *** This system will not support the Amanda server." >&2;}
-       NO_SERVER_MODE=true
-       ;;
-     esac
- fi
+ ice_have_setresuid=no
  
- for ac_func in sigaction sigemptyset sigvec
+ for ac_func in setresuid
  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
@@@ -58349,85 -64497,139 +66667,139 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
+  ice_have_setresuid=yes
+ fi
+ done
+ if test "${ice_have_setresuid}" = yes; then
+ { echo "$as_me:$LINENO: checking for setresuid declaration in unistd.h" >&5
+ echo $ECHO_N "checking for setresuid declaration in unistd.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_setresuid_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ice_cv_have_setresuid_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in unistd.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}setresuid[    ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_setresuid_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_setresuid_decl" = yes; then
+       break
+ fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}setresuid[    ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_setresuid_decl=yes
+ fi
+ rm -f conftest*
  
+ if test "$ice_cv_have_setresuid_decl" = yes; then
+       break
  fi
  done
  
+ fi
  
- ice_have_socket=no
+ { echo "$as_me:$LINENO: result: $ice_cv_have_setresuid_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_setresuid_decl" >&6; }
+ if test "$ice_cv_have_setresuid_decl" = yes; then
  
- for ac_func in socket
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SETRESUID_DECL 1
+ _ACEOF
+ fi
+ fi
+ for ac_func in shquote
  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
@@@ -58453,149 -64655,77 +66825,141 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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=$?
+   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_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
 + ice_have_socket=yes
 +fi
 +done
  
 +if test "${ice_have_socket}" = yes; then
 +echo "$as_me:$LINENO: checking for socket declaration in sys/types.h sys/socket.h" >&5
 +echo $ECHO_N "checking for socket declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
 +if test "${ice_cv_have_socket_decl+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +
 +ice_cv_have_socket_decl=no
 +ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
 +ice_re_word='(^|[^a-zA-Z0-9_])'
 +for header in sys/types.h sys/socket.h; do
 +# Check for ordinary declaration
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
 +#include <$header>
 +
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "${ice_re_word}socket[       ]*\(" >/dev/null 2>&1; then
 +  ice_cv_have_socket_decl=yes
 +fi
 +rm -f conftest*
 +
 +if test "$ice_cv_have_socket_decl" = yes; then
 +      break
 +fi
 +# Check for "fixed" declaration like "getpid _PARAMS((int))"
 +cat >conftest.$ac_ext <<_ACEOF
 +/* confdefs.h.  */
 +_ACEOF
 +cat confdefs.h >>conftest.$ac_ext
 +cat >>conftest.$ac_ext <<_ACEOF
 +/* end confdefs.h.  */
 +#include <$header>
 +
 +_ACEOF
 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 +  $EGREP "${ice_re_word}socket[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
 +  ice_cv_have_socket_decl=yes
 +fi
 +rm -f conftest*
 +
 +if test "$ice_cv_have_socket_decl" = yes; then
 +      break
  fi
  done
  
 +fi
 +
 +echo "$as_me:$LINENO: result: $ice_cv_have_socket_decl" >&5
 +echo "${ECHO_T}$ice_cv_have_socket_decl" >&6
 +if test "$ice_cv_have_socket_decl" = yes; then
 +
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_SOCKET_DECL 1
 +_ACEOF
 +
 +fi
 +fi
 +
  
- ice_have_socketpair=no
+ ice_have_snprintf=no
  
- for ac_func in socketpair
+ for ac_func in snprintf
  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
@@@ -58621,87 -64751,79 +66985,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_socketpair=yes
+  ice_have_snprintf=yes
  fi
  done
  
- if test "${ice_have_socketpair}" = yes; then
echo "$as_me:$LINENO: checking for socketpair declaration in sys/types.h sys/socket.h" >&5
- echo $ECHO_N "checking for socketpair declaration in sys/types.h sys/socket.h... $ECHO_C" >&6
- if test "${ice_cv_have_socketpair_decl+set}" = set; then
+ if test "${ice_have_snprintf}" = yes; then
{ echo "$as_me:$LINENO: checking for snprintf declaration in stdio.h" >&5
+ echo $ECHO_N "checking for snprintf declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_snprintf_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_socketpair_decl=no
+ ice_cv_have_snprintf_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in sys/types.h sys/socket.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -58713,12 -64835,12 +67069,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}socketpair[   ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_socketpair_decl=yes
+   $EGREP "${ice_re_word}snprintf[     ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_snprintf_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_socketpair_decl" = yes; then
+ if test "$ice_cv_have_snprintf_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -58732,38 -64854,38 +67088,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}socketpair[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_socketpair_decl=yes
+   $EGREP "${ice_re_word}snprintf[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_snprintf_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_socketpair_decl" = yes; then
+ if test "$ice_cv_have_snprintf_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_socketpair_decl" >&5
- echo "${ECHO_T}$ice_cv_have_socketpair_decl" >&6
- if test "$ice_cv_have_socketpair_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_snprintf_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_snprintf_decl" >&6; }
+ if test "$ice_cv_have_snprintf_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SOCKETPAIR_DECL 1
+ #define HAVE_SNPRINTF_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_sscanf=no
+ ice_have_vsnprintf=no
  
- for ac_func in sscanf
+ for ac_func in vsnprintf
  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
@@@ -58789,84 -64911,76 +67145,76 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_sscanf=yes
+  ice_have_vsnprintf=yes
  fi
  done
  
- if test "${ice_have_sscanf}" = yes; then
echo "$as_me:$LINENO: checking for sscanf declaration in stdio.h" >&5
- echo $ECHO_N "checking for sscanf declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_sscanf_decl+set}" = set; then
+ if test "${ice_have_vsnprintf}" = yes; then
{ echo "$as_me:$LINENO: checking for vsnprintf declaration in stdio.h" >&5
+ echo $ECHO_N "checking for vsnprintf declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_vsnprintf_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_sscanf_decl=no
+ ice_cv_have_vsnprintf_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
  for header in stdio.h; do
@@@ -58881,12 -64995,12 +67229,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}sscanf[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_sscanf_decl=yes
+   $EGREP "${ice_re_word}vsnprintf[    ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_vsnprintf_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_sscanf_decl" = yes; then
+ if test "$ice_cv_have_vsnprintf_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -58900,37 -65014,33 +67248,33 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}sscanf[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_sscanf_decl=yes
+   $EGREP "${ice_re_word}vsnprintf[    ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_vsnprintf_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_sscanf_decl" = yes; then
+ if test "$ice_cv_have_vsnprintf_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_sscanf_decl" >&5
- echo "${ECHO_T}$ice_cv_have_sscanf_decl" >&6
- if test "$ice_cv_have_sscanf_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_vsnprintf_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_vsnprintf_decl" >&6; }
+ if test "$ice_cv_have_vsnprintf_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SSCANF_DECL 1
+ #define HAVE_VSNPRINTF_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- for ac_func in statfs statvfs
- 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 setpgid" >&5
+ echo $ECHO_N "checking for setpgid... $ECHO_C" >&6; }
+ if test "${ac_cv_func_setpgid+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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.
+ /* Define setpgid to an innocuous variant, in case <limits.h> declares setpgid.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
- #define $ac_func innocuous_$ac_func
+ #define setpgid innocuous_setpgid
  
  /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char $ac_func (); below.
+     which can conflict with char setpgid (); below.
      Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
      <limits.h> exists even on freestanding compilers.  */
  
  # include <assert.h>
  #endif
  
- #undef $ac_func
+ #undef setpgid
  
- /* 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 ();
+ char setpgid ();
  /* 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_setpgid || defined __stub___setpgid
  choke me
- #else
- char (*f) () = $ac_func;
- #endif
- #ifdef __cplusplus
- }
  #endif
  
  int
  main ()
  {
- return f != $ac_func;
+ return setpgid ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_setpgid=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_func_setpgid=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
- 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: result: $ac_cv_func_setpgid" >&5
+ echo "${ECHO_T}$ac_cv_func_setpgid" >&6; }
+ if test $ac_cv_func_setpgid = yes; then
  
- fi
- done
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_SETPGID 1
+ _ACEOF
  
  
- ice_have_strerror=no
+ ice_have_setpgid=no
  
- for ac_func in strerror
+ for ac_func in setpgid
  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
@@@ -59060,87 -65160,79 +67394,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_strerror=yes
+  ice_have_setpgid=yes
  fi
  done
  
- if test "${ice_have_strerror}" = yes; then
echo "$as_me:$LINENO: checking for strerror declaration in string.h strings.h" >&5
- echo $ECHO_N "checking for strerror declaration in string.h strings.h... $ECHO_C" >&6
- if test "${ice_cv_have_strerror_decl+set}" = set; then
+ if test "${ice_have_setpgid}" = yes; then
{ echo "$as_me:$LINENO: checking for setpgid declaration in sys/types.h unistd.h" >&5
+ echo $ECHO_N "checking for setpgid declaration in sys/types.h unistd.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_setpgid_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_strerror_decl=no
+ ice_cv_have_setpgid_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in string.h strings.h; do
+ for header in sys/types.h unistd.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -59152,12 -65244,12 +67478,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strerror[     ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_strerror_decl=yes
+   $EGREP "${ice_re_word}setpgid[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_setpgid_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_strerror_decl" = yes; then
+ if test "$ice_cv_have_setpgid_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -59171,36 -65263,36 +67497,36 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strerror[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_strerror_decl=yes
+   $EGREP "${ice_re_word}setpgid[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_setpgid_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_strerror_decl" = yes; then
+ if test "$ice_cv_have_setpgid_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_strerror_decl" >&5
- echo "${ECHO_T}$ice_cv_have_strerror_decl" >&6
- if test "$ice_cv_have_strerror_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_setpgid_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_setpgid_decl" >&6; }
+ if test "$ice_cv_have_setpgid_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_STRERROR_DECL 1
+ #define HAVE_SETPGID_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- for ac_func in strftime
- 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
+ fi
{ echo "$as_me:$LINENO: checking for setpgrp" >&5
+ echo $ECHO_N "checking for setpgrp... $ECHO_C" >&6; }
+ if test "${ac_cv_func_setpgrp+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    cat >conftest.$ac_ext <<_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.
+ /* Define setpgrp to an innocuous variant, in case <limits.h> declares setpgrp.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
- #define $ac_func innocuous_$ac_func
+ #define setpgrp innocuous_setpgrp
  
  /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char $ac_func (); below.
+     which can conflict with char setpgrp (); below.
      Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
      <limits.h> exists even on freestanding compilers.  */
  
  # include <assert.h>
  #endif
  
- #undef $ac_func
+ #undef setpgrp
  
- /* 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 ();
+ char setpgrp ();
  /* 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_setpgrp || defined __stub___setpgrp
  choke me
- #else
- char (*f) () = $ac_func;
- #endif
- #ifdef __cplusplus
- }
  #endif
  
  int
  main ()
  {
- return f != $ac_func;
+ return setpgrp ();
    ;
    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
-   eval "$as_ac_var=yes"
+   (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_setpgrp=yes
  else
    echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- eval "$as_ac_var=no"
+       ac_cv_func_setpgrp=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
- if test `eval echo '${'$as_ac_var'}'` = yes; then
-   cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- else
-   # strftime is in -lintl on SCO UNIX.
- echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
- echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
- if test "${ac_cv_lib_intl_strftime+set}" = set; then
+ { echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp" >&5
+ echo "${ECHO_T}$ac_cv_func_setpgrp" >&6; }
+ if test $ac_cv_func_setpgrp = yes; then
+   { echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
+ echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6; }
+ if test "${ac_cv_func_setpgrp_void+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lintl  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+   if test "$cross_compiling" = yes; then
+   { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
+ echo "$as_me: error: cannot check setpgrp when cross compiling" >&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.  */
- /* 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 strftime ();
+ $ac_includes_default
  int
  main ()
  {
- strftime ();
+ /* If this system has a BSD-style setpgrp which takes arguments,
+   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
+   exit successfully. */
+   return setpgrp (1,1) != -1;
    ;
    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
+ rm -f conftest$ac_exeext
+ 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='test -s conftest$ac_exeext'
-   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-   (eval $ac_try) 2>&5
+   (exit $ac_status); } && { ac_try='./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_intl_strftime=yes
+   ac_cv_func_setpgrp_void=no
  else
-   echo "$as_me: failed program was:" >&5
+   echo "$as_me: program exited with status $ac_status" >&5
+ echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ac_cv_lib_intl_strftime=no
+ ( exit $ac_status )
+ ac_cv_func_setpgrp_void=yes
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
- echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
- if test $ac_cv_lib_intl_strftime = yes; then
-   cat >>confdefs.h <<\_ACEOF
- #define HAVE_STRFTIME 1
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
+ echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6; }
+ if test $ac_cv_func_setpgrp_void = yes; then
+ cat >>confdefs.h <<\_ACEOF
+ #define SETPGRP_VOID 1
  _ACEOF
  
- LIBS="-lintl $LIBS"
  fi
  
  fi
- done
  
  
- ice_have_strftime=no
+ ice_have_setpgrp=no
  
- for ac_func in strftime
+ for ac_func in setpgrp
  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
@@@ -59404,87 -65480,79 +67714,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_strftime=yes
+  ice_have_setpgrp=yes
  fi
  done
  
- if test "${ice_have_strftime}" = yes; then
echo "$as_me:$LINENO: checking for strftime declaration in time.h sys/time.h" >&5
- echo $ECHO_N "checking for strftime declaration in time.h sys/time.h... $ECHO_C" >&6
- if test "${ice_cv_have_strftime_decl+set}" = set; then
+ if test "${ice_have_setpgrp}" = yes; then
{ echo "$as_me:$LINENO: checking for setpgrp declaration in sys/types.h unistd.h libc.h" >&5
+ echo $ECHO_N "checking for setpgrp declaration in sys/types.h unistd.h libc.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_setpgrp_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_strftime_decl=no
+ ice_cv_have_setpgrp_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in time.h sys/time.h; do
+ for header in sys/types.h unistd.h libc.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -59496,12 -65564,12 +67798,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strftime[     ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_strftime_decl=yes
+   $EGREP "${ice_re_word}setpgrp[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_setpgrp_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_strftime_decl" = yes; then
+ if test "$ice_cv_have_setpgrp_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -59515,38 -65583,38 +67817,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strftime[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_strftime_decl=yes
+   $EGREP "${ice_re_word}setpgrp[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_setpgrp_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_strftime_decl" = yes; then
+ if test "$ice_cv_have_setpgrp_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_strftime_decl" >&5
- echo "${ECHO_T}$ice_cv_have_strftime_decl" >&6
- if test "$ice_cv_have_strftime_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_setpgrp_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_setpgrp_decl" >&6; }
+ if test "$ice_cv_have_setpgrp_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_STRFTIME_DECL 1
+ #define HAVE_SETPGRP_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_strncasecmp=no
+ ice_have_setsockopt=no
  
- for ac_func in strncasecmp
+ for ac_func in setsockopt
  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
@@@ -59572,87 -65640,79 +67874,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_strncasecmp=yes
+  ice_have_setsockopt=yes
  fi
  done
  
- if test "${ice_have_strncasecmp}" = yes; then
echo "$as_me:$LINENO: checking for strncasecmp declaration in string.h strings.h" >&5
- echo $ECHO_N "checking for strncasecmp declaration in string.h strings.h... $ECHO_C" >&6
- if test "${ice_cv_have_strncasecmp_decl+set}" = set; then
+ if test "${ice_have_setsockopt}" = yes; then
{ echo "$as_me:$LINENO: checking for setsockopt declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for setsockopt declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_setsockopt_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_strncasecmp_decl=no
+ ice_cv_have_setsockopt_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in string.h strings.h; do
+ for header in sys/types.h sys/socket.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -59664,12 -65724,12 +67958,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strncasecmp[  ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_strncasecmp_decl=yes
+   $EGREP "${ice_re_word}setsockopt[   ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_setsockopt_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_strncasecmp_decl" = yes; then
+ if test "$ice_cv_have_setsockopt_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
+ #include <$header>
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}setsockopt[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_setsockopt_decl=yes
+ fi
+ rm -f conftest*
+ if test "$ice_cv_have_setsockopt_decl" = yes; then
+       break
+ fi
+ done
+ fi
+ { echo "$as_me:$LINENO: result: $ice_cv_have_setsockopt_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_setsockopt_decl" >&6; }
+ if test "$ice_cv_have_setsockopt_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_SETSOCKOPT_DECL 1
+ _ACEOF
+ fi
+ fi
+ for ac_func in sigaction sigemptyset sigvec
+ 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 { 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
+ /* 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 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
+ 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
+ #endif
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strncasecmp[  ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_strncasecmp_decl=yes
- fi
- rm -f conftest*
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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
  
- if test "$ice_cv_have_strncasecmp_decl" = yes; then
-       break
+       eval "$as_ac_var=no"
  fi
- done
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ice_cv_have_strncasecmp_decl" >&5
- echo "${ECHO_T}$ice_cv_have_strncasecmp_decl" >&6
- if test "$ice_cv_have_strncasecmp_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_STRNCASECMP_DECL 1
+ 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
  
  fi
 -done
 +fi
  
  
- ice_have_syslog=no
+ ice_have_socket=no
  
- for ac_func in syslog
+ for ac_func in socket
  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
@@@ -59740,87 -65896,79 +68130,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_syslog=yes
+  ice_have_socket=yes
  fi
  done
  
- if test "${ice_have_syslog}" = yes; then
echo "$as_me:$LINENO: checking for syslog declaration in syslog.h" >&5
- echo $ECHO_N "checking for syslog declaration in syslog.h... $ECHO_C" >&6
- if test "${ice_cv_have_syslog_decl+set}" = set; then
+ if test "${ice_have_socket}" = yes; then
{ echo "$as_me:$LINENO: checking for socket declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for socket declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_socket_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_syslog_decl=no
+ ice_cv_have_socket_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in syslog.h; do
+ for header in sys/types.h sys/socket.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -59832,12 -65980,12 +68214,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}syslog[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_syslog_decl=yes
+   $EGREP "${ice_re_word}socket[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_socket_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_syslog_decl" = yes; then
+ if test "$ice_cv_have_socket_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -59851,38 -65999,38 +68233,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}syslog[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_syslog_decl=yes
+   $EGREP "${ice_re_word}socket[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_socket_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_syslog_decl" = yes; then
+ if test "$ice_cv_have_socket_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_syslog_decl" >&5
- echo "${ECHO_T}$ice_cv_have_syslog_decl" >&6
- if test "$ice_cv_have_syslog_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_socket_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_socket_decl" >&6; }
+ if test "$ice_cv_have_socket_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SYSLOG_DECL 1
+ #define HAVE_SOCKET_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_system=no
+ ice_have_socketpair=no
  
- for ac_func in system
+ for ac_func in socketpair
  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
@@@ -59908,87 -66056,79 +68290,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_system=yes
+  ice_have_socketpair=yes
  fi
  done
  
- if test "${ice_have_system}" = yes; then
echo "$as_me:$LINENO: checking for system declaration in stdlib.h" >&5
- echo $ECHO_N "checking for system declaration in stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_system_decl+set}" = set; then
+ if test "${ice_have_socketpair}" = yes; then
{ echo "$as_me:$LINENO: checking for socketpair declaration in sys/types.h sys/socket.h" >&5
+ echo $ECHO_N "checking for socketpair declaration in sys/types.h sys/socket.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_socketpair_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_system_decl=no
+ ice_cv_have_socketpair_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdlib.h; do
+ for header in sys/types.h sys/socket.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -60000,12 -66140,12 +68374,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}system[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_system_decl=yes
+   $EGREP "${ice_re_word}socketpair[   ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_socketpair_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_system_decl" = yes; then
+ if test "$ice_cv_have_socketpair_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -60019,38 -66159,38 +68393,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}system[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_system_decl=yes
+   $EGREP "${ice_re_word}socketpair[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_socketpair_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_system_decl" = yes; then
+ if test "$ice_cv_have_socketpair_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_system_decl" >&5
- echo "${ECHO_T}$ice_cv_have_system_decl" >&6
- if test "$ice_cv_have_system_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_socketpair_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_socketpair_decl" >&6; }
+ if test "$ice_cv_have_socketpair_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_SYSTEM_DECL 1
+ #define HAVE_SOCKETPAIR_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_time=no
+ ice_have_sscanf=no
  
- for ac_func in time
+ for ac_func in sscanf
  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
@@@ -60076,87 -66216,79 +68450,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_time=yes
+  ice_have_sscanf=yes
  fi
  done
  
- if test "${ice_have_time}" = yes; then
echo "$as_me:$LINENO: checking for time declaration in time.h sys/time.h" >&5
- echo $ECHO_N "checking for time declaration in time.h sys/time.h... $ECHO_C" >&6
- if test "${ice_cv_have_time_decl+set}" = set; then
+ if test "${ice_have_sscanf}" = yes; then
{ echo "$as_me:$LINENO: checking for sscanf declaration in stdio.h" >&5
+ echo $ECHO_N "checking for sscanf declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_sscanf_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_time_decl=no
+ ice_cv_have_sscanf_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in time.h sys/time.h; do
+ for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -60168,12 -66300,12 +68534,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}time[         ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_time_decl=yes
+   $EGREP "${ice_re_word}sscanf[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_sscanf_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_time_decl" = yes; then
+ if test "$ice_cv_have_sscanf_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -60187,38 -66319,38 +68553,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}time[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_time_decl=yes
+   $EGREP "${ice_re_word}sscanf[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_sscanf_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_time_decl" = yes; then
+ if test "$ice_cv_have_sscanf_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_time_decl" >&5
- echo "${ECHO_T}$ice_cv_have_time_decl" >&6
- if test "$ice_cv_have_time_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_sscanf_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_sscanf_decl" >&6; }
+ if test "$ice_cv_have_sscanf_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_TIME_DECL 1
+ #define HAVE_SSCANF_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_tolower=no
+ ice_have_strerror=no
  
- for ac_func in tolower
+ for ac_func in strerror
  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
@@@ -60244,87 -66376,79 +68610,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_tolower=yes
+  ice_have_strerror=yes
  fi
  done
  
- if test "${ice_have_tolower}" = yes; then
echo "$as_me:$LINENO: checking for tolower declaration in ctype.h" >&5
- echo $ECHO_N "checking for tolower declaration in ctype.h... $ECHO_C" >&6
- if test "${ice_cv_have_tolower_decl+set}" = set; then
+ if test "${ice_have_strerror}" = yes; then
{ echo "$as_me:$LINENO: checking for strerror declaration in string.h strings.h" >&5
+ echo $ECHO_N "checking for strerror declaration in string.h strings.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_strerror_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_tolower_decl=no
+ ice_cv_have_strerror_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in ctype.h; do
+ for header in string.h strings.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -60336,12 -66460,12 +68694,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}tolower[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_tolower_decl=yes
+   $EGREP "${ice_re_word}strerror[     ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_strerror_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_tolower_decl" = yes; then
+ if test "$ice_cv_have_strerror_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -60355,38 -66479,36 +68713,36 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}tolower[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_tolower_decl=yes
+   $EGREP "${ice_re_word}strerror[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_strerror_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_tolower_decl" = yes; then
+ if test "$ice_cv_have_strerror_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_tolower_decl" >&5
- echo "${ECHO_T}$ice_cv_have_tolower_decl" >&6
- if test "$ice_cv_have_tolower_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_strerror_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_strerror_decl" >&6; }
+ if test "$ice_cv_have_strerror_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_TOLOWER_DECL 1
+ #define HAVE_STRERROR_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_toupper=no
- for ac_func in toupper
+ for ac_func in strftime
  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
@@@ -60412,149 -66534,148 +68768,148 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_toupper=yes
- fi
- done
  
- if test "${ice_have_toupper}" = yes; then
- echo "$as_me:$LINENO: checking for toupper declaration in ctype.h" >&5
- echo $ECHO_N "checking for toupper declaration in ctype.h... $ECHO_C" >&6
- if test "${ice_cv_have_toupper_decl+set}" = set; then
+ else
+   # strftime is in -lintl on SCO UNIX.
+ { echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
+ echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_intl_strftime+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
- ice_cv_have_toupper_decl=no
- ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
- ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in ctype.h; do
- # Check for ordinary declaration
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lintl  $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <$header>
  
+ /* 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
+ char strftime ();
+ int
+ main ()
+ {
+ return strftime ();
+   ;
+   return 0;
+ }
  _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}toupper[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_toupper_decl=yes
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_intl_strftime=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_lib_intl_strftime=no
  fi
- rm -f conftest*
  
- if test "$ice_cv_have_toupper_decl" = yes; then
-       break
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
- # Check for "fixed" declaration like "getpid _PARAMS((int))"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
+ echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
+ if test $ac_cv_lib_intl_strftime = yes; then
+   cat >>confdefs.h <<\_ACEOF
+ #define HAVE_STRFTIME 1
  _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <$header>
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}toupper[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_toupper_decl=yes
+ LIBS="-lintl $LIBS"
  fi
- rm -f conftest*
  
- if test "$ice_cv_have_toupper_decl" = yes; then
-       break
  fi
  done
  
- fi
- echo "$as_me:$LINENO: result: $ice_cv_have_toupper_decl" >&5
- echo "${ECHO_T}$ice_cv_have_toupper_decl" >&6
- if test "$ice_cv_have_toupper_decl" = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_TOUPPER_DECL 1
- _ACEOF
- fi
- fi
  
- ice_have_ungetc=no
+ ice_have_strftime=no
  
- for ac_func in ungetc
+ for ac_func in strftime
  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
@@@ -60580,87 -66701,79 +68935,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_ungetc=yes
+  ice_have_strftime=yes
  fi
  done
  
- if test "${ice_have_ungetc}" = yes; then
echo "$as_me:$LINENO: checking for ungetc declaration in stdio.h" >&5
- echo $ECHO_N "checking for ungetc declaration in stdio.h... $ECHO_C" >&6
- if test "${ice_cv_have_ungetc_decl+set}" = set; then
+ if test "${ice_have_strftime}" = yes; then
{ echo "$as_me:$LINENO: checking for strftime declaration in time.h sys/time.h" >&5
+ echo $ECHO_N "checking for strftime declaration in time.h sys/time.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_strftime_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_ungetc_decl=no
+ ice_cv_have_strftime_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
 -for header in time.h sys/time.h; do
 +for header in stdio.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -60672,12 -66785,12 +69019,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}ungetc[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_ungetc_decl=yes
+   $EGREP "${ice_re_word}strftime[     ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_strftime_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_ungetc_decl" = yes; then
+ if test "$ice_cv_have_strftime_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -60691,36 -66804,38 +69038,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}ungetc[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_ungetc_decl=yes
+   $EGREP "${ice_re_word}strftime[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_strftime_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_ungetc_decl" = yes; then
+ if test "$ice_cv_have_strftime_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_ungetc_decl" >&5
- echo "${ECHO_T}$ice_cv_have_ungetc_decl" >&6
- if test "$ice_cv_have_ungetc_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_strftime_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_strftime_decl" >&6; }
+ if test "$ice_cv_have_strftime_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_UNGETC_DECL 1
+ #define HAVE_STRFTIME_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- for ac_func in vprintf
+ ice_have_strncasecmp=no
+ for ac_func in strncasecmp
  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
@@@ -60746,184 -66861,141 +69095,167 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
+  ice_have_strncasecmp=yes
+ fi
+ done
  
- 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
+ if test "${ice_have_strncasecmp}" = yes; then
+ { echo "$as_me:$LINENO: checking for strncasecmp declaration in string.h strings.h" >&5
+ echo $ECHO_N "checking for strncasecmp declaration in string.h strings.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_strncasecmp_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+ ice_cv_have_strncasecmp_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in string.h strings.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 -#include <$header>
 +/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 +#define _doprnt innocuous__doprnt
 +
 +/* System header to define __stub macros and hopefully few prototypes,
 +    which can conflict with char _doprnt (); 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 _doprnt
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}strncasecmp[  ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_strncasecmp_decl=yes
+ fi
+ rm -f conftest*
  
- /* 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 _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)
- choke me
- #else
- char (*f) () = _doprnt;
- #endif
- #ifdef __cplusplus
- }
- #endif
+ if test "$ice_cv_have_strncasecmp_decl" = yes; then
+       break
+ fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
  
 +int
 +main ()
 +{
 +return f != _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
-   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__doprnt=yes
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}strncasecmp[  ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_strncasecmp_decl=yes
+ fi
+ rm -f conftest*
  
- ac_cv_func__doprnt=no
+ if test "$ice_cv_have_strncasecmp_decl" = yes; then
+       break
  fi
 -done
 -
 +rm -f conftest.err conftest.$ac_objext \
 +      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
 +if test $ac_cv_func__doprnt = yes; then
  
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_DOPRNT 1
+ { echo "$as_me:$LINENO: result: $ice_cv_have_strncasecmp_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_strncasecmp_decl" >&6; }
+ if test "$ice_cv_have_strncasecmp_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_STRNCASECMP_DECL 1
  _ACEOF
  
  fi
 +
  fi
 +done
 +
  
  
- ice_have_vfprintf=no
+ ice_have_syslog=no
  
- for ac_func in vfprintf
+ for ac_func in syslog
  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
@@@ -60949,87 -67021,79 +69281,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_vfprintf=yes
+  ice_have_syslog=yes
  fi
  done
  
- if test "${ice_have_vfprintf}" = yes; then
echo "$as_me:$LINENO: checking for vfprintf declaration in stdio.h stdlib.h" >&5
- echo $ECHO_N "checking for vfprintf declaration in stdio.h stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_vfprintf_decl+set}" = set; then
+ if test "${ice_have_syslog}" = yes; then
{ echo "$as_me:$LINENO: checking for syslog declaration in syslog.h" >&5
+ echo $ECHO_N "checking for syslog declaration in syslog.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_syslog_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_vfprintf_decl=no
+ ice_cv_have_syslog_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h stdlib.h; do
+ for header in syslog.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -61041,12 -67105,12 +69365,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}vfprintf[     ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_vfprintf_decl=yes
+   $EGREP "${ice_re_word}syslog[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_syslog_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_vfprintf_decl" = yes; then
+ if test "$ice_cv_have_syslog_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -61060,38 -67124,38 +69384,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}vfprintf[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_vfprintf_decl=yes
+   $EGREP "${ice_re_word}syslog[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_syslog_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_vfprintf_decl" = yes; then
+ if test "$ice_cv_have_syslog_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_vfprintf_decl" >&5
- echo "${ECHO_T}$ice_cv_have_vfprintf_decl" >&6
- if test "$ice_cv_have_vfprintf_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_syslog_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_syslog_decl" >&6; }
+ if test "$ice_cv_have_syslog_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_VFPRINTF_DECL 1
+ #define HAVE_SYSLOG_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_vprintf=no
+ ice_have_system=no
  
- for ac_func in vprintf
+ for ac_func in system
  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
@@@ -61117,87 -67181,79 +69441,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_vprintf=yes
+  ice_have_system=yes
  fi
  done
  
- if test "${ice_have_vprintf}" = yes; then
echo "$as_me:$LINENO: checking for vprintf declaration in stdio.h stdlib.h" >&5
- echo $ECHO_N "checking for vprintf declaration in stdio.h stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_vprintf_decl+set}" = set; then
+ if test "${ice_have_system}" = yes; then
{ echo "$as_me:$LINENO: checking for system declaration in stdlib.h" >&5
+ echo $ECHO_N "checking for system declaration in stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_system_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_vprintf_decl=no
+ ice_cv_have_system_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h stdlib.h; do
+ for header in stdlib.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -61209,12 -67265,12 +69525,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}vprintf[      ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_vprintf_decl=yes
+   $EGREP "${ice_re_word}system[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_system_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_vprintf_decl" = yes; then
+ if test "$ice_cv_have_system_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -61228,38 -67284,38 +69544,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}vprintf[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_vprintf_decl=yes
+   $EGREP "${ice_re_word}system[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_system_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_vprintf_decl" = yes; then
+ if test "$ice_cv_have_system_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_vprintf_decl" >&5
- echo "${ECHO_T}$ice_cv_have_vprintf_decl" >&6
- if test "$ice_cv_have_vprintf_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_system_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_system_decl" >&6; }
+ if test "$ice_cv_have_system_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_VPRINTF_DECL 1
+ #define HAVE_SYSTEM_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_vsprintf=no
+ ice_have_time=no
  
- for ac_func in vsprintf
+ for ac_func in time
  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
@@@ -61285,87 -67341,79 +69601,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_vsprintf=yes
+  ice_have_time=yes
  fi
  done
  
- if test "${ice_have_vsprintf}" = yes; then
echo "$as_me:$LINENO: checking for vsprintf declaration in stdio.h stdlib.h" >&5
- echo $ECHO_N "checking for vsprintf declaration in stdio.h stdlib.h... $ECHO_C" >&6
- if test "${ice_cv_have_vsprintf_decl+set}" = set; then
+ if test "${ice_have_time}" = yes; then
{ echo "$as_me:$LINENO: checking for time declaration in time.h sys/time.h" >&5
+ echo $ECHO_N "checking for time declaration in time.h sys/time.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_time_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_vsprintf_decl=no
+ ice_cv_have_time_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in stdio.h stdlib.h; do
+ for header in time.h sys/time.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -61377,12 -67425,12 +69685,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}vsprintf[     ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_vsprintf_decl=yes
+   $EGREP "${ice_re_word}time[         ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_time_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_vsprintf_decl" = yes; then
+ if test "$ice_cv_have_time_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -61396,130 -67444,38 +69704,66 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}vsprintf[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_vsprintf_decl=yes
+   $EGREP "${ice_re_word}time[         ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_time_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_vsprintf_decl" = yes; then
+ if test "$ice_cv_have_time_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_vsprintf_decl" >&5
- echo "${ECHO_T}$ice_cv_have_vsprintf_decl" >&6
- if test "$ice_cv_have_vsprintf_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_time_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_time_decl" >&6; }
+ if test "$ice_cv_have_time_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_VSPRINTF_DECL 1
- _ACEOF
- fi
- fi
- echo "$as_me:$LINENO: checking for wait4" >&5
- echo $ECHO_N "checking for wait4... $ECHO_C" >&6
- if test "${ac_cv_func_wait4+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 wait4 to an innocuous variant, in case <limits.h> declares wait4.
-    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
- #define wait4 innocuous_wait4
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char wait4 (); 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 wait4
- /* 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 wait4 ();
- /* 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_wait4) || defined (__stub___wait4)
- choke me
- #else
- char (*f) () = wait4;
- #endif
- #ifdef __cplusplus
- }
- #endif
- int
- main ()
- {
- return f != wait4;
-   ;
-   return 0;
- }
+ #define HAVE_TIME_DECL 1
  _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_wait4=yes
 +else
 +  echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
  
 +ac_cv_func_wait4=no
  fi
- rm -f conftest.err conftest.$ac_objext \
-       conftest$ac_exeext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $ac_cv_func_wait4" >&5
- echo "${ECHO_T}$ac_cv_func_wait4" >&6
  
 +#AC_REPLACE_FUNCS(writev)
  
- ice_have_writev=no
+ ice_have_tolower=no
  
- for ac_func in writev
+ for ac_func in tolower
  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
@@@ -61545,87 -67501,79 +69789,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_writev=yes
+  ice_have_tolower=yes
  fi
  done
  
- if test "${ice_have_writev}" = yes; then
echo "$as_me:$LINENO: checking for writev declaration in unistd.h sys/uio.h" >&5
- echo $ECHO_N "checking for writev declaration in unistd.h sys/uio.h... $ECHO_C" >&6
- if test "${ice_cv_have_writev_decl+set}" = set; then
+ if test "${ice_have_tolower}" = yes; then
{ echo "$as_me:$LINENO: checking for tolower declaration in ctype.h" >&5
+ echo $ECHO_N "checking for tolower declaration in ctype.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_tolower_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_writev_decl=no
+ ice_cv_have_tolower_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in unistd.h sys/uio.h; do
+ for header in ctype.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -61637,12 -67585,12 +69873,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}writev[       ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_writev_decl=yes
+   $EGREP "${ice_re_word}tolower[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_tolower_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_writev_decl" = yes; then
+ if test "$ice_cv_have_tolower_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -61656,38 -67604,38 +69892,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}writev[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_writev_decl=yes
+   $EGREP "${ice_re_word}tolower[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_tolower_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_writev_decl" = yes; then
+ if test "$ice_cv_have_tolower_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_writev_decl" >&5
- echo "${ECHO_T}$ice_cv_have_writev_decl" >&6
- if test "$ice_cv_have_writev_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_tolower_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_tolower_decl" >&6; }
+ if test "$ice_cv_have_tolower_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_WRITEV_DECL 1
+ #define HAVE_TOLOWER_DECL 1
  _ACEOF
  
  fi
  fi
  
  
- ice_have_strcasecmp=no
+ ice_have_toupper=no
  
- for ac_func in strcasecmp
+ for ac_func in toupper
  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
@@@ -61713,87 -67661,79 +69949,79 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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
-  ice_have_strcasecmp=yes
+  ice_have_toupper=yes
  fi
  done
  
- if test "${ice_have_strcasecmp}" = yes; then
echo "$as_me:$LINENO: checking for strcasecmp declaration in string.h strings.h" >&5
- echo $ECHO_N "checking for strcasecmp declaration in string.h strings.h... $ECHO_C" >&6
- if test "${ice_cv_have_strcasecmp_decl+set}" = set; then
+ if test "${ice_have_toupper}" = yes; then
{ echo "$as_me:$LINENO: checking for toupper declaration in ctype.h" >&5
+ echo $ECHO_N "checking for toupper declaration in ctype.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_toupper_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
- ice_cv_have_strcasecmp_decl=no
+ ice_cv_have_toupper_decl=no
  ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
  ice_re_word='(^|[^a-zA-Z0-9_])'
- for header in string.h strings.h; do
+ for header in ctype.h; do
  # Check for ordinary declaration
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
@@@ -61805,12 -67745,12 +70033,12 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strcasecmp[   ]*\(" >/dev/null 2>&1; then
-   ice_cv_have_strcasecmp_decl=yes
+   $EGREP "${ice_re_word}toupper[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_toupper_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_strcasecmp_decl" = yes; then
+ if test "$ice_cv_have_toupper_decl" = yes; then
        break
  fi
  # Check for "fixed" declaration like "getpid _PARAMS((int))"
@@@ -61824,37 -67764,38 +70052,38 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  _ACEOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-   $EGREP "${ice_re_word}strcasecmp[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
-   ice_cv_have_strcasecmp_decl=yes
+   $EGREP "${ice_re_word}toupper[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_toupper_decl=yes
  fi
  rm -f conftest*
  
- if test "$ice_cv_have_strcasecmp_decl" = yes; then
+ if test "$ice_cv_have_toupper_decl" = yes; then
        break
  fi
  done
  
  fi
  
echo "$as_me:$LINENO: result: $ice_cv_have_strcasecmp_decl" >&5
- echo "${ECHO_T}$ice_cv_have_strcasecmp_decl" >&6
- if test "$ice_cv_have_strcasecmp_decl" = yes; then
{ echo "$as_me:$LINENO: result: $ice_cv_have_toupper_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_toupper_decl" >&6; }
+ if test "$ice_cv_have_toupper_decl" = yes; then
  
  cat >>confdefs.h <<_ACEOF
- #define HAVE_STRCASECMP_DECL 1
+ #define HAVE_TOUPPER_DECL 1
  _ACEOF
  
  fi
  fi
  
  
+ ice_have_ungetc=no
  
- for ac_func in fnmatch
+ for ac_func in ungetc
  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
@@@ -61880,309 -67821,142 +70109,172 @@@ cat >>conftest.$ac_ext <<_ACEO
  
  #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)
- 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 disk device prefixes" >&5
- echo $ECHO_N "checking disk device prefixes... $ECHO_C" >&6
- dfline=`(
-     df / | while read line; do
-       set -- $line
-       while test $# -gt 0; do
-           if test "x$1" = "x/"; then
-               echo $line
-               break 2
-           fi
-           shift
-       done
-     done
- ) | sed 's/(//' | sed 's/)//' `
- mount=`(
-     set -- $dfline
-     while test $# -gt 0; do
-       if expr "$1" : '.*dev' >/dev/null 2>&1; then
-           echo $1
-           break
-       fi
-       shift
-     done
- )`
- if test "$DEV_PREFIX" && test "$RDEV_PREFIX"; then
-     echo "$as_me:$LINENO: result: (predefined) $DEV_PREFIX - $RDEV_PREFIX" >&5
- echo "${ECHO_T}(predefined) $DEV_PREFIX - $RDEV_PREFIX" >&6
- else
-     if test -d /dev/dsk; then
-       DEV_PREFIX=/dev/dsk/
-       if test -d /dev/rdsk; then
-           RDEV_PREFIX=/dev/rdsk/
-       else
-           RDEV_PREFIX=/dev/dsk/
-       fi
-     elif test -d /dev; then
-       case "$target" in
-           *-sni-sysv4)
-               dev_prefix=/dev/dsk/
-               rdev_prefix=/dev/rdsk/
-               { echo "$as_me:$LINENO: WARNING: \"*** Run amsinixfixdevs on Sinix systems using VxFS.\"" >&5
- echo "$as_me: WARNING: \"*** Run amsinixfixdevs on Sinix systems using VxFS.\"" >&2;}
-               ;;
-             *)
-               DEV_PREFIX=/dev/
-               # Some systems, notably Linux, do not have raw disk devices
-               # names.  Check this by trying to see if a raw disk device name
-               # exists using the normal raw device path prepended to the
-               # mount point of the root filesystem.
-               if test "$mount"; then
-                   dev_name="/dev/r`basename $mount`"
-                   if test -b $dev_name -o -c $dev_name; then
-                       RDEV_PREFIX=/dev/r
-                   else
-                       RDEV_PREFIX=/dev/
-                   fi
-               else
-                   RDEV_PREFIX=/dev/r
-               fi
-               ;;
-       esac
-     else
-       DEV_PREFIX=/
-       RDEV_PREFIX=/
-     fi
-     echo "$as_me:$LINENO: result: $DEV_PREFIX - $RDEV_PREFIX" >&5
- echo "${ECHO_T}$DEV_PREFIX - $RDEV_PREFIX" >&6
- fi
- cat >>confdefs.h <<_ACEOF
- #define DEV_PREFIX "${DEV_PREFIX}"
- _ACEOF
+ #if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+ #endif
  
- cat >>confdefs.h <<_ACEOF
- #define RDEV_PREFIX "${RDEV_PREFIX}"
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
  _ACEOF
- case $mount in
-     /dev/vg*)
-       { echo "$as_me:$LINENO: WARNING: \"*** Run amhpfixdevs on HP-UX systems using /dev/vg??.\"" >&5
- echo "$as_me: WARNING: \"*** Run amhpfixdevs on HP-UX systems using /dev/vg??.\"" >&2;}
-       ;;
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (ac_try="$ac_link"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
  esac
- echo "$as_me:$LINENO: checking whether posix fcntl locking works" >&5
- echo $ECHO_N "checking whether posix fcntl locking works... $ECHO_C" >&6
- if test "${amanda_cv_posix_filelocking+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ 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); } && {
+        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
  
-       if test "$cross_compiling" = yes; then
+       eval "$as_ac_var=no"
+ fi
  
-       amanda_cv_posix_filelocking="no (cannot run test)"
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
+  ice_have_ungetc=yes
+ fi
+ done
  
+ if test "${ice_have_ungetc}" = yes; then
+ { echo "$as_me:$LINENO: checking for ungetc declaration in stdio.h" >&5
+ echo $ECHO_N "checking for ungetc declaration in stdio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_ungetc_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
-   cat >conftest.$ac_ext <<_ACEOF
+ ice_cv_have_ungetc_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in stdio.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 -#include <$header>
 +
 +#undef  ASSERTIONS
 +#define CONFIGURE_TEST
 +#define USE_POSIX_FCNTL
 +#include "${srcdir-.}/common-src/amflock.c"
  
  _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
-       amanda_cv_posix_filelocking=yes
- 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 )
-       amanda_cv_posix_filelocking="no"
- fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
-     rm -f /tmp/conftest.lock
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}ungetc[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_ungetc_decl=yes
  fi
 -rm -f conftest*
 +echo "$as_me:$LINENO: result: $amanda_cv_posix_filelocking" >&5
 +echo "${ECHO_T}$amanda_cv_posix_filelocking" >&6
 +if test "x$amanda_cv_posix_filelocking" = xyes; then
 +
 +cat >>confdefs.h <<\_ACEOF
 +#define USE_POSIX_FCNTL 1
 +_ACEOF
  
-     HAS_WORKING_FILE_LOCK=1
+ if test "$ice_cv_have_ungetc_decl" = yes; then
+       break
  fi
 -# Check for "fixed" declaration like "getpid _PARAMS((int))"
 -cat >conftest.$ac_ext <<_ACEOF
 +
 +if test -z "$HAS_WORKING_FILE_LOCK"; then
 +    echo "$as_me:$LINENO: checking whether flock locking works" >&5
 +echo $ECHO_N "checking whether flock locking works... $ECHO_C" >&6
 +if test "${amanda_cv_flock_filelocking+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +
 +          if test "$cross_compiling" = yes; then
 +
 +                  amanda_cv_flock_filelocking="no (cannot run test)"
 +
 +else
 +  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
 -#include <$header>
 +
 +#undef  ASSERTIONS
 +#define CONFIGURE_TEST
 +#define USE_FLOCK
 +#include "${srcdir-.}/common-src/amflock.c"
  
  _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
-                   amanda_cv_flock_filelocking="yes"
- 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 )
-                   amanda_cv_flock_filelocking="no"
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}ungetc[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_ungetc_decl=yes
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ rm -f conftest*
+ if test "$ice_cv_have_ungetc_decl" = yes; then
+       break
  fi
 -done
 +      rm -f /tmp/conftest.lock
  
  fi
 +echo "$as_me:$LINENO: result: $amanda_cv_flock_filelocking" >&5
 +echo "${ECHO_T}$amanda_cv_flock_filelocking" >&6
 +    if test "x$amanda_cv_flock_filelocking" = xyes; then
  
- cat >>confdefs.h <<\_ACEOF
- #define USE_FLOCK 1
+ { echo "$as_me:$LINENO: result: $ice_cv_have_ungetc_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_ungetc_decl" >&6; }
+ if test "$ice_cv_have_ungetc_decl" = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_UNGETC_DECL 1
  _ACEOF
  
 -fi
 +      HAS_WORKING_FILE_LOCK=1
 +    fi
  fi
  
- if test -z "$HAS_WORKING_FILE_LOCK"; then
-     echo "$as_me:$LINENO: checking whether lockf locking works" >&5
- echo $ECHO_N "checking whether lockf locking works... $ECHO_C" >&6
- if test "${amanda_cv_lockf_filelocking+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-           if test "$cross_compiling" = yes; then
  
-                   amanda_cv_lockf_filelocking="no (cannot run test)"
+ ice_have_vfprintf=no
  
+ for ac_func in vfprintf
+ 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 { 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
  /* confdefs.h.  */
  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
  
- #undef  ASSERTIONS
- #define CONFIGURE_TEST
- #define USE_LOCKF
- #include "${srcdir-.}/common-src/amflock.c"
+ /* 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
+ 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
+ #endif
  
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   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
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); }; }; then
-                   amanda_cv_lockf_filelocking="yes"
+   (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
 +  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 )
 +
 +                  amanda_cv_lockf_filelocking="no"
 +
+       eval "$as_ac_var=no"
  fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
-       rm -f /tmp/conftest.lock
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $amanda_cv_lockf_filelocking" >&5
- echo "${ECHO_T}$amanda_cv_lockf_filelocking" >&6
-     if test "x$amanda_cv_lockf_filelocking" = xyes; then
cat >>confdefs.h <<\_ACEOF
- #define USE_LOCKF 1
+ 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
-       HAS_WORKING_FILE_LOCK=1
-     fi
+  ice_have_vfprintf=yes
  fi
 -done
  
- if test -z "$HAS_WORKING_FILE_LOCK"; then
    echo "$as_me:$LINENO: checking whether lnlock locking works" >&5
- echo $ECHO_N "checking whether lnlock locking works... $ECHO_C" >&6
- if test "${amanda_cv_lnlock_filelocking+set}" = set; then
+ if test "${ice_have_vfprintf}" = yes; then
{ echo "$as_me:$LINENO: checking for vfprintf declaration in stdio.h stdlib.h" >&5
+ echo $ECHO_N "checking for vfprintf declaration in stdio.h stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_vfprintf_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
-           if test "$cross_compiling" = yes; then
-                   amanda_cv_lnlock_filelocking="no (cannot run test)"
- else
  cat >conftest.$ac_ext <<_ACEOF
+ ice_cv_have_vfprintf_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in stdio.h stdlib.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #undef  ASSERTIONS
- #define CONFIGURE_TEST
- #define USE_LNLOCK
- #include "${srcdir-.}/common-src/amflock.c"
- #include "${srcdir-.}/common-src/alloc.c"
- #include "${srcdir-.}/common-src/error.c"
- #include "${srcdir-.}/common-src/snprintf.c"
+ #include <$header>
  
  _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
-                   amanda_cv_lnlock_filelocking="yes"
- 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 )
-                   amanda_cv_lnlock_filelocking="no"
- fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}vfprintf[     ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_vfprintf_decl=yes
  fi
-       rm -f /tmp/conftest.lock
+ rm -f conftest*
  
+ if test "$ice_cv_have_vfprintf_decl" = yes; then
+       break
  fi
- echo "$as_me:$LINENO: result: $amanda_cv_lnlock_filelocking" >&5
- echo "${ECHO_T}$amanda_cv_lnlock_filelocking" >&6
-     if test "x$amanda_cv_lnlock_filelocking" = xyes; then
- cat >>confdefs.h <<\_ACEOF
- #define USE_LNLOCK 1
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
  _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
  
-       HAS_WORKING_FILE_LOCK=1
-     fi
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}vfprintf[     ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_vfprintf_decl=yes
  fi
+ rm -f conftest*
  
- if test -z "$HAS_WORKING_FILE_LOCK"; then
-     { echo "$as_me:$LINENO: WARNING: *** No working file locking capability found!" >&5
- echo "$as_me: WARNING: *** No working file locking capability found!" >&2;}
-     { echo "$as_me:$LINENO: WARNING: *** Be VERY VERY careful." >&5
- echo "$as_me: WARNING: *** Be VERY VERY careful." >&2;}
+ if test "$ice_cv_have_vfprintf_decl" = yes; then
+       break
  fi
 -done
  
- if test x"$NO_CLIENT_MODE" != x"true"; then
-   WANT_CLIENT_TRUE=
-   WANT_CLIENT_FALSE='#'
- else
-   WANT_CLIENT_TRUE='#'
-   WANT_CLIENT_FALSE=
  fi
  
+ { echo "$as_me:$LINENO: result: $ice_cv_have_vfprintf_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_vfprintf_decl" >&6; }
+ if test "$ice_cv_have_vfprintf_decl" = yes; then
  
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_VFPRINTF_DECL 1
+ _ACEOF
  
- if test ! -z "$SAMBA_CLIENT"; then
-   WANT_SAMBA_TRUE=
-   WANT_SAMBA_FALSE='#'
- else
-   WANT_SAMBA_TRUE='#'
-   WANT_SAMBA_FALSE=
  fi
- if test x"$NO_RESTORE_MODE" != x"true"; then
-   WANT_RESTORE_TRUE=
-   WANT_RESTORE_FALSE='#'
- else
-   WANT_RESTORE_TRUE='#'
-   WANT_RESTORE_FALSE=
  fi
  
  
+ ice_have_vprintf=no
  
- if test x"$NO_SERVER_MODE" != x"true"; then
-   WANT_SERVER_TRUE=
-   WANT_SERVER_FALSE='#'
+ 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 { 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
 -/* 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
 +  WANT_SERVER_TRUE='#'
 +  WANT_SERVER_FALSE=
 +fi
  
 -/* 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
 +if test x"$NO_RECOVER_MODE" != x"true" && test x"$NO_CLIENT_MODE" != x"true"; then
 +  WANT_RECOVER_TRUE=
 +  WANT_RECOVER_FALSE='#'
 +else
 +  WANT_RECOVER_TRUE='#'
 +  WANT_RECOVER_FALSE=
 +fi
 +
  
+ /* 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
+ 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
+ #endif
  
- if test x"$NO_SERVER_MODE" != x"true" || test x"$NO_RESTORE_MODE" != x"true"; then
-   WANT_TAPE_TRUE=
-   WANT_TAPE_FALSE='#'
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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
 +  WANT_TAPE_TRUE='#'
 +  WANT_TAPE_FALSE=
 +fi
 +
 +
  
- if test x"$NO_AMPLOT_MODE" != x"true"; then
-   WANT_AMPLOT_TRUE=
-   WANT_AMPLOT_FALSE='#'
- else
-   WANT_AMPLOT_TRUE='#'
-   WANT_AMPLOT_FALSE=
+       eval "$as_ac_var=no"
  fi
  
- if test x"$NO_SCSI_CHANGER_MODE" != x"true"; then
-   WANT_CHG_SCSI_TRUE=
-   WANT_CHG_SCSI_FALSE='#'
- else
-   WANT_CHG_SCSI_TRUE='#'
-   WANT_CHG_SCSI_FALSE=
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  fi
- if test x"$NO_CHIO_CHANGER_MODE" != x"true"; then
-   WANT_CHIO_SCSI_TRUE=
-   WANT_CHIO_SCSI_FALSE='#'
- else
-   WANT_CHIO_SCSI_TRUE='#'
-   WANT_CHIO_SCSI_FALSE=
+ 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
+  ice_have_vprintf=yes
  fi
 -done
  
- if test x"$NEED_RUNTIME_PSEUDO_RELOC" = x"true"; then
-   WANT_RUNTIME_PSEUDO_RELOC_TRUE=
-   WANT_RUNTIME_PSEUDO_RELOC_FALSE='#'
+ if test "${ice_have_vprintf}" = yes; then
+ { echo "$as_me:$LINENO: checking for vprintf declaration in stdio.h stdlib.h" >&5
+ echo $ECHO_N "checking for vprintf declaration in stdio.h stdlib.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_vprintf_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
 +  WANT_RUNTIME_PSEUDO_RELOC_TRUE='#'
 +  WANT_RUNTIME_PSEUDO_RELOC_FALSE=
 +fi
 +
  
+ ice_cv_have_vprintf_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in stdio.h stdlib.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
  
- if test x"$NEED_SETUID_CLIENT" != x"false"; then
-   WANT_SETUID_CLIENT_TRUE=
-   WANT_SETUID_CLIENT_FALSE='#'
- else
-   WANT_SETUID_CLIENT_TRUE='#'
-   WANT_SETUID_CLIENT_FALSE=
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}vprintf[      ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_vprintf_decl=yes
  fi
 -rm -f conftest*
  
- if test x"$SSH_SECURITY_SET" = x"true"; then
-   WANT_SSH_SECURITY_TRUE=
-   WANT_SSH_SECURITY_FALSE='#'
- else
-   WANT_SSH_SECURITY_TRUE='#'
-   WANT_SSH_SECURITY_FALSE=
+ if test "$ice_cv_have_vprintf_decl" = yes; then
+       break
  fi
 -# Check for "fixed" declaration like "getpid _PARAMS((int))"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 +
 +
 +case "${FORCE_USE_RUNDUMP-${USE_RUNDUMP}}" in
 +y |  ye | yes)
 +cat >>confdefs.h <<\_ACEOF
 +#define USE_RUNDUMP 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$header>
 +;;
 +esac
 +
 +# This is necessary so that .o files in LIBOBJS are also built via
 +# the ANSI2KNR-filtering rules.
 +LIBOBJS=`echo "$LIBOBJS" |
 +             sed 's,\.[^.]* ,$U&,g;s,\.[^.]*$,$U&,'`
 +LTLIBOBJS=`echo "$LIBOBJS" |
 +           sed 's,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,'`
 +
 +
 +LTALLOCA=`echo "$ALLOCA" | sed 's/\.'"${ac_objext}"'/\.lo/g'`
 +
 +
 +## This stuff is needed for the documentation.
 +DOC_BUILD_DATE=`date '+%d-%m-%Y'`
 +
 +
 +# Check whether --enable-manpage-build or --disable-manpage-build was given.
 +if test "${enable_manpage_build+set}" = set; then
 +  enableval="$enable_manpage_build"
 +   ENABLE_MANPAGE_BUILD=$enableval
 +else
 +   ENABLE_MANPAGE_BUILD=no
 +fi;
 +
 +
 +XSLTPROC_FLAGS="--nonet"
 +
 +
 +# The (lack of) whitespace and overquoting here are all necessary for
 +# proper formatting.
 +
 +# Check whether --with-xsltproc or --without-xsltproc was given.
 +if test "${with_xsltproc+set}" = set; then
 +  withval="$with_xsltproc"
 +   ac_with_xsltproc=$withval;
 +else
 +   ac_with_xsltproc=maybe;
 +fi;
 +
 +
 +# Check whether --with-xsltproc-flags or --without-xsltproc-flags was given.
 +if test "${with_xsltproc_flags+set}" = set; then
 +  withval="$with_xsltproc_flags"
 +   if test "x$withval" == "xno"; then
 +      XSLTPROC_FLAGS=''
 +    else
 +      if test "x$withval" != "xyes"; then
 +          XSLTPROC_FLAGS="$withval"
 +      fi
 +    fi
 +
 +fi;
 +
 +# search for xsltproc if it wasn't specified
 +if test "$ac_with_xsltproc" = "yes" -o "$ac_with_xsltproc" = "maybe"; then
 +    for ac_prog in xsltproc
 +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_path_XSLTPROC+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +  case $XSLTPROC in
 +  [\\/]* | ?:[\\/]*)
 +  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
 +  ;;
 +  *)
 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 +for as_dir in $LOCSYSPATH
 +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_XSLTPROC="$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
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}vprintf[      ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_vprintf_decl=yes
  fi
 -rm -f conftest*
 +XSLTPROC=$ac_cv_path_XSLTPROC
  
- if test -n "$XSLTPROC"; then
-   echo "$as_me:$LINENO: result: $XSLTPROC" >&5
- echo "${ECHO_T}$XSLTPROC" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
+ if test "$ice_cv_have_vprintf_decl" = yes; then
+       break
  fi
 +
 +  test -n "$XSLTPROC" && break
 +done
 +
 +else
 +    if test "$ac_with_xsltproc" != "no"; then
 +        if test -x "$ac_with_xsltproc"; then
 +            XSLTPROC="$ac_with_xsltproc";
 +        else
 +            { echo "$as_me:$LINENO: WARNING: Specified xsltproc of $ac_with_xsltproc isn't" >&5
 +echo "$as_me: WARNING: Specified xsltproc of $ac_with_xsltproc isn't" >&2;}
 +            { echo "$as_me:$LINENO: WARNING: executable; searching for an alternative." >&5
 +echo "$as_me: WARNING: executable; searching for an alternative." >&2;}
 +            for ac_prog in xsltproc
 +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_path_XSLTPROC+set}" = set; then
 +  echo $ECHO_N "(cached) $ECHO_C" >&6
 +else
 +  case $XSLTPROC in
 +  [\\/]* | ?:[\\/]*)
 +  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
 +  ;;
 +  *)
 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 +for as_dir in $LOCSYSPATH
 +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_XSLTPROC="$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
 +XSLTPROC=$ac_cv_path_XSLTPROC
  
- if test -n "$XSLTPROC"; then
-   echo "$as_me:$LINENO: result: $XSLTPROC" >&5
- echo "${ECHO_T}$XSLTPROC" >&6
- else
-   echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6
- fi
+ { echo "$as_me:$LINENO: result: $ice_cv_have_vprintf_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_vprintf_decl" >&6; }
+ if test "$ice_cv_have_vprintf_decl" = yes; then
  
-   test -n "$XSLTPROC" && break
- done
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_VPRINTF_DECL 1
+ _ACEOF
  
 -fi
 +        fi
 +    fi
  fi
  
-     echo "$as_me:$LINENO: checking for Docbook XSLT version 1.72.0" >&5
- echo $ECHO_N "checking for Docbook XSLT version 1.72.0... $ECHO_C" >&6
- if test "${ac_cv_docbook_xslt_1_72_0+set}" = set; then
+ { echo "$as_me:$LINENO: checking for wait4" >&5
+ echo $ECHO_N "checking for wait4... $ECHO_C" >&6; }
+ if test "${ac_cv_func_wait4+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 wait4 to an innocuous variant, in case <limits.h> declares wait4.
+    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+ #define wait4 innocuous_wait4
  
-       ac_cv_docbook_xslt_1_72_0=no
-       if test -n "$XSLTPROC"; then
-           echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/1.72.0/xhtml/docbook.xsl'" >&5
-           $XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/1.72.0/xhtml/docbook.xsl >&5 2>&1
-           if test "$?" = 0; then
-               ac_cv_docbook_xslt_1_72_0=yes
-           fi
-       fi
- fi
- echo "$as_me:$LINENO: result: $ac_cv_docbook_xslt_1_72_0" >&5
- echo "${ECHO_T}$ac_cv_docbook_xslt_1_72_0" >&6
-     HAVE_DOCBOOK_XSLT_1_72_0="$ac_cv_docbook_xslt_1_72_0"
-     HAVE_DOCBOOK_XSLT=HAVE_DOCBOOK_XSLT_1_72_0
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char wait4 (); 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 wait4
  
+ /* 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
+ char wait4 ();
+ /* 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_wait4 || defined __stub___wait4
+ choke me
+ #endif
  
-     echo "$as_me:$LINENO: checking for Docbook DTD version 4.1.2" >&5
- echo $ECHO_N "checking for Docbook DTD version 4.1.2... $ECHO_C" >&6
- if test "${ac_cv_docbook_dtd_4_1_2+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
+ int
+ main ()
+ {
+ return wait4 ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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_wait4=yes
  else
 -  echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
-       ac_cv_docbook_dtd_4_1_2=no
-       if test -n "$XSLTPROC"; then
-           MY_XSLTPROC_FLAGS=`echo "" $XSLTPROC_FLAGS|sed -e s/--novalid//g`
-           cat <<EOF >conftest.xml
- <?xml version="1.0" encoding='ISO-8859-1'?>
- <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
- <book id="empty">
- </book>
- EOF
-           echo "Trying '$XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml'" >&5
-           $XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml >conftest.out 2>&1
-           if test "$?" = 0; then
-               # failing to load the DTD is just a warning, so check for it in the output.
-               if grep 'warning: failed to load external entity' conftest_out >/dev/null 2>&1; then
-                   : # no good..
-               else
-                   ac_cv_docbook_dtd_4_1_2=yes
-               fi
-           fi
-           cat conftest.out >&5
-           rm -f conftest.xml conftest.out
-       fi
+       ac_cv_func_wait4=no
+ fi
  
+ 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_docbook_dtd_4_1_2" >&5
- echo "${ECHO_T}$ac_cv_docbook_dtd_4_1_2" >&6
{ echo "$as_me:$LINENO: result: $ac_cv_func_wait4" >&5
+ echo "${ECHO_T}$ac_cv_func_wait4" >&6; }
  
-     HAVE_DOCBOOK_DTD_4_1_2="$ac_cv_docbook_dtd_4_1_2"
-     HAVE_DOCBOOK_DTD=HAVE_DOCBOOK_DTD_4_1_2
  
+ ice_have_writev=no
  
+ for ac_func in writev
+ 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 { 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
+ /* 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 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
+ 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
+ #endif
  
+ int
+ main ()
+ {
+ return $ac_func ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); } && {
+        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"
+ fi
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ 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
+  ice_have_writev=yes
+ fi
+ done
  
-     echo "$as_me:$LINENO: checking for Docbook DTD version 4.2" >&5
- echo $ECHO_N "checking for Docbook DTD version 4.2... $ECHO_C" >&6
- if test "${ac_cv_docbook_dtd_4_2+set}" = set; then
+ if test "${ice_have_writev}" = yes; then
+ { echo "$as_me:$LINENO: checking for writev declaration in unistd.h sys/uio.h" >&5
+ echo $ECHO_N "checking for writev declaration in unistd.h sys/uio.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_writev_decl+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
-       ac_cv_docbook_dtd_4_2=no
-       if test -n "$XSLTPROC"; then
-           MY_XSLTPROC_FLAGS=`echo "" $XSLTPROC_FLAGS|sed -e s/--novalid//g`
-           cat <<EOF >conftest.xml
- <?xml version="1.0" encoding='ISO-8859-1'?>
- <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
- <book id="empty">
- </book>
- EOF
-           echo "Trying '$XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml'" >&5
-           $XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml >conftest.out 2>&1
-           if test "$?" = 0; then
-               # failing to load the DTD is just a warning, so check for it in the output.
-               if grep 'warning: failed to load external entity' conftest_out >/dev/null 2>&1; then
-                   : # no good..
-               else
-                   ac_cv_docbook_dtd_4_2=yes
-               fi
-           fi
-           cat conftest.out >&5
+ ice_cv_have_writev_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in unistd.h sys/uio.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
  
-           rm -f conftest.xml conftest.out
-       fi
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}writev[       ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_writev_decl=yes
+ fi
+ rm -f conftest*
  
+ if test "$ice_cv_have_writev_decl" = yes; then
+       break
  fi
- echo "$as_me:$LINENO: result: $ac_cv_docbook_dtd_4_2" >&5
- echo "${ECHO_T}$ac_cv_docbook_dtd_4_2" >&6
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
  
-     HAVE_DOCBOOK_DTD_4_2="$ac_cv_docbook_dtd_4_2"
-     HAVE_DOCBOOK_DTD=HAVE_DOCBOOK_DTD_4_2
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}writev[       ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_writev_decl=yes
+ fi
+ rm -f conftest*
  
+ if test "$ice_cv_have_writev_decl" = yes; then
+       break
+ fi
+ done
  
+ fi
  
- # and ensure that everything docbook-related is OK if we'll be using it
- if test "x$ENABLE_MANPAGE_BUILD" = "xyes"; then
-     if test -z "$XSLTPROC"; then
-       { { echo "$as_me:$LINENO: error: Cannot build manpages: 'xsltproc' was not found." >&5
- echo "$as_me: error: Cannot build manpages: 'xsltproc' was not found." >&2;}
-    { (exit 1); exit 1; }; }
-     fi
+ { echo "$as_me:$LINENO: result: $ice_cv_have_writev_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_writev_decl" >&6; }
+ if test "$ice_cv_have_writev_decl" = yes; then
  
-     if test "x$HAVE_DOCBOOK_XSLT_1_72_0" = "xno"; then
-       { { echo "$as_me:$LINENO: error: Cannot build manpages: docbook version 1.72.0 was not found." >&5
- echo "$as_me: error: Cannot build manpages: docbook version 1.72.0 was not found." >&2;}
-    { (exit 1); exit 1; }; }
-     fi
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_WRITEV_DECL 1
+ _ACEOF
  
-     if test "x$HAVE_DOCBOOK_DTD_4_1_2" = "xno" || test "x$HAVE_DOCBOOK_DTD_4_2" = "xno"; then
-       { echo "$as_me:$LINENO: WARNING: Docbook DTD versions 4.1.2 and 4.2 are required for manpage validation; disabling validation" >&5
- echo "$as_me: WARNING: Docbook DTD versions 4.1.2 and 4.2 are required for manpage validation; disabling validation" >&2;}
-       XSLTPROC_FLAGS="$XSLTPROC_FLAGS --novalid"
-     fi
  fi
- if test "x$ENABLE_MANPAGE_BUILD" = "xyes"; then
-   ENABLE_MANPAGE_BUILD_TRUE=
-   ENABLE_MANPAGE_BUILD_FALSE='#'
- else
-   ENABLE_MANPAGE_BUILD_TRUE='#'
-   ENABLE_MANPAGE_BUILD_FALSE=
  fi
  
  
- echo "$as_me:$LINENO: checking for working IPv6" >&5
- echo $ECHO_N "checking for working IPv6... $ECHO_C" >&6
- if test "${amanda_working_ipv6+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   if test "$cross_compiling" = yes; then
-   amanda_working_ipv6=yes
+ ice_have_strcasecmp=no
  
+ for ac_func in strcasecmp
+ 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 { 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
  /* confdefs.h.  */
  cat confdefs.h >>conftest.$ac_ext
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
- #include <sys/types.h>
- #ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.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
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
+ #undef $ac_func
+ /* 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
- #ifdef HAVE_WINSOCK2_H
- #include <winsock2.h>
+ 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
  #endif
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <errno.h>
  
- main()
+ int
+ main ()
  {
-    int aa;
-    aa = socket(AF_INET6, SOCK_STREAM, 0);
-    if (aa > 0) return 0;
-    return aa;
+ return $ac_func ();
+   ;
+   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
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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); }; }; then
-   amanda_working_ipv6=yes
+   (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: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
+   echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
- ( exit $ac_status )
- amanda_working_ipv6=no
+       eval "$as_ac_var=no"
  fi
 +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 +fi
 +
  
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  fi
- echo "$as_me:$LINENO: result: $amanda_working_ipv6" >&5
- echo "${ECHO_T}$amanda_working_ipv6" >&6
- if test "$BROKEN_IPV6" = true; then
-     amanda_working_ipv6=no;
+ 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
+  ice_have_strcasecmp=yes
  fi
+ done
  
- if test "$amanda_working_ipv6" = yes; then
-     if test "$amanda_ipv6" != false; then
+ if test "${ice_have_strcasecmp}" = yes; then
+ { echo "$as_me:$LINENO: checking for strcasecmp declaration in string.h strings.h" >&5
+ echo $ECHO_N "checking for strcasecmp declaration in string.h strings.h... $ECHO_C" >&6; }
+ if test "${ice_cv_have_strcasecmp_decl+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
  
- cat >>confdefs.h <<\_ACEOF
- #define WORKING_IPV6 1
+ ice_cv_have_strcasecmp_decl=no
+ ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
+ ice_re_word='(^|[^a-zA-Z0-9_])'
+ for header in string.h strings.h; do
+ # Check for ordinary declaration
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
  _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
  
-     fi
- else
-     if test "$amanda_ipv6" = true; then
-         { { echo "$as_me:$LINENO: error: Asked for IPv6 but it is not working." >&5
- echo "$as_me: error: Asked for IPv6 but it is not working." >&2;}
-    { (exit 1); exit 1; }; }
-     fi
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}strcasecmp[   ]*\(" >/dev/null 2>&1; then
+   ice_cv_have_strcasecmp_decl=yes
  fi
+ rm -f conftest*
  
- if test "x$CC" = "xgcc"; then
-   GCC_COMPILER_TRUE=
-   GCC_COMPILER_FALSE='#'
- else
-   GCC_COMPILER_TRUE='#'
-   GCC_COMPILER_FALSE=
+ if test "$ice_cv_have_strcasecmp_decl" = yes; then
+       break
  fi
+ # Check for "fixed" declaration like "getpid _PARAMS((int))"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <$header>
  
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+   $EGREP "${ice_re_word}strcasecmp[   ]*$ice_re_params\(\(" >/dev/null 2>&1; then
+   ice_cv_have_strcasecmp_decl=yes
+ fi
+ rm -f conftest*
  
- #### Enforce amanda code cleanliness rules.
- #### Done here to allow configuration code to remain intact.
- if test "x$CC" = "xgcc"; then
-   AM_CFLAGS="$AM_CFLAGS -Wall"
-   $CC -v --help 2>&1 | $GREP -- '-Wextra ' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wextra"
-   else
-    AM_CFLAGS="$AM_CFLAGS -W"
-   fi
-   $CC -v --help 2>&1 | $GREP -- '-Wparentheses' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wparentheses"
-   fi
-   $CC -v --help 2>&1 | $GREP -- '-Wdeclaration-after-statement' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wdeclaration-after-statement"
-   fi
-   $CC -v --help 2>&1 | $GREP -- '-Wmissing-prototypes ' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wmissing-prototypes"
-   fi
-   $CC -v --help 2>&1 | $GREP -- '-Wstrict-prototypes ' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wstrict-prototypes"
-   fi
-   $CC -v --help 2>&1 | $GREP -- '-Wmissing-declarations ' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wmissing-declarations"
-   fi
-   $CC -v --help 2>&1 | $GREP -- '-Wformat' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wformat"
-   fi
+ if test "$ice_cv_have_strcasecmp_decl" = yes; then
+       break
+ fi
+ done
  
-   $CC -v --help 2>&1 | $GREP -- '-Wsign-compare' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wsign-compare"
-   fi
+ fi
  
-   $CC -v --help 2>&1 | $GREP -- '-fno-strict-aliasing' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -fno-strict-aliasing"
-   fi
+ { echo "$as_me:$LINENO: result: $ice_cv_have_strcasecmp_decl" >&5
+ echo "${ECHO_T}$ice_cv_have_strcasecmp_decl" >&6; }
+ if test "$ice_cv_have_strcasecmp_decl" = yes; then
  
-   $CC -v --help 2>&1 | $GREP -- '-Wfloat-equal' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wfloat-equal"
-   fi
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_STRCASECMP_DECL 1
+ _ACEOF
  
-   $CC -v --help 2>&1 | $GREP -- '-Wold-style-definition' 2>&1 > /dev/null
-   if test $? -eq 0; then
-     AM_CFLAGS="$AM_CFLAGS -Wold-style-definition"
-   fi
  fi
+ fi
  
  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ac_config_files="$ac_config_files gnulib/Makefile amplot/amcat.awk amplot/amplot.sh amplot/Makefile amandad-src/Makefile changer-src/chg-manual.sh changer-src/chg-multi.sh changer-src/chg-mtx.sh changer-src/chg-chs.sh changer-src/chg-rth.pl changer-src/chg-chio.pl changer-src/chg-zd-mtx.sh changer-src/Makefile changer-src/chg-juke.sh changer-src/chg-rait.sh changer-src/chg-null.sh changer-src/chg-mcutil.sh changer-src/chg-disk.sh changer-src/chg-iomega.pl changer-src/chg-lib.sh client-src/patch-system.sh client-src/Makefile dumper-src/amgtar.pl dumper-src/generic-dumper.pl dumper-src/Makefile common-src/versuff.c common-src/Makefile example/amanda.conf example/Makefile example/chg-mcutil.conf example/amanda-client.conf man/Makefile docs/Makefile recover-src/Makefile oldrecover-src/Makefile restore-src/Makefile server-src/amcheckdb.sh server-src/amcleanup.sh server-src/amdump.sh server-src/amfreetapes.sh server-src/amoverview.pl server-src/amrmtape.sh server-src/amtoc.pl server-src/amverify.sh server-src/Makefile server-src/amstatus.pl server-src/amverifyrun.sh server-src/amcrypt.sh server-src/amaespipe.sh server-src/amcrypt-ossl.sh server-src/amcrypt-ossl-asym.sh tape-src/Makefile config/Makefile Makefile"
ac_config_files="$ac_config_files Makefile amandad-src/Makefile amplot/Makefile changer-src/Makefile client-src/Makefile common-src/Makefile common-src/versuff.c config/Makefile device-src/Makefile device-src/tests/Makefile dumper-src/Makefile example/Makefile example/amanda-client.conf example/amanda.conf example/chg-mcutil.conf example/template.d/amanda-S3.conf example/template.d/advanced.conf example/template.d/amanda-harddisk.conf example/template.d/amanda-single-tape.conf example/template.d/amanda-tape-changer.conf gnulib/Makefile installcheck/Makefile man/Makefile oldrecover-src/Makefile packaging/Makefile perl/Makefile po/Makefile recover-src/Makefile restore-src/Makefile server-src/Makefile tape-src/Makefile"
  
  
  cat >confcache <<\_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.
+ # 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
@@@ -62981,32 -68752,18 +71173,18 @@@ test "x$prefix" = xNONE && prefix=$ac_d
  # 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
  
      gl_LTLIBOBJS=$gl_ltlibobjs
  
  
- if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
-   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+ if test -z "${WANT_SETUID_CLIENT_TRUE}" && test -z "${WANT_SETUID_CLIENT_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SETUID_CLIENT\" was never defined.
  Usually this means the macro was only invoked conditionally." >&5
- echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+ echo "$as_me: error: conditional \"WANT_SETUID_CLIENT\" was never defined.
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
- if test -z "${WANT_CLIENT_TRUE}" && test -z "${WANT_CLIENT_FALSE}"; then
-   { { echo "$as_me:$LINENO: error: conditional \"WANT_CLIENT\" was never defined.
+ if test -z "${WANT_INSTALLPERMS_TRUE}" && test -z "${WANT_INSTALLPERMS_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_INSTALLPERMS\" was never defined.
  Usually this means the macro was only invoked conditionally." >&5
- echo "$as_me: error: conditional \"WANT_CLIENT\" was never defined.
+ echo "$as_me: error: conditional \"WANT_INSTALLPERMS\" was never defined.
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
- if test -z "${WANT_SAMBA_TRUE}" && test -z "${WANT_SAMBA_FALSE}"; then
-   { { echo "$as_me:$LINENO: error: conditional \"WANT_SAMBA\" was never defined.
+ if test -z "${WANT_CLIENT_TRUE}" && test -z "${WANT_CLIENT_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_CLIENT\" was never defined.
  Usually this means the macro was only invoked conditionally." >&5
- echo "$as_me: error: conditional \"WANT_SAMBA\" was never defined.
+ echo "$as_me: error: conditional \"WANT_CLIENT\" was never defined.
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
@@@ -63106,6 -68863,13 +71284,13 @@@ echo "$as_me: error: conditional \"WANT
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
+ if test -z "${ENABLE_MANPAGE_BUILD_TRUE}" && test -z "${ENABLE_MANPAGE_BUILD_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"ENABLE_MANPAGE_BUILD\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"ENABLE_MANPAGE_BUILD\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
  if test -z "${WANT_CHG_SCSI_TRUE}" && test -z "${WANT_CHG_SCSI_FALSE}"; then
    { { echo "$as_me:$LINENO: error: conditional \"WANT_CHG_SCSI\" was never defined.
  Usually this means the macro was only invoked conditionally." >&5
@@@ -63113,24 -68877,185 +71298,185 @@@ echo "$as_me: error: conditional \"WANT
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
- if test -z "${WANT_CHIO_SCSI_TRUE}" && test -z "${WANT_CHIO_SCSI_FALSE}"; then
-   { { echo "$as_me:$LINENO: error: conditional \"WANT_CHIO_SCSI\" was never defined.
+ if test -z "${WANT_SCSI_LINUX_TRUE}" && test -z "${WANT_SCSI_LINUX_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SCSI_LINUX\" was never defined.
  Usually this means the macro was only invoked conditionally." >&5
- echo "$as_me: error: conditional \"WANT_CHIO_SCSI\" was never defined.
+ echo "$as_me: error: conditional \"WANT_SCSI_LINUX\" was never defined.
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
- if test -z "${WANT_RUNTIME_PSEUDO_RELOC_TRUE}" && test -z "${WANT_RUNTIME_PSEUDO_RELOC_FALSE}"; then
-   { { echo "$as_me:$LINENO: error: conditional \"WANT_RUNTIME_PSEUDO_RELOC\" was never defined.
+ if test -z "${WANT_SCSI_HPUX_NEW_TRUE}" && test -z "${WANT_SCSI_HPUX_NEW_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SCSI_HPUX_NEW\" was never defined.
  Usually this means the macro was only invoked conditionally." >&5
- echo "$as_me: error: conditional \"WANT_RUNTIME_PSEUDO_RELOC\" was never defined.
+ echo "$as_me: error: conditional \"WANT_SCSI_HPUX_NEW\" was never defined.
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
- if test -z "${WANT_SETUID_CLIENT_TRUE}" && test -z "${WANT_SETUID_CLIENT_FALSE}"; then
-   { { echo "$as_me:$LINENO: error: conditional \"WANT_SETUID_CLIENT\" was never defined.
+ if test -z "${WANT_SCSI_IRIX_TRUE}" && test -z "${WANT_SCSI_IRIX_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SCSI_IRIX\" was never defined.
  Usually this means the macro was only invoked conditionally." >&5
- echo "$as_me: error: conditional \"WANT_SETUID_CLIENT\" was never defined.
+ echo "$as_me: error: conditional \"WANT_SCSI_IRIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_SCSI_SOLARIS_TRUE}" && test -z "${WANT_SCSI_SOLARIS_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SCSI_SOLARIS\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_SCSI_SOLARIS\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_SCSI_AIX_TRUE}" && test -z "${WANT_SCSI_AIX_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SCSI_AIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_SCSI_AIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_SCSI_CAM_TRUE}" && test -z "${WANT_SCSI_CAM_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SCSI_CAM\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_SCSI_CAM\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_SCSI_BSD_TRUE}" && test -z "${WANT_SCSI_BSD_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SCSI_BSD\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_SCSI_BSD\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_CHG_SCSI_CHIO_TRUE}" && test -z "${WANT_CHG_SCSI_CHIO_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_CHG_SCSI_CHIO\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_CHG_SCSI_CHIO\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_SCSI_HPUX_TRUE}" && test -z "${WANT_SCSI_HPUX_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SCSI_HPUX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_SCSI_HPUX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_SCSI_CHIO_TRUE}" && test -z "${WANT_SCSI_CHIO_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SCSI_CHIO\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_SCSI_CHIO\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_AMFLOCK_POSIX_TRUE}" && test -z "${WANT_AMFLOCK_POSIX_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_AMFLOCK_POSIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_AMFLOCK_POSIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_AMFLOCK_FLOCK_TRUE}" && test -z "${WANT_AMFLOCK_FLOCK_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_AMFLOCK_FLOCK\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_AMFLOCK_FLOCK\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_AMFLOCK_LOCKF_TRUE}" && test -z "${WANT_AMFLOCK_LOCKF_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_AMFLOCK_LOCKF\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_AMFLOCK_LOCKF\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_AMFLOCK_LNLOCK_TRUE}" && test -z "${WANT_AMFLOCK_LNLOCK_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_AMFLOCK_LNLOCK\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_AMFLOCK_LNLOCK\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_CYGWIN_COPY_PERL_DLL_TRUE}" && test -z "${WANT_CYGWIN_COPY_PERL_DLL_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_CYGWIN_COPY_PERL_DLL\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_CYGWIN_COPY_PERL_DLL\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_S3_DEVICE_TRUE}" && test -z "${WANT_S3_DEVICE_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_S3_DEVICE\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_S3_DEVICE\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_DEVPAY_TRUE}" && test -z "${WANT_DEVPAY_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_DEVPAY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_DEVPAY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_TAPE_XENIX_TRUE}" && test -z "${WANT_TAPE_XENIX_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_TAPE_XENIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_TAPE_XENIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_TAPE_AIX_TRUE}" && test -z "${WANT_TAPE_AIX_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_TAPE_AIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_TAPE_AIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_TAPE_UWARE_TRUE}" && test -z "${WANT_TAPE_UWARE_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_TAPE_UWARE\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_TAPE_UWARE\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_TAPE_POSIX_TRUE}" && test -z "${WANT_TAPE_POSIX_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_TAPE_POSIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_TAPE_POSIX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_TAPE_DEVICE_TRUE}" && test -z "${WANT_TAPE_DEVICE_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_TAPE_DEVICE\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_TAPE_DEVICE\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_BSD_SECURITY_TRUE}" && test -z "${WANT_BSD_SECURITY_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_BSD_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_BSD_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_BSDTCP_SECURITY_TRUE}" && test -z "${WANT_BSDTCP_SECURITY_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_BSDTCP_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_BSDTCP_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_BSDUDP_SECURITY_TRUE}" && test -z "${WANT_BSDUDP_SECURITY_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_BSDUDP_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_BSDUDP_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_RSH_SECURITY_TRUE}" && test -z "${WANT_RSH_SECURITY_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_RSH_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_RSH_SECURITY\" was never defined.
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
@@@ -63141,10 -69066,24 +71487,24 @@@ echo "$as_me: error: conditional \"WANT
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
- if test -z "${ENABLE_MANPAGE_BUILD_TRUE}" && test -z "${ENABLE_MANPAGE_BUILD_FALSE}"; then
-   { { echo "$as_me:$LINENO: error: conditional \"ENABLE_MANPAGE_BUILD\" was never defined.
+ if test -z "${WANT_KRB4_SECURITY_TRUE}" && test -z "${WANT_KRB4_SECURITY_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_KRB4_SECURITY\" was never defined.
  Usually this means the macro was only invoked conditionally." >&5
- echo "$as_me: error: conditional \"ENABLE_MANPAGE_BUILD\" was never defined.
+ echo "$as_me: error: conditional \"WANT_KRB4_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_KRB5_SECURITY_TRUE}" && test -z "${WANT_KRB5_SECURITY_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_KRB5_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_KRB5_SECURITY\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ if test -z "${WANT_SAMBA_TRUE}" && test -z "${WANT_SAMBA_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"WANT_SAMBA\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"WANT_SAMBA\" was never defined.
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
@@@ -63155,6 -69094,13 +71515,13 @@@ echo "$as_me: error: conditional \"GCC_
  Usually this means the macro was only invoked conditionally." >&2;}
     { (exit 1); exit 1; }; }
  fi
+ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+ echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+    { (exit 1); exit 1; }; }
+ fi
  
  : ${CONFIG_STATUS=./config.status}
  ac_clean_files_save=$ac_clean_files
@@@ -63179,17 -69125,45 +71546,45 @@@ cat >>$CONFIG_STATUS <<\_ACEO
  ## 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
+ # 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
- DUALCASE=1; export DUALCASE # for MKS sh
  
  # Support unset when possible.
  if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  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='+ '
    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
  
  
  # 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_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'`
+ # CDPATH.
+ $as_unset CDPATH
    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" || {
  
    # 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=:
    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'"
  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 $as_me, 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
    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"
+ config_commands="$ac_config_commands"
  
- 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
+ _ACEOF
  
  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
+   -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
@@@ -63485,19 -69450,22 +71871,22 @@@ Configuration commands
  $config_commands
  
  Report bugs to <bug-autoconf@gnu.org>."
- _ACEOF
  
+ _ACEOF
  cat >>$CONFIG_STATUS <<_ACEOF
  ac_cs_version="\\
  config.status
- 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'
+ MKDIR_P='$MKDIR_P'
  _ACEOF
  
  cat >>$CONFIG_STATUS <<\_ACEOF
@@@ -63508,39 -69476,24 +71897,24 @@@ while test $# != 
  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
      $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
  _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
  #
- # INIT-COMMANDS section.
+ # INIT-COMMANDS
  #
  AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
- # variables for create stdint.h replacement
- PACKAGE="$PACKAGE"
- VERSION="$VERSION"
- ac_stdint_h="$ac_stdint_h"
- _ac_stdint_h=`echo "_$PACKAGE-$ac_stdint_h" | $as_tr_cpp`
- ac_cv_stdint_message="$ac_cv_stdint_message"
- ac_cv_header_stdint_t="$ac_cv_header_stdint_t"
- ac_cv_header_stdint_x="$ac_cv_header_stdint_x"
- ac_cv_header_stdint_o="$ac_cv_header_stdint_o"
- ac_cv_header_stdint_u="$ac_cv_header_stdint_u"
- ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
- ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
- ac_cv_char_data_model="$ac_cv_char_data_model"
- ac_cv_long_data_model="$ac_cv_long_data_model"
- ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
- ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
- ac_cv_type_intmax_t="$ac_cv_type_intmax_t"
+ # Capture the value of obsolete ALL_LINGUAS because we need it to compute
+     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+     # from automake < 1.5.
+     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+     # Capture the value of LINGUAS because we need it to compute CATALOGS.
+     LINGUAS="${LINGUAS-%UNSET%}"
  
  
  _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.
-   "gnulib/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
-   "amplot/amcat.awk" ) CONFIG_FILES="$CONFIG_FILES amplot/amcat.awk" ;;
-   "amplot/amplot.sh" ) CONFIG_FILES="$CONFIG_FILES amplot/amplot.sh" ;;
-   "amplot/Makefile" ) CONFIG_FILES="$CONFIG_FILES amplot/Makefile" ;;
-   "amandad-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES amandad-src/Makefile" ;;
-   "changer-src/chg-manual.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-manual.sh" ;;
-   "changer-src/chg-multi.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-multi.sh" ;;
-   "changer-src/chg-mtx.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-mtx.sh" ;;
-   "changer-src/chg-chs.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-chs.sh" ;;
-   "changer-src/chg-rth.pl" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-rth.pl" ;;
-   "changer-src/chg-chio.pl" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-chio.pl" ;;
-   "changer-src/chg-zd-mtx.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-zd-mtx.sh" ;;
-   "changer-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES changer-src/Makefile" ;;
-   "changer-src/chg-juke.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-juke.sh" ;;
-   "changer-src/chg-rait.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-rait.sh" ;;
-   "changer-src/chg-null.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-null.sh" ;;
-   "changer-src/chg-mcutil.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-mcutil.sh" ;;
-   "changer-src/chg-disk.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-disk.sh" ;;
-   "changer-src/chg-iomega.pl" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-iomega.pl" ;;
-   "changer-src/chg-lib.sh" ) CONFIG_FILES="$CONFIG_FILES changer-src/chg-lib.sh" ;;
-   "client-src/patch-system.sh" ) CONFIG_FILES="$CONFIG_FILES client-src/patch-system.sh" ;;
-   "client-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES client-src/Makefile" ;;
-   "dumper-src/amgtar.pl" ) CONFIG_FILES="$CONFIG_FILES dumper-src/amgtar.pl" ;;
-   "dumper-src/generic-dumper.pl" ) CONFIG_FILES="$CONFIG_FILES dumper-src/generic-dumper.pl" ;;
-   "dumper-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES dumper-src/Makefile" ;;
-   "common-src/versuff.c" ) CONFIG_FILES="$CONFIG_FILES common-src/versuff.c" ;;
-   "common-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES common-src/Makefile" ;;
-   "example/amanda.conf" ) CONFIG_FILES="$CONFIG_FILES example/amanda.conf" ;;
-   "example/Makefile" ) CONFIG_FILES="$CONFIG_FILES example/Makefile" ;;
-   "example/chg-mcutil.conf" ) CONFIG_FILES="$CONFIG_FILES example/chg-mcutil.conf" ;;
-   "example/amanda-client.conf" ) CONFIG_FILES="$CONFIG_FILES example/amanda-client.conf" ;;
-   "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
-   "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
-   "recover-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES recover-src/Makefile" ;;
-   "oldrecover-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldrecover-src/Makefile" ;;
-   "restore-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES restore-src/Makefile" ;;
-   "server-src/amcheckdb.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amcheckdb.sh" ;;
-   "server-src/amcleanup.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amcleanup.sh" ;;
-   "server-src/amdump.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amdump.sh" ;;
-   "server-src/amfreetapes.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amfreetapes.sh" ;;
-   "server-src/amoverview.pl" ) CONFIG_FILES="$CONFIG_FILES server-src/amoverview.pl" ;;
-   "server-src/amrmtape.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amrmtape.sh" ;;
-   "server-src/amtoc.pl" ) CONFIG_FILES="$CONFIG_FILES server-src/amtoc.pl" ;;
-   "server-src/amverify.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amverify.sh" ;;
-   "server-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES server-src/Makefile" ;;
-   "server-src/amstatus.pl" ) CONFIG_FILES="$CONFIG_FILES server-src/amstatus.pl" ;;
-   "server-src/amverifyrun.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amverifyrun.sh" ;;
-   "server-src/amcrypt.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amcrypt.sh" ;;
-   "server-src/amaespipe.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amaespipe.sh" ;;
-   "server-src/amcrypt-ossl.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amcrypt-ossl.sh" ;;
-   "server-src/amcrypt-ossl-asym.sh" ) CONFIG_FILES="$CONFIG_FILES server-src/amcrypt-ossl-asym.sh" ;;
-   "tape-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES tape-src/Makefile" ;;
-   "config/Makefile" ) CONFIG_FILES="$CONFIG_FILES config/Makefile" ;;
-   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-   "$ac_stdint_h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;;
-   "config/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config/config.h" ;;
+   case $ac_config_target in
+     "config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS config/config.h" ;;
+     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+     "amandad-src/Makefile") CONFIG_FILES="$CONFIG_FILES amandad-src/Makefile" ;;
+     "amplot/Makefile") CONFIG_FILES="$CONFIG_FILES amplot/Makefile" ;;
+     "changer-src/Makefile") CONFIG_FILES="$CONFIG_FILES changer-src/Makefile" ;;
+     "client-src/Makefile") CONFIG_FILES="$CONFIG_FILES client-src/Makefile" ;;
+     "common-src/Makefile") CONFIG_FILES="$CONFIG_FILES common-src/Makefile" ;;
+     "common-src/versuff.c") CONFIG_FILES="$CONFIG_FILES common-src/versuff.c" ;;
+     "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;;
+     "device-src/Makefile") CONFIG_FILES="$CONFIG_FILES device-src/Makefile" ;;
+     "device-src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES device-src/tests/Makefile" ;;
+     "dumper-src/Makefile") CONFIG_FILES="$CONFIG_FILES dumper-src/Makefile" ;;
+     "example/Makefile") CONFIG_FILES="$CONFIG_FILES example/Makefile" ;;
+     "example/amanda-client.conf") CONFIG_FILES="$CONFIG_FILES example/amanda-client.conf" ;;
+     "example/amanda.conf") CONFIG_FILES="$CONFIG_FILES example/amanda.conf" ;;
+     "example/chg-mcutil.conf") CONFIG_FILES="$CONFIG_FILES example/chg-mcutil.conf" ;;
+     "example/template.d/amanda-S3.conf") CONFIG_FILES="$CONFIG_FILES example/template.d/amanda-S3.conf" ;;
+     "example/template.d/advanced.conf") CONFIG_FILES="$CONFIG_FILES example/template.d/advanced.conf" ;;
+     "example/template.d/amanda-harddisk.conf") CONFIG_FILES="$CONFIG_FILES example/template.d/amanda-harddisk.conf" ;;
+     "example/template.d/amanda-single-tape.conf") CONFIG_FILES="$CONFIG_FILES example/template.d/amanda-single-tape.conf" ;;
+     "example/template.d/amanda-tape-changer.conf") CONFIG_FILES="$CONFIG_FILES example/template.d/amanda-tape-changer.conf" ;;
+     "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
+     "installcheck/Makefile") CONFIG_FILES="$CONFIG_FILES installcheck/Makefile" ;;
+     "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+     "oldrecover-src/Makefile") CONFIG_FILES="$CONFIG_FILES oldrecover-src/Makefile" ;;
+     "packaging/Makefile") CONFIG_FILES="$CONFIG_FILES packaging/Makefile" ;;
+     "perl/Makefile") CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;;
+     "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
+     "recover-src/Makefile") CONFIG_FILES="$CONFIG_FILES recover-src/Makefile" ;;
+     "restore-src/Makefile") CONFIG_FILES="$CONFIG_FILES restore-src/Makefile" ;;
+     "server-src/Makefile") CONFIG_FILES="$CONFIG_FILES server-src/Makefile" ;;
+     "tape-src/Makefile") CONFIG_FILES="$CONFIG_FILES tape-src/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
@@@ -63691,502 -69628,965 +72049,965 @@@ if $ac_need_defaults; the
  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,@SHELL@,$SHELL,;t t
- s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
- s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
- s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
- s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
- s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
- s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
- s,@exec_prefix@,$exec_prefix,;t t
- s,@prefix@,$prefix,;t t
- s,@program_transform_name@,$program_transform_name,;t t
- s,@bindir@,$bindir,;t t
- s,@sbindir@,$sbindir,;t t
- s,@libexecdir@,$libexecdir,;t t
- s,@datadir@,$datadir,;t t
- s,@sysconfdir@,$sysconfdir,;t t
- s,@sharedstatedir@,$sharedstatedir,;t t
- s,@localstatedir@,$localstatedir,;t t
- s,@libdir@,$libdir,;t t
- s,@includedir@,$includedir,;t t
- s,@oldincludedir@,$oldincludedir,;t t
- s,@infodir@,$infodir,;t t
- s,@mandir@,$mandir,;t t
- s,@build_alias@,$build_alias,;t t
- s,@host_alias@,$host_alias,;t t
- s,@target_alias@,$target_alias,;t t
- s,@DEFS@,$DEFS,;t t
- s,@ECHO_C@,$ECHO_C,;t t
- s,@ECHO_N@,$ECHO_N,;t t
- s,@ECHO_T@,$ECHO_T,;t t
- s,@LIBS@,$LIBS,;t t
- s,@build@,$build,;t t
- s,@build_cpu@,$build_cpu,;t t
- s,@build_vendor@,$build_vendor,;t t
- s,@build_os@,$build_os,;t t
- s,@host@,$host,;t t
- s,@host_cpu@,$host_cpu,;t t
- s,@host_vendor@,$host_vendor,;t t
- s,@host_os@,$host_os,;t t
- s,@target@,$target,;t t
- s,@target_cpu@,$target_cpu,;t t
- s,@target_vendor@,$target_vendor,;t t
- s,@target_os@,$target_os,;t t
- s,@CONFIGURE_COMMAND@,$CONFIGURE_COMMAND,;t t
- s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
- s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
- s,@INSTALL_DATA@,$INSTALL_DATA,;t t
- s,@CYGPATH_W@,$CYGPATH_W,;t t
- s,@PACKAGE@,$PACKAGE,;t t
- s,@VERSION@,$VERSION,;t t
- s,@ACLOCAL@,$ACLOCAL,;t t
- s,@AUTOCONF@,$AUTOCONF,;t t
- s,@AUTOMAKE@,$AUTOMAKE,;t t
- s,@AUTOHEADER@,$AUTOHEADER,;t t
- s,@MAKEINFO@,$MAKEINFO,;t t
- s,@install_sh@,$install_sh,;t t
- s,@STRIP@,$STRIP,;t t
- s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
- s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
- s,@mkdir_p@,$mkdir_p,;t t
- s,@AWK@,$AWK,;t t
- s,@SET_MAKE@,$SET_MAKE,;t t
- s,@am__leading_dot@,$am__leading_dot,;t t
- s,@AMTAR@,$AMTAR,;t t
- s,@am__tar@,$am__tar,;t t
- s,@am__untar@,$am__untar,;t t
- s,@SNAPSHOT_STAMP@,$SNAPSHOT_STAMP,;t t
- s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
- s,@VERSION_MINOR@,$VERSION_MINOR,;t t
- s,@VERSION_PATCH@,$VERSION_PATCH,;t t
- s,@VERSION_COMMENT@,$VERSION_COMMENT,;t t
- s,@VERSION_SUFFIX@,$VERSION_SUFFIX,;t t
- s,@CC@,$CC,;t t
- s,@CFLAGS@,$CFLAGS,;t t
- s,@LDFLAGS@,$LDFLAGS,;t t
- s,@CPPFLAGS@,$CPPFLAGS,;t t
- s,@ac_ct_CC@,$ac_ct_CC,;t t
- s,@EXEEXT@,$EXEEXT,;t t
- s,@OBJEXT@,$OBJEXT,;t t
- s,@DEPDIR@,$DEPDIR,;t t
- s,@am__include@,$am__include,;t t
- s,@am__quote@,$am__quote,;t t
- s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
- s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
- s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
- s,@CCDEPMODE@,$CCDEPMODE,;t t
- s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
- s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
- s,@RANLIB@,$RANLIB,;t t
- s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
- s,@CPP@,$CPP,;t t
- s,@EGREP@,$EGREP,;t t
- s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t
- s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t
- s,@ALLOCA@,$ALLOCA,;t t
- s,@ALLOCA_H@,$ALLOCA_H,;t t
- s,@ARPA_INET_H@,$ARPA_INET_H,;t t
- s,@SYS_SOCKET_H@,$SYS_SOCKET_H,;t t
- s,@LIBPTH@,$LIBPTH,;t t
- s,@LTLIBPTH@,$LTLIBPTH,;t t
- s,@LIBPTH_PREFIX@,$LIBPTH_PREFIX,;t t
- s,@LIBTHREAD@,$LIBTHREAD,;t t
- s,@LTLIBTHREAD@,$LTLIBTHREAD,;t t
- s,@LIBMULTITHREAD@,$LIBMULTITHREAD,;t t
- s,@LTLIBMULTITHREAD@,$LTLIBMULTITHREAD,;t t
- s,@NETINET_IN_H@,$NETINET_IN_H,;t t
- s,@STDBOOL_H@,$STDBOOL_H,;t t
- s,@HAVE__BOOL@,$HAVE__BOOL,;t t
- s,@HAVE_DECL_MEMMEM@,$HAVE_DECL_MEMMEM,;t t
- s,@HAVE_MEMPCPY@,$HAVE_MEMPCPY,;t t
- s,@HAVE_DECL_MEMRCHR@,$HAVE_DECL_MEMRCHR,;t t
- s,@HAVE_STPCPY@,$HAVE_STPCPY,;t t
- s,@HAVE_STPNCPY@,$HAVE_STPNCPY,;t t
- s,@HAVE_DECL_STRNCASECMP@,$HAVE_DECL_STRNCASECMP,;t t
- s,@HAVE_STRCHRNUL@,$HAVE_STRCHRNUL,;t t
- s,@HAVE_DECL_STRDUP@,$HAVE_DECL_STRDUP,;t t
- s,@HAVE_STRNDUP@,$HAVE_STRNDUP,;t t
- s,@HAVE_DECL_STRNDUP@,$HAVE_DECL_STRNDUP,;t t
- s,@HAVE_DECL_STRNLEN@,$HAVE_DECL_STRNLEN,;t t
- s,@HAVE_STRPBRK@,$HAVE_STRPBRK,;t t
- s,@HAVE_STRSEP@,$HAVE_STRSEP,;t t
- s,@HAVE_DECL_STRTOK_R@,$HAVE_DECL_STRTOK_R,;t t
- s,@REPLACE_STRCASECMP@,$REPLACE_STRCASECMP,;t t
- s,@REPLACE_STRSTR@,$REPLACE_STRSTR,;t t
- s,@REPLACE_STRCASESTR@,$REPLACE_STRCASESTR,;t t
- s,@ABSOLUTE_STRING_H@,$ABSOLUTE_STRING_H,;t t
- s,@MKDIR_P@,$MKDIR_P,;t t
- s,@EOVERFLOW@,$EOVERFLOW,;t t
- s,@CFLAG_VISIBILITY@,$CFLAG_VISIBILITY,;t t
- s,@HAVE_VISIBILITY@,$HAVE_VISIBILITY,;t t
- s,@GREP@,$GREP,;t t
- s,@AMLINT@,$AMLINT,;t t
- s,@AMLINTFLAGS@,$AMLINTFLAGS,;t t
- s,@DUMPER_DIR@,$DUMPER_DIR,;t t
- s,@CONFIG_DIR@,$CONFIG_DIR,;t t
- s,@USE_VERSION_SUFFIXES@,$USE_VERSION_SUFFIXES,;t t
- s,@CLIENT_SCRIPTS_OPT@,$CLIENT_SCRIPTS_OPT,;t t
- s,@DEFAULT_SERVER@,$DEFAULT_SERVER,;t t
- s,@CLIENT_LOGIN@,$CLIENT_LOGIN,;t t
- s,@SETUID_GROUP@,$SETUID_GROUP,;t t
- s,@BINARY_OWNER@,$BINARY_OWNER,;t t
- s,@DEFAULT_CONFIG@,$DEFAULT_CONFIG,;t t
- s,@DEFAULT_TAPE_SERVER@,$DEFAULT_TAPE_SERVER,;t t
- s,@DEFAULT_TAPE_DEVICE@,$DEFAULT_TAPE_DEVICE,;t t
- s,@EXAMPLE_TAPEDEV@,$EXAMPLE_TAPEDEV,;t t
- s,@DEFAULT_RAW_TAPE_DEVICE@,$DEFAULT_RAW_TAPE_DEVICE,;t t
- s,@DEFAULT_CHANGER_DEVICE@,$DEFAULT_CHANGER_DEVICE,;t t
- s,@GNUTAR_LISTED_INCREMENTAL_DIRX@,$GNUTAR_LISTED_INCREMENTAL_DIRX,;t t
- s,@GNUTAR_LISTED_INCREMENTAL_DIR@,$GNUTAR_LISTED_INCREMENTAL_DIR,;t t
- s,@SSH@,$SSH,;t t
- s,@MAXTAPEBLOCKSIZE@,$MAXTAPEBLOCKSIZE,;t t
- s,@AMANDA_TMPDIR@,$AMANDA_TMPDIR,;t t
- s,@AMANDA_DBGDIR@,$AMANDA_DBGDIR,;t t
- s,@AMANDA_DEBUG_DAYS@,$AMANDA_DEBUG_DAYS,;t t
- s,@SERVICE_SUFFIX@,$SERVICE_SUFFIX,;t t
- s,@MT_FILE_FLAG@,$MT_FILE_FLAG,;t t
- s,@AR@,$AR,;t t
- s,@YACC@,$YACC,;t t
- s,@CAT@,$CAT,;t t
- s,@COMPRESS@,$COMPRESS,;t t
- s,@DD@,$DD,;t t
- s,@GETCONF@,$GETCONF,;t t
- s,@GNUPLOT@,$GNUPLOT,;t t
- s,@GNUTAR@,$GNUTAR,;t t
- s,@SAMBA_CLIENT@,$SAMBA_CLIENT,;t t
- s,@GZIP@,$GZIP,;t t
- s,@SORT@,$SORT,;t t
- s,@MAILER@,$MAILER,;t t
- s,@MT@,$MT,;t t
- s,@CHIO@,$CHIO,;t t
- s,@CHS@,$CHS,;t t
- s,@MTX@,$MTX,;t t
- s,@MCUTIL@,$MCUTIL,;t t
- s,@PRINT@,$PRINT,;t t
- s,@PCAT@,$PCAT,;t t
- s,@PERL@,$PERL,;t t
- s,@DUMP@,$DUMP,;t t
- s,@RESTORE@,$RESTORE,;t t
- s,@XFSDUMP@,$XFSDUMP,;t t
- s,@XFSRESTORE@,$XFSRESTORE,;t t
- s,@VXDUMP@,$VXDUMP,;t t
- s,@VXRESTORE@,$VXRESTORE,;t t
- s,@VDUMP@,$VDUMP,;t t
- s,@VRESTORE@,$VRESTORE,;t t
- s,@AMPLOT_COMPRESS@,$AMPLOT_COMPRESS,;t t
- s,@AMPLOT_CAT_GZIP@,$AMPLOT_CAT_GZIP,;t t
- s,@AMPLOT_CAT_COMPRESS@,$AMPLOT_CAT_COMPRESS,;t t
- s,@AMPLOT_CAT_PACK@,$AMPLOT_CAT_PACK,;t t
- s,@LL_FMT@,$LL_FMT,;t t
- s,@LL_RFMT@,$LL_RFMT,;t t
- s,@LN_S@,$LN_S,;t t
- s,@ECHO@,$ECHO,;t t
- s,@ac_ct_AR@,$ac_ct_AR,;t t
- s,@CXX@,$CXX,;t t
- s,@CXXFLAGS@,$CXXFLAGS,;t t
- s,@ac_ct_CXX@,$ac_ct_CXX,;t t
- s,@CXXDEPMODE@,$CXXDEPMODE,;t t
- s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
- s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
- s,@CXXCPP@,$CXXCPP,;t t
- s,@F77@,$F77,;t t
- s,@FFLAGS@,$FFLAGS,;t t
- s,@ac_ct_F77@,$ac_ct_F77,;t t
- s,@LIBTOOL@,$LIBTOOL,;t t
- s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
- s,@LEX@,$LEX,;t t
- s,@LEXLIB@,$LEXLIB,;t t
- s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
- s,@READLINE_LIBS@,$READLINE_LIBS,;t t
- s,@DB_EXT@,$DB_EXT,;t t
- s,@ac_n@,$ac_n,;t t
- s,@ac_c@,$ac_c,;t t
- s,@WANT_CLIENT_TRUE@,$WANT_CLIENT_TRUE,;t t
- s,@WANT_CLIENT_FALSE@,$WANT_CLIENT_FALSE,;t t
- s,@WANT_SAMBA_TRUE@,$WANT_SAMBA_TRUE,;t t
- s,@WANT_SAMBA_FALSE@,$WANT_SAMBA_FALSE,;t t
- s,@WANT_RESTORE_TRUE@,$WANT_RESTORE_TRUE,;t t
- s,@WANT_RESTORE_FALSE@,$WANT_RESTORE_FALSE,;t t
- s,@WANT_SERVER_TRUE@,$WANT_SERVER_TRUE,;t t
- s,@WANT_SERVER_FALSE@,$WANT_SERVER_FALSE,;t t
- s,@WANT_RECOVER_TRUE@,$WANT_RECOVER_TRUE,;t t
- s,@WANT_RECOVER_FALSE@,$WANT_RECOVER_FALSE,;t t
- s,@WANT_TAPE_TRUE@,$WANT_TAPE_TRUE,;t t
- s,@WANT_TAPE_FALSE@,$WANT_TAPE_FALSE,;t t
- s,@WANT_AMPLOT_TRUE@,$WANT_AMPLOT_TRUE,;t t
- s,@WANT_AMPLOT_FALSE@,$WANT_AMPLOT_FALSE,;t t
- s,@WANT_CHG_SCSI_TRUE@,$WANT_CHG_SCSI_TRUE,;t t
- s,@WANT_CHG_SCSI_FALSE@,$WANT_CHG_SCSI_FALSE,;t t
- s,@WANT_CHIO_SCSI_TRUE@,$WANT_CHIO_SCSI_TRUE,;t t
- s,@WANT_CHIO_SCSI_FALSE@,$WANT_CHIO_SCSI_FALSE,;t t
- s,@WANT_RUNTIME_PSEUDO_RELOC_TRUE@,$WANT_RUNTIME_PSEUDO_RELOC_TRUE,;t t
- s,@WANT_RUNTIME_PSEUDO_RELOC_FALSE@,$WANT_RUNTIME_PSEUDO_RELOC_FALSE,;t t
- s,@WANT_SETUID_CLIENT_TRUE@,$WANT_SETUID_CLIENT_TRUE,;t t
- s,@WANT_SETUID_CLIENT_FALSE@,$WANT_SETUID_CLIENT_FALSE,;t t
- s,@WANT_SSH_SECURITY_TRUE@,$WANT_SSH_SECURITY_TRUE,;t t
- s,@WANT_SSH_SECURITY_FALSE@,$WANT_SSH_SECURITY_FALSE,;t t
- s,@LTLIBOBJS@,$LTLIBOBJS,;t t
- s,@LTALLOCA@,$LTALLOCA,;t t
- s,@DOC_BUILD_DATE@,$DOC_BUILD_DATE,;t t
- s,@XSLTPROC_FLAGS@,$XSLTPROC_FLAGS,;t t
- s,@XSLTPROC@,$XSLTPROC,;t t
- s,@ENABLE_MANPAGE_BUILD_TRUE@,$ENABLE_MANPAGE_BUILD_TRUE,;t t
- s,@ENABLE_MANPAGE_BUILD_FALSE@,$ENABLE_MANPAGE_BUILD_FALSE,;t t
- s,@GCC_COMPILER_TRUE@,$GCC_COMPILER_TRUE,;t t
- s,@GCC_COMPILER_FALSE@,$GCC_COMPILER_FALSE,;t t
- s,@AM_CFLAGS@,$AM_CFLAGS,;t t
- s,@LIBOBJS@,$LIBOBJS,;t t
- s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t
- s,@gl_LTLIBOBJS@,$gl_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
+ if test -n "$CONFIG_FILES"; then
+ _ACEOF
+ 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
+ target!$target$ac_delim
+ target_cpu!$target_cpu$ac_delim
+ target_vendor!$target_vendor$ac_delim
+ target_os!$target_os$ac_delim
+ PACKAGE!$PACKAGE$ac_delim
+ INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+ INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+ INSTALL_DATA!$INSTALL_DATA$ac_delim
+ am__isrc!$am__isrc$ac_delim
+ CYGPATH_W!$CYGPATH_W$ac_delim
+ VERSION!$VERSION$ac_delim
+ ACLOCAL!$ACLOCAL$ac_delim
+ AUTOCONF!$AUTOCONF$ac_delim
+ AUTOMAKE!$AUTOMAKE$ac_delim
+ AUTOHEADER!$AUTOHEADER$ac_delim
+ MAKEINFO!$MAKEINFO$ac_delim
+ install_sh!$install_sh$ac_delim
+ STRIP!$STRIP$ac_delim
+ INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+ mkdir_p!$mkdir_p$ac_delim
+ AWK!$AWK$ac_delim
+ SET_MAKE!$SET_MAKE$ac_delim
+ am__leading_dot!$am__leading_dot$ac_delim
+ AMTAR!$AMTAR$ac_delim
+ am__tar!$am__tar$ac_delim
+ am__untar!$am__untar$ac_delim
+ SNAPSHOT_STAMP!$SNAPSHOT_STAMP$ac_delim
+ VERSION_MAJOR!$VERSION_MAJOR$ac_delim
+ VERSION_MINOR!$VERSION_MINOR$ac_delim
+ VERSION_PATCH!$VERSION_PATCH$ac_delim
+ VERSION_COMMENT!$VERSION_COMMENT$ac_delim
+ VERSION_SUFFIX!$VERSION_SUFFIX$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
+ DEPDIR!$DEPDIR$ac_delim
+ am__include!$am__include$ac_delim
+ am__quote!$am__quote$ac_delim
+ AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+ AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+ AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+ CCDEPMODE!$CCDEPMODE$ac_delim
+ am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+ am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+ RANLIB!$RANLIB$ac_delim
+ CPP!$CPP$ac_delim
+ GREP!$GREP$ac_delim
+ EGREP!$EGREP$ac_delim
+ _ACEOF
+   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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
+ _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
+ CEOF$ac_eof
+ _ACEOF
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+   cat >conf$$subs.sed <<_ACEOF
+ GL_COND_LIBTOOL_TRUE!$GL_COND_LIBTOOL_TRUE$ac_delim
+ GL_COND_LIBTOOL_FALSE!$GL_COND_LIBTOOL_FALSE$ac_delim
+ ALLOCA!$ALLOCA$ac_delim
+ ALLOCA_H!$ALLOCA_H$ac_delim
+ ARPA_INET_H!$ARPA_INET_H$ac_delim
+ INCLUDE_NEXT!$INCLUDE_NEXT$ac_delim
+ NEXT_FLOAT_H!$NEXT_FLOAT_H$ac_delim
+ FLOAT_H!$FLOAT_H$ac_delim
+ NEXT_SYS_SOCKET_H!$NEXT_SYS_SOCKET_H$ac_delim
+ HAVE_SYS_SOCKET_H!$HAVE_SYS_SOCKET_H$ac_delim
+ HAVE_WINSOCK2_H!$HAVE_WINSOCK2_H$ac_delim
+ HAVE_WS2TCPIP_H!$HAVE_WS2TCPIP_H$ac_delim
+ SYS_SOCKET_H!$SYS_SOCKET_H$ac_delim
+ LIBINTL!$LIBINTL$ac_delim
+ LTLIBINTL!$LTLIBINTL$ac_delim
+ NEXT_SYS_TIME_H!$NEXT_SYS_TIME_H$ac_delim
+ HAVE_SYS_TIME_H!$HAVE_SYS_TIME_H$ac_delim
+ HAVE_STRUCT_TIMEVAL!$HAVE_STRUCT_TIMEVAL$ac_delim
+ REPLACE_GETTIMEOFDAY!$REPLACE_GETTIMEOFDAY$ac_delim
+ SYS_TIME_H!$SYS_TIME_H$ac_delim
+ LIBPTH!$LIBPTH$ac_delim
+ LTLIBPTH!$LTLIBPTH$ac_delim
+ LIBTHREAD!$LIBTHREAD$ac_delim
+ LTLIBTHREAD!$LTLIBTHREAD$ac_delim
+ LIBMULTITHREAD!$LIBMULTITHREAD$ac_delim
+ LTLIBMULTITHREAD!$LTLIBMULTITHREAD$ac_delim
+ HAVE_MALLOC_POSIX!$HAVE_MALLOC_POSIX$ac_delim
+ GNULIB_MALLOC_POSIX!$GNULIB_MALLOC_POSIX$ac_delim
+ GNULIB_REALLOC_POSIX!$GNULIB_REALLOC_POSIX$ac_delim
+ GNULIB_CALLOC_POSIX!$GNULIB_CALLOC_POSIX$ac_delim
+ GNULIB_GETSUBOPT!$GNULIB_GETSUBOPT$ac_delim
+ GNULIB_MKDTEMP!$GNULIB_MKDTEMP$ac_delim
+ GNULIB_MKSTEMP!$GNULIB_MKSTEMP$ac_delim
+ HAVE_CALLOC_POSIX!$HAVE_CALLOC_POSIX$ac_delim
+ HAVE_GETSUBOPT!$HAVE_GETSUBOPT$ac_delim
+ HAVE_MKDTEMP!$HAVE_MKDTEMP$ac_delim
+ HAVE_REALLOC_POSIX!$HAVE_REALLOC_POSIX$ac_delim
+ REPLACE_MKSTEMP!$REPLACE_MKSTEMP$ac_delim
+ NEXT_NETINET_IN_H!$NEXT_NETINET_IN_H$ac_delim
+ HAVE_NETINET_IN_H!$HAVE_NETINET_IN_H$ac_delim
+ NETINET_IN_H!$NETINET_IN_H$ac_delim
+ GNULIB_FPRINTF_POSIX!$GNULIB_FPRINTF_POSIX$ac_delim
+ GNULIB_PRINTF_POSIX!$GNULIB_PRINTF_POSIX$ac_delim
+ GNULIB_SNPRINTF!$GNULIB_SNPRINTF$ac_delim
+ GNULIB_SPRINTF_POSIX!$GNULIB_SPRINTF_POSIX$ac_delim
+ GNULIB_VFPRINTF_POSIX!$GNULIB_VFPRINTF_POSIX$ac_delim
+ GNULIB_VPRINTF_POSIX!$GNULIB_VPRINTF_POSIX$ac_delim
+ GNULIB_VSNPRINTF!$GNULIB_VSNPRINTF$ac_delim
+ GNULIB_VSPRINTF_POSIX!$GNULIB_VSPRINTF_POSIX$ac_delim
+ GNULIB_VASPRINTF!$GNULIB_VASPRINTF$ac_delim
+ GNULIB_FSEEK!$GNULIB_FSEEK$ac_delim
+ GNULIB_FSEEKO!$GNULIB_FSEEKO$ac_delim
+ GNULIB_FTELL!$GNULIB_FTELL$ac_delim
+ GNULIB_FTELLO!$GNULIB_FTELLO$ac_delim
+ GNULIB_FFLUSH!$GNULIB_FFLUSH$ac_delim
+ GNULIB_GETDELIM!$GNULIB_GETDELIM$ac_delim
+ GNULIB_GETLINE!$GNULIB_GETLINE$ac_delim
+ REPLACE_FPRINTF!$REPLACE_FPRINTF$ac_delim
+ REPLACE_VFPRINTF!$REPLACE_VFPRINTF$ac_delim
+ REPLACE_PRINTF!$REPLACE_PRINTF$ac_delim
+ REPLACE_VPRINTF!$REPLACE_VPRINTF$ac_delim
+ REPLACE_SNPRINTF!$REPLACE_SNPRINTF$ac_delim
+ HAVE_DECL_SNPRINTF!$HAVE_DECL_SNPRINTF$ac_delim
+ REPLACE_VSNPRINTF!$REPLACE_VSNPRINTF$ac_delim
+ HAVE_DECL_VSNPRINTF!$HAVE_DECL_VSNPRINTF$ac_delim
+ REPLACE_SPRINTF!$REPLACE_SPRINTF$ac_delim
+ REPLACE_VSPRINTF!$REPLACE_VSPRINTF$ac_delim
+ HAVE_VASPRINTF!$HAVE_VASPRINTF$ac_delim
+ REPLACE_VASPRINTF!$REPLACE_VASPRINTF$ac_delim
+ HAVE_FSEEKO!$HAVE_FSEEKO$ac_delim
+ REPLACE_FSEEKO!$REPLACE_FSEEKO$ac_delim
+ REPLACE_FSEEK!$REPLACE_FSEEK$ac_delim
+ HAVE_FTELLO!$HAVE_FTELLO$ac_delim
+ REPLACE_FTELLO!$REPLACE_FTELLO$ac_delim
+ REPLACE_FTELL!$REPLACE_FTELL$ac_delim
+ REPLACE_FFLUSH!$REPLACE_FFLUSH$ac_delim
+ HAVE_DECL_GETDELIM!$HAVE_DECL_GETDELIM$ac_delim
+ HAVE_DECL_GETLINE!$HAVE_DECL_GETLINE$ac_delim
+ REPLACE_GETLINE!$REPLACE_GETLINE$ac_delim
+ STDBOOL_H!$STDBOOL_H$ac_delim
+ HAVE__BOOL!$HAVE__BOOL$ac_delim
+ HAVE_LONG_LONG_INT!$HAVE_LONG_LONG_INT$ac_delim
+ HAVE_UNSIGNED_LONG_LONG_INT!$HAVE_UNSIGNED_LONG_LONG_INT$ac_delim
+ HAVE_INTTYPES_H!$HAVE_INTTYPES_H$ac_delim
+ HAVE_SYS_TYPES_H!$HAVE_SYS_TYPES_H$ac_delim
+ NEXT_STDINT_H!$NEXT_STDINT_H$ac_delim
+ HAVE_STDINT_H!$HAVE_STDINT_H$ac_delim
+ HAVE_SYS_INTTYPES_H!$HAVE_SYS_INTTYPES_H$ac_delim
+ HAVE_SYS_BITYPES_H!$HAVE_SYS_BITYPES_H$ac_delim
+ BITSIZEOF_PTRDIFF_T!$BITSIZEOF_PTRDIFF_T$ac_delim
+ BITSIZEOF_SIG_ATOMIC_T!$BITSIZEOF_SIG_ATOMIC_T$ac_delim
+ BITSIZEOF_SIZE_T!$BITSIZEOF_SIZE_T$ac_delim
+ BITSIZEOF_WCHAR_T!$BITSIZEOF_WCHAR_T$ac_delim
+ BITSIZEOF_WINT_T!$BITSIZEOF_WINT_T$ac_delim
+ HAVE_SIGNED_SIG_ATOMIC_T!$HAVE_SIGNED_SIG_ATOMIC_T$ac_delim
+ HAVE_SIGNED_WCHAR_T!$HAVE_SIGNED_WCHAR_T$ac_delim
+ HAVE_SIGNED_WINT_T!$HAVE_SIGNED_WINT_T$ac_delim
+ _ACEOF
+   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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
+ 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-2.sed" <<\CEOF$ac_eof
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+ _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
+ CEOF$ac_eof
+ _ACEOF
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+   cat >conf$$subs.sed <<_ACEOF
+ PTRDIFF_T_SUFFIX!$PTRDIFF_T_SUFFIX$ac_delim
+ SIG_ATOMIC_T_SUFFIX!$SIG_ATOMIC_T_SUFFIX$ac_delim
+ SIZE_T_SUFFIX!$SIZE_T_SUFFIX$ac_delim
+ WCHAR_T_SUFFIX!$WCHAR_T_SUFFIX$ac_delim
+ WINT_T_SUFFIX!$WINT_T_SUFFIX$ac_delim
+ STDINT_H!$STDINT_H$ac_delim
+ NEXT_STDIO_H!$NEXT_STDIO_H$ac_delim
+ NEXT_STDLIB_H!$NEXT_STDLIB_H$ac_delim
+ GNULIB_MEMMEM!$GNULIB_MEMMEM$ac_delim
+ GNULIB_MEMPCPY!$GNULIB_MEMPCPY$ac_delim
+ GNULIB_MEMRCHR!$GNULIB_MEMRCHR$ac_delim
+ GNULIB_STPCPY!$GNULIB_STPCPY$ac_delim
+ GNULIB_STPNCPY!$GNULIB_STPNCPY$ac_delim
+ GNULIB_STRCHRNUL!$GNULIB_STRCHRNUL$ac_delim
+ GNULIB_STRDUP!$GNULIB_STRDUP$ac_delim
+ GNULIB_STRNDUP!$GNULIB_STRNDUP$ac_delim
+ GNULIB_STRNLEN!$GNULIB_STRNLEN$ac_delim
+ GNULIB_STRPBRK!$GNULIB_STRPBRK$ac_delim
+ GNULIB_STRSEP!$GNULIB_STRSEP$ac_delim
+ GNULIB_STRCASESTR!$GNULIB_STRCASESTR$ac_delim
+ GNULIB_STRTOK_R!$GNULIB_STRTOK_R$ac_delim
+ GNULIB_MBSLEN!$GNULIB_MBSLEN$ac_delim
+ GNULIB_MBSNLEN!$GNULIB_MBSNLEN$ac_delim
+ GNULIB_MBSCHR!$GNULIB_MBSCHR$ac_delim
+ GNULIB_MBSRCHR!$GNULIB_MBSRCHR$ac_delim
+ GNULIB_MBSSTR!$GNULIB_MBSSTR$ac_delim
+ GNULIB_MBSCASECMP!$GNULIB_MBSCASECMP$ac_delim
+ GNULIB_MBSNCASECMP!$GNULIB_MBSNCASECMP$ac_delim
+ GNULIB_MBSPCASECMP!$GNULIB_MBSPCASECMP$ac_delim
+ GNULIB_MBSCASESTR!$GNULIB_MBSCASESTR$ac_delim
+ GNULIB_MBSCSPN!$GNULIB_MBSCSPN$ac_delim
+ GNULIB_MBSPBRK!$GNULIB_MBSPBRK$ac_delim
+ GNULIB_MBSSPN!$GNULIB_MBSSPN$ac_delim
+ GNULIB_MBSSEP!$GNULIB_MBSSEP$ac_delim
+ GNULIB_MBSTOK_R!$GNULIB_MBSTOK_R$ac_delim
+ HAVE_DECL_MEMMEM!$HAVE_DECL_MEMMEM$ac_delim
+ HAVE_MEMPCPY!$HAVE_MEMPCPY$ac_delim
+ HAVE_DECL_MEMRCHR!$HAVE_DECL_MEMRCHR$ac_delim
+ HAVE_STPCPY!$HAVE_STPCPY$ac_delim
+ HAVE_STPNCPY!$HAVE_STPNCPY$ac_delim
+ HAVE_STRCASECMP!$HAVE_STRCASECMP$ac_delim
+ HAVE_DECL_STRNCASECMP!$HAVE_DECL_STRNCASECMP$ac_delim
+ HAVE_STRCHRNUL!$HAVE_STRCHRNUL$ac_delim
+ HAVE_DECL_STRDUP!$HAVE_DECL_STRDUP$ac_delim
+ HAVE_STRNDUP!$HAVE_STRNDUP$ac_delim
+ HAVE_DECL_STRNDUP!$HAVE_DECL_STRNDUP$ac_delim
+ HAVE_DECL_STRNLEN!$HAVE_DECL_STRNLEN$ac_delim
+ HAVE_STRPBRK!$HAVE_STRPBRK$ac_delim
+ HAVE_STRSEP!$HAVE_STRSEP$ac_delim
+ HAVE_STRCASESTR!$HAVE_STRCASESTR$ac_delim
+ HAVE_DECL_STRTOK_R!$HAVE_DECL_STRTOK_R$ac_delim
+ NEXT_STRING_H!$NEXT_STRING_H$ac_delim
+ HAVE_LSTAT!$HAVE_LSTAT$ac_delim
+ HAVE_DECL_MKDIR!$HAVE_DECL_MKDIR$ac_delim
+ HAVE_IO_H!$HAVE_IO_H$ac_delim
+ NEXT_SYS_STAT_H!$NEXT_SYS_STAT_H$ac_delim
+ SYS_STAT_H!$SYS_STAT_H$ac_delim
+ GNULIB_CHOWN!$GNULIB_CHOWN$ac_delim
+ GNULIB_DUP2!$GNULIB_DUP2$ac_delim
+ GNULIB_FCHDIR!$GNULIB_FCHDIR$ac_delim
+ GNULIB_FTRUNCATE!$GNULIB_FTRUNCATE$ac_delim
+ GNULIB_GETCWD!$GNULIB_GETCWD$ac_delim
+ GNULIB_GETLOGIN_R!$GNULIB_GETLOGIN_R$ac_delim
+ GNULIB_LCHOWN!$GNULIB_LCHOWN$ac_delim
+ GNULIB_LSEEK!$GNULIB_LSEEK$ac_delim
+ GNULIB_READLINK!$GNULIB_READLINK$ac_delim
+ GNULIB_SLEEP!$GNULIB_SLEEP$ac_delim
+ HAVE_DUP2!$HAVE_DUP2$ac_delim
+ HAVE_FTRUNCATE!$HAVE_FTRUNCATE$ac_delim
+ HAVE_READLINK!$HAVE_READLINK$ac_delim
+ HAVE_SLEEP!$HAVE_SLEEP$ac_delim
+ HAVE_DECL_GETLOGIN_R!$HAVE_DECL_GETLOGIN_R$ac_delim
+ REPLACE_CHOWN!$REPLACE_CHOWN$ac_delim
+ REPLACE_FCHDIR!$REPLACE_FCHDIR$ac_delim
+ REPLACE_GETCWD!$REPLACE_GETCWD$ac_delim
+ REPLACE_LCHOWN!$REPLACE_LCHOWN$ac_delim
+ REPLACE_LSEEK!$REPLACE_LSEEK$ac_delim
+ NEXT_UNISTD_H!$NEXT_UNISTD_H$ac_delim
+ HAVE_UNISTD_H!$HAVE_UNISTD_H$ac_delim
+ EOVERFLOW!$EOVERFLOW$ac_delim
+ CFLAG_VISIBILITY!$CFLAG_VISIBILITY$ac_delim
+ HAVE_VISIBILITY!$HAVE_VISIBILITY$ac_delim
+ GNULIB_WCWIDTH!$GNULIB_WCWIDTH$ac_delim
+ HAVE_DECL_WCWIDTH!$HAVE_DECL_WCWIDTH$ac_delim
+ REPLACE_WCWIDTH!$REPLACE_WCWIDTH$ac_delim
+ WCHAR_H!$WCHAR_H$ac_delim
+ HAVE_WCHAR_H!$HAVE_WCHAR_H$ac_delim
+ NEXT_WCHAR_H!$NEXT_WCHAR_H$ac_delim
+ AMANDA_WARNING_CFLAGS!$AMANDA_WARNING_CFLAGS$ac_delim
+ CLIENT_LOGIN!$CLIENT_LOGIN$ac_delim
+ SETUID_GROUP!$SETUID_GROUP$ac_delim
+ CONFIG_DIR!$CONFIG_DIR$ac_delim
+ USE_VERSION_SUFFIXES!$USE_VERSION_SUFFIXES$ac_delim
+ GNUTAR_LISTED_INCREMENTAL_DIR!$GNUTAR_LISTED_INCREMENTAL_DIR$ac_delim
+ AMANDA_TMPDIR!$AMANDA_TMPDIR$ac_delim
+ BINARY_OWNER!$BINARY_OWNER$ac_delim
+ MAXTAPEBLOCKSIZE!$MAXTAPEBLOCKSIZE$ac_delim
+ _ACEOF
+   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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
+ 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-3.sed" <<\CEOF$ac_eof
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+ _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
+ CEOF$ac_eof
+ _ACEOF
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+   cat >conf$$subs.sed <<_ACEOF
+ AMANDA_DBGDIR!$AMANDA_DBGDIR$ac_delim
+ AMANDA_DEBUG_DAYS!$AMANDA_DEBUG_DAYS$ac_delim
+ SERVICE_SUFFIX!$SERVICE_SUFFIX$ac_delim
+ WANT_SETUID_CLIENT_TRUE!$WANT_SETUID_CLIENT_TRUE$ac_delim
+ WANT_SETUID_CLIENT_FALSE!$WANT_SETUID_CLIENT_FALSE$ac_delim
+ WANT_INSTALLPERMS_TRUE!$WANT_INSTALLPERMS_TRUE$ac_delim
+ WANT_INSTALLPERMS_FALSE!$WANT_INSTALLPERMS_FALSE$ac_delim
+ WANT_CLIENT_TRUE!$WANT_CLIENT_TRUE$ac_delim
+ WANT_CLIENT_FALSE!$WANT_CLIENT_FALSE$ac_delim
+ WANT_RESTORE_TRUE!$WANT_RESTORE_TRUE$ac_delim
+ WANT_RESTORE_FALSE!$WANT_RESTORE_FALSE$ac_delim
+ WANT_SERVER_TRUE!$WANT_SERVER_TRUE$ac_delim
+ WANT_SERVER_FALSE!$WANT_SERVER_FALSE$ac_delim
+ WANT_RECOVER_TRUE!$WANT_RECOVER_TRUE$ac_delim
+ WANT_RECOVER_FALSE!$WANT_RECOVER_FALSE$ac_delim
+ WANT_TAPE_TRUE!$WANT_TAPE_TRUE$ac_delim
+ WANT_TAPE_FALSE!$WANT_TAPE_FALSE$ac_delim
+ GNUPLOT!$GNUPLOT$ac_delim
+ PCAT!$PCAT$ac_delim
+ COMPRESS!$COMPRESS$ac_delim
+ GZIP!$GZIP$ac_delim
+ AMPLOT_COMPRESS!$AMPLOT_COMPRESS$ac_delim
+ AMPLOT_CAT_GZIP!$AMPLOT_CAT_GZIP$ac_delim
+ AMPLOT_CAT_COMPRESS!$AMPLOT_CAT_COMPRESS$ac_delim
+ AMPLOT_CAT_PACK!$AMPLOT_CAT_PACK$ac_delim
+ WANT_AMPLOT_TRUE!$WANT_AMPLOT_TRUE$ac_delim
+ WANT_AMPLOT_FALSE!$WANT_AMPLOT_FALSE$ac_delim
+ XSLTPROC_FLAGS!$XSLTPROC_FLAGS$ac_delim
+ XSLTPROC!$XSLTPROC$ac_delim
+ ENABLE_MANPAGE_BUILD_TRUE!$ENABLE_MANPAGE_BUILD_TRUE$ac_delim
+ ENABLE_MANPAGE_BUILD_FALSE!$ENABLE_MANPAGE_BUILD_FALSE$ac_delim
+ XSLREL!$XSLREL$ac_delim
+ DOC_BUILD_DATE!$DOC_BUILD_DATE$ac_delim
+ DEFAULT_SERVER!$DEFAULT_SERVER$ac_delim
+ DEFAULT_CONFIG!$DEFAULT_CONFIG$ac_delim
+ DEFAULT_TAPE_SERVER!$DEFAULT_TAPE_SERVER$ac_delim
+ DEFAULT_TAPE_DEVICE!$DEFAULT_TAPE_DEVICE$ac_delim
+ EXAMPLE_TAPEDEV!$EXAMPLE_TAPEDEV$ac_delim
+ DEFAULT_CHANGER_DEVICE!$DEFAULT_CHANGER_DEVICE$ac_delim
+ DEFAULT_AMANDATES_FILE!$DEFAULT_AMANDATES_FILE$ac_delim
+ GETCONF!$GETCONF$ac_delim
+ CHIO!$CHIO$ac_delim
+ CHS!$CHS$ac_delim
+ MTX!$MTX$ac_delim
+ MCUTIL!$MCUTIL$ac_delim
+ WANT_CHG_SCSI_TRUE!$WANT_CHG_SCSI_TRUE$ac_delim
+ WANT_CHG_SCSI_FALSE!$WANT_CHG_SCSI_FALSE$ac_delim
+ WANT_SCSI_LINUX_TRUE!$WANT_SCSI_LINUX_TRUE$ac_delim
+ WANT_SCSI_LINUX_FALSE!$WANT_SCSI_LINUX_FALSE$ac_delim
+ WANT_SCSI_HPUX_NEW_TRUE!$WANT_SCSI_HPUX_NEW_TRUE$ac_delim
+ WANT_SCSI_HPUX_NEW_FALSE!$WANT_SCSI_HPUX_NEW_FALSE$ac_delim
+ WANT_SCSI_IRIX_TRUE!$WANT_SCSI_IRIX_TRUE$ac_delim
+ WANT_SCSI_IRIX_FALSE!$WANT_SCSI_IRIX_FALSE$ac_delim
+ WANT_SCSI_SOLARIS_TRUE!$WANT_SCSI_SOLARIS_TRUE$ac_delim
+ WANT_SCSI_SOLARIS_FALSE!$WANT_SCSI_SOLARIS_FALSE$ac_delim
+ WANT_SCSI_AIX_TRUE!$WANT_SCSI_AIX_TRUE$ac_delim
+ WANT_SCSI_AIX_FALSE!$WANT_SCSI_AIX_FALSE$ac_delim
+ WANT_SCSI_CAM_TRUE!$WANT_SCSI_CAM_TRUE$ac_delim
+ WANT_SCSI_CAM_FALSE!$WANT_SCSI_CAM_FALSE$ac_delim
+ WANT_SCSI_BSD_TRUE!$WANT_SCSI_BSD_TRUE$ac_delim
+ WANT_SCSI_BSD_FALSE!$WANT_SCSI_BSD_FALSE$ac_delim
+ WANT_CHG_SCSI_CHIO_TRUE!$WANT_CHG_SCSI_CHIO_TRUE$ac_delim
+ WANT_CHG_SCSI_CHIO_FALSE!$WANT_CHG_SCSI_CHIO_FALSE$ac_delim
+ WANT_SCSI_HPUX_TRUE!$WANT_SCSI_HPUX_TRUE$ac_delim
+ WANT_SCSI_HPUX_FALSE!$WANT_SCSI_HPUX_FALSE$ac_delim
+ WANT_SCSI_CHIO_TRUE!$WANT_SCSI_CHIO_TRUE$ac_delim
+ WANT_SCSI_CHIO_FALSE!$WANT_SCSI_CHIO_FALSE$ac_delim
+ WANT_AMFLOCK_POSIX_TRUE!$WANT_AMFLOCK_POSIX_TRUE$ac_delim
+ WANT_AMFLOCK_POSIX_FALSE!$WANT_AMFLOCK_POSIX_FALSE$ac_delim
+ WANT_AMFLOCK_FLOCK_TRUE!$WANT_AMFLOCK_FLOCK_TRUE$ac_delim
+ WANT_AMFLOCK_FLOCK_FALSE!$WANT_AMFLOCK_FLOCK_FALSE$ac_delim
+ WANT_AMFLOCK_LOCKF_TRUE!$WANT_AMFLOCK_LOCKF_TRUE$ac_delim
+ WANT_AMFLOCK_LOCKF_FALSE!$WANT_AMFLOCK_LOCKF_FALSE$ac_delim
+ WANT_AMFLOCK_LNLOCK_TRUE!$WANT_AMFLOCK_LNLOCK_TRUE$ac_delim
+ WANT_AMFLOCK_LNLOCK_FALSE!$WANT_AMFLOCK_LNLOCK_FALSE$ac_delim
+ SWIG!$SWIG$ac_delim
+ SWIG_LIB!$SWIG_LIB$ac_delim
+ PERL!$PERL$ac_delim
+ PERL_INC!$PERL_INC$ac_delim
+ WANT_CYGWIN_COPY_PERL_DLL_TRUE!$WANT_CYGWIN_COPY_PERL_DLL_TRUE$ac_delim
+ WANT_CYGWIN_COPY_PERL_DLL_FALSE!$WANT_CYGWIN_COPY_PERL_DLL_FALSE$ac_delim
+ PERLEXTLIBS!$PERLEXTLIBS$ac_delim
+ CAT!$CAT$ac_delim
+ CLIENT_SCRIPTS_OPT!$CLIENT_SCRIPTS_OPT$ac_delim
+ amlibdir!$amlibdir$ac_delim
+ amlibexecdir!$amlibexecdir$ac_delim
+ amincludedir!$amincludedir$ac_delim
+ amperldir!$amperldir$ac_delim
+ DUMPER_DIR!$DUMPER_DIR$ac_delim
+ MSGFMT!$MSGFMT$ac_delim
+ GETTEXT!$GETTEXT$ac_delim
+ USE_NLS!$USE_NLS$ac_delim
+ GMSGFMT!$GMSGFMT$ac_delim
+ MSGFMT_015!$MSGFMT_015$ac_delim
+ GMSGFMT_015!$GMSGFMT_015$ac_delim
+ XGETTEXT!$XGETTEXT$ac_delim
+ XGETTEXT_015!$XGETTEXT_015$ac_delim
+ _ACEOF
+   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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
+ 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-4.sed" <<\CEOF$ac_eof
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+ _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
+ CEOF$ac_eof
+ _ACEOF
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+   cat >conf$$subs.sed <<_ACEOF
+ MSGMERGE!$MSGMERGE$ac_delim
+ INTL_MACOSX_LIBS!$INTL_MACOSX_LIBS$ac_delim
+ LIBICONV!$LIBICONV$ac_delim
+ LTLIBICONV!$LTLIBICONV$ac_delim
+ INTLLIBS!$INTLLIBS$ac_delim
+ POSUB!$POSUB$ac_delim
+ CURL_CONFIG!$CURL_CONFIG$ac_delim
+ _libcurl_config!$_libcurl_config$ac_delim
+ LIBCURL_CPPFLAGS!$LIBCURL_CPPFLAGS$ac_delim
+ LIBCURL!$LIBCURL$ac_delim
+ WANT_S3_DEVICE_TRUE!$WANT_S3_DEVICE_TRUE$ac_delim
+ WANT_S3_DEVICE_FALSE!$WANT_S3_DEVICE_FALSE$ac_delim
+ WANT_DEVPAY_TRUE!$WANT_DEVPAY_TRUE$ac_delim
+ WANT_DEVPAY_FALSE!$WANT_DEVPAY_FALSE$ac_delim
+ WANT_TAPE_XENIX_TRUE!$WANT_TAPE_XENIX_TRUE$ac_delim
+ WANT_TAPE_XENIX_FALSE!$WANT_TAPE_XENIX_FALSE$ac_delim
+ WANT_TAPE_AIX_TRUE!$WANT_TAPE_AIX_TRUE$ac_delim
+ WANT_TAPE_AIX_FALSE!$WANT_TAPE_AIX_FALSE$ac_delim
+ WANT_TAPE_UWARE_TRUE!$WANT_TAPE_UWARE_TRUE$ac_delim
+ WANT_TAPE_UWARE_FALSE!$WANT_TAPE_UWARE_FALSE$ac_delim
+ WANT_TAPE_POSIX_TRUE!$WANT_TAPE_POSIX_TRUE$ac_delim
+ WANT_TAPE_POSIX_FALSE!$WANT_TAPE_POSIX_FALSE$ac_delim
+ WANT_TAPE_DEVICE_TRUE!$WANT_TAPE_DEVICE_TRUE$ac_delim
+ WANT_TAPE_DEVICE_FALSE!$WANT_TAPE_DEVICE_FALSE$ac_delim
+ WANT_BSD_SECURITY_TRUE!$WANT_BSD_SECURITY_TRUE$ac_delim
+ WANT_BSD_SECURITY_FALSE!$WANT_BSD_SECURITY_FALSE$ac_delim
+ WANT_BSDTCP_SECURITY_TRUE!$WANT_BSDTCP_SECURITY_TRUE$ac_delim
+ WANT_BSDTCP_SECURITY_FALSE!$WANT_BSDTCP_SECURITY_FALSE$ac_delim
+ WANT_BSDUDP_SECURITY_TRUE!$WANT_BSDUDP_SECURITY_TRUE$ac_delim
+ WANT_BSDUDP_SECURITY_FALSE!$WANT_BSDUDP_SECURITY_FALSE$ac_delim
+ WANT_RSH_SECURITY_TRUE!$WANT_RSH_SECURITY_TRUE$ac_delim
+ WANT_RSH_SECURITY_FALSE!$WANT_RSH_SECURITY_FALSE$ac_delim
+ SSH!$SSH$ac_delim
+ WANT_SSH_SECURITY_TRUE!$WANT_SSH_SECURITY_TRUE$ac_delim
+ WANT_SSH_SECURITY_FALSE!$WANT_SSH_SECURITY_FALSE$ac_delim
+ WANT_KRB4_SECURITY_TRUE!$WANT_KRB4_SECURITY_TRUE$ac_delim
+ WANT_KRB4_SECURITY_FALSE!$WANT_KRB4_SECURITY_FALSE$ac_delim
+ WANT_KRB5_SECURITY_TRUE!$WANT_KRB5_SECURITY_TRUE$ac_delim
+ WANT_KRB5_SECURITY_FALSE!$WANT_KRB5_SECURITY_FALSE$ac_delim
+ XFSDUMP!$XFSDUMP$ac_delim
+ XFSRESTORE!$XFSRESTORE$ac_delim
+ VXDUMP!$VXDUMP$ac_delim
+ VXRESTORE!$VXRESTORE$ac_delim
+ VDUMP!$VDUMP$ac_delim
+ VRESTORE!$VRESTORE$ac_delim
+ DUMP!$DUMP$ac_delim
+ RESTORE!$RESTORE$ac_delim
+ GNUTAR!$GNUTAR$ac_delim
+ SAMBA_CLIENT!$SAMBA_CLIENT$ac_delim
+ WANT_SAMBA_TRUE!$WANT_SAMBA_TRUE$ac_delim
+ WANT_SAMBA_FALSE!$WANT_SAMBA_FALSE$ac_delim
+ AMLINT!$AMLINT$ac_delim
+ AMLINTFLAGS!$AMLINTFLAGS$ac_delim
+ LEX!$LEX$ac_delim
+ LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim
+ LEXLIB!$LEXLIB$ac_delim
+ AR!$AR$ac_delim
+ YACC!$YACC$ac_delim
+ YFLAGS!$YFLAGS$ac_delim
+ DD!$DD$ac_delim
+ BASH!$BASH$ac_delim
+ SORT!$SORT$ac_delim
+ MAILER!$MAILER$ac_delim
+ MT!$MT$ac_delim
+ MT_FILE_FLAG!$MT_FILE_FLAG$ac_delim
+ PRINT!$PRINT$ac_delim
+ GCC_COMPILER_TRUE!$GCC_COMPILER_TRUE$ac_delim
+ GCC_COMPILER_FALSE!$GCC_COMPILER_FALSE$ac_delim
+ LN_S!$LN_S$ac_delim
+ ECHO!$ECHO$ac_delim
+ CXX!$CXX$ac_delim
+ CXXFLAGS!$CXXFLAGS$ac_delim
+ ac_ct_CXX!$ac_ct_CXX$ac_delim
+ CXXDEPMODE!$CXXDEPMODE$ac_delim
+ am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
+ am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+ CXXCPP!$CXXCPP$ac_delim
+ F77!$F77$ac_delim
+ FFLAGS!$FFLAGS$ac_delim
+ ac_ct_F77!$ac_ct_F77$ac_delim
+ LIBTOOL!$LIBTOOL$ac_delim
+ LIBTOOL_DEPS!$LIBTOOL_DEPS$ac_delim
+ AMANDA_STATIC_LDFLAGS!$AMANDA_STATIC_LDFLAGS$ac_delim
+ PKG_CONFIG!$PKG_CONFIG$ac_delim
+ GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim
+ GLIB_LIBS!$GLIB_LIBS$ac_delim
+ GLIB_GENMARSHAL!$GLIB_GENMARSHAL$ac_delim
+ GOBJECT_QUERY!$GOBJECT_QUERY$ac_delim
+ GLIB_MKENUMS!$GLIB_MKENUMS$ac_delim
+ READLINE_LIBS!$READLINE_LIBS$ac_delim
+ LIBOBJS!$LIBOBJS$ac_delim
+ LTLIBOBJS!$LTLIBOBJS$ac_delim
+ gl_LIBOBJS!$gl_LIBOBJS$ac_delim
+ gl_LTLIBOBJS!$gl_LTLIBOBJS$ac_delim
+ _ACEOF
+   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; 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
+ 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-5.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    :C $CONFIG_COMMANDS
+ 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
+   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
  
-   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+   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
+   ac_MKDIR_P=$MKDIR_P
+   case $MKDIR_P in
+   [\\/$]* | ?:[\\/]* ) ;;
+   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+   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."
-   # 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; }
+ 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=
+ 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
  cat >>$CONFIG_STATUS <<\_ACEOF
  :t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
- s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
- s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
- s,@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".
+ 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
+ s&@MKDIR_P@&$ac_MKDIR_P&;t t
+ $ac_datarootdir_hack
+ " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" | sed -f "$tmp/subs-4.sed" | sed -f "$tmp/subs-5.sed" >$tmp/out
+ 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;}
+   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;}
-   # 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
+ # 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=' ,'
+ 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
+ # 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
- # 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
+ # (The regexp can be short, since the line contains either #define or #undef.)
+ echo 's/ $//
+ s,^[   #]*u.*,/* & */,' >>conftest.defines
+ # 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 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
- # 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
+ rm -f conftest.defines conftest.tail
  
+ 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
+   rm -f "$tmp/out12"
  # Compute $ac_file's index in $config_headers.
  _am_stamp_count=1
  for _am_header in $config_headers :; do
        _am_stamp_count=`expr $_am_stamp_count + 1` ;;
    esac
  done
- echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+ echo "timestamp for $ac_file" >`$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'`/stamp-h$_am_stamp_count
- done
- _ACEOF
- cat >>$CONFIG_STATUS <<\_ACEOF
- #
- # CONFIG_COMMANDS section.
- #
- for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
-   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
-   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
- $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_dest" : 'X\(//\)[^/]' \| \
-        X"$ac_dest" : 'X\(//\)$' \| \
-        X"$ac_dest" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
- echo X"$ac_dest" |
-     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
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+  ;;
  
- # 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
+   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+ echo "$as_me: executing $ac_file commands" >&6;}
+  ;;
+   esac
  
  
-   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
- echo "$as_me: executing $ac_dest commands" >&6;}
-   case $ac_dest in
-     depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+   case $ac_file$ac_mode in
+     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
    # Strip MF so we end up with the name of the file.
    mf=`echo "$mf" | sed -e 's/:.*$//'`
    # Check whether this is an Automake generated Makefile or not.
    # some people rename them; so instead we look at the file content.
    # Grep'ing the first line is not enough: some people post-process
    # each Makefile.in and add a new line on top of each file to say so.
-   # So let's grep whole file.
-   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-     dirpart=`(dirname "$mf") 2>/dev/null ||
+   # Grep'ing the whole file is not good either: AIX grep has a line
+   # limit of 2048, but all sed's we know have understand at least 4000.
+   if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+     dirpart=`$as_dirname -- "$mf" ||
  $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$mf" : 'X\(//\)[^/]' \| \
         X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
  echo X"$mf" |
-     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'`
    else
      continue
    fi
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
      # Make sure the directory exists.
      test -f "$dirpart/$file" && continue
-     fdir=`(dirname "$file") 2>/dev/null ||
+     fdir=`$as_dirname -- "$file" ||
  $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$file" : 'X\(//\)[^/]' \| \
         X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
  echo X"$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 $dirpart/$fdir
-   else
-     as_dir=$dirpart/$fdir
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+     { as_dir=$dirpart/$fdir
+   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 $dirpart/$fdir" >&5
- echo "$as_me: error: cannot create directory $dirpart/$fdir" >&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; }; }; }
      # echo "creating $dirpart/$file"
      echo '# dummy' > "$dirpart/$file"
    done
  done
   ;;
-     $ac_stdint_h )
- { echo "$as_me:$LINENO: creating $ac_stdint_h : $_ac_stdint_h" >&5
- echo "$as_me: creating $ac_stdint_h : $_ac_stdint_h" >&6;}
- ac_stdint=$tmp/_stdint.h
- echo "#ifndef" $_ac_stdint_h >$ac_stdint
- echo "#define" $_ac_stdint_h "1" >>$ac_stdint
- echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint
- echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint
- echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint
- if test "_$ac_cv_header_stdint_t" != "_" ; then
- echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint
- echo "#include <stdint.h>" >>$ac_stdint
- echo "#endif" >>$ac_stdint
- echo "#endif" >>$ac_stdint
- else
- cat >>$ac_stdint <<STDINT_EOF
- /* ................... shortcircuit part ........................... */
+     "po-directories":C)
+     for ac_file in $CONFIG_FILES; do
+       # Support "outfile[:infile[:infile...]]"
+       case "$ac_file" in
+         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+       esac
+       # PO directories have a Makefile.in generated from Makefile.in.in.
+       case "$ac_file" in */Makefile.in)
+         # Adjust a relative srcdir.
+         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+         ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+         # In autoconf-2.13 it is called $ac_given_srcdir.
+         # In autoconf-2.50 it is called $srcdir.
+         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+         case "$ac_given_srcdir" in
+           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+           /*) top_srcdir="$ac_given_srcdir" ;;
+           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+         esac
+         # Treat a directory as a PO directory if and only if it has a
+         # POTFILES.in file. This allows packages to have multiple PO
+         # directories under different names or in different locations.
+         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+           rm -f "$ac_dir/POTFILES"
+           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[         ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+           POMAKEFILEDEPS="POTFILES.in"
+           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+           # on $ac_dir but don't depend on user-specified configuration
+           # parameters.
+           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+             # The LINGUAS file contains the set of available languages.
+             if test -n "$OBSOLETE_ALL_LINGUAS"; then
+               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+             fi
+             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+             # Hide the ALL_LINGUAS assigment from automake < 1.5.
+             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+           else
+             # The set of available languages was given in configure.in.
+             # Hide the ALL_LINGUAS assigment from automake < 1.5.
+             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+           fi
+           # Compute POFILES
+           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+           # Compute UPDATEPOFILES
+           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+           # Compute DUMMYPOFILES
+           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+           # Compute GMOFILES
+           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+           case "$ac_given_srcdir" in
+             .) srcdirpre= ;;
+             *) srcdirpre='$(srcdir)/' ;;
+           esac
+           POFILES=
+           UPDATEPOFILES=
+           DUMMYPOFILES=
+           GMOFILES=
+           for lang in $ALL_LINGUAS; do
+             POFILES="$POFILES $srcdirpre$lang.po"
+             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+           done
+           # CATALOGS depends on both $ac_dir and the user's LINGUAS
+           # environment variable.
+           INST_LINGUAS=
+           if test -n "$ALL_LINGUAS"; then
+             for presentlang in $ALL_LINGUAS; do
+               useit=no
+               if test "%UNSET%" != "$LINGUAS"; then
+                 desiredlanguages="$LINGUAS"
+               else
+                 desiredlanguages="$ALL_LINGUAS"
+               fi
+               for desiredlang in $desiredlanguages; do
+                 # Use the presentlang catalog if desiredlang is
+                 #   a. equal to presentlang, or
+                 #   b. a variant of presentlang (because in this case,
+                 #      presentlang can be used as a fallback for messages
+                 #      which are not translated in the desiredlang catalog).
+                 case "$desiredlang" in
+                   "$presentlang"*) useit=yes;;
+                 esac
+               done
+               if test $useit = yes; then
+                 INST_LINGUAS="$INST_LINGUAS $presentlang"
+               fi
+             done
+           fi
+           CATALOGS=
+           if test -n "$INST_LINGUAS"; then
+             for lang in $INST_LINGUAS; do
+               CATALOGS="$CATALOGS $lang.gmo"
+             done
+           fi
+           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+             if test -f "$f"; then
+               case "$f" in
+                 *.orig | *.bak | *~) ;;
+                 *) cat "$f" >> "$ac_dir/Makefile" ;;
+               esac
+             fi
+           done
+         fi
+         ;;
+       esac
+     done ;;
  
- #if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
- #include <stdint.h>
- #else
- #include <stddef.h>
+   esac
+ done # for ac_tag
  
- /* .................... configured part ............................ */
  
- STDINT_EOF
+ { (exit 0); exit 0; }
+ _ACEOF
+ chmod +x $CONFIG_STATUS
+ ac_clean_files=$ac_clean_files_save
  
- echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint
- if test "_$ac_cv_header_stdint_x" != "_" ; then
-   ac_header="$ac_cv_header_stdint_x"
-   echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint
- else
-   echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint
- fi
  
- echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint
- if  test "_$ac_cv_header_stdint_o" != "_" ; then
-   ac_header="$ac_cv_header_stdint_o"
-   echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint
- else
-   echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint
+ # 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
  
- echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint
- if  test "_$ac_cv_header_stdint_u" != "_" ; then
-   ac_header="$ac_cv_header_stdint_u"
-   echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint
- else
-   echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint
- fi
  
- echo "" >>$ac_stdint
  
- if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then
-   echo "#include <$ac_header>" >>$ac_stdint
-   echo "" >>$ac_stdint
- fi fi
  
- echo "/* which 64bit typedef has been found */" >>$ac_stdint
- if test "$ac_cv_type_uint64_t" = "yes" ; then
- echo "#define   _STDINT_HAVE_UINT64_T" "1"  >>$ac_stdint
- else
- echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint
- fi
- if test "$ac_cv_type_u_int64_t" = "yes" ; then
- echo "#define   _STDINT_HAVE_U_INT64_T" "1"  >>$ac_stdint
- else
- echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint
- fi
- echo "" >>$ac_stdint
  
- echo "/* which type model has been detected */" >>$ac_stdint
- if test "_$ac_cv_char_data_model" != "_" ; then
- echo "#define   _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint
- echo "#define   _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint
+     # Extract the first word of "svn", so it can be a program name with args.
+ set dummy svn; 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_SVN+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
  else
- echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint
- echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint
- fi
- echo "" >>$ac_stdint
+   case $SVN in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_SVN="$SVN" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $LOCSYSPATH
+ 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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_SVN="$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
  
- echo "/* whether int_least types were detected */" >>$ac_stdint
- if test "$ac_cv_type_int_least32_t" = "yes"; then
- echo "#define   _STDINT_HAVE_INT_LEAST32_T" "1"  >>$ac_stdint
- else
- echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint
- fi
- echo "/* whether int_fast types were detected */" >>$ac_stdint
- if test "$ac_cv_type_int_fast32_t" = "yes"; then
- echo "#define   _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint
- else
- echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint
+   ;;
+ esac
  fi
- echo "/* whether intmax_t type was detected */" >>$ac_stdint
- if test "$ac_cv_type_intmax_t" = "yes"; then
- echo "#define   _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint
+ SVN=$ac_cv_path_SVN
+ if test -n "$SVN"; then
+   { echo "$as_me:$LINENO: result: $SVN" >&5
+ echo "${ECHO_T}$SVN" >&6; }
  else
- echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
  fi
- echo "" >>$ac_stdint
-   cat >>$ac_stdint <<STDINT_EOF
- /* .................... detections part ............................ */
- /* whether we need to define bitspecific types from compiler base types */
- #ifndef _STDINT_HEADER_INTPTR
- #ifndef _STDINT_HEADER_UINT32
- #ifndef _STDINT_HEADER_U_INT32
- #define _STDINT_NEED_INT_MODEL_T
- #else
- #define _STDINT_HAVE_U_INT_TYPES
- #endif
- #endif
- #endif
- #ifdef _STDINT_HAVE_U_INT_TYPES
- #undef _STDINT_NEED_INT_MODEL_T
- #endif
- #ifdef  _STDINT_CHAR_MODEL
- #if     _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
- #ifndef _STDINT_BYTE_MODEL
- #define _STDINT_BYTE_MODEL 12
- #endif
- #endif
- #endif
- #ifndef _STDINT_HAVE_INT_LEAST32_T
- #define _STDINT_NEED_INT_LEAST_T
- #endif
- #ifndef _STDINT_HAVE_INT_FAST32_T
- #define _STDINT_NEED_INT_FAST_T
- #endif
- #ifndef _STDINT_HEADER_INTPTR
- #define _STDINT_NEED_INTPTR_T
- #ifndef _STDINT_HAVE_INTMAX_T
- #define _STDINT_NEED_INTMAX_T
- #endif
- #endif
- /* .................... definition part ............................ */
- /* some system headers have good uint64_t */
- #ifndef _HAVE_UINT64_T
- #if     defined _STDINT_HAVE_UINT64_T  || defined HAVE_UINT64_T
- #define _HAVE_UINT64_T
- #elif   defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
- #define _HAVE_UINT64_T
- typedef u_int64_t uint64_t;
- #endif
- #endif
- #ifndef _HAVE_UINT64_T
- /* .. here are some common heuristics using compiler runtime specifics */
- #if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L
- #define _HAVE_UINT64_T
- #define _HAVE_LONGLONG_UINT64_T
- typedef long long int64_t;
- typedef unsigned long long uint64_t;
- #elif !defined __STRICT_ANSI__
- #if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
- #define _HAVE_UINT64_T
- typedef __int64 int64_t;
- typedef unsigned __int64 uint64_t;
- #elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
- /* note: all ELF-systems seem to have loff-support which needs 64-bit */
- #if !defined _NO_LONGLONG
- #define _HAVE_UINT64_T
- #define _HAVE_LONGLONG_UINT64_T
- typedef long long int64_t;
- typedef unsigned long long uint64_t;
- #endif
- #elif defined __alpha || (defined __mips && defined _ABIN32)
- #if !defined _NO_LONGLONG
- #define _HAVE_UINT64_T
- typedef long int64_t;
- typedef unsigned long uint64_t;
- #endif
-   /* compiler/cpu type to define int64_t */
- #endif
- #endif
- #endif
- #if defined _STDINT_HAVE_U_INT_TYPES
- /* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
- typedef u_int8_t uint8_t;
- typedef u_int16_t uint16_t;
- typedef u_int32_t uint32_t;
- /* glibc compatibility */
- #ifndef __int8_t_defined
- #define __int8_t_defined
- #endif
- #endif
- #ifdef _STDINT_NEED_INT_MODEL_T
- /* we must guess all the basic types. Apart from byte-adressable system, */
- /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
- /* (btw, those nibble-addressable systems are way off, or so we assume) */
  
- #if defined _STDINT_BYTE_MODEL
- #if _STDINT_LONG_MODEL+0 == 242
- /* 2:4:2 =  IP16 = a normal 16-bit system                */
- typedef unsigned char   uint8_t;
- typedef unsigned short  uint16_t;
- typedef unsigned long   uint32_t;
- #ifndef __int8_t_defined
- #define __int8_t_defined
- typedef          char    int8_t;
- typedef          short   int16_t;
- typedef          long    int32_t;
- #endif
- #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444
- /* 2:4:4 =  LP32 = a 32-bit system derived from a 16-bit */
- /* 4:4:4 = ILP32 = a normal 32-bit system                */
- typedef unsigned char   uint8_t;
- typedef unsigned short  uint16_t;
- typedef unsigned int    uint32_t;
- #ifndef __int8_t_defined
- #define __int8_t_defined
- typedef          char    int8_t;
- typedef          short   int16_t;
- typedef          int     int32_t;
- #endif
- #elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488
- /* 4:8:4 =  IP32 = a 32-bit system prepared for 64-bit    */
- /* 4:8:8 =  LP64 = a normal 64-bit system                 */
- typedef unsigned char   uint8_t;
- typedef unsigned short  uint16_t;
- typedef unsigned int    uint32_t;
- #ifndef __int8_t_defined
- #define __int8_t_defined
- typedef          char    int8_t;
- typedef          short   int16_t;
- typedef          int     int32_t;
- #endif
- /* this system has a "long" of 64bit */
- #ifndef _HAVE_UINT64_T
- #define _HAVE_UINT64_T
- typedef unsigned long   uint64_t;
- typedef          long    int64_t;
- #endif
- #elif _STDINT_LONG_MODEL+0 == 448
- /*      LLP64   a 64-bit system derived from a 32-bit system */
- typedef unsigned char   uint8_t;
- typedef unsigned short  uint16_t;
- typedef unsigned int    uint32_t;
- #ifndef __int8_t_defined
- #define __int8_t_defined
- typedef          char    int8_t;
- typedef          short   int16_t;
- typedef          int     int32_t;
- #endif
- /* assuming the system has a "long long" */
- #ifndef _HAVE_UINT64_T
- #define _HAVE_UINT64_T
- #define _HAVE_LONGLONG_UINT64_T
- typedef unsigned long long uint64_t;
- typedef          long long  int64_t;
- #endif
- #else
- #define _STDINT_NO_INT32_T
- #endif
- #else
- #define _STDINT_NO_INT8_T
- #define _STDINT_NO_INT32_T
- #endif
- #endif
  
- /*
-  * quote from SunOS-5.8 sys/inttypes.h:
-  * Use at your own risk.  As of February 1996, the committee is squarely
-  * behind the fixed sized types; the "least" and "fast" types are still being
-  * discussed.  The probability that the "fast" types may be removed before
-  * the standard is finalized is high enough that they are not currently
-  * implemented.
-  */
+     { echo "$as_me:$LINENO: checking Subversion revision information" >&5
+ echo $ECHO_N "checking Subversion revision information... $ECHO_C" >&6; }
+     if test -d $srcdir/.svn && test -n "$SVN" && (cd $srcdir > /dev/null ; $SVN info . ) > conftemp.svn; then
+       rev=`$GREP Revision: conftemp.svn|cut -d: -f 2|cut -c2-`
+       url=`$GREP URL: conftemp.svn|cut -d: -f 2-|cut -c2-`
+       ( echo '#define BUILT_REV "'$rev'"'
+         echo '#define BUILT_BRANCH "'`basename "$url"`'"'
+       ) > common-src/svn-info.h
  
- #if defined _STDINT_NEED_INT_LEAST_T
- typedef  int8_t    int_least8_t;
- typedef  int16_t   int_least16_t;
- typedef  int32_t   int_least32_t;
- #ifdef _HAVE_UINT64_T
- typedef  int64_t   int_least64_t;
- #endif
+       { echo "$as_me:$LINENO: result: updated" >&5
+ echo "${ECHO_T}updated" >&6; }
+     else
+       # Makefiles will be upset if the file doesn't exist, so double-check
+       if test -f common-src/svn-info.h; then
+           : # all good
+           { echo "$as_me:$LINENO: result: not changed" >&5
+ echo "${ECHO_T}not changed" >&6; }
+       else
+           echo '/* no information available */' > common-src/svn-info.h
+           { echo "$as_me:$LINENO: result: not available" >&5
+ echo "${ECHO_T}not available" >&6; }
+       fi
+     fi
  
- typedef uint8_t   uint_least8_t;
- typedef uint16_t  uint_least16_t;
- typedef uint32_t  uint_least32_t;
- #ifdef _HAVE_UINT64_T
- typedef uint64_t  uint_least64_t;
- #endif
-   /* least types */
- #endif
+     rm -f conftemp.svn
  
- #if defined _STDINT_NEED_INT_FAST_T
- typedef  int8_t    int_fast8_t;
- typedef  int       int_fast16_t;
- typedef  int32_t   int_fast32_t;
- #ifdef _HAVE_UINT64_T
- typedef  int64_t   int_fast64_t;
- #endif
  
- typedef uint8_t   uint_fast8_t;
- typedef unsigned  uint_fast16_t;
- typedef uint32_t  uint_fast32_t;
- #ifdef _HAVE_UINT64_T
- typedef uint64_t  uint_fast64_t;
- #endif
-   /* fast types */
- #endif
  
- #ifdef _STDINT_NEED_INTMAX_T
- #ifdef _HAVE_UINT64_T
- typedef  int64_t       intmax_t;
- typedef uint64_t      uintmax_t;
- #else
- typedef          long  intmax_t;
- typedef unsigned long uintmax_t;
- #endif
- #endif
- #ifdef _STDINT_NEED_INTPTR_T
- #ifndef __intptr_t_defined
- #define __intptr_t_defined
- /* we encourage using "long" to store pointer values, never use "int" ! */
- #if   _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484
- typedef  unsinged int   uintptr_t;
- typedef           int    intptr_t;
- #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444
- typedef  unsigned long  uintptr_t;
- typedef           long   intptr_t;
- #elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T
- typedef        uint64_t uintptr_t;
- typedef         int64_t  intptr_t;
- #else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */
- typedef  unsigned long  uintptr_t;
- typedef           long   intptr_t;
- #endif
- #endif
- #endif
- /* The ISO C99 standard specifies that in C++ implementations these
-    should only be defined if explicitly requested.  */
- #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
- #ifndef UINT32_C
- /* Signed.  */
- # define INT8_C(c)      c
- # define INT16_C(c)     c
- # define INT32_C(c)     c
- # ifdef _HAVE_LONGLONG_UINT64_T
- #  define INT64_C(c)    c ## L
- # else
- #  define INT64_C(c)    c ## LL
- # endif
+     echo "Compiler Flags:"
+     echo "  CFLAGS: ${CFLAGS-(none)}"
+     echo "  CPPFLAGS: ${CPPFLAGS-(none)}"
+     echo "  LDFLAGS: ${LDFLAGS-(none)}"
+     echo "  LIBS: ${LIBS-(none)}"
  
- /* Unsigned.  */
- # define UINT8_C(c)     c ## U
- # define UINT16_C(c)    c ## U
- # define UINT32_C(c)    c ## U
- # ifdef _HAVE_LONGLONG_UINT64_T
- #  define UINT64_C(c)   c ## UL
- # else
- #  define UINT64_C(c)   c ## ULL
- # endif
  
- /* Maximal type.  */
- # ifdef _HAVE_LONGLONG_UINT64_T
- #  define INTMAX_C(c)   c ## L
- #  define UINTMAX_C(c)  c ## UL
- # else
- #  define INTMAX_C(c)   c ## LL
- #  define UINTMAX_C(c)  c ## ULL
- # endif
+     components=''
+     if $WANT_SERVER; then
+       components="$components server";
+     else
+       components="$components (no server)";
+     fi
+     if $WANT_RESTORE; then
+       components="$components restore";
+     else
+       components="$components (no restore)";
+     fi
+     if $WANT_CLIENT; then
+       components="$components client";
+     else
+       components="$components (no client)";
+     fi
+     if $WANT_RECOVER; then
+       components="$components amrecover";
+     else
+       components="$components (no amrecover)";
+     fi
  
-   /* literalnumbers */
- #endif
- #endif
+     echo "Amanda Components: $components"
  
- /* These limits are merily those of a two complement byte-oriented system */
  
- /* Minimum of signed integral types.  */
- # define INT8_MIN               (-128)
- # define INT16_MIN              (-32767-1)
- # define INT32_MIN              (-2147483647-1)
- # define INT64_MIN              (-__INT64_C(9223372036854775807)-1)
- /* Maximum of signed integral types.  */
- # define INT8_MAX               (127)
- # define INT16_MAX              (32767)
- # define INT32_MAX              (2147483647)
- # define INT64_MAX              (__INT64_C(9223372036854775807))
+     echo "Working IPv6:" $WORKING_IPV6
  
- /* Maximum of unsigned integral types.  */
- # define UINT8_MAX              (255)
- # define UINT16_MAX             (65535)
- # define UINT32_MAX             (4294967295U)
- # define UINT64_MAX             (__UINT64_C(18446744073709551615))
  
- /* Minimum of signed integral types having a minimum size.  */
- # define INT_LEAST8_MIN         INT8_MIN
- # define INT_LEAST16_MIN        INT16_MIN
- # define INT_LEAST32_MIN        INT32_MIN
- # define INT_LEAST64_MIN        INT64_MIN
- /* Maximum of signed integral types having a minimum size.  */
- # define INT_LEAST8_MAX         INT8_MAX
- # define INT_LEAST16_MAX        INT16_MAX
- # define INT_LEAST32_MAX        INT32_MAX
- # define INT_LEAST64_MAX        INT64_MAX
+     echo "Build documentation:" $ENABLE_MANPAGE_BUILD
  
- /* Maximum of unsigned integral types having a minimum size.  */
- # define UINT_LEAST8_MAX        UINT8_MAX
- # define UINT_LEAST16_MAX       UINT16_MAX
- # define UINT_LEAST32_MAX       UINT32_MAX
- # define UINT_LEAST64_MAX       UINT64_MAX
  
-   /* shortcircuit*/
- #endif
-   /* once */
- #endif
- #endif
- STDINT_EOF
- fi
-     if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then
-       { echo "$as_me:$LINENO: $ac_stdint_h is unchanged" >&5
- echo "$as_me: $ac_stdint_h is unchanged" >&6;}
-     else
-       ac_dir=`(dirname "$ac_stdint_h") 2>/dev/null ||
- $as_expr X"$ac_stdint_h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_stdint_h" : 'X\(//\)[^/]' \| \
-        X"$ac_stdint_h" : 'X\(//\)$' \| \
-        X"$ac_stdint_h" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
- echo X"$ac_stdint_h" |
-     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; }; }; }
+     echo "Directories:"
+     echo "  Perl modules (amperldir): $amperldir"
+     echo "  Dumper: $DUMPER_DIR"
+     echo "  Configuration: $CONFIG_DIR"
+     echo "  GNU Tar lists: $GNUTAR_LISTED_INCREMENTAL_DIR"
+     echo "  Temporary: $AMANDA_TMPDIR"
  
-       rm -f $ac_stdint_h
-       mv $ac_stdint $ac_stdint_h
+     if test -f config.warnings; then
+       echo "WARNINGS:"
+       cat config.warnings | sed -e 's/^/  /g'
+       rm config.warnings
      fi
-  ;;
-   esac
- 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
  
diff --combined example/Makefile.in
index 1144b74f426a7990b59c3bee84d07a8329766c8b,f866f46cfd35cedb938b7dc2c9e0c98a3ac5f576..a2705157ce4d2468e152db0ebd82c27e06e1a90b
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for sample configuration files
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
+ # vim:ft=automake
+ #
+ # Adjust post-install permissions settings.  This rule works off two
+ # specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data. 
+ # Each is a whitespace-separated list of commands, all of which are either
+ # a variable assignment or a filename.  Three variables are available:
+ #
+ #  - dest= sets the destination directory to e.g., $(sbindir)
+ #  - chown= controls changes in ownership; value is first argument to chown
+ #  - chmod= controls changes in permissions; value is first argument to chmod
+ #
+ # As a special case, chown=amanda is taken as equivalent to 
+ # chown=$(BINARY_OWNER):$(SETUID_GROUP), which may otherwise have problems with
+ # whitespace in the user/group names.
+ # 
+ # when a filename is seen, the currently active variables are applied.
+ #
+ # Note that scripts are data, not executables!
+ #
+ # EXAMPLE
+ #
+ # sbin_PROGRAMS = foo bar bing
+ # libexec_PROGRAMS = pro gram
+ # sbin_SCRIPTS = sk ript
+ # INSTALLPERMS_exec = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             foo bar \
+ #     chmod=u+s,o-rwx \
+ #             bing
+ #     dest=$(libexecdir) chmod= \
+ #             $(libexec_PROGRAMS)
+ # INSTALLPERMS_data = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             $(sbin_SCRIPTS)
+ #
+ # This whole operation is not required when making builds for packaging,
+ # and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+ # AM_CONDITIONAL.
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -39,66 -74,148 +74,149 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
+ DIST_COMMON = $(dist_example_DATA) $(dist_lbltempl_DATA) \
+       $(dist_template_DATA) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/amanda-client.conf.in \
+       $(srcdir)/amanda.conf.in $(srcdir)/chg-mcutil.conf.in \
+       $(top_srcdir)/config/automake/installperms.am
  subdir = example
- DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/amanda-client.conf.in $(srcdir)/amanda.conf.in \
-       $(srcdir)/chg-mcutil.conf.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
  CONFIG_HEADER = $(top_builddir)/config/config.h
- CONFIG_CLEAN_FILES = amanda.conf chg-mcutil.conf amanda-client.conf
+ CONFIG_CLEAN_FILES = amanda-client.conf amanda.conf chg-mcutil.conf
  SOURCES =
  DIST_SOURCES =
- DATA = $(noinst_DATA)
+ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+ am__vpath_adj = case $$p in \
+     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+     *) f=$$p;; \
+   esac;
+ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+ am__installdirs = "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(lbltempldir)" \
+       "$(DESTDIR)$(templatedir)"
+ dist_exampleDATA_INSTALL = $(INSTALL_DATA)
+ dist_lbltemplDATA_INSTALL = $(INSTALL_DATA)
+ dist_templateDATA_INSTALL = $(INSTALL_DATA)
+ DATA = $(dist_example_DATA) $(dist_lbltempl_DATA) \
+       $(dist_template_DATA)
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -106,14 -223,19 +224,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -124,20 -246,19 +248,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -151,60 -272,169 +274,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -214,10 -444,24 +448,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -228,24 -472,58 +476,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -257,59 -535,46 +539,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -318,36 -583,79 +587,79 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
- noinst_DATA = amanda.conf \
-               amanda-client.conf
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
  
- EXTRA_DIST = chg-multi.conf chg-scsi.conf config.site disklist \
-               DLT.ps EXB-8500.ps HP-DAT.ps 8.5x11.ps 3hole.ps DIN-A4.ps \
+ # sed expression to strip leading directories from a filename; this converts e.g.,
+ # src/foo/bar.so to bar.so.
+ strip_leading_dirs = s|^.*/||
+ amanda_dir = $(localstatedir)/lib/amanda
+ templatedir = $(amanda_dir)/template.d
+ exampledir = $(amanda_dir)/example
+ lbltempldir = $(amanda_dir)/example/label-templates
+ EXTRA_DIST = chg-multi.conf \
+               chg-scsi.conf \
+               config.site \
+               disklist \
                chg-mcutil.conf
  
+ dist_template_DATA = template.d/advanced.conf \
+               template.d/amanda-harddisk.conf \
+               template.d/amanda-single-tape.conf \
+               template.d/amanda-tape-changer.conf \
+               template.d/amanda-S3.conf \
+               template.d/dumptypes \
+               template.d/tapetypes \
+               template.d/README   \
+               template.d/chg-manual.conf   
+ dist_example_DATA = amanda.conf \
+              amanda-client.conf \
+              inetd.conf.amandaclient \
+              xinetd.amandaclient \
+              xinetd.amandaserver 
+ dist_lbltempl_DATA = DLT.ps \
+                 EXB-8500.ps \
+                 HP-DAT.ps \
+                 8.5x11.ps \
+                 3hole.ps \
+               DLT-A4.ps \
+                 DIN-A4.ps 
+ INSTALLPERMS_data = chown=amanda \
+       dest=$(templatedir) $(dist_template_DATA) \
+       dest=$(exampledir) $(dist_example_DATA) \
+       dest=$(libtempldir) $(dist_libtempl_DATA) 
  all: all-am
  
  .SUFFIXES:
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/installperms.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -376,22 -684,69 +688,71 @@@ $(top_srcdir)/configure:  $(am__configu
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ amanda-client.conf: $(top_builddir)/config.status $(srcdir)/amanda-client.conf.in
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  amanda.conf: $(top_builddir)/config.status $(srcdir)/amanda.conf.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  chg-mcutil.conf: $(top_builddir)/config.status $(srcdir)/chg-mcutil.conf.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 +amanda-client.conf: $(top_builddir)/config.status $(srcdir)/amanda-client.conf.in
 +      cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  
  mostlyclean-libtool:
        -rm -f *.lo
  
  clean-libtool:
        -rm -rf .libs _libs
+ install-dist_exampleDATA: $(dist_example_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
+       @list='$(dist_example_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(dist_exampleDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
+         $(dist_exampleDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(exampledir)/$$f"; \
+       done
+ uninstall-dist_exampleDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_example_DATA)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
+         rm -f "$(DESTDIR)$(exampledir)/$$f"; \
+       done
+ install-dist_lbltemplDATA: $(dist_lbltempl_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(lbltempldir)" || $(MKDIR_P) "$(DESTDIR)$(lbltempldir)"
+       @list='$(dist_lbltempl_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(dist_lbltemplDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(lbltempldir)/$$f'"; \
+         $(dist_lbltemplDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(lbltempldir)/$$f"; \
+       done
  
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
+ uninstall-dist_lbltemplDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_lbltempl_DATA)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(lbltempldir)/$$f'"; \
+         rm -f "$(DESTDIR)$(lbltempldir)/$$f"; \
+       done
+ install-dist_templateDATA: $(dist_template_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(templatedir)" || $(MKDIR_P) "$(DESTDIR)$(templatedir)"
+       @list='$(dist_template_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(dist_templateDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(templatedir)/$$f'"; \
+         $(dist_templateDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(templatedir)/$$f"; \
+       done
+ uninstall-dist_templateDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_template_DATA)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(templatedir)/$$f'"; \
+         rm -f "$(DESTDIR)$(templatedir)/$$f"; \
+       done
  tags: TAGS
  TAGS:
  
@@@ -400,22 -755,21 +761,21 @@@ CTAGS
  
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
@@@ -430,6 -784,9 +790,9 @@@ check-am: all-a
  check: check-am
  all-am: Makefile $(DATA)
  installdirs:
+       for dir in "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(lbltempldir)" "$(DESTDIR)$(templatedir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
  install: install-am
  install-exec: install-exec-am
  install-data: install-data-am
@@@ -454,13 -811,15 +817,15 @@@ distclean-generic
  maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+ @WANT_INSTALLPERMS_FALSE@install-exec-hook:
+ @WANT_INSTALLPERMS_FALSE@install-data-hook:
  clean: clean-am
  
  clean-am: clean-generic clean-libtool mostlyclean-am
  
  distclean: distclean-am
        -rm -f Makefile
- distclean-am: clean-am distclean-generic distclean-libtool
+ distclean-am: clean-am distclean-generic
  
  dvi: dvi-am
  
@@@ -472,14 -831,27 +837,27 @@@ info: info-a
  
  info-am:
  
- install-data-am:
+ install-data-am: install-dist_exampleDATA install-dist_lbltemplDATA \
+       install-dist_templateDATA
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
  
  install-exec-am:
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+ install-html: install-html-am
  
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -498,18 -870,73 +876,73 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am
+ uninstall-am: uninstall-dist_exampleDATA uninstall-dist_lbltemplDATA \
+       uninstall-dist_templateDATA
+ .MAKE: install-am install-data-am install-exec-am install-strip
  
  .PHONY: all all-am check check-am clean clean-generic clean-libtool \
        distclean distclean-generic distclean-libtool distdir dvi \
        dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am
+       install-data install-data-am install-data-hook \
+       install-dist_exampleDATA install-dist_lbltemplDATA \
+       install-dist_templateDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-exec-hook install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       uninstall uninstall-am uninstall-dist_exampleDATA \
+       uninstall-dist_lbltemplDATA uninstall-dist_templateDATA
+ @WANT_INSTALLPERMS_TRUE@installperms-exec:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_exec)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on executables"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@installperms-data:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_data)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on data"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@install-exec-hook: installperms-exec
+ @WANT_INSTALLPERMS_TRUE@install-data-hook: installperms-data
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
  # Otherwise a system limit (for SysV at least) may be exceeded.
  .NOEXPORT:
index 7a384ccf2be8643a9e8f5e873bd422076a7fb403,0971d4769d4e78bbf0135f1ec07226a5273b2de7..1577b0305e49b525206046f9cf1fcf873f472646
@@@ -1,15 -1,15 +1,27 @@@
++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch
 +--- gnulib/getaddrinfo.c      2007-03-06 13:17:25.733225500 -0600
 ++++ gnulib/getaddrinfo.c      2007-03-06 13:17:32.345638750 -0600
 +@@ -40,6 +40,8 @@
 + #include "inet_ntop.h"
 + #include "snprintf.h"
++=======
+ --- gnulib/getaddrinfo.c.orig 2007-10-25 16:46:34.728843739 -0500
+ +++ gnulib/getaddrinfo.c      2007-10-25 16:47:17.395395249 -0500
+ @@ -42,6 +42,8 @@
+  
+  #include "inet_ntop.h"
++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch
   
  +extern int h_errno;
  +
   /* BeOS has AF_INET, but not PF_INET.  */
   #ifndef PF_INET
   # define PF_INET AF_INET
++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch
 +@@ -147,25 +149,29 @@
++=======
+ @@ -149,25 +151,29 @@
++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch
       return getaddrinfo_ptr (nodename, servname, hints, res);
   #endif
   
   #else
         nodename = "0.0.0.0";
   #endif
++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch
 +@@ -175,11 +181,13 @@
 +     {
 +       struct servent *se = NULL;
 +       const char *proto =
 +-     (hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp";
 ++     (hints && (hints->ai_socktype == SOCK_DGRAM)) ? "udp" : "tcp";
 + 
 +-      if (!(hints->ai_flags & AI_NUMERICSERV))
 +-     /* FIXME: Use getservbyname_r if available. */
 +-     se = getservbyname (servname, proto);
 ++      if ((hints == NULL) || !(hints->ai_flags & AI_NUMERICSERV))
 ++        {
 ++       /* FIXME: Use getservbyname_r if available. */
 ++       se = getservbyname (servname, proto);
 ++        }
 + 
 +       if (!se)
 +      {
 +@@ -196,7 +204,7 @@
++=======
+ @@ -198,7 +204,7 @@
++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch
       }
   
     /* FIXME: Use gethostbyname_r if available. */
     if (!he || he->h_addr_list[0] == NULL)
       return EAI_NONAME;
   
++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch
 +@@ -277,7 +285,7 @@
++=======
+ @@ -279,7 +285,7 @@
++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch
         return EAI_NODATA;
       }
   
       {
         const char *cn;
         if (he->h_name)
++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch
 +@@ -341,9 +349,7 @@
++=======
+ @@ -343,9 +349,7 @@
++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch
   #endif
   
     /* FIXME: Support other flags. */
       return EAI_BADFLAGS;
   
     if (sa == NULL || salen < sizeof (sa->sa_family))
++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch
 +@@ -367,34 +373,89 @@
++=======
+ @@ -369,34 +373,89 @@
++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch
         return EAI_FAMILY;
       }
   
index 411d948a0dd5c7d537805e7e84f0b9a542e245f6,a12e7d2ec2ec58ebbf11c39bfb68e80bae1afc5e..ebe43e478eee349fedac3d780f583ef9d95d8503
@@@ -7,7 -7,7 +7,11 @@@ Index: gnulib/Makefile.a
   
   AM_CPPFLAGS =
  +if GCC_COMPILER
++<<<<<<< HEAD:gnulib/regenerate/no-error.patch
 ++  AM_CFLAGS += -Wno-error
++=======
+ +  AM_CFLAGS = -Wno-error -Wno-sign-compare
++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/no-error.patch
  +endif
   
   noinst_LTLIBRARIES += libgnu.la
index 0265ca26558293c74e67baa017ecf2e3e7da37e2,a32ab348b93e2dede03fa7401213099f9a5cef06..a32ab348b93e2dede03fa7401213099f9a5cef06
mode 100644,100755..100644
@@@ -1,7 -1,7 +1,7 @@@
  #! /bin/bash
  
  # Gnulib files in zmanda repo are from gnulib CVS updated with:
- #   cvs update -D '2007-01-31 13:12:51 -0600'
+ #   cvs update -D '2007-10-25 17:00:00 -0600'
  
  # get to the project root
  cd `dirname $0`/../..
@@@ -36,24 -36,19 +36,19 @@@ shopt -u nullglo
  ## Add your modules here, then see below if you need to patch them. ##
  ######################################################################
  
- GNULIB_MODULES="getaddrinfo lock visibility"
+ GNULIB_MODULES="getaddrinfo lock visibility base64 physmem fsusage mkdtemp"
  
  ######################################################################
  ## End modules                                                      ##
  ######################################################################
  
- # check out a brand new gnulib directory and gnulib.m4i
+ # create a brand new gnulib directory
  
  "${GNULIB_TOOL}" --import \
          --dir=. --lib=libgnu --source-base=gnulib --m4-base=config/gnulib \
          --doc-base=doc --aux-dir=config --libtool --macro-prefix=gl \
          ${GNULIB_MODULES} || exit 1
  
- for filename in config/gnulib/*.m4
-  do
-     echo "m4_include([$filename])"
- done > config/gnulib.m4i || exit 1
  ########################## DEVELOPERS! ###############################
  ## Add your patch commands here, or use sed invoacations, etc.      ##
  ## Please comment heavily!                                          ##
diff --combined man/Makefile.in
index 4fcf3743bd3862c7d982e330ae1a2050a4dd3036,80f0d8fb24228fb161c0560bf955afdec542f98e..e5e805da8322a86b8d9092d24024204e379b356d
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  @SET_MAKE@
  
  # Makefile for amanda man-pages
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -37,46 -33,119 +33,119 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
+ @WANT_AMPLOT_TRUE@am__append_1 = $(AMPLOT_MAN_PAGES)
+ @WANT_SERVER_TRUE@am__append_2 = $(SERVER_MAN_PAGES)
+ @WANT_RECOVER_TRUE@am__append_3 = $(RECOVER_MAN_PAGES)
+ @WANT_RESTORE_TRUE@am__append_4 = $(RESTORE_MAN_PAGES)
  subdir = man
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@@ -88,18 -157,17 +157,18 @@@ man5dir = $(mandir)/man
  am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
  man8dir = $(mandir)/man8
  NROFF = nroff
 -MANS = $(man_MANS)
 +MANS = $(man5_MANS) $(man8_MANS)
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  transform = s,x,x,;
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -107,14 -175,19 +176,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -125,20 -198,19 +200,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -152,60 -224,169 +226,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -215,10 -396,24 +400,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -229,24 -424,58 +428,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -258,59 -487,46 +491,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -319,37 -535,44 +539,44 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
- @WANT_AMPLOT_TRUE@AMPLOT_MAN8_PAGES = amplot.8
- COMMON_MAN8_PAGES = amanda.8
- COMMON_MAN5_PAGES = amanda.conf.5 \
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ AMPLOT_MAN_PAGES = amplot.8
+ COMMON_MAN_PAGES = amanda.8 \
+                   amanda.conf.5 \
                    amanda-client.conf.5
  
- #if WANT_SERVER
- SERVER_MAN8_PAGES = amadmin.8 \
+ SERVER_MAN_PAGES = amadmin.8 \
                    amcheck.8 \
                    amcheckdb.8 \
+                   amcheckdump.8 \
                    amcleanup.8 \
                    amdd.8 \
+                   amdevcheck.8 \
                    amdump.8 \
                    amflush.8 \
                    amgetconf.8 \
                    amtoc.8 \
                    amverify.8 \
                    amverifyrun.8 \
-                   amfetchdump.8 \
+                   amserverconfig.8 \
+                   amaddclient.8 \
+                   amcheckdump.8 \
                    amcrypt.8 \
                    amaespipe.8 \
+                   amgpgcrypt.8 \
+                   amcryptsimple.8  \
                    amcrypt-ossl.8 \
                    amcrypt-ossl-asym.8
  
- #endif
- @WANT_RECOVER_TRUE@RECOVER_MAN8_PAGES = amrecover.8
- @WANT_RESTORE_TRUE@RESTORE_MAN8_PAGES = amrestore.8
- man8_pages = $(COMMON_MAN8_PAGES) \
-           $(AMPLOT_MAN8_PAGES) \
-           $(SERVER_MAN8_PAGES) \
-           $(RECOVER_MAN8_PAGES) \
-           $(RESTORE_MAN8_PAGES)
- man5_pages = $(COMMON_MAN5_PAGES)
- ALL_MAN_PAGES = $(AMPLOT_MAN8_PAGES) \
-          $(COMMON_MAN5_PAGES) \
-          $(COMMON_MAN8_PAGES) \
-          $(SERVER_MAN8_PAGES) \
-          $(RECOVER_MAN8_PAGES) \
-          $(RESTORE_MAN8_PAGES)
- # These lines are needed to force automake to set the $man<n>dir variables.
- man5_MANS = 
- man8_MANS = 
+ RECOVER_MAN_PAGES = amrecover.8
+ RESTORE_MAN_PAGES = amrestore.8 \
+                    amfetchdump.8
+ ALL_MAN_PAGES = $(AMPLOT_MAN_PAGES) \
+          $(COMMON_MAN_PAGES) \
+          $(COMMON_MAN_PAGES) \
+          $(SERVER_MAN_PAGES) \
+          $(RECOVER_MAN_PAGES) \
+          $(RESTORE_MAN_PAGES)
+ WANTED_MAN_PAGES = $(COMMON_MAN_PAGES) $(am__append_1) $(am__append_2) \
+       $(am__append_3) $(am__append_4)
  SRCMANPAGEDIR = $(srcdir)/xml-source
  MAN_XML = $(ALL_MAN_PAGES:%=xml-source/%.xml)
  EXTRA_XML = xslt/expand-sambadoc.xsl \
-             xslt/man.xsl \
+             xslt/man.xsl.in \
+             xslt/html.xsl.in \
              xslt/settings.xsl \
            entities/global.entities \
            entities/xinclude.dtd
  
- EXTRA_DIST = $(ALL_MAN_PAGES) $(MAN_XML) $(EXTRA_XML)
+ # (no rule to build HTML without ENABLE_MANPAGE_BUILD)
+ EXTRA_DIST = $(ALL_MAN_PAGES) $(MAN_XML) $(EXTRA_HTML) $(EXTRA_XML) \
+       index.php amanda.css
  GEN_XML = $(ALL_MAN_PAGES:%=xml-source/%.proc.xml)
  MOSTLYCLEANFILES = $(GEN_XML)
  MAINTAINERCLEANFILES = $(ALL_MAN_PAGES)
+ ALL_MAN_HTMLS = $(ALL_MAN_PAGES:%=%.html)
+ man_MANS = $(WANTED_MAN_PAGES)
  all: all-am
  
  .SUFFIXES:
@@@ -441,13 -666,9 +670,9 @@@ mostlyclean-libtool
  
  clean-libtool:
        -rm -rf .libs _libs
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
  install-man5: $(man5_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)"
+       test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
        @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
        l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
        for i in $$l2; do \
@@@ -492,7 -713,7 +717,7 @@@ uninstall-man5
        done
  install-man8: $(man8_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
+       test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
        @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
        l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
        for i in $$l2; do \
@@@ -543,23 -764,21 +768,21 @@@ CTAGS
  
  
  distdir: $(DISTFILES)
-       $(mkdir_p) $(distdir)/entities $(distdir)/xslt
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
            || exit 1; \
          fi; \
        done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
  check-am: all-am
  check: check-am
  all-am: Makefile $(MANS)
  installdirs:
        for dir in "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
  install: install-am
  install-exec: install-exec-am
@@@ -609,28 -831,32 +835,32 @@@ clean-am: clean-generic clean-libtool m
  
  distclean: distclean-am
        -rm -f Makefile
- distclean-am: clean-am distclean-generic distclean-libtool
+ distclean-am: clean-am distclean-generic
  
  dvi: dvi-am
  
  dvi-am:
  
- html: html-am
  info: info-am
  
  info-am:
  
  install-data-am: install-man
-       @$(NORMAL_INSTALL)
-       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
  
  install-exec-am:
  
+ install-html: install-html-am
  install-info: install-info-am
  
  install-man: install-man5 install-man8
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -649,81 -875,57 +879,57 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-man
+ uninstall-am: uninstall-man
  
  uninstall-man: uninstall-man5 uninstall-man8
  
+ .MAKE: install-am install-strip
  .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-data-hook install-exec \
-       install-exec-am install-info install-info-am install-man \
-       install-man5 install-man8 install-strip installcheck \
+       dist-hook distclean distclean-generic distclean-libtool \
+       distdir dvi dvi-am html html-am info info-am install \
+       install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-man5 install-man8 install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
        installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-generic \
        mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am uninstall-man uninstall-man5 uninstall-man8
+       uninstall-man uninstall-man5 uninstall-man8
  
+ # some of the XSL needs to know what docbook-xsl version we've selected
+ %.xsl: %.xsl.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
  
+ # phase one of the documentation build expands some macros.
  @ENABLE_MANPAGE_BUILD_TRUE@xml-source/%.proc.xml: $(SRCMANPAGEDIR)/%.xml $(srcdir)/xslt/expand-sambadoc.xsl
  @ENABLE_MANPAGE_BUILD_TRUE@   $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --xinclude --stringparam latex.imagebasedir "$*/" --stringparam noreference 1 --output $@ $(srcdir)/xslt/expand-sambadoc.xsl $<
  
+ # phase two generates a manpage from the resulting "expanded" docbook XML
  @ENABLE_MANPAGE_BUILD_TRUE@%: xml-source/%.proc.xml $(srcdir)/xslt/man.xsl
- @ENABLE_MANPAGE_BUILD_TRUE@   $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --output $@ http://docbook.sourceforge.net/release/xsl/1.72.0/manpages/docbook.xsl $<
+ @ENABLE_MANPAGE_BUILD_TRUE@   $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --output $@ xslt/man.xsl $<
+ @ENABLE_MANPAGE_BUILD_TRUE@%.html: xml-source/%.proc.xml $(srcdir)/xslt/html.xsl
+ @ENABLE_MANPAGE_BUILD_TRUE@   $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --output $@ xslt/html.xsl $<
  
  @ENABLE_MANPAGE_BUILD_FALSE@%: $(SRCMANPAGEDIR)/%.xml
  @ENABLE_MANPAGE_BUILD_FALSE@  @echo WARNING: Not building needed $@ because building manpages is disabled.
- all: $(ALL_MAN_PAGES)
- # this is conditioned on ENABLE_MANPAGE_BUILD; it checks for the
- # existence of the file to be installed when building manpages is
- # not enabled.
- install-data-hook: $(ALL_MAN_PAGES)
- @ENABLE_MANPAGE_BUILD_TRUE@   @list="$(man8_pages)"; \
- @ENABLE_MANPAGE_BUILD_TRUE@   for p in $$list; do \
- @ENABLE_MANPAGE_BUILD_TRUE@           pa=$(DESTDIR)$(man8dir)/`echo $$p|sed '$(transform)'`; \
- @ENABLE_MANPAGE_BUILD_TRUE@           echo $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man8dir); \
- @ENABLE_MANPAGE_BUILD_TRUE@           $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man8dir); \
- @ENABLE_MANPAGE_BUILD_TRUE@           echo chown \"$(BINARY_OWNER)\" $$pa;    \
- @ENABLE_MANPAGE_BUILD_TRUE@           chown "$(BINARY_OWNER)" $$pa;           \
- @ENABLE_MANPAGE_BUILD_TRUE@           echo chgrp \"$(SETUID_GROUP)\" $$pa;    \
- @ENABLE_MANPAGE_BUILD_TRUE@           chgrp "$(SETUID_GROUP)" $$pa;           \
- @ENABLE_MANPAGE_BUILD_TRUE@   done
- @ENABLE_MANPAGE_BUILD_TRUE@   @list="$(man5_pages)"; \
- @ENABLE_MANPAGE_BUILD_TRUE@   for p in $$list; do \
- @ENABLE_MANPAGE_BUILD_TRUE@           pa=$(DESTDIR)$(man5dir)/`echo $$p|sed '$(transform)'`; \
- @ENABLE_MANPAGE_BUILD_TRUE@           echo $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man5dir); \
- @ENABLE_MANPAGE_BUILD_TRUE@           $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man5dir); \
- @ENABLE_MANPAGE_BUILD_TRUE@           echo chown \"$(BINARY_OWNER)\" $$pa;    \
- @ENABLE_MANPAGE_BUILD_TRUE@           chown "$(BINARY_OWNER)" $$pa;           \
- @ENABLE_MANPAGE_BUILD_TRUE@           echo chgrp \"$(SETUID_GROUP)\" $$pa;    \
- @ENABLE_MANPAGE_BUILD_TRUE@           chgrp "$(SETUID_GROUP)" $$pa;           \
- @ENABLE_MANPAGE_BUILD_TRUE@   done
- @ENABLE_MANPAGE_BUILD_FALSE@  @list="$(man8_pages)"; \
- @ENABLE_MANPAGE_BUILD_FALSE@  for p in $$list; do \
- @ENABLE_MANPAGE_BUILD_FALSE@      if test -e $$p; then \
- @ENABLE_MANPAGE_BUILD_FALSE@          pa=$(DESTDIR)$(man8dir)/`echo $$p|sed '$(transform)'`; \
- @ENABLE_MANPAGE_BUILD_FALSE@          echo $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man8dir); \
- @ENABLE_MANPAGE_BUILD_FALSE@          $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man8dir); \
- @ENABLE_MANPAGE_BUILD_FALSE@          echo chown \"$(BINARY_OWNER)\" $$pa;    \
- @ENABLE_MANPAGE_BUILD_FALSE@          chown "$(BINARY_OWNER)" $$pa;           \
- @ENABLE_MANPAGE_BUILD_FALSE@          echo chgrp \"$(SETUID_GROUP)\" $$pa;    \
- @ENABLE_MANPAGE_BUILD_FALSE@          chgrp "$(SETUID_GROUP)" $$pa;           \
- @ENABLE_MANPAGE_BUILD_FALSE@      fi \
- @ENABLE_MANPAGE_BUILD_FALSE@  done
- @ENABLE_MANPAGE_BUILD_FALSE@  @list="$(man5_pages)"; \
- @ENABLE_MANPAGE_BUILD_FALSE@  for p in $$list; do \
- @ENABLE_MANPAGE_BUILD_FALSE@      if test -e $$p; then \
- @ENABLE_MANPAGE_BUILD_FALSE@          pa=$(DESTDIR)$(man5dir)/`echo $$p|sed '$(transform)'`; \
- @ENABLE_MANPAGE_BUILD_FALSE@          echo $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man5dir); \
- @ENABLE_MANPAGE_BUILD_FALSE@          $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man5dir); \
- @ENABLE_MANPAGE_BUILD_FALSE@          echo chown \"$(BINARY_OWNER)\" $$pa;    \
- @ENABLE_MANPAGE_BUILD_FALSE@          chown "$(BINARY_OWNER)" $$pa;           \
- @ENABLE_MANPAGE_BUILD_FALSE@          echo chgrp \"$(SETUID_GROUP)\" $$pa;    \
- @ENABLE_MANPAGE_BUILD_FALSE@          chgrp "$(SETUID_GROUP)" $$pa;           \
- @ENABLE_MANPAGE_BUILD_FALSE@      fi \
- @ENABLE_MANPAGE_BUILD_FALSE@  done
+ @ENABLE_MANPAGE_BUILD_FALSE@  @echo 'DUMMY' > $@
+ # toplevel rule to build HTML manpages and tar them up
+ html: amanda.css index.php $(ALL_MAN_HTMLS)
+       tar -zcf html.tar.gz $(ALL_MAN_HTMLS) amanda.css index.php
+ # double-check that we don't ship dummy manpages
+ dist-hook:
+       for f in $(WANTED_MAN_PAGES); do \
+               if sed -e 1q $(distdir)/$$f | $(GREP) '^DUMMY$$' >/dev/null 2>/dev/null; then \
+                       echo "$(distdir)/$$f is a dummy manpage; cannot create distribution"; \
+                       exit 1; \
+               fi; \
+       done
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
  # Otherwise a system limit (for SysV at least) may be exceeded.
  .NOEXPORT:
diff --combined recover-src/Makefile.in
index a31769562b42f6c1fe751a5e16649b77556c3791,1494a1a076bd3679a1c5743a03a78c1f8a84f70a..7936f298504d9c4788aaf4d7297a234686bb3861
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for Amanda file recovery programs.
  
+ # vim:ft=automake
+ #
+ # Adjust post-install permissions settings.  This rule works off two
+ # specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data. 
+ # Each is a whitespace-separated list of commands, all of which are either
+ # a variable assignment or a filename.  Three variables are available:
+ #
+ #  - dest= sets the destination directory to e.g., $(sbindir)
+ #  - chown= controls changes in ownership; value is first argument to chown
+ #  - chmod= controls changes in permissions; value is first argument to chmod
+ #
+ # As a special case, chown=amanda is taken as equivalent to 
+ # chown=$(BINARY_OWNER):$(SETUID_GROUP), which may otherwise have problems with
+ # whitespace in the user/group names.
+ # 
+ # when a filename is seen, the currently active variables are applied.
+ #
+ # Note that scripts are data, not executables!
+ #
+ # EXAMPLE
+ #
+ # sbin_PROGRAMS = foo bar bing
+ # libexec_PROGRAMS = pro gram
+ # sbin_SCRIPTS = sk ript
+ # INSTALLPERMS_exec = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             foo bar \
+ #     chmod=u+s,o-rwx \
+ #             bing
+ #     dest=$(libexecdir) chmod= \
+ #             $(libexec_PROGRAMS)
+ # INSTALLPERMS_data = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             $(sbin_SCRIPTS)
+ #
+ # This whole operation is not required when making builds for packaging,
+ # and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+ # AM_CONDITIONAL.
+ # vim:ft=automake
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -40,48 -77,120 +77,120 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
+ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in \
+       $(top_srcdir)/config/automake/installperms.am \
+       $(top_srcdir)/config/automake/precompile.am uparse.c uparse.h \
+       uscan.c
  sbin_PROGRAMS = amrecover$(EXEEXT)
  subdir = recover-src
- DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in uparse.c uparse.h uscan.c
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@@ -98,40 -207,43 +207,44 @@@ amrecover_OBJECTS = $(am_amrecover_OBJE
  amrecover_LDADD = $(LDADD)
  am__DEPENDENCIES_1 =
  amrecover_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
+       $(am__DEPENDENCIES_1) \
        ../client-src/libamclient.$(LIB_EXTENSION) \
        ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
+       ../gnulib/libgnu.$(LIB_EXTENSION)
+ DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
  am__depfiles_maybe = depfiles
  COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  CCLD = $(CC)
- LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
  LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
- LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+ LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
+ YLWRAP = $(top_srcdir)/config/ylwrap
  YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
- LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
-       $(AM_YFLAGS)
+ LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
  SOURCES = $(amrecover_SOURCES)
  DIST_SOURCES = $(amrecover_SOURCES)
  HEADERS = $(noinst_HEADERS)
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -139,14 -251,19 +252,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -157,20 -274,19 +276,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -184,60 -300,169 +302,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -247,10 -472,24 +476,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -261,24 -500,58 +504,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -290,59 -563,46 +567,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -351,34 -611,46 +615,46 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ # sed expression to strip leading directories from a filename; this converts e.g.,
+ # src/foo/bar.so to bar.so.
+ strip_leading_dirs = s|^.*/||
  INCLUDES = -I$(top_builddir)/common-src \
                -I$(top_srcdir)/common-src   \
                -I$(top_srcdir)/client-src   \
                -I$(top_srcdir)/gnulib
  
+ AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
  LINT = @AMLINT@
  LINTFLAGS = @AMLINTFLAGS@
  LIB_EXTENSION = la
- @WANT_RUNTIME_PSEUDO_RELOC_TRUE@AM_LDFLAGS = -Wl,-enable-runtime-pseudo-reloc
  
  ###
  # Because libamanda includes routines (e.g. regex) provided by some system
  ###
  LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
        @LEXLIB@ \
+       $(READLINE_LIBS) \
        ../client-src/libamclient.$(LIB_EXTENSION) \
        ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) \
-       $(READLINE_LIBS)
+       ../gnulib/libgnu.$(LIB_EXTENSION) 
  
  amrecover_CSRC = amrecover.c                                  \
                        display_commands.c              extract_list.c  \
  amrecover_SOURCES = $(amrecover_CSRC) uparse.y        uscan.l
  noinst_HEADERS = amrecover.h uparse.h
  AM_YFLAGS = -d
+ INSTALLPERMS_exec = \
+       dest=$(sbindir) chown=amanda chmod=o-rwx $(sbin_PROGRAMS)
  all: all-am
  
  .SUFFIXES:
  .SUFFIXES: .c .l .lo .o .obj .y
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -435,7 -710,7 +714,7 @@@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  install-sbinPROGRAMS: $(sbin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
+       test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
        @list='$(sbin_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
@@@ -464,11 -739,11 +743,11 @@@ clean-sbinPROGRAMS
  uparse.h: uparse.c
        @if test ! -f $@; then \
          rm -f uparse.c; \
-         $(MAKE) uparse.c; \
+         $(MAKE) $(AM_MAKEFLAGS) uparse.c; \
        else :; fi
  amrecover$(EXEEXT): $(amrecover_OBJECTS) $(amrecover_DEPENDENCIES) 
        @rm -f amrecover$(EXEEXT)
-       $(LINK) $(amrecover_LDFLAGS) $(amrecover_OBJECTS) $(amrecover_LDADD) $(LIBS)
+       $(LINK) $(amrecover_OBJECTS) $(amrecover_LDADD) $(LIBS)
  
  mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@@ -485,51 -760,31 +764,31 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uscan.Po@am__quote@
  
  .c.o:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c $<
  
  .c.obj:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
  
  .c.lo:
- @am__fastdepCC_TRUE@  if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
  
  .l.c:
-       $(LEXCOMPILE) $<
-       sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@
-       rm -f $(LEX_OUTPUT_ROOT).c
+       $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
  
  .y.c:
-       $(YACCCOMPILE) $<
-       if test -f y.tab.h; then \
-         to=`echo "$*_H" | sed \
-                 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
-                 -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \
-         sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \
-             y.tab.h >$*.ht; \
-         rm -f y.tab.h; \
-         if cmp -s $*.ht $*.h; then \
-           rm -f $*.ht ;\
-         else \
-           mv $*.ht $*.h; \
-         fi; \
-       fi
-       if test -f y.output; then \
-         mv y.output $*.output; \
-       fi
-       sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@
-       rm -f y.tab.c
+       $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
  
  mostlyclean-libtool:
        -rm -f *.lo
  clean-libtool:
        -rm -rf .libs _libs
  
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@@ -590,22 -841,21 +845,21 @@@ distclean-tags
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
@@@ -621,7 -871,7 +875,7 @@@ check: check-a
  all-am: Makefile $(PROGRAMS) $(HEADERS)
  installdirs:
        for dir in "$(DESTDIR)$(sbindir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
  install: install-am
  install-exec: install-exec-am
@@@ -650,6 -900,8 +904,8 @@@ maintainer-clean-generic
        -rm -f uparse.c
        -rm -f uparse.h
        -rm -f uscan.c
+ @WANT_INSTALLPERMS_FALSE@install-exec-hook:
+ @WANT_INSTALLPERMS_FALSE@install-data-hook:
  clean: clean-am
  
  clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
@@@ -659,7 -911,7 +915,7 @@@ distclean: distclean-a
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
  
  dvi: dvi-am
  
@@@ -672,15 -924,25 +928,25 @@@ info: info-a
  info-am:
  
  install-data-am:
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
  
  install-exec-am: install-sbinPROGRAMS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
  
+ install-html: install-html-am
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -701,44 -963,95 +967,95 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS
+ uninstall-am: uninstall-sbinPROGRAMS
+ .MAKE: install-am install-data-am install-exec-am install-strip
  
  .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
        clean-libtool clean-sbinPROGRAMS ctags distclean \
        distclean-compile distclean-generic distclean-libtool \
        distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-exec \
-       install-exec-am install-exec-hook install-info install-info-am \
-       install-man install-sbinPROGRAMS install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-compile \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-info-am \
+       install install-am install-data install-data-am \
+       install-data-hook install-dvi install-dvi-am install-exec \
+       install-exec-am install-exec-hook install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am \
        uninstall-sbinPROGRAMS
  
  
+ @WANT_INSTALLPERMS_TRUE@installperms-exec:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_exec)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on executables"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@installperms-data:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_data)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on data"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@install-exec-hook: installperms-exec
+ @WANT_INSTALLPERMS_TRUE@install-data-hook: installperms-data
+ # A rule to make precompiler output from C files.  This is not used during
+ # ordinary builds, but but can very useful in debugging problems on strange
+ # architectures.  With this rule, we can ask users to 'make foo.i' and send
+ # the result to us.
+ #
+ # It touches some automake internals ($COMPILE), but since it's not
+ # build-critical, that's OK.
+ %.i : %.c
+       $(COMPILE) -E -o $@ $<
  # so that uscan.c is never generated before uparse.h
  # otherwise we might have makedepend problems
$(srcdir)/uscan.c: $(srcdir)/uparse.h
uscan.c: uparse.h
  
- uscan.$(OBJEXT): $(srcdir)/uscan.c
+ # these two commands are specially defined to omit $(AMANDA_WARNING_CFLAGS)
+ # since we don't want warnings for generated code
+ uscan.$(OBJEXT): uscan.c
        $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
  
- uparse.$(OBJEXT): $(srcdir)/uparse.c
+ uparse.$(OBJEXT): uparse.c
        $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
  
- install-exec-hook:
-       @list="$(sbin_PROGRAMS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-               echo chmod o-rwx $$pa; \
-               chmod o-rwx $$pa; \
-       done
  lint:
        @f="$(amrecover_CSRC)";                                                 \
        (cd ../common-src; make listlibsrc);                                    \
        (cd ../server-src; make listlibsrc);                                    \
        f="$$f "`cat ../server-src/listlibsrc.output`;                          \
        echo $(LINT) $$f;                                                       \
-       $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config $(INCLUDES) $$f;\
+       $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $$f;\
        if [ $$? -ne 0 ]; then                                                  \
            exit 1;                                                             \
        fi;                                                                     \
diff --combined recover-src/amrecover.c
index 7752ee6f8a98c6e03fa4360c852765daef21d006,0f103dc87ca87cba193cc226ae2d62b22037b955..fc4d36d6bb7252794ebcf11827b19a475e4ae0e5
@@@ -42,9 -42,9 +42,9 @@@
  #include "event.h"
  #include "security.h"
  
- #define amrecover_debug(i,x) do {     \
+ #define amrecover_debug(i, ...) do {  \
        if ((i) <= debug_amrecover) {   \
-           dbprintf(x);                \
+           dbprintf(__VA_ARGS__);      \
        }                               \
  } while (0)
  
@@@ -54,9 -54,8 +54,8 @@@ int grab_reply(int show)
  void sigint_handler(int signum);
  int main(int argc, char **argv);
  
- #define USAGE "Usage: amrecover [[-C] <config>] [-s <index-server>] [-t <tape-server>] [-d <tape-device>] [-o <clientconfigoption>]*\n"
+ #define USAGE _("Usage: amrecover [[-C] <config>] [-s <index-server>] [-t <tape-server>] [-d <tape-device>] [-o <clientconfigoption>]*\n")
  
- char *config = NULL;
  char *server_name = NULL;
  int server_socket;
  char *server_line = NULL;
@@@ -110,18 -109,18 +109,18 @@@ get_line(void
        buf = NULL;
        size = security_stream_read_sync(streams[MESGFD].fd, &buf);
        if(size < 0) {
-           amrecover_debug(1, ("%s: amrecover: get_line size < 0 (%zd)\n", debug_prefix_time(NULL), size));
+           amrecover_debug(1, "amrecover: get_line size < 0 (%zd)\n", size);
            return -1;
        }
        else if(size == 0) {
-           amrecover_debug(1, ("%s: amrecover: get_line size == 0 (%zd)\n", debug_prefix_time(NULL), size));
+           amrecover_debug(1, "amrecover: get_line size == 0 (%zd)\n", size);
            return -1;
        }
        else if (buf == NULL) {
-           amrecover_debug(1, ("%s: amrecover: get_line buf == NULL\n", debug_prefix_time(NULL)));
+           amrecover_debug(1, "amrecover: get_line buf == NULL\n");
            return -1;
        }
-         amrecover_debug(1, ("%s: amrecover: get_line size = %zd\n", debug_prefix_time(NULL), size));
+         amrecover_debug(1, "amrecover: get_line size = %zd\n", size);
        newbuf = alloc(strlen(mesg_buffer)+size+1);
        strncpy(newbuf, mesg_buffer, (size_t)(strlen(mesg_buffer) + size));
        memcpy(newbuf+strlen(mesg_buffer), buf, (size_t)size);
@@@ -313,13 -312,20 +312,20 @@@ main
      extern char *optarg;
      extern int optind;
      char *line = NULL;
-     char *conffile;
      const security_driver_t *secdrv;
      char *req = NULL;
      int response_error;
-     int new_argc;
-     char **new_argv;
      struct tm *tm;
+     config_overwrites_t *cfg_ovr;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(-1, 0);
  
  
      dbopen(DBG_SUBDIR_CLIENT);
  
 +#ifndef IGNORE_UID_CHECK
 +    if (geteuid() != 0) {
 +      erroutput_type |= ERR_SYSLOG;
 +      error("amrecover must be run by root");
 +      /*NOTREACHED*/
 +    }
 +#endif
 +
      localhost = alloc(MAX_HOSTNAME_LENGTH+1);
      if (gethostname(localhost, MAX_HOSTNAME_LENGTH) != 0) {
-       error("cannot determine local host name\n");
+       error(_("cannot determine local host name\n"));
        /*NOTREACHED*/
      }
      localhost[MAX_HOSTNAME_LENGTH] = '\0';
  
-     parse_conf(argc, argv, &new_argc, &new_argv);
+     /* load the base client configuration */
+     config_init(CONFIG_INIT_CLIENT, NULL);
  
-     if (new_argc > 1 && new_argv[1][0] != '-') {
-       /*
-        * If the first argument is not an option flag, then we assume
-        * it is a configuration name to match the syntax of the other
-        * Amanda utilities.
-        */
-       char **new_argv1;
+     /* treat amrecover-specific command line options as the equivalent
+      * -o command-line options to set configuration values */
+     cfg_ovr = new_config_overwrites(argc/2);
  
-       new_argv1 = (char **) alloc((size_t)((new_argc + 1 + 1) * sizeof(*new_argv1)));
-       new_argv1[0] = new_argv[0];
-       new_argv1[1] = "-C";
-       for (i = 1; i < new_argc; i++) {
-           new_argv1[i + 1] = new_argv[i];
-       }
-       new_argv1[i + 1] = NULL;
-       new_argc++;
-       amfree(new_argv);
-       new_argv = new_argv1;
+     /* If the first argument is not an option flag, then we assume
+      * it is a configuration name to match the syntax of the other
+      * Amanda utilities. */
+     if (argc > 1 && argv[1][0] != '-') {
+       add_config_overwrite(cfg_ovr, "conf", argv[1]);
+       /* remove that option from the command line */
+       argv[1] = argv[0];
+       argv++; argc--;
      }
-     while ((i = getopt(new_argc, new_argv, "C:s:t:d:U")) != EOF) {
+     /* now parse regular command-line '-' options */
+     while ((i = getopt(argc, argv, "o:C:s:t:d:U")) != EOF) {
        switch (i) {
            case 'C':
-               add_client_conf(CNF_CONF, optarg);
+               add_config_overwrite(cfg_ovr, "conf", optarg);
                break;
  
            case 's':
-               add_client_conf(CNF_INDEX_SERVER, optarg);
+               add_config_overwrite(cfg_ovr, "index_server", optarg);
                break;
  
            case 't':
-               add_client_conf(CNF_TAPE_SERVER, optarg);
+               add_config_overwrite(cfg_ovr, "tape_server", optarg);
                break;
  
            case 'd':
-               add_client_conf(CNF_TAPEDEV, optarg);
+               add_config_overwrite(cfg_ovr, "tapedev", optarg);
+               break;
+           case 'o':
+               add_config_overwrite_opt(cfg_ovr, optarg);
                break;
  
            case 'U':
            case '?':
-               (void)printf(USAGE);
+               (void)g_printf(USAGE);
                return 0;
        }
      }
-     if (optind != new_argc) {
-       (void)fprintf(stderr, USAGE);
+     if (optind != argc) {
+       (void)g_fprintf(stderr, USAGE);
        exit(1);
      }
  
-     our_features = am_init_feature_set();
-     our_features_string = am_feature_to_string(our_features);
-     conffile = vstralloc(CONFIG_DIR, "/", "amanda-client.conf", NULL);
-     if (read_clientconf(conffile) > 0) {
-       error("error reading conffile: %s", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
-     config = stralloc(getconf_str(CNF_CONF));
+     /* and now try to load the configuration named in that file */
+     apply_config_overwrites(cfg_ovr);
+     config_init(CONFIG_INIT_CLIENT | CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_OVERLAY,
+               getconf_str(CNF_CONF));
  
-     conffile = vstralloc(CONFIG_DIR, "/", config, "/", "amanda-client.conf",
-                        NULL);
-     if (read_clientconf(conffile) > 0) {
-       error("error reading conffile: %s", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
+     check_running_as(RUNNING_AS_ROOT);
  
-     dbrename(config, DBG_SUBDIR_CLIENT);
+     dbrename(config_name, DBG_SUBDIR_CLIENT);
  
-     report_bad_conf_arg();
+     our_features = am_init_feature_set();
+     our_features_string = am_feature_to_string(our_features);
  
      server_name = NULL;
      if (getconf_seen(CNF_INDEX_SERVER) == -2) { /* command line argument */
      if (!server_name) {
        server_name = getenv("AMANDA_SERVER");
        if (server_name) {
-           printf("Using index server from environment AMANDA_SERVER (%s)\n", server_name);
+           g_printf(_("Using index server from environment AMANDA_SERVER (%s)\n"), server_name);
        }
      }
      if (!server_name) {
        server_name = getconf_str(CNF_INDEX_SERVER);
      }
      if (!server_name) {
-       error("No index server set");
+       error(_("No index server set"));
        /*NOTREACHED*/
      }
      server_name = stralloc(server_name);
        if (!tape_server_name) {
            tape_server_name = getenv("AMANDA_TAPESERVER");
            if (tape_server_name) {
-               printf("Using tape server from environment AMANDA_TAPESERVER (%s)\n", tape_server_name);
+               g_printf(_("Using tape server from environment AMANDA_TAPESERVER (%s)\n"), tape_server_name);
            }
        } else {
-           printf("Using tape server from environment AMANDA_TAPE_SERVER (%s)\n", tape_server_name);
+           g_printf(_("Using tape server from environment AMANDA_TAPE_SERVER (%s)\n"), tape_server_name);
        }
      }
      if (!tape_server_name) {
        tape_server_name = getconf_str(CNF_TAPE_SERVER);
      }
      if (!tape_server_name) {
-       error("No tape server set");
+       error(_("No tape server set"));
        /*NOTREACHED*/
      }
      tape_server_name = stralloc(tape_server_name);
  
      amfree(tape_device_name);
      tape_device_name = getconf_str(CNF_TAPEDEV);
-     if (tape_device_name)
+     if (!tape_device_name ||
+       strlen(tape_device_name) == 0 ||
+       !getconf_seen(CNF_TAPEDEV)) {
+       tape_device_name = NULL;
+     } else {
        tape_device_name = stralloc(tape_device_name);
+     }
  
      authopt = stralloc(getconf_str(CNF_AUTH));
  
      sigemptyset(&act.sa_mask);
      act.sa_flags = 0;
      if (sigaction(SIGINT, &act, &oact) != 0) {
-       error("error setting signal handler: %s", strerror(errno));
+       error(_("error setting signal handler: %s"), strerror(errno));
        /*NOTREACHED*/
      }
  
      /* We assume that amindexd support fe_amindexd_options_features */
      /*                             and fe_amindexd_options_auth     */
      /* We should send a noop to really know                         */
-     req = vstralloc("SERVICE amindexd\n",
-                   "OPTIONS ", "features=", our_features_string, ";",
-                               "auth=", authopt, ";",
-                   "\n", NULL);
+     req = vstrallocf("SERVICE amindexd\n"
+                   "OPTIONS features=%s;auth=%s;\n",
+                   our_features_string, authopt);
  
      secdrv = security_getdriver(authopt);
      if (secdrv == NULL) {
-       error("no '%s' security driver available for host '%s'",
+       error(_("no '%s' security driver available for host '%s'"),
            authopt, server_name);
        /*NOTREACHED*/
      }
      amfree(req);
      protocol_run();
  
-     printf("AMRECOVER Version %s. Contacting server on %s ...\n",
+     g_printf(_("AMRECOVER Version %s. Contacting server on %s ...\n"),
           version(), server_name);
  
      if(response_error != 0) {
-       fprintf(stderr,"%s\n",errstr);
+       g_fprintf(stderr,"%s\n",errstr);
        exit(1);
      }
  
 +#if 0
 +    /*
 +     * We may need root privilege again later for a reserved port to
 +     * the tape server, so we will drop down now but might have to
 +     * come back later.
 +     */
 +    setegid(getgid());
 +    seteuid(getuid());
 +#endif
 +
      /* get server's banner */
      if (grab_reply(1) == -1) {
          aclose(server_socket);
      {
        char *their_feature_string = NULL;
  
-       line = stralloc2("FEATURES ", our_features_string);
+       line = vstrallocf("FEATURES %s", our_features_string);
        if(exchange(line) == 0) {
            their_feature_string = stralloc(server_line+13);
            indexsrv_features = am_string_to_feature(their_feature_string);
      if (tm) 
        strftime(dump_date, sizeof(dump_date), "%Y-%m-%d", tm);
      else
-       error("BAD DATE");
+       error(_("BAD DATE"));
  
-     printf("Setting restore date to today (%s)\n", dump_date);
-     line = stralloc2("DATE ", dump_date);
+     g_printf(_("Setting restore date to today (%s)\n"), dump_date);
+     line = vstrallocf("DATE %s", dump_date);
      if (converse(line) == -1) {
          aclose(server_socket);
        exit(1);
      }
      amfree(line);
  
-     line = stralloc2("SCNF ", config);
+     line = vstrallocf("SCNF %s", config_name);
      if (converse(line) == -1) {
          aclose(server_socket);
        exit(1);
        amfree(dump_hostname);
        set_host(localhost);
        if (dump_hostname)
-           printf("Use the setdisk command to choose dump disk to recover\n");
+           g_printf(_("Use the setdisk command to choose dump disk to recover\n"));
        else
-           printf("Use the sethost command to choose a host to recover\n");
+           g_printf(_("Use the sethost command to choose a host to recover\n"));
  
      }
  
        if (lineread[0] != '\0') 
        {
            add_history(lineread);
+           dbprintf(_("user command: '%s'\n"), lineread);
            process_line(lineread);     /* act on line's content */
        }
        amfree(lineread);
@@@ -625,15 -608,15 +626,15 @@@ amindexd_response
      assert(sech != NULL);
  
      if (pkt == NULL) {
-       errstr = newvstralloc(errstr, "[request failed: ",
-                            security_geterror(sech), "]", NULL);
+       errstr = newvstrallocf(errstr, _("[request failed: %s]"),
+                            security_geterror(sech));
        *response_error = 1;
        return;
      }
  
      if (pkt->type == P_NAK) {
  #if defined(PACKET_DEBUG)
-       fprintf(stderr, "got nak response:\n----\n%s\n----\n\n", pkt->body);
+       dbprintf(_("got nak response:\n----\n%s\n----\n\n"), pkt->body);
  #endif
  
        tok = strtok(pkt->body, " ");
  
        tok = strtok(NULL, "\n");
        if (tok != NULL) {
-           errstr = newvstralloc(errstr, "NAK: ", tok, NULL);
+           errstr = newvstrallocf(errstr, "NAK: %s", tok);
            *response_error = 1;
        } else {
  bad_nak:
-           errstr = newstralloc(errstr, "request NAK");
+           errstr = newvstrallocf(errstr, _("request NAK"));
            *response_error = 2;
        }
        return;
      }
  
      if (pkt->type != P_REP) {
-       errstr = newvstralloc(errstr, "received strange packet type ",
-                             pkt_type2str(pkt->type), ": ", pkt->body, NULL);
+       errstr = newvstrallocf(errstr, _("received strange packet type %s: %s"),
+                             pkt_type2str(pkt->type), pkt->body);
        *response_error = 1;
        return;
      }
  
  #if defined(PACKET_DEBUG)
-     fprintf(stderr, "got response:\n----\n%s\n----\n\n", pkt->body);
+     g_fprintf(stderr, _("got response:\n----\n%s\n----\n\n"), pkt->body);
  #endif
  
      for(i = 0; i < NSTREAMS; i++) {
         */
        if (strcmp(tok, "ERROR") == 0) {
            tok = strtok(NULL, "\n");
-           if (tok == NULL)
-               tok = "[bogus error packet]";
-           errstr = newstralloc(errstr, tok);
+           if (tok == NULL) {
+               errstr = newvstrallocf(errstr, _("[bogus error packet]"));
+           } else {
+               errstr = newvstrallocf(errstr, "%s", tok);
+           }
            *response_error = 2;
            return;
        }
            for (i = 0; i < NSTREAMS; i++) {
                tok = strtok(NULL, " ");
                if (tok == NULL || strcmp(tok, streams[i].name) != 0) {
-                   extra = vstralloc("CONNECT token is \"",
-                                     tok ? tok : "(null)",
-                                     "\": expected \"",
-                                     streams[i].name,
-                                     "\"",
-                                     NULL);
+                   extra = vstrallocf(
+                          _("CONNECT token is \"%s\": expected \"%s\""),
+                          tok ? tok : _("(null)"), streams[i].name);
                    goto parse_error;
                }
                tok = strtok(NULL, " \n");
                if (tok == NULL || sscanf(tok, "%d", &ports[i]) != 1) {
-                   extra = vstralloc("CONNECT ",
-                                     streams[i].name,
-                                     " token is \"",
-                                     tok ? tok : "(null)",
-                                     "\": expected a port number",
-                                     NULL);
+                   extra = vstrallocf(
+                          _("CONNECT %s token is \"%s\" expected a port number"),
+                          streams[i].name, tok ? tok : _("(null)"));
                    goto parse_error;
                }
            }
        if (strcmp(tok, "OPTIONS") == 0) {
            tok = strtok(NULL, "\n");
            if (tok == NULL) {
-               extra = stralloc("OPTIONS token is missing");
+               extra = vstrallocf(_("OPTIONS token is missing"));
                goto parse_error;
            }
- /*
+ #if 0
            tok_end = tok + strlen(tok);
            while((p = strchr(tok, ';')) != NULL) {
                *p++ = '\0';
                    tok += SIZEOF("features=") - 1;
                    am_release_feature_set(their_features);
                    if((their_features = am_string_to_feature(tok)) == NULL) {
-                       errstr = newvstralloc(errstr,
-                                             "OPTIONS: bad features value: ",
-                                             tok,
-                                             NULL);
+                       errstr = newvstrallocf(errstr,
+                                     _("OPTIONS: bad features value: %s"),
+                                     tok);
                        goto parse_error;
                    }
                }
                tok = p;
            }
- */
+ #endif
            continue;
        }
- /*
-       extra = vstralloc("next token is \"",
-                         tok ? tok : "(null)",
-                         "\": expected \"CONNECT\", \"ERROR\" or \"OPTIONS\"",
-                         NULL);
+ #if 0
+       extra = vstrallocf(_("next token is \"%s\": expected \"CONNECT\", \"ERROR\" or \"OPTIONS\""), tok ? tok : _("(null)"));
        goto parse_error;
- */
+ #endif
      }
  
      /*
            continue;
        streams[i].fd = security_stream_client(sech, ports[i]);
        if (streams[i].fd == NULL) {
-           errstr = newvstralloc(errstr,
-                       "[could not connect ", streams[i].name, " stream: ",
-                       security_geterror(sech), "]", NULL);
+           errstr = newvstrallocf(errstr,
+                       _("[could not connect %s stream: %s]"),
+                       streams[i].name, security_geterror(sech));
            goto connect_error;
        }
      }
        if (streams[i].fd == NULL)
            continue;
        if (security_stream_auth(streams[i].fd) < 0) {
-           errstr = newvstralloc(errstr,
-               "[could not authenticate ", streams[i].name, " stream: ",
-               security_stream_geterror(streams[i].fd), "]", NULL);
+           errstr = newvstrallocf(errstr,
+               _("[could not authenticate %s stream: %s]"),
+               streams[i].name, security_stream_geterror(streams[i].fd));
            goto connect_error;
        }
      }
       * them, complain.
       */
      if (streams[MESGFD].fd == NULL) {
-         errstr = newstralloc(errstr, "[couldn't open MESG streams]");
+         errstr = newvstrallocf(errstr, _("[couldn't open MESG streams]"));
          goto connect_error;
      }
  
      return;
  
  parse_error:
-     errstr = newvstralloc(errstr,
-                         "[parse of reply message failed: ",
-                         extra ? extra : "(no additional information)",
-                         "]",
-                         NULL);
+     errstr = newvstrallocf(errstr,
+                         _("[parse of reply message failed: %s]"),
+                         extra ? extra : _("(no additional information)"));
      amfree(extra);
      *response_error = 2;
      return;
diff --combined recover-src/uscan.c
index 2b8045f27984aff86abdbc6f08ea0e0f2eda7e11,49a3a3c07776685aafe0e55b302b209200bcd7bc..07965aff177751e0be14bab87081c4839958d025
@@@ -1,31 -1,92 +1,92 @@@
- /* A lexical scanner generated by flex*/
  
- /* Scanner skeleton version:
-  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
-  */
+ #line 3 "uscan.c"
+ #define  YY_INT_ALIGNED short int
+ /* A lexical scanner generated by flex */
  
  #define FLEX_SCANNER
  #define YY_FLEX_MAJOR_VERSION 2
  #define YY_FLEX_MINOR_VERSION 5
+ #define YY_FLEX_SUBMINOR_VERSION 33
+ #if YY_FLEX_SUBMINOR_VERSION > 0
+ #define FLEX_BETA
+ #endif
  
+ /* First, we deal with  platform-specific or compiler-specific issues. */
+ /* begin standard C headers. */
  #include <stdio.h>
- #include <unistd.h>
+ #include <string.h>
+ #include <errno.h>
+ #include <stdlib.h>
  
+ /* end standard C headers. */
  
- /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
- #ifdef c_plusplus
- #ifndef __cplusplus
- #define __cplusplus
- #endif
+ /* flex integer type definitions */
+ #ifndef FLEXINT_H
+ #define FLEXINT_H
+ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+ #if __STDC_VERSION__ >= 199901L
+ /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+  * if you want the limit (max/min) macros for int types. 
+  */
+ #ifndef __STDC_LIMIT_MACROS
+ #define __STDC_LIMIT_MACROS 1
  #endif
  
+ #include <inttypes.h>
+ typedef int8_t flex_int8_t;
+ typedef uint8_t flex_uint8_t;
+ typedef int16_t flex_int16_t;
+ typedef uint16_t flex_uint16_t;
+ typedef int32_t flex_int32_t;
+ typedef uint32_t flex_uint32_t;
+ #else
+ typedef signed char flex_int8_t;
+ typedef short int flex_int16_t;
+ typedef int flex_int32_t;
+ typedef unsigned char flex_uint8_t; 
+ typedef unsigned short int flex_uint16_t;
+ typedef unsigned int flex_uint32_t;
+ #endif /* ! C99 */
  
- #ifdef __cplusplus
+ /* Limits of integral types. */
+ #ifndef INT8_MIN
+ #define INT8_MIN               (-128)
+ #endif
+ #ifndef INT16_MIN
+ #define INT16_MIN              (-32767-1)
+ #endif
+ #ifndef INT32_MIN
+ #define INT32_MIN              (-2147483647-1)
+ #endif
+ #ifndef INT8_MAX
+ #define INT8_MAX               (127)
+ #endif
+ #ifndef INT16_MAX
+ #define INT16_MAX              (32767)
+ #endif
+ #ifndef INT32_MAX
+ #define INT32_MAX              (2147483647)
+ #endif
+ #ifndef UINT8_MAX
+ #define UINT8_MAX              (255U)
+ #endif
+ #ifndef UINT16_MAX
+ #define UINT16_MAX             (65535U)
+ #endif
+ #ifndef UINT32_MAX
+ #define UINT32_MAX             (4294967295U)
+ #endif
  
- #include <stdlib.h>
+ #endif /* ! FLEXINT_H */
  
- /* Use prototypes in function declarations. */
- #define YY_USE_PROTOS
+ #ifdef __cplusplus
  
  /* The "const" storage-class-modifier is valid. */
  #define YY_USE_CONST
  
  #if __STDC__
  
- #define YY_USE_PROTOS
  #define YY_USE_CONST
  
  #endif        /* __STDC__ */
  #endif        /* ! __cplusplus */
  
- #ifdef __TURBOC__
-  #pragma warn -rch
-  #pragma warn -use
- #include <io.h>
- #include <stdlib.h>
- #define YY_USE_CONST
- #define YY_USE_PROTOS
- #endif
  #ifdef YY_USE_CONST
  #define yyconst const
  #else
  #define yyconst
  #endif
  
- #ifdef YY_USE_PROTOS
- #define YY_PROTO(proto) proto
- #else
- #define YY_PROTO(proto) ()
- #endif
  /* Returned upon end-of-file. */
  #define YY_NULL 0
  
   * but we do it the disgusting crufty way forced on us by the ()-less
   * definition of BEGIN.
   */
- #define BEGIN yy_start = 1 + 2 *
+ #define BEGIN (yy_start) = 1 + 2 *
  
  /* Translate the current start state into a value that can be later handed
   * to BEGIN to return to the state.  The YYSTATE alias is for lex
   * compatibility.
   */
- #define YY_START ((yy_start - 1) / 2)
+ #define YY_START (((yy_start) - 1) / 2)
  #define YYSTATE YY_START
  
  /* Action number for EOF rule of a given start state. */
  #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  
  /* Special action meaning "start processing a new file". */
- #define YY_NEW_FILE yyrestart( yyin )
+ #define YY_NEW_FILE yyrestart(yyin  )
  
  #define YY_END_OF_BUFFER_CHAR 0
  
  /* Size of default input buffer. */
+ #ifndef YY_BUF_SIZE
  #define YY_BUF_SIZE 16384
+ #endif
+ /* The state buf must be large enough to hold one state per character in the main buffer.
+  */
+ #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  
+ #ifndef YY_TYPEDEF_YY_BUFFER_STATE
+ #define YY_TYPEDEF_YY_BUFFER_STATE
  typedef struct yy_buffer_state *YY_BUFFER_STATE;
+ #endif
  
  extern int yyleng;
  extern FILE *yyin, *yyout;
  
  #define EOB_ACT_CONTINUE_SCAN 0
  #define EOB_ACT_END_OF_FILE 1
  #define EOB_ACT_LAST_MATCH 2
  
- /* The funky do-while in the following #define is used to turn the definition
-  * int a single C statement (which needs a semi-colon terminator).  This
-  * avoids problems with code like:
-  *
-  *    if ( condition_holds )
-  *            yyless( 5 );
-  *    else
-  *            do_something_else();
-  *
-  * Prior to using the do-while the compiler would get upset at the
-  * "else" because it interpreted the "if" statement as being all
-  * done when it reached the ';' after the yyless() call.
-  */
- /* Return all but the first 'n' matched characters back to the input stream. */
+     #define YY_LESS_LINENO(n)
+     
+ /* Return all but the first "n" matched characters back to the input stream. */
  #define yyless(n) \
        do \
                { \
                /* Undo effects of setting up yytext. */ \
-               *yy_cp = yy_hold_char; \
+         int yyless_macro_arg = (n); \
+         YY_LESS_LINENO(yyless_macro_arg);\
+               *yy_cp = (yy_hold_char); \
                YY_RESTORE_YY_MORE_OFFSET \
-               yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+               (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
                YY_DO_BEFORE_ACTION; /* set up yytext again */ \
                } \
        while ( 0 )
  
- #define unput(c) yyunput( c, yytext_ptr )
- /* Some routines like yy_flex_realloc() are emitted as static but are
-    not called by all lexers. This generates warnings in some compilers,
-    notably GCC. Arrange to suppress these. */
- #ifdef __GNUC__
- #define YY_MAY_BE_UNUSED __attribute__((unused))
- #else
- #define YY_MAY_BE_UNUSED
- #endif
+ #define unput(c) yyunput( c, (yytext_ptr)  )
  
  /* The following is because we cannot portably get our hands on size_t
   * (without autoconf's help, which isn't available because we want
   * flex-generated scanners to compile on their own).
   */
- typedef unsigned int yy_size_t;
  
+ #ifndef YY_TYPEDEF_YY_SIZE_T
+ #define YY_TYPEDEF_YY_SIZE_T
+ typedef unsigned int yy_size_t;
+ #endif
  
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
+ #define YY_STRUCT_YY_BUFFER_STATE
  struct yy_buffer_state
        {
        FILE *yy_input_file;
         */
        int yy_at_bol;
  
+     int yy_bs_lineno; /**< The line count. */
+     int yy_bs_column; /**< The column count. */
+     
        /* Whether to try to fill the input buffer when we reach the
         * end of it.
         */
        int yy_fill_buffer;
  
        int yy_buffer_status;
  #define YY_BUFFER_NEW 0
  #define YY_BUFFER_NORMAL 1
        /* When an EOF's been seen but there's still some text to process
         * just pointing yyin at a new input file.
         */
  #define YY_BUFFER_EOF_PENDING 2
        };
+ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  
- static YY_BUFFER_STATE yy_current_buffer = 0;
+ /* Stack of input buffers. */
+ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
  
  /* We provide macros for accessing buffer states in case in the
   * future we want to put the buffer states in a more general
   * "scanner state".
+  *
+  * Returns the top of the stack, or NULL.
   */
- #define YY_CURRENT_BUFFER yy_current_buffer
+ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+                           : NULL)
  
+ /* Same as previous macro, but useful when we know that the buffer stack is not
+  * NULL or when we need an lvalue. For internal use only.
+  */
+ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
  
  /* yy_hold_char holds the character lost when yytext is formed. */
  static char yy_hold_char;
  static int yy_n_chars;                /* number of characters read into yy_ch_buf */
  int yyleng;
  
  /* Points to current character in buffer. */
  static char *yy_c_buf_p = (char *) 0;
- static int yy_init = 1;               /* whether we need to initialize */
+ static int yy_init = 0;               /* whether we need to initialize */
  static int yy_start = 0;      /* start state number */
  
  /* Flag which is used to allow yywrap()'s to do buffer switches
   */
  static int yy_did_buffer_switch_on_eof;
  
- void yyrestart YY_PROTO(( FILE *input_file ));
+ void yyrestart (FILE *input_file  );
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+ YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
+ void yy_delete_buffer (YY_BUFFER_STATE b  );
+ void yy_flush_buffer (YY_BUFFER_STATE b  );
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
+ void yypop_buffer_state (void );
+ static void yyensure_buffer_stack (void );
+ static void yy_load_buffer_state (void );
+ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
  
- void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
- void yy_load_buffer_state YY_PROTO(( void ));
- YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
- void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
- void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
- void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
- #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+ #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
  
- YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
- YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
- YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
+ YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
  
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
static void yy_flex_free YY_PROTO(( void * ));
void *yyalloc (yy_size_t  );
void *yyrealloc (void *,yy_size_t  );
void yyfree (void *  );
  
  #define yy_new_buffer yy_create_buffer
  
  #define yy_set_interactive(is_interactive) \
        { \
-       if ( ! yy_current_buffer ) \
-               yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-       yy_current_buffer->yy_is_interactive = is_interactive; \
+       if ( ! YY_CURRENT_BUFFER ){ \
+         yyensure_buffer_stack (); \
+               YY_CURRENT_BUFFER_LVALUE =    \
+             yy_create_buffer(yyin,YY_BUF_SIZE ); \
+       } \
+       YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
        }
  
  #define yy_set_bol(at_bol) \
        { \
-       if ( ! yy_current_buffer ) \
-               yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-       yy_current_buffer->yy_at_bol = at_bol; \
+       if ( ! YY_CURRENT_BUFFER ){\
+         yyensure_buffer_stack (); \
+               YY_CURRENT_BUFFER_LVALUE =    \
+             yy_create_buffer(yyin,YY_BUF_SIZE ); \
+       } \
+       YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
        }
  
- #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+ #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+ /* Begin user sect3 */
  
  typedef unsigned char YY_CHAR;
  FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  typedef int yy_state_type;
+ extern int yylineno;
+ int yylineno = 1;
  extern char *yytext;
  #define yytext_ptr yytext
  
- static yy_state_type yy_get_previous_state YY_PROTO(( void ));
- static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
- static int yy_get_next_buffer YY_PROTO(( void ));
- static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+ static yy_state_type yy_get_previous_state (void );
+ static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
+ static int yy_get_next_buffer (void );
+ static void yy_fatal_error (yyconst char msg[]  );
  
  /* Done after the current pattern has been matched and before the
   * corresponding action - sets up yytext.
   */
  #define YY_DO_BEFORE_ACTION \
-       yytext_ptr = yy_bp; \
-       yyleng = (int) (yy_cp - yy_bp); \
-       yy_hold_char = *yy_cp; \
+       (yytext_ptr) = yy_bp; \
+       yyleng = (size_t) (yy_cp - yy_bp); \
+       (yy_hold_char) = *yy_cp; \
        *yy_cp = '\0'; \
-       yy_c_buf_p = yy_cp;
+       (yy_c_buf_p) = yy_cp;
  
- #define YY_NUM_RULES 40
- #define YY_END_OF_BUFFER 41
- static yyconst short int yy_accept[131] =
+ #define YY_NUM_RULES 42
+ #define YY_END_OF_BUFFER 43
+ /* This struct is not used in this scanner,
+    but its presence is necessary. */
+ struct yy_trans_info
+       {
+       flex_int32_t yy_verify;
+       flex_int32_t yy_nxt;
+       };
+ static yyconst flex_int16_t yy_accept[137] =
      {   0,
-         0,    0,    0,    0,   41,   40,   39,   38,   34,   38,
-        38,   22,   38,   38,   38,   38,   38,   38,   38,   38,
-        38,   38,   38,   35,   37,   40,   39,   38,   38,   38,
-        38,   38,    8,   38,   38,   38,   38,   38,   38,   38,
-        38,   13,   38,   38,   38,   38,   38,   38,   35,   36,
-        38,   38,   38,   14,    9,   38,   38,   38,   38,   38,
-        38,   23,   38,   38,   38,   19,   38,   38,   26,   27,
-        29,   38,   38,   15,   38,   38,   11,   38,   21,   38,
-        16,   24,   28,   10,   38,   38,   38,   38,   30,   31,
-        20,   38,   38,   38,   38,   38,   38,   38,   38,   38,
-        38,   38,   17,   38,   38,   38,   38,   38,   38,   38,
-        38,   38,   38,   18,   25,   12,   38,   38,    5,    4,
-         3,    6,    7,   38,    2,    1,   33,   38,   32,    0
+         0,    0,    0,    0,   43,   42,   41,   40,   36,   40,
+        40,   24,   40,   40,   40,   40,   40,   40,   40,   40,
+        40,   40,   40,   37,   39,   42,   41,   40,   40,    9,
+        40,   40,   40,   10,   40,   40,   40,   40,   40,   40,
+        40,   40,   15,   40,   40,   40,   40,   40,   40,   37,
+        38,   40,   40,   40,   16,   11,   40,   40,   40,   40,
+        40,   40,   25,   40,   40,   40,   21,   40,   40,   28,
+        29,   31,   40,   40,   17,   40,   40,   13,   40,   23,
+        40,   18,   26,   30,   12,   40,   40,   40,   40,   32,
+        33,   22,   40,   40,   40,   40,   40,   40,   40,   40,
+        40,   40,   40,   40,   19,   40,   40,   40,   40,   40,
+        40,   40,   40,   40,   40,   40,   20,   27,   14,   40,
+        40,    5,   40,    4,    3,    6,    7,   40,    2,    1,
+        40,   35,    8,   40,   34,    0
      } ;
  
- static yyconst int yy_ec[256] =
+ static yyconst flex_int32_t yy_ec[256] =
      {   0,
          1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
          2,    2,    2,    1,    1,    1,    1,    1,    1,    1,
          4,    9,    4,    4,    4,    4,   10,   11,   12,   13,
  
         14,    4,    4,   15,   16,    4,   17,   18,   19,    4,
-        20,   21,   22,   23,   24,   25,   26,    4,   27,   28,
-        29,    4,    4,    4,    4,    4,    1,    4,    4,    4,
+        20,   21,   22,   23,   24,   25,   26,   27,   28,   29,
+        30,    4,    4,    4,    4,    4,    1,    4,    4,    4,
          4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
          4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
          4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
          4,    4,    4,    4,    4
      } ;
  
- static yyconst int yy_meta[30] =
+ static yyconst flex_int32_t yy_meta[31] =
      {   0,
          1,    1,    2,    3,    4,    3,    3,    3,    5,    3,
          3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-         3,    3,    3,    3,    3,    3,    3,    3,    3
+         3,    3,    3,    3,    3,    3,    3,    3,    3,    3
      } ;
  
- static yyconst short int yy_base[135] =
+ static yyconst flex_int16_t yy_base[141] =
      {   0,
-         0,    0,   25,   26,  161,  162,   30,    0,  162,  154,
-        30,    0,  146,   25,  144,  129,   25,   28,  136,  128,
-       128,   28,  143,    0,  162,    0,   43,    0,   44,  145,
-        47,  138,  122,  135,  130,   32,  129,  122,  132,  120,
-       116,    0,  129,  128,  124,  114,  127,  114,    0,  162,
-       129,   49,   52,  107,    0,  124,  119,  107,  108,  109,
-       104,    0,  103,  114,  112,    0,  100,   47,    0,    0,
-       117,  116,  115,    0,   98,   95,    0,  109,    0,   98,
-        48,    0,    0,    0,   54,   97,   96,  105,  107,   61,
-         0,   99,  100,   88,   94,   89,   83,   83,   82,   92,
-        83,   96,   74,   76,   71,   75,   74,   83,   79,   70,
-        80,   79,   67,    0,    0,    0,   72,   58,    0,    0,
-         0,    0,    0,   64,    0,    0,   69,   62,   58,  162,
-        76,   79,   84,   87
+         0,    0,   26,   27,  168,  169,   31,    0,  169,   31,
+        32,    0,  154,   27,  152,  136,   27,   32,  144,  135,
+       136,   28,  151,    0,  169,    0,   47,    0,   45,    0,
+       153,   48,  146,  129,  143,  138,   41,  137,  130,  140,
+       128,  123,    0,  137,  136,  132,  122,  135,  122,    0,
+       169,  137,   52,   54,  114,    0,  132,  127,  115,  116,
+       117,  112,    0,  111,  122,  120,    0,  108,   49,    0,
+         0,  125,  124,  123,    0,  106,  103,    0,  117,    0,
+       106,   50,    0,    0,    0,   57,  105,  104,  113,  115,
+        63,    0,  107,  108,   96,  102,   97,   91,   88,   90,
+        89,   99,   90,  103,   80,   83,   77,   82,   81,   90,
+        87,   85,   76,   86,   85,   69,    0,    0,    0,   81,
+        72,    0,   84,    0,    0,    0,    0,   88,    0,    0,
+        77,   71,    0,   78,   65,  169,   78,   81,   86,   89
      } ;
  
- static yyconst short int yy_def[135] =
+ static yyconst flex_int16_t yy_def[141] =
      {   0,
-       130,    1,  131,  131,  130,  130,  130,  132,  130,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
-       132,  132,  132,  133,  130,  134,  130,  132,  132,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  133,  130,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
-       132,  132,  132,  132,  132,  132,  132,  132,  132,    0,
-       130,  130,  130,  130
+       136,    1,  137,  137,  136,  136,  136,  138,  136,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  139,  136,  140,  136,  138,  138,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  139,
+       136,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  138,  138,  138,  138,  138,  138,  138,
+       138,  138,  138,  138,  138,    0,  136,  136,  136,  136
      } ;
  
- static yyconst short int yy_nxt[192] =
+ static yyconst flex_int16_t yy_nxt[200] =
      {   0,
          6,    7,    7,    8,    9,   10,   11,   12,    8,   13,
          8,   14,   15,   16,   17,    8,    8,   18,   19,    8,
-        20,   21,    8,   22,   23,    8,    8,    8,    8,   25,
-        25,   27,   27,   26,   26,   30,   31,   33,   37,   39,
-        38,   46,   34,   40,   27,   27,   47,   58,   41,   51,
-        52,   42,   30,   31,   72,   52,   59,   73,   53,   85,
-        95,   86,   96,   97,  129,   87,  102,   90,  129,   98,
-       127,   88,  124,  113,  128,  127,   24,   24,   24,   24,
-        24,   28,  126,   28,   49,   49,   49,   50,  125,   50,
-        50,   50,  123,  122,  121,  120,  119,  118,  117,  116,
+        20,   21,    8,   22,   23,    8,    8,    8,    8,    8,
+        25,   25,   27,   27,   26,   26,   29,   31,   32,   34,
+        38,   47,   39,   40,   35,   30,   48,   41,   27,   27,
+        52,   53,   42,   31,   32,   43,   59,   73,   53,   74,
+        54,   86,   96,   87,   97,   60,   98,   88,  104,   91,
+        99,  135,  100,   89,  128,  116,  134,  132,   24,   24,
+        24,   24,   24,   28,  135,   28,   50,   50,   50,   51,
+       133,   51,   51,   51,  132,  131,  130,  129,  127,  126,
+       125,  124,  123,  122,  121,  120,  119,  118,  117,  116,
        115,  114,  113,  112,  111,  110,  109,  108,  107,  106,
-       105,  104,  103,   89,  101,  100,   99,   94,   93,   92,
-        91,   90,   89,   71,   84,   83,   82,   81,   80,   79,
-        78,   77,   76,   75,   74,   71,   70,   69,   68,   67,
-        66,   65,   64,   63,   62,   61,   60,   57,   56,   55,
-        54,   53,   48,   45,   44,   43,   36,   35,   32,   29,
-       130,    5,  130,  130,  130,  130,  130,  130,  130,  130,
-       130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
-       130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
-       130
+       105,   90,  103,  102,  101,   95,   94,   93,   92,   91,
+        90,   72,   85,   84,   83,   82,   81,   80,   79,   78,
+        77,   76,   75,   72,   71,   70,   69,   68,   67,   66,
+        65,   64,   63,   62,   61,   58,   57,   56,   55,   54,
+        49,   46,   45,   44,   37,   36,   33,  136,    5,  136,
+       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
+       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
+       136,  136,  136,  136,  136,  136,  136,  136,  136
  
      } ;
  
- static yyconst short int yy_chk[192] =
+ static yyconst flex_int16_t yy_chk[200] =
      {   0,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-         1,    1,    1,    1,    1,    1,    1,    1,    1,    3,
-         4,    7,    7,    3,    4,   11,   11,   14,   17,   18,
-        17,   22,   14,   18,   27,   27,   22,   36,   18,   29,
-        29,   18,   31,   31,   52,   52,   36,   53,   53,   68,
-        81,   68,   81,   85,  129,   68,   90,   90,  128,   85,
-       124,   68,  113,  113,  127,  127,  131,  131,  131,  131,
-       131,  132,  118,  132,  133,  133,  133,  134,  117,  134,
-       134,  134,  112,  111,  110,  109,  108,  107,  106,  105,
-       104,  103,  102,  101,  100,   99,   98,   97,   96,   95,
-        94,   93,   92,   89,   88,   87,   86,   80,   78,   76,
-        75,   73,   72,   71,   67,   65,   64,   63,   61,   60,
-        59,   58,   57,   56,   54,   51,   48,   47,   46,   45,
-        44,   43,   41,   40,   39,   38,   37,   35,   34,   33,
-        32,   30,   23,   21,   20,   19,   16,   15,   13,   10,
-         5,  130,  130,  130,  130,  130,  130,  130,  130,  130,
-       130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
-       130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
-       130
+         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+         3,    4,    7,    7,    3,    4,   10,   11,   11,   14,
+        17,   22,   17,   18,   14,   10,   22,   18,   27,   27,
+        29,   29,   18,   32,   32,   18,   37,   53,   53,   54,
+        54,   69,   82,   69,   82,   37,   86,   69,   91,   91,
+        86,  135,   86,   69,  116,  116,  132,  132,  137,  137,
+       137,  137,  137,  138,  134,  138,  139,  139,  139,  140,
+       131,  140,  140,  140,  128,  123,  121,  120,  115,  114,
+       113,  112,  111,  110,  109,  108,  107,  106,  105,  104,
+       103,  102,  101,  100,   99,   98,   97,   96,   95,   94,
+        93,   90,   89,   88,   87,   81,   79,   77,   76,   74,
+        73,   72,   68,   66,   65,   64,   62,   61,   60,   59,
+        58,   57,   55,   52,   49,   48,   47,   46,   45,   44,
+        42,   41,   40,   39,   38,   36,   35,   34,   33,   31,
+        23,   21,   20,   19,   16,   15,   13,    5,  136,  136,
+       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
+       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
+       136,  136,  136,  136,  136,  136,  136,  136,  136
  
      } ;
  
  static yy_state_type yy_last_accepting_state;
  static char *yy_last_accepting_cpos;
  
+ extern int yy_flex_debug;
+ int yy_flex_debug = 0;
  /* The intent behind this definition is that it'll catch
   * any uses of REJECT which flex missed.
   */
  #define YY_RESTORE_YY_MORE_OFFSET
  char *yytext;
  #line 1 "uscan.l"
- #define INITIAL 0
  /*
   * amanda, the advanced maryland automatic network disk archiver
   * Copyright (c) 1991-2000 University of Maryland at College Park
@@@ -509,11 -591,56 +591,56 @@@ extern void     yyerror(char *s)
  extern int    yyparse(void);
  static int    ll_parse_date(int type, char *text);
  int           process_line(char *line);
- #define quotedpath 1
  
  #line 62 "uscan.l"
  static char *string_buf = NULL;
- #line 517 "uscan.c"
+ #line 598 "uscan.c"
+ #define INITIAL 0
+ #define quotedpath 1
+ #ifndef YY_NO_UNISTD_H
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
+  * down here because we want the user's section 1 to have been scanned first.
+  * The user has a chance to override it with an option.
+  */
+ #include <unistd.h>
+ #endif
+ #ifndef YY_EXTRA_TYPE
+ #define YY_EXTRA_TYPE void *
+ #endif
+ static int yy_init_globals (void );
+ /* Accessor methods to globals.
+    These are made visible to non-reentrant scanners for convenience. */
+ int yylex_destroy (void );
+ int yyget_debug (void );
+ void yyset_debug (int debug_flag  );
+ YY_EXTRA_TYPE yyget_extra (void );
+ void yyset_extra (YY_EXTRA_TYPE user_defined  );
+ FILE *yyget_in (void );
+ void yyset_in  (FILE * in_str  );
+ FILE *yyget_out (void );
+ void yyset_out  (FILE * out_str  );
+ int yyget_leng (void );
+ char *yyget_text (void );
+ int yyget_lineno (void );
+ void yyset_lineno (int line_number  );
  
  /* Macros after this point can all be overridden by user definitions in
   * section 1.
  
  #ifndef YY_SKIP_YYWRAP
  #ifdef __cplusplus
- extern "C" int yywrap YY_PROTO(( void ));
+ extern "C" int yywrap (void );
  #else
- extern int yywrap YY_PROTO(( void ));
+ extern int yywrap (void );
  #endif
  #endif
  
- #ifndef YY_NO_UNPUT
- static void yyunput YY_PROTO(( int c, char *buf_ptr ));
- #endif
+     static void yyunput (int c,char *buf_ptr  );
+     
  #ifndef yytext_ptr
- static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+ static void yy_flex_strncpy (char *,yyconst char *,int );
  #endif
  
  #ifdef YY_NEED_STRLEN
- static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+ static int yy_flex_strlen (yyconst char * );
  #endif
  
  #ifndef YY_NO_INPUT
- #ifdef __cplusplus
- static int yyinput YY_PROTO(( void ));
- #else
- static int input YY_PROTO(( void ));
- #endif
- #endif
- #if YY_STACK_USED
- static int yy_start_stack_ptr = 0;
- static int yy_start_stack_depth = 0;
- static int *yy_start_stack = 0;
- #ifndef YY_NO_PUSH_STATE
- static void yy_push_state YY_PROTO(( int new_state ));
- #endif
- #ifndef YY_NO_POP_STATE
- static void yy_pop_state YY_PROTO(( void ));
- #endif
- #ifndef YY_NO_TOP_STATE
- static int yy_top_state YY_PROTO(( void ));
- #endif
  
+ #ifdef __cplusplus
+ static int yyinput (void );
  #else
- #define YY_NO_PUSH_STATE 1
- #define YY_NO_POP_STATE 1
- #define YY_NO_TOP_STATE 1
+ static int input (void );
  #endif
  
- #ifdef YY_MALLOC_DECL
- YY_MALLOC_DECL
- #else
- #if __STDC__
- #ifndef __cplusplus
- #include <stdlib.h>
- #endif
- #else
- /* Just try to get by without declaring the routines.  This will fail
-  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
-  * or sizeof(void*) != sizeof(int).
-  */
- #endif
  #endif
  
  /* Amount of stuff to slurp up with each read. */
  #endif
  
  /* Copy whatever the last rule matched to the standard output. */
  #ifndef ECHO
  /* This used to be an fputs(), but since the string might contain NUL's,
   * we now use fwrite().
   */
  #ifndef YY_INPUT
  #define YY_INPUT(buf,result,max_size) \
-       if ( yy_current_buffer->yy_is_interactive ) \
+       if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
-               int c = '*', n; \
+               int c = '*'; \
+               size_t n; \
                for ( n = 0; n < max_size && \
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
                result = n; \
                } \
-       else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
-                 && ferror( yyin ) ) \
-               YY_FATAL_ERROR( "input in flex scanner failed" );
+       else \
+               { \
+               errno=0; \
+               while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+                       { \
+                       if( errno != EINTR) \
+                               { \
+                               YY_FATAL_ERROR( "input in flex scanner failed" ); \
+                               break; \
+                               } \
+                       errno=0; \
+                       clearerr(yyin); \
+                       } \
+               }\
+ \
  #endif
  
  /* No semi-colon after return; correct usage is to write "yyterminate();" -
  #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  #endif
  
+ /* end tables serialization structures and prototypes */
  /* Default declaration of generated scanner - a define so the user can
   * easily add parameters.
   */
  #ifndef YY_DECL
- #define YY_DECL int yylex YY_PROTO(( void ))
- #endif
+ #define YY_DECL_IS_OURS 1
+ extern int yylex (void);
+ #define YY_DECL int yylex (void)
+ #endif /* !YY_DECL */
  
  /* Code executed at the beginning of each rule, after yytext and yyleng
   * have been set up.
  #define YY_RULE_SETUP \
        YY_USER_ACTION
  
+ /** The main scanner function which does all the work.
+  */
  YY_DECL
      {
+ {
        register yy_state_type yy_current_state;
-       register char *yy_cp = NULL, *yy_bp = NULL;
+       register char *yy_cp, *yy_bp;
        register int yy_act;
+     
  #line 65 "uscan.l"
  
  
      /* literal keyword tokens */
  
  
- #line 675 "uscan.c"
+ #line 788 "uscan.c"
  
-       if ( yy_init )
+       if ( !(yy_init) )
                {
-               yy_init = 0;
+               (yy_init) = 1;
  
  #ifdef YY_USER_INIT
                YY_USER_INIT;
  #endif
  
-               if ( ! yy_start )
-                       yy_start = 1;   /* first start state */
+               if ( ! (yy_start) )
+                       (yy_start) = 1; /* first start state */
  
                if ( ! yyin )
                        yyin = stdin;
                if ( ! yyout )
                        yyout = stdout;
  
-               if ( ! yy_current_buffer )
-                       yy_current_buffer =
-                               yy_create_buffer( yyin, YY_BUF_SIZE );
+               if ( ! YY_CURRENT_BUFFER ) {
+                       yyensure_buffer_stack ();
+                       YY_CURRENT_BUFFER_LVALUE =
+                               yy_create_buffer(yyin,YY_BUF_SIZE );
+               }
  
-               yy_load_buffer_state();
+               yy_load_buffer_state( );
                }
  
        while ( 1 )             /* loops until end-of-file is reached */
                {
-               yy_cp = yy_c_buf_p;
+               yy_cp = (yy_c_buf_p);
  
                /* Support of yytext. */
-               *yy_cp = yy_hold_char;
+               *yy_cp = (yy_hold_char);
  
                /* yy_bp points to the position in yy_ch_buf of the start of
                 * the current run.
                 */
                yy_bp = yy_cp;
  
-               yy_current_state = yy_start;
+               yy_current_state = (yy_start);
  yy_match:
                do
                        {
                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
                        if ( yy_accept[yy_current_state] )
                                {
-                               yy_last_accepting_state = yy_current_state;
-                               yy_last_accepting_cpos = yy_cp;
+                               (yy_last_accepting_state) = yy_current_state;
+                               (yy_last_accepting_cpos) = yy_cp;
                                }
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 131 )
+                               if ( yy_current_state >= 137 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
-               while ( yy_base[yy_current_state] != 162 );
+               while ( yy_base[yy_current_state] != 169 );
  
  yy_find_action:
                yy_act = yy_accept[yy_current_state];
                if ( yy_act == 0 )
                        { /* have to back up */
-                       yy_cp = yy_last_accepting_cpos;
-                       yy_current_state = yy_last_accepting_state;
+                       yy_cp = (yy_last_accepting_cpos);
+                       yy_current_state = (yy_last_accepting_state);
                        yy_act = yy_accept[yy_current_state];
                        }
  
                YY_DO_BEFORE_ACTION;
  
  do_action:    /* This label is used only to access EOF actions. */
  
                switch ( yy_act )
        { /* beginning of action switch */
                        case 0: /* must back up */
                        /* undo the effects of YY_DO_BEFORE_ACTION */
-                       *yy_cp = yy_hold_char;
-                       yy_cp = yy_last_accepting_cpos;
-                       yy_current_state = yy_last_accepting_state;
+                       *yy_cp = (yy_hold_char);
+                       yy_cp = (yy_last_accepting_cpos);
+                       yy_current_state = (yy_last_accepting_state);
                        goto yy_find_action;
  
  case 1:
@@@ -792,168 -905,179 +905,182 @@@ YY_RULE_SETU
  case 8:
  YY_RULE_SETUP
  #line 78 "uscan.l"
- { return CD; }
+ { return SETDEVICE; }
        YY_BREAK
  case 9:
  YY_RULE_SETUP
  #line 79 "uscan.l"
- { return CDX; }
+ { return DASH_H; }
        YY_BREAK
  case 10:
  YY_RULE_SETUP
  #line 80 "uscan.l"
- { return QUIT; }
+ { return CD; }
        YY_BREAK
  case 11:
  YY_RULE_SETUP
  #line 81 "uscan.l"
- { return QUIT; }
+ { return CDX; }
        YY_BREAK
  case 12:
  YY_RULE_SETUP
  #line 82 "uscan.l"
- { return DHIST; }
+ { return QUIT; }
        YY_BREAK
  case 13:
  YY_RULE_SETUP
  #line 83 "uscan.l"
- { return LS; }
+ { return QUIT; }
        YY_BREAK
  case 14:
  YY_RULE_SETUP
  #line 84 "uscan.l"
- { return ADD; }
+ { return DHIST; }
        YY_BREAK
  case 15:
  YY_RULE_SETUP
  #line 85 "uscan.l"
- { return ADDX; }
+ { return LS; }
        YY_BREAK
  case 16:
  YY_RULE_SETUP
  #line 86 "uscan.l"
- { return LIST; }
+ { return ADD; }
        YY_BREAK
  case 17:
  YY_RULE_SETUP
  #line 87 "uscan.l"
- { return DELETE; }
+ { return ADDX; }
        YY_BREAK
  case 18:
  YY_RULE_SETUP
  #line 88 "uscan.l"
- { return DELETEX; }
+ { return LIST; }
        YY_BREAK
  case 19:
  YY_RULE_SETUP
  #line 89 "uscan.l"
- { return PWD; }
+ { return DELETE; }
        YY_BREAK
  case 20:
  YY_RULE_SETUP
  #line 90 "uscan.l"
- { return CLEAR; }
+ { return DELETEX; }
        YY_BREAK
  case 21:
  YY_RULE_SETUP
  #line 91 "uscan.l"
- { return HELP; }
+ { return PWD; }
        YY_BREAK
  case 22:
  YY_RULE_SETUP
  #line 92 "uscan.l"
- { return HELP; }
+ { return CLEAR; }
        YY_BREAK
  case 23:
  YY_RULE_SETUP
  #line 93 "uscan.l"
- { return LCD; }
+ { return HELP; }
        YY_BREAK
  case 24:
  YY_RULE_SETUP
  #line 94 "uscan.l"
- { return LPWD; }
+ { return HELP; }
        YY_BREAK
  case 25:
  YY_RULE_SETUP
  #line 95 "uscan.l"
- { return EXTRACT; }
+ { return LCD; }
        YY_BREAK
  case 26:
  YY_RULE_SETUP
  #line 96 "uscan.l"
- { return SMB; }
+ { return LPWD; }
        YY_BREAK
  case 27:
  YY_RULE_SETUP
  #line 97 "uscan.l"
- { return TAR; }
+ { return EXTRACT; }
        YY_BREAK
  case 28:
  YY_RULE_SETUP
  #line 98 "uscan.l"
- { return MODE; }
+ { return SMB; }
        YY_BREAK
 +
 +    /* dates */
 +
  case 29:
  YY_RULE_SETUP
- #line 104 "uscan.l"
- { return ll_parse_date(1, yytext); }
+ #line 99 "uscan.l"
+ { return TAR; }
        YY_BREAK
  case 30:
  YY_RULE_SETUP
- #line 105 "uscan.l"
- { return ll_parse_date(2, yytext); }
+ #line 100 "uscan.l"
+ { return MODE; }
        YY_BREAK
+     /* dates */
  case 31:
  YY_RULE_SETUP
  #line 106 "uscan.l"
- { return ll_parse_date(3, yytext); }
+ { return ll_parse_date(1, yytext); }
        YY_BREAK
  case 32:
  YY_RULE_SETUP
  #line 107 "uscan.l"
- { return ll_parse_date(4, yytext); }
+ { return ll_parse_date(2, yytext); }
        YY_BREAK
  case 33:
  YY_RULE_SETUP
  #line 108 "uscan.l"
+ { return ll_parse_date(3, yytext); }
+       YY_BREAK
+ case 34:
+ YY_RULE_SETUP
+ #line 109 "uscan.l"
+ { return ll_parse_date(4, yytext); }
+       YY_BREAK
+ case 35:
+ YY_RULE_SETUP
+ #line 110 "uscan.l"
  { return ll_parse_date(5, yytext); }
        YY_BREAK
  
      /* quoted file names */
  
- case 34:
+ case 36:
  YY_RULE_SETUP
- #line 114 "uscan.l"
+ #line 116 "uscan.l"
  {
      if(string_buf != NULL) {
-       printf("ERROR:string_buf != NULL: %s\n",string_buf);
+       g_printf("ERROR:string_buf != NULL: %s\n",string_buf);
      }
      BEGIN(quotedpath);
      strappend(string_buf, yytext);
  }
        YY_BREAK
- case 35:
+ case 37:
+ /* rule 37 can match eol */
  YY_RULE_SETUP
- #line 122 "uscan.l"
+ #line 124 "uscan.l"
  {
      strappend(string_buf, yytext);
  }
        YY_BREAK
- case 36:
+ case 38:
  YY_RULE_SETUP
- #line 126 "uscan.l"
+ #line 128 "uscan.l"
  {
      /* escaped character (including quote) */
      strappend(string_buf, yytext);
  }
        YY_BREAK
- case 37:
+ case 39:
  YY_RULE_SETUP
- #line 131 "uscan.l"
+ #line 133 "uscan.l"
  { /* saw closing quote - all done */
      strappend(string_buf, yytext);
      yylval.strval = string_buf;
  
      /* file names */
  
- case 38:
+ case 40:
  YY_RULE_SETUP
- #line 143 "uscan.l"
+ #line 145 "uscan.l"
  {
      yylval.strval = stralloc(yytext);
      return PATH;
  
      /* whitespace */
  
- case 39:
+ case 41:
+ /* rule 41 can match eol */
  YY_RULE_SETUP
- #line 152 "uscan.l"
+ #line 154 "uscan.l"
  ;     /* whitespace */
        YY_BREAK
  
  .     { yyerror("invalid character"); }
  #endif
  
- case 40:
+ case 42:
  YY_RULE_SETUP
- #line 165 "uscan.l"
+ #line 167 "uscan.l"
  ECHO;
        YY_BREAK
- #line 999 "uscan.c"
+ #line 1124 "uscan.c"
  case YY_STATE_EOF(INITIAL):
  case YY_STATE_EOF(quotedpath):
        yyterminate();
        case YY_END_OF_BUFFER:
                {
                /* Amount of text matched not including the EOB char. */
-               int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+               int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
  
                /* Undo the effects of YY_DO_BEFORE_ACTION. */
-               *yy_cp = yy_hold_char;
+               *yy_cp = (yy_hold_char);
                YY_RESTORE_YY_MORE_OFFSET
  
-               if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+               if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
                        {
                        /* We're scanning a new file or input source.  It's
                         * possible that this happened because the user
                         * just pointed yyin at a new source and called
                         * yylex().  If so, then we have to assure
-                        * consistency between yy_current_buffer and our
+                        * consistency between YY_CURRENT_BUFFER and our
                         * globals.  Here is the right place to do so, because
                         * this is the first action (other than possibly a
                         * back-up) that will match for the new input source.
                         */
-                       yy_n_chars = yy_current_buffer->yy_n_chars;
-                       yy_current_buffer->yy_input_file = yyin;
-                       yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+                       (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+                       YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+                       YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
                        }
  
                /* Note that here we test for yy_c_buf_p "<=" to the position
                 * end-of-buffer state).  Contrast this with the test
                 * in input().
                 */
-               if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+               if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
                        { /* This was really a NUL. */
                        yy_state_type yy_next_state;
  
-                       yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+                       (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
  
-                       yy_current_state = yy_get_previous_state();
+                       yy_current_state = yy_get_previous_state(  );
  
                        /* Okay, we're now positioned to make the NUL
                         * transition.  We couldn't have
  
                        yy_next_state = yy_try_NUL_trans( yy_current_state );
  
-                       yy_bp = yytext_ptr + YY_MORE_ADJ;
+                       yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  
                        if ( yy_next_state )
                                {
                                /* Consume the NUL. */
-                               yy_cp = ++yy_c_buf_p;
+                               yy_cp = ++(yy_c_buf_p);
                                yy_current_state = yy_next_state;
                                goto yy_match;
                                }
  
                        else
                                {
-                               yy_cp = yy_c_buf_p;
+                               yy_cp = (yy_c_buf_p);
                                goto yy_find_action;
                                }
                        }
  
-               else switch ( yy_get_next_buffer() )
+               else switch ( yy_get_next_buffer(  ) )
                        {
                        case EOB_ACT_END_OF_FILE:
                                {
-                               yy_did_buffer_switch_on_eof = 0;
+                               (yy_did_buffer_switch_on_eof) = 0;
  
-                               if ( yywrap() )
+                               if ( yywrap( ) )
                                        {
                                        /* Note: because we've taken care in
                                         * yy_get_next_buffer() to have set up
                                         * YY_NULL, it'll still work - another
                                         * YY_NULL will get returned.
                                         */
-                                       yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+                                       (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
  
                                        yy_act = YY_STATE_EOF(YY_START);
                                        goto do_action;
  
                                else
                                        {
-                                       if ( ! yy_did_buffer_switch_on_eof )
+                                       if ( ! (yy_did_buffer_switch_on_eof) )
                                                YY_NEW_FILE;
                                        }
                                break;
                                }
  
                        case EOB_ACT_CONTINUE_SCAN:
-                               yy_c_buf_p =
-                                       yytext_ptr + yy_amount_of_matched_text;
+                               (yy_c_buf_p) =
+                                       (yytext_ptr) + yy_amount_of_matched_text;
  
-                               yy_current_state = yy_get_previous_state();
+                               yy_current_state = yy_get_previous_state(  );
  
-                               yy_cp = yy_c_buf_p;
-                               yy_bp = yytext_ptr + YY_MORE_ADJ;
+                               yy_cp = (yy_c_buf_p);
+                               yy_bp = (yytext_ptr) + YY_MORE_ADJ;
                                goto yy_match;
  
                        case EOB_ACT_LAST_MATCH:
-                               yy_c_buf_p =
-                               &yy_current_buffer->yy_ch_buf[yy_n_chars];
+                               (yy_c_buf_p) =
+                               &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
  
-                               yy_current_state = yy_get_previous_state();
+                               yy_current_state = yy_get_previous_state(  );
  
-                               yy_cp = yy_c_buf_p;
-                               yy_bp = yytext_ptr + YY_MORE_ADJ;
+                               yy_cp = (yy_c_buf_p);
+                               yy_bp = (yytext_ptr) + YY_MORE_ADJ;
                                goto yy_find_action;
                        }
                break;
                        "fatal flex scanner internal error--no action found" );
        } /* end of action switch */
                } /* end of scanning one token */
-       } /* end of yylex */
+ } /* end of yylex */
  
  /* yy_get_next_buffer - try to read in a new buffer
   *
   *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
   *    EOB_ACT_END_OF_FILE - end of file
   */
- static int yy_get_next_buffer()
-       {
-       register char *dest = yy_current_buffer->yy_ch_buf;
-       register char *source = yytext_ptr;
+ static int yy_get_next_buffer (void)
+ {
+       register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+       register char *source = (yytext_ptr);
        register int number_to_move, i;
        int ret_val;
  
-       if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+       if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
                YY_FATAL_ERROR(
                "fatal flex scanner internal error--end of buffer missed" );
  
-       if ( yy_current_buffer->yy_fill_buffer == 0 )
+       if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
                { /* Don't try to fill the buffer, so this is an EOF. */
-               if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+               if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
                        {
                        /* We matched a single character, the EOB, so
                         * treat this as a final EOF.
        /* Try to read more data. */
  
        /* First move last chars to start of buffer. */
-       number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+       number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
  
        for ( i = 0; i < number_to_move; ++i )
                *(dest++) = *(source++);
  
-       if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+       if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
                /* don't do the read, it's not guaranteed to return an EOF,
                 * just force an EOF
                 */
-               yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
  
        else
                {
-               int num_to_read =
-                       yy_current_buffer->yy_buf_size - number_to_move - 1;
+                       int num_to_read =
+                       YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  
                while ( num_to_read <= 0 )
                        { /* Not enough room in the buffer - grow it. */
- #ifdef YY_USES_REJECT
-                       YY_FATAL_ERROR(
- "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
- #else
  
                        /* just a shorter name for the current buffer */
-                       YY_BUFFER_STATE b = yy_current_buffer;
+                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
  
                        int yy_c_buf_p_offset =
-                               (int) (yy_c_buf_p - b->yy_ch_buf);
+                               (int) ((yy_c_buf_p) - b->yy_ch_buf);
  
                        if ( b->yy_is_our_buffer )
                                {
  
                                b->yy_ch_buf = (char *)
                                        /* Include room in for 2 EOB chars. */
-                                       yy_flex_realloc( (void *) b->yy_ch_buf,
-                                                        b->yy_buf_size + 2 );
+                                       yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
                                }
                        else
                                /* Can't grow it, we don't own it. */
                                YY_FATAL_ERROR(
                                "fatal error - scanner input buffer overflow" );
  
-                       yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+                       (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
  
-                       num_to_read = yy_current_buffer->yy_buf_size -
+                       num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
                                                number_to_move - 1;
- #endif
                        }
  
                if ( num_to_read > YY_READ_BUF_SIZE )
                        num_to_read = YY_READ_BUF_SIZE;
  
                /* Read in more data. */
-               YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-                       yy_n_chars, num_to_read );
+               YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+                       (yy_n_chars), num_to_read );
  
-               yy_current_buffer->yy_n_chars = yy_n_chars;
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
                }
  
-       if ( yy_n_chars == 0 )
+       if ( (yy_n_chars) == 0 )
                {
                if ( number_to_move == YY_MORE_ADJ )
                        {
                        ret_val = EOB_ACT_END_OF_FILE;
-                       yyrestart( yyin );
+                       yyrestart(yyin  );
                        }
  
                else
                        {
                        ret_val = EOB_ACT_LAST_MATCH;
-                       yy_current_buffer->yy_buffer_status =
+                       YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
                                YY_BUFFER_EOF_PENDING;
                        }
                }
        else
                ret_val = EOB_ACT_CONTINUE_SCAN;
  
-       yy_n_chars += number_to_move;
-       yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-       yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+       (yy_n_chars) += number_to_move;
+       YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+       YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
  
-       yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+       (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  
        return ret_val;
-       }
+ }
  
  /* yy_get_previous_state - get the state just before the EOB char was reached */
  
static yy_state_type yy_get_previous_state()
      {
    static yy_state_type yy_get_previous_state (void)
+ {
        register yy_state_type yy_current_state;
        register char *yy_cp;
+     
+       yy_current_state = (yy_start);
  
-       yy_current_state = yy_start;
-       for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+       for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
                {
                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
                if ( yy_accept[yy_current_state] )
                        {
-                       yy_last_accepting_state = yy_current_state;
-                       yy_last_accepting_cpos = yy_cp;
+                       (yy_last_accepting_state) = yy_current_state;
+                       (yy_last_accepting_cpos) = yy_cp;
                        }
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 131 )
+                       if ( yy_current_state >= 137 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                }
  
        return yy_current_state;
-       }
+ }
  
  /* yy_try_NUL_trans - try to make a transition on the NUL character
   *
   * synopsis
   *    next_state = yy_try_NUL_trans( current_state );
   */
- #ifdef YY_USE_PROTOS
- static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
- #else
- static yy_state_type yy_try_NUL_trans( yy_current_state )
- yy_state_type yy_current_state;
- #endif
-       {
+     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
+ {
        register int yy_is_jam;
-       register char *yy_cp = yy_c_buf_p;
+       register char *yy_cp = (yy_c_buf_p);
  
        register YY_CHAR yy_c = 1;
        if ( yy_accept[yy_current_state] )
                {
-               yy_last_accepting_state = yy_current_state;
-               yy_last_accepting_cpos = yy_cp;
+               (yy_last_accepting_state) = yy_current_state;
+               (yy_last_accepting_cpos) = yy_cp;
                }
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 131 )
+               if ( yy_current_state >= 137 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-       yy_is_jam = (yy_current_state == 130);
+       yy_is_jam = (yy_current_state == 136);
  
        return yy_is_jam ? 0 : yy_current_state;
-       }
+ }
  
- #ifndef YY_NO_UNPUT
- #ifdef YY_USE_PROTOS
- static void yyunput( int c, register char *yy_bp )
- #else
- static void yyunput( c, yy_bp )
- int c;
- register char *yy_bp;
- #endif
-       {
-       register char *yy_cp = yy_c_buf_p;
+     static void yyunput (int c, register char * yy_bp )
+ {
+       register char *yy_cp;
+     
+     yy_cp = (yy_c_buf_p);
  
        /* undo effects of setting up yytext */
-       *yy_cp = yy_hold_char;
+       *yy_cp = (yy_hold_char);
  
-       if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+       if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
                { /* need to shift things up to make room */
                /* +2 for EOB chars. */
-               register int number_to_move = yy_n_chars + 2;
-               register char *dest = &yy_current_buffer->yy_ch_buf[
-                                       yy_current_buffer->yy_buf_size + 2];
+               register int number_to_move = (yy_n_chars) + 2;
+               register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+                                       YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
                register char *source =
-                               &yy_current_buffer->yy_ch_buf[number_to_move];
+                               &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
  
-               while ( source > yy_current_buffer->yy_ch_buf )
+               while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
                        *--dest = *--source;
  
                yy_cp += (int) (dest - source);
                yy_bp += (int) (dest - source);
-               yy_current_buffer->yy_n_chars =
-                       yy_n_chars = yy_current_buffer->yy_buf_size;
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+                       (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
  
-               if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+               if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
                }
  
        *--yy_cp = (char) c;
  
-       yytext_ptr = yy_bp;
-       yy_hold_char = *yy_cp;
-       yy_c_buf_p = yy_cp;
-       }
- #endif        /* ifndef YY_NO_UNPUT */
+       (yytext_ptr) = yy_bp;
+       (yy_hold_char) = *yy_cp;
+       (yy_c_buf_p) = yy_cp;
+ }
  
  #ifndef YY_NO_INPUT
  #ifdef __cplusplus
static int yyinput()
    static int yyinput (void)
  #else
static int input()
    static int input  (void)
  #endif
-       {
-       int c;
  
-       *yy_c_buf_p = yy_hold_char;
+ {
+       int c;
+     
+       *(yy_c_buf_p) = (yy_hold_char);
  
-       if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+       if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
                {
                /* yy_c_buf_p now points to the character we want to return.
                 * If this occurs *before* the EOB characters, then it's a
                 * valid NUL; if not, then we've hit the end of the buffer.
                 */
-               if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+               if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
                        /* This was really a NUL. */
-                       *yy_c_buf_p = '\0';
+                       *(yy_c_buf_p) = '\0';
  
                else
                        { /* need more input */
-                       int offset = yy_c_buf_p - yytext_ptr;
-                       ++yy_c_buf_p;
+                       int offset = (yy_c_buf_p) - (yytext_ptr);
+                       ++(yy_c_buf_p);
  
-                       switch ( yy_get_next_buffer() )
+                       switch ( yy_get_next_buffer(  ) )
                                {
                                case EOB_ACT_LAST_MATCH:
                                        /* This happens because yy_g_n_b()
                                         */
  
                                        /* Reset buffer status. */
-                                       yyrestart( yyin );
+                                       yyrestart(yyin );
  
-                                       /* fall through */
+                                       /*FALLTHROUGH*/
  
                                case EOB_ACT_END_OF_FILE:
                                        {
-                                       if ( yywrap() )
+                                       if ( yywrap( ) )
                                                return EOF;
  
-                                       if ( ! yy_did_buffer_switch_on_eof )
+                                       if ( ! (yy_did_buffer_switch_on_eof) )
                                                YY_NEW_FILE;
  #ifdef __cplusplus
                                        return yyinput();
                                        }
  
                                case EOB_ACT_CONTINUE_SCAN:
-                                       yy_c_buf_p = yytext_ptr + offset;
+                                       (yy_c_buf_p) = (yytext_ptr) + offset;
                                        break;
                                }
                        }
                }
  
-       c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
-       *yy_c_buf_p = '\0';     /* preserve yytext */
-       yy_hold_char = *++yy_c_buf_p;
+       c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
+       *(yy_c_buf_p) = '\0';   /* preserve yytext */
+       (yy_hold_char) = *++(yy_c_buf_p);
  
        return c;
-       }
- #endif /* YY_NO_INPUT */
- #ifdef YY_USE_PROTOS
- void yyrestart( FILE *input_file )
- #else
- void yyrestart( input_file )
- FILE *input_file;
- #endif
-       {
-       if ( ! yy_current_buffer )
-               yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+ #endif        /* ifndef YY_NO_INPUT */
  
-       yy_init_buffer( yy_current_buffer, input_file );
-       yy_load_buffer_state();
+ /** Immediately switch to a different input stream.
+  * @param input_file A readable stream.
+  * 
+  * @note This function does not reset the start condition to @c INITIAL .
+  */
+     void yyrestart  (FILE * input_file )
+ {
+     
+       if ( ! YY_CURRENT_BUFFER ){
+         yyensure_buffer_stack ();
+               YY_CURRENT_BUFFER_LVALUE =
+             yy_create_buffer(yyin,YY_BUF_SIZE );
        }
  
+       yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+       yy_load_buffer_state( );
+ }
  
- #ifdef YY_USE_PROTOS
- void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
- #else
- void yy_switch_to_buffer( new_buffer )
- YY_BUFFER_STATE new_buffer;
- #endif
-       {
-       if ( yy_current_buffer == new_buffer )
+ /** Switch to a different input buffer.
+  * @param new_buffer The new input buffer.
+  * 
+  */
+     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+ {
+     
+       /* TODO. We should be able to replace this entire function body
+        * with
+        *              yypop_buffer_state();
+        *              yypush_buffer_state(new_buffer);
+      */
+       yyensure_buffer_stack ();
+       if ( YY_CURRENT_BUFFER == new_buffer )
                return;
  
-       if ( yy_current_buffer )
+       if ( YY_CURRENT_BUFFER )
                {
                /* Flush out information for old buffer. */
-               *yy_c_buf_p = yy_hold_char;
-               yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-               yy_current_buffer->yy_n_chars = yy_n_chars;
+               *(yy_c_buf_p) = (yy_hold_char);
+               YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
                }
  
-       yy_current_buffer = new_buffer;
-       yy_load_buffer_state();
+       YY_CURRENT_BUFFER_LVALUE = new_buffer;
+       yy_load_buffer_state( );
  
        /* We don't actually know whether we did this switch during
         * EOF (yywrap()) processing, but the only time this flag
         * is looked at is after yywrap() is called, so it's safe
         * to go ahead and always set it.
         */
-       yy_did_buffer_switch_on_eof = 1;
-       }
- #ifdef YY_USE_PROTOS
- void yy_load_buffer_state( void )
- #else
- void yy_load_buffer_state()
- #endif
-       {
-       yy_n_chars = yy_current_buffer->yy_n_chars;
-       yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-       yyin = yy_current_buffer->yy_input_file;
-       yy_hold_char = *yy_c_buf_p;
-       }
+       (yy_did_buffer_switch_on_eof) = 1;
+ }
  
+ static void yy_load_buffer_state  (void)
+ {
+       (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+       (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+       yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+       (yy_hold_char) = *(yy_c_buf_p);
+ }
  
- #ifdef YY_USE_PROTOS
- YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
- #else
- YY_BUFFER_STATE yy_create_buffer( file, size )
- FILE *file;
- int size;
- #endif
      {
+ /** Allocate and initialize an input buffer state.
+  * @param file A readable stream.
+  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+  * 
+  * @return the allocated buffer state.
+  */
+     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
+ {
        YY_BUFFER_STATE b;
-       b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+     
+       b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
        if ( ! b )
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  
        /* yy_ch_buf has to be 2 characters longer than the size given because
         * we need to put in 2 end-of-buffer characters.
         */
-       b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+       b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
        if ( ! b->yy_ch_buf )
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  
        b->yy_is_our_buffer = 1;
  
-       yy_init_buffer( b, file );
+       yy_init_buffer(b,file );
  
        return b;
-       }
+ }
  
- #ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
- #else
- void yy_delete_buffer( b )
- YY_BUFFER_STATE b;
- #endif
-       {
+ /** Destroy the buffer.
 * @param b a buffer created with yy_create_buffer()
+  * 
+  */
+     void yy_delete_buffer (YY_BUFFER_STATE  b )
+ {
+     
        if ( ! b )
                return;
  
-       if ( b == yy_current_buffer )
-               yy_current_buffer = (YY_BUFFER_STATE) 0;
+       if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+               YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  
        if ( b->yy_is_our_buffer )
-               yy_flex_free( (void *) b->yy_ch_buf );
-       yy_flex_free( (void *) b );
-       }
+               yyfree((void *) b->yy_ch_buf  );
  
+       yyfree((void *) b  );
+ }
  
+ #ifndef __cplusplus
+ extern int isatty (int );
+ #endif /* __cplusplus */
+     
+ /* Initializes or reinitializes a buffer.
+  * This function is sometimes called more than once on the same buffer,
+  * such as during a yyrestart() or at EOF.
+  */
+     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
  
- #ifdef YY_USE_PROTOS
- void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
- #else
- void yy_init_buffer( b, file )
- YY_BUFFER_STATE b;
- FILE *file;
- #endif
-       {
-       yy_flush_buffer( b );
+ {
+       int oerrno = errno;
+     
+       yy_flush_buffer(b );
  
        b->yy_input_file = file;
        b->yy_fill_buffer = 1;
  
- #if YY_ALWAYS_INTERACTIVE
-       b->yy_is_interactive = 1;
- #else
- #if YY_NEVER_INTERACTIVE
-       b->yy_is_interactive = 0;
- #else
-       b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
- #endif
- #endif
-       }
+     /* If b is the current buffer, then yy_init_buffer was _probably_
+      * called from yyrestart() or through yy_get_next_buffer.
+      * In that case, we don't want to reset the lineno or column.
+      */
+     if (b != YY_CURRENT_BUFFER){
+         b->yy_bs_lineno = 1;
+         b->yy_bs_column = 0;
+     }
  
- #ifdef YY_USE_PROTOS
- void yy_flush_buffer( YY_BUFFER_STATE b )
- #else
- void yy_flush_buffer( b )
- YY_BUFFER_STATE b;
- #endif
+         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+     
+       errno = oerrno;
+ }
  
-       {
-       if ( ! b )
+ /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+  * 
+  */
+     void yy_flush_buffer (YY_BUFFER_STATE  b )
+ {
+       if ( ! b )
                return;
  
        b->yy_n_chars = 0;
        b->yy_at_bol = 1;
        b->yy_buffer_status = YY_BUFFER_NEW;
  
-       if ( b == yy_current_buffer )
-               yy_load_buffer_state();
+       if ( b == YY_CURRENT_BUFFER )
+               yy_load_buffer_state( );
+ }
+ /** Pushes the new state onto the stack. The new state becomes
+  *  the current state. This function will allocate the stack
+  *  if necessary.
+  *  @param new_buffer The new state.
+  *  
+  */
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+ {
+       if (new_buffer == NULL)
+               return;
+       yyensure_buffer_stack();
+       /* This block is copied from yy_switch_to_buffer. */
+       if ( YY_CURRENT_BUFFER )
+               {
+               /* Flush out information for old buffer. */
+               *(yy_c_buf_p) = (yy_hold_char);
+               YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+               }
+       /* Only push if top exists. Otherwise, replace top. */
+       if (YY_CURRENT_BUFFER)
+               (yy_buffer_stack_top)++;
+       YY_CURRENT_BUFFER_LVALUE = new_buffer;
+       /* copied from yy_switch_to_buffer. */
+       yy_load_buffer_state( );
+       (yy_did_buffer_switch_on_eof) = 1;
+ }
+ /** Removes and deletes the top of the stack, if present.
+  *  The next element becomes the new top.
+  *  
+  */
+ void yypop_buffer_state (void)
+ {
+       if (!YY_CURRENT_BUFFER)
+               return;
+       yy_delete_buffer(YY_CURRENT_BUFFER );
+       YY_CURRENT_BUFFER_LVALUE = NULL;
+       if ((yy_buffer_stack_top) > 0)
+               --(yy_buffer_stack_top);
+       if (YY_CURRENT_BUFFER) {
+               yy_load_buffer_state( );
+               (yy_did_buffer_switch_on_eof) = 1;
        }
+ }
  
+ /* Allocates the stack if it does not exist.
+  *  Guarantees space for at least one push.
+  */
+ static void yyensure_buffer_stack (void)
+ {
+       int num_to_alloc;
+     
+       if (!(yy_buffer_stack)) {
+               /* First allocation is just for 2 elements, since we don't know if this
+                * scanner will even need a stack. We use 2 instead of 1 to avoid an
+                * immediate realloc on the next call.
+          */
+               num_to_alloc = 1;
+               (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+                                                               (num_to_alloc * sizeof(struct yy_buffer_state*)
+                                                               );
+               
+               memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+                               
+               (yy_buffer_stack_max) = num_to_alloc;
+               (yy_buffer_stack_top) = 0;
+               return;
+       }
  
- #ifndef YY_NO_SCAN_BUFFER
- #ifdef YY_USE_PROTOS
- YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
- #else
- YY_BUFFER_STATE yy_scan_buffer( base, size )
- char *base;
- yy_size_t size;
- #endif
-       {
-       YY_BUFFER_STATE b;
+       if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+               /* Increase the buffer to prepare for a possible push. */
+               int grow_size = 8 /* arbitrary grow size */;
  
+               num_to_alloc = (yy_buffer_stack_max) + grow_size;
+               (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+                                                               ((yy_buffer_stack),
+                                                               num_to_alloc * sizeof(struct yy_buffer_state*)
+                                                               );
+               /* zero only the new slots.*/
+               memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+               (yy_buffer_stack_max) = num_to_alloc;
+       }
+ }
+ /** Setup the input buffer state to scan directly from a user-specified character buffer.
+  * @param base the character buffer
+  * @param size the size in bytes of the character buffer
+  * 
+  * @return the newly allocated buffer state object. 
+  */
+ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
+ {
+       YY_BUFFER_STATE b;
+     
        if ( size < 2 ||
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
             base[size-1] != YY_END_OF_BUFFER_CHAR )
                /* They forgot to leave room for the EOB's. */
                return 0;
  
-       b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+       b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
        if ( ! b )
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  
        b->yy_fill_buffer = 0;
        b->yy_buffer_status = YY_BUFFER_NEW;
  
-       yy_switch_to_buffer( b );
+       yy_switch_to_buffer( );
  
        return b;
-       }
- #endif
- #ifndef YY_NO_SCAN_STRING
- #ifdef YY_USE_PROTOS
- YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
- #else
- YY_BUFFER_STATE yy_scan_string( yy_str )
- yyconst char *yy_str;
- #endif
-       {
-       int len;
-       for ( len = 0; yy_str[len]; ++len )
-               ;
-       return yy_scan_bytes( yy_str, len );
-       }
- #endif
+ }
  
+ /** Setup the input buffer state to scan a string. The next call to yylex() will
+  * scan from a @e copy of @a str.
+  * @param str a NUL-terminated string to scan
+  * 
+  * @return the newly allocated buffer state object.
+  * @note If you want to scan bytes that may contain NUL values, then use
+  *       yy_scan_bytes() instead.
+  */
+ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+ {
+     
+       return yy_scan_bytes(yystr,strlen(yystr) );
+ }
  
- #ifndef YY_NO_SCAN_BYTES
- #ifdef YY_USE_PROTOS
- YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
- #else
- YY_BUFFER_STATE yy_scan_bytes( bytes, len )
- yyconst char *bytes;
- int len;
- #endif
      {
+ /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+  * scan from a @e copy of @a bytes.
+  * @param bytes the byte buffer to scan
+  * @param len the number of bytes in the buffer pointed to by @a bytes.
+  * 
+  * @return the newly allocated buffer state object.
+  */
+ YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
+ {
        YY_BUFFER_STATE b;
        char *buf;
        yy_size_t n;
        int i;
+     
        /* Get memory for full buffer, including space for trailing EOB's. */
-       n = len + 2;
-       buf = (char *) yy_flex_alloc( n );
+       n = _yybytes_len + 2;
+       buf = (char *) yyalloc(n  );
        if ( ! buf )
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  
-       for ( i = 0; i < len; ++i )
-               buf[i] = bytes[i];
+       for ( i = 0; i < _yybytes_len; ++i )
+               buf[i] = yybytes[i];
  
-       buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+       buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
  
-       b = yy_scan_buffer( buf, n );
+       b = yy_scan_buffer(buf,n );
        if ( ! b )
                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  
        b->yy_is_our_buffer = 1;
  
        return b;
-       }
+ }
+ #ifndef YY_EXIT_FAILURE
+ #define YY_EXIT_FAILURE 2
  #endif
  
+ static void yy_fatal_error (yyconst char* msg )
+ {
+       (void) fprintf( stderr, "%s\n", msg );
+       exit( YY_EXIT_FAILURE );
+ }
  
- #ifndef YY_NO_PUSH_STATE
- #ifdef YY_USE_PROTOS
- static void yy_push_state( int new_state )
- #else
- static void yy_push_state( new_state )
- int new_state;
- #endif
-       {
-       if ( yy_start_stack_ptr >= yy_start_stack_depth )
-               {
-               yy_size_t new_size;
+ /* Redefine yyless() so it works in section 3 code. */
  
-               yy_start_stack_depth += YY_START_STACK_INCR;
-               new_size = yy_start_stack_depth * sizeof( int );
+ #undef yyless
+ #define yyless(n) \
+       do \
+               { \
+               /* Undo effects of setting up yytext. */ \
+         int yyless_macro_arg = (n); \
+         YY_LESS_LINENO(yyless_macro_arg);\
+               yytext[yyleng] = (yy_hold_char); \
+               (yy_c_buf_p) = yytext + yyless_macro_arg; \
+               (yy_hold_char) = *(yy_c_buf_p); \
+               *(yy_c_buf_p) = '\0'; \
+               yyleng = yyless_macro_arg; \
+               } \
+       while ( 0 )
  
-               if ( ! yy_start_stack )
-                       yy_start_stack = (int *) yy_flex_alloc( new_size );
+ /* Accessor  methods (get/set functions) to struct members. */
  
-               else
-                       yy_start_stack = (int *) yy_flex_realloc(
-                                       (void *) yy_start_stack, new_size );
+ /** Get the current line number.
+  * 
+  */
+ int yyget_lineno  (void)
+ {
+         
+     return yylineno;
+ }
  
-               if ( ! yy_start_stack )
-                       YY_FATAL_ERROR(
-                       "out of memory expanding start-condition stack" );
-               }
+ /** Get the input stream.
+  * 
+  */
+ FILE *yyget_in  (void)
+ {
+         return yyin;
+ }
  
-       yy_start_stack[yy_start_stack_ptr++] = YY_START;
+ /** Get the output stream.
+  * 
+  */
+ FILE *yyget_out  (void)
+ {
+         return yyout;
+ }
  
-       BEGIN(new_state);
-       }
- #endif
+ /** Get the length of the current token.
+  * 
+  */
+ int yyget_leng  (void)
+ {
+         return yyleng;
+ }
  
+ /** Get the current token.
+  * 
+  */
  
- #ifndef YY_NO_POP_STATE
- static void yy_pop_state()
-       {
-       if ( --yy_start_stack_ptr < 0 )
-               YY_FATAL_ERROR( "start-condition stack underflow" );
+ char *yyget_text  (void)
+ {
+         return yytext;
+ }
  
-       BEGIN(yy_start_stack[yy_start_stack_ptr]);
-       }
- #endif
+ /** Set the current line number.
+  * @param line_number
+  * 
+  */
+ void yyset_lineno (int  line_number )
+ {
+     
+     yylineno = line_number;
+ }
  
+ /** Set the input stream. This does not discard the current
+  * input buffer.
+  * @param in_str A readable stream.
+  * 
+  * @see yy_switch_to_buffer
+  */
+ void yyset_in (FILE *  in_str )
+ {
+         yyin = in_str ;
+ }
  
- #ifndef YY_NO_TOP_STATE
- static int yy_top_state()
-       {
-       return yy_start_stack[yy_start_stack_ptr - 1];
-       }
- #endif
+ void yyset_out (FILE *  out_str )
+ {
+         yyout = out_str ;
+ }
  
- #ifndef YY_EXIT_FAILURE
- #define YY_EXIT_FAILURE 2
- #endif
+ int yyget_debug  (void)
+ {
+         return yy_flex_debug;
+ }
  
- #ifdef YY_USE_PROTOS
- static void yy_fatal_error( yyconst char msg[] )
+ void yyset_debug (int  bdebug )
+ {
+         yy_flex_debug = bdebug ;
+ }
+ static int yy_init_globals (void)
+ {
+         /* Initialization is the same as for the non-reentrant scanner.
+      * This function is called from yylex_destroy(), so don't allocate here.
+      */
+     (yy_buffer_stack) = 0;
+     (yy_buffer_stack_top) = 0;
+     (yy_buffer_stack_max) = 0;
+     (yy_c_buf_p) = (char *) 0;
+     (yy_init) = 0;
+     (yy_start) = 0;
+ /* Defined in main.c */
+ #ifdef YY_STDINIT
+     yyin = stdin;
+     yyout = stdout;
  #else
- static void yy_fatal_error( msg )
char msg[];
+     yyin = (FILE *) 0;
    yyout = (FILE *) 0;
  #endif
-       {
-       (void) fprintf( stderr, "%s\n", msg );
-       exit( YY_EXIT_FAILURE );
-       }
  
+     /* For future reference: Set errno on error, since we are called by
+      * yylex_init()
+      */
+     return 0;
+ }
  
+ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
+ int yylex_destroy  (void)
+ {
+     
+     /* Pop the buffer stack, destroying each element. */
+       while(YY_CURRENT_BUFFER){
+               yy_delete_buffer(YY_CURRENT_BUFFER  );
+               YY_CURRENT_BUFFER_LVALUE = NULL;
+               yypop_buffer_state();
+       }
  
- /* Redefine yyless() so it works in section 3 code. */
+       /* Destroy the stack itself. */
+       yyfree((yy_buffer_stack) );
+       (yy_buffer_stack) = NULL;
  
- #undef yyless
- #define yyless(n) \
-       do \
-               { \
-               /* Undo effects of setting up yytext. */ \
-               yytext[yyleng] = yy_hold_char; \
-               yy_c_buf_p = yytext + n; \
-               yy_hold_char = *yy_c_buf_p; \
-               *yy_c_buf_p = '\0'; \
-               yyleng = n; \
-               } \
-       while ( 0 )
+     /* Reset the globals. This is important in a non-reentrant scanner so the next time
+      * yylex() is called, initialization will occur. */
+     yy_init_globals( );
  
+     return 0;
+ }
  
- /* Internal utility routines. */
+ /*
+  * Internal utility routines.
+  */
  
  #ifndef yytext_ptr
- #ifdef YY_USE_PROTOS
- static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
- #else
- static void yy_flex_strncpy( s1, s2, n )
- char *s1;
- yyconst char *s2;
- int n;
- #endif
-       {
+ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+ {
        register int i;
        for ( i = 0; i < n; ++i )
                s1[i] = s2[i];
      }
+ }
  #endif
  
  #ifdef YY_NEED_STRLEN
- #ifdef YY_USE_PROTOS
- static int yy_flex_strlen( yyconst char *s )
- #else
- static int yy_flex_strlen( s )
- yyconst char *s;
- #endif
-       {
+ static int yy_flex_strlen (yyconst char * s )
+ {
        register int n;
        for ( n = 0; s[n]; ++n )
                ;
  
        return n;
      }
+ }
  #endif
  
- #ifdef YY_USE_PROTOS
- static void *yy_flex_alloc( yy_size_t size )
- #else
- static void *yy_flex_alloc( size )
- yy_size_t size;
- #endif
-       {
+ void *yyalloc (yy_size_t  size )
+ {
        return (void *) malloc( size );
      }
+ }
  
- #ifdef YY_USE_PROTOS
- static void *yy_flex_realloc( void *ptr, yy_size_t size )
- #else
- static void *yy_flex_realloc( ptr, size )
- void *ptr;
- yy_size_t size;
- #endif
-       {
+ void *yyrealloc  (void * ptr, yy_size_t  size )
+ {
        /* The cast to (char *) in the following accommodates both
         * implementations that use char* generic pointers, and those
         * that use void* generic pointers.  It works with the latter
         * as though doing an assignment.
         */
        return (void *) realloc( (char *) ptr, size );
      }
+ }
  
- #ifdef YY_USE_PROTOS
- static void yy_flex_free( void *ptr )
- #else
- static void yy_flex_free( ptr )
- void *ptr;
- #endif
-       {
-       free( ptr );
-       }
+ void yyfree (void * ptr )
+ {
+       free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
+ }
+ #define YYTABLES_NAME "yytables"
+ #line 167 "uscan.l"
  
 +#if YY_MAIN
 +int main()
 +      {
 +      yylex();
 +      return 0;
 +      }
 +#endif
 +#line 165 "uscan.l"
  
  
  int
@@@ -1959,11 -2189,11 +2200,11 @@@ ll_parse_date
        yyerror("invalid second");
      } else if(type < 4) {
        yylval.strval = alloc(DATE_ALLOC_SIZE);
-       snprintf(yylval.strval, DATE_ALLOC_SIZE, "%04d-%02d-%02d", y, m, d);
+       g_snprintf(yylval.strval, DATE_ALLOC_SIZE, "%04d-%02d-%02d", y, m, d);
        ret = DATE;
      } else {
        yylval.strval = alloc(DATE_ALLOC_SIZE);
-       snprintf(yylval.strval, DATE_ALLOC_SIZE, "%04d-%02d-%02d-%02d-%02d-%02d", y, m, d, h, mi, s);
+       g_snprintf(yylval.strval, DATE_ALLOC_SIZE, "%04d-%02d-%02d-%02d-%02d-%02d", y, m, d, h, mi, s);
        ret = DATE;
      }
      return ret;
@@@ -1975,3 -2205,4 +2216,4 @@@ yywrap(void
    return 1;
  }
  
diff --combined restore-src/Makefile.in
index ec68cbebf5e61d8d893bb3717487d134766dcb16,f092f9d6b7184089b76245f4f0f1e031384f94f0..3f73d5437be6d7366a1c11527a4207663cdac6d5
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for Amanda restore programs.
  
+ # vim:ft=automake
+ #
+ # Adjust post-install permissions settings.  This rule works off two
+ # specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data. 
+ # Each is a whitespace-separated list of commands, all of which are either
+ # a variable assignment or a filename.  Three variables are available:
+ #
+ #  - dest= sets the destination directory to e.g., $(sbindir)
+ #  - chown= controls changes in ownership; value is first argument to chown
+ #  - chmod= controls changes in permissions; value is first argument to chmod
+ #
+ # As a special case, chown=amanda is taken as equivalent to 
+ # chown=$(BINARY_OWNER):$(SETUID_GROUP), which may otherwise have problems with
+ # whitespace in the user/group names.
+ # 
+ # when a filename is seen, the currently active variables are applied.
+ #
+ # Note that scripts are data, not executables!
+ #
+ # EXAMPLE
+ #
+ # sbin_PROGRAMS = foo bar bing
+ # libexec_PROGRAMS = pro gram
+ # sbin_SCRIPTS = sk ript
+ # INSTALLPERMS_exec = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             foo bar \
+ #     chmod=u+s,o-rwx \
+ #             bing
+ #     dest=$(libexecdir) chmod= \
+ #             $(libexec_PROGRAMS)
+ # INSTALLPERMS_data = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             $(sbin_SCRIPTS)
+ #
+ # This whole operation is not required when making builds for packaging,
+ # and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+ # AM_CONDITIONAL.
+ # vim:ft=automake
  
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -41,49 -78,120 +78,120 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
+ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in \
+       $(top_srcdir)/config/automake/installperms.am \
+       $(top_srcdir)/config/automake/precompile.am
  sbin_PROGRAMS = amrestore$(EXEEXT) amfetchdump$(EXEEXT)
- libexec_PROGRAMS = amidxtaped$(EXEEXT)
amlibexec_PROGRAMS = amidxtaped$(EXEEXT)
  subdir = restore-src
- DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@@ -95,18 -203,21 +203,21 @@@ am__vpath_adj = case $$p in 
      *) f=$$p;; \
    esac;
  am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
- am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" \
+ am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" \
        "$(DESTDIR)$(sbindir)"
- libLTLIBRARIES_INSTALL = $(INSTALL)
- LTLIBRARIES = $(lib_LTLIBRARIES)
amlibLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(amlib_LTLIBRARIES)
  librestore_la_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../server-src/libamserver.$(LIB_EXTENSION)
+       ../server-src/libamserver.$(LIB_EXTENSION) \
+       ../device-src/libamdevice.$(LIB_EXTENSION)
  am_librestore_la_OBJECTS = restore.lo
  librestore_la_OBJECTS = $(am_librestore_la_OBJECTS)
- libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+ librestore_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(librestore_la_LDFLAGS) $(LDFLAGS) -o $@
+ amlibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
  sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
- PROGRAMS = $(libexec_PROGRAMS) $(sbin_PROGRAMS)
+ PROGRAMS = $(amlibexec_PROGRAMS) $(sbin_PROGRAMS)
  am_amfetchdump_OBJECTS = amfetchdump.$(OBJEXT)
  amfetchdump_OBJECTS = $(am_amfetchdump_OBJECTS)
  amfetchdump_LDADD = $(LDADD)
@@@ -128,17 -239,18 +239,18 @@@ amrestore_LDADD = $(LDADD
  amrestore_DEPENDENCIES = librestore.$(LIB_EXTENSION) \
        ../common-src/libamanda.$(LIB_EXTENSION) \
        ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
+ DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
  am__depfiles_maybe = depfiles
  COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  CCLD = $(CC)
- LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
  SOURCES = $(librestore_la_SOURCES) $(amfetchdump_SOURCES) \
        $(amidxtaped_SOURCES) amrestore.c
  DIST_SOURCES = $(librestore_la_SOURCES) $(amfetchdump_SOURCES) \
@@@ -147,15 -259,14 +259,15 @@@ HEADERS = $(noinst_HEADERS
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -163,14 -274,19 +275,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -181,20 -297,19 +299,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -208,60 -323,169 +325,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -271,10 -495,24 +499,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -285,24 -523,58 +527,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -314,59 -586,46 +590,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -375,35 -634,48 +638,48 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ # sed expression to strip leading directories from a filename; this converts e.g.,
+ # src/foo/bar.so to bar.so.
+ strip_leading_dirs = s|^.*/||
  INCLUDES = -I$(top_builddir)/common-src \
                -I$(top_srcdir)/common-src   \
-               -I$(top_srcdir)/tape-src     \
+               -I$(top_srcdir)/device-src   \
                -I$(top_srcdir)/server-src   \
                -I$(top_srcdir)/amandad-src  \
                -I$(top_srcdir)/gnulib
  
+ AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
  LINT = @AMLINT@
  LINTFLAGS = @AMLINTFLAGS@
- lib_LTLIBRARIES = librestore.la
amlib_LTLIBRARIES = librestore.la
  LIB_EXTENSION = la
  
  ###
@@@ -426,15 -698,19 +702,19 @@@ amfetchdump_SOURCES = amfetchdump.
  librestore_la_SOURCES = restore.c
  librestore_la_LDFLAGS = -release $(VERSION)
  librestore_la_LIBADD = ../common-src/libamanda.$(LIB_EXTENSION) \
-                    ../tape-src/libamtape.$(LIB_EXTENSION) \
-                   ../server-src/libamserver.$(LIB_EXTENSION)
+                               ../server-src/libamserver.$(LIB_EXTENSION) \
+                               ../device-src/libamdevice.$(LIB_EXTENSION)
  
  noinst_HEADERS = restore.h
+ INSTALLPERMS_exec = \
+       dest=$(sbindir) chown=amanda $(sbin_PROGRAMS) \
+       dest=$(amlibexecdir) chown=amanda $(amlibexec_PROGRAMS)
  all: all-am
  
  .SUFFIXES:
  .SUFFIXES: .c .lo .o .obj
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -463,66 -739,66 +743,66 @@@ $(top_srcdir)/configure:  $(am__configu
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
- install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
            f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           echo " $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(amlibdir)/$$f'"; \
+           $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(amlibdir)/$$f"; \
          else :; fi; \
        done
  
- uninstall-libLTLIBRARIES:
+ uninstall-amlibLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(amlibdir)/$$p'"; \
+         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(amlibdir)/$$p"; \
        done
  
- clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ clean-amlibLTLIBRARIES:
+       -test -z "$(amlib_LTLIBRARIES)" || rm -f $(amlib_LTLIBRARIES)
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
          test "$$dir" != "$$p" || dir=.; \
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
  librestore.la: $(librestore_la_OBJECTS) $(librestore_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(librestore_la_LDFLAGS) $(librestore_la_OBJECTS) $(librestore_la_LIBADD) $(LIBS)
- install-libexecPROGRAMS: $(libexec_PROGRAMS)
+       $(librestore_la_LINK) -rpath $(amlibdir) $(librestore_la_OBJECTS) $(librestore_la_LIBADD) $(LIBS)
+ install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
             || test -f $$p1 \
          ; then \
            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(amlibexecdir)/$$f" || exit 1; \
          else :; fi; \
        done
  
- uninstall-libexecPROGRAMS:
+ uninstall-amlibexecPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
        done
  
- clean-libexecPROGRAMS:
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ clean-amlibexecPROGRAMS:
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
  install-sbinPROGRAMS: $(sbin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
+       test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
        @list='$(sbin_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
@@@ -550,13 -826,13 +830,13 @@@ clean-sbinPROGRAMS
        done
  amfetchdump$(EXEEXT): $(amfetchdump_OBJECTS) $(amfetchdump_DEPENDENCIES) 
        @rm -f amfetchdump$(EXEEXT)
-       $(LINK) $(amfetchdump_LDFLAGS) $(amfetchdump_OBJECTS) $(amfetchdump_LDADD) $(LIBS)
+       $(LINK) $(amfetchdump_OBJECTS) $(amfetchdump_LDADD) $(LIBS)
  amidxtaped$(EXEEXT): $(amidxtaped_OBJECTS) $(amidxtaped_DEPENDENCIES) 
        @rm -f amidxtaped$(EXEEXT)
-       $(LINK) $(amidxtaped_LDFLAGS) $(amidxtaped_OBJECTS) $(amidxtaped_LDADD) $(LIBS)
+       $(LINK) $(amidxtaped_OBJECTS) $(amidxtaped_LDADD) $(LIBS)
  amrestore$(EXEEXT): $(amrestore_OBJECTS) $(amrestore_DEPENDENCIES) 
        @rm -f amrestore$(EXEEXT)
-       $(LINK) $(amrestore_LDFLAGS) $(amrestore_OBJECTS) $(amrestore_LDADD) $(LIBS)
+       $(LINK) $(amrestore_OBJECTS) $(amrestore_LDADD) $(LIBS)
  
  mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@@ -570,22 -846,22 +850,22 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restore.Plo@am__quote@
  
  .c.o:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c $<
  
  .c.obj:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
  
  .c.lo:
- @am__fastdepCC_TRUE@  if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@@ -596,10 -872,6 +876,6 @@@ mostlyclean-libtool
  clean-libtool:
        -rm -rf .libs _libs
  
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@@ -649,22 -921,21 +925,21 @@@ distclean-tags
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
@@@ -679,8 -950,8 +954,8 @@@ check-am: all-a
  check: check-am
  all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
  installdirs:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(sbindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
  install: install-am
  install-exec: install-exec-am
@@@ -706,16 -977,18 +981,18 @@@ distclean-generic
  maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+ @WANT_INSTALLPERMS_FALSE@install-exec-hook:
+ @WANT_INSTALLPERMS_FALSE@install-data-hook:
  clean: clean-am
  
- clean-am: clean-generic clean-libLTLIBRARIES clean-libexecPROGRAMS \
+ clean-am: clean-amlibLTLIBRARIES clean-amlibexecPROGRAMS clean-generic \
        clean-libtool clean-sbinPROGRAMS mostlyclean-am
  
  distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
  
  dvi: dvi-am
  
@@@ -727,17 -1000,26 +1004,26 @@@ info: info-a
  
  info-am:
  
- install-data-am:
+ install-data-am: install-amlibLTLIBRARIES
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
  
- install-exec-am: install-libLTLIBRARIES install-libexecPROGRAMS \
-       install-sbinPROGRAMS
+ install-exec-am: install-amlibexecPROGRAMS install-sbinPROGRAMS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
  
+ install-html: install-html-am
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -758,46 -1040,89 +1044,89 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
-       uninstall-libexecPROGRAMS uninstall-sbinPROGRAMS
- .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libLTLIBRARIES clean-libexecPROGRAMS clean-libtool \
-       clean-sbinPROGRAMS ctags distclean distclean-compile \
-       distclean-generic distclean-libtool distclean-tags distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-exec-hook install-info install-info-am \
-       install-libLTLIBRARIES install-libexecPROGRAMS install-man \
-       install-sbinPROGRAMS install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-compile \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-info-am \
-       uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS \
+ uninstall-am: uninstall-amlibLTLIBRARIES uninstall-amlibexecPROGRAMS \
+       uninstall-sbinPROGRAMS
+ .MAKE: install-am install-data-am install-exec-am install-strip
+ .PHONY: CTAGS GTAGS all all-am check check-am clean \
+       clean-amlibLTLIBRARIES clean-amlibexecPROGRAMS clean-generic \
+       clean-libtool clean-sbinPROGRAMS ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-amlibLTLIBRARIES \
+       install-amlibexecPROGRAMS install-data install-data-am \
+       install-data-hook install-dvi install-dvi-am install-exec \
+       install-exec-am install-exec-hook install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-amlibLTLIBRARIES uninstall-amlibexecPROGRAMS \
        uninstall-sbinPROGRAMS
  
  
- install-exec-hook:
-       @list="$(sbin_PROGRAMS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
-       @list="$(libexec_PROGRAMS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
+ @WANT_INSTALLPERMS_TRUE@installperms-exec:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_exec)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on executables"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@installperms-data:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_data)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on data"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@install-exec-hook: installperms-exec
+ @WANT_INSTALLPERMS_TRUE@install-data-hook: installperms-data
+ # A rule to make precompiler output from C files.  This is not used during
+ # ordinary builds, but but can very useful in debugging problems on strange
+ # architectures.  With this rule, we can ask users to 'make foo.i' and send
+ # the result to us.
+ #
+ # It touches some automake internals ($COMPILE), but since it's not
+ # build-critical, that's OK.
+ %.i : %.c
+       $(COMPILE) -E -o $@ $<
  
  lint:
-       @ for p in $(libexec_PROGRAMS) $(sbin_PROGRAMS); do                     \
+       @ for p in $(amlibexec_PROGRAMS) $(sbin_PROGRAMS); do                   \
                f="$$p.c $(librestore_la_SOURCES)";                             \
                (cd ../common-src; make listlibsrc);                            \
                f="$$f "`cat ../common-src/listlibsrc.output`;                  \
                (cd ../tape-src; make listlibsrc);                              \
                f="$$f "`cat ../tape-src/listlibsrc.output`;                    \
                echo $(LINT) $$f;                                               \
-               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config        \
+               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config   \
                    $(INCLUDES) $$f;                                            \
                if [ $$? -ne 0 ]; then                                          \
                    exit 1;                                                     \
diff --combined restore-src/amidxtaped.c
index 2e7492c87a096988a9e2c6231b8938cf7646e056,b83b8e0d0f248a8f6781d6e698ce2f1c1fc18ae0..7b82c68d28a498a52d3cece31323755c147b56bf
@@@ -36,9 -36,9 +36,9 @@@
  #include "version.h"
  #include "clock.h"
  #include "restore.h"
+ #include "cmdline.h"
  
  #include "changer.h"
- #include "tapeio.h"
  #include "conffile.h"
  #include "logfile.h"
  #include "amfeatures.h"
@@@ -56,7 -56,6 +56,6 @@@
  static char *pgm = "amidxtaped";      /* in case argv[0] is not set */
  
  extern char *rst_conf_logfile;
- extern char *config_dir;
  
  static int get_lock = 0;
  static int from_amandad;
@@@ -90,16 -89,15 +89,15 @@@ get_client_line(FILE *in
      while(1) {
        if((part = agets(in)) == NULL) {
            if(errno != 0) {
-               dbprintf(("%s: read error: %s\n",
-                         debug_prefix_time(NULL), strerror(errno)));
+               dbprintf(_("read error: %s\n"), strerror(errno));
            } else {
-               dbprintf(("%s: EOF reached\n", debug_prefix_time(NULL)));
+               dbprintf(_("EOF reached\n"));
            }
            if(line) {
-               dbprintf(("%s: unprocessed input:\n", debug_prefix_time(NULL)));
-               dbprintf(("-----\n"));
-               dbprintf(("%s\n", line));
-               dbprintf(("-----\n"));
+               dbprintf(_("s: unprocessed input:\n"));
+               dbprintf("-----\n");
+               dbprintf("%s\n", line);
+               dbprintf("-----\n");
            }
            amfree(line);
            amfree(part);
         */
        strappend(line, "\n");
      }
-     dbprintf(("%s: > %s\n", debug_prefix_time(NULL), line));
+     dbprintf("> %s\n", line);
      return line;
  }
  
@@@ -153,8 -151,8 +151,8 @@@ get_client_line_fd
                /* Keep looping if failure is temporary */
                continue;
            }
-           dbprintf(("%s: Control pipe read error - %s\n",
-                     pgm, strerror(errno)));
+           dbprintf(_("%s: Control pipe read error - %s\n"),
+                     pgm, strerror(errno));
            break;
        }
  
            line_size *= 2;
            line = realloc(line, line_size);
            if (line == NULL) {
-               error("Memory reallocation failure");
+               error(_("Memory reallocation failure"));
                /*NOTREACHED*/
            }
            s = &line[len];
@@@ -188,22 -186,21 +186,21 @@@ voi
  check_security_buffer(
      char *    buffer)
  {
-     socklen_t i;
+     socklen_t_equiv i;
      struct sockaddr_in addr;
      char *s, *fp, ch;
      char *errstr = NULL;
  
-     dbprintf(("%s: check_security_buffer(buffer='%s')\n",
-               debug_prefix_time(NULL), buffer));
+     dbprintf(_("check_security_buffer(buffer='%s')\n"), buffer);
  
      i = SIZEOF(addr);
      if (getpeername(0, (struct sockaddr *)&addr, &i) == -1) {
-       error("getpeername: %s", strerror(errno));
+       error(_("getpeername: %s"), strerror(errno));
        /*NOTREACHED*/
      }
      if ((addr.sin_family != (sa_family_t)AF_INET)
                || (ntohs(addr.sin_port) == 20)) {
-       error("connection rejected from %s family %d port %d",
+       error(_("connection rejected from %s family %d port %d"),
               inet_ntoa(addr.sin_addr), addr.sin_family, htons(addr.sin_port));
        /*NOTREACHED*/
      }
  
      skip_whitespace(s, ch);
      if (ch == '\0') {
-       error("cannot parse SECURITY line");
+       error(_("cannot parse SECURITY line"));
        /*NOTREACHED*/
      }
      fp = s-1;
      skip_non_whitespace(s, ch);
      s[-1] = '\0';
      if (strcmp(fp, "SECURITY") != 0) {
-       error("cannot parse SECURITY line");
+       error(_("cannot parse SECURITY line"));
        /*NOTREACHED*/
      }
      skip_whitespace(s, ch);
-     if (!check_security((struct sockaddr_storage *)&addr, s-1, 0, &errstr)) {
-       error("security check failed: %s", errstr);
+     if (!check_security((sockaddr_union *)&addr, s-1, 0, &errstr)) {
+       error(_("security check failed: %s"), errstr);
        /*NOTREACHED*/
      }
  }
@@@ -239,9 -236,9 +236,9 @@@ main
      char *buf = NULL;
      int data_sock = -1;
      in_port_t data_port = (in_port_t)-1;
-     socklen_t socklen;
+     socklen_t_equiv socklen;
      struct sockaddr_in addr;
-     match_list_t *match_list;
+     GSList *dumpspecs;
      tapelist_t *tapes = NULL;
      char *their_feature_string = NULL;
      rst_flags_t *rst_flags;
      tapetype_t *tape;
      char *line;
      char *tapedev;
- #ifndef DEBUG_CODE
-     int i;
- #endif
+     dumpspec_t *ds;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(DATA_FD_OFFSET, 4);
      safe_cd();
        safe_fd(-1, 0);
      }
  
 +#ifdef FORCE_USERID
 +
 +    /* we'd rather not run as root */
 +
 +    if(geteuid() == 0) {
 +      if(client_uid == (uid_t) -1) {
 +          error("error [cannot find user %s in passwd file]\n", CLIENT_LOGIN);
 +          /*NOTREACHED*/
 +      }
 +
 +      /*@ignore@*/
 +      initgroups(CLIENT_LOGIN, client_gid);
 +      /*@end@*/
 +      setgid(client_gid);
 +      setuid(client_uid);
 +    }
 +
 +#endif        /* FORCE_USERID */
 +
      /* initialize */
      /* close stderr first so that debug file becomes it - amrestore
         chats to stderr, which we don't want going to client */
      (void)close(STDERR_FILENO);
      dbopen(DBG_SUBDIR_SERVER);
      startclock();
-     dbprintf(("%s: version %s\n", pgm, version()));
- #ifdef DEBUG_CODE
-     if(dbfd() != -1 && dbfd() != STDERR_FILENO)
-     {
-       if(dup2(dbfd(),STDERR_FILENO) != STDERR_FILENO)
-       {
-           perror("amidxtaped can't redirect stderr to the debug file");
-           dbprintf(("%s: can't redirect stderr to the debug file\n",
-                     debug_prefix_time(NULL)));
-           return 1;
-       }
-     }
- #else
-     if ((i = open("/dev/null", O_WRONLY)) == -1 ||
-       (i != STDERR_FILENO &&
-        (dup2(i, STDERR_FILENO) != STDERR_FILENO ||
-         close(i) != 0))) {
-       perror("amidxtaped can't redirect stderr");
-       return 1;
-     }
- #endif
+     dbprintf(_("%s: version %s\n"), pgm, version());
+     debug_dup_stderr_to_debug();
  
      if (! (argc >= 1 && argv != NULL && argv[0] != NULL)) {
-       dbprintf(("%s: WARNING: argv[0] not defined: check inetd.conf\n",
-                 debug_prefix_time(NULL)));
+       dbprintf(_("WARNING: argv[0] not defined: check inetd.conf\n"));
      }
  
      if(from_amandad == 0) {
        socklen = SIZEOF(addr);
        if (getpeername(0, (struct sockaddr *)&addr, &socklen) == -1) {
-           error("getpeername: %s", strerror(errno));
+           error(_("getpeername: %s"), strerror(errno));
            /*NOTREACHED*/
        }
        if ((addr.sin_family != (sa_family_t)AF_INET)
                || (ntohs(addr.sin_port) == 20)) {
-           error("connection rejected from %s family %d port %d",
+           error(_("connection rejected from %s family %d port %d"),
                  inet_ntoa(addr.sin_addr), addr.sin_family,
                  htons(addr.sin_port));
            /*NOTREACHED*/
  
        if(amandad_auth && g_options->auth) {
            if(strcasecmp(amandad_auth, g_options->auth) != 0) {
-               printf("ERROR recover program ask for auth=%s while amidxtaped is configured for '%s'\n",
+               g_printf(_("ERROR recover program ask for auth=%s while amidxtaped is configured for '%s'\n"),
                       g_options->auth, amandad_auth);
-               error("ERROR recover program ask for auth=%s while amidxtaped is configured for '%s'",
+               error(_("ERROR recover program ask for auth=%s while amidxtaped is configured for '%s'"),
                      g_options->auth, amandad_auth);
                /*NOTREACHED*/
            }
        }
        /* send the REP packet */
-       printf("CONNECT CTL %d DATA %d\n", DATA_FD_OFFSET, DATA_FD_OFFSET+1);
-       printf("\n");
+       g_printf("CONNECT CTL %d DATA %d\n", DATA_FD_OFFSET, DATA_FD_OFFSET+1);
+       g_printf("\n");
        fflush(stdout);
        fclose(stdin);
        fclose(stdout);
        cmdout = fdopen(ctlfdout, "a");
        if (!cmdout) {
-           error("amidxtaped: Can't fdopen(ctlfdout): %s", strerror(errno));
+           error(_("amidxtaped: Can't fdopen(ctlfdout): %s"), strerror(errno));
            /*NOTREACHED*/
        }
        cmdin = fdopen(ctlfdin, "r");
        if (!cmdin) {
-           error("amidxtaped: Can't fdopen(ctlfdin): %s", strerror(errno));
+           error(_("amidxtaped: Can't fdopen(ctlfdin): %s"), strerror(errno));
            /*NOTREACHED*/
        }
      }
  
-     /* get the number of arguments */
-     match_list = alloc(SIZEOF(match_list_t));
-     match_list->next = NULL;
-     match_list->hostname = "";
-     match_list->datestamp = "";
-     match_list->level = "";
-     match_list->diskname = "";
+     ds = dumpspec_new(NULL, NULL, NULL, NULL);
      for (re_end = 0; re_end == 0; ) {
        char *s, ch;
        amfree(buf);
            amfree(their_feature_string);
            our_feature_string = am_feature_to_string(our_features);
            if(from_amandad == 1) 
-               fprintf(cmdout,"FEATURES=%s\r\n", our_feature_string);
+               g_fprintf(cmdout,"FEATURES=%s\r\n", our_feature_string);
            else
-               fprintf(cmdout,"%s", our_feature_string);
+               g_fprintf(cmdout,"%s", our_feature_string);
            fflush(cmdout);
            amfree(our_feature_string);
        }
            rst_flags->alt_tapedev= stralloc(s);
        }
        else if(strncmp_const_skip(buf, "HOST=", s, ch) == 0) {
-           match_list->hostname = stralloc(s);
+           ds->host = stralloc(s);
        }
        else if(strncmp_const_skip(buf, "DISK=", s, ch) == 0) {
-           match_list->diskname = stralloc(s);
+           ds->disk = stralloc(s);
        }
        else if(strncmp_const_skip(buf, "DATESTAMP=", s, ch) == 0) {
-           match_list->datestamp = stralloc(s);
+           ds->datestamp = stralloc(s);
        }
        else if(strncmp_const(buf, "END") == 0) {
            re_end = 1;
        }
        else if(strncmp_const_skip(buf, "CONFIG=", s, ch) == 0) {
            re_config = stralloc(s);
+           if(strlen(re_config) == 0)
+               amfree(re_config);
        }
        else if(buf[0] != '\0' && buf[0] >= '0' && buf[0] <= '9') {
- /* XXX does nothing?     amrestore_nargs = atoi(buf); */
            re_end = 1;
        }
      }
      amfree(buf);
  
 +    if(!tapes && rst_flags->alt_tapedev){
 +      dbprintf(("%s: Looks like we're restoring from a holding file...\n", debug_prefix_time(NULL)));
 +        tapes = unmarshal_tapelist_str(rst_flags->alt_tapedev);
 +      tapes->isafile = 1;
 +      amfree(rst_flags->alt_tapedev);
 +      rst_flags->alt_tapedev = NULL;
 +    }
 +
      if(re_config) {
-       char *conffile;
-       config_dir = vstralloc(CONFIG_DIR, "/", re_config, "/", NULL);
-       conffile = stralloc2(config_dir, CONFFILE_NAME);
-       if (read_conffile(conffile)) {
-           dbprintf(("%s: config '%s' not found\n",
-                     debug_prefix_time(NULL), re_config));
-           amfree(re_config);
-           re_config = NULL;
-       }
-       amfree(conffile);
-       dbrename(config_name, DBG_SUBDIR_SERVER);
+       config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL, re_config);
+       dbrename(re_config, DBG_SUBDIR_SERVER);
+     } else {
+       config_init(0, NULL);
      }
  
+     check_running_as(RUNNING_AS_DUMPUSER_PREFERRED);
      if(tapes &&
         (!rst_flags->alt_tapedev  ||
          (re_config && ( strcmp(rst_flags->alt_tapedev,
                                 getconf_str(CNF_TPCHANGER)) == 0 ) ) ) ) {
        /* We need certain options, if restoring from more than one tape */
          if(tapes->next && !am_has_feature(their_features, fe_recover_splits)) {
-             error("%s: Client must support split dumps to restore requested data.",  get_pname());
+             error(_("Client must support split dumps to restore requested data."));
              /*NOTREACHED*/
          }
-       dbprintf(("%s: Restoring from changer, checking labels\n", get_pname()));
+       dbprintf(_("Restoring from changer, checking labels\n"));
        rst_flags->check_labels = 1;
        use_changer = 1;
      }
  
+     /* build the dumpspec list from our single dumpspec */
+     dumpspecs = g_slist_append(NULL, (gpointer)ds);
+     ds = NULL;
+     if(!tapes && rst_flags->alt_tapedev){
+         sleep(10);
+       dbprintf(_("Looks like we're restoring from a holding file...\n"));
+         tapes = unmarshal_tapelist_str(rst_flags->alt_tapedev);
+       tapes->isafile = 1;
+       amfree(rst_flags->alt_tapedev);
+       rst_flags->alt_tapedev = NULL;
+         use_changer = FALSE;
+     } 
      tapedev = getconf_str(CNF_TAPEDEV);
      /* If we'll be stepping on the tape server's devices, lock them. */
      if(re_config &&
         (use_changer || (rst_flags->alt_tapedev && tapedev &&
                          strcmp(rst_flags->alt_tapedev, tapedev) == 0) ) ) {
-       dbprintf(("%s: Locking devices\n", get_pname()));
+       dbprintf(_("Locking devices\n"));
        parent_pid = getpid();
        atexit(cleanup);
        get_lock = lock_logfile();
  
      /* Init the tape changer */
      if(tapes && use_changer && changer_init() == 0) {
-       dbprintf(("%s: No changer available\n", debug_prefix_time(NULL)));
+       dbprintf(_("No changer available\n"));
      }
  
      /* Read the default block size from the tape type */
            int data_fd;
            char *buf;
  
-           dbprintf(("%s: Client understands split dumpfiles\n",get_pname()));
+           dbprintf(_("Client understands split dumpfiles\n"));
  
-           if((data_sock = stream_server(&data_port, STREAM_BUFSIZE, 
+           if((data_sock = stream_server(AF_INET, &data_port, STREAM_BUFSIZE, 
                 STREAM_BUFSIZE, 0)) < 0){
-               error("%s: could not create data socket: %s", get_pname(),
-                     strerror(errno));
+               error(_("could not create data socket: %s"), strerror(errno));
                /*NOTREACHED*/
            }
-           dbprintf(("%s: Local port %d set aside for data\n", get_pname(),                         data_port));
+           dbprintf(_("Local port %d set aside for data\n"), data_port);
  
            /* tell client where to connect */
-           printf("CONNECT %hu\n", (unsigned short)data_port);
+           g_printf(_("CONNECT %hu\n"), (unsigned short)data_port);
            fflush(stdout);
  
            if((data_fd = stream_accept(data_sock, TIMEOUT, STREAM_BUFSIZE, 
                   STREAM_BUFSIZE)) < 0){
-               error("stream_accept failed for client data connection: %s\n",
+               error(_("stream_accept failed for client data connection: %s\n"),
                      strerror(errno));
                /*NOTREACHED*/
            }
        rst_flags->pipe_to_fd = fileno(stdout);
          cmdout = stderr;
      }
-     dbprintf(("%s: Sending output to file descriptor %d\n",
-             get_pname(), rst_flags->pipe_to_fd));
+     dbprintf(_("Sending output to file descriptor %d\n"), rst_flags->pipe_to_fd);
  
  
      tapedev = getconf_str(CNF_TAPEDEV);
         (use_changer || (rst_flags->alt_tapedev && tapedev &&
                          strcmp(rst_flags->alt_tapedev, tapedev) == 0) ) ) {
        send_message(cmdout, rst_flags, their_features,
-                    "%s exists: amdump or amflush is already running, "
-                    "or you must run amcleanup", 
+                    _("%s exists: amdump or amflush is already running, "
+                    "or you must run amcleanup")
                     rst_conf_logfile);
-       error("%s exists: amdump or amflush is already running, "
-             "or you must run amcleanup",
+       error(_("%s exists: amdump or amflush is already running, "
+             "or you must run amcleanup"),
              rst_conf_logfile);
      }
  
        if (rst_flags->pipe_to_fd != -1)
            aclose(rst_flags->pipe_to_fd);
        send_message(cmdout, rst_flags, their_features,
-                    "restore flags are crazy");
+                    _("restore flags are crazy"));
        exit(1);
      }
  
      /* actual restoration */
-     search_tapes(cmdout, cmdin, use_changer, tapes, match_list, rst_flags,
+     search_tapes(cmdout, cmdin, use_changer, tapes, dumpspecs, rst_flags,
                 their_features);
-     dbprintf(("%s: Restoration finished\n", debug_prefix_time(NULL)));
+     dbprintf(_("Restoration finished\n"));
  
      /* cleanup */
      if(rst_flags->pipe_to_fd != -1) aclose(rst_flags->pipe_to_fd);
  
      amfree(rst_flags->alt_tapedev);
      amfree(rst_flags);
-     amfree(match_list->hostname);
-     amfree(match_list->diskname);
-     amfree(match_list->datestamp);
-     amfree(match_list);
-     amfree(config_dir);
+     dumpspec_list_free(dumpspecs);
      amfree(re_config);
      dbclose();
      return 0;
diff --combined server-src/Makefile.in
index 1b30e78f811ff8bdb6315e0ccf90fcd53539aed6,4533c0b1dd727b6f3cba73e0115727a13f667670..0651b1af17eb2aa7c1a61405c75a8275eb821de1
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for Amanda server programs.
  
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # simple include file to pre-define variables which are then +='d by other
+ # scripts in this directory.
+ # vim:ft=automake
+ # Copyright (c) 2005 Zmanda, Inc.  All Rights Reserved.
+ # 
+ # This library is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU Lesser General Public License version 2.1 as 
+ # published by the Free Software Foundation.
+ # 
+ # This library 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 Lesser General Public
+ # License for more details.
+ # 
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this library; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
+ # 
+ # Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
+ # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
+ # SYNOPSIS:
+ #
+ # Automake magic to handle the various tasks of building scripts.  Scripts can
+ # be built down to extensionless executables (e.g., foo.pl -> foo), or to 
+ # files with the usual extension (foo-lib.sh.in -> foo.sh).
+ #
+ # Files which support it are syntax-checked when the user invokes 'make check'.
+ #
+ # All *target* filenames must be listed in SCRIPTS_SHELL, SCRIPTS_PERL, and 
+ # SCRIPTS_AWK to support 'make check', 'make dist', and 'make distclean'.
+ #
+ # USAGE:
+ #
+ #   include $(top_srcdir)/config/automake/vars.am
+ #   include $(top_srcdir)/config/automake/scripts.am
+ #   ...
+ #   SCRIPTS_PERL = fooscript barscript perl-lib.pl perlmod.pm
+ #   SCRIPTS_SHELL = shell1 shell2 sh-lib.sh
+ #   SCRIPTS_AWK = talk balk chalk awk-lib.awk
+ #
+ # with the corresponding files in the repository:
+ #
+ #   fooscript.pl barscript.pl perl-lib.pl.in perlmod.pm.in
+ #   shell1.sh shell2.sh sh-lib.sh.in
+ #   talk.awk balk.awk chalk.awk awk-lib.awk.in
+ #
+ # by default, all shell and perl scripts are syntax checked.  If this is
+ # a problem (for example, perl scripts depending on Amanda extension 
+ # modules), then assign to CHECK_{PERL,SHELL} the list of files you wish
+ # to be checked (which can be empty).
+ #
+ # To add extra flags to the perl checks (e.g., to add new -I flags), set
+ # CHECK_PERL_FLAGS.
+ # Implementation note:
+ #
+ # This file uses config.status to substitute @foo@ in those scripts while
+ # converting them. It also adds the executable bits (a+x) to extensionless
+ # files.  The substitution works even though the files are not listed in 
+ # configure.in
+ # vim:ft=automake
+ #
+ # Adjust post-install permissions settings.  This rule works off two
+ # specially-formatted variables, INSTALLPERMS_exec and INSTALLPERMS_data. 
+ # Each is a whitespace-separated list of commands, all of which are either
+ # a variable assignment or a filename.  Three variables are available:
+ #
+ #  - dest= sets the destination directory to e.g., $(sbindir)
+ #  - chown= controls changes in ownership; value is first argument to chown
+ #  - chmod= controls changes in permissions; value is first argument to chmod
+ #
+ # As a special case, chown=amanda is taken as equivalent to 
+ # chown=$(BINARY_OWNER):$(SETUID_GROUP), which may otherwise have problems with
+ # whitespace in the user/group names.
+ # 
+ # when a filename is seen, the currently active variables are applied.
+ #
+ # Note that scripts are data, not executables!
+ #
+ # EXAMPLE
+ #
+ # sbin_PROGRAMS = foo bar bing
+ # libexec_PROGRAMS = pro gram
+ # sbin_SCRIPTS = sk ript
+ # INSTALLPERMS_exec = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             foo bar \
+ #     chmod=u+s,o-rwx \
+ #             bing
+ #     dest=$(libexecdir) chmod= \
+ #             $(libexec_PROGRAMS)
+ # INSTALLPERMS_data = \
+ #     dest=$(sbindir) chown=amanda chmod= \
+ #             $(sbin_SCRIPTS)
+ #
+ # This whole operation is not required when making builds for packaging,
+ # and can be disabled with --disable-installperms, via the WANT_INSTALLPERMS
+ # AM_CONDITIONAL.
+ # vim:ft=automake
  
  
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -42,318 -161,321 +161,322 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
+ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in \
+       $(top_srcdir)/config/automake/installperms.am \
+       $(top_srcdir)/config/automake/precompile.am \
+       $(top_srcdir)/config/automake/scripts.am \
+       $(top_srcdir)/config/automake/vars.am
  sbin_PROGRAMS = amadmin$(EXEEXT) amcheck$(EXEEXT) amflush$(EXEEXT) \
        amgetconf$(EXEEXT) amlabel$(EXEEXT) amtape$(EXEEXT) \
        amreport$(EXEEXT)
- libexec_PROGRAMS = amindexd$(EXEEXT) amlogroll$(EXEEXT) \
+ noinst_PROGRAMS = taper_source_test$(EXEEXT)
+ amlibexec_PROGRAMS = amindexd$(EXEEXT) amlogroll$(EXEEXT) \
        amtrmidx$(EXEEXT) amtrmlog$(EXEEXT) driver$(EXEEXT) \
        dumper$(EXEEXT) planner$(EXEEXT) taper$(EXEEXT) \
        amcleanupdisk$(EXEEXT) chunker$(EXEEXT)
  EXTRA_PROGRAMS = $(am__EXEEXT_1)
  subdir = server-src
- DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/amaespipe.sh.in \
-       $(srcdir)/amcheckdb.sh.in $(srcdir)/amcleanup.sh.in \
-       $(srcdir)/amcrypt-ossl-asym.sh.in $(srcdir)/amcrypt-ossl.sh.in \
-       $(srcdir)/amcrypt.sh.in $(srcdir)/amdump.sh.in \
-       $(srcdir)/amfreetapes.sh.in $(srcdir)/amoverview.pl.in \
-       $(srcdir)/amrmtape.sh.in $(srcdir)/amstatus.pl.in \
-       $(srcdir)/amtoc.pl.in $(srcdir)/amverify.sh.in \
-       $(srcdir)/amverifyrun.sh.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
  CONFIG_HEADER = $(top_builddir)/config/config.h
- CONFIG_CLEAN_FILES = amcheckdb.sh amcleanup.sh amdump.sh \
-       amfreetapes.sh amoverview.pl amrmtape.sh amtoc.pl amverify.sh \
-       amstatus.pl amverifyrun.sh amcrypt.sh amaespipe.sh \
-       amcrypt-ossl.sh amcrypt-ossl-asym.sh
+ CONFIG_CLEAN_FILES =
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  am__vpath_adj = case $$p in \
      $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
      *) f=$$p;; \
    esac;
  am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
- am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" \
+ am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" \
        "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)"
- libLTLIBRARIES_INSTALL = $(INSTALL)
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libamserver_la_LIBADD =
+ amlibLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(amlib_LTLIBRARIES)
+ libamserver_la_DEPENDENCIES = ../device-src/libamdevice.la \
+       ../common-src/libamanda.la
  am_libamserver_la_OBJECTS = amindex.lo changer.lo diskfile.lo \
        driverio.lo cmdline.lo holding.lo infofile.lo logfile.lo \
        tapefile.lo find.lo server_util.lo taperscan.lo
  libamserver_la_OBJECTS = $(am_libamserver_la_OBJECTS)
+ libamserver_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(libamserver_la_LDFLAGS) $(LDFLAGS) -o $@
  am__EXEEXT_1 = diskfile$(EXEEXT) infofile$(EXEEXT)
- libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
amlibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
  sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
- PROGRAMS = $(libexec_PROGRAMS) $(sbin_PROGRAMS)
+ PROGRAMS = $(amlibexec_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS)
  amadmin_SOURCES = amadmin.c
  amadmin_OBJECTS = amadmin.$(OBJEXT)
  amadmin_LDADD = $(LDADD)
  am__DEPENDENCIES_1 =
- amadmin_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amadmin_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  amcheck_SOURCES = amcheck.c
  amcheck_OBJECTS = amcheck.$(OBJEXT)
  amcheck_LDADD = $(LDADD)
- amcheck_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amcheck_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  amcleanupdisk_SOURCES = amcleanupdisk.c
  amcleanupdisk_OBJECTS = amcleanupdisk.$(OBJEXT)
  amcleanupdisk_LDADD = $(LDADD)
- amcleanupdisk_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amcleanupdisk_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  amflush_SOURCES = amflush.c
  amflush_OBJECTS = amflush.$(OBJEXT)
  amflush_LDADD = $(LDADD)
- amflush_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amflush_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  am_amgetconf_OBJECTS = getconf.$(OBJEXT)
  amgetconf_OBJECTS = $(am_amgetconf_OBJECTS)
  amgetconf_LDADD = $(LDADD)
- amgetconf_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amgetconf_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  am__objects_1 = amindexd.$(OBJEXT) disk_history.$(OBJEXT) \
        list_dir.$(OBJEXT)
  am_amindexd_OBJECTS = $(am__objects_1)
  amindexd_OBJECTS = $(am_amindexd_OBJECTS)
- amindexd_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ am__DEPENDENCIES_2 = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
+ amindexd_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       ../amandad-src/libamandad.la
  amlabel_SOURCES = amlabel.c
  amlabel_OBJECTS = amlabel.$(OBJEXT)
  amlabel_LDADD = $(LDADD)
- amlabel_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amlabel_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  amlogroll_SOURCES = amlogroll.c
  amlogroll_OBJECTS = amlogroll.$(OBJEXT)
  amlogroll_LDADD = $(LDADD)
- amlogroll_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amlogroll_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  am_amreport_OBJECTS = reporter.$(OBJEXT)
  amreport_OBJECTS = $(am_amreport_OBJECTS)
  amreport_LDADD = $(LDADD)
- amreport_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amreport_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  amtape_SOURCES = amtape.c
  amtape_OBJECTS = amtape.$(OBJEXT)
  amtape_LDADD = $(LDADD)
- amtape_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amtape_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  amtrmidx_SOURCES = amtrmidx.c
  amtrmidx_OBJECTS = amtrmidx.$(OBJEXT)
  amtrmidx_LDADD = $(LDADD)
- amtrmidx_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amtrmidx_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  amtrmlog_SOURCES = amtrmlog.c
  amtrmlog_OBJECTS = amtrmlog.$(OBJEXT)
  amtrmlog_LDADD = $(LDADD)
- amtrmlog_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ amtrmlog_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  chunker_SOURCES = chunker.c
  chunker_OBJECTS = chunker.$(OBJEXT)
  chunker_LDADD = $(LDADD)
- chunker_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ chunker_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  am_diskfile_OBJECTS = diskfile.test.$(OBJEXT)
  diskfile_OBJECTS = $(am_diskfile_OBJECTS)
  diskfile_LDADD = $(LDADD)
- diskfile_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ diskfile_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  driver_SOURCES = driver.c
  driver_OBJECTS = driver.$(OBJEXT)
  driver_LDADD = $(LDADD)
- driver_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ driver_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  dumper_SOURCES = dumper.c
  dumper_OBJECTS = dumper.$(OBJEXT)
  dumper_LDADD = $(LDADD)
- dumper_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ dumper_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  am_infofile_OBJECTS = infofile.test.$(OBJEXT)
  infofile_OBJECTS = $(am_infofile_OBJECTS)
  infofile_LDADD = $(LDADD)
- infofile_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ infofile_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
  planner_SOURCES = planner.c
  planner_OBJECTS = planner.$(OBJEXT)
  planner_LDADD = $(LDADD)
- planner_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
      ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
- taper_SOURCES = taper.c
- taper_OBJECTS = taper.$(OBJEXT)
- taper_LDADD = $(LDADD)
taper_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
      ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION) $(am__DEPENDENCIES_1)
+ planner_DEPENDENCIES = ../common-src/libamanda.la libamserver.la \
+       ../device-src/libamdevice.la ../common-src/libamanda.la \
+       ../gnulib/libgnu.la $(am__DEPENDENCIES_1)
am_taper_OBJECTS = taper.$(OBJEXT) taper-source.$(OBJEXT) \
+       taper-file-source.$(OBJEXT) taper-port-source.$(OBJEXT) \
+       taper-disk-port-source.$(OBJEXT) \
+       taper-mem-port-source.$(OBJEXT)
+ taper_OBJECTS = $(am_taper_OBJECTS)
+ taper_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       ../amandad-src/libamandad.la
am_taper_source_test_OBJECTS = taper-source-test.$(OBJEXT) \
+       taper-source.$(OBJEXT) taper-file-source.$(OBJEXT) \
+       taper-port-source.$(OBJEXT) taper-disk-port-source.$(OBJEXT) \
+       taper-mem-port-source.$(OBJEXT)
+ taper_source_test_OBJECTS = $(am_taper_source_test_OBJECTS)
taper_source_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       ../amandad-src/libamandad.la
  sbinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
  SCRIPTS = $(sbin_SCRIPTS)
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
+ DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
  am__depfiles_maybe = depfiles
  COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  CCLD = $(CC)
- LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
  SOURCES = $(libamserver_la_SOURCES) amadmin.c amcheck.c \
        amcleanupdisk.c amflush.c $(amgetconf_SOURCES) \
        $(amindexd_SOURCES) amlabel.c amlogroll.c $(amreport_SOURCES) \
        amtape.c amtrmidx.c amtrmlog.c chunker.c $(diskfile_SOURCES) \
-       driver.c dumper.c $(infofile_SOURCES) planner.c taper.c
+       driver.c dumper.c $(infofile_SOURCES) planner.c \
+       $(taper_SOURCES) $(taper_source_test_SOURCES)
  DIST_SOURCES = $(libamserver_la_SOURCES) amadmin.c amcheck.c \
        amcleanupdisk.c amflush.c $(amgetconf_SOURCES) \
        $(amindexd_SOURCES) amlabel.c amlogroll.c $(amreport_SOURCES) \
        amtape.c amtrmidx.c amtrmlog.c chunker.c $(diskfile_SOURCES) \
-       driver.c dumper.c $(infofile_SOURCES) planner.c taper.c
+       driver.c dumper.c $(infofile_SOURCES) planner.c \
+       $(taper_SOURCES) $(taper_source_test_SOURCES)
  HEADERS = $(noinst_HEADERS)
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -361,14 -483,19 +484,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -379,20 -506,19 +508,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -406,60 -532,169 +534,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -469,10 -704,24 +708,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -483,24 -732,58 +736,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -512,59 -795,46 +799,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -573,49 -843,101 +847,101 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUFFIXES = 
+ EXTRA_DIST = 
+ BUILT_SOURCES = 
+ MOSTLYCLEANFILES = 
+ # config.status leaves config.log files around
+ CLEANFILES = config.log *.test.c
+ # and we'll need to clean up our generated files for distclean
+ DISTCLEANFILES = $(SCRIPTS_SHELL) $(SCRIPTS_PERL) $(SCRIPTS_AWK)
+ MAINTAINERCLEANFILES = 
+ # syntax-check shell scripts on 'make check'
+ CHECK_SHELL = $(SCRIPTS_SHELL)
+ # sed expression to strip leading directories from a filename; this converts e.g.,
+ # src/foo/bar.so to bar.so.
+ strip_leading_dirs = s|^.*/||
  INCLUDES = -I$(top_builddir)/common-src \
                -I$(top_srcdir)/common-src   \
                -I$(top_srcdir)/restore-src  \
-               -I$(top_srcdir)/tape-src     \
                -I$(top_srcdir)/amandad-src  \
+               -I$(top_srcdir)/device-src   \
                -I$(top_srcdir)/gnulib
  
- LINT = @AMLINT@
- LINTFLAGS = @AMLINTFLAGS@
- lib_LTLIBRARIES = libamserver.la
- LIB_EXTENSION = la
- sbin_SCRIPTS = amcheckdb      amcleanup       amdump          \
-                       amoverview      amrmtape        amtoc           \
-                       amverify        amverifyrun     amstatus        \
-                       amcrypt         amaespipe       amcrypt-ossl    \
-                       amcrypt-ossl-asym
- libamserver_la_SOURCES = amindex.c    changer.c                       \
-                       diskfile.c      driverio.c      cmdline.c  \
-                       holding.c       infofile.c      logfile.c       \
-                       tapefile.c      find.c          server_util.c   \
-                         taperscan.c
+ AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
+ LINT = $(AMLINT)
+ LINTFLAGS = $(AMLINTFLAGS)
+ amlib_LTLIBRARIES = libamserver.la
+ # Exclude scripts which depend on perl extension modules from the syntax checks
+ CHECK_PERL = \
+           amaddclient \
+           amoverview \
+           amserverconfig \
+           amstatus \
+           amtoc
+ SCRIPTS_PERL = \
+           $(CHECK_PERL) \
+           amdevcheck \
+           amcheckdump
+ SCRIPTS_SHELL = \
+           amcheckdb \
+           amcleanup \
+           amdump \
+           amrmtape \
+           amverify \
+           amverifyrun
+ sbin_SCRIPTS = $(SCRIPTS_PERL) $(SCRIPTS_SHELL)
+ INSTALLPERMS_exec = \
+       dest=$(sbindir) chown=amanda chmod= \
+               $(sbin_PROGRAMS) \
+       chown=root chmod=u+s,o-rwx \
+               amcheck \
+       dest=$(amlibexecdir) chown=amanda chmod= \
+               $(amlibexec_PROGRAMS) \
+       chown=root chmod=u+s,o-rwx \
+               dumper planner
+ INSTALLPERMS_data = \
+       dest=$(sbindir) chown=amanda chmod= \
+               $(sbin_SCRIPTS) \
+       dest=$(amlibexecdir) chown=amanda chmod= \
+               $(amlibexec_SCRIPTS)
  
- libamserver_la_LDFLAGS = -release $(VERSION)
  
  ###
  # Because libamanda includes routines (e.g. regex) provided by some system
  # need to list libamanda twice here, first to override the system library
  # routines, and second to pick up any references in the other libraries.
  ###
- LDADD = ../common-src/libamanda.$(LIB_EXTENSION)   \
-       libamserver.$(LIB_EXTENSION)               \
-       ../tape-src/libamtape.$(LIB_EXTENSION)     \
-       ../common-src/libamanda.$(LIB_EXTENSION)   \
-       ../tape-src/libamtape.$(LIB_EXTENSION)     \
-       ../common-src/libamanda.$(LIB_EXTENSION)   \
-       ../gnulib/libgnu.$(LIB_EXTENSION)          \
+ LDADD = ../common-src/libamanda.la   \
+       libamserver.la               \
+       ../device-src/libamdevice.la     \
+       ../common-src/libamanda.la   \
+       ../gnulib/libgnu.la          \
          $(READLINE_LIBS)
  
- amindexd_LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
-       libamserver.$(LIB_EXTENSION) \
-       ../amandad-src/libamandad.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../tape-src/libamtape.$(LIB_EXTENSION) \
-       ../common-src/libamanda.$(LIB_EXTENSION) \
-       ../gnulib/libgnu.$(LIB_EXTENSION)
+ libamserver_la_SOURCES = amindex.c    changer.c                       \
+                       diskfile.c      driverio.c      cmdline.c  \
+                       holding.c       infofile.c      logfile.c       \
+                       tapefile.c      find.c          server_util.c   \
+                         taperscan.c
+ libamserver_la_LDFLAGS = -release $(VERSION)
+ libamserver_la_LIBADD = ../device-src/libamdevice.la \
+                      ../common-src/libamanda.la
+ taper_source_test_SOURCES = taper-source-test.c \
+                       taper-source.c \
+                       taper-file-source.c \
+                       taper-port-source.c \
+                       taper-disk-port-source.c \
+                       taper-mem-port-source.c
+ taper_SOURCES = taper.c \
+                       taper-source.c \
+                       taper-file-source.c \
+                       taper-port-source.c \
+                       taper-disk-port-source.c \
+                       taper-mem-port-source.c
+ taper_LDADD = $(LDADD) \
+       ../amandad-src/libamandad.la
+ taper_source_test_LDADD = $(LDADD) \
+       ../amandad-src/libamandad.la
+ amindexd_LDADD = $(LDADD) \
+       ../amandad-src/libamandad.la
  
- SUFFIXES = .sh .pl
  
  # there are used for testing only:
  TEST_PROGS = diskfile infofile
- CLEANFILES = *.test.c $(sbin_SCRIPTS)
  amindexd_CSRC = amindexd.c    disk_history.c  list_dir.c
  amindexd_SOURCES = disk_history.h     list_dir.h      $(amindexd_CSRC)
  amreport_SOURCES = reporter.c
  amgetconf_SOURCES = getconf.c
- noinst_HEADERS = amindex.h    changer.h                       \
+ noinst_HEADERS = amindex.h    changer.h       cmdline.h       \
                        diskfile.h      driverio.h      \
                        holding.h       infofile.h      logfile.h       \
                        tapefile.h      find.h          server_util.h   \
-                       taperscan.h cmdline.h
+                       taperscan.h taper-disk-port-source.h \
+                       taper-mem-port-source.h  taper-file-source.h \
+                       taper-port-source.h taper-source.h
  
  diskfile_SOURCES = diskfile.test.c
  infofile_SOURCES = infofile.test.c
- all: all-am
+ all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
  
  .SUFFIXES:
- .SUFFIXES: .sh .pl .c .lo .o .obj
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ .SUFFIXES: .c .lo .o .obj
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/vars.am $(top_srcdir)/config/automake/scripts.am $(top_srcdir)/config/automake/installperms.am $(top_srcdir)/config/automake/precompile.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -691,94 -1036,73 +1040,73 @@@ $(top_srcdir)/configure:  $(am__configu
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
- amcheckdb.sh: $(top_builddir)/config.status $(srcdir)/amcheckdb.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amcleanup.sh: $(top_builddir)/config.status $(srcdir)/amcleanup.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amdump.sh: $(top_builddir)/config.status $(srcdir)/amdump.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amfreetapes.sh: $(top_builddir)/config.status $(srcdir)/amfreetapes.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amoverview.pl: $(top_builddir)/config.status $(srcdir)/amoverview.pl.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amrmtape.sh: $(top_builddir)/config.status $(srcdir)/amrmtape.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amtoc.pl: $(top_builddir)/config.status $(srcdir)/amtoc.pl.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amverify.sh: $(top_builddir)/config.status $(srcdir)/amverify.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amstatus.pl: $(top_builddir)/config.status $(srcdir)/amstatus.pl.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amverifyrun.sh: $(top_builddir)/config.status $(srcdir)/amverifyrun.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amcrypt.sh: $(top_builddir)/config.status $(srcdir)/amcrypt.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amaespipe.sh: $(top_builddir)/config.status $(srcdir)/amaespipe.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amcrypt-ossl.sh: $(top_builddir)/config.status $(srcdir)/amcrypt-ossl.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- amcrypt-ossl-asym.sh: $(top_builddir)/config.status $(srcdir)/amcrypt-ossl-asym.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
- install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
            f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           echo " $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(amlibdir)/$$f'"; \
+           $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(amlibdir)/$$f"; \
          else :; fi; \
        done
  
- uninstall-libLTLIBRARIES:
+ uninstall-amlibLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(amlibdir)/$$p'"; \
+         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(amlibdir)/$$p"; \
        done
  
- clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ clean-amlibLTLIBRARIES:
+       -test -z "$(amlib_LTLIBRARIES)" || rm -f $(amlib_LTLIBRARIES)
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
          test "$$dir" != "$$p" || dir=.; \
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
  libamserver.la: $(libamserver_la_OBJECTS) $(libamserver_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libamserver_la_LDFLAGS) $(libamserver_la_OBJECTS) $(libamserver_la_LIBADD) $(LIBS)
- install-libexecPROGRAMS: $(libexec_PROGRAMS)
+       $(libamserver_la_LINK) -rpath $(amlibdir) $(libamserver_la_OBJECTS) $(libamserver_la_LIBADD) $(LIBS)
+ install-amlibexecPROGRAMS: $(amlibexec_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       test -z "$(amlibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibexecdir)"
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
             || test -f $$p1 \
          ; then \
            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(amlibexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(amlibexecdir)/$$f" || exit 1; \
          else :; fi; \
        done
  
- uninstall-libexecPROGRAMS:
+ uninstall-amlibexecPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
+         echo " rm -f '$(DESTDIR)$(amlibexecdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(amlibexecdir)/$$f"; \
        done
  
- clean-libexecPROGRAMS:
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ clean-amlibexecPROGRAMS:
+       @list='$(amlibexec_PROGRAMS)'; for p in $$list; do \
+         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         echo " rm -f $$p $$f"; \
+         rm -f $$p $$f ; \
+       done
+ clean-noinstPROGRAMS:
+       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
          f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
  install-sbinPROGRAMS: $(sbin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
+       test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
        @list='$(sbin_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
@@@ -806,64 -1130,67 +1134,67 @@@ clean-sbinPROGRAMS
        done
  amadmin$(EXEEXT): $(amadmin_OBJECTS) $(amadmin_DEPENDENCIES) 
        @rm -f amadmin$(EXEEXT)
-       $(LINK) $(amadmin_LDFLAGS) $(amadmin_OBJECTS) $(amadmin_LDADD) $(LIBS)
+       $(LINK) $(amadmin_OBJECTS) $(amadmin_LDADD) $(LIBS)
  amcheck$(EXEEXT): $(amcheck_OBJECTS) $(amcheck_DEPENDENCIES) 
        @rm -f amcheck$(EXEEXT)
-       $(LINK) $(amcheck_LDFLAGS) $(amcheck_OBJECTS) $(amcheck_LDADD) $(LIBS)
+       $(LINK) $(amcheck_OBJECTS) $(amcheck_LDADD) $(LIBS)
  amcleanupdisk$(EXEEXT): $(amcleanupdisk_OBJECTS) $(amcleanupdisk_DEPENDENCIES) 
        @rm -f amcleanupdisk$(EXEEXT)
-       $(LINK) $(amcleanupdisk_LDFLAGS) $(amcleanupdisk_OBJECTS) $(amcleanupdisk_LDADD) $(LIBS)
+       $(LINK) $(amcleanupdisk_OBJECTS) $(amcleanupdisk_LDADD) $(LIBS)
  amflush$(EXEEXT): $(amflush_OBJECTS) $(amflush_DEPENDENCIES) 
        @rm -f amflush$(EXEEXT)
-       $(LINK) $(amflush_LDFLAGS) $(amflush_OBJECTS) $(amflush_LDADD) $(LIBS)
+       $(LINK) $(amflush_OBJECTS) $(amflush_LDADD) $(LIBS)
  amgetconf$(EXEEXT): $(amgetconf_OBJECTS) $(amgetconf_DEPENDENCIES) 
        @rm -f amgetconf$(EXEEXT)
-       $(LINK) $(amgetconf_LDFLAGS) $(amgetconf_OBJECTS) $(amgetconf_LDADD) $(LIBS)
+       $(LINK) $(amgetconf_OBJECTS) $(amgetconf_LDADD) $(LIBS)
  amindexd$(EXEEXT): $(amindexd_OBJECTS) $(amindexd_DEPENDENCIES) 
        @rm -f amindexd$(EXEEXT)
-       $(LINK) $(amindexd_LDFLAGS) $(amindexd_OBJECTS) $(amindexd_LDADD) $(LIBS)
+       $(LINK) $(amindexd_OBJECTS) $(amindexd_LDADD) $(LIBS)
  amlabel$(EXEEXT): $(amlabel_OBJECTS) $(amlabel_DEPENDENCIES) 
        @rm -f amlabel$(EXEEXT)
-       $(LINK) $(amlabel_LDFLAGS) $(amlabel_OBJECTS) $(amlabel_LDADD) $(LIBS)
+       $(LINK) $(amlabel_OBJECTS) $(amlabel_LDADD) $(LIBS)
  amlogroll$(EXEEXT): $(amlogroll_OBJECTS) $(amlogroll_DEPENDENCIES) 
        @rm -f amlogroll$(EXEEXT)
-       $(LINK) $(amlogroll_LDFLAGS) $(amlogroll_OBJECTS) $(amlogroll_LDADD) $(LIBS)
+       $(LINK) $(amlogroll_OBJECTS) $(amlogroll_LDADD) $(LIBS)
  amreport$(EXEEXT): $(amreport_OBJECTS) $(amreport_DEPENDENCIES) 
        @rm -f amreport$(EXEEXT)
-       $(LINK) $(amreport_LDFLAGS) $(amreport_OBJECTS) $(amreport_LDADD) $(LIBS)
+       $(LINK) $(amreport_OBJECTS) $(amreport_LDADD) $(LIBS)
  amtape$(EXEEXT): $(amtape_OBJECTS) $(amtape_DEPENDENCIES) 
        @rm -f amtape$(EXEEXT)
-       $(LINK) $(amtape_LDFLAGS) $(amtape_OBJECTS) $(amtape_LDADD) $(LIBS)
+       $(LINK) $(amtape_OBJECTS) $(amtape_LDADD) $(LIBS)
  amtrmidx$(EXEEXT): $(amtrmidx_OBJECTS) $(amtrmidx_DEPENDENCIES) 
        @rm -f amtrmidx$(EXEEXT)
-       $(LINK) $(amtrmidx_LDFLAGS) $(amtrmidx_OBJECTS) $(amtrmidx_LDADD) $(LIBS)
+       $(LINK) $(amtrmidx_OBJECTS) $(amtrmidx_LDADD) $(LIBS)
  amtrmlog$(EXEEXT): $(amtrmlog_OBJECTS) $(amtrmlog_DEPENDENCIES) 
        @rm -f amtrmlog$(EXEEXT)
-       $(LINK) $(amtrmlog_LDFLAGS) $(amtrmlog_OBJECTS) $(amtrmlog_LDADD) $(LIBS)
+       $(LINK) $(amtrmlog_OBJECTS) $(amtrmlog_LDADD) $(LIBS)
  chunker$(EXEEXT): $(chunker_OBJECTS) $(chunker_DEPENDENCIES) 
        @rm -f chunker$(EXEEXT)
-       $(LINK) $(chunker_LDFLAGS) $(chunker_OBJECTS) $(chunker_LDADD) $(LIBS)
+       $(LINK) $(chunker_OBJECTS) $(chunker_LDADD) $(LIBS)
  diskfile$(EXEEXT): $(diskfile_OBJECTS) $(diskfile_DEPENDENCIES) 
        @rm -f diskfile$(EXEEXT)
-       $(LINK) $(diskfile_LDFLAGS) $(diskfile_OBJECTS) $(diskfile_LDADD) $(LIBS)
+       $(LINK) $(diskfile_OBJECTS) $(diskfile_LDADD) $(LIBS)
  driver$(EXEEXT): $(driver_OBJECTS) $(driver_DEPENDENCIES) 
        @rm -f driver$(EXEEXT)
-       $(LINK) $(driver_LDFLAGS) $(driver_OBJECTS) $(driver_LDADD) $(LIBS)
+       $(LINK) $(driver_OBJECTS) $(driver_LDADD) $(LIBS)
  dumper$(EXEEXT): $(dumper_OBJECTS) $(dumper_DEPENDENCIES) 
        @rm -f dumper$(EXEEXT)
-       $(LINK) $(dumper_LDFLAGS) $(dumper_OBJECTS) $(dumper_LDADD) $(LIBS)
+       $(LINK) $(dumper_OBJECTS) $(dumper_LDADD) $(LIBS)
  infofile$(EXEEXT): $(infofile_OBJECTS) $(infofile_DEPENDENCIES) 
        @rm -f infofile$(EXEEXT)
-       $(LINK) $(infofile_LDFLAGS) $(infofile_OBJECTS) $(infofile_LDADD) $(LIBS)
+       $(LINK) $(infofile_OBJECTS) $(infofile_LDADD) $(LIBS)
  planner$(EXEEXT): $(planner_OBJECTS) $(planner_DEPENDENCIES) 
        @rm -f planner$(EXEEXT)
-       $(LINK) $(planner_LDFLAGS) $(planner_OBJECTS) $(planner_LDADD) $(LIBS)
+       $(LINK) $(planner_OBJECTS) $(planner_LDADD) $(LIBS)
  taper$(EXEEXT): $(taper_OBJECTS) $(taper_DEPENDENCIES) 
        @rm -f taper$(EXEEXT)
-       $(LINK) $(taper_LDFLAGS) $(taper_OBJECTS) $(taper_LDADD) $(LIBS)
+       $(LINK) $(taper_OBJECTS) $(taper_LDADD) $(LIBS)
+ taper_source_test$(EXEEXT): $(taper_source_test_OBJECTS) $(taper_source_test_DEPENDENCIES) 
+       @rm -f taper_source_test$(EXEEXT)
+       $(LINK) $(taper_source_test_OBJECTS) $(taper_source_test_LDADD) $(LIBS)
  install-sbinSCRIPTS: $(sbin_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
+       test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
        @list='$(sbin_SCRIPTS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          if test -f $$d$$p; then \
@@@ -918,26 -1245,32 +1249,32 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reporter.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server_util.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tapefile.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taper-disk-port-source.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taper-file-source.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taper-mem-port-source.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taper-port-source.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taper-source-test.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taper-source.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taper.Po@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/taperscan.Plo@am__quote@
  
  .c.o:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c $<
  
  .c.obj:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
  
  .c.lo:
- @am__fastdepCC_TRUE@  if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@@ -948,10 -1281,6 +1285,6 @@@ mostlyclean-libtool
  clean-libtool:
        -rm -rf .libs _libs
  
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@@ -1001,22 -1330,21 +1334,21 @@@ distclean-tags
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
            || exit 1; \
          fi; \
        done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
  check-am: all-am
- check: check-am
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+ check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
  all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(HEADERS)
  installdirs:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(amlibexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
- install: install-am
+ install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
  install-exec: install-exec-am
  install-data: install-data-am
  uninstall: uninstall-am
@@@ -1049,26 -1383,33 +1387,33 @@@ install-strip
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
  mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
  
  clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
  
  distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
  
  maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ @WANT_INSTALLPERMS_FALSE@install-exec-hook:
+ @WANT_INSTALLPERMS_FALSE@install-data-hook:
  clean: clean-am
  
- clean-am: clean-generic clean-libLTLIBRARIES clean-libexecPROGRAMS \
-       clean-libtool clean-sbinPROGRAMS mostlyclean-am
+ clean-am: clean-amlibLTLIBRARIES clean-amlibexecPROGRAMS clean-generic \
+       clean-libtool clean-noinstPROGRAMS clean-sbinPROGRAMS \
+       mostlyclean-am
  
  distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
  
  dvi: dvi-am
  
@@@ -1080,17 -1421,27 +1425,27 @@@ info: info-a
  
  info-am:
  
- install-data-am:
+ install-data-am: install-amlibLTLIBRARIES
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
  
- install-exec-am: install-libLTLIBRARIES install-libexecPROGRAMS \
-       install-sbinPROGRAMS install-sbinSCRIPTS
+ install-exec-am: install-amlibexecPROGRAMS install-sbinPROGRAMS \
+       install-sbinSCRIPTS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
  
+ install-html: install-html-am
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -1111,79 -1462,163 +1466,163 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
-       uninstall-libexecPROGRAMS uninstall-sbinPROGRAMS \
-       uninstall-sbinSCRIPTS
- .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libLTLIBRARIES clean-libexecPROGRAMS clean-libtool \
-       clean-sbinPROGRAMS ctags distclean distclean-compile \
-       distclean-generic distclean-libtool distclean-tags distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-exec-hook install-info install-info-am \
-       install-libLTLIBRARIES install-libexecPROGRAMS install-man \
-       install-sbinPROGRAMS install-sbinSCRIPTS install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-compile \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-info-am \
-       uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS \
+ uninstall-am: uninstall-amlibLTLIBRARIES uninstall-amlibexecPROGRAMS \
        uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS
  
+ .MAKE: install-am install-data-am install-exec-am install-strip
+ .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-amlibLTLIBRARIES clean-amlibexecPROGRAMS clean-generic \
+       clean-libtool clean-noinstPROGRAMS clean-sbinPROGRAMS ctags \
+       dist-hook distclean distclean-compile distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am \
+       install-amlibLTLIBRARIES install-amlibexecPROGRAMS \
+       install-data install-data-am install-data-hook install-dvi \
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-sbinPROGRAMS install-sbinSCRIPTS \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-amlibLTLIBRARIES uninstall-amlibexecPROGRAMS \
+       uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS
  
- .pl:
-                       cat $< > $@
-                       chmod a+x $@
-                       -test -z "$(PERL)" || $(PERL) -c -w -W -t -T $@
  
- .sh:
-                       cat $< > $@
-                       chmod a+x $@
+ # Perl
+ %: %.pl $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
  
- install-exec-hook:
-       @list="$(sbin_PROGRAMS) $(sbin_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
-       @list="$(libexec_PROGRAMS) $(libexec_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
-       @list="amcheck"; \
-       for p in $$list; do \
-               if echo "$(sbin_PROGRAMS)" | grep $$p >/dev/null 2>&1; then \
-                       pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
-                       echo chown root $$pa; \
-                       chown root $$pa; \
-                       echo chmod u+s,o-rwx $$pa; \
-                       chmod u+s,o-rwx $$pa; \
-               else true; \
-               fi; \
-       done
+ %.pl: %.pl.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ %.pm: %.pm.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Shell
+ %: %.sh $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.sh: %.sh.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+ # Awk
+ %: %.awk $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
+       chmod a+x $@
+ %.awk: %.awk.in $(top_builddir)/config.status
+       $(top_builddir)/config.status --file=$@:$<
  
-       @list="dumper planner"; \
-       for p in $$list; do \
-               if echo "$(libexec_PROGRAMS)" | grep $$p >/dev/null 2>&1; then \
-                       pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
-                       echo chown root $$pa; \
-                       chown root $$pa; \
-                       echo chmod u+s,o-rwx $$pa; \
-                       chmod u+s,o-rwx $$pa; \
-               else true; \
+ # syntax-check perl scripts on 'make check'
+ check-perl: $(CHECK_PERL)
+       @CHECK_PERL="$(CHECK_PERL)"; \
+       if test -n "$(PERL)"; then \
+               for perlobj in $$CHECK_PERL; do \
+                       $(PERL) $(CHECK_PERL_FLAGS) -c -w -T $$perlobj || exit 1; \
+               done; \
+       fi
+ check-local: check-perl
+ check-shell: $(CHECK_SHELL)
+       @CHECK_SHELL="$(CHECK_SHELL)"; \
+       if test -n "$$CHECK_SHELL"; then \
+               if test -n "$(BASH)"; then \
+                       for shobj in $$CHECK_SHELL; do \
+                               if $(BASH) -n $$shobj; then \
+                                       echo "$$shobj syntax OK"; \
+                               else \
+                                       echo "$$shobj syntax error"; \
+                                       exit 1; \
+                               fi; \
+                       done; \
+               else \
+                       echo "No 'bash' available -- cannot syntax-check shell scripts"; \
                fi; \
-       done
+       fi
+ check-local: check-shell
+ # make sure that the sources for all shell and perl scripts get included
+ # in the distribution
+ dist-scripts:
+       SCRIPTS_PERL="$(SCRIPTS_PERL)"; SCRIPTS_SHELL="$(SCRIPTS_SHELL)"; SCRIPTS_AWK="$(SCRIPTS_AWK)"; \
+       for script in $$SCRIPTS_PERL; do \
+               test -f $(srcdir)/$${script}.pl && { cp -p $(srcdir)/$${script}.pl $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL; do \
+               test -f $(srcdir)/$${script}.sh && { cp -p $(srcdir)/$${script}.sh $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.awk && { cp -p $(srcdir)/$${script}.awk $(distdir)/ || exit 1; } \
+       done; \
+       for script in $$SCRIPTS_SHELL $$SCRIPTS_PERL $$SCRIPTS_AWK; do \
+               test -f $(srcdir)/$${script}.in && { cp -p $(srcdir)/$${script}.in $(distdir)/ || exit 1; } \
+       done; \
+       true
+ dist-hook: dist-scripts
+ @WANT_INSTALLPERMS_TRUE@installperms-exec:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_exec)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on executables"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@installperms-data:
+ @WANT_INSTALLPERMS_TRUE@      @installperms="$(INSTALLPERMS_data)"; \
+ @WANT_INSTALLPERMS_TRUE@      test -n "$$installperms" && echo "Setting installation permissions on data"; \
+ @WANT_INSTALLPERMS_TRUE@      dest=; chown=; chmod=; \
+ @WANT_INSTALLPERMS_TRUE@      for cmd in $$installperms; do \
+ @WANT_INSTALLPERMS_TRUE@          case "$$cmd" in \
+ @WANT_INSTALLPERMS_TRUE@              chown=amanda) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; chown="$(BINARY_OWNER):$(SETUID_GROUP)";; \
+ @WANT_INSTALLPERMS_TRUE@              dest=*|chown=*|chmod=*) \
+ @WANT_INSTALLPERMS_TRUE@                      echo "  ($$cmd)"; eval $$cmd;; \
+ @WANT_INSTALLPERMS_TRUE@              *)  pa="$(DESTDIR)$$dest"/`echo "$$cmd"|sed '$(strip_leading_dirs)'|sed '$(transform)'`; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chown"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chown "$$chown" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chown "$$chown" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@                  if test -n "$$chmod"; then \
+ @WANT_INSTALLPERMS_TRUE@                      echo chmod "$$chmod" "$$pa"; \
+ @WANT_INSTALLPERMS_TRUE@                      chmod "$$chmod" "$$pa" || exit 1; \
+ @WANT_INSTALLPERMS_TRUE@                  fi; \
+ @WANT_INSTALLPERMS_TRUE@          esac; \
+ @WANT_INSTALLPERMS_TRUE@      done
+ @WANT_INSTALLPERMS_TRUE@install-exec-hook: installperms-exec
+ @WANT_INSTALLPERMS_TRUE@install-data-hook: installperms-data
+ # A rule to make precompiler output from C files.  This is not used during
+ # ordinary builds, but but can very useful in debugging problems on strange
+ # architectures.  With this rule, we can ask users to 'make foo.i' and send
+ # the result to us.
+ #
+ # It touches some automake internals ($COMPILE), but since it's not
+ # build-critical, that's OK.
+ %.i : %.c
+       $(COMPILE) -E -o $@ $<
  
  lint:
-       @ for p in $(libexec_PROGRAMS) $(sbin_PROGRAMS); do                     \
+       @ for p in $(amlibexec_PROGRAMS) $(sbin_PROGRAMS); do                   \
                if [ $$p = "amindexd" ]; then                                   \
                        s="$(amindexd_CSRC)";                                   \
                elif [ $$p = "amreport" ]; then                                 \
                (cd ../tape-src; make listlibsrc);                              \
                f="$$f "`cat ../tape-src/listlibsrc.output`;                    \
                echo $(LINT) $$f;                                               \
-               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config        \
+               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config   \
                    $(INCLUDES) $$f;                                            \
                if [ $$? -ne 0 ]; then                                          \
                    exit 1;                                                     \
diff --combined server-src/amcheck.c
index 4498cd7a6bf77a04830c3ae677fe3817dcb6f11c,fdbd8cfb74f3729e52106196edc1223b03c91fbd..fa2a8aa4ee60c454ef69daf00e79bf5f5b057580
  #include "amanda.h"
  #include "util.h"
  #include "conffile.h"
- #include "statfs.h"
+ #include "columnar.h"
+ #include "fsusage.h"
  #include "diskfile.h"
  #include "tapefile.h"
- #include "tapeio.h"
  #include "changer.h"
  #include "packet.h"
  #include "security.h"
@@@ -47,6 -47,9 +47,9 @@@
  #include "server_util.h"
  #include "pipespawn.h"
  #include "amfeatures.h"
+ #include "device.h"
+ #include "property.h"
+ #include "timestamp.h"
  
  #define BUFFER_SIZE   32768
  
@@@ -63,18 -66,16 +66,16 @@@ void usage(void)
  pid_t start_client_checks(int fd);
  pid_t start_server_check(int fd, int do_localchk, int do_tapechk);
  int main(int argc, char **argv);
+ int check_tapefile(FILE *outf, char *tapefile);
  int test_server_pgm(FILE *outf, char *dir, char *pgm, int suid, uid_t dumpuid);
  
  void
  usage(void)
  {
-     error("Usage: amcheck%s [-am] [-w] [-sclt] [-M <address>] <conf> [host [disk]* ]* [-o configoption]*", versionsuffix());
+     error(_("Usage: amcheck%s [-am] [-w] [-sclt] [-M <address>] <conf> [host [disk]* ]* [-o configoption]*"), versionsuffix());
      /*NOTREACHED*/
  }
  
- static unsigned long malloc_hist_1, malloc_size_1;
- static unsigned long malloc_hist_2, malloc_size_2;
  static am_feature_t *our_features = NULL;
  static char *our_feature_string = NULL;
  static char *displayunit;
@@@ -102,19 -103,30 +103,30 @@@ main
      int mailout;
      int alwaysmail;
      char *tempfname = NULL;
-     char *conffile;
      char *conf_diskfile;
      char *dumpuser;
      struct passwd *pw;
      uid_t uid_me;
-     int    new_argc,   my_argc;
-     char **new_argv, **my_argv;
      char *errstr;
+     config_overwrites_t *cfg_ovr;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(-1, 0);
      safe_cd();
  
      set_pname("amcheck");
+     /* drop root privileges */
+     if (!set_root_privs(0)) {
+       error(_("amcheck must be run setuid root"));
+     }
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
      dbopen(DBG_SUBDIR_SERVER);
  
      memset(buffer, 0, sizeof(buffer));
-     malloc_size_1 = malloc_inuse(&malloc_hist_1);
  
-     snprintf(pid_str, SIZEOF(pid_str), "%ld", (long)getpid());
+     g_snprintf(pid_str, SIZEOF(pid_str), "%ld", (long)getpid());
  
      erroutput_type = ERR_INTERACTIVE;
  
      our_features = am_init_feature_set();
      our_feature_string = am_feature_to_string(our_features);
  
-     if(geteuid() == 0) {
-       seteuid(getuid());
-     }
      uid_me = getuid();
  
      alwaysmail = mailout = overwrite = 0;
      server_probs = client_probs = 0;
      tempfd = mainfd = -1;
  
 +    parse_conf(argc, argv, &new_argc, &new_argv);
 +    my_argc = new_argc;
 +    my_argv = new_argv;
 +
      /* process arguments */
  
-     while((opt = getopt(my_argc, my_argv, "M:mawsclt")) != EOF) {
+     cfg_ovr = new_config_overwrites(argc/2);
+     while((opt = getopt(argc, argv, "M:mawsclto:")) != EOF) {
        switch(opt) {
        case 'M':       mailto=stralloc(optarg);
                        if(!validate_mailto(mailto)){
-                          printf("Invalid characters in mail address\n");
+                          g_printf(_("Invalid characters in mail address\n"));
                           exit(1);
                        }
                        /*FALLTHROUGH*/
  #ifdef MAILER
                        mailout = 1;
  #else
-                       printf("You can't use -%c because configure didn't find a mailer.\n",
+                       g_printf(_("You can't use -%c because configure didn't "
+                                "find a mailer./usr/bin/mail not found\n"),
                                opt);
                        exit(1);
  #endif
                        mailout = 1;
                        alwaysmail = 1;
  #else
-                       printf("You can't use -%c because configure didn't find a mailer.\n",
+                       g_printf(_("You can't use -%c because configure didn't "
+                                "find a mailer./usr/bin/mail not found\n"),
                                opt);
                        exit(1);
  #endif
                        break;
        case 'w':       overwrite = 1;
                        break;
+       case 'o':       add_config_overwrite_opt(cfg_ovr, optarg);
+                       break;
        case 't':       do_tapechk = 1;
                        break;
        case '?':
            usage();
        }
      }
-     my_argc -= optind, my_argv += optind;
-     if(my_argc < 1) usage();
+     argc -= optind, argv += optind;
+     if(argc < 1) usage();
  
  
      if ((do_localchk | do_clientchk | do_tapechk) == 0) {
      if(overwrite)
        do_tapechk = 1;
  
-     config_name = stralloc(*my_argv);
-     config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     if(read_conffile(conffile)) {
-       error("errors processing config file \"%s\"", conffile);
-       /*NOTREACHED*/
-     }
+     config_init(CONFIG_INIT_EXPLICIT_NAME|CONFIG_INIT_FATAL,
+               argv[0]);
+     apply_config_overwrites(cfg_ovr);
      dbrename(config_name, DBG_SUBDIR_SERVER);
  
-     report_bad_conf_arg();
-     amfree(conffile);
      if(mailout && !mailto && 
         (getconf_seen(CNF_MAILTO)==0 || strlen(getconf_str(CNF_MAILTO)) == 0)) {
-       printf("\nNo mail address configured in  amanda.conf\n");
+       g_printf(_("\nWARNING:No mail address configured in  amanda.conf.\n"));
+       g_printf(_("To receive dump results by email configure the "
+                "\"mailto\" parameter in amanda.conf\n"));
          if(alwaysmail)        
-               printf("When using -a option please specify -Maddress also\n\n"); 
+               g_printf(_("When using -a option please specify -Maddress also\n\n")); 
        else
-               printf("Use -Maddress instead of -m\n\n"); 
+               g_printf(_("Use -Maddress instead of -m\n\n")); 
        exit(1);
      }
      if(mailout && !mailto)
         if(getconf_seen(CNF_MAILTO) && 
            strlen(getconf_str(CNF_MAILTO)) > 0) {
            if(!validate_mailto(getconf_str(CNF_MAILTO))){
-               printf("\nMail address in amanda.conf has invalid characters"); 
-               printf("\nNo email will be sent\n"); 
+               g_printf(_("\nMail address in amanda.conf has invalid characters")); 
+               g_printf(_("\nNo email will be sent\n")); 
                  mailout = 0;
            }
         }
         else {
-         printf("\nNo mail address configured in  amanda.conf\n");
+         g_printf(_("\nNo mail address configured in  amanda.conf\n"));
            if(alwaysmail)        
-               printf("When using -a option please specify -Maddress also\n\n"); 
+               g_printf(_("When using -a option please specify -Maddress also\n\n")); 
          else
-               printf("Use -Maddress instead of -m\n\n"); 
+               g_printf(_("Use -Maddress instead of -m\n\n")); 
          exit(1);
        }
      }
  
      conf_ctimeout = (time_t)getconf_int(CNF_CTIMEOUT);
  
-     conf_diskfile = getconf_str(CNF_DISKFILE);
-     if (*conf_diskfile == '/') {
-       conf_diskfile = stralloc(conf_diskfile);
-     } else {
-       conf_diskfile = stralloc2(config_dir, conf_diskfile);
-     }
+     conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
      if(read_diskfile(conf_diskfile, &origq) < 0) {
-       error("could not load disklist %s", conf_diskfile);
+       error(_("could not load disklist %s. Make sure it exists and has correct permissions"), conf_diskfile);
        /*NOTREACHED*/
      }
-     errstr = match_disklist(&origq, my_argc-1, my_argv+1);
+     errstr = match_disklist(&origq, argc-1, argv+1);
      if (errstr) {
-       printf("%s",errstr);
+       g_printf(_("%s"),errstr);
        amfree(errstr);
      }
      amfree(conf_diskfile);
  
      /*
-      * Make sure we are running as the dump user.
+      * Make sure we are running as the dump user.  Don't use
+      * check_running_as(..) here, because we want to produce more
+      * verbose error messages.
       */
      dumpuser = getconf_str(CNF_DUMPUSER);
      if ((pw = getpwnam(dumpuser)) == NULL) {
-       error("cannot look up dump user \"%s\"", dumpuser);
+       error(_("amanda.conf has dump user configured to \"%s\", but that user does not exist."), dumpuser);
        /*NOTREACHED*/
      }
      uid_dumpuser = pw->pw_uid;
      if ((pw = getpwuid(uid_me)) == NULL) {
-       error("cannot look up my own uid (%ld)", (long)uid_me);
+       error(_("cannot get username for running user, uid %ld is not in your user database."),
+           (long)uid_me);
        /*NOTREACHED*/
      }
+ #ifdef CHECK_USERID
      if (uid_me != uid_dumpuser) {
-       error("running as user \"%s\" instead of \"%s\"",
-             pw->pw_name, dumpuser);
+       error(_("running as user \"%s\" instead of \"%s\".\n"
+               "Change user to \"%s\" or change dump user to \"%s\" in amanda.conf"),
+             pw->pw_name, dumpuser, dumpuser, pw->pw_name);
          /*NOTREACHED*/
      }
+ #endif
  
      displayunit = getconf_str(CNF_DISPLAYUNIT);
      unitdivisor = getconf_unit_divisor();
        /* we need the temp file */
        tempfname = vstralloc(AMANDA_TMPDIR, "/amcheck.temp.", pid_str, NULL);
        if((tempfd = open(tempfname, O_RDWR|O_CREAT|O_TRUNC, 0600)) == -1) {
-           error("could not open %s: %s", tempfname, strerror(errno));
+           error(_("could not open temporary amcheck output file %s: %s. Check permissions"), tempfname, strerror(errno));
            /*NOTREACHED*/
        }
        unlink(tempfname);                      /* so it goes away on close */
        /* the main fd is a file too */
        mainfname = vstralloc(AMANDA_TMPDIR, "/amcheck.main.", pid_str, NULL);
        if((mainfd = open(mainfname, O_RDWR|O_CREAT|O_TRUNC, 0600)) == -1) {
-           error("could not open %s: %s", mainfname, strerror(errno));
+           error(_("could not open amcheck server output file %s: %s. Check permissions"), mainfname, strerror(errno));
            /*NOTREACHED*/
        }
        unlink(mainfname);                      /* so it goes away on close */
            server_probs = WIFSIGNALED(retstat) || WEXITSTATUS(retstat);
            serverchk_pid = 0;
        } else {
-           char number[NUM_STR_SIZE];
            char *wait_msg = NULL;
  
-           snprintf(number, SIZEOF(number), "%ld", (long)pid);
-           wait_msg = vstralloc("parent: reaped bogus pid ", number, "\n",
-                                NULL);
+           wait_msg = vstrallocf(_("parent: reaped bogus pid %ld\n"), (long)pid);
            if (fullwrite(mainfd, wait_msg, strlen(wait_msg)) < 0) {
-               error("write main file: %s", strerror(errno));
+               error(_("write main file: %s"), strerror(errno));
                /*NOTREACHED*/
            }
            amfree(wait_msg);
  
      if(do_clientchk && (do_localchk || do_tapechk)) {
        if(lseek(tempfd, (off_t)0, 0) == (off_t)-1) {
-           error("seek temp file: %s", strerror(errno));
+           error(_("seek temp file: %s"), strerror(errno));
            /*NOTREACHED*/
        }
  
        while((size = fullread(tempfd, buffer, SIZEOF(buffer))) > 0) {
            if (fullwrite(mainfd, buffer, (size_t)size) < 0) {
-               error("write main file: %s", strerror(errno));
+               error(_("write main file: %s"), strerror(errno));
                /*NOTREACHED*/
            }
        }
        if(size < 0) {
-           error("read temp file: %s", strerror(errno));
+           error(_("read temp file: %s"), strerror(errno));
            /*NOTREACHED*/
        }
        aclose(tempfd);
      }
  
-     version_string = vstralloc("\n",
-                              "(brought to you by Amanda ", version(), ")\n",
-                              NULL);
+     version_string = vstrallocf(_("\n(brought to you by Amanda %s)\n"), version());
      if (fullwrite(mainfd, version_string, strlen(version_string)) < 0) {
-       error("write main file: %s", strerror(errno));
+       error(_("write main file: %s"), strerror(errno));
        /*NOTREACHED*/
      }
      amfree(version_string);
-     amfree(config_dir);
-     amfree(config_name);
      amfree(our_feature_string);
      am_release_feature_set(our_features);
      our_features = NULL;
  
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
      /* send mail if requested, but only if there were problems */
  #ifdef MAILER
  
        char *err = NULL;
        char *extra_info = NULL;
        char *line = NULL;
-       int ret;
        int rc;
-       int sig;
-       char number[NUM_STR_SIZE];
  
        fflush(stdout);
        if(lseek(mainfd, (off_t)0, SEEK_SET) == (off_t)-1) {
-           error("lseek main file: %s", strerror(errno));
+           error(_("lseek main file: %s"), strerror(errno));
            /*NOTREACHED*/
        }
        if(alwaysmail && !(server_probs || client_probs)) {
-           subject = stralloc2(getconf_str(CNF_ORG),
-                           " AMCHECK REPORT: NO PROBLEMS FOUND");
+           subject = vstrallocf(_("%s AMCHECK REPORT: NO PROBLEMS FOUND"),
+                       getconf_str(CNF_ORG));
        } else {
-           subject = stralloc2(getconf_str(CNF_ORG),
-                           " AMANDA PROBLEM: FIX BEFORE RUN, IF POSSIBLE");
+           subject = vstrallocf(
+                       _("%s AMANDA PROBLEM: FIX BEFORE RUN, IF POSSIBLE"),
+                       getconf_str(CNF_ORG));
        }
        /*
         * Variable arg lists are hard to deal with when we do not know
        while((r = fullread(mainfd, buffer, SIZEOF(buffer))) > 0) {
            if((w = fullwrite(mailfd, buffer, (size_t)r)) != (ssize_t)r) {
                if(w < 0 && errno == EPIPE) {
-                   strappend(extra_info, "EPIPE writing to mail process\n");
+                   strappend(extra_info, _("EPIPE writing to mail process\n"));
                    break;
                } else if(w < 0) {
-                   error("mailfd write: %s", strerror(errno));
+                   error(_("mailfd write: %s"), strerror(errno));
                    /*NOTREACHED*/
                } else {
-                   error("mailfd write: wrote " SSIZE_T_FMT " instead of " SIZE_T_FMT, w, r);
+                   error(_("mailfd write: wrote %zd instead of %zd"), w, r);
                    /*NOTREACHED*/
                }
            }
        aclose(mailfd);
        ferr = fdopen(errfd, "r");
        if (!ferr) {
-           error("Can't fdopen: %s", strerror(errno));
+           error(_("Can't fdopen: %s"), strerror(errno));
            /*NOTREACHED*/
        }
        for(; (line = agets(ferr)) != NULL; free(line)) {
        errfd = -1;
        rc = 0;
        while (wait(&retstat) != -1) {
-           if (WIFSIGNALED(retstat)) {
-                   ret = 0;
-                   rc = sig = WTERMSIG(retstat);
-           } else {
-                   sig = 0;
-                   rc = ret = WEXITSTATUS(retstat);
-           }
-           if (rc != 0) {
-                   if (ret == 0) {
-                       strappend(err, "got signal ");
-                       ret = sig;
-                   } else {
-                       strappend(err, "returned ");
-                   }
-                   snprintf(number, SIZEOF(number), "%d", ret);
-                   strappend(err, number);
+           if (!WIFEXITED(retstat) || WEXITSTATUS(retstat) != 0) {
+               char *mailer_error = str_exit_status("mailer", retstat);
+               strappend(err, mailer_error);
+               amfree(mailer_error);
+               rc = 1;
            }
        }
        if (rc != 0) {
                fputs(extra_info, stderr);
                amfree(extra_info);
            }
-           error("error running mailer %s: %s", MAILER, err);
+           error(_("error running mailer %s: %s"), MAILER, err?err:"(unknown)");
            /*NOTREACHED*/
        }
      }
  #endif
 +    free_new_argv(new_argc, new_argv);
 +    free_server_config();
 +
      dbclose();
      return (server_probs || client_probs);
  }
  
  /* --------------------------------------------------- */
  
- int nslots, backwards, found, got_match, tapedays;
- char *datestamp;
- char *first_match_label = NULL, *first_match = NULL, *found_device = NULL;
- char *label;
- char *searchlabel, *labelstr;
- tape_t *tp;
- FILE *errf = NULL;
+ static char *datestamp;
+ static FILE *errf = NULL;
+ int check_tapefile(
+     FILE *outf,
+     char *tapefile)
+ {
+     struct stat statbuf;
+     char *quoted;
+     int tapebad = 0;
+     if (stat(tapefile, &statbuf) == 0) {
+       if (!S_ISREG(statbuf.st_mode)) {
+           quoted = quote_string(tapefile);
+           g_fprintf(outf, _("ERROR: tapelist %s: should be a regular file.\n"),
+                   quoted);
+           tapebad = 1;
+           amfree(quoted);
+       } else if (access(tapefile, F_OK) != 0) {
+           quoted = quote_string(tapefile);
+           g_fprintf(outf, _("ERROR: can't access tapelist %s\n"), quoted);
+           tapebad = 1;
+           amfree(quoted);
+       } else if (access(tapefile, W_OK) != 0) {
+           quoted = quote_string(tapefile);
+           g_fprintf(outf, _("ERROR: tapelist %s: not writable\n"), quoted);
+           tapebad = 1;
+           amfree(quoted);
+       }
+     }
+     return tapebad;
+ }
  
  int
  test_server_pgm(
      pgm = vstralloc(dir, "/", pgm, versionsuffix(), NULL);
      quoted = quote_string(pgm);
      if(stat(pgm, &statbuf) == -1) {
-       fprintf(outf, "ERROR: program %s: does not exist\n",
+       g_fprintf(outf, _("ERROR: program %s: does not exist\n"),
                quoted);
        pgmbad = 1;
      } else if (!S_ISREG(statbuf.st_mode)) {
-       fprintf(outf, "ERROR: program %s: not a file\n",
+       g_fprintf(outf, _("ERROR: program %s: not a file\n"),
                quoted);
        pgmbad = 1;
      } else if (access(pgm, X_OK) == -1) {
-       fprintf(outf, "ERROR: program %s: not executable\n",
+       g_fprintf(outf, _("ERROR: program %s: not executable\n"),
                quoted);
        pgmbad = 1;
+ #ifndef SINGLE_USERID
      } else if (suid \
               && dumpuid != 0
               && (statbuf.st_uid != 0 || (statbuf.st_mode & 04000) == 0)) {
-       fprintf(outf, "ERROR: program %s: not setuid-root\n",
+       g_fprintf(outf, _("ERROR: program %s: not setuid-root\n"),
                quoted);
        pgmbad = 1;
+ #else
+     /* Quiet unused parameter warnings */
+     (void)suid;
+     (void)dumpuid;
+ #endif /* SINGLE_USERID */
      }
      amfree(quoted);
      amfree(pgm);
      return pgmbad;
  }
  
+ /* check that the tape is a valid amanda tape
+    Returns TRUE if all tests passed; FALSE otherwise. */
+ static gboolean test_tape_status(FILE * outf) {
+     int tape_status;
+     Device * device;
+     GValue property_value;
+     char * label = NULL;
+     char * tapename = NULL;
+     ReadLabelStatusFlags label_status;
+     bzero(&property_value, sizeof(property_value));
+     
+     tapename = getconf_str(CNF_TAPEDEV);
+     g_return_val_if_fail(tapename != NULL, FALSE);
+     device_api_init();
+     
+     if (!getconf_seen(CNF_TPCHANGER) && getconf_int(CNF_RUNTAPES) != 1) {
+         g_fprintf(outf,
+                 _("WARNING: if a tape changer is not available, runtapes "
+                   "must be set to 1\n"));
+         g_fprintf(outf, _("Change the value of the \"runtapes\" parameter in " 
+                         "amanda.conf or configure a tape changer\n"));
+     }
+     
+     tape_status = taper_scan(NULL, &label, &datestamp, &tapename, NULL,
+                              FILE_taperscan_output_callback, outf,
+                              NULL, NULL);
+     if (tape_status < 0) {
+         tape_t *exptape = lookup_last_reusable_tape(0);
+         g_fprintf(outf, _("       (expecting "));
+         if(exptape != NULL) g_fprintf(outf, _("tape %s or "), exptape->label);
+         g_fprintf(outf, _("a new tape)\n"));
+         amfree(label);
+         return FALSE;
+     }
+     device = device_open(tapename);
+     if (device == NULL) {
+         g_fprintf(outf, "ERROR: Could not open tape device.\n");
+         amfree(label);
+         return FALSE;
+     }
+     
+     device_set_startup_properties_from_config(device);
+     label_status = device_read_label(device);
+     if (tape_status == 3 && 
+         !(label_status & READ_LABEL_STATUS_VOLUME_UNLABELED)) {
+         if (label_status == READ_LABEL_STATUS_SUCCESS) {
+             g_fprintf(outf, "WARNING: Volume was unlabeled, but now "
+                     "is labeled \"%s\".\n", device->volume_label);
+         }
+     } else if (label_status != READ_LABEL_STATUS_SUCCESS && tape_status != 3) {
+         char * errstr = 
+             g_english_strjoinv_and_free
+                 (g_flags_nick_to_strv(label_status &
+                                        (~READ_LABEL_STATUS_VOLUME_UNLABELED),
+                                        READ_LABEL_STATUS_FLAGS_TYPE), "or");
+         g_fprintf(outf, "WARNING: Reading label the second time failed: "
+                 "One of %s.\n", errstr);
+         g_free(errstr);
+     } else if (tape_status != 3 &&
+                (device->volume_label == NULL || label == NULL ||
+                 strcmp(device->volume_label, label) != 0)) {
+         g_fprintf(outf, "WARNING: Label mismatch on re-read: "
+                 "Got %s first, then %s.\n", label, device->volume_label);
+     }
+     
+     /* If we can't get this property, it's not an error. Maybe the device
+      * doesn't support this property, or needs an actual volume to know
+      * for sure. */
+     if (device_property_get(device, PROPERTY_MEDIUM_TYPE, &property_value)) {
+         g_assert(G_VALUE_TYPE(&property_value) == MEDIA_ACCESS_MODE_TYPE);
+         if (g_value_get_enum(&property_value) ==
+             MEDIA_ACCESS_MODE_WRITE_ONLY) {
+             g_fprintf(outf, "WARNING: Media access mode is WRITE_ONLY, "
+                     "dumps will be thrown away.\n");
+         }
+     }
+     
+     if (overwrite) {
+       char *timestamp = get_undef_timestamp();
+         if (!device_start(device, ACCESS_WRITE, label, timestamp)) {
+             if (tape_status == 3) {
+                 g_fprintf(outf, "ERROR: Could not label brand new tape.\n");
+             } else {
+                 g_fprintf(outf,
+                         "ERROR: tape %s label ok, but is not writable.\n",
+                         label);
+             }
+           amfree(timestamp);
+             amfree(label);
+             g_object_unref(device);
+             return FALSE;
+         } else { /* Write succeeded. */
+             if (tape_status != 3) {
+                 g_fprintf(outf, "Tape %s is writable; rewrote label.\n", label);
+             } else {
+                 g_fprintf(outf, "Wrote label %s to brand new tape.\n", label);
+             }
+         }
+       amfree(timestamp);
+     } else { /* !overwrite */
+         g_fprintf(outf, "NOTE: skipping tape-writable test\n");
+         if (tape_status == 3) {
+             g_fprintf(outf,
+                     "Found a brand new tape, will label it %s.\n", 
+                     label);
+         } else {
+             g_fprintf(outf, "Tape %s label ok\n", label);
+         }                    
+     }
+     g_object_unref(device);
+     amfree(label);
+     return TRUE;
+ }
  pid_t
  start_server_check(
      int               fd,
      int               do_localchk,
      int               do_tapechk)
  {
-     char *tapename;
-     generic_fs_stats_t fs;
+     struct fs_usage fsusage;
      FILE *outf = NULL;
      holdingdisk_t *hdp;
-     pid_t pid;
+     pid_t pid G_GNUC_UNUSED;
      int confbad = 0, tapebad = 0, disklow = 0, logbad = 0;
      int userbad = 0, infobad = 0, indexbad = 0, pgmbad = 0;
      int testtape = do_tapechk;
      tapetype_t *tp = NULL;
      char *quoted;
      int res;
-     struct addrinfo *gaires;
-     struct addrinfo hints;
+     intmax_t kb_avail;
  
      switch(pid = fork()) {
      case -1:
-       error("could not fork server check: %s", strerror(errno));
-       /*NOTREACHED*/
+       error(_("could not spawn a process for checking the server: %s"), strerror(errno));
+         g_assert_not_reached();
+         
      case 0:
        break;
+         
      default:
        return pid;
      }
+     
      dup2(fd, 1);
      dup2(fd, 2);
+     
      set_pname("amcheck-server");
+     
      startclock();
  
      if((outf = fdopen(fd, "w")) == NULL) {
-       error("fdopen %d: %s", fd, strerror(errno));
+       error(_("fdopen %d: %s"), fd, strerror(errno));
        /*NOTREACHED*/
      }
      errf = outf;
  
-     fprintf(outf, "Amanda Tape Server Host Check\n");
-     fprintf(outf, "-----------------------------\n");
+     g_fprintf(outf, _("Amanda Tape Server Host Check\n"));
+     g_fprintf(outf, "-----------------------------\n");
  
      if (do_localchk || testtape) {
          tp = lookup_tapetype(getconf_str(CNF_TAPETYPE));
        char *lbl_templ;
  
        ColumnSpec = getconf_str(CNF_COLUMNSPEC);
-       if(SetColumDataFromString(ColumnData, ColumnSpec, &errstr) < 0) {
-           fprintf(outf, "ERROR: %s\n", errstr);
+       if(SetColumnDataFromString(ColumnData, ColumnSpec, &errstr) < 0) {
+           g_fprintf(outf, _("ERROR: %s\n"), errstr);
            amfree(errstr);
            confbad = 1;
        }
        lbl_templ = tapetype_get_lbl_templ(tp);
        if(strcmp(lbl_templ, "") != 0) {
-           if(strchr(lbl_templ, '/') == NULL) {
-               lbl_templ = stralloc2(config_dir, lbl_templ);
-           } else {
-               lbl_templ = stralloc(lbl_templ);
-           }
+           lbl_templ = config_dir_relative(lbl_templ);
            if(access(lbl_templ, R_OK) == -1) {
-               fprintf(outf,
-                       "ERROR: cannot access lbl_templ file %s: %s\n",
+               g_fprintf(outf,
+                       _("ERROR: cannot read label template (lbl-templ) file %s: %s. Check permissions\n"),
                        lbl_templ,
                        strerror(errno));
                confbad = 1;
            }
  #if !defined(LPRCMD)
-           fprintf(outf, "ERROR: lbl_templ set but no LPRCMD defined, you should reconfigure amanda\n       and make sure it find a lpr or lp command.\n");
+           g_fprintf(outf, _("ERROR:lbl-templ  set but no LPRCMD defined. You should reconfigure amanda\n       and make sure it finds a lpr or lp command.\n"));
            confbad = 1;
  #endif
        }
  
-       /* Double-check that 'localhost' resolves properly */
- #ifdef WORKING_IPV6
-       hints.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ALL;
-       hints.ai_family = AF_UNSPEC;
- #else
-       hints.ai_flags = AI_CANONNAME;
-       hints.ai_family = AF_INET;
- #endif
-       hints.ai_socktype = 0;
-       hints.ai_protocol = 0;
-       hints.ai_addrlen = 0;
-       hints.ai_addr = NULL;
-       hints.ai_canonname = NULL;
-       hints.ai_next = NULL;
-       res = getaddrinfo("localhost", NULL, &hints, &gaires);
- #ifdef WORKING_IPV6
-       if (res != 0) {
-           hints.ai_flags = AI_CANONNAME;
-           hints.ai_family = AF_UNSPEC;
-           res = getaddrinfo("localhost", NULL, &hints, &gaires);
+       if (getconf_int(CNF_FLUSH_THRESHOLD_SCHEDULED) <
+                                getconf_int(CNF_FLUSH_THRESHOLD_DUMPED)) {
+           g_fprintf(outf, _("WARNING: flush_threshold_dumped (%d) must be less than or equal to flush_threshold_scheduled (%d).\n"), 
+                     getconf_int(CNF_FLUSH_THRESHOLD_DUMPED),
+                     getconf_int(CNF_FLUSH_THRESHOLD_SCHEDULED));
        }
- #endif
-       if (res != 0) {
-           fprintf(outf, _("ERROR: Cannot resolve `localhost': %s\n"), gai_strerror(res));
+       if (getconf_int(CNF_FLUSH_THRESHOLD_SCHEDULED) <
+                                getconf_int(CNF_TAPERFLUSH)) {
+           g_fprintf(outf, _("WARNING: taperflush (%d) must be less than or equal to flush_threshold_scheduled (%d).\n"), 
+                     getconf_int(CNF_TAPERFLUSH),
+                     getconf_int(CNF_FLUSH_THRESHOLD_SCHEDULED));
+       }
+       if (getconf_int(CNF_TAPERFLUSH) > 0 &&
+           !getconf_boolean(CNF_AUTOFLUSH)) {
+           g_fprintf(outf, _("WARNING: autoflush must be set to 'yes' if taperflush (%d) is greater that 0.\n"),
+                     getconf_int(CNF_TAPERFLUSH));
+       }
+       /* Double-check that 'localhost' resolves properly */
+       if ((res = resolve_hostname("localhost", 0, NULL, NULL) != 0)) {
+           g_fprintf(outf, _("ERROR: Cannot resolve `localhost': %s\n"), gai_strerror(res));
+           confbad = 1;
        }
-       if (gaires) freeaddrinfo(gaires);
      }
  
      /*
        /* 
         * entreprise version will do planner/dumper suid check
         */
-       if(access(libexecdir, X_OK) == -1) {
-           quoted = quote_string(libexecdir);
-           fprintf(outf, "ERROR: program dir %s: not accessible\n",
+       if(access(amlibexecdir, X_OK) == -1) {
+           quoted = quote_string(amlibexecdir);
+           g_fprintf(outf, _("ERROR: Directory %s containing Amanda tools is not accessible\n."),
                    quoted);
+           g_fprintf(outf, _("Check permissions\n"));
            pgmbad = 1;
            amfree(quoted);
        } else {
-           if(test_server_pgm(outf, libexecdir, "planner", 1, uid_dumpuser))
+           if(test_server_pgm(outf, amlibexecdir, "planner", 1, uid_dumpuser))
                pgmbad = 1;
-           if(test_server_pgm(outf, libexecdir, "dumper", 1, uid_dumpuser))
+           if(test_server_pgm(outf, amlibexecdir, "dumper", 1, uid_dumpuser))
                pgmbad = 1;
-           if(test_server_pgm(outf, libexecdir, "driver", 0, uid_dumpuser))
+           if(test_server_pgm(outf, amlibexecdir, "driver", 0, uid_dumpuser))
                pgmbad = 1;
-           if(test_server_pgm(outf, libexecdir, "taper", 0, uid_dumpuser))
+           if(test_server_pgm(outf, amlibexecdir, "taper", 0, uid_dumpuser))
                pgmbad = 1;
-           if(test_server_pgm(outf, libexecdir, "amtrmidx", 0, uid_dumpuser))
+           if(test_server_pgm(outf, amlibexecdir, "amtrmidx", 0, uid_dumpuser))
                pgmbad = 1;
-           if(test_server_pgm(outf, libexecdir, "amlogroll", 0, uid_dumpuser))
+           if(test_server_pgm(outf, amlibexecdir, "amlogroll", 0, uid_dumpuser))
                pgmbad = 1;
        }
        if(access(sbindir, X_OK) == -1) {
            quoted = quote_string(sbindir);
-           fprintf(outf, "ERROR: program dir %s: not accessible\n",
+           g_fprintf(outf, _("ERROR: Directory %s containing Amanda tools is not accessible\n"),
                    sbindir);
+           g_fprintf(outf, _("Check permissions\n"));
            pgmbad = 1;
            amfree(quoted);
        } else {
        }
        if(access(COMPRESS_PATH, X_OK) == -1) {
            quoted = quote_string(COMPRESS_PATH);
-           fprintf(outf, "WARNING: %s is not executable, server-compression and indexing will not work\n",
-                   quoted);
+           g_fprintf(outf, _("WARNING: %s is not executable, server-compression "
+                           "and indexing will not work. \n"),quoted);
+           g_fprintf(outf, _("Check permissions\n"));
            amfree(quoted);
        }
      }
       */
  
      if(do_localchk || do_tapechk) {
-       char *conf_tapelist;
        char *tapefile;
+       char *newtapefile;
        char *tape_dir;
        char *lastslash;
        char *holdfile;
+         char * tapename;
        struct stat statbuf;
        
-       conf_tapelist=getconf_str(CNF_TAPELIST);
-       if (*conf_tapelist == '/') {
-           tapefile = stralloc(conf_tapelist);
-       } else {
-           tapefile = stralloc2(config_dir, conf_tapelist);
-       }
+       tapefile = config_dir_relative(getconf_str(CNF_TAPELIST));
        /*
         * XXX There Really Ought to be some error-checking here... dhw
         */
        }
        if(access(tape_dir, W_OK) == -1) {
            quoted = quote_string(tape_dir);
-           fprintf(outf, "ERROR: tapelist dir %s: not writable.\n", quoted);
+           g_fprintf(outf, _("ERROR: tapelist dir %s: not writable.\nCheck permissions\n"), 
+                   quoted);
            tapebad = 1;
            amfree(quoted);
        }
        else if(stat(tapefile, &statbuf) == -1) {
            quoted = quote_string(tape_dir);
-           fprintf(outf, "ERROR: tapelist %s (%s), "
-                   "you must create an empty file.\n",
+           g_fprintf(outf, _("ERROR: tapelist %s (%s), "
+                   "you must create an empty file.\n"),
                    quoted, strerror(errno));
            tapebad = 1;
            amfree(quoted);
        }
-       else if(!S_ISREG(statbuf.st_mode)) {
-           quoted = quote_string(tapefile);
-           fprintf(outf, "ERROR: tapelist %s: should be a regular file.\n",
-                   quoted);
-           tapebad = 1;
-           amfree(quoted);
-       }
-       else if(access(tapefile, F_OK) != 0) {
-           quoted = quote_string(tapefile);
-           fprintf(outf, "ERROR: can't access tapelist %s\n", quoted);
-           tapebad = 1;
-           amfree(quoted);
-       } else if(access(tapefile, F_OK) == 0 && access(tapefile, W_OK) != 0) {
-           quoted = quote_string(tapefile);
-           fprintf(outf, "ERROR: tapelist %s: not writable\n", quoted);
-           tapebad = 1;
-           amfree(quoted);
-       } else if(read_tapelist(tapefile)) {
-           quoted = quote_string(tapefile);
-           fprintf(outf, "ERROR: tapelist %s: parse error\n", quoted);
-           tapebad = 1;
-           amfree(quoted);
+       else {
+           tapebad |= check_tapefile(outf, tapefile);
+           if (tapebad == 0 && read_tapelist(tapefile)) {
+               quoted = quote_string(tapefile);
+               g_fprintf(outf, _("ERROR: tapelist %s: parse error\n"), quoted);
+               tapebad = 1;
+               amfree(quoted);
+           }
+           newtapefile = stralloc2(tapefile, ".new");
+           tapebad |= check_tapefile(outf, newtapefile);
+           amfree(newtapefile);
+           newtapefile = stralloc2(tapefile, ".amlabel");
+           tapebad |= check_tapefile(outf, newtapefile);
+           amfree(newtapefile);
+           newtapefile = stralloc2(tapefile, ".amlabel.new");
+           tapebad |= check_tapefile(outf, newtapefile);
+           amfree(newtapefile);
+           newtapefile = stralloc2(tapefile, ".yesterday");
+           tapebad |= check_tapefile(outf, newtapefile);
+           amfree(newtapefile);
+           newtapefile = stralloc2(tapefile, ".yesterday.new");
+           tapebad |= check_tapefile(outf, newtapefile);
+           amfree(newtapefile);
        }
-       holdfile = vstralloc(config_dir, "/", "hold", NULL);
+       holdfile = config_dir_relative("hold");
        if(access(holdfile, F_OK) != -1) {
            quoted = quote_string(holdfile);
-           fprintf(outf, "WARNING: hold file %s exists\n", holdfile);
+           g_fprintf(outf, _("WARNING: hold file %s exists."), holdfile);
+           g_fprintf(outf, _("Amdump will sleep as long as this file exists.\n"));
+           g_fprintf(outf, _("You might want to delete the existing hold file\n"));
            amfree(quoted);
        }
        amfree(tapefile);
        tapename = getconf_str(CNF_TAPEDEV);
        if (tapename == NULL) {
            if (getconf_str(CNF_TPCHANGER) == NULL) {
-               fprintf(outf, "WARNING: No tapedev or tpchanger specified\n");
+               g_fprintf(outf, _("WARNING:Parameter \"tapedev\" or \"tpchanger\" not specified in amanda.conf.\n"));
                testtape = 0;
                do_tapechk = 0;
            }
-       } else if (strncmp_const(tapename, "null:") == 0) {
-           fprintf(outf,
-                   "WARNING: tapedev is %s, dumps will be thrown away\n",
-                   tapename);
-           testtape = 0;
-           do_tapechk = 0;
        }
      }
  
      /* check available disk space */
  
      if(do_localchk) {
-       for(hdp = holdingdisks; hdp != NULL; hdp = hdp->next) {
+       for(hdp = getconf_holdingdisks(); hdp != NULL; hdp = holdingdisk_next(hdp)) {
            quoted = quote_string(holdingdisk_get_diskdir(hdp));
-           if(get_fs_stats(holdingdisk_get_diskdir(hdp), &fs) == -1) {
-               fprintf(outf, "ERROR: holding dir %s (%s), "
-                       "you must create a directory.\n",
+           if(get_fs_usage(holdingdisk_get_diskdir(hdp), NULL, &fsusage) == -1) {
+               g_fprintf(outf, _("ERROR: holding dir %s (%s), "
+                       "you must create a directory.\n"),
                        quoted, strerror(errno));
                disklow = 1;
+               amfree(quoted);
+               continue;
            }
-           else if(access(holdingdisk_get_diskdir(hdp), W_OK) == -1) {
-               fprintf(outf, "ERROR: holding disk %s: not writable: %s.\n",
+           /* do the division first to avoid potential integer overflow */
+           if (fsusage.fsu_bavail_top_bit_set)
+               kb_avail = 0;
+           else
+               kb_avail = fsusage.fsu_bavail / 1024 * fsusage.fsu_blocksize;
+           if(access(holdingdisk_get_diskdir(hdp), W_OK) == -1) {
+               g_fprintf(outf, _("ERROR: holding disk %s: not writable: %s.\n"),
                        quoted, strerror(errno));
+               g_fprintf(outf, _("Check permissions\n"));
                disklow = 1;
            }
            else if(access(holdingdisk_get_diskdir(hdp), X_OK) == -1) {
-               fprintf(outf, "ERROR: holding disk %s: not searcheable: %s.\n",
+               g_fprintf(outf, _("ERROR: holding disk %s: not searcheable: %s.\n"),
                        quoted, strerror(errno));
-               disklow = 1;
-           }
-           else if(fs.avail == (off_t)-1) {
-               fprintf(outf,
-                       "WARNING: holding disk %s: "
-                       "available space unknown (" OFF_T_FMT" KB requested)\n",
-                       quoted, (OFF_T_FMT_TYPE)holdingdisk_get_disksize(hdp));
+               g_fprintf(outf, _("Check permissions of ancestors of %s\n"), quoted);
                disklow = 1;
            }
            else if(holdingdisk_get_disksize(hdp) > (off_t)0) {
-               if(fs.avail < holdingdisk_get_disksize(hdp)) {
-                   fprintf(outf,
-                           "WARNING: holding disk %s: "
-                           "only " OFF_T_FMT " %sB free ("
-                           OFF_T_FMT " %sB requested)\n", quoted,
-                           (OFF_T_FMT_TYPE)(fs.avail / (off_t)unitdivisor),
+               if(kb_avail == 0) {
+                   g_fprintf(outf,
+                           _("WARNING: holding disk %s: "
+                           "no space available (%lld %sB requested)\n"), quoted,
+                           (long long)(holdingdisk_get_disksize(hdp)/(off_t)unitdivisor),
+                           displayunit);
+                   disklow = 1;
+               }
+               else if(kb_avail < holdingdisk_get_disksize(hdp)) {
+                   g_fprintf(outf,
+                           _("WARNING: holding disk %s: "
+                           "only %lld %sB available (%lld %sB requested)\n"), quoted,
+                           (long long)(kb_avail / (off_t)unitdivisor),
                            displayunit,
-                           (OFF_T_FMT_TYPE)(holdingdisk_get_disksize(hdp)/(off_t)unitdivisor),
+                           (long long)(holdingdisk_get_disksize(hdp)/(off_t)unitdivisor),
                            displayunit);
                    disklow = 1;
                }
                else {
-                   fprintf(outf,
-                           "Holding disk %s: " OFF_T_FMT
-                           " %sB disk space available,"
-                           " using " OFF_T_FMT " %sB as requested\n",
+                   g_fprintf(outf,
+                           _("Holding disk %s: %lld %sB disk space available,"
+                           " using %lld %sB as requested\n"),
                            quoted,
-                           (OFF_T_FMT_TYPE)(fs.avail/(off_t)unitdivisor),
+                           (long long)(kb_avail / (off_t)unitdivisor),
                            displayunit,
-                           (OFF_T_FMT_TYPE)(holdingdisk_get_disksize(hdp)/(off_t)unitdivisor),
+                           (long long)(holdingdisk_get_disksize(hdp)/(off_t)unitdivisor),
                            displayunit);
                }
            }
            else {
-               if((fs.avail + holdingdisk_get_disksize(hdp)) < (off_t)0) {
-                   fprintf(outf,
-                           "WARNING: holding disk %s: "
-                           "only " OFF_T_FMT " %sB free, using nothing\n",
-                           quoted, (OFF_T_FMT_TYPE)(fs.avail/(off_t)unitdivisor),
+               if(kb_avail < -holdingdisk_get_disksize(hdp)) {
+                   g_fprintf(outf,
+                           _("WARNING: holding disk %s: "
+                           "only %lld %sB free, using nothing\n"),
+                           quoted, (long long)(kb_avail / (off_t)unitdivisor),
                            displayunit);
+                   g_fprintf(outf, _("WARNING: Not enough free space specified in amanda.conf\n"));
                    disklow = 1;
                }
                else {
-                   fprintf(outf,
-                           "Holding disk %s: "
-                           OFF_T_FMT " %sB disk space available, using "
-                           OFF_T_FMT " %sB\n",
+                   g_fprintf(outf,
+                           _("Holding disk %s: %lld %sB disk space available, using %lld %sB\n"),
                            quoted,
-                           (OFF_T_FMT_TYPE)(fs.avail/(off_t)unitdivisor),
+                           (long long)(kb_avail/(off_t)unitdivisor),
                            displayunit,
-                           (OFF_T_FMT_TYPE)((fs.avail + holdingdisk_get_disksize(hdp)) / (off_t)unitdivisor),
+                           (long long)((kb_avail + holdingdisk_get_disksize(hdp)) / (off_t)unitdivisor),
                            displayunit);
                }
            }
        struct stat stat_old;
        struct stat statbuf;
  
-       conf_logdir = getconf_str(CNF_LOGDIR);
-       if (*conf_logdir == '/') {
-           conf_logdir = stralloc(conf_logdir);
-       } else {
-           conf_logdir = stralloc2(config_dir, conf_logdir);
-       }
+       conf_logdir = config_dir_relative(getconf_str(CNF_LOGDIR));
        logfile = vstralloc(conf_logdir, "/log", NULL);
  
        quoted = quote_string(conf_logdir);
        if(stat(conf_logdir, &statbuf) == -1) {
-           fprintf(outf, "ERROR: logdir %s (%s), you must create directory.\n",
+           g_fprintf(outf, _("ERROR: logdir %s (%s), you must create directory.\n"),
                    quoted, strerror(errno));
            disklow = 1;
        }
        else if(access(conf_logdir, W_OK) == -1) {
-           fprintf(outf, "ERROR: log dir %s: not writable\n", quoted);
+           g_fprintf(outf, _("ERROR: log dir %s: not writable\n"), quoted);
            logbad = 1;
        }
        amfree(quoted);
            logbad = 2;
            if(access(logfile, W_OK) != 0) {
                quoted = quote_string(logfile);
-               fprintf(outf, "ERROR: log file %s: not writable\n", quoted);
+               g_fprintf(outf, _("ERROR: log file %s: not writable\n"), quoted);
                amfree(quoted);
            }
        }
        quoted = quote_string(olddir);
        if (stat(olddir,&stat_old) == 0) { /* oldlog exist */
            if(!(S_ISDIR(stat_old.st_mode))) {
-               fprintf(outf, "ERROR: oldlog directory %s is not a directory\n",
+               g_fprintf(outf, _("ERROR: oldlog directory %s is not a directory\n"),
                        quoted);
+               g_fprintf(outf, _("Remove the entry and create a new directory\n"));
                logbad = 1;
            }
            if(access(olddir, W_OK) == -1) {
-               fprintf(outf, "ERROR: oldlog dir %s: not writable\n", quoted);
+               g_fprintf(outf, _("ERROR: oldlog dir %s: not writable\n"), quoted);
+               g_fprintf(outf, _("Check permissions\n"));
                logbad = 1;
            }
        }
        else if(lstat(olddir,&stat_old) == 0) {
-           fprintf(outf, "ERROR: oldlog directory %s is not a directory\n",
+           g_fprintf(outf, _("ERROR: oldlog directory %s is not a directory\n"),
                    quoted);
+               g_fprintf(outf, _("Remove the entry and create a new directory\n"));
            logbad = 1;
        }
        amfree(quoted);
      }
  
      if (testtape) {
-       /* check that the tape is a valid amanda tape */
-         int tape_status;
-       tapedays = getconf_int(CNF_TAPECYCLE);
-       labelstr = getconf_str(CNF_LABELSTR);
-       tapename = getconf_str(CNF_TAPEDEV);
-       if (!getconf_seen(CNF_TPCHANGER) && getconf_int(CNF_RUNTAPES) != 1) {
-           fprintf(outf,
-                   "WARNING: if a tape changer is not available, runtapes must be set to 1\n");
-       }
-         tape_status = taper_scan(NULL, &label, &datestamp, &tapename,
-                                FILE_taperscan_output_callback, outf);
-       if (tapename) {
-           if (tape_access(tapename,F_OK) == -1) {
-               fprintf(outf, "ERROR: Can't access device %s: %s\n", tapename,
-                       strerror(errno));
-               tapebad = 1;
-           }
-           if (tape_access(tapename,R_OK) == -1) {
-               fprintf(outf, "ERROR: Can't read device %s: %s\n", tapename,
-                       strerror(errno));
-               tapebad = 1;
-           }
-           if (tape_access(tapename,W_OK) == -1) {
-               fprintf(outf, "ERROR: Can't write to device %s: %s\n", tapename,
-                       strerror(errno));
-               tapebad = 1;
-           }
-       }
-         if (tape_status < 0) {
-           tape_t *exptape = lookup_last_reusable_tape(0);
-           fprintf(outf, "       (expecting ");
-           if(exptape != NULL) fprintf(outf, "tape %s or ", exptape->label);
-           fprintf(outf, "a new tape)\n");
-             tapebad = 1;
-       } else {
-             if (overwrite) {
-                 char *wrlabel_status;
-                 wrlabel_status = tape_wrlabel(tapename, "X", label,
-                               (unsigned)(tapetype_get_blocksize(tp) * 1024));
-                 if (wrlabel_status != NULL) {
-                     if (tape_status == 3) {
-                         fprintf(outf,
-                                 "ERROR: Could not label brand new tape: %s\n",
-                                 wrlabel_status);
-                     } else {
-                         fprintf(outf,
-                                 "ERROR: tape %s label ok, but is not writable (%s)\n",
-                                 label, wrlabel_status);
-                     }
-                     tapebad = 1;
-                 } else {
-                     if (tape_status != 3) {
-                         fprintf(outf, "Tape %s is writable; rewrote label.\n", label);
-                     } else {
-                         fprintf(outf, "Wrote label %s to brand new tape.\n", label);
-                     }
-                 }
-             } else {
-                 fprintf(outf, "NOTE: skipping tape-writable test\n");
-                 if (tape_status == 3) {
-                     fprintf(outf,
-                             "Found a brand new tape, will label it %s.\n", 
-                             label);
-                 } else {
-                     fprintf(outf, "Tape %s label ok\n", label);
-                 }                    
-             }
-         }
-       amfree(tapename);
+         tapebad = !test_tape_status(outf);
      } else if (do_tapechk) {
-       fprintf(outf, "WARNING: skipping tape test because amdump or amflush seem to be running\n");
-       fprintf(outf, "WARNING: if they are not, you must run amcleanup\n");
+       g_fprintf(outf, _("WARNING: skipping tape test because amdump or amflush seem to be running\n"));
+       g_fprintf(outf, _("WARNING: if they are not, you must run amcleanup\n"));
      } else if (logbad == 2) {
-       fprintf(outf, "WARNING: amdump or amflush seem to be running\n");
-       fprintf(outf, "WARNING: if they are not, you must run amcleanup\n");
+       g_fprintf(outf, _("WARNING: amdump or amflush seem to be running\n"));
+       g_fprintf(outf, _("WARNING: if they are not, you must run amcleanup\n"));
      } else {
-       fprintf(outf, "NOTE: skipping tape checks\n");
+       g_fprintf(outf, _("NOTE: skipping tape checks\n"));
      }
  
      /*
        conf_runspercycle = getconf_int(CNF_RUNSPERCYCLE);
  
        if(conf_tapecycle <= conf_runspercycle) {
-               fprintf(outf, "WARNING: tapecycle (%d) <= runspercycle (%d).\n",
+               g_fprintf(outf, _("WARNING: tapecycle (%d) <= runspercycle (%d).\n"),
                        conf_tapecycle, conf_runspercycle);
        }
  
-       conf_infofile = getconf_str(CNF_INFOFILE);
-       if (*conf_infofile == '/') {
-           conf_infofile = stralloc(conf_infofile);
-       } else {
-           conf_infofile = stralloc2(config_dir, conf_infofile);
-       }
+       conf_infofile = config_dir_relative(getconf_str(CNF_INFOFILE));
+       conf_indexdir = config_dir_relative(getconf_str(CNF_INDEXDIR));
  
-       conf_indexdir = getconf_str(CNF_INDEXDIR);
-       if (*conf_indexdir == '/') {
-           conf_indexdir = stralloc(conf_indexdir);
-       } else {
-           conf_indexdir = stralloc2(config_dir, conf_indexdir);
-       }
- #if TEXTDB
        quoted = quote_string(conf_infofile);
        if(stat(conf_infofile, &statbuf) == -1) {
            if (errno == ENOENT) {
-               fprintf(outf, "NOTE: conf info dir %s does not exist\n",
+               g_fprintf(outf, _("NOTE: conf info dir %s does not exist\n"),
                        quoted);
-               fprintf(outf, "NOTE: it will be created on the next run.\n");
+               g_fprintf(outf, _("NOTE: it will be created on the next run.\n"));
            } else {
-               fprintf(outf, "ERROR: conf info dir %s (%s)\n",
+               g_fprintf(outf, _("ERROR: conf info dir %s (%s)\n"),
                        quoted, strerror(errno));
                infobad = 1;
            }   
            amfree(conf_infofile);
        } else if (!S_ISDIR(statbuf.st_mode)) {
-           fprintf(outf, "ERROR: info dir %s: not a directory\n", quoted);
+           g_fprintf(outf, _("ERROR: info dir %s: not a directory\n"), quoted);
+           g_fprintf(outf, _("Remove the entry and create a new directory\n"));
            amfree(conf_infofile);
            infobad = 1;
        } else if (access(conf_infofile, W_OK) == -1) {
-           fprintf(outf, "ERROR: info dir %s: not writable\n", quoted);
+           g_fprintf(outf, _("ERROR: info dir %s: not writable\n"), quoted);
+           g_fprintf(outf, _("Check permissions\n"));
            amfree(conf_infofile);
            infobad = 1;
        } else {
            char *errmsg = NULL;
            if (check_infofile(conf_infofile, &origq, &errmsg) == -1) {
-               fprintf(outf, "ERROR: Can't copy infofile: %s\n", errmsg);
+               g_fprintf(outf, "ERROR: Can't copy infofile: %s\n", errmsg);
                infobad = 1;
                amfree(errmsg);
            }
            strappend(conf_infofile, "/");
        }
        amfree(quoted);
- #endif
  
        while(!empty(origq)) {
            hostp = origq.head->host;
            host = sanitise_filename(hostp->hostname);
- #if TEXTDB
            if(conf_infofile) {
                hostinfodir = newstralloc2(hostinfodir, conf_infofile, host);
                quoted = quote_string(hostinfodir);
                if(stat(hostinfodir, &statbuf) == -1) {
                    if (errno == ENOENT) {
-                       fprintf(outf, "NOTE: host info dir %s does not exist\n",
+                       g_fprintf(outf, _("NOTE: host info dir %s does not exist\n"),
                                quoted);
-                       fprintf(outf,
-                               "NOTE: it will be created on the next run.\n");
+                       g_fprintf(outf,
+                               _("NOTE: it will be created on the next run.\n"));
                    } else {
-                       fprintf(outf, "ERROR: host info dir %s (%s)\n",
+                       g_fprintf(outf, _("ERROR: host info dir %s (%s)\n"),
                                quoted, strerror(errno));
                        infobad = 1;
                    }   
                    amfree(hostinfodir);
                } else if (!S_ISDIR(statbuf.st_mode)) {
-                   fprintf(outf, "ERROR: info dir %s: not a directory\n",
+                   g_fprintf(outf, _("ERROR: info dir %s: not a directory\n"),
                            quoted);
+                   g_fprintf(outf, _("Remove the entry and create a new directory\n"));
                    amfree(hostinfodir);
                    infobad = 1;
                } else if (access(hostinfodir, W_OK) == -1) {
-                   fprintf(outf, "ERROR: info dir %s: not writable\n", quoted);
+                   g_fprintf(outf, _("ERROR: info dir %s: not writable\n"), quoted);
+                   g_fprintf(outf, _("Check permissions\n"));
                    amfree(hostinfodir);
                    infobad = 1;
                } else {
                }
                amfree(quoted);
            }
- #endif
            for(dp = hostp->disks; dp != NULL; dp = dp->hostnext) {
                disk = sanitise_filename(dp->name);
- #if TEXTDB
                if(hostinfodir) {
                    char *quotedif;
  
                    quotedif = quote_string(infofile);
                    if(stat(diskdir, &statbuf) == -1) {
                        if (errno == ENOENT) {
-                           fprintf(outf, "NOTE: info dir %s does not exist\n",
+                           g_fprintf(outf, _("NOTE: info dir %s does not exist\n"),
                                quoted);
-                           fprintf(outf,
-                               "NOTE: it will be created on the next run.\n");
+                           g_fprintf(outf,
+                               _("NOTE: it will be created on the next run.\n"));
                        } else {
-                           fprintf(outf, "ERROR: info dir %s (%s)\n",
+                           g_fprintf(outf, _("ERROR: info dir %s (%s)\n"),
                                    quoted, strerror(errno));
                            infobad = 1;
                        }       
                    } else if (!S_ISDIR(statbuf.st_mode)) {
-                       fprintf(outf, "ERROR: info dir %s: not a directory\n",
+                       g_fprintf(outf, _("ERROR: info dir %s: not a directory\n"),
                                quoted);
+                       g_fprintf(outf, _("Remove the entry and create a new directory\n"));
                        infobad = 1;
                    } else if (access(diskdir, W_OK) == -1) {
-                       fprintf(outf, "ERROR: info dir %s: not writable\n",
+                       g_fprintf(outf, _("ERROR: info dir %s: not writable\n"),
                                quoted);
+                       g_fprintf(outf,_("Check permissions\n"));
                        infobad = 1;
                    } else if(stat(infofile, &statbuf) == -1) {
                        if (errno == ENOENT) {
-                           fprintf(outf, "NOTE: info file %s does not exist\n",
+                           g_fprintf(outf, _("NOTE: info file %s does not exist\n"),
                                    quotedif);
-                           fprintf(outf, "NOTE: it will be created on the next run.\n");
+                           g_fprintf(outf, _("NOTE: it will be created on the next run.\n"));
                        } else {
-                           fprintf(outf, "ERROR: info dir %s (%s)\n",
+                           g_fprintf(outf, _("ERROR: info dir %s (%s)\n"),
                                    quoted, strerror(errno));
                            infobad = 1;
                        }       
                    } else if (!S_ISREG(statbuf.st_mode)) {
-                       fprintf(outf, "ERROR: info file %s: not a file\n",
+                       g_fprintf(outf, _("ERROR: info file %s: not a file\n"),
                                quotedif);
+                       g_fprintf(outf, _("Remove the entry and create a new file\n"));
                        infobad = 1;
                    } else if (access(infofile, R_OK) == -1) {
-                       fprintf(outf, "ERROR: info file %s: not readable\n",
+                       g_fprintf(outf, _("ERROR: info file %s: not readable\n"),
                                quotedif);
                        infobad = 1;
                    }
                    amfree(quoted);
                    amfree(infofile);
                }
- #endif
                if(dp->index) {
                    if(! indexdir_checked) {
                        quoted = quote_string(conf_indexdir);
                        if(stat(conf_indexdir, &statbuf) == -1) {
                            if (errno == ENOENT) {
-                               fprintf(outf, "NOTE: index dir %s does not exist\n",
+                               g_fprintf(outf, _("NOTE: index dir %s does not exist\n"),
                                        quoted);
-                               fprintf(outf, "NOTE: it will be created on the next run.\n");
+                               g_fprintf(outf, _("NOTE: it will be created on the next run.\n"));
                            } else {
-                               fprintf(outf, "ERROR: index dir %s (%s)\n",
+                               g_fprintf(outf, _("ERROR: index dir %s (%s)\n"),
                                        quoted, strerror(errno));
                                indexbad = 1;
                            }   
                            amfree(conf_indexdir);
                        } else if (!S_ISDIR(statbuf.st_mode)) {
-                           fprintf(outf, "ERROR: index dir %s: not a directory\n",
+                           g_fprintf(outf, _("ERROR: index dir %s: not a directory\n"),
                                    quoted);
+                           g_fprintf(outf, _("Remove the entry and create a new directory\n"));
                            amfree(conf_indexdir);
                            indexbad = 1;
                        } else if (access(conf_indexdir, W_OK) == -1) {
-                           fprintf(outf, "ERROR: index dir %s: not writable\n",
+                           g_fprintf(outf, _("ERROR: index dir %s: not writable\n"),
                                    quoted);
                            amfree(conf_indexdir);
                            indexbad = 1;
                            quoted = quote_string(hostindexdir);
                            if(stat(hostindexdir, &statbuf) == -1) {
                                if (errno == ENOENT) {
-                                   fprintf(outf, "NOTE: index dir %s does not exist\n",
+                                   g_fprintf(outf, _("NOTE: index dir %s does not exist\n"),
                                            quoted);
-                                   fprintf(outf, "NOTE: it will be created on the next run.\n");
+                                   g_fprintf(outf, _("NOTE: it will be created on the next run.\n"));
                                } else {
-                                   fprintf(outf, "ERROR: index dir %s (%s)\n",
+                                   g_fprintf(outf, _("ERROR: index dir %s (%s)\n"),
                                            quoted, strerror(errno));
                                    indexbad = 1;
                                }
                                amfree(hostindexdir);
                            } else if (!S_ISDIR(statbuf.st_mode)) {
-                               fprintf(outf, "ERROR: index dir %s: not a directory\n",
+                               g_fprintf(outf, _("ERROR: index dir %s: not a directory\n"),
                                        quoted);
+                               g_fprintf(outf, _("Remove the entry and create a new directory\n"));
                                amfree(hostindexdir);
                                indexbad = 1;
                            } else if (access(hostindexdir, W_OK) == -1) {
-                               fprintf(outf, "ERROR: index dir %s: not writable\n",
+                               g_fprintf(outf, _("ERROR: index dir %s: not writable\n"),
                                        quoted);
                                amfree(hostindexdir);
                                indexbad = 1;
                            quoted = quote_string(diskdir);
                            if(stat(diskdir, &statbuf) == -1) {
                                if (errno == ENOENT) {
-                                   fprintf(outf, "NOTE: index dir %s does not exist\n",
+                                   g_fprintf(outf, _("NOTE: index dir %s does not exist\n"),
                                            quoted);
-                                   fprintf(outf, "NOTE: it will be created on the next run.\n");
+                                   g_fprintf(outf, _("NOTE: it will be created on the next run.\n"));
                                } else {
-                                   fprintf(outf, "ERROR: index dir %s (%s)\n",
+                                   g_fprintf(outf, _("ERROR: index dir %s (%s)\n"),
                                        quoted, strerror(errno));
                                    indexbad = 1;
                                }       
                            } else if (!S_ISDIR(statbuf.st_mode)) {
-                               fprintf(outf, "ERROR: index dir %s: not a directory\n",
+                               g_fprintf(outf, _("ERROR: index dir %s: not a directory\n"),
                                        quoted);
+                               g_fprintf(outf, _("Remove the entry and create a new directory\n"));
                                indexbad = 1;
                            } else if (access(diskdir, W_OK) == -1) {
-                               fprintf(outf, "ERROR: index dir %s: is not writable\n",
+                               g_fprintf(outf, _("ERROR: index dir %s: is not writable\n"),
                                        quoted);
                                indexbad = 1;
                            }
  
                if ( dp->encrypt == ENCRYPT_SERV_CUST ) {
                  if ( dp->srv_encrypt[0] == '\0' ) {
-                   fprintf(outf, "ERROR: server encryption program not specified\n");
+                   g_fprintf(outf, _("ERROR: server encryption program not specified\n"));
+                   g_fprintf(outf, _("Specify \"server_custom_encrypt\" in the dumptype\n"));
                    pgmbad = 1;
                  }
                  else if(access(dp->srv_encrypt, X_OK) == -1) {
-                   fprintf(outf, "ERROR: %s is not executable, server encryption will not work\n",
+                   g_fprintf(outf, _("ERROR: %s is not executable, server encryption will not work\n"),
                            dp->srv_encrypt );
+                  g_fprintf(outf, _("Check file type\n"));
                    pgmbad = 1;
                  }
                }
                if ( dp->compress == COMP_SERVER_CUST ) {
                  if ( dp->srvcompprog[0] == '\0' ) {
-                   fprintf(outf, "ERROR: server custom compression program not specified\n");
+                   g_fprintf(outf, _("ERROR: server custom compression program "
+                                   "not specified\n"));
+                   g_fprintf(outf, _("Specify \"server_custom_compress\" in "
+                                   "the dumptype\n"));
                    pgmbad = 1;
                  }
                  else if(access(dp->srvcompprog, X_OK) == -1) {
                    quoted = quote_string(dp->srvcompprog);
  
-                   fprintf(outf, "ERROR: %s is not executable, server custom compression will not work\n",
+                   g_fprintf(outf, _("ERROR: %s is not executable, server custom "
+                                   "compression will not work\n"),
                            quoted);
                    amfree(quoted);
+                  g_fprintf(outf, _("Check file type\n"));
                    pgmbad = 1;
                  }
                }
      }
  
      amfree(datestamp);
-     amfree(label);
-     amfree(config_dir);
-     amfree(config_name);
  
-     fprintf(outf, "Server check took %s seconds\n", walltime_str(curclock()));
+     g_fprintf(outf, _("Server check took %s seconds\n"), walltime_str(curclock()));
  
      fflush(outf);
  
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fd, malloc_hist_1, malloc_hist_2);
-     }
      exit(userbad \
         || confbad \
         || tapebad \
@@@ -1424,8 -1466,8 +1473,8 @@@ start_host
      }
  
      if (strcmp(hostp->hostname,"localhost") == 0) {
-       fprintf(outf,
-                     "WARNING: Usage of fully qualified hostname recommended for Client %s.\n",
+       g_fprintf(outf,
+                     _("WARNING: Usage of fully qualified hostname recommended for Client %s.\n"),
                      hostp->hostname);
      }
  
  
        if(!am_has_feature(hostp->features, fe_selfcheck_req) &&
           !am_has_feature(hostp->features, fe_selfcheck_req_device)) {
-           fprintf(outf,
-                   "ERROR: Client %s does not support selfcheck REQ packet.\n",
+           g_fprintf(outf,
+                   _("ERROR: Client %s does not support selfcheck REQ packet.\n"),
                    hostp->hostname);
+           g_fprintf(outf, _("Client might be of a very old version\n"));
        }
        if(!am_has_feature(hostp->features, fe_selfcheck_rep)) {
-           fprintf(outf,
-                   "ERROR: Client %s does not support selfcheck REP packet.\n",
+           g_fprintf(outf,
+                   _("ERROR: Client %s does not support selfcheck REP packet.\n"),
                    hostp->hostname);
+           g_fprintf(outf, _("Client might be of a very old version\n"));
        }
        if(!am_has_feature(hostp->features, fe_sendsize_req_options) &&
           !am_has_feature(hostp->features, fe_sendsize_req_no_options) &&
           !am_has_feature(hostp->features, fe_sendsize_req_device)) {
-           fprintf(outf,
-                   "ERROR: Client %s does not support sendsize REQ packet.\n",
+           g_fprintf(outf,
+                   _("ERROR: Client %s does not support sendsize REQ packet.\n"),
                    hostp->hostname);
+           g_fprintf(outf, _("Client might be of a very old version\n"));
        }
        if(!am_has_feature(hostp->features, fe_sendsize_rep)) {
-           fprintf(outf,
-                   "ERROR: Client %s does not support sendsize REP packet.\n",
+           g_fprintf(outf,
+                   _("ERROR: Client %s does not support sendsize REP packet.\n"),
                    hostp->hostname);
+           g_fprintf(outf, _("Client might be of a very old version\n"));
        }
        if(!am_has_feature(hostp->features, fe_sendbackup_req) &&
           !am_has_feature(hostp->features, fe_sendbackup_req_device)) {
-           fprintf(outf,
-                  "ERROR: Client %s does not support sendbackup REQ packet.\n",
+           g_fprintf(outf,
+                  _("ERROR: Client %s does not support sendbackup REQ packet.\n"),
                   hostp->hostname);
+           g_fprintf(outf, _("Client might be of a very old version\n"));
        }
        if(!am_has_feature(hostp->features, fe_sendbackup_rep)) {
-           fprintf(outf,
-                  "ERROR: Client %s does not support sendbackup REP packet.\n",
+           g_fprintf(outf,
+                  _("ERROR: Client %s does not support sendbackup REP packet.\n"),
                   hostp->hostname);
+           g_fprintf(outf, _("Client might be of a very old version\n"));
        }
  
-       snprintf(number, SIZEOF(number), "%d", hostp->maxdumps);
+       g_snprintf(number, SIZEOF(number), "%d", hostp->maxdumps);
        req = vstralloc("SERVICE ", "selfcheck", "\n",
                        "OPTIONS ",
                        has_features ? "features=" : "",
            if ((dp->name && qname[0] == '"') || 
                (dp->device && qdevice[0] == '"')) {
                if(!am_has_feature(hostp->features, fe_interface_quoted_text)) {
-                   fprintf(outf,
-                           "WARNING: %s:%s:%s host does not support quoted text\n",
+                   g_fprintf(outf,
+                           _("WARNING: %s:%s:%s host does not support quoted text\n"),
                            hostp->hostname, qname, qdevice);
+                   g_fprintf(outf, _("You must upgrade amanda on the client to "
+                                   "specify a quoted text/device in the disklist, "
+                                   "or don't use quoted text for the device.\n"));
                }
            }
  
            if(dp->device) {
                if(!am_has_feature(hostp->features, fe_selfcheck_req_device)) {
-                   fprintf(outf,
-                    "ERROR: %s:%s (%s): selfcheck does not support device.\n",
+                   g_fprintf(outf,
+                    _("ERROR: %s:%s (%s): selfcheck does not support device.\n"),
                     hostp->hostname, qname, dp->device);
+                   g_fprintf(outf, _("You must upgrade amanda on the client to "
+                                   "specify a diskdevice in the disklist "     
+                                   "or don't specify a diskdevice in the disklist.\n"));       
                }
                if(!am_has_feature(hostp->features, fe_sendsize_req_device)) {
-                   fprintf(outf,
-                    "ERROR: %s:%s (%s): sendsize does not support device.\n",
+                   g_fprintf(outf,
+                    _("ERROR: %s:%s (%s): sendsize does not support device.\n"),
                     hostp->hostname, qname, dp->device);
+                   g_fprintf(outf, _("You must upgrade amanda on the client to "
+                                   "specify a diskdevice in the disklist"      
+                                   " or don't specify a diskdevice in the disklist.\n"));      
                }
                if(!am_has_feature(hostp->features, fe_sendbackup_req_device)) {
-                   fprintf(outf,
-                    "ERROR: %s:%s (%s): sendbackup does not support device.\n",
+                   g_fprintf(outf,
+                    _("ERROR: %s:%s (%s): sendbackup does not support device.\n"),
                     hostp->hostname, qname, dp->device);
+                   g_fprintf(outf, _("You must upgrade amanda on the client to "
+                                   "specify a diskdevice in the disklist"      
+                                   " or don't specify a diskdevice in the disklist.\n"));      
                }
            }
            if(strcmp(dp->program,"DUMP") == 0 || 
               strcmp(dp->program,"GNUTAR") == 0) {
                if(strcmp(dp->program, "DUMP") == 0 &&
                   !am_has_feature(hostp->features, fe_program_dump)) {
-                   fprintf(outf, "ERROR: %s:%s does not support DUMP.\n",
+                   g_fprintf(outf, _("ERROR: %s:%s does not support DUMP.\n"),
                            hostp->hostname, qname);
+                   g_fprintf(outf, _("You must upgrade amanda on the client to use DUMP "
+                                   "or you can use another program.\n"));      
                }
                if(strcmp(dp->program, "GNUTAR") == 0 &&
                   !am_has_feature(hostp->features, fe_program_gnutar)) {
-                   fprintf(outf, "ERROR: %s:%s does not support GNUTAR.\n",
+                   g_fprintf(outf, _("ERROR: %s:%s does not support GNUTAR.\n"),
                            hostp->hostname, qname);
+                   g_fprintf(outf, _("You must upgrade amanda on the client to use GNUTAR "
+                                   "or you can use another program.\n"));      
                }
                if(dp->estimate == ES_CALCSIZE &&
                   !am_has_feature(hostp->features, fe_calcsize_estimate)) {
-                   fprintf(outf, "ERROR: %s:%s does not support CALCSIZE for estimate, using CLIENT.\n",
+                   g_fprintf(outf, _("ERROR: %s:%s does not support CALCSIZE for "
+                                   "estimate, using CLIENT.\n"),
                            hostp->hostname, qname);
+                   g_fprintf(outf, _("You must upgrade amanda on the client to use "
+                                   "CALCSIZE for estimate or don't use CALCSIZE for estimate.\n"));
                    dp->estimate = ES_CLIENT;
                }
                if(dp->estimate == ES_CALCSIZE &&
  
                if(dp->compress == COMP_CUST &&
                   !am_has_feature(hostp->features, fe_options_compress_cust)) {
-                 fprintf(outf,
-                         "ERROR: Client %s does not support custom compression.\n",
+                 g_fprintf(outf,
+                         _("ERROR: Client %s does not support custom compression.\n"),
                          hostp->hostname);
+                   g_fprintf(outf, _("You must upgrade amanda on the client to "
+                                   "use custom compression\n"));
+                   g_fprintf(outf, _("Otherwise you can use the default client "
+                                   "compression program.\n"));
                }
                if(dp->encrypt == ENCRYPT_CUST ) {
                  if ( !am_has_feature(hostp->features, fe_options_encrypt_cust)) {
-                   fprintf(outf,
-                           "ERROR: Client %s does not support data encryption.\n",
+                   g_fprintf(outf,
+                           _("ERROR: Client %s does not support data encryption.\n"),
                            hostp->hostname);
+                   g_fprintf(outf, _("You must upgrade amanda on the client to use encryption program.\n"));
                    remote_errors++;
                  } else if ( dp->compress == COMP_SERVER_FAST || 
                              dp->compress == COMP_SERVER_BEST ||
                              dp->compress == COMP_SERVER_CUST ) {
-                   fprintf(outf,
-                           "ERROR: %s: Client encryption with server compression is not supported. See amanda.conf(5) for detail.\n", hostp->hostname);
+                   g_fprintf(outf,
+                           _("ERROR: %s: Client encryption with server compression "
+                             "is not supported. See amanda.conf(5) for detail.\n"), 
+                           hostp->hostname);
                    remote_errors++;
                  } 
                }
                }
            } else {
                if(!am_has_feature(hostp->features, fe_program_backup_api)) {
-                   fprintf(outf, "ERROR: %s:%s does not support BACKUP-API.\n",
+                   g_fprintf(outf, _("ERROR: %s:%s does not support BACKUP-API.\n"),
                            hostp->hostname, qname);
+                   g_fprintf(outf, _("Dumptype configuration is not GNUTAR or DUMP."
+                                   " It is case sensitive\n"));
                }
                if(dp->device) {
                    l = vstralloc("BACKUP ",
  
      secdrv = security_getdriver(hostp->disks->security_driver);
      if (secdrv == NULL) {
-       error("could not find security driver '%s' for host '%s'",
+       fprintf(stderr, _("Could not find security driver \"%s\" for host \"%s\". auth for this dle is invalid\n"),
              hostp->disks->security_driver, hostp->hostname);
-         /*NOTREACHED*/
+     } else {
+       protocol_sendreq(hostp->hostname, secdrv, amhost_get_security_conf, 
+                        req, conf_ctimeout, handle_result, hostp);
      }
-     protocol_sendreq(hostp->hostname, secdrv, amhost_get_security_conf, 
-                    req, conf_ctimeout, handle_result, hostp);
  
      amfree(req);
  
@@@ -1695,7 -1771,7 +1778,7 @@@ start_client_checks
  
      switch(pid = fork()) {
      case -1:
-       error("could not fork client check: %s", strerror(errno));
+       error(_("INTERNAL ERROR:could not fork client check: %s"), strerror(errno));
        /*NOTREACHED*/
  
      case 0:
      startclock();
  
      if((outf = fdopen(fd, "w")) == NULL) {
-       error("fdopen %d: %s", fd, strerror(errno));
+       error(_("fdopen %d: %s"), fd, strerror(errno));
        /*NOTREACHED*/
      }
      errf = outf;
  
-     fprintf(outf, "\nAmanda Backup Client Hosts Check\n");
-     fprintf(outf,   "--------------------------------\n");
+     g_fprintf(outf, _("\nAmanda Backup Client Hosts Check\n"));
+     g_fprintf(outf,   "--------------------------------\n");
  
      protocol_init();
  
  
      protocol_run();
  
-     fprintf(outf,
-      "Client check: %d host%s checked in %s seconds, %d problem%s found\n",
-           hostcount, (hostcount == 1) ? "" : "s",
-           walltime_str(curclock()),
-           remote_errors, (remote_errors == 1) ? "" : "s");
+     g_fprintf(outf, plural(_("Client check: %d host checked in %s seconds."), 
+                        _("Client check: %d hosts checked in %s seconds."),
+                        hostcount),
+           hostcount, walltime_str(curclock()));
+     g_fprintf(outf, plural(_("  %d problem found.\n"),
+                        _("  %d problems found.\n"), remote_errors),
+           remote_errors);
      fflush(outf);
  
-     amfree(config_dir);
-     amfree(config_name);
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fd, malloc_hist_1, malloc_hist_2);
-     }
      exit(userbad || remote_errors > 0);
      /*NOTREACHED*/
      return 0;
@@@ -1775,8 -1844,8 +1851,8 @@@ handle_result
      hostp->up = HOST_READY;
  
      if (pkt == NULL) {
-       fprintf(outf,
-           "WARNING: %s: selfcheck request failed: %s\n", hostp->hostname,
+       g_fprintf(outf,
+           _("WARNING: %s: selfcheck request failed: %s\n"), hostp->hostname,
            security_geterror(sech));
        remote_errors++;
        hostp->up = HOST_DONE;
      }
  
  #if 0
-     fprintf(errf, "got response from %s:\n----\n%s----\n\n",
+     g_fprintf(errf, _("got response from %s:\n----\n%s----\n\n"),
            hostp->hostname, pkt->body);
  #endif
  
                t += SIZEOF("features=")-1;
                am_release_feature_set(hostp->features);
                if((hostp->features = am_string_to_feature(t)) == NULL) {
-                   fprintf(outf, "ERROR: %s: bad features value: %s\n",
+                   g_fprintf(outf, _("ERROR: %s: bad features value: %s\n"),
                            hostp->hostname, line);
+                   g_fprintf(outf, _("The amfeature in the reply packet is invalid\n"));
                }
            }
  
            if(!((hostp->features == NULL) && (pkt->type == P_NAK)
               && ((strcmp(t - 1, "unknown service: noop") == 0)
                   || (strcmp(t - 1, "noop: invalid service") == 0)))) {
-               fprintf(outf, "ERROR: %s%s: %s\n",
+               g_fprintf(outf, _("ERROR: %s%s: %s\n"),
                        (pkt->type == P_NAK) ? "NAK " : "",
                        hostp->hostname,
                        t - 1);
            continue;
        }
  
-       fprintf(outf, "ERROR: %s: unknown response: %s\n",
+       g_fprintf(outf, _("ERROR: %s: unknown response: %s\n"),
                hostp->hostname, line);
        remote_errors++;
        hostp->up = HOST_DONE;
         * The client does not support the features list, so give it an
         * empty one.
         */
-       dbprintf(("%s: no feature set from host %s\n",
-                 debug_prefix_time(NULL), hostp->hostname));
+       dbprintf(_("no feature set from host %s\n"), hostp->hostname);
        hostp->features = am_set_default_feature_set();
      }
      for(dp = hostp->disks; dp != NULL; dp = dp->hostnext) {
      start_host(hostp);
      if(hostp->up == HOST_DONE)
        security_close_connection(sech, hostp->hostname);
+     /* try to clean up any defunct processes, since Amanda doesn't wait() for
+        them explicitly */
+     while(waitpid(-1, NULL, WNOHANG)> 0);
  }
diff --combined server-src/amlabel.c
index 1ead3ae917d86f42a8ef2409c2728e64f80431f5,0eda70b62afdc5bd3f45c7f7b6a2424be322ae78..651e6b6ec4d91bc007c689390d514758084dded9
  #include "amanda.h"
  #include "conffile.h"
  #include "tapefile.h"
- #include "tapeio.h"
  #include "changer.h"
- #ifdef HAVE_LIBVTBLC
- #include <vtblc.h>
- #endif /* HAVE_LIBVTBLC */
+ #include <device.h>
+ #include <timestamp.h>
+ #include <taperscan.h>
  
  /* local functions */
  
  int main(int argc, char **argv);
- void usage(void);
  
- void
- usage(void)
- {
-     fprintf(stderr, "Usage: %s [-f] <conf> <label> [slot <slot-number>] [-o configoption]*\n",
+ static void usage(void) {
+     g_fprintf(stderr, _("Usage: %s [-f] <conf> <label> [slot <slot-number>] [-o configoption]*\n"),
            get_pname());
      exit(1);
  }
  
+ static void print_read_label_status_error(ReadLabelStatusFlags status) {
+     char ** status_strv;
+     if (status == READ_LABEL_STATUS_SUCCESS)
+         return;
+     status_strv = g_flags_nick_to_strv(status,
+                                        READ_LABEL_STATUS_FLAGS_TYPE);
+     g_assert(g_strv_length(status_strv) > 0);
+     if (g_strv_length(status_strv) == 1) {
+         g_printf("Error was %s.\n", *status_strv);
+     } else {
+         char * status_list = g_english_strjoinv(status_strv, "or");
+         g_printf("Error was one of %s.\n", status_list);
+         amfree(status_list);
+     }
+     g_strfreev(status_strv);
+ }
  int
  main(
      int               argc,
      char **   argv)
  {
-     char *conffile;
      char *conf_tapelist;
      char *outslot = NULL;
-     char *errstr = NULL, *label, *oldlabel=NULL, *tapename = NULL;
+     char *label, *tapename = NULL;
      char *labelstr, *slotstr;
-     char *olddatestamp=NULL;
      char *conf_tapelist_old;
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
- #ifdef HAVE_LINUX_ZFTAPE_H
-     int fd = -1;
-     int isa_zftape;
- #endif /* HAVE_LINUX_ZFTAPE_H */
      int have_changer;
      int force, tape_ok;
      tapetype_t *tape;
      size_t tt_blocksize_kb;
      int slotcommand;
-     uid_t uid_me;
-     uid_t uid_dumpuser;
-     char *dumpuser;
-     struct passwd *pw;
-     int    new_argc;
-     char **new_argv;
- #ifdef HAVE_LIBVTBLC
-     int vtbl_no      = -1;
-     char *datestr    = NULL;
-     char *rawtapedev = NULL;
-     int first_seg, last_seg;
- #endif /* HAVE_LIBVTBLC */
+     Device * device;
+     ReadLabelStatusFlags label_status;
+     char *cfg_opt = NULL;
+     config_overwrites_t *cfg_ovr = NULL;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(-1, 0);
      safe_cd();
      set_pname("amlabel");
  
      dbopen(DBG_SUBDIR_SERVER);
+     device_api_init();
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
 +    malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +
      erroutput_type = ERR_INTERACTIVE;
  
-     parse_conf(argc, argv, &new_argc, &new_argv);
+     cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
  
-     if(new_argc > 1 && strcmp(new_argv[1],"-f") == 0)
+     if(argc > 1 && strcmp(argv[1],"-f") == 0)
         force=1;
      else force=0;
  
-     if(new_argc != 3+force && new_argc != 5+force)
+     if(argc != 3+force && argc != 5+force)
        usage();
  
-     config_name = new_argv[1+force];
-     label = new_argv[2+force];
+     cfg_opt = argv[1+force];
+     label = argv[2+force];
  
-     if(new_argc == 5+force) {
-       if(strcmp(new_argv[3+force], "slot"))
+     if(argc == 5+force) {
+       if(strcmp(argv[3+force], "slot"))
            usage();
-       slotstr = new_argv[4+force];
+       slotstr = argv[4+force];
        slotcommand = 1;
      } else {
        slotstr = "current";
        slotcommand = 0;
      }
  
-     config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     if (read_conffile(conffile)) {
-       error("errors processing config file \"%s\"", conffile);
-       /*NOTREACHED*/
-     }
+     config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL,
+               cfg_opt);
+     apply_config_overwrites(cfg_ovr);
  
-     dbrename(config_name, DBG_SUBDIR_SERVER);
+     check_running_as(RUNNING_AS_DUMPUSER);
  
-     report_bad_conf_arg();
+     dbrename(config_name, DBG_SUBDIR_SERVER);
  
-     conf_tapelist = getconf_str(CNF_TAPELIST);
-     if (*conf_tapelist == '/') {
-       conf_tapelist = stralloc(conf_tapelist);
-     } else {
-       conf_tapelist = stralloc2(config_dir, conf_tapelist);
-     }
+     conf_tapelist = config_dir_relative(getconf_str(CNF_TAPELIST));
      if (read_tapelist(conf_tapelist)) {
-       error("could not load tapelist \"%s\"", conf_tapelist);
-       /*NOTREACHED*/
-     }
-     uid_me = getuid();
-     uid_dumpuser = uid_me;
-     dumpuser = getconf_str(CNF_DUMPUSER);
-     if ((pw = getpwnam(dumpuser)) == NULL) {
-       error("cannot look up dump user \"%s\"", dumpuser);
-       /*NOTREACHED*/
-     }
-     uid_dumpuser = pw->pw_uid;
-     if ((pw = getpwuid(uid_me)) == NULL) {
-       error("cannot look up my own uid %ld", (long)uid_me);
-       /*NOTREACHED*/
-     }
-     if (uid_me != uid_dumpuser) {
-       error("running as user \"%s\" instead of \"%s\"",
-             pw->pw_name, dumpuser);
+       error(_("could not load tapelist \"%s\""), conf_tapelist);
        /*NOTREACHED*/
      }
  
      labelstr = getconf_str(CNF_LABELSTR);
  
      if(!match(labelstr, label)) {
-       error("label %s doesn't match labelstr \"%s\"", label, labelstr);
+       error(_("label %s doesn't match labelstr \"%s\""), label, labelstr);
        /*NOTREACHED*/
      }
  
      if((lookup_tapelabel(label))!=NULL) {
        if(!force) {
-           error("label %s already on a tape\n",label);
+           error(_("label %s already on a tape\n"),label);
            /*NOTREACHED*/
        }
      }
  
      if((have_changer = changer_init()) == 0) {
        if(slotcommand) {
-           fprintf(stderr,
-            "%s: no tpchanger specified in \"%s\", so slot command invalid\n",
-                   new_argv[0], conffile);
+           g_fprintf(stderr,
+            _("%s: no tpchanger specified in \"%s\", so slot command invalid\n"),
+                   argv[0], config_filename);
            usage();
        }
        tapename = getconf_str(CNF_TAPEDEV);
        if (tapename == NULL) {
-           error("No tapedev specified");
-       } else {
-           tapename = stralloc(tapename);
+           error(_("No tapedev specified"));
        }
- #ifdef HAVE_LIBVTBLC
-       rawtapedev = stralloc(getconf_str(CNF_RAWTAPEDEV));
- #endif /* HAVE_LIBVTBLC */
      } else if(have_changer != 1) {
-       error("changer initialization failed: %s", strerror(errno));
+       error(_("changer initialization failed: %s"), strerror(errno));
        /*NOTREACHED*/
      } else {
        if(changer_loadslot(slotstr, &outslot, &tapename)) {
-           error("could not load slot \"%s\": %s", slotstr, changer_resultstr);
-           /*NOTREACHED*/
-       }
-       printf("labeling tape in slot %s (%s):\n", outslot, tapename);
-     }
- #ifdef HAVE_LINUX_ZFTAPE_H
-     isa_zftape = is_zftape(tapename);
-     if (isa_zftape) {
-       if((fd = tape_open(tapename, O_WRONLY)) == -1) {
-           errstr = newstralloc2(errstr, "amlabel: ",
-                                 (errno == EACCES) ? "tape is write-protected"
-                                 : strerror(errno));
-           error(errstr);
+           error(_("could not load slot \"%s\": %s"), slotstr, changer_resultstr);
            /*NOTREACHED*/
        }
 +    }
 +#endif /* HAVE_LINUX_ZFTAPE_H */
  
-     printf("rewinding"); fflush(stdout);
- #ifdef HAVE_LINUX_ZFTAPE_H
-     if (isa_zftape) {
-       if(tapefd_rewind(fd) == -1) {
-           putchar('\n');
-           error(strerror(errno));
-           /*NOTREACHED*/
-       }
-     }
-     else
- #endif /* HAVE_LINUX_ZFTAPE_H */
-     if((errstr = tape_rewind(tapename)) != NULL) {
-       putchar('\n');
-       error(errstr);
-       /*NOTREACHED*/
+       g_printf(_("labeling tape in slot %s (%s):\n"), outslot, tapename);
      }
  
      tape_ok=1;
-     printf(", reading label");fflush(stdout);
-     if((errstr = tape_rdlabel(tapename, &olddatestamp, &oldlabel)) != NULL) {
-       printf(", %s\n",errstr);
-       tape_ok=1;
+     g_printf("Reading label...\n");fflush(stdout);
+     device = device_open(tapename);
+     if (device == NULL) {
+         error("Could not open device %s.\n", tapename);
      }
-     else {
+     
+     device_set_startup_properties_from_config(device);
+     label_status = device_read_label(device);
+     if (label_status & READ_LABEL_STATUS_VOLUME_UNLABELED) {
+         g_printf("Found an unlabeled tape.\n");
+     } else if (label_status != READ_LABEL_STATUS_SUCCESS) {
+         g_printf("Reading the tape label failed: \n  ");
+         print_read_label_status_error(label_status);
+         tape_ok = 0;
+     } else {
        /* got an amanda tape */
-       printf(" %s",oldlabel);
-       if(strcmp(oldlabel, FAKE_LABEL) != 0
-          && match(labelstr, oldlabel) == 0) {
-           printf(", tape is in another amanda configuration");
+       g_printf(_("Found Amanda tape %s"),device->volume_label);
+       if(match(labelstr, device->volume_label) == 0) {
+           g_printf(_(", but it is not from configuration %s."), config_name);
            if(!force)
                tape_ok=0;
-       }
-       else {
-           if((lookup_tapelabel(oldlabel)) != NULL) {
-               printf(", tape is active");
+       } else {
+           if((lookup_tapelabel(device->volume_label)) != NULL) {
+               g_printf(_(", tape is active"));
                if(!force)
                    tape_ok=0;
            }
        }
-       printf("\n");
-     }
-     amfree(oldlabel);
-     amfree(olddatestamp);
-       
-     printf("rewinding"); fflush(stdout);
- #ifdef HAVE_LINUX_ZFTAPE_H
-     if (isa_zftape) {
-       if(tapefd_rewind(fd) == -1) {
-           putchar('\n');
-           error(strerror(errno));
-           /*NOTREACHED*/
-       }
-     }
-     else
- #endif /* HAVE_LINUX_ZFTAPE_H */
-     if((errstr = tape_rewind(tapename)) != NULL) {
-       putchar('\n');
-       error(errstr);
-       /*NOTREACHED*/
+       g_printf("\n");
      }
  
      if(tape_ok) {
-       printf(", writing label %s", label); fflush(stdout);
- #ifdef HAVE_LINUX_ZFTAPE_H
-       if (isa_zftape) {
-           errstr = tapefd_wrlabel(fd, "X", label,
-                                   (tt_blocksize_kb * 1024));
-           if(errstr != NULL) {
-               putchar('\n');
-               error(errstr);
-               /*NOTREACHED*/
-           }
-       }
-       else
- #endif /* HAVE_LINUX_ZFTAPE_H */
-       errstr = tape_wrlabel(tapename, "X", label,
-                             (tt_blocksize_kb * 1024));
-       if(errstr != NULL) {
-           putchar('\n');
-           error(errstr);
-           /*NOTREACHED*/
-       }
- #ifdef HAVE_LINUX_ZFTAPE_H
-       if (isa_zftape) {
-           tapefd_weof(fd, (off_t)1);
-       }
- #endif /* HAVE_LINUX_ZFTAPE_H */
- #ifdef HAVE_LINUX_ZFTAPE_H
-       if (isa_zftape) {
-           errstr = tapefd_wrendmark(fd, "X",
-                                     (tt_blocksize_kb * 1024));
-           if(errstr != NULL) {
-               putchar('\n');
-               error(errstr);
-               /*NOTREACHED*/
-           }
-       }
-       else
- #endif /* HAVE_LINUX_ZFTAPE_H */
-       errstr = tape_wrendmark(tapename, "X",
-                               (tt_blocksize_kb * 1024));
-       if(errstr != NULL) {
-           putchar('\n');
-           error(errstr);
-           /*NOTREACHED*/
-       }
- #ifdef HAVE_LINUX_ZFTAPE_H
-       if (isa_zftape) {
-           tapefd_weof(fd, (off_t)1);
-           printf(",\nrewinding"); fflush(stdout); 
-      
-           if(tapefd_rewind(fd) == -1) { 
-               putchar('\n'); 
-               error(strerror(errno)); 
-               /*NOTREACHED*/
-           } 
-           close(fd);
- #ifdef HAVE_LIBVTBLC
-           /* update volume table */
-           printf(", updating volume table"); fflush(stdout);
-     
-           if ((fd = raw_tape_open(rawtapedev, O_RDWR)) == -1) {
-               if(errno == EACCES) {
-                   errstr = newstralloc(errstr,
-                                        "updating volume table: raw tape device is write protected");
-               } else {
-                   errstr = newstralloc2(errstr,
-                                         "updating volume table: ", strerror(errno));
-               }
-               putchar('\n');
-               error(errstr);
-               /*NOTREACHED*/
-           }
-           /* read volume table */
-           if ((num_volumes = read_vtbl(fd, volumes, vtbl_buffer,
-                                        &first_seg, &last_seg)) == -1 ) {
-               errstr = newstralloc2(errstr,
-                                     "reading volume table: ", strerror(errno));
-               putchar('\n');
-               error(errstr);
-               /*NOTREACHED*/
-           }
-           /* set date and volume label for first entry */
-           vtbl_no = 0;
-           datestr = NULL; 
-           if (set_date(datestr, volumes, num_volumes, vtbl_no)){
-               errstr = newstralloc2(errstr,
-                                     "setting date for entry 1: ", strerror(errno));
-               putchar('\n');
-               error(errstr);
-               /*NOTREACHED*/
-           }
-           if(set_label(label, volumes, num_volumes, vtbl_no)){
-               errstr = newstralloc2(errstr,
-                                     "setting label for entry 1: ", strerror(errno));
-               putchar('\n');
-               error(errstr);
-               /*NOTREACHED*/
-           }
-           /* set date and volume label for last entry */
-           vtbl_no = 1;
-           datestr = NULL; 
-           if (set_date(datestr, volumes, num_volumes, vtbl_no)){
-               errstr = newstralloc2(errstr,
-                                     "setting date for entry 2: ", strerror(errno));
-               putchar('\n');
-               error(errstr);
-               /*NOTREACHED*/
-           }
-           if(set_label("AMANDA Tape End", volumes, num_volumes, vtbl_no)){
-               errstr = newstralloc2(errstr,
-                                     "setting label for entry 2: ", strerror(errno));
-               putchar('\n');
-               error(errstr);
-               /*NOTREACHED*/
-           }
-           /* write volume table back */
-           if (write_vtbl(fd, volumes, vtbl_buffer, num_volumes, first_seg,
-                          op_mode == trunc)) {
-               errstr = newstralloc2(errstr,
-                                     "writing volume table: ", strerror(errno));
-               putchar('\n');
-               error(errstr);
-               /*NOTREACHED*/
-           }  
-           close(fd);
- #endif /* HAVE_LIBVTBLC */
-       }
- #endif /* HAVE_LINUX_ZFTAPE_H */
-       if (tape_ok) {
-           printf(", checking label"); fflush(stdout);
-           if((errstr = tape_rdlabel(tapename, &olddatestamp, &oldlabel)) != NULL) {
-               putchar('\n');
-               if (strcmp(errstr, "not an amanda tape") != 0) {
-                   error(errstr);
-                   /*NOTREACHED*/
-               }
-               error("no label found, are you sure %s is non-rewinding?",
-                     tapename);
-               /*NOTREACHED*/
-           }
-           if (strcmp("X", olddatestamp) != 0 ||
-               (strcmp(oldlabel, FAKE_LABEL) != 0
-                && strcmp(label, oldlabel) != 0)) {
-               putchar('\n');
-               error("read label %s back, timestamp %s (expected X), what now?",
-                     oldlabel, olddatestamp);
-               /*NOTREACHED*/
-           }
-           amfree(oldlabel);
-           amfree(olddatestamp);
-           /* write tape list */
-           /* make a copy */
-                   conf_tapelist_old = stralloc2(conf_tapelist, ".amlabel");
-           if(write_tapelist(conf_tapelist_old)) {
-               error("couldn't write tapelist: %s", strerror(errno));
-               /*NOTREACHED*/
-           }
-           amfree(conf_tapelist_old);
-           /* XXX add cur_tape number to tape list structure */
-           remove_tapelabel(label);
-           add_tapelabel("0", label);
-           if(write_tapelist(conf_tapelist)) {
-               error("couldn't write tapelist: %s", strerror(errno));
-               /*NOTREACHED*/
-           }
-             if (have_changer) {
-                 changer_label(outslot, label);
-             }
-       } /* write tape list */
-       printf(", done.\n");
+       char *timestamp = NULL;
+       g_printf(_("Writing label %s..\n"), label); fflush(stdout);
+         
+       timestamp = get_undef_timestamp();
+         if (!device_start(device, ACCESS_WRITE, label, timestamp)) {
+           error(_("Error writing label.\n"));
+             g_assert_not_reached();
+       } else if (!device_finish(device)) {
+             error(_("Error closing device.\n"));
+             g_assert_not_reached();
+         }
+       amfree(timestamp);
+         g_printf(_("Checking label...\n")); fflush(stdout);
+         label_status = device_read_label(device);
+         if (label_status != READ_LABEL_STATUS_SUCCESS) {
+             g_printf("Checking the tape label failed: \n  ");
+             print_read_label_status_error(label_status);
+             exit(EXIT_FAILURE);
+         } else if (device->volume_label == NULL) {
+             error(_("no label found.\n"));
+             g_assert_not_reached();
+         } else if (strcmp(device->volume_label, label) != 0) {
+             error(_("Read back a different label: Got %s, but expected %s\n"),
+                   device->volume_label, label);
+             g_assert_not_reached();
+         } else if (get_timestamp_state(device->volume_time) !=
+                    TIME_STATE_UNDEF) {
+             error(_("Read the right label, but the wrong timestamp: "
+                     "Got %s, expected X.\n"), device->volume_time);
+             g_assert_not_reached();
+         }
+         
+         /* write tape list */
+         
+         /* make a copy */
+         conf_tapelist_old = stralloc2(conf_tapelist, ".amlabel");
+         if(write_tapelist(conf_tapelist_old)) {
+             error(_("couldn't write tapelist: %s"), strerror(errno));
+             /*NOTREACHED*/
+         }
+         amfree(conf_tapelist_old);
+         
+         /* XXX add cur_tape number to tape list structure */
+         remove_tapelabel(label);
+         add_tapelabel("0", label);
+         if(write_tapelist(conf_tapelist)) {
+             error(_("couldn't write tapelist: %s"), strerror(errno));
+             /*NOTREACHED*/
+         }
+         
+         g_printf(_("Success!\n"));
      } else {
-       printf("\ntape not labeled\n");
+       g_printf(_("\ntape not labeled\n"));
      }
+     
+     g_object_unref(device);
+     device = NULL;
  
      clear_tapelist();
-     free_new_argv(new_argc, new_argv);
-     free_server_config();
      amfree(outslot);
-     amfree(tapename);
-     amfree(conffile);
      amfree(conf_tapelist);
-     amfree(config_dir);
      config_name=NULL;
      dbclose();
  
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
      return 0;
  }
diff --combined server-src/amtape.c
index 4075ea44e2ef75d78c46a868e0d1cd60c7d5d506,fed07efd571fb00e5307920f16b84c8143671845..11d002212e7cb743443e5710e67d5c98d89a9fde
  #include "conffile.h"
  #include "tapefile.h"
  #include "taperscan.h"
- #include "tapeio.h"
  #include "clock.h"
  #include "changer.h"
  #include "version.h"
+ #include "device.h"
+ #include "timestamp.h"
  
  /* local functions */
- void usage(void);
static void usage(void);
  int main(int argc, char **argv);
- void reset_changer(int argc, char **argv);
- void eject_tape(int argc, char **argv);
- void clean_tape(int argc, char **argv);
- void load_slot(int argc, char **argv);
- void load_label(int argc, char **argv);
- void show_slots(int argc, char **argv);
- void show_current(int argc, char **argv);
- void update_labeldb (int argc, char **argv);
- void amtape_taper_scan(int argc, char **argv);
- void show_device(int argc, char **argv);
- int update_one_slot (void *ud, int rc, char *slotstr, char *device);
- int loadlabel_slot(void *ud, int rc, char *slotstr, char *device);
+ static void reset_changer(int argc, char **argv);
+ static void eject_tape(int argc, char **argv);
+ static void clean_tape(int argc, char **argv);
+ static void load_slot(int argc, char **argv);
+ static void load_label(int argc, char **argv);
+ static void show_slots(int argc, char **argv);
+ static void show_current(int argc, char **argv);
+ static void amtape_taper_scan(int argc, char **argv);
+ static void show_device(int argc, char **argv);
+ static int loadlabel_slot(void *ud, int rc, char *slotstr, char *device);
  int show_init(void *ud, int rc, int ns, int bk, int s);
- int show_init_all(void *ud, int rc, int ns, int bk, int s);
- int show_init_current(void *ud, int rc, int ns, int bk, int s);
- int show_slot(void *ud, int rc, char *slotstr, char *device);
+ static int show_slots_slot(void *ud, int rc, char *slotstr, char *device);
  
  static const struct {
      const char *name;
      const char *usage;
  } cmdtab[] = {
      { "reset", reset_changer,
-       "reset                Reset changer to known state" },
+       T_("reset                Reset changer to known state") },
      { "eject", eject_tape,
-       "eject                Eject current tape from drive" },
+       T_("eject                Eject current tape from drive") },
      { "clean", clean_tape,
-       "clean                Clean the drive" },
+       T_("clean                Clean the drive") },
      { "show", show_slots,
-       "show                 Show contents of all slots" },
+       T_("show                 Show contents of all slots") },
      { "current", show_current,
-       "current              Show contents of current slot" },
+       T_("current              Show contents of current slot") },
      { "slot" , load_slot,
-       "slot <slot #>        load tape from slot <slot #>" },
+       T_("slot <slot #>        load tape from slot <slot #>") },
      { "slot" , load_slot,
-       "slot current         load tape from current slot" },
+       T_("slot current         load tape from current slot") },
      { "slot" , load_slot,
-       "slot prev            load tape from previous slot" },
+       T_("slot prev            load tape from previous slot") },
      { "slot" , load_slot,
-       "slot next            load tape from next slot" },
+       T_("slot next            load tape from next slot") },
      { "slot" , load_slot,
-       "slot advance         advance to next slot but do not load" },
+       T_("slot advance         advance to next slot but do not load") },
      { "slot" , load_slot,
-       "slot first           load tape from first slot" },
+       T_("slot first           load tape from first slot") },
      { "slot" , load_slot,
-       "slot last            load tape from last slot" },
+       T_("slot last            load tape from last slot") },
      { "label", load_label,
-       "label <label>        find and load labeled tape" },
+       T_("label <label>        find and load labeled tape") },
      { "taper", amtape_taper_scan,
-       "taper                perform taper's scan alg." },
+       T_("taper                perform taper's scan alg.") },
      { "device", show_device,
-       "device               show current tape device" },
-     { "update", update_labeldb,
-       "update               update the label matchingdatabase"},
+       T_("device               show current tape device") },
+     { "update", show_slots,
+       T_("update               update the label matchingdatabase")},
  };
  #define       NCMDS   (int)(sizeof(cmdtab) / sizeof(cmdtab[0]))
  
- void
static void
  usage(void)
  {
      int i;
  
-     fprintf(stderr, "Usage: amtape%s <conf> <command> {<args>} [-o configoption]*\n", versionsuffix());
-     fprintf(stderr, "\tValid commands are:\n");
+     g_fprintf(stderr, _("Usage: amtape%s <conf> <command> {<args>} [-o configoption]*\n"), versionsuffix());
+     g_fprintf(stderr, _("\tValid commands are:\n"));
      for (i = 0; i < NCMDS; i++)
-       fprintf(stderr, "\t\t%s\n", cmdtab[i].usage);
+       g_fprintf(stderr, "\t\t%s\n", _(cmdtab[i].usage));
      exit(1);
  }
  
@@@ -114,19 -111,19 +111,19 @@@ main
      int               argc,
      char **   argv)
  {
-     char *conffile;
      char *conf_tapelist;
-     char *argv0 = argv[0];
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
      int i;
      int have_changer;
-     uid_t uid_me;
-     uid_t uid_dumpuser;
-     char *dumpuser;
-     struct passwd *pw;
-     int new_argc;
-     char **new_argv;
+     config_overwrites_t *cfg_ovr = NULL;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(-1, 0);
      safe_cd();
  
      dbopen(DBG_SUBDIR_SERVER);
  
 +    malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +
      erroutput_type = ERR_INTERACTIVE;
  
-     parse_conf(argc, argv, &new_argc, &new_argv);
-     if(new_argc < 3) usage();
+     cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
+     if(argc < 3) usage();
  
-     config_name = new_argv[1];
+     config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL,
+               argv[1]);
+     apply_config_overwrites(cfg_ovr);
  
-     config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     if (read_conffile(conffile)) {
-       error("errors processing config file \"%s\"", conffile);
-       /*NOTREACHED*/
-     }
+     check_running_as(RUNNING_AS_DUMPUSER);
  
      dbrename(config_name, DBG_SUBDIR_SERVER);
  
-     conf_tapelist = getconf_str(CNF_TAPELIST);
-     if (*conf_tapelist == '/') {
-       conf_tapelist = stralloc(conf_tapelist);
-     } else {
-       conf_tapelist = stralloc2(config_dir, conf_tapelist);
-     }
+     conf_tapelist = config_dir_relative(getconf_str(CNF_TAPELIST));
      if (read_tapelist(conf_tapelist)) {
-       error("could not load tapelist \"%s\"", conf_tapelist);
+       error(_("could not load tapelist \"%s\""), conf_tapelist);
        /*NOTREACHED*/
      }
      amfree(conf_tapelist);
  
-     uid_me = getuid();
-     uid_dumpuser = uid_me;
-     dumpuser = getconf_str(CNF_DUMPUSER);
-     if ((pw = getpwnam(dumpuser)) == NULL) {
-       error("cannot look up dump user \"%s\"", dumpuser);
-       /*NOTREACHED*/
-     }
-     uid_dumpuser = pw->pw_uid;
-     if ((pw = getpwuid(uid_me)) == NULL) {
-       error("cannot look up my own uid %ld", (long)uid_me);
-       /*NOTREACHED*/
-     }
-     if (uid_me != uid_dumpuser) {
-       error("running as user \"%s\" instead of \"%s\"",
-             pw->pw_name, dumpuser);
-       /*NOTREACHED*/
-     }
      if((have_changer = changer_init()) == 0) {
-       error("no tpchanger specified in \"%s\"", conffile);
+       error(_("no tpchanger specified in \"%s\""), config_filename);
        /*NOTREACHED*/
      } else if (have_changer != 1) {
-       error("changer initialization failed: %s", strerror(errno));
+       error(_("changer initialization failed: %s"), strerror(errno));
        /*NOTREACHED*/
      }
  
      /* switch on command name */
  
-     new_argc -= 2; new_argv += 2;
+     argc -= 2; argv += 2;
      for (i = 0; i < NCMDS; i++)
-       if (strcmp(new_argv[0], cmdtab[i].name) == 0) {
-           (*cmdtab[i].fn)(new_argc, new_argv);
+       if (strcmp(argv[0], cmdtab[i].name) == 0) {
+           (*cmdtab[i].fn)(argc, argv);
            break;
        }
      if (i == NCMDS) {
-       fprintf(stderr, "%s: unknown command \"%s\"\n", argv0, new_argv[0]);
+       g_fprintf(stderr, _("%s: unknown command \"%s\"\n"), get_pname(), argv[0]);
        usage();
      }
  
      amfree(changer_resultstr);
-     amfree(conffile);
-     amfree(config_dir);
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
  
      dbclose();
      return 0;
  
  /* ---------------------------- */
  
- void
- reset_changer(
-     int               argc,
-     char **   argv)
- {
+ static void
+ reset_changer(G_GNUC_UNUSED int       argc,
+               G_GNUC_UNUSED char ** argv) {
      char *slotstr = NULL;
  
 +    (void)argc;       /* Quiet unused parameter warning */
 +    (void)argv;       /* Quiet unused parameter warning */
 +
      switch(changer_reset(&slotstr)) {
      case 0:
-       fprintf(stderr, "%s: changer is reset, slot %s is loaded.\n",
+       g_fprintf(stderr, _("%s: changer is reset, slot %s is loaded.\n"),
                get_pname(), slotstr);
        break;
      case 1:
-       fprintf(stderr, "%s: changer is reset, but slot %s not loaded: %s\n",
+       g_fprintf(stderr, _("%s: changer is reset, but slot %s not loaded: %s\n"),
                get_pname(), slotstr, changer_resultstr);
        break;
      default:
-       error("could not reset changer: %s", changer_resultstr);
+       error(_("could not reset changer: %s"), changer_resultstr);
        /*NOTREACHED*/
      }
      amfree(slotstr);
  
  
  /* ---------------------------- */
- void
- clean_tape(
-     int               argc,
-     char **   argv)
- {
+ static void
+ clean_tape(G_GNUC_UNUSED int  argc,
+            G_GNUC_UNUSED char ** argv) {
      char *devstr = NULL;
  
 +    (void)argc;       /* Quiet unused parameter warning */
 +    (void)argv;       /* Quiet unused parameter warning */
 +
      if(changer_clean(&devstr) == 0) {
-       fprintf(stderr, "%s: device %s is clean.\n", get_pname(), devstr);
+       g_fprintf(stderr, _("%s: device %s is clean.\n"), get_pname(), devstr);
      } else {
-       fprintf(stderr, "%s: device %s not clean: %s\n",
+       g_fprintf(stderr, _("%s: device %s not clean: %s\n"),
                get_pname(), devstr ? devstr : "??", changer_resultstr);
      }
      amfree(devstr);
  
  
  /* ---------------------------- */
- void
- eject_tape(
-     int               argc,
-     char **   argv)
- {
+ static void
+ eject_tape(G_GNUC_UNUSED int  argc,
+            G_GNUC_UNUSED char ** argv) {
      char *slotstr = NULL;
  
 +    (void)argc;       /* Quiet unused parameter warning */
 +    (void)argv;       /* Quiet unused parameter warning */
 +
      if(changer_eject(&slotstr) == 0) {
-       fprintf(stderr, "%s: slot %s is ejected.\n", get_pname(), slotstr);
+       g_fprintf(stderr, _("%s: slot %3s is ejected.\n"), get_pname(), slotstr);
      } else {
-       fprintf(stderr, "%s: slot %s not ejected: %s\n",
+       g_fprintf(stderr, _("%s: slot %3s not ejected: %s\n"),
                get_pname(), slotstr ? slotstr : "??", changer_resultstr);
      }
      amfree(slotstr);
  
  /* ---------------------------- */
  
- void
static void
  load_slot(
      int               argc,
      char **   argv)
  {
      char *slotstr = NULL, *devicename = NULL;
-     char *errstr;
      int is_advance;
+     Device * device;
  
      if(argc != 2)
        usage();
  
+     device_api_init();
      is_advance = (strcmp(argv[1], "advance") == 0);
      if(changer_loadslot(argv[1], &slotstr, &devicename)) {
-       error("could not load slot %s: %s", slotstr, changer_resultstr);
+       error(_("could not load slot %s: %s"), slotstr, changer_resultstr);
        /*NOTREACHED*/
      }
-     if(! is_advance && (errstr = tape_rewind(devicename)) != NULL) {
-       fprintf(stderr,
-               "%s: could not rewind %s: %s", get_pname(), devicename, errstr);
-       amfree(errstr);
+     
+     if (!is_advance) {
+         device = device_open(devicename);
+         if (device == NULL) {
+             g_fprintf(stderr,
+                     _("%s: could not open device %s"), get_pname(),
+                     devicename);
+         } else {
+             g_object_unref(device);
+         }
      }
  
-     fprintf(stderr, "%s: changed to slot %s", get_pname(), slotstr);
+     g_fprintf(stderr, _("%s: changed to slot %s"), get_pname(), slotstr);
      if(! is_advance) {
-       fprintf(stderr, " on %s", devicename);
+       g_fprintf(stderr, _(" on %s"), devicename);
      }
      fputc('\n', stderr);
      amfree(slotstr);
  
  /* ---------------------------- */
  
- int nslots, backwards, found, got_match, tapedays;
- char *datestamp;
- char *label = NULL, *first_match_label = NULL, *first_match = NULL;
- char *searchlabel, *labelstr;
- tape_t *tp;
- static int scan_init(void *ud, int rc, int ns, int bk, int s);
+ /* This initalizes the ChangerStatus structure for all commands that
+    use changer_find; namely, show_slots, load_label, and
+    show_current. */
  static int 
- scan_init(
-     void *    ud,
-     int               rc,
-     int               ns,
-     int               bk,
-     int               s)
- {
-     (void)ud; /* Quiet unused parameter warning */
-     (void)s;  /* Quiet unused parameter warning */
-     if(rc) {
-       error("could not get changer info: %s", changer_resultstr);
+ scan_init(G_GNUC_UNUSED void * data, int rc, G_GNUC_UNUSED int numslots,
+           G_GNUC_UNUSED int backwards, G_GNUC_UNUSED int searchable) {
+     if(rc != 0) {
+       error(_("could not get changer info: %s"), changer_resultstr);
        /*NOTREACHED*/
      }
  
 +    nslots = ns;
 +    backwards = bk;
 +
      return 0;
  }
  
- int
+ static int scan_init_print(void * data, int rc, int numslots,
+                          int backwards, int searchable) {
+     
+     g_fprintf(stderr, _("%s: scanning all %d slots in tape-changer rack:\n"),
+             get_pname(), numslots);
+     return scan_init(data, rc, numslots, backwards, searchable);
+ }
+ typedef struct {
+     gboolean found;
+     char *searchlabel;
+ } LabelChangerStatus;
+ /* This is the 'user_slot' callback for the 'load label' command. */
+ static int
  loadlabel_slot(
      void *    ud,
      int               rc,
      char *    slotstr,
-     char *    device)
+     char *    device_name)
  {
-     char *errstr;
-     (void)ud; /* Quiet unused parameter warning */
+     LabelChangerStatus * status = ud;
+     Device * device;
+     ReadLabelStatusFlags label_status;
+     if (rc > 1) {
+       error(_("could not load slot %s: %s"), slotstr, changer_resultstr);
+         g_assert_not_reached();
+     } else if (rc == 1) {
+       g_fprintf(stderr, _("%s: slot %3s: %s\n"),
+               get_pname(), slotstr, changer_resultstr);
+         return 0;
+     }
  
-     if(rc > 1) {
-       error("could not load slot %s: %s", slotstr, changer_resultstr);
-       /*NOTREACHED*/
+     device = device_open(device_name);
+     if (device == NULL) {
+         g_fprintf(stderr, _("%s: slot %3s: Could not open device.\n"),
+                 get_pname(), slotstr);
+         return 0;
      }
-     else if(rc == 1)
-       fprintf(stderr, "%s: slot %s: %s\n",
-               get_pname(), slotstr, changer_resultstr);
-     else if((errstr = tape_rdlabel(device, &datestamp, &label)) != NULL)
-       fprintf(stderr, "%s: slot %s: %s\n", get_pname(), slotstr, errstr);
-     else {
-       fprintf(stderr, "%s: slot %s: date %-8s label %s",
-               get_pname(), slotstr, datestamp, label);
-       if(strcmp(label, FAKE_LABEL) != 0
-          && strcmp(label, searchlabel) != 0)
-           fprintf(stderr, " (wrong tape)\n");
-       else {
-           fprintf(stderr, " (exact label match)\n");
-           if((errstr = tape_rewind(device)) != NULL) {
-               fprintf(stderr,
-                       "%s: could not rewind %s: %s",
-                       get_pname(), device, errstr);
-               amfree(errstr);
-           }
-           found = 1;
-           amfree(datestamp);
-           amfree(label);
-           return 1;
-       }
+     
+     device_set_startup_properties_from_config(device);
+     label_status = device_read_label(device);
+     if (label_status != READ_LABEL_STATUS_SUCCESS) {
+         char * errstr = 
+             g_english_strjoinv_and_free
+                 (g_flags_nick_to_strv(label_status,
+                                       READ_LABEL_STATUS_FLAGS_TYPE), "or");
+         g_fprintf(stderr, _("%s: slot %3s: %s\n"),
+                 get_pname(), slotstr, errstr);
+         g_object_unref(device);
+         return 0;
      }
-     amfree(datestamp);
-     amfree(label);
-     return 0;
+     
+     g_fprintf(stderr, _("%s: slot %3s: time %-14s label %s"),
+             get_pname(), slotstr, device->volume_time, device->volume_label);
+     if(strcmp(device->volume_label, status->searchlabel) != 0) {
+         g_fprintf(stderr, _(" (wrong tape)\n"));
+         g_object_unref(device);
+         return 0;
+     } else {
+         g_fprintf(stderr, _(" (exact label match)\n"));
+         g_object_unref(device);
+         status->found = 1;
+         return 1;
+     }
+     g_assert_not_reached();
  }
  
- void
+ /* This does the 'load label' command. */
+ static void
  load_label(
      int               argc,
      char **   argv)
  {
+     LabelChangerStatus status;
      if(argc != 2)
        usage();
+     
+     device_api_init();
  
-     searchlabel = argv[1];
+     status.searchlabel = argv[1];
  
-     fprintf(stderr, "%s: scanning for tape with label %s\n",
-           get_pname(), searchlabel);
+     g_fprintf(stderr, _("%s: scanning for tape with label %s\n"),
+           get_pname(), status.searchlabel);
  
-     found = 0;
+     status.found = 0;
  
-     changer_find(NULL, scan_init, loadlabel_slot, searchlabel);
+     changer_find(&status, scan_init, loadlabel_slot, status.searchlabel);
  
-     if(found)
-       fprintf(stderr, "%s: label %s is now loaded.\n",
-               get_pname(), searchlabel);
+     if(status.found)
+       g_fprintf(stderr, _("%s: label %s is now loaded.\n"),
+               get_pname(), status.searchlabel);
      else
-       fprintf(stderr, "%s: could not find label %s in tape rack.\n",
-               get_pname(), searchlabel);
+       g_fprintf(stderr, _("%s: could not find label %s in tape rack.\n"),
+               get_pname(), status.searchlabel);
  }
  
  
  /* ---------------------------- */
  
- int
- show_init(
-     void *    ud,
-     int               rc,
-     int               ns,
-     int               bk,
-     int               s)
- {
-     (void)ud; /* Quiet unused parameter warning */
-     (void)s;  /* Quiet unused parameter warning */
-     if(rc) {
-       error("could not get changer info: %s", changer_resultstr);
-       /*NOTREACHED*/
-     }
-     nslots = ns;
-     backwards = bk;
-     return 0;
- }
- int
- show_init_all(
-     void *    ud,
-     int               rc,
-     int               ns,
-     int               bk,
-     int               s)
- {
-     int ret = show_init(NULL, rc, ns, bk, s);
-     (void)ud; /* Quiet unused parameter warning */
-     fprintf(stderr, "%s: scanning all %d slots in tape-changer rack:\n",
-           get_pname(), nslots);
-     return ret;
- }
- int
- show_init_current(
-     void *    ud,
-     int               rc,
-     int               ns,
-     int               bk,
-     int               s)
+ /* This is the user_slot function for "amtape show". */
+ static int
+ show_slots_slot(G_GNUC_UNUSED void * data, int rc, char * slotstr,
+                 char * device_name)
  {
-     int ret = show_init(NULL, rc, ns, bk, s);
-     (void)ud; /* Quiet unused parameter warning */
-     fprintf(stderr, "%s: scanning current slot in tape-changer rack:\n",
-           get_pname());
-     return ret;
- }
- int
- show_slot(
-     void *    ud,
-     int               rc,
-     char *    slotstr,
-     char *    device)
- {
-     char *errstr;
-     (void)ud; /* Quiet unused parameter warning */
+     Device * device;
  
      if(rc > 1) {
-       error("could not load slot %s: %s", slotstr, changer_resultstr);
-       /*NOTREACHED*/
+       error(_("could not load slot %s: %s"), slotstr, changer_resultstr);
+         g_assert_not_reached();
      }
-     else if(rc == 1) {
-       fprintf(stderr, "slot %s: %s\n", slotstr, changer_resultstr);
+     if(rc == 1) {
+       g_fprintf(stderr, _("slot %s: %s\n"), slotstr, changer_resultstr);
+         return 0;
      }
-     else if((errstr = tape_rdlabel(device, &datestamp, &label)) != NULL) {
-       fprintf(stderr, "slot %s: %s\n", slotstr, errstr);
-       amfree(errstr);
+     device = device_open(device_name);
+     if (device == NULL) {
+         g_fprintf(stderr, _("%s: slot %3s: Could not open device.\n"),
+                 get_pname(), slotstr);
      } else {
-       fprintf(stderr, "slot %s: date %-8s label %s\n",
-               slotstr, datestamp, label);
+         ReadLabelStatusFlags label_status;
+         device_set_startup_properties_from_config(device);
+         label_status = device_read_label(device);
+         if (label_status != READ_LABEL_STATUS_SUCCESS) {
+             char * errstr = 
+                 g_english_strjoinv_and_free
+                 (g_flags_nick_to_strv(label_status,
+                                       READ_LABEL_STATUS_FLAGS_TYPE), "or");
+             g_fprintf(stderr, _("%s: slot %3s: %s\n"),
+                     get_pname(), slotstr, errstr);
+         } else {
+             g_fprintf(stderr, _("slot %3s: time %-14s label %s\n"),
+                     slotstr, device->volume_time, device->volume_label);
+           /* update the changer db */
+           changer_label(slotstr, device->volume_label);
+         }
      }
-     amfree(datestamp);
-     amfree(label);
+     if (device != NULL)
+         g_object_unref(device);
      return 0;
  }
  
- void
- show_current(
-     int               argc,
-     char **   argv)
- {
-     (void)argv;       /* Quiet unused parameter warning */
+ static void
+ show_current(int argc, G_GNUC_UNUSED char ** argv) {
      if(argc != 1)
        usage();
  
-     changer_current(NULL, show_init_current, show_slot);
- }
+     device_api_init();
  
- void
- show_slots(
-     int               argc,
-     char **   argv)
- {
-     (void)argv;       /* Quiet unused parameter warning */
+     g_fprintf(stderr, _("%s: scanning current slot in tape-changer rack:\n"),
+           get_pname());
+     changer_current(NULL, scan_init, show_slots_slot);
+ }
  
+ static void
+ show_slots(int argc, G_GNUC_UNUSED char ** argv) {
      if(argc != 1)
        usage();
  
-     changer_find(NULL, show_init_all, show_slot, NULL);
+     device_api_init();
+     changer_find(NULL, scan_init_print, show_slots_slot, NULL);
  }
  
  
  /* ---------------------------- */
  
- void
- amtape_taper_scan(
-     int               argc,
-     char **   argv)
- {
-     char *device = NULL;
+ static void
+ amtape_taper_scan(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv) {
      char *label = NULL;
-     (void)argc;       /* Quiet unused parameter warning */
-     (void)argv;       /* Quiet unused parameter warning */
-     if((tp = lookup_last_reusable_tape(0)) == NULL)
-       searchlabel = NULL;
-     else
+     char * searchlabel;
+     tape_t * tp;
+     char *timestamp = NULL;
+     char *tapedev = NULL;
+     int result;
+     device_api_init();
+     
+     g_fprintf(stderr, _("%s: scanning for "), get_pname());
+     tp = lookup_last_reusable_tape(0);
+     if (tp == NULL) {
+         searchlabel = NULL;
+     } else {
        searchlabel = stralloc(tp->label);
+         g_fprintf(stderr, _("tape label %s or "), searchlabel);
+     }
+     g_fprintf(stderr, _("a new tape.\n"));
  
-     tapedays  = getconf_int(CNF_TAPECYCLE);
-     labelstr  = getconf_str(CNF_LABELSTR);
-     found = 0;
-     got_match = 0;
-     fprintf(stderr, "%s: scanning for ", get_pname());
-     if(searchlabel) fprintf(stderr, "tape label %s or ", searchlabel);
-     fprintf(stderr, "a new tape.\n");
-     taper_scan(searchlabel, &label, &datestamp,&device, FILE_taperscan_output_callback, stderr);
+     result = taper_scan(searchlabel, &label, &timestamp, &tapedev, NULL,
+                       FILE_taperscan_output_callback, stderr, NULL, NULL);
  
-     fprintf(stderr, "%s: label %s is now loaded.\n",
-             get_pname(), label);
+     if (result < 0) {
+       g_fprintf(stderr, _("Could not find a  non-active Amanda tape.\n"));
+       if (label) {
+           g_fprintf(stderr, _("Tape with label `%s' is now loaded.\n"), label);
+       }
+     } else if (result == 3) {
+       g_fprintf(stderr, _("New tape loaded, it will be labelled `%s'.\n"),
+                 label);
+     } else {
+       g_fprintf(stderr, _("Tape with label `%s' is now loaded.\n"), label);
+     }
  
+     amfree(searchlabel);
      amfree(label);
-     amfree(datestamp);
-     amfree(device);
+     amfree(timestamp);
+     amfree(tapedev);
  }
  
  /* ---------------------------- */
  
- void
- show_device(
-     int               argc,
-     char **   argv)
- {
+ static void
+ show_device(G_GNUC_UNUSED int argc,
+             G_GNUC_UNUSED char ** argv) {
      char *slot = NULL, *device = NULL;
-     (void)argc;       /* Quiet unused parameter warning */
-     (void)argv;       /* Quiet unused parameter warning */
-     if(changer_loadslot("current", &slot, &device)) {
-       error("Could not load current slot.\n");
+     
+     if(changer_loadslot(_("current"), &slot, &device)) {
+       error(_("Could not load current slot.\n"));
        /*NOTREACHED*/
      }
  
-     printf("%s\n", device);
+     g_printf("%s\n", device);
      amfree(slot);
      amfree(device);
  }
 +
 +/* ---------------------------- */
 +
 +int
 +update_one_slot(
 +    void *    ud,
 +    int               rc,
 +    char *    slotstr,
 +    char *    device)
 +{
 +    char *errstr = NULL;
 +    char *datestamp = NULL;
 +    char *label = NULL;
 +
 +    (void)ud; /* Quiet unused parameter warning */
 +
 +    if(rc > 1)
 +      error("could not load slot %s: %s", slotstr, changer_resultstr);
 +    else if(rc == 1)
 +      fprintf(stderr, "slot %s: %s\n", slotstr, changer_resultstr);
 +    else if((errstr = tape_rdlabel(device, &datestamp, &label)) != NULL)
 +      fprintf(stderr, "slot %s: %s\n", slotstr, errstr);
 +    else {
 +      fprintf(stderr, "slot %s: date %-8s label %s\n",
 +              slotstr, datestamp, label);
 +      changer_label(slotstr, label);
 +    }
 +    amfree(errstr);
 +    amfree(datestamp);
 +    amfree(label);
 +    return 0;
 +}
 +
 +void
 +update_labeldb(
 +    int               argc,
 +    char **   argv)
 +{
 +    (void)argv;       /* Quiet unused parameter warning */
 +
 +    if(argc != 1)
 +      usage();
 +
 +    changer_find(NULL, show_init_all, update_one_slot, NULL);
 +}
diff --combined server-src/amtrmidx.c
index e30a1d5968344720e5891068403c6a5529abe56d,76c17c7ab22dfe5b33f7ca41e39e054b6aa3f16b..f5be82679e0cee99acbb0f1e1d301e6f624c25d3
@@@ -33,9 -33,6 +33,6 @@@
  
  #include "amanda.h"
  #include "arglist.h"
- #ifdef HAVE_NETINET_IN_SYSTM_H
- #include <netinet/in_systm.h>
- #endif
  #include "conffile.h"
  #include "diskfile.h"
  #include "tapefile.h"
@@@ -58,20 -55,30 +55,30 @@@ static int sort_by_name_reversed
  }
  
  
- int main(int argc, char **argv)
+ int
+ main(
+     int               argc,
+     char **   argv)
  {
      disk_t *diskp;
      disklist_t diskl;
      size_t i;
-     char *conffile;
      char *conf_diskfile;
      char *conf_tapelist;
      char *conf_indexdir;
      find_result_t *output_find;
      time_t tmp_time;
      int amtrmidx_debug = 0;
-     int    new_argc,   my_argc;
-     char **new_argv, **my_argv;
+     config_overwrites_t *cfg_ovr = NULL;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(-1, 0);
      safe_cd();
      signal(SIGPIPE, SIG_IGN);
  
      dbopen(DBG_SUBDIR_SERVER);
-     dbprintf(("%s: version %s\n", argv[0], version()));
+     dbprintf(_("%s: version %s\n"), argv[0], version());
  
-     parse_conf(argc, argv, &new_argc, &new_argv);
-     my_argc = new_argc;
-     my_argv = new_argv;
+     cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
  
 -    if (argc > 1 && strcmp(argv[1], "-t") == 0) {
 +    if (my_argc > 1 && strcmp(my_argv[1], "-t") == 0) {
        amtrmidx_debug = 1;
 -      argc--;
 -      argv++;
 +      my_argc--;
 +      my_argv++;
      }
  
-     if (my_argc < 2) {
-       fprintf(stderr, "Usage: %s [-t] <config> [-o configoption]*\n", my_argv[0]);
+     if (argc < 2) {
+       g_fprintf(stderr, _("Usage: %s [-t] <config> [-o configoption]*\n"), argv[0]);
        return 1;
      }
  
-     config_name = my_argv[1];
+     config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL | CONFIG_INIT_USE_CWD,
+       argv[1]);
+     apply_config_overwrites(cfg_ovr);
  
-     config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     if (read_conffile(conffile)) {
-       error("errors processing config file \"%s\"", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
+     check_running_as(RUNNING_AS_DUMPUSER);
  
      dbrename(config_name, DBG_SUBDIR_SERVER);
  
-     report_bad_conf_arg();
-     conf_diskfile = getconf_str(CNF_DISKFILE);
-     if(*conf_diskfile == '/') {
-       conf_diskfile = stralloc(conf_diskfile);
-     } else {
-       conf_diskfile = stralloc2(config_dir, conf_diskfile);
-     }
+     conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
      if (read_diskfile(conf_diskfile, &diskl) < 0) {
-       error("could not load disklist \"%s\"", conf_diskfile);
+       error(_("could not load disklist \"%s\""), conf_diskfile);
        /*NOTREACHED*/
      }
      amfree(conf_diskfile);
  
-     conf_tapelist = getconf_str(CNF_TAPELIST);
-     if(*conf_tapelist == '/') {
-       conf_tapelist = stralloc(conf_tapelist);
-     } else {
-       conf_tapelist = stralloc2(config_dir, conf_tapelist);
-     }
+     conf_tapelist = config_dir_relative(getconf_str(CNF_TAPELIST));
      if(read_tapelist(conf_tapelist)) {
-       error("could not load tapelist \"%s\"", conf_tapelist);
+       error(_("could not load tapelist \"%s\""), conf_tapelist);
        /*NOTREACHED*/
      }
      amfree(conf_tapelist);
  
-     output_find = find_dump(1, &diskl);
+     output_find = find_dump(&diskl);
  
-     conf_indexdir = getconf_str(CNF_INDEXDIR);
-     if(*conf_indexdir == '/') {
-       conf_indexdir = stralloc(conf_indexdir);
-     } else {
-       conf_indexdir = stralloc2(config_dir, conf_indexdir);
-     }
+     conf_indexdir = config_dir_relative(getconf_str(CNF_INDEXDIR));
  
      /* now go through the list of disks and find which have indexes */
      time(&tmp_time);
                                 NULL);
            qindexdir = quote_string(indexdir);
  
-           dbprintf(("%s %s -> %s\n", diskp->host->hostname,
-                       qdisk, qindexdir));
+           dbprintf("%s %s -> %s\n", diskp->host->hostname,
+                       qdisk, qindexdir);
            amfree(host);
            amfree(qdisk);
            amfree(disk);
            if ((d = opendir(indexdir)) == NULL) {
-               dbprintf(("could not open index directory %s\n", qindexdir));
+               dbprintf(_("could not open index directory %s\n"), qindexdir);
                amfree(indexdir);
                amfree(qindexdir);
                continue;
                    if(lstat(path, &sbuf) != -1
                        && ((sbuf.st_mode & S_IFMT) == S_IFREG)
                        && ((time_t)sbuf.st_mtime < tmp_time)) {
-                       dbprintf(("rm %s\n", qpath));
+                       dbprintf("rm %s\n", qpath);
                        if(amtrmidx_debug == 0 && unlink(path) == -1) {
-                           dbprintf(("Error removing %s: %s\n",
-                                     qpath, strerror(errno)));
+                           dbprintf(_("Error removing %s: %s\n"),
+                                     qpath, strerror(errno));
                        }
                    }
                    amfree(qpath);
                    char *path, *qpath;
                    path = stralloc2(indexdir, names[i]);
                    qpath = quote_string(path);
-                   dbprintf(("rm %s\n", qpath));
+                   dbprintf("rm %s\n", qpath);
                    if(amtrmidx_debug == 0 && unlink(path) == -1) {
-                       dbprintf(("Error removing %s: %s\n",
-                                 qpath, strerror(errno)));
+                       dbprintf(_("Error removing %s: %s\n"),
+                                 qpath, strerror(errno));
                    }
                    amfree(qpath);
                    amfree(path);
      }
  
      amfree(conf_indexdir);
-     amfree(config_dir);
      free_find_result(&output_find);
      clear_tapelist();
      free_disklist(&diskl);
-     free_new_argv(new_argc, new_argv);
-     free_server_config();
  
      dbclose();
  
diff --combined server-src/amtrmlog.c
index 691eb9e1e9d7a372d64ad15f33172c273f79d438,460a354fcb25ee0ce415e2a968d186bd67b3289b..8bce5df0bc95f954e9fe42b360d3eb985ee3083a
@@@ -33,9 -33,6 +33,6 @@@
  
  #include "amanda.h"
  #include "arglist.h"
- #ifdef HAVE_NETINET_IN_SYSTM_H
- #include <netinet/in_systm.h>
- #endif
  #include "conffile.h"
  #include "diskfile.h"
  #include "tapefile.h"
@@@ -64,13 -61,20 +61,20 @@@ main
      char *logname = NULL;
      struct stat stat_log;
      struct stat stat_old;
-     char *conffile;
      char *conf_diskfile;
      char *conf_tapelist;
      char *conf_logdir;
      int dumpcycle;
-     int    new_argc,   my_argc;
-     char **new_argv, **my_argv;
+     config_overwrites_t *cfg_ovr = NULL;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(-1, 0);
      safe_cd();
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
-     parse_conf(argc, argv, &new_argc, &new_argv);
-     my_argc = new_argc;
-     my_argv = new_argv;
+     cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
  
-     if (my_argc > 1 && strcmp(my_argv[1], "-t") == 0) {
+     if (argc > 1 && strcmp(argv[1], "-t") == 0) {
        amtrmidx_debug = 1;
 -      argc--;
 -      argv++;
 +      my_argc--;
 +      my_argv++;
      }
  
-     if (my_argc < 2) {
-       fprintf(stderr, "Usage: %s [-t] <config> [-o configoption]*\n", my_argv[0]);
+     if (argc < 2) {
+       g_fprintf(stderr, _("Usage: %s [-t] <config> [-o configoption]*\n"), argv[0]);
        return 1;
      }
  
      dbopen(DBG_SUBDIR_SERVER);
-     dbprintf(("%s: version %s\n", my_argv[0], version()));
+     dbprintf(_("%s: version %s\n"), argv[0], version());
  
-     config_name = my_argv[1];
+     config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL,
+               argv[1]);
+     apply_config_overwrites(cfg_ovr);
  
-     config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     if (read_conffile(conffile)) {
-       error("errors processing amanda config file \"%s\"", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
+     check_running_as(RUNNING_AS_DUMPUSER);
  
      dbrename(config_name, DBG_SUBDIR_SERVER);
  
-     report_bad_conf_arg();
-     conf_diskfile = getconf_str(CNF_DISKFILE);
-     if (*conf_diskfile == '/') {
-       conf_diskfile = stralloc(conf_diskfile);
-     } else {
-       conf_diskfile = stralloc2(config_dir, conf_diskfile);
-     }
+     conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
      if (read_diskfile(conf_diskfile, &diskl) < 0) {
-       error("could not load disklist \"%s\"", conf_diskfile);
+       error(_("could not load disklist \"%s\""), conf_diskfile);
        /*NOTREACHED*/
      }
      amfree(conf_diskfile);
  
-     conf_tapelist = getconf_str(CNF_TAPELIST);
-     if (*conf_tapelist == '/') {
-       conf_tapelist = stralloc(conf_tapelist);
-     } else {
-       conf_tapelist = stralloc2(config_dir, conf_tapelist);
-     }
+     conf_tapelist = config_dir_relative(getconf_str(CNF_TAPELIST));
      if (read_tapelist(conf_tapelist)) {
-       error("could not load tapelist \"%s\"", conf_tapelist);
+       error(_("could not load tapelist \"%s\""), conf_tapelist);
        /*NOTREACHED*/
      }
      amfree(conf_tapelist);
  
      /* determine how many log to keep */
      no_keep = getconf_int(CNF_TAPECYCLE) * 2;
-     dbprintf(("Keeping %d log file%s\n", no_keep, (no_keep == 1) ? "" : "s"));
+     dbprintf(plural(_("Keeping %d log file\n"),
+                   _("Keeping %d log files\n"), no_keep),
+            no_keep);
  
-     conf_logdir = getconf_str(CNF_LOGDIR);
-     if (*conf_logdir == '/') {
-       conf_logdir = stralloc(conf_logdir);
-     } else {
-       conf_logdir = stralloc2(config_dir, conf_logdir);
-     }
+     conf_logdir = config_dir_relative(getconf_str(CNF_LOGDIR));
      olddir = vstralloc(conf_logdir, "/oldlog", NULL);
-     if (mkpdir(olddir, 02700, (uid_t)-1, (gid_t)-1) != 0) {
-       error("could not create parents of %s: %s", olddir, strerror(errno));
+     if (mkpdir(olddir, 0700, (uid_t)-1, (gid_t)-1) != 0) {
+       error(_("could not create parents of %s: %s"), olddir, strerror(errno));
        /*NOTREACHED*/
      }
-     if (mkdir(olddir, 02700) != 0 && errno != EEXIST) {
-       error("could not create %s: %s", olddir, strerror(errno));
+     if (mkdir(olddir, 0700) != 0 && errno != EEXIST) {
+       error(_("could not create %s: %s"), olddir, strerror(errno));
        /*NOTREACHED*/
      }
  
      if (stat(olddir,&stat_old) == -1) {
-       error("can't stat oldlog directory \"%s\": %s", olddir, strerror(errno));
+       error(_("can't stat oldlog directory \"%s\": %s"), olddir, strerror(errno));
        /*NOTREACHED*/
      }
  
      if (!S_ISDIR(stat_old.st_mode)) {
-       error("Oldlog directory \"%s\" is not a directory", olddir);
+       error(_("Oldlog directory \"%s\" is not a directory"), olddir);
        /*NOTREACHED*/
      }
  
      if ((dir = opendir(conf_logdir)) == NULL) {
-       error("could not open log directory \"%s\": %s", conf_logdir,strerror(errno));
+       error(_("could not open log directory \"%s\": %s"), conf_logdir,strerror(errno));
        /*NOTREACHED*/
      }
      while ((adir=readdir(dir)) != NULL) {
                newfile = newvstralloc(newfile,
                                       olddir, "/", adir->d_name, NULL);
                if (rename(oldfile,newfile) != 0) {
-                   error("could not rename \"%s\" to \"%s\": %s",
+                   error(_("could not rename \"%s\" to \"%s\": %s"),
                          oldfile, newfile, strerror(errno));
                    /*NOTREACHED*/
                }
      amfree(oldfile);
      amfree(newfile);
      amfree(olddir);
-     amfree(config_dir);
      amfree(conf_logdir);
      clear_tapelist();
      free_disklist(&diskl);
-     free_new_argv(new_argc, new_argv);
-     free_server_config();
  
      dbclose();
  
diff --combined server-src/amverify.sh
index e34cd4e463fcbf7a395d4e6b9a4ed1bb42470cf5,7ed64cce8872c867bcb49cfb3ae585d6f5bb4f79..5614b725d9a92a4424b2d58eab52677a18e719f1
@@@ -312,7 -312,7 +312,7 @@@ f
  cd @AMANDA_TMPDIR@ || exit 1
  
  TEMP=@AMANDA_TMPDIR@/amverify.$$
 -trap 'rm -fr $TEMP' 0
 +trap 'rm -fr $TEMP' EXIT
  if ( umask 077 ; mkdir $TEMP ) ; then
        :
  else
@@@ -324,11 -324,7 +324,7 @@@ REPORT=$TEMP/report; rm -f $REPOR
  TAPELIST=
  EXITSTAT=$TEMP/amrecover.exit; rm -rf $EXITSTAT
  
- <<<<<<< HEAD:server-src/amverify.sh.in
- trap 'report "aborted!"; echo "aborted!" >> $DEFECTS; sendreport; rm -fr $TEMP; exit 1' EXIT
- =======
  trap 'report "aborted!"; echo `_ 'aborted!'` >> $DEFECTS; sendreport; rm -fr $TEMP; exit 1' 1 2 3 4 5 6 7 8 10 12 13 14 15
- >>>>>>> upstream:server-src/amverify.sh
  
  $Echoe "Defects file is $DEFECTS"
  report "amverify $CONFIG"
@@@ -359,33 -355,6 +355,6 @@@ while [ $SLOT -lt $SLOTS ]; d
        report "Using device $DEVICE"
        $Echon "Waiting for device to go ready..."
        count=1800
- <<<<<<< HEAD:server-src/amverify.sh.in
-       until eval $DEVICE_READY > $TEMP/ammt.out 2>&1; do
-               [ count -lt 0 ] \
-                       && report "Device not ready" \
-                       && report "`cat $TEMP/ammt.out`" \
-                       && report cat $TEMP/ammt.out >> $DEFECTS \
-                       && break;
-               sleep 3
-               count=`expr $count - 3`
-       done
-       $Echon "Rewinding..."
-       ERRORS=0
-       until $MT $MTF $DEVICE rewind > $TEMP/ammt.out 2>&1; do
-               RESULT=`grep "No medium found" $TEMP/ammt.out`
-               [ X"$RESULT" != X"" ] \
-                       && report "** Error rewinding tape" \
-                       && report "`cat $TEMP/ammt.out`" \
-                       && cat $TEMP/ammt.out >> $DEFECTS \
-                       && break
-               ERRORS=`expr $ERRORS + 1`
-               [ $ERRORS -gt 100 ] \
-                       && report "** Error rewinding tape" \
-                       && report "`cat $TEMP/ammt.out`" \
-                       && cat $TEMP/ammt.out >> $DEFECTS \
-                       && break
-               sleep 3
- =======
          while true; do
              amdevcheck_output="`amdevcheck $CONFIG $DEVICE`"
              amdevcheck_status=$?
                      break;
                  fi
              fi
- >>>>>>> upstream:server-src/amverify.sh
        done
        $Echon "Processing label..."
          amtape_output="`amtape $CONFIG current 2>&1`";
        ERG=0
        ERRORS=0
        while [ $ERG = 0 ]; do
- <<<<<<< HEAD:server-src/amverify.sh.in
-               if [ $Echon = echon ]; then
-                       $Echon "Waiting for device to go ready..."
-               fi
-               count=1800
-               until eval $DEVICE_READY > $TEMP/ammt.out 2>&1; do
-                       [ count -lt 0 ] \
-                               && report "Device not ready" \
-                               && report "`cat $TEMP/ammt.out`" \
-                               && report cat $TEMP/ammt.out >> $DEFECTS \
-                               && break;
-                       sleep 3
-                       count=`expr $count - 3`
-               done
-               if [ $Echon = echon ]; then
-                       $Echon "Reading..."
-               fi
-               RESULT=`$AMRESTORE -h -p $DEVICE 2> $TEMP/amrestore.out \
-                       | doonefile 2> $TEMP/onefile.errors`
-               FILE=`grep restoring $TEMP/amrestore.out \
-                       | sed 's/^.*restoring //'`
-               EOF=`grep "reached end of tape" $TEMP/amrestore.out`
-               EOI=`grep "reached end of information" $TEMP/amrestore.out`
-               # amrestore:   0: restoring sundae._mnt_sol1_usr.19961127.1
- =======
                FILENO=`expr $FILENO + 1`
  #            { cat <<EOF; dd if=/dev/zero bs=32k count=1; } | doonefile
  #AMANDA: FILE 20070925205916 localhost /boot  lev 0 comp N program /bin/tar
                        | doonefile 2> $TEMP/onefile.errors`
                FILE=`grep restoring $TEMP/amrestore.out \
                        | sed 's/^.*restoring //'`
- >>>>>>> upstream:server-src/amverify.sh
                if [ X"$FILE" != X"" -a X"$RESULT" = X"0" ]; then
                        report "Checked $FILE"
                elif [ X"$FILE" != X"" -a X"$RESULT" = X"500" ]; then
                          # Unless we went over, there is no extra output.
                        report "End-of-Tape detected."
                        break
 +              elif [ -n "$EOI" ]; then
 +                        report "End-of-Information detected."
 +                        break
                else
                        report "** Error detected ($FILE)"
                        echo "$VOLUME ($FILE):" >>$DEFECTS
@@@ -559,7 -498,4 +501,7 @@@ don
  
  sendreport
  
 +rm -fr $TEMP
 +trap - EXIT
 +
  exit 0
index 4d26969381caaa756fb2e238e9570c10ce2f9290,6c04a6fd7454e633d4c4468658b73c5986b51467..c26bce60228ccb67769110dcd2ea0e6dbda22f2b
@@@ -65,11 -65,53 +65,53 @@@ add_dump
      int               level,
      char *    tape,
      off_t     file,
-     int               partnum)
+     int               partnum,
+     int               maxpart)
  {
      DUMP_ITEM *new, *item, *before;
      int isafile = 0;
  
+     if(tape[0] == '/')
+       isafile = 1; /* XXX kludgey, like this whole thing */
+     /* See if we already have partnum=partnum-1 */
+     if (partnum > 1) {
+       int partnum_minus_1 = 0;
+       for(item = disk_hist, before = NULL; item;
+           before = item, item = item->next) {
+           if (!strcmp(item->date, date) &&
+                   item->level == level && item->is_split) {
+               tapelist_t *cur_tape;
+               for (cur_tape = item->tapes; cur_tape;
+                                            cur_tape = cur_tape->next) {
+                   int files;
+                   for(files=0; files<cur_tape->numfiles; files++) {
+                       if (cur_tape->partnum[files] == partnum - 1)
+                           partnum_minus_1 = 1;
+                   }
+               }
+               if (partnum_minus_1 == 1) {
+                   item->tapes = append_to_tapelist(item->tapes, tape, file,
+                                                    partnum, isafile);
+                   if (maxpart > item->maxpart)
+                       item->maxpart = maxpart;
+               } else {
+                   /* some part are missing, remove the item from disk_hist */
+                   if (before)
+                       before->next = item->next;
+                   else
+                       disk_hist = item->next;
+                   /* free item */
+                   free_tapelist(item->tapes);
+                   amfree(item->hostname);
+                   amfree(item);
+               }
+               return;
+           }
+       }
+       return;
+     }
      new = (DUMP_ITEM *)alloc(SIZEOF(DUMP_ITEM));
      strncpy(new->date, date, SIZEOF(new->date)-1);
      new->date[SIZEOF(new->date)-1] = '\0';
      strncpy(new->tape, tape, SIZEOF(new->tape)-1);
      new->tape[SIZEOF(new->tape)-1] = '\0';
      new->file = file;
-     if(partnum == -1) new->is_split = 0;
-     else new->is_split = 1;
+     new->maxpart = maxpart;
+     if(partnum == -1)
+         new->is_split = 0;
+     else
+         new->is_split = 1;
      new->tapes = NULL;
      new->hostname = stralloc(hostname);
  
-     if(new->tape[0] == '/')
-       isafile = 1; /* XXX kludgey, like this whole thing */
+     new->tapes = append_to_tapelist(new->tapes, tape, file, partnum, isafile);
  
      if (disk_hist == NULL)
      {
        disk_hist = new;
 +      new->tapes = append_to_tapelist(new->tapes, tape, file, isafile);
        new->next = NULL;
        return;
      }
  
-     /* see if we already have part of this dump somewhere */
-     if(new->is_split){
-       for(item = disk_hist; item; item = item->next){
-           if (!strcmp(item->date, new->date) &&
-                   item->level == new->level && item->is_split){
-               item->tapes = append_to_tapelist(item->tapes, tape, file, isafile);
-               amfree(new);
-               return;
-           }
-       }
-     }
-     new->tapes = append_to_tapelist(new->tapes, tape, file, isafile);
      /* prepend this item to the history list, if it's newer */
      /* XXX this should probably handle them being on the same date with
         datestamp_uax or something */
      before->next = new;
  }
  
+ void
+ clean_dump(void)
+ {
+     DUMP_ITEM *item, *before;
+     /* check if the maxpart part is avaliable */
+     for(item = disk_hist, before = NULL; item;
+                                        before = item, item = item->next) {
+       int found_maxpart = 0;
+       tapelist_t *cur_tape;
+       if (item->maxpart > 1) {
+           for (cur_tape = item->tapes; cur_tape; cur_tape = cur_tape->next) {
+               int files;
+               for(files=0; files<cur_tape->numfiles; files++) {
+                   if (cur_tape->partnum[files] == item->maxpart) {
+                       found_maxpart = 1;
+                   }
+               }
+           }
+           if (found_maxpart == 0) {
+               DUMP_ITEM *myitem = item; 
+               if (before)
+                   before->next = item->next;
+               else
+                   disk_hist = item->next;
+               item = item->next;
+               /* free myitem */
+               free_tapelist(myitem->tapes);
+               amfree(myitem->hostname);
+               amfree(myitem);
+               if (item == NULL)
+                   break;
+           }
+       }
+     }
+ }
  
  DUMP_ITEM *
  first_dump(void)
diff --combined server-src/diskfile.c
index e13dcbf9184c833dedb19aeac4c7e017f19be2c2,b909b0dcc97ba032920b6fbb2f3c87246dd21960..24624da510b5f139ee4d921815f151c07f1ffd90
  #include "util.h"
  
  static am_host_t *hostlist;
+ static netif_t *all_netifs;
  
  /* local functions */
  static char *upcase(char *st);
  static int parse_diskline(disklist_t *, const char *, FILE *, int *, char **);
  static void disk_parserror(const char *, int, const char *, ...)
-     __attribute__ ((format (printf, 3, 4)));
+                           G_GNUC_PRINTF(3, 4);
  
  
  int
@@@ -318,6 -319,8 +319,8 @@@ free_disklist
      while (dl->head != NULL) {
        dp = dequeue_disk(dl);
        amfree(dp->name);
+       amfree(dp->hostname);
+       amfree(dp->device);
        free_sl(dp->exclude_file);
        free_sl(dp->exclude_list);
        free_sl(dp->include_file);
@@@ -362,7 -365,8 +365,8 @@@ parse_diskline
      am_host_t *host;
      disk_t *disk;
      dumptype_t *dtype;
-     interface_t *netif = 0;
+     netif_t *netif = NULL;
+     interface_t *cfg_if = NULL;
      char *hostname = NULL;
      char *diskname, *diskdevice;
      char *dumptype;
      host = lookup_host(fp);
      if (host == NULL) {
        hostname = stralloc(fp);
-       malloc_mark(hostname);
      } else {
        hostname = stralloc(host->hostname);
        if (strcmp(host->hostname, fp) != 0) {
      shost = sanitise_filename(hostname);
      for (p = hostlist; p != NULL; p = p->next) {
        char *shostp = sanitise_filename(p->hostname);
-       if (!strcmp(hostname, p->hostname) &&
-            strcmp(shost, shostp)) {
-           disk_parserror(filename, line_num, "Two host are mapping to the same name: \"%s\" and \"%s\"", p->hostname, hostname);
+       if (strcmp(hostname, p->hostname) &&
+           !strcmp(shost, shostp)) {
+           disk_parserror(filename, line_num, "Two hosts are mapping to the same name: \"%s\" and \"%s\"", p->hostname, hostname);
            return(-1);
        }
        else if (strcasecmp(hostname, p->hostname) &&
                 match_host(hostname, p->hostname) &&
                 match_host(p->hostname, hostname)) {
-           disk_parserror(filename, line_num, "Duplicate host name: \"%s\" and \"%s\"", p->hostname, hostname);
+           disk_parserror(filename, line_num, _("Duplicate host name: \"%s\" and \"%s\""), p->hostname, hostname);
            return(-1);
        }
        amfree(shostp);
  
      skip_whitespace(s, ch);
      if(ch == '\0' || ch == '#') {
-       disk_parserror(filename, line_num, "disk device name expected");
+       disk_parserror(filename, line_num, _("disk device name expected"));
        amfree(hostname);
        return (-1);
      }
  
      skip_whitespace(s, ch);
      if(ch == '\0' || ch == '#') {
-       disk_parserror(filename, line_num, "disk dumptype expected");
+       disk_parserror(filename, line_num, _("disk dumptype expected"));
        amfree(hostname);
        amfree(diskname);
        return (-1);
            skip_whitespace(s, ch);
            if(ch == '\0' || ch == '#') {
                disk_parserror(filename, line_num,
-                       "disk dumptype '%s' not found", dumptype);
+                       _("disk dumptype '%s' not found"), dumptype);
                amfree(hostname);
                amfree(diskdevice);
                amfree(diskname);
        }
        if (dup == 1) {
            disk_parserror(filename, line_num,
-                          "duplicate disk record, previous on line %d",
+                          _("duplicate disk record, previous on line %d"),
                           disk->line);
        }
      }
      if (!disk) {
        disk = alloc(SIZEOF(disk_t));
-       malloc_mark(disk);
        disk->line = line_num;
        disk->hostname = stralloc(hostname);
        disk->name = diskname;
        disk->device = diskdevice;
-       malloc_mark(disk->name);
        disk->spindle = -1;
        disk->up = NULL;
        disk->inprogress = 0;
            if (strcmp(diskname, dp->name) != 0 &&
                 strcmp(sdisk, sdiskp) == 0) {
                disk_parserror(filename, line_num,
-                "Two disk are mapping to the same name: \"%s\" and \"%s\""
-                ", you must use different diskname",
+                _("Two disks are mapping to the same name: \"%s\" and \"%s\"; you must use different diskname"),
                 dp->name, diskname);
            return(-1);
            }
        skip_whitespace(s, ch);
        if (ch != '\0' && ch != '#') {
            disk_parserror(filename, line_num,
-                     "expected line break after `{\', ignoring rest of line");
+                     _("expected line break after `{\', ignoring rest of line"));
        }
  
        if (strchr(s-1, '}') &&
            (strchr(s-1, '#') == NULL ||
             strchr(s-1, '}') < strchr(s-1, '#'))) {
-           disk_parserror(filename, line_num,"'}' on same line than '{'");
+           disk_parserror(filename, line_num,_("'}' on same line than '{'"));
            amfree(hostname);
            if(!dup) {
                amfree(disk->device);
                              diskf, (char*)filename, line_num_p);
        if (dtype == NULL || dup) {
            disk_parserror(filename, line_num,
-                          "read of custom dumptype failed");
+                          _("read of custom dumptype failed"));
            amfree(hostname);
            if(!dup) {
                amfree(disk->device);
        if((dtype = lookup_dumptype(dumptype)) == NULL) {
            char *qdt = quote_string(dumptype);
  
-           disk_parserror(filename, line_num, "undefined dumptype `%s'", qdt);
+           disk_parserror(filename, line_num, _("undefined dumptype `%s'"), qdt);
            amfree(qdt);
            amfree(dumptype);
            amfree(hostname);
        return (-1);
      }
  
-     disk->dtype_name       = dtype->name;
+     disk->dtype_name       = dumptype_name(dtype);
      disk->program          = dumptype_get_program(dtype);
      disk->exclude_list     = duplicate_sl(dumptype_get_exclude(dtype).sl_list);
      disk->exclude_file     = duplicate_sl(dumptype_get_exclude(dtype).sl_file);
            }
        }
        if(is_digit == 0) {
-           disk_parserror(filename, line_num, "non-integer spindle `%s'", fp);
+           disk_parserror(filename, line_num, _("non-integer spindle `%s'"), fp);
            amfree(hostname);
            amfree(disk->name);
            amfree(disk);
      if(ch && ch != '#') {             /* get optional network interface */
        skip_non_whitespace(s, ch);
        s[-1] = '\0';
-       if((netif = lookup_interface(upcase(fp))) == NULL) {
+       if((cfg_if = lookup_interface(upcase(fp))) == NULL) {
            disk_parserror(filename, line_num,
-               "undefined network interface `%s'", fp);
+               _("undefined network interface `%s'"), fp);
            amfree(hostname);
            amfree(disk->name);
            amfree(disk);
            return (-1);
        }
      } else {
-       netif = lookup_interface("default");
+       cfg_if = lookup_interface("default");
+     }
+     /* see if we already have a netif_t for this interface */
+     for (netif = all_netifs; netif != NULL; netif = netif->next) {
+       if (netif->config == cfg_if)
+           break;
+     }
+     /* nope; make up a new one */
+     if (!netif) {
+       netif = alloc(sizeof(*netif));
+       netif->next = all_netifs;
+       all_netifs = netif;
+       netif->config = cfg_if;
+       netif->curusage = 0;
      }
  
      skip_whitespace(s, ch);
      if(ch && ch != '#') {             /* now we have garbage, ignore it */
-       disk_parserror(filename, line_num, "end of line expected");
+       disk_parserror(filename, line_num, _("end of line expected"));
      }
  
      if(dumptype_get_ignore(dtype) || dumptype_get_strategy(dtype) == DS_SKIP) {
  
      if(host == NULL) {                        /* new host */
        host = alloc(SIZEOF(am_host_t));
-       malloc_mark(host);
        host->next = hostlist;
        hostlist = host;
  
@@@ -751,12 -765,13 +765,13 @@@ printf_arglist_function2(void disk_pars
      int, line_num, const char *, format)
  {
      va_list argp;
+     const char *xlated_fmt = gettext(format);
  
      /* print error message */
  
-     fprintf(stderr, "\"%s\", line %d: ", filename, line_num);
+     g_fprintf(stderr, "\"%s\", line %d: ", filename, line_num);
      arglist_start(argp, format);
-     vfprintf(stderr, format, argp);
+     g_vfprintf(stderr, xlated_fmt, argp);
      arglist_end(argp);
      fputc('\n', stderr);
  }
@@@ -774,24 -789,24 +789,24 @@@ dump_queue
      char *qname;
  
      if(empty(q)) {
-       fprintf(f, "%s QUEUE: empty\n", st);
+       g_fprintf(f, _("%s QUEUE: empty\n"), st);
        return;
      }
-     fprintf(f, "%s QUEUE:\n", st);
+     g_fprintf(f, _("%s QUEUE:\n"), st);
      for(pos = 0, d = q.head, p = NULL; d != NULL; p = d, d = d->next, pos++) {
        qname = quote_string(d->name);
-       if(pos < npr) fprintf(f, "%3d: %-10s %-4s\n",
+       if(pos < npr) g_fprintf(f, "%3d: %-10s %-4s\n",
                              pos, d->host->hostname, qname);
        amfree(qname);
      }
      if(pos > npr) {
-       if(pos > npr+2) fprintf(f, "  ...\n");
+       if(pos > npr+2) g_fprintf(f, "  ...\n");
        if(pos > npr+1) {
            d = p->prev;
-           fprintf(f, "%3d: %-10s %-4s\n", pos-2, d->host->hostname, d->name);
+           g_fprintf(f, "%3d: %-10s %-4s\n", pos-2, d->host->hostname, d->name);
        }
        d = p;
-       fprintf(f, "%3d: %-10s %-4s\n", pos-1, d->host->hostname, d->name);
+       g_fprintf(f, "%3d: %-10s %-4s\n", pos-1, d->host->hostname, d->name);
      }
  }
  
@@@ -833,16 -848,16 +848,16 @@@ optionstr
        if(am_has_feature(dp->host->features, fe_options_bsd_auth))
            auth_opt = stralloc("bsd-auth;");
        else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support auth or bsd-auth\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support auth or bsd-auth\n"),
                    dp->host->hostname, qdpname);
        }
      } else if(strcasecmp(dp->security_driver, "krb4") == 0) {
        if(am_has_feature(dp->host->features, fe_options_krb4_auth))
            auth_opt = stralloc("krb4-auth;");
        else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support auth or krb4-auth\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support auth or krb4-auth\n"),
                    dp->host->hostname, qdpname);
        }
        if(dp->kencrypt) {
                kencrypt_opt = "kencrypt;";
            }
            else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support kencrypt\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support kencrypt\n"),
                    dp->host->hostname, qdpname);
            }
        }
            compress_opt = "compress-fast;";
        }
        else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support fast compression\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support fast compression\n"),
                    dp->host->hostname, qdpname);
        }
        break;
            compress_opt = "compress-best;";
        }
        else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support best compression\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support best compression\n"),
                    dp->host->hostname, qdpname);
        }
        break;
          compress_opt = vstralloc("comp-cust=", dp->clntcompprog, ";", NULL);
          if (BSTRNCMP(compress_opt, "comp-cust=;") == 0){
            if(fdout) {
-             fprintf(fdout,
-                     "ERROR: %s:%s client custom compression with no compression program specified\n",
+             g_fprintf(fdout,
+                     _("ERROR: %s:%s client custom compression with no compression program specified\n"),
                      dp->host->hostname, qdpname);
            }
            err++;
          }
        }
        else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support client custom compression\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support client custom compression\n"),
                    dp->host->hostname, qdpname);
        }
        break;
          compress_opt = vstralloc("srvcomp-cust=", dp->srvcompprog, ";", NULL);
          if (BSTRNCMP(compress_opt, "srvcomp-cust=;") == 0){
            if(fdout) {
-             fprintf(fdout,
-                     "ERROR: %s:%s server custom compression with no compression program specified\n",
+             g_fprintf(fdout,
+                     _("ERROR: %s:%s server custom compression with no compression program specified\n"),
                      dp->host->hostname, qdpname);
            }
            err++;
          }
        }
        else if(fdout) {
-         fprintf(fdout,
-                 "WARNING: %s:%s does not support server custom compression\n",
+         g_fprintf(fdout,
+                 _("WARNING: %s:%s does not support server custom compression\n"),
                  dp->host->hostname, qdpname);
        }
        break;
                                    dp->clnt_encrypt, ";", NULL);
         if (BSTRNCMP(encrypt_opt, "encrypt-cust=;") == 0) {
            if(fdout) {
-             fprintf(fdout,
-                     "ERROR: %s:%s encrypt client with no encryption program specified\n",
+             g_fprintf(fdout,
+                     _("ERROR: %s:%s encrypt client with no encryption program specified\n"),
                      dp->host->hostname, qdpname);
            }
            err++;
              dp->compress == COMP_SERVER_BEST ||
              dp->compress == COMP_SERVER_CUST ) {
           if(fdout) {
-             fprintf(fdout,
-                     "ERROR: %s:Client encryption with server compression is not supported. See amanda.conf(5) for detail.\n", dp->host->hostname);
+             g_fprintf(fdout,
+                     _("ERROR: %s:Client encryption with server compression is "
+                       "not supported. See amanda.conf(5) for detail.\n"), 
+                       dp->host->hostname);
            }
            err++;
          }
                                        dp->clnt_decrypt_opt, ";", NULL);
           }
           else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support client decrypt option\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support client decrypt option\n"),
                    dp->host->hostname, qdpname);
           }
         }
        }
        else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support client data encryption\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support client data encryption\n"),
                    dp->host->hostname, qdpname);
       }
         break;
                                    dp->srv_encrypt, ";", NULL);
         if (BSTRNCMP(encrypt_opt, "encrypt-serv-cust=;") == 0){
            if(fdout) {
-             fprintf(fdout,
-                     "ERROR: %s:%s encrypt server with no encryption program specified\n",
+             g_fprintf(fdout,
+                     _("ERROR: %s:%s No encryption program specified in dumptypes\n"),
                      dp->host->hostname, qdpname);
+             g_fprintf(fdout, _("Change the dumptype in the disklist or mention "
+                              "the ecnryption program to use in the dumptypes file"));
            }
            err++;
          }
                                        dp->srv_decrypt_opt, ";", NULL);
           }
           else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support server decrypt option\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support server decrypt option\n"),
                    dp->host->hostname, qdpname);
           }
         }
        }
        else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support server data encryption\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support server data encryption\n"),
                    dp->host->hostname, qdpname);
        }
         break;
            record_opt = "no-record;";
        }
        else if(fdout) {
-           fprintf(fdout, "WARNING: %s:%s does not support no record\n",
+           g_fprintf(fdout, _("WARNING: %s:%s does not support no record\n"),
                    dp->host->hostname, qdpname);
        }
      }
            index_opt = "index;";
        }
        else if(fdout) {
-           fprintf(fdout, "WARNING: %s:%s does not support index\n",
+           g_fprintf(fdout, _("WARNING: %s:%s does not support index\n"),
                    dp->host->hostname, qdpname);
        }
      }
                exc = newvstralloc(exc, "exclude-file=", qname, ";", NULL);
                strappend(exclude_file, exc);
                if(fdout) {
-                   fprintf(fdout,
-                      "WARNING: %s:%s does not support multiple exclude\n",
+                   g_fprintf(fdout,
+                      _("WARNING: %s:%s does not support multiple exclude\n"),
                       dp->host->hostname, qdpname);
                }
                amfree(qname);
            }
        } else if(fdout) {
-           fprintf(fdout, "WARNING: %s:%s does not support exclude file\n",
+           g_fprintf(fdout, _("WARNING: %s:%s does not support exclude file\n"),
                    dp->host->hostname, qdpname);
        }
      }
                exc = newvstralloc(exc, "exclude-list=", qname, ";", NULL);
                strappend(exclude_list, exc);
                if(fdout) {
-                       fprintf(fdout,
-                        "WARNING: %s:%s does not support multiple exclude\n",
+                       g_fprintf(fdout,
+                        _("WARNING: %s:%s does not support multiple exclude\n"),
                         dp->host->hostname, qdpname);
                }
                amfree(qname);
            }
        } else if(fdout) {
-           fprintf(fdout, "WARNING: %s:%s does not support exclude list\n",
+           g_fprintf(fdout, _("WARNING: %s:%s does not support exclude list\n"),
                    dp->host->hostname, qdpname);
        }
      }
                exc = newvstralloc(exc, "include-file=", qname, ";", NULL);
                strappend(include_file, exc);
                if(fdout) {
-                   fprintf(fdout,
-                        "WARNING: %s:%s does not support multiple include\n",
+                   g_fprintf(fdout,
+                        _("WARNING: %s:%s does not support multiple include\n"),
                         dp->host->hostname, qdpname);
                }
                amfree(qname);
            }
        } else if(fdout) {
-           fprintf(fdout, "WARNING: %s:%s does not support include file\n",
+           g_fprintf(fdout, _("WARNING: %s:%s does not support include file\n"),
                    dp->host->hostname, qdpname);
        }
      }
                exc = newvstralloc(exc, "include-list=", qname, ";", NULL);
                strappend(include_list, exc);
                if(fdout) {
-                       fprintf(fdout,
-                        "WARNING: %s:%s does not support multiple include\n",
+                       g_fprintf(fdout,
+                        _("WARNING: %s:%s does not support multiple include\n"),
                         dp->host->hostname, qdpname);
                }
                amfree(qname);
            }
        } else if(fdout) {
-           fprintf(fdout, "WARNING: %s:%s does not support include list\n",
+           g_fprintf(fdout, _("WARNING: %s:%s does not support include list\n"),
                    dp->host->hostname, qdpname);
        }
      }
            excl_opt = "exclude-optional;";
        }
        else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support optional exclude\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support optional exclude\n"),
                    dp->host->hostname, qdpname);
        }
      }
           incl_opt = "include-optional;";
        }
        else if(fdout) {
-           fprintf(fdout,
-                   "WARNING: %s:%s does not support optional include\n",
+           g_fprintf(fdout,
+                   _("WARNING: %s:%s does not support optional include\n"),
                    dp->host->hostname, qdpname);
        }
      }
@@@ -1231,7 -1251,7 +1251,7 @@@ match_disklist
               (match_disk(sargv[i], dp->name) ||
                (dp->device && match_disk(sargv[i], dp->device)))) {
                if(match_a_host) {
-                   error("Argument %s match a host and a disk",sargv[i]);
+                   error(_("Argument %s cannot be both a host and a disk"),sargv[i]);
                    /*NOTREACHED*/
                }
                else {
                prev_match = 1;
            }
            else {
-               vstrextend(&errstr, "Argument '", sargv[i], "' match neither a host nor a disk.\n", NULL);
+               char *errstr1 = vstrallocf(_("Argument '%s' matches neither a host nor a disk.\n"), sargv[i]);
+               vstrextend(&errstr, errstr1, NULL);
+               prev_match = 0;
            }
        }
      }
      return errstr;
  }
  
+ netif_t *
+ disklist_netifs(void)
+ {
+     return all_netifs;
+ }
  
  #ifdef TEST
  
@@@ -1288,7 -1315,7 +1315,7 @@@ static voi
  dump_disk(
      const disk_t *    dp)
  {
-     printf("  DISK %s (HOST %s, LINE %d) TYPE %s NAME %s SPINDLE %d\n",
+     g_printf(_("  DISK %s (HOST %s, LINE %d) TYPE %s NAME %s SPINDLE %d\n"),
           dp->name, dp->host->hostname, dp->line, dp->dtype_name,
           dp->name == NULL? "(null)": dp->name,
           dp->spindle);
@@@ -1302,31 -1329,34 +1329,34 @@@ dump_disklist
      const am_host_t *hp;
  
      if(hostlist == NULL) {
-       printf("DISKLIST not read in\n");
+       g_printf(_("DISKLIST not read in\n"));
        return;
      }
  
-     printf("DISKLIST BY HOSTNAME:\n");
+     g_printf(_("DISKLIST BY HOSTNAME:\n"));
  
      for(hp = hostlist; hp != NULL; hp = hp->next) {
-       printf("HOST %s INTERFACE %s\n",
+       char *if_name = NULL;
+       if (hp->netif && hp->netif->config)
+           if_name = interface_name(hp->netif->config);
+       g_printf(_("HOST %s INTERFACE %s\n"),
               hp->hostname,
-              (hp->netif == NULL||hp->netif->name == NULL) ? "(null)"
-                                                           : hp->netif->name);
+              if_name ? _("(null)") : if_name);
        for(dp = hp->disks; dp != NULL; dp = dp->hostnext)
            dump_disk(dp);
        putchar('\n');
      }
  
  
-     printf("DISKLIST IN FILE ORDER:\n");
+     g_printf(_("DISKLIST IN FILE ORDER:\n"));
  
      prev = NULL;
      for(dp = lst->head; dp != NULL; prev = dp, dp = dp->next) {
        dump_disk(dp);
        /* check pointers */
-       if(dp->prev != prev) printf("*** prev pointer mismatch!\n");
-       if(dp->next == NULL && lst->tail != dp) printf("tail mismatch!\n");
+       if(dp->prev != prev) g_printf(_("*** prev pointer mismatch!\n"));
+       if(dp->next == NULL && lst->tail != dp) g_printf(_("tail mismatch!\n"));
      }
  }
  
@@@ -1339,8 -1369,15 +1369,15 @@@ main
    char *conf_diskfile;
    disklist_t lst;
    int result;
-   unsigned long malloc_hist_1, malloc_size_1;
-   unsigned long malloc_hist_2, malloc_size_2;
+   /*
+    * Configure program for internationalization:
+    *   1) Only set the message locale for now.
+    *   2) Set textdomain for all amanda related programs to "amanda"
+    *      We don't want to be forced to support dozens of message catalogs.
+    */  
+   setlocale(LC_MESSAGES, "C");
+   textdomain("amanda"); 
  
    safe_fd(-1, 0);
  
    /* Don't die when child closes pipe */
    signal(SIGPIPE, SIG_IGN);
  
 +  malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +
    if (argc>1) {
      config_name = argv[1];
      if (strchr(config_name, '/') != NULL) {
    }
    conffile = stralloc2(config_dir, CONFFILE_NAME);
    if((result = read_conffile(conffile)) == 0) {
-     conf_diskfile = getconf_str(CNF_DISKFILE);
-     if (*conf_diskfile == '/') {
-       conf_diskfile = stralloc(conf_diskfile);
-     } else {
-       conf_diskfile = stralloc2(config_dir, conf_diskfile);
-     }
+     conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
      result = read_diskfile(conf_diskfile, &lst);
      if(result == 0) {
        dump_disklist(&lst);
    amfree(conffile);
    amfree(config_dir);
  
-   malloc_size_2 = malloc_inuse(&malloc_hist_2);
-   if(malloc_size_1 != malloc_size_2) {
-     malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-   }
    return result;
  }
  #endif /* TEST */
diff --combined server-src/driver.c
index d5f265c0d664f084d16d3eccac23c29927acd6b6,e9504edceb4597029173eafb477fcf734914603a..3bdd572e96dff50b61093fba8ad86e2b01e22782
@@@ -24,7 -24,7 +24,7 @@@
   * file named AUTHORS, in the root directory of this distribution.
   */
  /*
-  * $Id: driver.c,v 1.198 2006/08/24 01:57:16 paddy_s Exp $
+  * $Id: driver.c 6512 2007-05-24 17:00:24Z ian $
   *
   * controlling process for the Amanda backup system
   */
  #include "holding.h"
  #include "infofile.h"
  #include "logfile.h"
- #include "statfs.h"
+ #include "fsusage.h"
  #include "version.h"
  #include "driverio.h"
  #include "server_util.h"
+ #include "timestamp.h"
  
- #define driver_debug(i,x) do {                \
+ #define driver_debug(i, ...) do {     \
        if ((i) <= debug_driver) {      \
-           dbprintf(x);                \
+           dbprintf(__VA_ARGS__);      \
        }                               \
  } while (0)
  
- #define hold_debug(i,x) do {          \
+ #define hold_debug(i, ...) do {               \
        if ((i) <= debug_holding) {     \
-           dbprintf(x);                \
+           dbprintf(__VA_ARGS__);      \
        }                               \
  } while (0)
  
- static disklist_t waitq, runq, tapeq, roomq;
+ static disklist_t waitq;      // dle waiting estimate result
+ static disklist_t runq;               // dle waiting to be dumped to holding disk
+ static disklist_t directq;    // dle waiting to be dumped directly to tape
+ static disklist_t tapeq;      // dle on holding disk waiting to be written
+                               //   to tape
+ static disklist_t roomq;      // dle waiting for more space on holding disk
  static int pending_aborts;
  static disk_t *taper_disk;
  static int degraded_mode;
@@@ -71,7 -77,7 +77,7 @@@ static int  inparallel
  static int nodump = 0;
  static off_t tape_length = (off_t)0;
  static off_t tape_left = (off_t)0;
- static int current_tape = 1;
+ static int current_tape = 0;
  static int conf_taperalgo;
  static int conf_runtapes;
  static time_t sleep_time;
@@@ -80,30 -86,44 +86,44 @@@ static char *driver_timestamp
  static char *hd_driver_timestamp;
  static am_host_t *flushhost = NULL;
  static int need_degraded=0;
+ static holdalloc_t *holdalloc;
+ static int num_holdalloc;
  static event_handle_t *dumpers_ev_time = NULL;
  static event_handle_t *schedule_ev_read = NULL;
+ static int   conf_flush_threshold_dumped;
+ static int   conf_flush_threshold_scheduled;
+ static int   conf_taperflush;
+ static off_t flush_threshold_dumped;
+ static off_t flush_threshold_scheduled;
+ static off_t taperflush;
+ static int   schedule_done;                   // 1 if we don't wait for a
+                                               //   schedule from the planner
+ static int   force_flush;                     // All dump are terminated, we
+                                               // must now respect taper_flush
  
  static int wait_children(int count);
  static void wait_for_children(void);
- static void allocate_bandwidth(interface_t *ip, unsigned long kps);
+ static void allocate_bandwidth(netif_t *ip, unsigned long kps);
  static int assign_holdingdisk(assignedhd_t **holdp, disk_t *diskp);
  static void adjust_diskspace(disk_t *diskp, cmd_t cmd);
  static void delete_diskspace(disk_t *diskp);
  static assignedhd_t **build_diskspace(char *destname);
  static int client_constrained(disk_t *dp);
- static void deallocate_bandwidth(interface_t *ip, unsigned long kps);
+ static void deallocate_bandwidth(netif_t *ip, unsigned long kps);
  static void dump_schedule(disklist_t *qp, char *str);
- static int dump_to_tape(disk_t *dp);
+ static void dump_to_tape(disk_t *dp);
  static assignedhd_t **find_diskspace(off_t size, int *cur_idle,
                                        assignedhd_t *preferred);
- static unsigned long free_kps(interface_t *ip);
+ static unsigned long free_kps(netif_t *ip);
  static off_t free_space(void);
- static void dumper_result(disk_t *dp);
+ static void dumper_chunker_result(disk_t *dp);
+ static void dumper_taper_result(disk_t *dp);
+ static void file_taper_result(disk_t *dp);
  static void handle_dumper_result(void *);
  static void handle_chunker_result(void *);
  static void handle_dumpers_time(void *);
  static void handle_taper_result(void *);
  static void holdingdisk_state(char *time_str);
  static dumper_t *idle_dumper(void);
  static void interface_state(char *time_str);
@@@ -116,48 -136,46 +136,46 @@@ static void start_degraded_mode(disklis
  static void start_some_dumps(disklist_t *rq);
  static void continue_port_dumps(void);
  static void update_failed_dump_to_tape(disk_t *);
- #if 0
- static void dump_state(const char *str);
- #endif
- int main(int main_argc, char **main_argv);
+ typedef enum {
+     TAPE_ACTION_NO_ACTION     = 0,
+     TAPE_ACTION_NEW_TAPE      = (1 << 0),
+     TAPE_ACTION_NO_NEW_TAPE   = (1 << 1),
+     TAPE_ACTION_START_A_FLUSH = (1 << 2)
+ } TapeAction;
+ static TapeAction tape_action(void);
  
  static const char *idle_strings[] = {
  #define NOT_IDLE              0
-     "not-idle",
+     T_("not-idle"),
  #define IDLE_NO_DUMPERS               1
-     "no-dumpers",
+     T_("no-dumpers"),
  #define IDLE_START_WAIT               2
-     "start-wait",
+     T_("start-wait"),
  #define IDLE_NO_HOLD          3
-     "no-hold",
+     T_("no-hold"),
  #define IDLE_CLIENT_CONSTRAINED       4
-     "client-constrained",
- #define IDLE_NO_DISKSPACE     5
-     "no-diskspace",
- #define IDLE_TOO_LARGE                6
-     "file-too-large",
- #define IDLE_NO_BANDWIDTH     7
-     "no-bandwidth",
- #define IDLE_TAPER_WAIT               8
-     "taper-wait",
+     T_("client-constrained"),
+ #define IDLE_NO_BANDWIDTH     5
+     T_("no-bandwidth"),
+ #define IDLE_NO_DISKSPACE     6
+     T_("no-diskspace")
  };
  
  int
  main(
-     int               main_argc,
-     char **   main_argv)
+     int               argc,
+     char **   argv)
  {
      disklist_t origq;
      disk_t *diskp;
      int dsk;
      dumper_t *dumper;
      char *newdir = NULL;
-     generic_fs_stats_t fs;
+     struct fs_usage fsusage;
      holdingdisk_t *hdp;
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
      unsigned long reserve = 100;
-     char *conffile;
      char *conf_diskfile;
      cmd_t cmd;
      int result_argc;
      char *conf_tapetype;
      tapetype_t *tape;
      char *line;
-     int    new_argc,   my_argc;
-     char **new_argv, **my_argv;
      char hostname[1025];
+     intmax_t kb_avail;
+     config_overwrites_t *cfg_ovr = NULL;
+     char *cfg_opt = NULL;
+     holdalloc_t *ha, *ha_last;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda");
  
      safe_fd(-1, 0);
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
 +    malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +
      erroutput_type = (ERR_AMANDALOG|ERR_INTERACTIVE);
      set_logerror(logerror);
  
      startclock();
  
-     parse_conf(main_argc, main_argv, &new_argc, &new_argv);
-     my_argc = new_argc;
-     my_argv = new_argv;
+     cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
  
-     printf("%s: pid %ld executable %s version %s\n",
-          get_pname(), (long) getpid(), my_argv[0], version());
+     if (argc > 1)
+       cfg_opt = argv[1];
+     config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_USE_CWD | CONFIG_INIT_FATAL,
+               cfg_opt);
+     apply_config_overwrites(cfg_ovr);
  
-     if (my_argc > 1) {
-       config_name = stralloc(my_argv[1]);
-       config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-       if(my_argc > 2) {
-           if(strncmp(my_argv[2], "nodump", 6) == 0) {
-               nodump = 1;
-           }
-       }
+     g_printf(_("%s: pid %ld executable %s version %s\n"),
+          get_pname(), (long) getpid(), argv[0], version());
  
-     } else {
-       char my_cwd[STR_SIZE];
-       if (getcwd(my_cwd, SIZEOF(my_cwd)) == NULL) {
-           error("cannot determine current working directory");
-           /*NOTREACHED*/
-       }
-       config_dir = stralloc2(my_cwd, "/");
-       if ((config_name = strrchr(my_cwd, '/')) != NULL) {
-           config_name = stralloc(config_name + 1);
-       }
+     if(argc > 2) {
+         if(strncmp(argv[2], "nodump", 6) == 0) {
+             nodump = 1;
+         }
      }
  
-     safe_cd();
+     safe_cd(); /* do this *after* config_init */
  
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     if(read_conffile(conffile)) {
-       error("errors processing config file \"%s\"", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
+     check_running_as(RUNNING_AS_DUMPUSER);
  
      dbrename(config_name, DBG_SUBDIR_SERVER);
  
-     report_bad_conf_arg();
      amfree(driver_timestamp);
      /* read timestamp from stdin */
      while ((line = agets(stdin)) != NULL) {
        amfree(line);
      }
      if ( line == NULL ) {
-       error("Did not get DATE line from planner");
+       error(_("Did not get DATE line from planner"));
        /*NOTREACHED*/
      }
      driver_timestamp = alloc(15);
      strncpy(driver_timestamp, &line[5], 14);
      driver_timestamp[14] = '\0';
      amfree(line);
-     log_add(L_START,"date %s", driver_timestamp);
+     log_add(L_START,_("date %s"), driver_timestamp);
  
      gethostname(hostname, SIZEOF(hostname));
-     log_add(L_STATS,"hostname %s", hostname);
+     log_add(L_STATS,_("hostname %s"), hostname);
  
      /* check that we don't do many dump in a day and usetimestamps is off */
      if(strlen(driver_timestamp) == 8) {
            char *oldlogfile = vstralloc(conf_logdir, "/oldlog/log.",
                                         driver_timestamp, ".0", NULL);
            if(access(logfile, F_OK) == 0 || access(oldlogfile, F_OK) == 0) {
-               log_add(L_WARNING, "WARNING: This is not the first amdump run today. Enable the usetimestamps option in the configuration file if you want to run amdump more than once per calendar day.");
+               log_add(L_WARNING, _("WARNING: This is not the first amdump run today. Enable the usetimestamps option in the configuration file if you want to run amdump more than once per calendar day."));
            }
            amfree(oldlogfile);
            amfree(logfile);
        }
-       hd_driver_timestamp = construct_timestamp(NULL);
+       hd_driver_timestamp = get_timestamp_from_time(0);
      }
      else {
        hd_driver_timestamp = stralloc(driver_timestamp);
      }
  
-     taper_program = vstralloc(libexecdir, "/", "taper", versionsuffix(), NULL);
-     dumper_program = vstralloc(libexecdir, "/", "dumper", versionsuffix(),
+     taper_program = vstralloc(amlibexecdir, "/", "taper", versionsuffix(), NULL);
+     dumper_program = vstralloc(amlibexecdir, "/", "dumper", versionsuffix(),
                               NULL);
-     chunker_program = vstralloc(libexecdir, "/", "chunker", versionsuffix(),
+     chunker_program = vstralloc(amlibexecdir, "/", "chunker", versionsuffix(),
                               NULL);
  
      conf_taperalgo = getconf_taperalgo(CNF_TAPERALGO);
      conf_runtapes = getconf_int(CNF_RUNTAPES);
      tape = lookup_tapetype(conf_tapetype);
      tape_length = tapetype_get_length(tape);
-     printf("driver: tape size " OFF_T_FMT "\n", (OFF_T_FMT_TYPE)tape_length);
+     conf_flush_threshold_dumped = getconf_int(CNF_FLUSH_THRESHOLD_DUMPED);
+     conf_flush_threshold_scheduled = getconf_int(CNF_FLUSH_THRESHOLD_SCHEDULED);
+     conf_taperflush = getconf_int(CNF_TAPERFLUSH);
+     flush_threshold_dumped = (conf_flush_threshold_dumped * tape_length) / 100;
+     flush_threshold_scheduled = (conf_flush_threshold_scheduled * tape_length) / 100;
+     taperflush = (conf_taperflush *tape_length) / 100;
+     driver_debug(1, _("flush_threshold_dumped: %lld\n"), (long long)flush_threshold_dumped);
+     driver_debug(1, _("flush_threshold_scheduled: %lld\n"), (long long)flush_threshold_scheduled);
+     driver_debug(1, _("taperflush: %lld\n"), (long long)taperflush);
  
      /* start initializing: read in databases */
  
-     conf_diskfile = getconf_str(CNF_DISKFILE);
-     if (*conf_diskfile == '/') {
-       conf_diskfile = stralloc(conf_diskfile);
-     } else {
-       conf_diskfile = stralloc2(config_dir, conf_diskfile);
-     }
+     conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
      if (read_diskfile(conf_diskfile, &origq) < 0) {
-       error("could not load disklist \"%s\"", conf_diskfile);
+       error(_("could not load disklist \"%s\""), conf_diskfile);
        /*NOTREACHED*/
      }
      amfree(conf_diskfile);
      reserve = (unsigned long)getconf_int(CNF_RESERVE);
  
      total_disksize = (off_t)0;
-     for(hdp = getconf_holdingdisks(), dsk = 0; hdp != NULL; hdp = hdp->next, dsk++) {
-       hdp->up = (void *)alloc(SIZEOF(holdalloc_t));
-       holdalloc(hdp)->allocated_dumpers = 0;
-       holdalloc(hdp)->allocated_space = (off_t)0;
+     ha_last = NULL;
+     num_holdalloc = 0;
+     for(hdp = getconf_holdingdisks(), dsk = 0; hdp != NULL; hdp = holdingdisk_next(hdp), dsk++) {
+       ha = alloc(SIZEOF(holdalloc_t));
+       num_holdalloc++;
+       /* link the list in the same order as getconf_holdingdisks's results */
+       ha->next = NULL;
+       if (ha_last == NULL)
+           holdalloc = ha;
+       else
+           ha_last->next = ha;
+       ha_last = ha;
+       ha->hdisk = hdp;
+       ha->allocated_dumpers = 0;
+       ha->allocated_space = (off_t)0;
+       ha->disksize = holdingdisk_get_disksize(hdp);
  
-       if(get_fs_stats(holdingdisk_get_diskdir(hdp), &fs) == -1
+       /* get disk size */
+       if(get_fs_usage(holdingdisk_get_diskdir(hdp), NULL, &fsusage) == -1
           || access(holdingdisk_get_diskdir(hdp), W_OK) == -1) {
-           log_add(L_WARNING, "WARNING: ignoring holding disk %s: %s\n",
+           log_add(L_WARNING, _("WARNING: ignoring holding disk %s: %s\n"),
                    holdingdisk_get_diskdir(hdp), strerror(errno));
-           hdp->disksize = 0L;
+           ha->disksize = 0L;
            continue;
        }
  
-       if(fs.avail != (off_t)-1) {
-           if(hdp->disksize > (off_t)0) {
-               if(hdp->disksize > fs.avail) {
-                   log_add(L_WARNING,
-                           "WARNING: %s: " OFF_T_FMT " KB requested, "
-                           "but only " OFF_T_FMT " KB available.",
-                           holdingdisk_get_diskdir(hdp),
-                           (OFF_T_FMT_TYPE)hdp->disksize,
-                           (OFF_T_FMT_TYPE)fs.avail);
-                           hdp->disksize = fs.avail;
-               }
-           }
-           else if((fs.avail + hdp->disksize) < (off_t)0) {
+       /* do the division first to avoid potential integer overflow */
+       if (fsusage.fsu_bavail_top_bit_set)
+           kb_avail = 0;
+       else
+           kb_avail = fsusage.fsu_bavail / 1024 * fsusage.fsu_blocksize;
+       if(ha->disksize > (off_t)0) {
+           if(ha->disksize > kb_avail) {
                log_add(L_WARNING,
-                       "WARNING: %s: not " OFF_T_FMT " KB free.",
-                       holdingdisk_get_diskdir(hdp), -hdp->disksize);
-               hdp->disksize = (off_t)0;
-               continue;
+                       _("WARNING: %s: %lld KB requested, "
+                       "but only %lld KB available."),
+                       holdingdisk_get_diskdir(hdp),
+                       (long long)ha->disksize,
+                       (long long)kb_avail);
+                       ha->disksize = kb_avail;
            }
-           else
-               hdp->disksize += fs.avail;
        }
+       /* ha->disksize is negative; use all but that amount */
+       else if(kb_avail < -ha->disksize) {
+           log_add(L_WARNING,
+                   _("WARNING: %s: not %lld KB free."),
+                   holdingdisk_get_diskdir(hdp),
+                   (long long)-ha->disksize);
+           ha->disksize = (off_t)0;
+           continue;
+       }
+       else
+           ha->disksize += kb_avail;
  
-       printf("driver: adding holding disk %d dir %s size "
-               OFF_T_FMT " chunksize " OFF_T_FMT "\n",
+       g_printf(_("driver: adding holding disk %d dir %s size %lld chunksize %lld\n"),
               dsk, holdingdisk_get_diskdir(hdp),
-              (OFF_T_FMT_TYPE)hdp->disksize,
-              (OFF_T_FMT_TYPE)(holdingdisk_get_chunksize(hdp)));
+              (long long)ha->disksize,
+              (long long)(holdingdisk_get_chunksize(hdp)));
  
        newdir = newvstralloc(newdir,
                              holdingdisk_get_diskdir(hdp), "/", hd_driver_timestamp,
                              NULL);
        if(!mkholdingdir(newdir)) {
-           hdp->disksize = (off_t)0;
+           ha->disksize = (off_t)0;
        }
-       total_disksize += hdp->disksize;
+       total_disksize += ha->disksize;
      }
  
      reserved_space = total_disksize * (off_t)(reserve / 100);
  
-     printf("reserving " OFF_T_FMT " out of " OFF_T_FMT
-          " for degraded-mode dumps\n",
-          (OFF_T_FMT_TYPE)reserved_space, (OFF_T_FMT_TYPE)free_space());
+     g_printf(_("reserving %lld out of %lld for degraded-mode dumps\n"),
+          (long long)reserved_space, (long long)free_space());
  
      amfree(newdir);
  
  
      runq.head = NULL;
      runq.tail = NULL;
+     directq.head = NULL;
+     directq.tail = NULL;
      waitq = origq;
+     taper_state = TAPER_STATE_DEFAULT;
      tapeq = read_flush();
  
      roomq.head = roomq.tail = NULL;
  
-     log_add(L_STATS, "startup time %s", walltime_str(curclock()));
+     log_add(L_STATS, _("startup time %s"), walltime_str(curclock()));
  
-     printf("driver: start time %s inparallel %d bandwidth %lu diskspace "
-          OFF_T_FMT " ", walltime_str(curclock()), inparallel,
-          free_kps((interface_t *)0), (OFF_T_FMT_TYPE)free_space());
-     printf(" dir %s datestamp %s driver: drain-ends tapeq %s big-dumpers %s\n",
+     g_printf(_("driver: start time %s inparallel %d bandwidth %lu diskspace %lld "), walltime_str(curclock()), inparallel,
+          free_kps(NULL), (long long)free_space());
+     g_printf(_(" dir %s datestamp %s driver: drain-ends tapeq %s big-dumpers %s\n"),
           "OBSOLETE", driver_timestamp, taperalgo2str(conf_taperalgo),
           getconf_str(CNF_DUMPORDER));
      fflush(stdout);
  
      /* ok, planner is done, now lets see if the tape is ready */
  
-     if(conf_runtapes > 0) {
+     if (conf_runtapes > 0) {
        cmd = getresult(taper, 1, &result_argc, result_argv, MAX_ARGS+1);
-       if(cmd != TAPER_OK) {
+       if (cmd != TAPER_OK) {
            /* no tape, go into degraded mode: dump to holding disk */
-           need_degraded=1;
+           need_degraded = 1;
        }
-     }
-     else {
-       need_degraded=1;
+     } else {
+       need_degraded = 1;
      }
  
      tape_left = tape_length;
      taper_busy = 0;
+     taper_input_error = NULL;
+     taper_tape_error = NULL;
      taper_disk = NULL;
      taper_ev_read = NULL;
+     schedule_done = nodump;
+     force_flush = 0;
      if(!need_degraded) startaflush();
  
      if(!nodump)
      short_dump_state();
      event_loop(0);
  
-     /* handle any remaining dumps by dumping directly to tape, if possible */
+     force_flush = 1;
  
-     while(!empty(runq) && taper > 0) {
+     /* mv runq to directq */
+     while (!empty(runq)) {
        diskp = dequeue_disk(&runq);
+       headqueue_disk(&directq, diskp);
+     }
+     /* handle any remaining dumps by dumping directly to tape, if possible */
+     while(!empty(directq) && taper > 0) {
+       diskp = dequeue_disk(&directq);
        if (diskp->to_holdingdisk == HOLD_REQUIRED) {
-           log_add(L_FAIL, "%s %s %s %d [%s]",
-               diskp->host->hostname, diskp->name, sched(diskp)->datestamp,
+           char *qname = quote_string(diskp->name);
+           log_add(L_FAIL, _("%s %s %s %d [%s]"),
+               diskp->host->hostname, qname, sched(diskp)->datestamp,
                sched(diskp)->level,
-               "can't dump required holdingdisk");
+               _("can't dump required holdingdisk"));
+           amfree(qname);
        }
        else if (!degraded_mode) {
-           int rc = dump_to_tape(diskp);
-           if(rc == 1)
-               log_add(L_INFO,
-                       "%s %s %d [dump to tape failed, will try again]",
-                       diskp->host->hostname,
-                       diskp->name,
-                       sched(diskp)->level);
-           else if(rc == 2)
-               log_add(L_FAIL, "%s %s %s %d [dump to tape failed]",
-                       diskp->host->hostname,
-                       diskp->name,
-                       sched(diskp)->datestamp,
-                       sched(diskp)->level);
+           taper_state |= TAPER_STATE_DUMP_TO_TAPE;
+           dump_to_tape(diskp);
+           event_loop(0);
+           taper_state &= !TAPER_STATE_DUMP_TO_TAPE;
        }
-       else
-           log_add(L_FAIL, "%s %s %s %d [%s]",
-               diskp->host->hostname, diskp->name, sched(diskp)->datestamp,
+       else {
+           char *qname = quote_string(diskp->name);
+           log_add(L_FAIL, _("%s %s %s %d [%s]"),
+               diskp->host->hostname, qname, sched(diskp)->datestamp,
                sched(diskp)->level,
                diskp->to_holdingdisk == HOLD_AUTO ?
-                   "no more holding disk space" :
-                   "can't dump no-hold disk in degraded mode");
+                   _("no more holding disk space") :
+                   _("can't dump no-hold disk in degraded mode"));
+           amfree(qname);
+       }
      }
  
+     /* fill up the tape or start new one for taperflush */
+     startaflush();
+     event_loop(0);
      short_dump_state();                               /* for amstatus */
  
-     printf("driver: QUITTING time %s telling children to quit\n",
+     g_printf(_("driver: QUITTING time %s telling children to quit\n"),
             walltime_str(curclock()));
      fflush(stdout);
  
      /* wait for all to die */
      wait_children(600);
  
-     for(hdp = getconf_holdingdisks(); hdp != NULL; hdp = hdp->next) {
-       cleanup_holdingdisk(holdingdisk_get_diskdir(hdp), 0);
-       amfree(hdp->up);
-     }
+     /* cleanup */
+     holding_cleanup(NULL, NULL);
      amfree(newdir);
  
      check_unfree_serial();
-     printf("driver: FINISHED time %s\n", walltime_str(curclock()));
+     g_printf(_("driver: FINISHED time %s\n"), walltime_str(curclock()));
      fflush(stdout);
-     log_add(L_FINISH,"date %s time %s", driver_timestamp, walltime_str(curclock()));
+     log_add(L_FINISH,_("date %s time %s"), driver_timestamp, walltime_str(curclock()));
      amfree(driver_timestamp);
  
 +    free_new_argv(new_argc, new_argv);
      amfree(dumper_program);
      amfree(taper_program);
-     amfree(config_dir);
-     amfree(config_name);
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
  
      dbclose();
  
@@@ -537,10 -571,10 +574,10 @@@ wait_children(int count
            if (pid > 0) {
                what = NULL;
                if (! WIFEXITED(retstat)) {
-                   what = "signal";
+                   what = _("signal");
                    code = WTERMSIG(retstat);
                } else if (WEXITSTATUS(retstat) != 0) {
-                   what = "code";
+                   what = _("code");
                    code = WEXITSTATUS(retstat);
                }
                who = NULL;
                    who = stralloc("unknown");
                }
                if(who && what) {
-                   log_add(L_WARNING, "%s pid %u exited with %s %d\n", who, 
+                   log_add(L_WARNING, _("%s pid %u exited with %s %d\n"), who, 
                            (unsigned)pid, what, code);
-                   printf("driver: %s pid %u exited with %s %d\n", who,
+                   g_printf(_("driver: %s pid %u exited with %s %d\n"), who,
                           (unsigned)pid, what, code);
                }
                amfree(who);
@@@ -589,14 -623,14 +626,14 @@@ kill_children(int signal
      if(!nodump) {
          for(dumper = dmptable; dumper < dmptable + inparallel; dumper++) {
            if (!dumper->down && dumper->pid > 1) {
-               printf("driver: sending signal %d to %s pid %u\n", signal,
+               g_printf(_("driver: sending signal %d to %s pid %u\n"), signal,
                       dumper->name, (unsigned)dumper->pid);
                if (kill(dumper->pid, signal) == -1 && errno == ESRCH) {
                    if (dumper->chunker)
                        dumper->chunker->pid = 0;
                }
                if (dumper->chunker && dumper->chunker->pid > 1) {
-                   printf("driver: sending signal %d to %s pid %u\n", signal,
+                   g_printf(_("driver: sending signal %d to %s pid %u\n"), signal,
                           dumper->chunker->name,
                           (unsigned)dumper->chunker->pid);
                    if (kill(dumper->chunker->pid, signal) == -1 &&
      }
  
      if(taper_pid > 1)
-       printf("driver: sending signal %d to %s pid %u\n", signal,
+       g_printf(_("driver: sending signal %d to %s pid %u\n"), signal,
               "taper", (unsigned)taper_pid);
        if (kill(taper_pid, signal) == -1 && errno == ESRCH)
            taper_pid = 0;
@@@ -655,8 -689,20 +692,20 @@@ startaflush(void
      char *datestamp;
      int extra_tapes = 0;
      char *qname;
+     TapeAction result_tape_action;
  
-     if(!degraded_mode && !taper_busy && !empty(tapeq)) {
+     result_tape_action = tape_action();
+     if (result_tape_action & TAPE_ACTION_NEW_TAPE) {
+       taper_state &= !TAPER_STATE_WAIT_FOR_TAPE;
+       taper_cmd(NEW_TAPE, NULL, NULL, 0, NULL);
+     } else if (result_tape_action & TAPE_ACTION_NO_NEW_TAPE) {
+       taper_state &= !TAPER_STATE_WAIT_FOR_TAPE;
+       taper_cmd(NO_NEW_TAPE, NULL, NULL, 0, NULL);
+     }
+     if (!degraded_mode && !taper_busy && !empty(tapeq) &&
+       (result_tape_action & TAPE_ACTION_START_A_FLUSH)) {
        
        datestamp = sched(tapeq.head)->datestamp;
        switch(conf_taperalgo) {
        }
        if(!dp) { /* ALGO_SMALLEST, or default if nothing fit. */
            if(conf_taperalgo != ALGO_SMALLEST)  {
-               fprintf(stderr,
-                  "driver: startaflush: Using SMALLEST because nothing fit\n");
+               g_fprintf(stderr,
+                  _("driver: startaflush: Using SMALLEST because nothing fit\n"));
            }
            fit = dp = tapeq.head;
            while (fit != NULL) {
        if (dp) {
            taper_disk = dp;
            taper_busy = 1;
+           taper_input_error = NULL;
+           taper_tape_error = NULL;
+           taper_result = LAST_TOK;
+           taper_sendresult = 0;
+           taper_first_label = NULL;
+           taper_written = 0;
+           taper_state &= !TAPER_STATE_DUMP_TO_TAPE;
+           taper_dumper = NULL;
            qname = quote_string(dp->name);
            taper_cmd(FILE_WRITE, dp, sched(dp)->destname, sched(dp)->level,
                      sched(dp)->datestamp);
-           fprintf(stderr,"driver: startaflush: %s %s %s "
-                   OFF_T_FMT " " OFF_T_FMT "\n",
+           g_fprintf(stderr,_("driver: startaflush: %s %s %s %lld %lld\n"),
                    taperalgo2str(conf_taperalgo), dp->host->hostname, qname,
-                   (OFF_T_FMT_TYPE)sched(taper_disk)->act_size,
-                   (OFF_T_FMT_TYPE)tape_left);
+                   (long long)sched(taper_disk)->act_size,
+                   (long long)tape_left);
            if(sched(dp)->act_size <= tape_left)
                tape_left -= sched(dp)->act_size;
            else
                tape_left = (off_t)0;
            amfree(qname);
        } else {
-           error("FATAL: Taper marked busy and no work found.");
+           error(_("FATAL: Taper marked busy and no work found."));
            /*NOTREACHED*/
        }
      } else if(!taper_busy && taper_ev_read != NULL) {
      }
  }
  
  static int
  client_constrained(
      disk_t *  dp)
@@@ -800,6 -852,7 +855,7 @@@ start_some_dumps
      dumper_t *dumper;
      char dumptype;
      char *dumporder;
+     int  busy_dumpers = 0;
  
      idle_reason = IDLE_NO_DUMPERS;
      sleep_time = 0;
        dumpers_ev_time = NULL;
      }
  
+     for(dumper = dmptable; dumper < (dmptable+inparallel); dumper++) {
+       if( dumper->busy ) {
+           busy_dumpers++;
+       }
+     }
      for (dumper = dmptable; dumper < dmptable+inparallel; dumper++) {
  
        if( dumper->busy || dumper->down) {
            } else if ((holdp =
                find_diskspace(sched(diskp)->est_size, &cur_idle, NULL)) == NULL) {
                cur_idle = max(cur_idle, IDLE_NO_DISKSPACE);
+               if (empty(tapeq) && busy_dumpers == 0) {
+                   remove_disk(rq, diskp);
+                   enqueue_disk(&directq, diskp);
+               }
            } else if (client_constrained(diskp)) {
                free_assignedhd(holdp);
                cur_idle = max(cur_idle, IDLE_CLIENT_CONSTRAINED);
                                break;
                      case 'B': accept = (sched(diskp)->est_kps > sched(diskp_accept)->est_kps);
                                break;
-                     default:  log_add(L_WARNING, "Unknown dumporder character \'%c\', using 's'.\n",
+                     default:  log_add(L_WARNING, _("Unknown dumporder character \'%c\', using 's'.\n"),
                                        dumptype);
                                accept = (sched(diskp)->est_size < sched(diskp_accept)->est_size);
                                break;
            if(cmd != PORT) {
                assignedhd_t **h=NULL;
                int activehd;
+               char *qname = quote_string(diskp->name);
  
-               printf("driver: did not get PORT from %s for %s:%s\n",
-                      chunker->name, diskp->host->hostname, diskp->name);
+               g_printf(_("driver: did not get PORT from %s for %s:%s\n"),
+                      chunker->name, diskp->host->hostname, qname);
+               amfree(qname);
                fflush(stdout);
  
                deallocate_bandwidth(diskp->host->netif, sched(diskp)->est_kps);
                h = sched(diskp)->holdp;
                activehd = sched(diskp)->activehd;
                h[activehd]->used = 0;
-               holdalloc(h[activehd]->disk)->allocated_dumpers--;
+               h[activehd]->disk->allocated_dumpers--;
                adjust_diskspace(diskp, DONE);
                delete_diskspace(diskp);
                diskp->host->inprogress--;
                sched(diskp)->dumper = NULL;
                dumper->busy = 0;
                dumper->dp = NULL;
-               sched(diskp)->attempted++;
+               sched(diskp)->dump_attempted++;
                free_serial_dp(diskp);
-               if(sched(diskp)->attempted < 2)
+               if(sched(diskp)->dump_attempted < 2)
                    enqueue_disk(rq, diskp);
            }
            else {
@@@ -1031,17 -1096,17 +1099,17 @@@ dump_schedule
      disk_t *dp;
      char *qname;
  
-     printf("dump of driver schedule %s:\n--------\n", str);
+     g_printf(_("dump of driver schedule %s:\n--------\n"), str);
  
      for(dp = qp->head; dp != NULL; dp = dp->next) {
          qname = quote_string(dp->name);
-       printf("  %-20s %-25s lv %d t %5lu s " OFF_T_FMT " p %d\n",
+       g_printf("  %-20s %-25s lv %d t %5lu s %lld p %d\n",
               dp->host->hostname, qname, sched(dp)->level,
               sched(dp)->est_time,
-              (OFF_T_FMT_TYPE)sched(dp)->est_size, sched(dp)->priority);
+              (long long)sched(dp)->est_size, sched(dp)->priority);
          amfree(qname);
      }
-     printf("--------\n");
+     g_printf("--------\n");
  }
  
  static void
@@@ -1053,14 -1118,9 +1121,14 @@@ start_degraded_mode
      off_t est_full_size;
      char *qname;
  
 +    if (taper_ev_read != NULL) {
 +      event_release(taper_ev_read);
 +      taper_ev_read = NULL;
 +    }
 +
      newq.head = newq.tail = 0;
  
-     dump_schedule(queuep, "before start degraded mode");
+     dump_schedule(queuep, _("before start degraded mode"));
  
      est_full_size = (off_t)0;
      while(!empty(*queuep)) {
                enqueue_disk(&newq, dp);
            }
            else {
-               log_add(L_FAIL,"%s %s %s %d [can't switch to incremental dump]",
+               log_add(L_FAIL,_("%s %s %s %d [can't switch to incremental dump]"),
                        dp->host->hostname, qname, sched(dp)->datestamp,
                        sched(dp)->level);
            }
      /*@i@*/ *queuep = newq;
      degraded_mode = 1;
  
-     dump_schedule(queuep, "after start degraded mode");
+     dump_schedule(queuep, _("after start degraded mode"));
  }
  
  
@@@ -1178,15 -1238,14 +1246,14 @@@ continue_port_dumps(void
  
  static void
  handle_taper_result(
-     void *    cookie)
+     void *cookie)
  {
      disk_t *dp;
-     off_t filenum;
      cmd_t cmd;
      int result_argc;
      char *result_argv[MAX_ARGS+1];
-     int avail_tapes = 0;
-     
+     char *qname;
      (void)cookie;     /* Quiet unused parameter warning */
  
      assert(cookie == NULL);
          
        switch(cmd) {
              
-       case PARTIAL:
-       case DONE:      /* DONE <handle> <label> <tape file> <err mess> */
-           if(result_argc != 5) {
-               error("error: [taper DONE result_argc != 5: %d", result_argc);
+       case FAILED:    /* FAILED <handle> INPUT-* TAPE-* <input err mesg> <tape err mesg> */
+           if(result_argc != 6) {
+               error(_("error: [taper FAILED result_argc != 6: %d"), result_argc);
                /*NOTREACHED*/
            }
              
            dp = serial2disk(result_argv[2]);
-           free_serial(result_argv[2]);
+           assert(dp == taper_disk);
+           if (!taper_dumper)
+               free_serial(result_argv[2]);
              
-           filenum = OFF_T_ATOI(result_argv[4]);
-           if(cmd == DONE) {
-               update_info_taper(dp, result_argv[3], filenum,
-                                   sched(dp)->level);
-           }
-             
-           delete_diskspace(dp);
-             
-           printf("driver: finished-cmd time %s taper wrote %s:%s\n",
-                  walltime_str(curclock()), dp->host->hostname, dp->name);
+           qname = quote_string(dp->name);
+           g_printf(_("driver: finished-cmd time %s taper wrote %s:%s\n"),
+                  walltime_str(curclock()), dp->host->hostname, qname);
            fflush(stdout);
-             
-           amfree(sched(dp)->destname);
-           amfree(sched(dp)->dumpdate);
-           amfree(sched(dp)->degr_dumpdate);
-           amfree(sched(dp)->datestamp);
-           amfree(dp->up);
-             
-           taper_busy = 0;
-           taper_disk = NULL;
-           startaflush();
-             
-           /* continue with those dumps waiting for diskspace */
-           continue_port_dumps();
+             amfree(qname);
+           if (strcmp(result_argv[3], "INPUT-ERROR") == 0) {
+               taper_input_error = stralloc(result_argv[5]);
+           }
+           if (strcmp(result_argv[4], "TAPE-ERROR") == 0) {
+               taper_tape_error = stralloc(result_argv[6]);
+           }
+           taper_result = cmd;
            break;
              
-       case TRYAGAIN:  /* TRY-AGAIN <handle> <err mess> */
-           if (result_argc < 2) {
-               error("error [taper TRYAGAIN result_argc < 2: %d]",
-                     result_argc);
-               /*NOTREACHED*/
+       case PARTIAL:   /* PARTIAL <handle> INPUT-* TAPE-* <stat mess> <input err mesg> <tape err mesg>*/
+       case DONE:      /* DONE <handle> INPUT-GOOD TAPE-GOOD <stat mess> <input err mesg> <tape err mesg> */
+           if(result_argc != 7) {
+               error(_("error: [taper PARTIAL result_argc != 7: %d"), result_argc);
+               /*NOTREACHED*/
            }
+             
            dp = serial2disk(result_argv[2]);
-           free_serial(result_argv[2]);
-           printf("driver: taper-tryagain time %s disk %s:%s\n",
-                  walltime_str(curclock()), dp->host->hostname, dp->name);
+           assert(dp == taper_disk);
+             if (!taper_dumper)
+                 free_serial(result_argv[2]);
+           qname = quote_string(dp->name);
+           g_printf(_("driver: finished-cmd time %s taper wrote %s:%s\n"),
+                  walltime_str(curclock()), dp->host->hostname, qname);
+           amfree(qname);
            fflush(stdout);
-             
-           /* See how many tapes we have left, but we alwyays
-              retry once (why?) */
-           current_tape++;
-           if(dp->tape_splitsize > (off_t)0)
-               avail_tapes = conf_runtapes - current_tape;
-           else
-               avail_tapes = 0;
-             
-           if(sched(dp)->attempted > avail_tapes) {
-               log_add(L_FAIL, "%s %s %s %d [too many taper retries]",
-                         dp->host->hostname, dp->name, sched(dp)->datestamp,
-                         sched(dp)->level);
-               printf("driver: taper failed %s %s %s, too many taper retry\n",
-                        result_argv[2], dp->host->hostname, dp->name);
+           if (strcmp(result_argv[3], "INPUT-ERROR") == 0) {
+               taper_input_error = stralloc(result_argv[5]);
            }
-           else {
-               /* Re-insert into taper queue. */
-               sched(dp)->attempted++;
-               headqueue_disk(&tapeq, dp);
+           if (strcmp(result_argv[4], "TAPE-ERROR") == 0) {
+               taper_tape_error = stralloc(result_argv[6]);
            }
-             
-           tape_left = tape_length;
-             
-           /* run next thing from queue */
-             
-           taper_busy = 0;
-           taper_disk = NULL;
-           startaflush();
-           continue_port_dumps();
+           taper_result = cmd;
            break;
              
-         case SPLIT_CONTINUE:  /* SPLIT_CONTINUE <handle> <new_label> */
-             if (result_argc != 3) {
-                 error("error [taper SPLIT_CONTINUE result_argc != 3: %d]",
+         case PARTDONE:  /* PARTDONE <handle> <label> <fileno> <stat> */
+           dp = serial2disk(result_argv[2]);
+           assert(dp == taper_disk);
+             if (result_argc != 6) {
+                 error(_("error [taper PARTDONE result_argc != 5: %d]"),
                        result_argc);
                /*NOTREACHED*/
              }
+           if (!taper_first_label) {
+               taper_first_label = stralloc(result_argv[3]);
+               taper_first_fileno = OFF_T_ATOI(result_argv[4]);
+           }
+           taper_written = OFF_T_ATOI(result_argv[5]);
+           if (taper_written > sched(taper_disk)->act_size)
+               sched(taper_disk)->act_size = taper_written;
              
              break;
-         case SPLIT_NEEDNEXT:  /* SPLIT-NEEDNEXT <handle> <kb written> */
+         case REQUEST_NEW_TAPE:  /* REQUEST-NEW-TAPE */
+             if (result_argc != 2) {
+                 error(_("error [taper REQUEST_NEW_TAPE result_argc != 2: %d]"),
+                       result_argc);
+               /*NOTREACHED*/
+             }
+           taper_state &= !TAPER_STATE_TAPE_STARTED;
+           if (current_tape >= conf_runtapes) {
+               taper_cmd(NO_NEW_TAPE, NULL, NULL, 0, NULL);
+               log_add(L_WARNING,
+                       _("Out of tapes; going into degraded mode."));
+               start_degraded_mode(&runq);
+           } else {
+               TapeAction result_tape_action;
+               taper_state |= TAPER_STATE_WAIT_FOR_TAPE;
+               result_tape_action = tape_action();
+               if (result_tape_action & TAPE_ACTION_NEW_TAPE) {
+                   taper_cmd(NEW_TAPE, NULL, NULL, 0, NULL);
+                   taper_state &= !TAPER_STATE_WAIT_FOR_TAPE;
+               } else if (result_tape_action & TAPE_ACTION_NO_NEW_TAPE) {
+                   taper_cmd(NO_NEW_TAPE, NULL, NULL, 0, NULL);
+                   taper_state &= !TAPER_STATE_WAIT_FOR_TAPE;
+               }
+           }
+           break;
+       case NEW_TAPE: /* NEW-TAPE <handle> <label> */
              if (result_argc != 3) {
-                 error("error [taper SPLIT_NEEDNEXT result_argc != 3: %d]",
+                 error(_("error [taper NEW_TAPE result_argc != 3: %d]"),
                        result_argc);
                /*NOTREACHED*/
              }
-             
              /* Update our tape counter and reset tape_left */
-             current_tape++;
-             tape_left = tape_length;
-             
-             /* Reduce the size of the dump by amount written and reduce
-                tape_left by the amount left over */
-             dp = serial2disk(result_argv[2]);
-             sched(dp)->act_size -= OFF_T_ATOI(result_argv[3]);
-             if (sched(dp)->act_size < tape_left)
-                 tape_left -= sched(dp)->act_size;
-             else
-                 tape_length = 0;
-             
-             break;
-             
+           current_tape++;
+           tape_left = tape_length;
+           taper_state |= TAPER_STATE_TAPE_STARTED;
+           break;
+       case NO_NEW_TAPE:  /* NO-NEW-TAPE <handle> */
+             if (result_argc != 2) {
+                 error(_("error [taper NO_NEW_TAPE result_argc != 2: %d]"),
+                       result_argc);
+               /*NOTREACHED*/
+             }
+           break;
+       case DUMPER_STATUS:  /* DUMPER-STATUS <handle> */
+             if (result_argc != 2) {
+                 error(_("error [taper NO_NEW_TAPE result_argc != 2: %d]"),
+                       result_argc);
+               /*NOTREACHED*/
+             }
+           if (taper_dumper->result == LAST_TOK) {
+               taper_sendresult = 1;
+           } else {
+               if( taper_dumper->result == DONE) {
+                   taper_cmd(DONE, NULL, NULL, 0, NULL);
+               } else {
+                   taper_cmd(FAILED, NULL, NULL, 0, NULL);
+               }
+           }
+           break;
          case TAPE_ERROR: /* TAPE-ERROR <handle> <err mess> */
              dp = serial2disk(result_argv[2]);
-             free_serial(result_argv[2]);
-             printf("driver: finished-cmd time %s taper wrote %s:%s\n",
-                    walltime_str(curclock()), dp->host->hostname, dp->name);
+           if (!taper_dumper)
+               free_serial(result_argv[2]);
+           qname = quote_string(dp->name);
+             g_printf(_("driver: finished-cmd time %s taper wrote %s:%s\n"),
+                    walltime_str(curclock()), dp->host->hostname, qname);
+           amfree(qname);
              fflush(stdout);
-             log_add(L_WARNING, "Taper  error: %s", result_argv[3]);
+             log_add(L_WARNING, _("Taper  error: %s"), result_argv[3]);
+           taper_tape_error = stralloc(result_argv[3]);
              /*FALLTHROUGH*/
  
          case BOGUS:
              if (cmd == BOGUS) {
-               log_add(L_WARNING, "Taper protocol error");
+               log_add(L_WARNING, _("Taper protocol error"));
+               taper_tape_error = stralloc("BOGUS");
              }
              /*
               * Since we received a taper error, we can't send anything more
               */
              if(!nodump) {
                  log_add(L_WARNING,
-                         "going into degraded mode because of taper component error.");
+                         _("going into degraded mode because of taper component error."));
                  start_degraded_mode(&runq);
              }
              tapeq.head = tapeq.tail = NULL;
              taper_busy = 0;
-             taper_disk = NULL;
              if(taper_ev_read != NULL) {
                  event_release(taper_ev_read);
                  taper_ev_read = NULL;
              }
              if(cmd != TAPE_ERROR) aclose(taper);
-             continue_port_dumps();
+           taper_result = cmd;
              break;
  
        default:
-             error("driver received unexpected token (%s) from taper",
+             error(_("driver received unexpected token (%s) from taper"),
                    cmdstr[cmd]);
            /*NOTREACHED*/
        }
-       /*
-        * Wakeup any dumpers that are sleeping because of network
-        * or disk constraints.
-        */
-       start_some_dumps(&runq);
+       if (taper_result != LAST_TOK) {
+           if(taper_dumper) {
+               if (taper_dumper->result != LAST_TOK) {
+                   // Dumper already returned it's result
+                   dumper_taper_result(taper_disk);
+               }
+           } else {
+               file_taper_result(taper_disk);
+           }
+       }
          
      } while(areads_dataready(taper));
  }
  
+ static void
+ file_taper_result(
+     disk_t *dp)
+ {
+     char *qname = quote_string(dp->name);
+     if (taper_result == DONE) {
+       update_info_taper(dp, taper_first_label, taper_first_fileno,
+                         sched(dp)->level);
+     }
+     sched(dp)->taper_attempted += 1;
+     if (taper_input_error) {
+       g_printf("driver: taper failed %s %s: %s\n",
+                  dp->host->hostname, qname, taper_input_error);
+       if (strcmp(sched(dp)->datestamp, driver_timestamp) == 0) {
+           if(sched(dp)->taper_attempted >= 2) {
+               log_add(L_FAIL, _("%s %s %s %d [too many taper retries after holding disk error: %s]"),
+                   dp->host->hostname, qname, sched(dp)->datestamp,
+                   sched(dp)->level, taper_input_error);
+               g_printf("driver: taper failed %s %s, too many taper retry after holding disk error\n",
+                  dp->host->hostname, qname);
+               amfree(sched(dp)->destname);
+               amfree(sched(dp)->dumpdate);
+               amfree(sched(dp)->degr_dumpdate);
+               amfree(sched(dp)->datestamp);
+               amfree(dp->up);
+           } else {
+               log_add(L_INFO, _("%s %s %s %d [Will retry dump because of holding disk error: %s]"),
+                       dp->host->hostname, qname, sched(dp)->datestamp,
+                       sched(dp)->level, taper_input_error);
+               g_printf("driver: taper will retry %s %s because of holding disk error\n",
+                       dp->host->hostname, qname);
+               if (dp->to_holdingdisk != HOLD_REQUIRED) {
+                   dp->to_holdingdisk = HOLD_NEVER;
+                   sched(dp)->dump_attempted -= 1;
+                   headqueue_disk(&directq, dp);
+               } else {
+                   amfree(sched(dp)->destname);
+                   amfree(sched(dp)->dumpdate);
+                   amfree(sched(dp)->degr_dumpdate);
+                   amfree(sched(dp)->datestamp);
+                   amfree(dp->up);
+               }
+           }
+       } else {
+           amfree(sched(dp)->destname);
+           amfree(sched(dp)->dumpdate);
+           amfree(sched(dp)->degr_dumpdate);
+           amfree(sched(dp)->datestamp);
+           amfree(dp->up);
+       }
+     } else if (taper_tape_error) {
+       if(sched(dp)->taper_attempted >= 2) {
+           log_add(L_FAIL, _("%s %s %s %d [too many taper retries]"),
+                   dp->host->hostname, qname, sched(dp)->datestamp,
+                   sched(dp)->level);
+           g_printf("driver: taper failed %s %s, too many taper retry\n",
+                  dp->host->hostname, qname);
+           amfree(sched(dp)->destname);
+           amfree(sched(dp)->dumpdate);
+           amfree(sched(dp)->degr_dumpdate);
+           amfree(sched(dp)->datestamp);
+           amfree(dp->up);
+       } else {
+           g_printf("driver: taper will retry %s %s\n",
+                  dp->host->hostname, qname);
+           /* Re-insert into taper queue. */
+           headqueue_disk(&tapeq, dp);
+       }
+     } else {
+       delete_diskspace(dp);
+       amfree(sched(dp)->destname);
+       amfree(sched(dp)->dumpdate);
+       amfree(sched(dp)->degr_dumpdate);
+       amfree(sched(dp)->datestamp);
+       amfree(dp->up);
+     }
+     amfree(qname);
+     taper_busy = 0;
+     taper_input_error = NULL;
+     taper_tape_error = NULL;
+     taper_disk = NULL;
+             
+     /* continue with those dumps waiting for diskspace */
+     continue_port_dumps();
+     start_some_dumps(&runq);
+     startaflush();
+ }
+ static void
+ dumper_taper_result(
+     disk_t *dp)
+ {
+     dumper_t *dumper;
+     int is_partial;
+     char *qname;
+     dumper = sched(dp)->dumper;
+     free_serial_dp(dp);
+     if(dumper->result == DONE && taper_result == DONE) {
+       update_info_dumper(dp, sched(dp)->origsize,
+                          sched(dp)->dumpsize, sched(dp)->dumptime);
+       update_info_taper(dp, taper_first_label, taper_first_fileno,
+                         sched(dp)->level);
+       qname = quote_string(dp->name); /*quote to take care of spaces*/
+       log_add(L_STATS, _("estimate %s %s %s %d [sec %ld nkb %lld ckb %lld kps %lu]"),
+               dp->host->hostname, qname, sched(dp)->datestamp,
+               sched(dp)->level,
+               sched(dp)->est_time, (long long)sched(dp)->est_nsize,
+               (long long)sched(dp)->est_csize,
+               sched(dp)->est_kps);
+       amfree(qname);
+     } else {
+       update_failed_dump_to_tape(dp);
+     }
+     is_partial = dumper->result != DONE || taper_result != DONE;
+     sched(dp)->dump_attempted += 1;
+     sched(dp)->taper_attempted += 1;
+     if((dumper->result != DONE || taper_result != DONE) &&
+       sched(dp)->dump_attempted <= 1 &&
+       sched(dp)->taper_attempted <= 1) {
+       enqueue_disk(&directq, dp);
+     }
+     if(dumper->ev_read != NULL) {
+       event_release(dumper->ev_read);
+       dumper->ev_read = NULL;
+     }
+     if(taper_ev_read != NULL) {
+       event_release(taper_ev_read);
+       taper_ev_read = NULL;
+     }
+     taper_busy = 0;
+     taper_input_error = NULL;
+     taper_tape_error = NULL;
+     dumper->busy = 0;
+     dp->host->inprogress -= 1;
+     dp->inprogress = 0;
+     deallocate_bandwidth(dp->host->netif, sched(dp)->est_kps);
+ }
  static dumper_t *
  idle_dumper(void)
  {
  }
  
  static void
- dumper_result(
+ dumper_chunker_result(
      disk_t *  dp)
  {
      dumper_t *dumper;
      off_t dummy;
      off_t size;
      int is_partial;
+     char *qname;
  
      dumper = sched(dp)->dumper;
      chunker = dumper->chunker;
      if(dumper->result == DONE && chunker->result == DONE) {
        update_info_dumper(dp, sched(dp)->origsize,
                           sched(dp)->dumpsize, sched(dp)->dumptime);
-       log_add(L_STATS, "estimate %s %s %s %d [sec %ld nkb " OFF_T_FMT
-               " ckb " OFF_T_FMT " kps %lu]",
-               dp->host->hostname, dp->name, sched(dp)->datestamp,
+       qname = quote_string(dp->name);/*quote to take care of spaces*/
+       log_add(L_STATS, _("estimate %s %s %s %d [sec %ld nkb %lld ckb %lld kps %lu]"),
+               dp->host->hostname, qname, sched(dp)->datestamp,
                sched(dp)->level,
-               sched(dp)->est_time, (OFF_T_FMT_TYPE)sched(dp)->est_nsize, 
-                 (OFF_T_FMT_TYPE)sched(dp)->est_csize,
+               sched(dp)->est_time, (long long)sched(dp)->est_nsize, 
+                 (long long)sched(dp)->est_csize,
                sched(dp)->est_kps);
+       amfree(qname);
      }
  
      deallocate_bandwidth(dp->host->netif, sched(dp)->est_kps);
  
      size = holding_file_size(sched(dp)->destname, 0);
      h[activehd]->used = size - dummy;
-     holdalloc(h[activehd]->disk)->allocated_dumpers--;
+     h[activehd]->disk->allocated_dumpers--;
      adjust_diskspace(dp, DONE);
  
-     sched(dp)->attempted += 1;
+     sched(dp)->dump_attempted += 1;
  
      if((dumper->result != DONE || chunker->result != DONE) &&
-        sched(dp)->attempted <= 1) {
+        sched(dp)->dump_attempted <= 1) {
        delete_diskspace(dp);
-       enqueue_disk(&runq, dp);
+       if (sched(dp)->no_space) {
+           enqueue_disk(&directq, dp);
+       } else {
+           enqueue_disk(&runq, dp);
+       }
      }
      else if(size > (off_t)DISK_BLOCK_KB) {
-       sched(dp)->attempted = 0;
        enqueue_disk(&tapeq, dp);
-       startaflush();
      }
      else {
        delete_diskspace(dp);
       * or disk constraints.
       */
      start_some_dumps(&runq);
+     startaflush();
  }
  
  
@@@ -1468,8 -1728,8 +1736,8 @@@ handle_dumper_result
  
      assert(dumper != NULL);
      dp = dumper->dp;
-     assert(dp != NULL && sched(dp) != NULL);
+     assert(dp != NULL);
+     assert(sched(dp) != NULL);
      do {
  
        short_dump_state();
            /* result_argv[2] always contains the serial number */
            sdp = serial2disk(result_argv[2]);
            if (sdp != dp) {
-               error("%s: Invalid serial number: %s", get_pname(), result_argv[2]);
-               /*NOTREACHED*/
+               error(_("Invalid serial number %s"), result_argv[2]);
+                 g_assert_not_reached();
            }
        }
  
  
        case DONE: /* DONE <handle> <origsize> <dumpsize> <dumptime> <errstr> */
            if(result_argc != 6) {
-               error("error [dumper DONE result_argc != 6: %d]", result_argc);
+               error(_("error [dumper DONE result_argc != 6: %d]"), result_argc);
                /*NOTREACHED*/
            }
  
-           /*free_serial(result_argv[2]);*/
            sched(dp)->origsize = OFF_T_ATOI(result_argv[3]);
            sched(dp)->dumptime = TIME_T_ATOI(result_argv[5]);
  
-           printf("driver: finished-cmd time %s %s dumped %s:%s\n",
+           g_printf(_("driver: finished-cmd time %s %s dumped %s:%s\n"),
                   walltime_str(curclock()), dumper->name,
                   dp->host->hostname, qname);
            fflush(stdout);
             * Requeue this disk, and fall through to the FAILED
             * case for cleanup.
             */
-           if(sched(dp)->attempted) {
-               log_add(L_FAIL, "%s %s %s %d [too many dumper retry: %s]",
-                   dp->host->hostname, dp->name, sched(dp)->datestamp,
+           if(sched(dp)->dump_attempted) {
+               char *qname = quote_string(dp->name);
+               log_add(L_FAIL, _("%s %s %s %d [too many dumper retry: %s]"),
+                   dp->host->hostname, qname, sched(dp)->datestamp,
                    sched(dp)->level, result_argv[3]);
-               printf("driver: dump failed %s %s %s, too many dumper retry: %s\n",
-                       result_argv[2], dp->host->hostname, dp->name,
+               g_printf(_("driver: dump failed %s %s %s, too many dumper retry: %s\n"),
+                       result_argv[2], dp->host->hostname, qname,
                        result_argv[3]);
+               amfree(qname);
            }
            /* FALLTHROUGH */
        case FAILED: /* FAILED <handle> <errstr> */
  
        case BOGUS:
            /* either EOF or garbage from dumper.  Turn it off */
-           log_add(L_WARNING, "%s pid %ld is messed up, ignoring it.\n",
+           log_add(L_WARNING, _("%s pid %ld is messed up, ignoring it.\n"),
                    dumper->name, (long)dumper->pid);
            if (dumper->ev_read) {
                event_release(dumper->ev_read);
            dumper->down = 1;   /* mark it down so it isn't used again */
            if(dp) {
                /* if it was dumping something, zap it and try again */
-               if(sched(dp)->attempted) {
-               log_add(L_FAIL, "%s %s %s %d [%s died]",
+               if(sched(dp)->dump_attempted) {
+               log_add(L_FAIL, _("%s %s %s %d [%s died]"),
                        dp->host->hostname, qname, sched(dp)->datestamp,
                        sched(dp)->level, dumper->name);
                }
                else {
-               log_add(L_WARNING, "%s died while dumping %s:%s lev %d.",
+               log_add(L_WARNING, _("%s died while dumping %s:%s lev %d."),
                        dumper->name, dp->host->hostname, qname,
                        sched(dp)->level);
                }
          amfree(qname);
  
        /* send the dumper result to the chunker */
-       if(dumper->chunker->down == 0 && dumper->chunker->fd != -1 &&
-          dumper->chunker->result == LAST_TOK) {
-           if(cmd == DONE) {
-               chunker_cmd(dumper->chunker, DONE, dp);
+       if (dumper->chunker) {
+           if (dumper->chunker->down == 0 && dumper->chunker->fd != -1 &&
+               dumper->chunker->result == LAST_TOK) {
+               if (cmd == DONE) {
+                   chunker_cmd(dumper->chunker, DONE, dp);
+               }
+               else {
+                   chunker_cmd(dumper->chunker, FAILED, dp);
+               }
            }
-           else {
-               chunker_cmd(dumper->chunker, FAILED, dp);
+           if( dumper->result != LAST_TOK &&
+               dumper->chunker->result != LAST_TOK)
+               dumper_chunker_result(dp);
+       } else { /* send the dumper result to the taper */
+           if (taper_sendresult) {
+               if (cmd == DONE) {
+                   taper_cmd(DONE, driver_timestamp, NULL, 0, NULL);
+               } else {
+                   taper_cmd(FAILED, driver_timestamp, NULL, 0, NULL);
+               }
+               taper_sendresult = 0;
            }
        }
-       if(dumper->result != LAST_TOK && dumper->chunker->result != LAST_TOK)
-           dumper_result(dp);
+       if (taper_dumper && taper_result != LAST_TOK) {
+           dumper_taper_result(dp);
+       }
      } while(areads_dataready(dumper->fd));
  }
  
@@@ -1629,8 -1902,8 +1910,8 @@@ handle_chunker_result
            /* result_argv[2] always contains the serial number */
            sdp = serial2disk(result_argv[2]);
            if (sdp != dp) {
-               error("%s: Invalid serial number: %s", get_pname(), result_argv[2]);
-               /*NOTREACHED*/
+               error(_("Invalid serial number %s"), result_argv[2]);
+                 g_assert_not_reached();
            }
        }
  
        case PARTIAL: /* PARTIAL <handle> <dumpsize> <errstr> */
        case DONE: /* DONE <handle> <dumpsize> <errstr> */
            if(result_argc != 4) {
-               error("error [chunker %s result_argc != 4: %d]", cmdstr[cmd],
+               error(_("error [chunker %s result_argc != 4: %d]"), cmdstr[cmd],
                      result_argc);
                /*NOTREACHED*/
            }
            sched(dp)->dumpsize = (off_t)atof(result_argv[3]);
  
            qname = quote_string(dp->name);
-           printf("driver: finished-cmd time %s %s chunked %s:%s\n",
+           g_printf(_("driver: finished-cmd time %s %s chunked %s:%s\n"),
                   walltime_str(curclock()), chunker->name,
                   dp->host->hostname, qname);
            fflush(stdout);
  
        case NO_ROOM: /* NO-ROOM <handle> <missing_size> */
            if (!h || activehd < 0) { /* should never happen */
-               error("!h || activehd < 0");
+               error(_("!h || activehd < 0"));
                /*NOTREACHED*/
            }
            h[activehd]->used -= OFF_T_ATOI(result_argv[3]);
            h[activehd]->reserved -= OFF_T_ATOI(result_argv[3]);
-           holdalloc(h[activehd]->disk)->allocated_space -= OFF_T_ATOI(result_argv[3]);
+           h[activehd]->disk->allocated_space -= OFF_T_ATOI(result_argv[3]);
            h[activehd]->disk->disksize -= OFF_T_ATOI(result_argv[3]);
            break;
  
        case RQ_MORE_DISK: /* RQ-MORE-DISK <handle> */
            if (!h || activehd < 0) { /* should never happen */
-               error("!h || activehd < 0");
+               error(_("!h || activehd < 0"));
                /*NOTREACHED*/
            }
-           holdalloc(h[activehd]->disk)->allocated_dumpers--;
+           h[activehd]->disk->allocated_dumpers--;
            h[activehd]->used = h[activehd]->reserved;
            if( h[++activehd] ) { /* There's still some allocated space left.
                                   * Tell the dumper about it. */
  
        case BOGUS:
            /* either EOF or garbage from chunker.  Turn it off */
-           log_add(L_WARNING, "%s pid %ld is messed up, ignoring it.\n",
+           log_add(L_WARNING, _("%s pid %ld is messed up, ignoring it.\n"),
                    chunker->name, (long)chunker->pid);
  
            if(dp) {
                /* if it was dumping something, zap it and try again */
                if (!h || activehd < 0) { /* should never happen */
-                   error("!h || activehd < 0");
+                   error(_("!h || activehd < 0"));
                    /*NOTREACHED*/
                }
                qname = quote_string(dp->name);
-               if(sched(dp)->attempted) {
-                   log_add(L_FAIL, "%s %s %s %d [%s died]",
+               if(sched(dp)->dump_attempted) {
+                   log_add(L_FAIL, _("%s %s %s %d [%s died]"),
                            dp->host->hostname, qname, sched(dp)->datestamp,
                            sched(dp)->level, chunker->name);
                }
                else {
-                   log_add(L_WARNING, "%s died while dumping %s:%s lev %d.",
+                   log_add(L_WARNING, _("%s died while dumping %s:%s lev %d."),
                            chunker->name, dp->host->hostname, qname,
                            sched(dp)->level);
                }
        }
  
        if(chunker->result != LAST_TOK && chunker->dumper->result != LAST_TOK)
-           dumper_result(dp);
+           dumper_chunker_result(dp);
  
      } while(areads_dataready(chunker->fd));
  }
@@@ -1811,7 -2084,7 +2092,7 @@@ read_flush(void
  
        skip_whitespace(s, ch);                 /* find the command */
        if(ch == '\0') {
-           error("flush line %d: syntax error (no command)", line);
+           error(_("flush line %d: syntax error (no command)"), line);
            /*NOTREACHED*/
        }
        command = s - 1;
        }
  
        if(strcmp(command,"FLUSH") != 0) {
-           error("flush line %d: syntax error (%s != FLUSH)", line, command);
+           error(_("flush line %d: syntax error (%s != FLUSH)"), line, command);
            /*NOTREACHED*/
        }
  
        skip_whitespace(s, ch);                 /* find the hostname */
        if(ch == '\0') {
-           error("flush line %d: syntax error (no hostname)", line);
+           error(_("flush line %d: syntax error (no hostname)"), line);
            /*NOTREACHED*/
        }
        hostname = s - 1;
  
        skip_whitespace(s, ch);                 /* find the diskname */
        if(ch == '\0') {
-           error("flush line %d: syntax error (no diskname)", line);
+           error(_("flush line %d: syntax error (no diskname)"), line);
            /*NOTREACHED*/
        }
        qname = s - 1;
  
        skip_whitespace(s, ch);                 /* find the datestamp */
        if(ch == '\0') {
-           error("flush line %d: syntax error (no datestamp)", line);
+           error(_("flush line %d: syntax error (no datestamp)"), line);
            /*NOTREACHED*/
        }
        datestamp = s - 1;
  
        skip_whitespace(s, ch);                 /* find the level number */
        if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) {
-           error("flush line %d: syntax error (bad level)", line);
+           error(_("flush line %d: syntax error (bad level)"), line);
            /*NOTREACHED*/
        }
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);                 /* find the filename */
        if(ch == '\0') {
-           error("flush line %d: syntax error (no filename)", line);
+           error(_("flush line %d: syntax error (no filename)"), line);
            /*NOTREACHED*/
        }
        qdestname = s - 1;
        holding_file_get_dumpfile(destname, &file);
        if( file.type != F_DUMPFILE) {
            if( file.type != F_CONT_DUMPFILE )
-               log_add(L_INFO, "%s: ignoring cruft file.", destname);
+               log_add(L_INFO, _("%s: ignoring cruft file."), destname);
            amfree(diskname);
+           amfree(destname);
            continue;
        }
  
        if(strcmp(hostname, file.name) != 0 ||
           strcmp(diskname, file.disk) != 0 ||
           strcmp(datestamp, file.datestamp) != 0) {
-           log_add(L_INFO, "disk %s:%s not consistent with file %s",
+           log_add(L_INFO, _("disk %s:%s not consistent with file %s"),
                    hostname, diskname, destname);
            amfree(diskname);
+           amfree(destname);
            continue;
        }
        amfree(diskname);
        dp = lookup_disk(file.name, file.disk);
  
        if (dp == NULL) {
-           log_add(L_INFO, "%s: disk %s:%s not in database, skipping it.",
+           log_add(L_INFO, _("%s: disk %s:%s not in database, skipping it."),
                    destname, file.name, file.disk);
+           amfree(destname);
            continue;
        }
  
        if(file.dumplevel < 0 || file.dumplevel > 9) {
-           log_add(L_INFO, "%s: ignoring file with bogus dump level %d.",
+           log_add(L_INFO, _("%s: ignoring file with bogus dump level %d."),
                    destname, file.dumplevel);
+           amfree(destname);
            continue;
        }
  
        if (holding_file_size(destname,1) <= 0) {
            log_add(L_INFO, "%s: removing file with no data.", destname);
            holding_file_unlink(destname);
+           amfree(destname);
            continue;
        }
  
        flushhost->disks = dp1;
  
        sp = (sched_t *) alloc(SIZEOF(sched_t));
-       sp->destname = stralloc(destname);
+       sp->destname = destname;
        sp->level = file.dumplevel;
        sp->dumpdate = NULL;
        sp->degr_dumpdate = NULL;
        sp->est_kps = 10;
        sp->priority = 0;
        sp->degr_level = -1;
-       sp->attempted = 0;
+       sp->dump_attempted = 0;
+       sp->taper_attempted = 0;
        sp->act_size = holding_file_size(destname, 0);
        sp->holdp = build_diskspace(destname);
        if(sp->holdp == NULL) continue;
@@@ -1973,10 -2252,11 +2260,11 @@@ read_schedule
      int ch;
      off_t flush_size = (off_t)0;
      char *qname = NULL;
-     OFF_T_FMT_TYPE nsize_;
-     OFF_T_FMT_TYPE csize_;
-     OFF_T_FMT_TYPE degr_nsize_;
-     OFF_T_FMT_TYPE degr_csize_;
+     long long time_;
+     long long nsize_;
+     long long csize_;
+     long long degr_nsize_;
+     long long degr_csize_;
  
      (void)cookie;     /* Quiet unused parameter warning */
  
  
        skip_whitespace(s, ch);                 /* find the command */
        if(ch == '\0') {
-           error("schedule line %d: syntax error (no command)", line);
+           error(_("schedule line %d: syntax error (no command)"), line);
            /*NOTREACHED*/
        }
        command = s - 1;
        s[-1] = '\0';
  
        if(strcmp(command,"DUMP") != 0) {
-           error("schedule line %d: syntax error (%s != DUMP)", line, command);
+           error(_("schedule line %d: syntax error (%s != DUMP)"), line, command);
            /*NOTREACHED*/
        }
  
        skip_whitespace(s, ch);                 /* find the host name */
        if(ch == '\0') {
-           error("schedule line %d: syntax error (no host name)", line);
+           error(_("schedule line %d: syntax error (no host name)"), line);
            /*NOTREACHED*/
        }
        hostname = s - 1;
  
        skip_whitespace(s, ch);                 /* find the feature list */
        if(ch == '\0') {
-           error("schedule line %d: syntax error (no feature list)", line);
+           error(_("schedule line %d: syntax error (no feature list)"), line);
            /*NOTREACHED*/
        }
        features = s - 1;
  
        skip_whitespace(s, ch);                 /* find the disk name */
        if(ch == '\0') {
-           error("schedule line %d: syntax error (no disk name)", line);
+           error(_("schedule line %d: syntax error (no disk name)"), line);
            /*NOTREACHED*/
        }
        qname = s - 1;
  
        skip_whitespace(s, ch);                 /* find the datestamp */
        if(ch == '\0') {
-           error("schedule line %d: syntax error (no datestamp)", line);
+           error(_("schedule line %d: syntax error (no datestamp)"), line);
            /*NOTREACHED*/
        }
        datestamp = s - 1;
  
        skip_whitespace(s, ch);                 /* find the priority number */
        if(ch == '\0' || sscanf(s - 1, "%d", &priority) != 1) {
-           error("schedule line %d: syntax error (bad priority)", line);
+           error(_("schedule line %d: syntax error (bad priority)"), line);
            /*NOTREACHED*/
        }
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);                 /* find the level number */
        if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) {
-           error("schedule line %d: syntax error (bad level)", line);
+           error(_("schedule line %d: syntax error (bad level)"), line);
            /*NOTREACHED*/
        }
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);                 /* find the dump date */
        if(ch == '\0') {
-           error("schedule line %d: syntax error (bad dump date)", line);
+           error(_("schedule line %d: syntax error (bad dump date)"), line);
            /*NOTREACHED*/
        }
        dumpdate = s - 1;
        s[-1] = '\0';
  
        skip_whitespace(s, ch);                 /* find the native size */
-       nsize_ = (OFF_T_FMT_TYPE)0;
-       if(ch == '\0' || sscanf(s - 1, OFF_T_FMT, &nsize_) != 1) {
-           error("schedule line %d: syntax error (bad nsize)", line);
+       nsize_ = (off_t)0;
+       if(ch == '\0' || sscanf(s - 1, "%lld", &nsize_) != 1) {
+           error(_("schedule line %d: syntax error (bad nsize)"), line);
            /*NOTREACHED*/
        }
        nsize = (off_t)nsize_;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);                 /* find the compressed size */
-       csize_ = (OFF_T_FMT_TYPE)0;
-       if(ch == '\0' || sscanf(s - 1, OFF_T_FMT, &csize_) != 1) {
-           error("schedule line %d: syntax error (bad csize)", line);
+       csize_ = (off_t)0;
+       if(ch == '\0' || sscanf(s - 1, "%lld", &csize_) != 1) {
+           error(_("schedule line %d: syntax error (bad csize)"), line);
            /*NOTREACHED*/
        }
        csize = (off_t)csize_;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);                 /* find the time number */
-       if(ch == '\0' || sscanf(s - 1, TIME_T_FMT,
-                               (TIME_T_FMT_TYPE *)time_p) != 1) {
-           error("schedule line %d: syntax error (bad estimated time)", line);
+       if(ch == '\0' || sscanf(s - 1, "%lld", &time_) != 1) {
+           error(_("schedule line %d: syntax error (bad estimated time)"), line);
            /*NOTREACHED*/
        }
+       *time_p = (time_t)time_;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);                 /* find the kps number */
        if(ch == '\0' || sscanf(s - 1, "%lu", &kps) != 1) {
-           error("schedule line %d: syntax error (bad kps)", line);
+           error(_("schedule line %d: syntax error (bad kps)"), line);
            continue;
        }
        skip_integer(s, ch);
        skip_whitespace(s, ch);                 /* find the degr level number */
        if(ch != '\0') {
            if(sscanf(s - 1, "%d", &degr_level) != 1) {
-               error("schedule line %d: syntax error (bad degr level)", line);
+               error(_("schedule line %d: syntax error (bad degr level)"), line);
                /*NOTREACHED*/
            }
            skip_integer(s, ch);
  
            skip_whitespace(s, ch);             /* find the degr dump date */
            if(ch == '\0') {
-               error("schedule line %d: syntax error (bad degr dump date)", line);
+               error(_("schedule line %d: syntax error (bad degr dump date)"), line);
                /*NOTREACHED*/
            }
            degr_dumpdate = s - 1;
            s[-1] = '\0';
  
            skip_whitespace(s, ch);             /* find the degr native size */
-           degr_nsize_ = (OFF_T_FMT_TYPE)0;
-           if(ch == '\0'  || sscanf(s - 1, OFF_T_FMT, &degr_nsize_) != 1) {
-               error("schedule line %d: syntax error (bad degr nsize)", line);
+           degr_nsize_ = (off_t)0;
+           if(ch == '\0'  || sscanf(s - 1, "%lld", &degr_nsize_) != 1) {
+               error(_("schedule line %d: syntax error (bad degr nsize)"), line);
                /*NOTREACHED*/
            }
            degr_nsize = (off_t)degr_nsize_;
            skip_integer(s, ch);
  
            skip_whitespace(s, ch);             /* find the degr compressed size */
-           degr_csize_ = (OFF_T_FMT_TYPE)0;
-           if(ch == '\0'  || sscanf(s - 1, OFF_T_FMT, &degr_csize_) != 1) {
-               error("schedule line %d: syntax error (bad degr csize)", line);
+           degr_csize_ = (off_t)0;
+           if(ch == '\0'  || sscanf(s - 1, "%lld", &degr_csize_) != 1) {
+               error(_("schedule line %d: syntax error (bad degr csize)"), line);
                /*NOTREACHED*/
            }
            degr_csize = (off_t)degr_csize_;
            skip_integer(s, ch);
  
            skip_whitespace(s, ch);             /* find the degr time number */
-           if(ch == '\0' || sscanf(s - 1, TIME_T_FMT,
-                               (TIME_T_FMT_TYPE *)degr_time_p) != 1) {
-               error("schedule line %d: syntax error (bad degr estimated time)", line);
+           if(ch == '\0' || sscanf(s - 1, "%lld", &time_) != 1) {
+               error(_("schedule line %d: syntax error (bad degr estimated time)"), line);
                /*NOTREACHED*/
            }
+           *degr_time_p = (time_t)time_;
            skip_integer(s, ch);
  
            skip_whitespace(s, ch);             /* find the degr kps number */
            if(ch == '\0' || sscanf(s - 1, "%lu", &degr_kps) != 1) {
-               error("schedule line %d: syntax error (bad degr kps)", line);
+               error(_("schedule line %d: syntax error (bad degr kps)"), line);
                /*NOTREACHED*/
            }
            skip_integer(s, ch);
        dp = lookup_disk(hostname, diskname);
        if(dp == NULL) {
            log_add(L_WARNING,
-                   "schedule line %d: %s:'%s' not in disklist, ignored",
+                   _("schedule line %d: %s:'%s' not in disklist, ignored"),
                    line, hostname, qname);
            amfree(diskname);
            continue;
        }
        /*@end@*/
  
-       sp->attempted = 0;
-       sp->act_size = (off_t)0;
+       sp->dump_attempted = 0;
+       sp->taper_attempted = 0;
+       sp->act_size = 0;
        sp->holdp = NULL;
        sp->activehd = -1;
        sp->dumper = NULL;
            dp->host->features = am_string_to_feature(features);
        }
        remove_disk(&waitq, dp);
-       enqueue_disk(&runq, dp);
+       if (dp->to_holdingdisk == HOLD_NEVER) {
+           enqueue_disk(&directq, dp);
+       } else {
+           enqueue_disk(&runq, dp);
+       }
        flush_size += sp->act_size;
        amfree(diskname);
      }
-     printf("driver: flush size " OFF_T_FMT "\n", (OFF_T_FMT_TYPE)flush_size);
+     g_printf(_("driver: flush size %lld\n"), (long long)flush_size);
      amfree(inpline);
      if(line == 0)
-       log_add(L_WARNING, "WARNING: got empty schedule from planner");
+       log_add(L_WARNING, _("WARNING: got empty schedule from planner"));
      if(need_degraded==1) start_degraded_mode(&runq);
+     schedule_done = 1;
      start_some_dumps(&runq);
  }
  
  static unsigned long
  free_kps(
-     interface_t *ip)
+     netif_t *ip)
  {
      unsigned long res;
  
-     if (ip == (interface_t *)0) {
-       interface_t *p;
+     if (ip == NULL) {
+       netif_t *p;
        unsigned long maxusage=0;
        unsigned long curusage=0;
-       for(p = lookup_interface(NULL); p != NULL; p = p->next) {
-           maxusage += interface_get_maxusage(p);
+       for(p = disklist_netifs(); p != NULL; p = p->next) {
+           maxusage += interface_get_maxusage(p->config);
            curusage += p->curusage;
        }
        if (maxusage >= curusage)
            res = 0;
  #ifndef __lint
      } else {
-       if ((unsigned long)interface_get_maxusage(ip) >= ip->curusage)
-           res = interface_get_maxusage(ip) - ip->curusage;
+       if ((unsigned long)interface_get_maxusage(ip->config) >= ip->curusage)
+           res = interface_get_maxusage(ip->config) - ip->curusage;
        else
            res = 0;
  #endif
@@@ -2255,19 -2541,19 +2549,19 @@@ static voi
  interface_state(
      char *time_str)
  {
-     interface_t *ip;
+     netif_t *ip;
  
-     printf("driver: interface-state time %s", time_str);
+     g_printf(_("driver: interface-state time %s"), time_str);
  
-     for(ip = lookup_interface(NULL); ip != NULL; ip = ip->next) {
-       printf(" if %s: free %lu", ip->name, free_kps(ip));
+     for(ip = disklist_netifs(); ip != NULL; ip = ip->next) {
+       g_printf(_(" if %s: free %lu"), interface_name(ip->config), free_kps(ip));
      }
-     printf("\n");
+     g_printf("\n");
  }
  
  static void
  allocate_bandwidth(
-     interface_t *     ip,
+     netif_t *         ip,
      unsigned long     kps)
  {
      ip->curusage += kps;
  
  static void
  deallocate_bandwidth(
-     interface_t *     ip,
+     netif_t *         ip,
      unsigned long     kps)
  {
      assert(kps <= ip->curusage);
  static off_t
  free_space(void)
  {
-     holdingdisk_t *hdp;
+     holdalloc_t *ha;
      off_t total_free;
      off_t diff;
  
      total_free = (off_t)0;
-     for(hdp = getconf_holdingdisks(); hdp != NULL; hdp = hdp->next) {
-       diff = hdp->disksize - holdalloc(hdp)->allocated_space;
+     for(ha = holdalloc; ha != NULL; ha = ha->next) {
+       diff = ha->disksize - ha->allocated_space;
        if(diff > (off_t)0)
            total_free += diff;
      }
@@@ -2315,8 -2601,8 +2609,8 @@@ find_diskspace
      assignedhd_t *    pref)
  {
      assignedhd_t **result = NULL;
-     holdingdisk_t *minp, *hdp;
-     int i=0, num_holdingdisks=0; /* are we allowed to use the global thing? */
+     holdalloc_t *ha, *minp;
+     int i=0;
      int j, minj;
      char *used;
      off_t halloc, dalloc, hfree, dfree;
        size = 2*DISK_BLOCK_KB;
      size = am_round(size, (off_t)DISK_BLOCK_KB);
  
-     hold_debug(1, ("%s: want " OFF_T_FMT " K\n",
-                  debug_prefix_time(": find_diskspace"),
-                  (OFF_T_FMT_TYPE)size));
+     hold_debug(1, _("find_diskspace: want %lld K\n"),
+                  (long long)size);
  
-     for(hdp = getconf_holdingdisks(); hdp != NULL; hdp = hdp->next) {
-       num_holdingdisks++;
-     }
-     used = alloc(SIZEOF(*used) * num_holdingdisks);/*disks used during this run*/
-     memset( used, 0, (size_t)num_holdingdisks );
-     result = alloc(SIZEOF(assignedhd_t *) * (num_holdingdisks + 1));
+     used = alloc(SIZEOF(*used) * num_holdalloc);/*disks used during this run*/
+     memset( used, 0, (size_t)num_holdalloc );
+     result = alloc(SIZEOF(assignedhd_t *) * (num_holdalloc + 1));
      result[0] = NULL;
  
-     while( i < num_holdingdisks && size > (off_t)0 ) {
+     while( i < num_holdalloc && size > (off_t)0 ) {
        /* find the holdingdisk with the fewest active dumpers and among
         * those the one with the biggest free space
         */
        minp = NULL; minj = -1;
-       for(j = 0, hdp = getconf_holdingdisks(); hdp != NULL; hdp = hdp->next, j++ ) {
-           if( pref && pref->disk == hdp && !used[j] &&
-               holdalloc(hdp)->allocated_space <= hdp->disksize - (off_t)DISK_BLOCK_KB) {
-               minp = hdp;
+       for(j = 0, ha = holdalloc; ha != NULL; ha = ha->next, j++ ) {
+           if( pref && pref->disk == ha && !used[j] &&
+               ha->allocated_space <= ha->disksize - (off_t)DISK_BLOCK_KB) {
+               minp = ha;
                minj = j;
                break;
            }
-           else if( holdalloc(hdp)->allocated_space <= hdp->disksize - (off_t)(2*DISK_BLOCK_KB) &&
+           else if( ha->allocated_space <= ha->disksize - (off_t)(2*DISK_BLOCK_KB) &&
                !used[j] &&
                (!minp ||
-                holdalloc(hdp)->allocated_dumpers < holdalloc(minp)->allocated_dumpers ||
-                (holdalloc(hdp)->allocated_dumpers == holdalloc(minp)->allocated_dumpers &&
-                 hdp->disksize-holdalloc(hdp)->allocated_space > minp->disksize-holdalloc(minp)->allocated_space)) ) {
-               minp = hdp;
+                ha->allocated_dumpers < minp->allocated_dumpers ||
+                (ha->allocated_dumpers == minp->allocated_dumpers &&
+                 ha->disksize-ha->allocated_space > minp->disksize-minp->allocated_space)) ) {
+               minp = ha;
                minj = j;
            }
        }
        used[minj] = 1;
  
        /* hfree = free space on the disk */
-       hfree = minp->disksize - holdalloc(minp)->allocated_space;
+       hfree = minp->disksize - minp->allocated_space;
  
        /* dfree = free space for data, remove 1 header for each chunksize */
-       dfree = hfree - (((hfree-(off_t)1)/holdingdisk_get_chunksize(minp))+(off_t)1) * (off_t)DISK_BLOCK_KB;
+       dfree = hfree - (((hfree-(off_t)1)/holdingdisk_get_chunksize(minp->hdisk))+(off_t)1) * (off_t)DISK_BLOCK_KB;
  
        /* dalloc = space I can allocate for data */
        dalloc = ( dfree < size ) ? dfree : size;
  
        /* halloc = space to allocate, including 1 header for each chunksize */
-       halloc = dalloc + (((dalloc-(off_t)1)/holdingdisk_get_chunksize(minp))+(off_t)1) * (off_t)DISK_BLOCK_KB;
-       hold_debug(1, ("%s: find diskspace: size " OFF_T_FMT " hf " OFF_T_FMT
-                      " df " OFF_T_FMT " da " OFF_T_FMT " ha " OFF_T_FMT"\n",
-                      debug_prefix_time(": find_diskspace"),
-                      (OFF_T_FMT_TYPE)size,
-                      (OFF_T_FMT_TYPE)hfree,
-                      (OFF_T_FMT_TYPE)dfree,
-                      (OFF_T_FMT_TYPE)dalloc,
-                      (OFF_T_FMT_TYPE)halloc));
+       halloc = dalloc + (((dalloc-(off_t)1)/holdingdisk_get_chunksize(minp->hdisk))+(off_t)1) * (off_t)DISK_BLOCK_KB;
+       hold_debug(1, _("find_diskspace: find diskspace: size %lld hf %lld df %lld da %lld ha %lld\n"),
+                      (long long)size,
+                      (long long)hfree,
+                      (long long)dfree,
+                      (long long)dalloc,
+                      (long long)halloc);
        size -= dalloc;
        result[i] = alloc(SIZEOF(assignedhd_t));
        result[i]->disk = minp;
        result[i]->destname = NULL;
        result[i+1] = NULL;
        i++;
-     } /* while i < num_holdingdisks && size > 0 */
+     }
      amfree(used);
  
      if(size != (off_t)0) { /* not enough space available */
-       printf("find diskspace: not enough diskspace. Left with "
-              OFF_T_FMT " K\n", (OFF_T_FMT_TYPE)size);
+       g_printf(_("find diskspace: not enough diskspace. Left with %lld K\n"), (long long)size);
        fflush(stdout);
        free_assignedhd(result);
        result = NULL;
  
      if (debug_holding > 1) {
        for( i = 0; result && result[i]; i++ ) {
-           hold_debug(1, ("%s: find diskspace: selected %s free " OFF_T_FMT
-                          " reserved " OFF_T_FMT " dumpers %d\n",
-                          debug_prefix_time(": find_diskspace"),
-                          holdingdisk_get_diskdir(result[i]->disk),
-                          (OFF_T_FMT_TYPE)(result[i]->disk->disksize -
-                            holdalloc(result[i]->disk)->allocated_space),
-                          (OFF_T_FMT_TYPE)result[i]->reserved,
-                          holdalloc(result[i]->disk)->allocated_dumpers));
+           hold_debug(1, _("find_diskspace: find diskspace: selected %s free %lld reserved %lld dumpers %d\n"),
+                          holdingdisk_get_diskdir(result[i]->disk->hdisk),
+                          (long long)(result[i]->disk->disksize -
+                            result[i]->disk->allocated_space),
+                          (long long)result[i]->reserved,
+                          result[i]->disk->allocated_dumpers);
        }
      }
  
@@@ -2434,7 -2710,7 +2718,7 @@@ assign_holdingdisk
      assignedhd_t **new_holdp;
      char *qname;
  
-     snprintf( lvl, SIZEOF(lvl), "%d", sched(diskp)->level );
+     g_snprintf( lvl, SIZEOF(lvl), "%d", sched(diskp)->level );
  
      size = am_round(sched(diskp)->est_size - sched(diskp)->act_size,
                    (off_t)DISK_BLOCK_KB);
        l=j;
        if( sched(diskp)->holdp[j-1]->disk == holdp[0]->disk ) { /* Yes! */
            sched(diskp)->holdp[j-1]->reserved += holdp[0]->reserved;
-           holdalloc(holdp[0]->disk)->allocated_space += holdp[0]->reserved;
+           holdp[0]->disk->allocated_space += holdp[0]->reserved;
            size = (holdp[0]->reserved>size) ? (off_t)0 : size-holdp[0]->reserved;
            qname = quote_string(diskp->name);
-           hold_debug(1, ("%s: merging holding disk %s to disk %s:%s, add "
-                          OFF_T_FMT " for reserved " OFF_T_FMT ", left "
-                          OFF_T_FMT "\n",
-                          debug_prefix_time(": assign_holdingdisk"),
+           hold_debug(1, _("assign_holdingdisk: merging holding disk %s to disk %s:%s, add %lld for reserved %lld, left %lld\n"),
                           holdingdisk_get_diskdir(
-                                              sched(diskp)->holdp[j-1]->disk),
+                                              sched(diskp)->holdp[j-1]->disk->hdisk),
                           diskp->host->hostname, qname,
-                          (OFF_T_FMT_TYPE)holdp[0]->reserved,
-                          (OFF_T_FMT_TYPE)sched(diskp)->holdp[j-1]->reserved,
-                          (OFF_T_FMT_TYPE)size));
+                          (long long)holdp[0]->reserved,
+                          (long long)sched(diskp)->holdp[j-1]->reserved,
+                          (long long)size);
            i++;
            amfree(qname);
            amfree(holdp[0]);
      /* copy assignedhd_s to sched(diskp), adjust allocated_space */
      for( ; holdp[i]; i++ ) {
        holdp[i]->destname = newvstralloc( holdp[i]->destname,
-                                          holdingdisk_get_diskdir(holdp[i]->disk), "/",
+                                          holdingdisk_get_diskdir(holdp[i]->disk->hdisk), "/",
                                           hd_driver_timestamp, "/",
                                           diskp->host->hostname, ".",
                                           sfn, ".",
                                           lvl, NULL );
        sched(diskp)->holdp[j++] = holdp[i];
-       holdalloc(holdp[i]->disk)->allocated_space += holdp[i]->reserved;
+       holdp[i]->disk->allocated_space += holdp[i]->reserved;
        size = (holdp[i]->reserved > size) ? (off_t)0 :
                  (size - holdp[i]->reserved);
        qname = quote_string(diskp->name);
        hold_debug(1,
-                  ("%s: %d assigning holding disk %s to disk %s:%s, reserved "
-                     OFF_T_FMT ", left " OFF_T_FMT "\n",
-                   debug_prefix_time(": assign_holdingdisk"),
-                   i, holdingdisk_get_diskdir(holdp[i]->disk),
+                  _("assign_holdingdisk: %d assigning holding disk %s to disk %s:%s, reserved %lld, left %lld\n"),
+                   i, holdingdisk_get_diskdir(holdp[i]->disk->hdisk),
                    diskp->host->hostname, qname,
-                   (OFF_T_FMT_TYPE)holdp[i]->reserved,
-                   (OFF_T_FMT_TYPE)size));
+                   (long long)holdp[i]->reserved,
+                   (long long)size);
        amfree(qname);
        holdp[i] = NULL; /* so it doesn't get free()d... */
      }
@@@ -2524,9 -2795,8 +2803,8 @@@ adjust_diskspace
  
      qname = quote_string(diskp->name);
      qdest = quote_string(sched(diskp)->destname);
-     hold_debug(1, ("%s: %s:%s %s\n",
-                  debug_prefix_time(": adjust_diskspace"),
-                  diskp->host->hostname, qname, qdest));
+     hold_debug(1, _("adjust_diskspace: %s:%s %s\n"),
+                  diskp->host->hostname, qname, qdest);
  
      holdp = sched(diskp)->holdp;
  
      for( i = 0; holdp[i]; i++ ) { /* for each allocated disk */
        diff = holdp[i]->used - holdp[i]->reserved;
        total += holdp[i]->used;
-       holdalloc(holdp[i]->disk)->allocated_space += diff;
-       hqname = quote_string(holdp[i]->disk->name);
-       hold_debug(1, ("%s: hdisk %s done, reserved " OFF_T_FMT " used "
-                      OFF_T_FMT " diff " OFF_T_FMT " alloc " OFF_T_FMT
-                      " dumpers %d\n",
-                      debug_prefix_time(": adjust_diskspace"),
-                      holdp[i]->disk->name,
-                      (OFF_T_FMT_TYPE)holdp[i]->reserved,
-                      (OFF_T_FMT_TYPE)holdp[i]->used,
-                      (OFF_T_FMT_TYPE)diff,
-                      (OFF_T_FMT_TYPE)holdalloc(holdp[i]->disk)
-                                                            ->allocated_space,
-                      holdalloc(holdp[i]->disk)->allocated_dumpers ));
+       holdp[i]->disk->allocated_space += diff;
+       hqname = quote_string(holdingdisk_name(holdp[i]->disk->hdisk));
+       hold_debug(1, _("adjust_diskspace: hdisk %s done, reserved %lld used %lld diff %lld alloc %lld dumpers %d\n"),
+                      holdingdisk_name(holdp[i]->disk->hdisk),
+                      (long long)holdp[i]->reserved,
+                      (long long)holdp[i]->used,
+                      (long long)diff,
+                      (long long)holdp[i]->disk->allocated_space,
+                      holdp[i]->disk->allocated_dumpers );
        holdp[i]->reserved += diff;
        amfree(hqname);
      }
  
      sched(diskp)->act_size = total;
  
-     hold_debug(1, ("%s: after: disk %s:%s used " OFF_T_FMT "\n",
-                  debug_prefix_time(": adjust_diskspace"),
+     hold_debug(1, _("adjust_diskspace: after: disk %s:%s used %lld\n"),
                   diskp->host->hostname, qname,
-                  (OFF_T_FMT_TYPE)sched(diskp)->act_size));
+                  (long long)sched(diskp)->act_size);
      amfree(qdest);
      amfree(qname);
  }
@@@ -2577,7 -2842,7 +2850,7 @@@ delete_diskspace
        /* find all files of this dump on that disk, and subtract their
         * reserved sizes from the disk's allocated space
         */
-       holdalloc(holdp[i]->disk)->allocated_space -= holdp[i]->used;
+       holdp[i]->disk->allocated_space -= holdp[i]->used;
      }
  
      holding_file_unlink(holdp[0]->destname);  /* no need for the entire list,
@@@ -2599,21 -2864,17 +2872,17 @@@ build_diskspace
      char buffer[DISK_BLOCK_BYTES];
      dumpfile_t file;
      assignedhd_t **result;
-     holdingdisk_t *hdp;
+     holdalloc_t *ha;
      off_t *used;
-     int num_holdingdisks=0;
      char dirname[1000], *ch;
      struct stat finfo;
      char *filename = destname;
  
      memset(buffer, 0, sizeof(buffer));
-     for(hdp = getconf_holdingdisks(); hdp != NULL; hdp = hdp->next) {
-         num_holdingdisks++;
-     }
-     used = alloc(SIZEOF(off_t) * num_holdingdisks);
-     for(i=0;i<num_holdingdisks;i++)
+     used = alloc(SIZEOF(off_t) * num_holdalloc);
+     for(i=0;i<num_holdalloc;i++)
        used[i] = (off_t)0;
-     result = alloc(SIZEOF(assignedhd_t *) * (num_holdingdisks + 1));
+     result = alloc(SIZEOF(assignedhd_t *) * (num_holdalloc + 1));
      result[0] = NULL;
      while(filename != NULL && filename[0] != '\0') {
        strncpy(dirname, filename, 999);
        ch = strrchr(dirname,'/');
          *ch = '\0';
  
-       for(j = 0, hdp = getconf_holdingdisks(); hdp != NULL;
-                                                hdp = hdp->next, j++ ) {
-           if(strcmp(dirname, holdingdisk_get_diskdir(hdp))==0) {
+       for(j = 0, ha = holdalloc; ha != NULL; ha = ha->next, j++ ) {
+           if(strcmp(dirname, holdingdisk_get_diskdir(ha->hdisk))==0) {
                break;
            }
        }
  
        if(stat(filename, &finfo) == -1) {
-           fprintf(stderr, "stat %s: %s\n", filename, strerror(errno));
+           g_fprintf(stderr, _("stat %s: %s\n"), filename, strerror(errno));
            finfo.st_size = (off_t)0;
        }
        used[j] += ((off_t)finfo.st_size+(off_t)1023)/(off_t)1024;
        if((fd = open(filename,O_RDONLY)) == -1) {
-           fprintf(stderr,"build_diskspace: open of %s failed: %s\n",
+           g_fprintf(stderr,_("build_diskspace: open of %s failed: %s\n"),
                    filename, strerror(errno));
            return NULL;
        }
        filename = file.cont_filename;
      }
  
-     for(j = 0, i=0, hdp = getconf_holdingdisks(); hdp != NULL;
-                                                 hdp = hdp->next, j++ ) {
+     for(j = 0, i=0, ha = holdalloc; ha != NULL; ha = ha->next, j++ ) {
        if(used[j] != (off_t)0) {
            result[i] = alloc(SIZEOF(assignedhd_t));
-           result[i]->disk = hdp;
+           result[i]->disk = ha;
            result[i]->reserved = used[j];
            result[i]->used = used[j];
            result[i]->destname = stralloc(destname);
@@@ -2668,18 -2927,18 +2935,18 @@@ static voi
  holdingdisk_state(
      char *    time_str)
  {
-     holdingdisk_t *hdp;
+     holdalloc_t *ha;
      int dsk;
      off_t diff;
  
-     printf("driver: hdisk-state time %s", time_str);
+     g_printf(_("driver: hdisk-state time %s"), time_str);
  
-     for(hdp = getconf_holdingdisks(), dsk = 0; hdp != NULL; hdp = hdp->next, dsk++) {
-       diff = hdp->disksize - holdalloc(hdp)->allocated_space;
-       printf(" hdisk %d: free " OFF_T_FMT " dumpers %d", dsk,
-              (OFF_T_FMT_TYPE)diff, holdalloc(hdp)->allocated_dumpers);
+     for(ha = holdalloc, dsk = 0; ha != NULL; ha = ha->next, dsk++) {
+       diff = ha->disksize - ha->allocated_space;
+       g_printf(_(" hdisk %d: free %lld dumpers %d"), dsk,
+              (long long)diff, ha->allocated_dumpers);
      }
-     printf("\n");
+     g_printf("\n");
  }
  
  static void
@@@ -2702,25 -2961,18 +2969,18 @@@ update_failed_dump_to_tape
  }
  
  /* ------------------- */
- static int
+ static void
  dump_to_tape(
      disk_t *  dp)
  {
      dumper_t *dumper;
-     int failed = 0;
-     off_t filenum;
-     off_t origsize = (off_t)0;
-     off_t dumpsize = (off_t)0;
-     time_t dumptime = (time_t)0;
-     double tapetime = 0.0;
      cmd_t cmd;
 -    int result_argc;
 +    int result_argc, rc;
      char *result_argv[MAX_ARGS+1];
-     int dumper_tryagain = 0;
      char *qname;
  
      qname = quote_string(dp->name);
-     printf("driver: dumping %s:%s directly to tape\n",
+     g_printf(_("driver: dumping %s:%s directly to tape\n"),
           dp->host->hostname, qname);
      fflush(stdout);
  
  
      dumper = idle_dumper();
      if (!dumper) {
-       printf("driver: no idle dumpers for %s:%s.\n"
+       g_printf(_("driver: no idle dumpers for %s:%s.\n")
                dp->host->hostname, qname);
        fflush(stdout);
-       log_add(L_WARNING, "no idle dumpers for %s:%s.\n",
+       log_add(L_WARNING, _("no idle dumpers for %s:%s.\n"),
                dp->host->hostname, qname);
          amfree(qname);
-       return 2;       /* fatal problem */
+       return; /* fatal problem */
      }
  
      /* tell the taper to read from a port number of its choice */
      taper_cmd(PORT_WRITE, dp, NULL, sched(dp)->level, sched(dp)->datestamp);
      cmd = getresult(taper, 1, &result_argc, result_argv, MAX_ARGS+1);
      if(cmd != PORT) {
-       printf("driver: did not get PORT from taper for %s:%s\n",
+       g_printf(_("driver: did not get PORT from taper for %s:%s\n"),
                dp->host->hostname, qname);
        fflush(stdout);
+       log_add(L_WARNING, _("driver: did not get PORT from taper for %s:%s.\n"),
+               dp->host->hostname, qname);
          amfree(qname);
-       return 2;       /* fatal problem */
+       return; /* fatal problem */
      }
+     amfree(qname);
      /* copy port number */
      dumper->output_port = atoi(result_argv[2]);
  
-     /* tell the dumper to dump to a port */
+     dumper->dp = dp;
+     dumper->chunker = NULL;
+     dumper->result = LAST_TOK;
+     taper_result = LAST_TOK;
+     sched(dp)->dumper = dumper;
  
+     /* tell the dumper to dump to a port */
      dumper_cmd(dumper, PORT_DUMP, dp);
      dp->host->start_t = time(NULL) + 15;
  
      /* update statistics & print state */
  
      taper_busy = dumper->busy = 1;
+     taper_input_error = NULL;
+     taper_tape_error = NULL;
+     taper_dumper = dumper;
+     taper_disk = dp;
+     taper_input_error = NULL;
+     taper_tape_error = NULL;
+     taper_first_label = NULL;
+     taper_written = 0;
+     taper_state |= TAPER_STATE_DUMP_TO_TAPE;
+     sched(dp)->act_size = sched(dp)->est_size;
      dp->host->inprogress += 1;
      dp->inprogress = 1;
      sched(dp)->timestamp = time((time_t *)0);
  
      short_dump_state();
  
-     /* wait for result from dumper */
-     cmd = getresult(dumper->fd, 1, &result_argc, result_argv, MAX_ARGS+1);
-     switch(cmd) {
-     case BOGUS:
-       /* either eof or garbage from dumper */
-       log_add(L_WARNING, "%s pid %ld is messed up, ignoring it.\n",
-               dumper->name, (long)dumper->pid);
-       dumper->down = 1;       /* mark it down so it isn't used again */
-       failed = 1;     /* dump failed, must still finish up with taper */
-       break;
-     case DONE: /* DONE <handle> <origsize> <dumpsize> <dumptime> <errstr> */
-       /* everything went fine */
-       origsize = (off_t)atof(result_argv[3]);
-       /*dumpsize = (off_t)atof(result_argv[4]);*/
-       dumptime = (time_t)atof(result_argv[5]);
-       break;
-     case NO_ROOM: /* NO-ROOM <handle> */
-       dumper_cmd(dumper, ABORT, dp);
-       cmd = getresult(dumper->fd, 1, &result_argc, result_argv, MAX_ARGS+1);
-       assert(cmd == ABORT_FINISHED);
-     case TRYAGAIN: /* TRY-AGAIN <handle> <errstr> */
-     default:
-       /* dump failed, but we must still finish up with taper */
-       /* problem with dump, possibly nonfatal, retry one time */
-       sched(dp)->attempted++;
-       failed = sched(dp)->attempted;
-       dumper_tryagain = 1;
-       break;
-       
-     case FAILED: /* FAILED <handle> <errstr> */
-       /* dump failed, but we must still finish up with taper */
-       failed = 2;     /* fatal problem with dump */
-       break;
-     }
-     /*
-      * Note that at this point, even if the dump above failed, it may
-      * not be a fatal failure if taper below says we can try again.
-      * E.g. a dumper failure above may actually be the result of a
-      * tape overflow, which in turn causes dump to see "broken pipe",
-      * "no space on device", etc., since taper closed the port first.
-      */
-     continue_port_dump:
-     cmd = getresult(taper, 1, &result_argc, result_argv, MAX_ARGS+1);
-     switch(cmd) {
-     case PARTIAL:
-     case DONE: /* DONE <handle> <label> <tape file> <err mess> */
-       if(result_argc != 5) {
-           error("error [dump to tape DONE result_argc != 5: %d]", result_argc);
-           /*NOTREACHED*/
-       }
-       if(failed == 1) goto tryagain;  /* dump didn't work */
-       else if(failed == 2) goto failed_dumper;
-       free_serial(result_argv[2]);
-       dumpsize = (off_t)0;
-       if (*result_argv[5] == '"') {
-           /* String was quoted */
-           OFF_T_FMT_TYPE dumpsize_ = (OFF_T_FMT_TYPE)0;
-           rc = sscanf(result_argv[5],"\"[sec %lf kb " OFF_T_FMT " ",
-                       &tapetime, &dumpsize_);
-           dumpsize = (off_t)dumpsize_;
-       } else {
-           /* String was not quoted */
-           OFF_T_FMT_TYPE dumpsize_ = (OFF_T_FMT_TYPE)0;
-           rc = sscanf(result_argv[5],"[sec %lf kb " OFF_T_FMT " ",
-                       &tapetime, &dumpsize_);
-           dumpsize = (off_t)dumpsize_;
-       }
-       if (rc < 2) {
-           error("error [malformed result: %d items matched in '%s']",
-                 rc, result_argv[5]);
-           /*NOTREACHED*/
-       }
-       if(cmd == DONE) {
-           /* every thing went fine */
-           update_info_dumper(dp, origsize, dumpsize, dumptime);
-           filenum = OFF_T_ATOI(result_argv[4]);
-           update_info_taper(dp, result_argv[3], filenum, sched(dp)->level);
-           /* note that update_info_dumper() must be run before
-              update_info_taper(), since update_info_dumper overwrites
-              tape information.  */
-       }
-       break;
-     case TRYAGAIN: /* TRY-AGAIN <handle> <err mess> */
-       tape_left = tape_length;
-       current_tape++;
-       if(dumper_tryagain == 0) {
-           sched(dp)->attempted++;
-           if(sched(dp)->attempted > failed)
-               failed = sched(dp)->attempted;
-       }
-     tryagain:
-       if(failed <= 1)
-           headqueue_disk(&runq, dp);
-     failed_dumper:
-       update_failed_dump_to_tape(dp);
-       free_serial(result_argv[2]);
-       break;
-     case SPLIT_CONTINUE:  /* SPLIT_CONTINUE <handle> <new_label> */
-         if (result_argc != 3) {
-             error("error [taper SPLIT_CONTINUE result_argc != 3: %d]", result_argc);
-           /*NOTREACHED*/
-         }
-         fprintf(stderr, "driver: Got SPLIT_CONTINUE %s %s\n",
-               result_argv[2], result_argv[3]);
-         goto continue_port_dump;
-     case SPLIT_NEEDNEXT:
-         fprintf(stderr, "driver: Got SPLIT_NEEDNEXT %s %s\n", result_argv[2], result_argv[3]);
-         goto continue_port_dump;
-     case TAPE_ERROR: /* TAPE-ERROR <handle> <err mess> */
-     case BOGUS:
-     default:
-       update_failed_dump_to_tape(dp);
-       free_serial(result_argv[2]);
-       failed = 2;     /* fatal problem */
-       start_degraded_mode(&runq);
-       break;
-     }
-     /* reset statistics & return */
-     taper_busy = dumper->busy = 0;
-     dp->host->inprogress -= 1;
-     dp->inprogress = 0;
-     deallocate_bandwidth(dp->host->netif, sched(dp)->est_kps);
-     amfree(qname);
-     return failed;
+     dumper->ev_read = event_register(dumper->fd, EV_READFD,
+                                    handle_dumper_result, dumper);
+     taper_ev_read = event_register(taper, EV_READFD,
+                                  handle_taper_result, NULL);
  }
  
  static int
@@@ -2935,26 -3064,118 +3072,118 @@@ short_dump_state(void
  
      wall_time = walltime_str(curclock());
  
-     printf("driver: state time %s ", wall_time);
-     printf("free kps: %lu space: " OFF_T_FMT " taper: ",
-          free_kps((interface_t *)0),
-          (OFF_T_FMT_TYPE)free_space());
-     if(degraded_mode) printf("DOWN");
-     else if(!taper_busy) printf("idle");
-     else printf("writing");
+     g_printf(_("driver: state time %s "), wall_time);
+     g_printf(_("free kps: %lu space: %lld taper: "),
+          free_kps(NULL),
+          (long long)free_space());
+     if(degraded_mode) g_printf(_("DOWN"));
+     else if(!taper_busy) g_printf(_("idle"));
+     else g_printf(_("writing"));
      nidle = 0;
      for(i = 0; i < inparallel; i++) if(!dmptable[i].busy) nidle++;
-     printf(" idle-dumpers: %d", nidle);
-     printf(" qlen tapeq: %d", queue_length(tapeq));
-     printf(" runq: %d", queue_length(runq));
-     printf(" roomq: %d", queue_length(roomq));
-     printf(" wakeup: %d", (int)sleep_time);
-     printf(" driver-idle: %s\n", idle_strings[idle_reason]);
+     g_printf(_(" idle-dumpers: %d"), nidle);
+     g_printf(_(" qlen tapeq: %d"), queue_length(tapeq));
+     g_printf(_(" runq: %d"), queue_length(runq));
+     g_printf(_(" roomq: %d"), queue_length(roomq));
+     g_printf(_(" wakeup: %d"), (int)sleep_time);
+     g_printf(_(" driver-idle: %s\n"), _(idle_strings[idle_reason]));
      interface_state(wall_time);
      holdingdisk_state(wall_time);
      fflush(stdout);
  }
  
+ static TapeAction tape_action(void)
+ {
+     TapeAction result = TAPE_ACTION_NO_ACTION;
+     dumper_t *dumper;
+     disk_t   *dp;
+     off_t dumpers_size;
+     off_t runq_size;
+     off_t directq_size;
+     off_t tapeq_size;
+     off_t sched_size;
+     off_t dump_to_disk_size;
+     int   dump_to_disk_terminated;
+     dumpers_size = 0;
+     for(dumper = dmptable; dumper < (dmptable+inparallel); dumper++) {
+       if (dumper->busy)
+           dumpers_size += sched(dumper->dp)->est_size;
+     }
+     driver_debug(1, _("dumpers_size: %lld\n"), (long long)dumpers_size);
+     runq_size = 0;
+     for(dp = runq.head; dp != NULL; dp = dp->next) {
+       runq_size += sched(dp)->est_size;
+     }
+     driver_debug(1, _("runq_size: %lld\n"), (long long)runq_size);
+     directq_size = 0;
+     for(dp = directq.head; dp != NULL; dp = dp->next) {
+       directq_size += sched(dp)->est_size;
+     }
+     driver_debug(1, _("directq_size: %lld\n"), (long long)directq_size);
+     tapeq_size = 0;
+     for(dp = tapeq.head; dp != NULL; dp = dp->next) {
+       tapeq_size += sched(dp)->act_size;
+     }
+     if (taper_disk) {
+       tapeq_size += sched(taper_disk)->act_size - taper_written;
+     }
+     driver_debug(1, _("tapeq_size: %lld\n"), (long long)tapeq_size);
+     sched_size = runq_size + tapeq_size + dumpers_size;
+     driver_debug(1, _("sched_size: %lld\n"), (long long)sched_size);
+     dump_to_disk_size = dumpers_size + runq_size;
+     driver_debug(1, _("dump_to_disk_size: %lld\n"), (long long)dump_to_disk_size);
+     dump_to_disk_terminated = schedule_done && dump_to_disk_size == 0;
+     // Changing conditionals can produce a driver hang, take care.
+     // 
+     // when to start writting to a new tape
+     if ((taper_state & TAPER_STATE_WAIT_FOR_TAPE) &&
+         ((taper_state & TAPER_STATE_DUMP_TO_TAPE) ||  // for dump to tape
+        !empty(directq) ||                             // if a dle is waiting for a dump to tape
+          !empty(roomq) ||                             // holding disk constraint
+          idle_reason == IDLE_NO_DISKSPACE ||          // holding disk constraint
+          (flush_threshold_dumped < tapeq_size &&      // flush-threshold-dumped &&
+         flush_threshold_scheduled < sched_size) ||    //  flush-threshold-scheduled
+        (taperflush < tapeq_size &&                    // taperflush
+         (force_flush == 1 ||                          //  if force_flush
+          dump_to_disk_terminated))                    //  or all dump to disk terminated
+       )) {
+       result |= TAPE_ACTION_NEW_TAPE;
+     // when to stop using new tape
+     } else if ((taper_state & TAPER_STATE_WAIT_FOR_TAPE) &&
+              (taperflush >= tapeq_size &&             // taperflush criteria not meet
+               (force_flush == 1 ||                    //  if force_flush
+                dump_to_disk_terminated))              //  or all dump to disk terminated
+             ) {
+       result |= TAPE_ACTION_NO_NEW_TAPE;
+     }
+     // when to start a flush
+     // We don't start a flush if taper_tape_started == 1 && dump_to_disk_terminated && force_flush == 0,
+     // it is a criteria need to exit the first event_loop without flushing everything to tape,
+     // they will be flush in another event_loop.
+     if (!degraded_mode && !taper_busy && !empty(tapeq) &&
+       (!((taper_state & TAPER_STATE_TAPE_STARTED) &&
+           dump_to_disk_terminated && force_flush == 0) ||     // if tape already started and dump to disk not terminated
+          ((taper_state & TAPER_STATE_TAPE_STARTED) &&
+         force_flush == 1) ||                                  // if tape already started and force_flush
+          !empty(roomq) ||                                     // holding disk constraint
+          idle_reason == IDLE_NO_DISKSPACE ||                  // holding disk constraint
+          (flush_threshold_dumped < tapeq_size &&              // flush-threshold-dumped &&
+        flush_threshold_scheduled < sched_size) ||             //  flush-threshold-scheduled
+          (force_flush == 1 && taperflush < tapeq_size))) {    // taperflush if force_flush
+       result |= TAPE_ACTION_START_A_FLUSH;
+     }
+     return result;
+ }
  #if 0
  static void
  dump_state(
      disk_t *dp;
      char *qname;
  
-     printf("================\n");
-     printf("driver state at time %s: %s\n", walltime_str(curclock()), str);
-     printf("free kps: %lu, space: " OFF_T_FMT "\n",
-          free_kps((interface_t *)0),
-          (OFF_T_FMT_TYPE)free_space());
-     if(degraded_mode) printf("taper: DOWN\n");
-     else if(!taper_busy) printf("taper: idle\n");
-     else printf("taper: writing %s:%s.%d est size " OFF_T_FMT "\n",
+     g_printf("================\n");
+     g_printf(_("driver state at time %s: %s\n"), walltime_str(curclock()), str);
+     g_printf(_("free kps: %lu, space: %lld\n"),
+          free_kps(NULL),
+          (long long)free_space());
+     if(degraded_mode) g_printf(_("taper: DOWN\n"));
+     else if(!taper_busy) g_printf(_("taper: idle\n"));
+     else g_printf(_("taper: writing %s:%s.%d est size %lld\n"),
                taper_disk->host->hostname, taper_disk->name,
                sched(taper_disk)->level,
-               sched(taper_disk)->est_size);
+               (long long)sched(taper_disk)->est_size);
      for(i = 0; i < inparallel; i++) {
        dp = dmptable[i].dp;
        if(!dmptable[i].busy)
-         printf("%s: idle\n", dmptable[i].name);
+         g_printf(_("%s: idle\n"), dmptable[i].name);
        else
          qname = quote_string(dp->name);
-         printf("%s: dumping %s:%s.%d est kps %d size " OFF_T_FMT " time %lu\n",
+         g_printf(_("%s: dumping %s:%s.%d est kps %d size %lld time %lu\n"),
                dmptable[i].name, dp->host->hostname, qname, sched(dp)->level,
-               sched(dp)->est_kps, sched(dp)->est_size, sched(dp)->est_time);
+               sched(dp)->est_kps, (long long)sched(dp)->est_size, sched(dp)->est_time);
            amfree(qname);
      }
      dump_queue("TAPE", tapeq, 5, stdout);
      dump_queue("ROOM", roomq, 5, stdout);
      dump_queue("RUN ", runq, 5, stdout);
-     printf("================\n");
+     g_printf("================\n");
      fflush(stdout);
  }
  #endif
diff --combined server-src/dumper.c
index 49982b2ffcb9755570d7ce5af24421143efe29b4,18384c738394b4f117b9b4381fb5efe1b915b918..1c40d4be41fcfd9dc78315274db4d5852b3a6e76
@@@ -44,6 -44,7 +44,7 @@@
  #include "amfeatures.h"
  #include "server_util.h"
  #include "util.h"
+ #include "timestamp.h"
  
  #define dumper_debug(i,x) do {                \
        if ((i) <= debug_dumper) {      \
@@@ -88,6 -89,7 +89,7 @@@ char *srv_encrypt = NULL
  char *clnt_encrypt = NULL;
  char *srv_decrypt_opt = NULL;
  char *clnt_decrypt_opt = NULL;
+ static kencrypt_type dumper_kencrypt;
  
  static FILE *errf = NULL;
  static char *hostname = NULL;
@@@ -230,13 -232,19 +232,19 @@@ check_options
        *decryptend = ';';
        }
      }
+     if (strstr(options, "kencrypt;") != NULL) {
+       dumper_kencrypt = KENCRYPT_WILL_DO;
+     } else {
+       dumper_kencrypt = KENCRYPT_NONE;
+     }
  }
  
  
  int
  main(
-     int               main_argc,
-     char **   main_argv)
+     int               argc,
+     char **   argv)
  {
      static struct databuf db;
      struct cmdargs cmdargs;
      int outfd = -1;
      int rc;
      in_port_t taper_port;
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
-     char *conffile;
      char *q = NULL;
      int a;
-     uid_t ruid;
-     int    new_argc,   my_argc;
-     char **new_argv, **my_argv;
-     struct addrinfo hints;
      int res;
-     struct addrinfo *gaires = NULL;
+     config_overwrites_t *cfg_ovr = NULL;
+     char *cfg_opt = NULL;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
+     /* drop root privileges */
+     if (!set_root_privs(0)) {
+       error(_("dumper must be run setuid root"));
+     }
  
      safe_fd(-1, 0);
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
 +    malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +
      erroutput_type = (ERR_AMANDALOG|ERR_INTERACTIVE);
      set_logerror(logerror);
  
-     parse_conf(main_argc, main_argv, &new_argc, &new_argv);
-     my_argc = new_argc;
-     my_argv = new_argv;
-     if (my_argc > 1) {
-       config_name = stralloc(my_argv[1]);
-       config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-     } else {
-       char my_cwd[STR_SIZE];
-       if (getcwd(my_cwd, SIZEOF(my_cwd)) == NULL) {
-           error("cannot determine current working directory");
-           /*NOTREACHED*/
-       }
-       config_dir = stralloc2(my_cwd, "/");
-       if ((config_name = strrchr(my_cwd, '/')) != NULL) {
-           config_name = stralloc(config_name + 1);
-       }
-     }
-     safe_cd();
+     cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
+     if (argc > 1)
+       cfg_opt = argv[1];
+     config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_USE_CWD | CONFIG_INIT_FATAL,
+               cfg_opt);
+     apply_config_overwrites(cfg_ovr);
  
-     our_features = am_init_feature_set();
-     our_feature_string = am_feature_to_string(our_features);
+     safe_cd(); /* do this *after* config_init() */
  
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     if(read_conffile(conffile)) {
-       error("errors processing config file \"%s\"", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
+     check_running_as(RUNNING_AS_DUMPUSER);
  
      dbrename(config_name, DBG_SUBDIR_SERVER);
  
 -    our_features = am_init_feature_set();
 -    our_feature_string = am_feature_to_string(our_features);
 +    report_bad_conf_arg();
 +    /*
 +     * Make our effective uid nonprivlidged, keeping save uid as root
 +     * in case we need to get back (to bind privlidged ports, etc).
 +     */
 +    ruid = getuid();
 +    if(geteuid() == 0) {
 +      seteuid(ruid);
 +      setgid(getgid());
 +    }
 +#if defined BSD_SECURITY && !defined SSH_SECURITY
 +    else {
 +      error("must be run setuid root to communicate correctly");
 +      /*NOTREACHED*/
 +    }
 +#endif
  
-     fprintf(stderr,
-           "%s: pid %ld executable %s version %s\n",
+     g_fprintf(stderr,
+           _("%s: pid %ld executable %s version %s\n"),
            get_pname(), (long) getpid(),
-           my_argv[0], version());
+           argv[0], version());
      fflush(stderr);
  
      /* now, make sure we are a valid user */
  
-     if (getpwuid(getuid()) == NULL) {
-       error("can't get login name for my uid %ld", (long)getuid());
-       /*NOTREACHED*/
-     }
      signal(SIGPIPE, SIG_IGN);
  
      conf_dtimeout = (time_t)getconf_int(CNF_DTIMEOUT);
        switch(cmd) {
        case START:
            if(cmdargs.argc <  2)
-               error("error [dumper START: not enough args: timestamp]");
+               error(_("error [dumper START: not enough args: timestamp]"));
            dumper_timestamp = newstralloc(dumper_timestamp, cmdargs.argv[2]);
            break;
  
            a = 2;
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: handle]");
+               error(_("error [dumper PORT-DUMP: not enough args: handle]"));
                /*NOTREACHED*/
            }
            handle = newstralloc(handle, cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: port]");
+               error(_("error [dumper PORT-DUMP: not enough args: port]"));
                /*NOTREACHED*/
            }
            taper_port = (in_port_t)atoi(cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: hostname]");
+               error(_("error [dumper PORT-DUMP: not enough args: hostname]"));
                /*NOTREACHED*/
            }
            hostname = newstralloc(hostname, cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: features]");
+               error(_("error [dumper PORT-DUMP: not enough args: features]"));
                /*NOTREACHED*/
            }
            am_release_feature_set(their_features);
            their_features = am_string_to_feature(cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: diskname]");
+               error(_("error [dumper PORT-DUMP: not enough args: diskname]"));
                /*NOTREACHED*/
            }
            qdiskname = newstralloc(qdiskname, cmdargs.argv[a++]);
            diskname = unquote_string(qdiskname);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: device]");
+               error(_("error [dumper PORT-DUMP: not enough args: device]"));
                /*NOTREACHED*/
            }
            device = newstralloc(device, cmdargs.argv[a++]);
                amfree(device);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: level]");
+               error(_("error [dumper PORT-DUMP: not enough args: level]"));
                /*NOTREACHED*/
            }
            level = atoi(cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: dumpdate]");
+               error(_("error [dumper PORT-DUMP: not enough args: dumpdate]"));
                /*NOTREACHED*/
            }
            dumpdate = newstralloc(dumpdate, cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: program]");
+               error(_("error [dumper PORT-DUMP: not enough args: program]"));
                /*NOTREACHED*/
            }
            progname = newstralloc(progname, cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: amandad_path]");
+               error(_("error [dumper PORT-DUMP: not enough args: amandad_path]"));
                /*NOTREACHED*/
            }
            amandad_path = newstralloc(amandad_path, cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: client_username]");
+               error(_("error [dumper PORT-DUMP: not enough args: client_username]"));
            }
            client_username = newstralloc(client_username, cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: ssh_keys]");
+               error(_("error [dumper PORT-DUMP: not enough args: ssh_keys]"));
            }
            ssh_keys = newstralloc(ssh_keys, cmdargs.argv[a++]);
  
            if(a >= cmdargs.argc) {
-               error("error [dumper PORT-DUMP: not enough args: options]");
+               error(_("error [dumper PORT-DUMP: not enough args: options]"));
            }
            options = newstralloc(options, cmdargs.argv[a++]);
  
            if(a != cmdargs.argc) {
-               error("error [dumper PORT-DUMP: too many args: %d != %d]",
+               error(_("error [dumper PORT-DUMP: too many args: %d != %d]"),
                      cmdargs.argc, a);
                /*NOTREACHED*/
            }
  
            /* Double-check that 'localhost' resolves properly */
- #ifdef WORKING_IPV6
-           hints.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ALL;
-           hints.ai_family = AF_UNSPEC;
- #else
-           hints.ai_flags = AI_CANONNAME;
-           hints.ai_family = AF_INET;
- #endif
-           hints.ai_socktype = 0;
-           hints.ai_protocol = 0;
-           hints.ai_addrlen = 0;
-           hints.ai_addr = NULL;
-           hints.ai_canonname = NULL;
-           hints.ai_next = NULL;
-           res = getaddrinfo("localhost", NULL, &hints, &gaires);
- #ifdef WORKING_IPV6
-           if (res != 0) {
-               hints.ai_flags = AI_CANONNAME;
-               hints.ai_family = AF_UNSPEC;
-               res = getaddrinfo("localhost", NULL, &hints, &gaires);
-           }
- #endif
-           if (res != 0) {
-               errstr = newvstralloc(errstr,
-                                    _("could not resolve localhost: "),
-                                    gai_strerror(res), NULL);
+           if ((res = resolve_hostname("localhost", 0, NULL, NULL) != 0)) {
+               errstr = newvstrallocf(errstr,
+                                    _("could not resolve localhost: %s"),
+                                    gai_strerror(res));
                q = squotef(errstr);
                putresult(FAILED, "%s %s\n", handle, q);
                log_add(L_FAIL, "%s %s %s %d [%s]", hostname, qdiskname,
                amfree(q);
                break;
            }
-           if (gaires) freeaddrinfo(gaires);
  
            /* connect outf to chunker/taper port */
  
                                  STREAM_BUFSIZE, 0, NULL, 0);
            if (outfd == -1) {
                
-               errstr = newvstralloc(errstr, "port open: ",
-                                     strerror(errno), NULL);
+               errstr = newvstrallocf(errstr, _("port open: %s"),
+                                     strerror(errno));
                q = squotef(errstr);
                putresult(FAILED, "%s %s\n", handle, q);
                log_add(L_FAIL, "%s %s %s %d [%s]", hostname, qdiskname,
                amfree(q);
            } else {
                do_dump(&db);
+               /* try to clean up any defunct processes, since Amanda doesn't
+                  wait() for them explicitly */
+               while(waitpid(-1, NULL, WNOHANG)> 0);
            }
  
            amfree(amandad_path);
            } else if(cmdargs.argc >= 0) {
                q = squote(cmdargs.argv[0]);
            } else {
-               q = stralloc("(no input?)");
+               q = stralloc(_("(no input?)"));
            }
            putresult(BAD_COMMAND, "%s\n", q);
            amfree(q);
            aclose(outfd);
      } while(cmd != QUIT);
  
-     /* make sure root privilege is dropped */
-     if ( geteuid() == 0 ) {
-       setuid(ruid);
-       seteuid(ruid);
-     }
-     free_new_argv(new_argc, new_argv);
-     free_server_config();
      am_release_feature_set(our_features);
      amfree(our_feature_string);
      amfree(errstr);
      amfree(srv_decrypt_opt);
      amfree(clnt_decrypt_opt);
      amfree(options);
-     amfree(config_dir);
-     amfree(config_name);
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if (malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
  
      dbclose();
      return (0); /* exit */
@@@ -665,7 -604,7 +620,7 @@@ databuf_flush
        dumpbytes %= (off_t)1024;
      }
      if (written < 0) {
-       errstr = squotef("data write: %s", strerror(errno));
+       errstr = squotef(_("data write: %s"), strerror(errno));
        return -1;
      }
      db->datain = db->dataout = db->buf;
@@@ -687,21 -626,21 +642,21 @@@ process_dumpeof(void
      add_msg_data(NULL, 0);
      if(!ISSET(status, GOT_SIZELINE) && dump_result < 2) {
        /* make a note if there isn't already a failure */
-       fprintf(errf,
-               "? %s: strange [missing size line from sendbackup]\n",
+       g_fprintf(errf,
+               _("? %s: strange [missing size line from sendbackup]\n"),
                get_pname());
        if(errstr == NULL) {
-           errstr = stralloc("missing size line from sendbackup");
+           errstr = stralloc(_("missing size line from sendbackup"));
        }
        dump_result = max(dump_result, 2);
      }
  
      if(!ISSET(status, GOT_ENDLINE) && dump_result < 2) {
-       fprintf(errf,
-               "? %s: strange [missing end line from sendbackup]\n",
+       g_fprintf(errf,
+               _("? %s: strange [missing end line from sendbackup]\n"),
                get_pname());
        if(errstr == NULL) {
-           errstr = stralloc("missing end line from sendbackup");
+           errstr = stralloc(_("missing end line from sendbackup"));
        }
        dump_result = max(dump_result, 2);
      }
@@@ -811,7 -750,7 +766,7 @@@ process_dumpline
  
            tok = strtok(NULL, "");
            if (tok == NULL || *tok != '[') {
-               errstr = newvstralloc(errstr, "bad remote error: ", str, NULL);
+               errstr = newvstrallocf(errstr, _("bad remote error: %s"), str);
            } else {
                char *enderr;
  
      default:
  bad_line:
        /* prefix with ?? */
-       fprintf(errf, "??");
+       g_fprintf(errf, "??");
        dump_result = max(dump_result, 1);
        break;
      }
-     fprintf(errf, "%s\n", str);
+     g_fprintf(errf, "%s\n", str);
      amfree(buf);
  }
  
@@@ -852,7 -791,6 +807,6 @@@ add_msg_data
      } msg = { NULL, 0 };
      char *line, *ch;
      size_t buflen;
-     int       in_quotes = 0;
  
      if (msg.buf != NULL)
        buflen = strlen(msg.buf);
      if (str == NULL) {
        if (buflen == 0)
            return;
-       fprintf(errf,"? %s: error [partial line in msgbuf: "
-                               SIZE_T_FMT " bytes]\n", get_pname(),
-                               (SIZE_T_FMT_TYPE)buflen);
-       fprintf(errf,"? %s: error [partial line in msgbuf: \"%s\"]\n",
+       g_fprintf(errf,_("? %s: error [partial line in msgbuf: %zu bytes]\n"),
+           get_pname(), buflen);
+       g_fprintf(errf,_("? %s: error [partial line in msgbuf: \"%s\"]\n"),
            get_pname(), msg.buf);
        msg.buf[0] = '\0';
        return;
       * scanning line for unqouted newline.
       */
      for (ch = line = msg.buf; *ch != '\0'; ch++) {
-       if (*ch == '"') {
-           in_quotes = !in_quotes;
-       } else if ((*ch == '\\') && (*(ch + 1) == '"')) {
-               ch++;
-       } else if (!in_quotes && (*ch == '\n')) {
+       if (*ch == '\n') {
            /*
-            * Found an unqouted newline.  Terminate and process line.
+            * Found a newline.  Terminate and process line.
             */
            *ch = '\0';
            process_dumpline(line);
@@@ -943,7 -876,7 +892,7 @@@ log_msgout
  
      fflush(errf);
      if (fseek(errf, 0L, SEEK_SET) < 0) {
-       dbprintf(("log_msgout: warning - seek failed: %s\n", strerror(errno)));
+       dbprintf(_("log_msgout: warning - seek failed: %s\n"), strerror(errno));
      }
      while ((line = agets(errf)) != NULL) {
        if (line[0] != '\0') {
@@@ -983,21 -916,21 +932,21 @@@ finish_tapeheader
  #define       UNCOMPRESS_OPT  ""
  #endif
        if (srvcompress == COMP_SERVER_CUST) {
-           snprintf(file->uncompress_cmd, SIZEOF(file->uncompress_cmd),
+           g_snprintf(file->uncompress_cmd, SIZEOF(file->uncompress_cmd),
                     " %s %s |", srvcompprog, "-d");
            strncpy(file->comp_suffix, "cust", SIZEOF(file->comp_suffix) - 1);
            file->comp_suffix[SIZEOF(file->comp_suffix) - 1] = '\0';
            strncpy(file->srvcompprog, srvcompprog, SIZEOF(file->srvcompprog) - 1);
            file->srvcompprog[SIZEOF(file->srvcompprog) - 1] = '\0';
        } else if ( srvcompress == COMP_CUST ) {
-           snprintf(file->uncompress_cmd, SIZEOF(file->uncompress_cmd),
+           g_snprintf(file->uncompress_cmd, SIZEOF(file->uncompress_cmd),
                     " %s %s |", clntcompprog, "-d");
            strncpy(file->comp_suffix, "cust", SIZEOF(file->comp_suffix) - 1);
            file->comp_suffix[SIZEOF(file->comp_suffix) - 1] = '\0';
            strncpy(file->clntcompprog, clntcompprog, SIZEOF(file->clntcompprog));
            file->clntcompprog[SIZEOF(file->clntcompprog) - 1] = '\0';
        } else {
-           snprintf(file->uncompress_cmd, SIZEOF(file->uncompress_cmd),
+           g_snprintf(file->uncompress_cmd, SIZEOF(file->uncompress_cmd),
                " %s %s |", UNCOMPRESS_PATH, UNCOMPRESS_OPT);
            strncpy(file->comp_suffix, COMPRESS_SUFFIX,SIZEOF(file->comp_suffix) - 1);
            file->comp_suffix[SIZEOF(file->comp_suffix) - 1] = '\0';
      if (srvencrypt != ENCRYPT_NONE) {
        file->encrypted= 1;
        if (srvencrypt == ENCRYPT_SERV_CUST) {
-       snprintf(file->decrypt_cmd, SIZEOF(file->decrypt_cmd),
+       g_snprintf(file->decrypt_cmd, SIZEOF(file->decrypt_cmd),
                 " %s %s |", srv_encrypt, srv_decrypt_opt); 
        strncpy(file->encrypt_suffix, "enc", SIZEOF(file->encrypt_suffix) - 1);
        file->encrypt_suffix[SIZEOF(file->encrypt_suffix) - 1] = '\0';
        strncpy(file->srv_decrypt_opt, srv_decrypt_opt, SIZEOF(file->srv_decrypt_opt) - 1);
        file->srv_decrypt_opt[SIZEOF(file->srv_decrypt_opt) - 1] = '\0';
        } else if ( srvencrypt == ENCRYPT_CUST ) {
-       snprintf(file->decrypt_cmd, SIZEOF(file->decrypt_cmd),
+       g_snprintf(file->decrypt_cmd, SIZEOF(file->decrypt_cmd),
                 " %s %s |", clnt_encrypt, clnt_decrypt_opt);
        strncpy(file->encrypt_suffix, "enc", SIZEOF(file->encrypt_suffix) - 1);
        file->encrypt_suffix[SIZEOF(file->encrypt_suffix) - 1] = '\0';
@@@ -1054,16 -987,17 +1003,17 @@@ write_tapeheader
      int               outfd,
      dumpfile_t *file)
  {
-     char buffer[DISK_BLOCK_BYTES];
+     char * buffer;
      ssize_t written;
  
-     build_header(buffer, file, SIZEOF(buffer));
+     buffer = build_header(file, DISK_BLOCK_BYTES);
  
-     written = fullwrite(outfd, buffer, SIZEOF(buffer));
-     if(written == (ssize_t)sizeof(buffer))
-       return 0;
+     written = fullwrite(outfd, buffer, DISK_BLOCK_BYTES);
+     amfree(buffer);
+     if(written == DISK_BLOCK_BYTES)
+         return 0;
      if(written < 0)
-       return written;
+         return written;
  
      return -1;
  }
@@@ -1090,7 -1024,7 +1040,7 @@@ do_dump
      dumpbytes = dumpsize = headersize = origsize = (off_t)0;
      fh_init(&file);
  
-     snprintf(level_str, SIZEOF(level_str), "%d", level);
+     g_snprintf(level_str, SIZEOF(level_str), "%d", level);
      fn = sanitise_filename(diskname);
      errfname = newvstralloc(errfname,
                            AMANDA_TMPDIR,
                            NULL);
      amfree(fn);
      if((errf = fopen(errfname, "w+")) == NULL) {
-       errstr = newvstralloc(errstr,
-                             "errfile open \"", errfname, "\": ",
-                             strerror(errno),
-                             NULL);
+       errstr = newvstrallocf(errstr, "errfile open \"%s\": %s",
+                             errfname, strerror(errno));
        amfree(errfname);
        goto failed;
      }
        indexfile_real = getindexfname(hostname, diskname, dumper_timestamp, level);
        indexfile_tmp = stralloc2(indexfile_real, ".tmp");
  
-       if (mkpdir(indexfile_tmp, 02755, (uid_t)-1, (gid_t)-1) == -1) {
-          errstr = newvstralloc(errstr,
-                                "err create ",
+       if (mkpdir(indexfile_tmp, 0755, (uid_t)-1, (gid_t)-1) == -1) {
+          errstr = newvstrallocf(errstr,
+                                _("err create %s: %s"),
                                 indexfile_tmp,
-                                ": ",
-                                strerror(errno),
-                                NULL);
+                                strerror(errno));
           amfree(indexfile_real);
           amfree(indexfile_tmp);
           goto failed;
        }
        indexout = open(indexfile_tmp, O_WRONLY | O_CREAT | O_TRUNC, 0600);
        if (indexout == -1) {
-           errstr = newvstralloc(errstr, "err open ", indexfile_tmp, ": ",
-               strerror(errno), NULL);
+           errstr = newvstrallocf(errstr, _("err open %s: %s"),
+                       indexfile_tmp, strerror(errno));
            goto failed;
        } else {
            if (runcompress(indexout, &indexpid, COMP_BEST) < 0) {
       */
      event_loop(0);
  
+     if (!ISSET(status, HEADER_DONE)) {
+       dump_result = max(dump_result, 2);
+       if (!errstr) errstr = stralloc(_("got no header information"));
+     }
+     dumpsize -= headersize;           /* don't count the header */
+     if (dumpsize <= (off_t)0) {
+       dumpsize = (off_t)0;
+       dump_result = max(dump_result, 2);
+       if (!errstr) errstr = stralloc(_("got no data"));
+     }
      if (dump_result > 1)
        goto failed;
  
      runtime = stopclock();
-     dumptime = (double)(runtime.r.tv_sec) +
-              ((double)(runtime.r.tv_usec) / 1000000.0);
-     dumpsize -= headersize;           /* don't count the header */
-     if (dumpsize < (off_t)0)          /* XXX - maybe this should be fatal? */
-       dumpsize = (off_t)0;
+     dumptime = g_timeval_to_double(runtime);
  
      amfree(errstr);
      errstr = alloc(128);
-     snprintf(errstr, 128, "sec %s kb " OFF_T_FMT " kps %3.1lf orig-kb " OFF_T_FMT "",
+     g_snprintf(errstr, 128, _("sec %s kb %lld kps %3.1lf orig-kb %lld"),
        walltime_str(runtime),
-       (OFF_T_FMT_TYPE)dumpsize,
+       (long long)dumpsize,
        (isnormal(dumptime) ? ((double)dumpsize / (double)dumptime) : 0.0),
-       (OFF_T_FMT_TYPE)origsize);
+       (long long)origsize);
      q = squotef("[%s]", errstr);
-     putresult(DONE, "%s " OFF_T_FMT " " OFF_T_FMT " %lu %s\n", handle,
-               (OFF_T_FMT_TYPE)origsize,
-               (OFF_T_FMT_TYPE)dumpsize,
+     putresult(DONE, _("%s %lld %lld %lu %s\n"), handle,
+               (long long)origsize,
+               (long long)dumpsize,
                (unsigned long)((double)dumptime+0.5), q);
      amfree(q);
  
        /*@i@*/ aclose(indexout);
        waitpid(indexpid,&index_status,0);
        if (rename(indexfile_tmp, indexfile_real) != 0) {
-           log_add(L_WARNING, "could not rename \"%s\" to \"%s\": %s",
+           log_add(L_WARNING, _("could not rename \"%s\" to \"%s\": %s"),
                    indexfile_tmp, indexfile_real, strerror(errno));
        }
        amfree(indexfile_tmp);
@@@ -1237,10 -1174,10 +1190,10 @@@ failed
      aclose(db->fd);
      /* kill all child process */
      if (db->compresspid != -1) {
-       fprintf(stderr,"%s: kill compress command\n",get_pname());
+       g_fprintf(stderr,_("%s: kill compress command\n"),get_pname());
        if (kill(db->compresspid, SIGTERM) < 0) {
            if (errno != ESRCH)
-               fprintf(stderr,"%s: can't kill compress command: %s\n"
+               g_fprintf(stderr,_("%s: can't kill compress command: %s\n")
                    get_pname(), strerror(errno));
        }
        else {
      }
  
      if (db->encryptpid != -1) {
-       fprintf(stderr,"%s: kill encrypt command\n",get_pname());
+       g_fprintf(stderr,_("%s: kill encrypt command\n"),get_pname());
        if (kill(db->encryptpid, SIGTERM) < 0) {
            if (errno != ESRCH)
-               fprintf(stderr,"%s: can't kill encrypt command: %s\n"
+               g_fprintf(stderr,_("%s: can't kill encrypt command: %s\n")
                    get_pname(), strerror(errno));
        }
        else {
      }
  
      if (indexpid != -1) {
-       fprintf(stderr,"%s: kill index command\n",get_pname());
+       g_fprintf(stderr,_("%s: kill index command\n"),get_pname());
        if (kill(indexpid, SIGTERM) < 0) {
            if (errno != ESRCH)
-               fprintf(stderr,"%s: can't kill index command: %s\n"
+               g_fprintf(stderr,_("%s: can't kill index command: %s\n")
                    get_pname(),strerror(errno));
        }
        else {
      }
  
      log_start_multiline();
-     log_add(L_FAIL, "%s %s %s %d [%s]", hostname, qdiskname, dumper_timestamp,
+     log_add(L_FAIL, _("%s %s %s %d [%s]"), hostname, qdiskname, dumper_timestamp,
            level, errstr);
      if (errf) {
        log_msgout(L_FAIL);
@@@ -1306,7 -1243,7 +1259,7 @@@ read_mesgfd
  
      switch (size) {
      case -1:
-       errstr = newstralloc2(errstr, "mesg read: ",
+       errstr = newvstrallocf(errstr, _("mesg read: %s"),
            security_stream_geterror(streams[MESGFD].fd));
        dump_result = 2;
        stop_dump();
        /* time to do the header */
        finish_tapeheader(&file);
        if (write_tapeheader(db->fd, &file)) {
-           errstr = newstralloc2(errstr, "write_tapeheader: "
+           errstr = newvstrallocf(errstr, _("write_tapeheader: %s")
                                  strerror(errno));
            dump_result = 2;
            stop_dump();
@@@ -1393,7 -1330,7 +1346,7 @@@ read_datafd
       * The read failed.  Error out
       */
      if (size < 0) {
-       errstr = newstralloc2(errstr, "data read: ",
+       errstr = newvstrallocf(errstr, _("data read: %s"),
            security_stream_geterror(streams[DATAFD].fd));
        dump_result = 2;
        stop_dump();
       */
      assert(buf != NULL);
      if (databuf_write(db, buf, (size_t)size) < 0) {
-       errstr = newstralloc2(errstr, "data write: ", strerror(errno));
+       errstr = newvstrallocf(errstr, _("data write: %s"), strerror(errno));
        dump_result = 2;
        stop_dump();
        return;
@@@ -1456,7 -1393,7 +1409,7 @@@ read_indexfd
      fd = *(int *)cookie;
  
      if (size < 0) {
-       errstr = newstralloc2(errstr, "index read: ",
+       errstr = newvstrallocf(errstr, _("index read: %s"),
            security_stream_geterror(streams[INDEXFD].fd));
        dump_result = 2;
        stop_dump();
        /* Ignore error, but schedule another read. */
        if(indexfderror == 0) {
            indexfderror = 1;
-           log_add(L_INFO, "Index corrupted for %s:%s", hostname, qdiskname);
+           log_add(L_INFO, _("Index corrupted for %s:%s"), hostname, qdiskname);
        }
      }
      security_stream_read(streams[INDEXFD].fd, read_indexfd, cookie);
@@@ -1529,7 -1466,7 +1482,7 @@@ timeout_callback
      (void)unused;     /* Quiet unused parameter warning */
  
      assert(unused == NULL);
-     errstr = newstralloc(errstr, "data timeout");
+     errstr = newstralloc(errstr, _("data timeout"));
      dump_result = 2;
      stop_dump();
  }
@@@ -1572,41 -1509,41 +1525,41 @@@ runcompress
  
      /* outpipe[0] is pipe's stdin, outpipe[1] is stdout. */
      if (pipe(outpipe) < 0) {
-       errstr = newstralloc2(errstr, "pipe: ", strerror(errno));
+       errstr = newvstrallocf(errstr, _("pipe: %s"), strerror(errno));
        return (-1);
      }
  
      switch (*pid = fork()) {
      case -1:
-       errstr = newstralloc2(errstr, "couldn't fork: ", strerror(errno));
+       errstr = newvstrallocf(errstr, _("couldn't fork: %s"), strerror(errno));
        aclose(outpipe[0]);
        aclose(outpipe[1]);
        return (-1);
      default:
        rval = dup2(outpipe[1], outfd);
        if (rval < 0)
-           errstr = newstralloc2(errstr, "couldn't dup2: ", strerror(errno));
+           errstr = newvstrallocf(errstr, _("couldn't dup2: %s"), strerror(errno));
        aclose(outpipe[1]);
        aclose(outpipe[0]);
        return (rval);
      case 0:
        if (dup2(outpipe[0], 0) < 0) {
-           error("err dup2 in: %s", strerror(errno));
+           error(_("err dup2 in: %s"), strerror(errno));
            /*NOTREACHED*/
        }
        if (dup2(outfd, 1) == -1) {
-           error("err dup2 out: %s", strerror(errno));
+           error(_("err dup2 out: %s"), strerror(errno));
            /*NOTREACHED*/
        }
        safe_fd(-1, 0);
        if (comptype != COMP_SERVER_CUST) {
            execlp(COMPRESS_PATH, COMPRESS_PATH, (  comptype == COMP_BEST ?
                COMPRESS_BEST_OPT : COMPRESS_FAST_OPT), (char *)NULL);
-           error("error: couldn't exec %s: %s", COMPRESS_PATH, strerror(errno));
+           error(_("error: couldn't exec %s: %s"), COMPRESS_PATH, strerror(errno));
            /*NOTREACHED*/
        } else if (*srvcompprog) {
            execlp(srvcompprog, srvcompprog, (char *)0);
-           error("error: couldn't exec server custom filter%s.\n", srvcompprog);
+           error(_("error: couldn't exec server custom filter%s.\n"), srvcompprog);
            /*NOTREACHED*/
        }
      }
@@@ -1633,36 -1570,36 +1586,36 @@@ runencrypt
  
      /* outpipe[0] is pipe's stdin, outpipe[1] is stdout. */
      if (pipe(outpipe) < 0) {
-       errstr = newstralloc2(errstr, "pipe: ", strerror(errno));
+       errstr = newvstrallocf(errstr, _("pipe: %s"), strerror(errno));
        return (-1);
      }
  
      switch (*pid = fork()) {
      case -1:
-       errstr = newstralloc2(errstr, "couldn't fork: ", strerror(errno));
+       errstr = newvstrallocf(errstr, _("couldn't fork: %s"), strerror(errno));
        aclose(outpipe[0]);
        aclose(outpipe[1]);
        return (-1);
      default:
        rval = dup2(outpipe[1], outfd);
        if (rval < 0)
-           errstr = newstralloc2(errstr, "couldn't dup2: ", strerror(errno));
+           errstr = newvstrallocf(errstr, _("couldn't dup2: %s"), strerror(errno));
        aclose(outpipe[1]);
        aclose(outpipe[0]);
        return (rval);
      case 0:
        if (dup2(outpipe[0], 0) < 0) {
-           error("err dup2 in: %s", strerror(errno));
+           error(_("err dup2 in: %s"), strerror(errno));
            /*NOTREACHED*/
        }
        if (dup2(outfd, 1) < 0 ) {
-           error("err dup2 out: %s", strerror(errno));
+           error(_("err dup2 out: %s"), strerror(errno));
            /*NOTREACHED*/
        }
        safe_fd(-1, 0);
        if ((encrypttype == ENCRYPT_SERV_CUST) && *srv_encrypt) {
            execlp(srv_encrypt, srv_encrypt, (char *)0);
-           error("error: couldn't exec server encryption%s.\n", srv_encrypt);
+           error(_("error: couldn't exec server encryption%s.\n"), srv_encrypt);
            /*NOTREACHED*/
        }
      }
@@@ -1688,8 -1625,8 +1641,8 @@@ sendbackup_response
      assert(sech != NULL);
  
      if (pkt == NULL) {
-       errstr = newvstralloc(errstr, "[request failed: ",
-           security_geterror(sech), "]", NULL);
+       errstr = newvstrallocf(errstr, _("[request failed: %s]"),
+           security_geterror(sech));
        *response_error = 1;
        return;
      }
      memset(ports, 0, SIZEOF(ports));
      if (pkt->type == P_NAK) {
  #if defined(PACKET_DEBUG)
-       fprintf(stderr, "got nak response:\n----\n%s\n----\n\n", pkt->body);
+       g_fprintf(stderr, _("got nak response:\n----\n%s\n----\n\n"), pkt->body);
  #endif
  
        tok = strtok(pkt->body, " ");
  
        tok = strtok(NULL, "\n");
        if (tok != NULL) {
-           errstr = newvstralloc(errstr, "NAK: ", tok, NULL);
+           errstr = newvstrallocf(errstr, "NAK: %s", tok);
            *response_error = 1;
        } else {
  bad_nak:
-           errstr = newstralloc(errstr, "request NAK");
+           errstr = newvstrallocf(errstr, "request NAK");
            *response_error = 2;
        }
        return;
      }
  
      if (pkt->type != P_REP) {
-       errstr = newvstralloc(errstr, "received strange packet type ",
-           pkt_type2str(pkt->type), ": ", pkt->body, NULL);
+       errstr = newvstrallocf(errstr, _("received strange packet type %s: %s"),
+           pkt_type2str(pkt->type), pkt->body);
        *response_error = 1;
        return;
      }
  
- #if 1
-     fprintf(stderr, "got response:\n----\n%s\n----\n\n", pkt->body);
- #endif
+     dbprintf(_("got response:\n----\n%s\n----\n\n"), pkt->body);
  
      for(i = 0; i < NSTREAMS; i++) {
        ports[i] = -1;
        if (strcmp(tok, "ERROR") == 0) {
            tok = strtok(NULL, "\n");
            if (tok == NULL)
-               tok = "[bogus error packet]";
-           errstr = newstralloc(errstr, tok);
+               tok = _("[bogus error packet]");
+           errstr = newvstrallocf(errstr, "%s", tok);
            *response_error = 2;
            return;
        }
            for (i = 0; i < NSTREAMS; i++) {
                tok = strtok(NULL, " ");
                if (tok == NULL || strcmp(tok, streams[i].name) != 0) {
-                   extra = vstralloc("CONNECT token is \"",
-                                     tok ? tok : "(null)",
-                                     "\": expected \"",
-                                     streams[i].name,
-                                     "\"",
-                                     NULL);
+                   extra = vstrallocf(
+                               _("CONNECT token is \"%s\": expected \"%s\""),
+                               tok ? tok : "(null)",
+                               streams[i].name);
                    goto parse_error;
                }
                tok = strtok(NULL, " \n");
                if (tok == NULL || sscanf(tok, "%d", &ports[i]) != 1) {
-                   extra = vstralloc("CONNECT ",
-                                     streams[i].name,
-                                     " token is \"",
-                                     tok ? tok : "(null)",
-                                     "\": expected a port number",
-                                     NULL);
+                   extra = vstrallocf(
+                       _("CONNECT %s token is \"%s\": expected a port number"),
+                       streams[i].name, tok ? tok : "(null)");
                    goto parse_error;
                }
            }
        if (strcmp(tok, "OPTIONS") == 0) {
            tok = strtok(NULL, "\n");
            if (tok == NULL) {
-               extra = stralloc("OPTIONS token is missing");
+               extra = vstrallocf(_("OPTIONS token is missing"));
                goto parse_error;
            }
  
                if(strncmp_const_skip(tok, "features=", tok, ch) == 0) {
                    am_release_feature_set(their_features);
                    if((their_features = am_string_to_feature(tok)) == NULL) {
-                       errstr = newvstralloc(errstr,
-                                             "OPTIONS: bad features value: ",
-                                             tok,
-                                             NULL);
+                       errstr = newvstrallocf(errstr,
+                                             _("OPTIONS: bad features value: %s"),
+                                             tok);
                        goto parse_error;
                    }
                }
            continue;
        }
  
-       extra = vstralloc("next token is \"",
-                         tok ? tok : "(null)",
-                         "\": expected \"CONNECT\", \"ERROR\" or \"OPTIONS\"",
-                         NULL);
+       extra = vstrallocf(_("next token is \"%s\": expected \"CONNECT\", \"ERROR\" or \"OPTIONS\""),
+                         tok ? tok : "(null)");
        goto parse_error;
      }
  
+     if (dumper_kencrypt == KENCRYPT_WILL_DO)
+       dumper_kencrypt = KENCRYPT_YES;
      /*
       * Connect the streams to their remote ports
       */
            continue;
        streams[i].fd = security_stream_client(sech, ports[i]);
        if (streams[i].fd == NULL) {
-           errstr = newvstralloc(errstr,
-               "[could not connect ", streams[i].name, " stream: ",
-               security_geterror(sech), "]", NULL);
+           errstr = newvstrallocf(errstr,
+               _("[could not connect %s stream: %s]"),
+               streams[i].name,
+               security_geterror(sech));
            goto connect_error;
        }
      }
            continue;
  #endif
        if (security_stream_auth(streams[i].fd) < 0) {
-           errstr = newvstralloc(errstr,
-               "[could not authenticate ", streams[i].name, " stream: ",
-               security_stream_geterror(streams[i].fd), "]", NULL);
+           errstr = newvstrallocf(errstr,
+               _("[could not authenticate %s stream: %s]"),
+               streams[i].name, 
+               security_stream_geterror(streams[i].fd));
            goto connect_error;
        }
      }
       * them, complain.
       */
      if (streams[MESGFD].fd == NULL || streams[DATAFD].fd == NULL) {
-       errstr = newstralloc(errstr, "[couldn't open MESG or INDEX streams]");
+       errstr = newvstrallocf(errstr, _("[couldn't open MESG or INDEX streams]"));
        goto connect_error;
      }
  
      return;
  
  parse_error:
-     errstr = newvstralloc(errstr,
-                         "[parse of reply message failed: ",
-                         extra ? extra : "(no additional information)",
-                         "]",
-                         NULL);
+     errstr = newvstrallocf(errstr,
+                         _("[parse of reply message failed: %s]"),
+                         extra ? extra : _("(no additional information)"));
      amfree(extra);
      *response_error = 2;
      return;
@@@ -1907,6 -1837,11 +1853,11 @@@ dumper_get_security_conf
                  return (client_username);
          } else if(strcmp(string, "ssh_keys")==0) {
                  return (ssh_keys);
+         } else if(strcmp(string, "kencrypt")==0) {
+               if (dumper_kencrypt == KENCRYPT_YES)
+                     return ("yes");
+               else
+                   return (NULL);
          }
          return(NULL);
  }
@@@ -1967,7 -1902,7 +1918,7 @@@ startup_dump
        }
      }
  
-     snprintf(level_string, SIZEOF(level_string), "%d", level);
+     g_snprintf(level_string, SIZEOF(level_string), "%d", level);
      if(strcmp(progname, "DUMP") == 0
         || strcmp(progname, "GNUTAR") == 0) {
        backup_api = "";
                    "\n",
                    NULL);
  
fprintf(stderr, "send request:\n----\n%s\n----\n\n", req);
    dbprintf(_("send request:\n----\n%s\n----\n\n"), req);
      secdrv = security_getdriver(authopt);
      if (secdrv == NULL) {
-       error("no '%s' security driver available for host '%s'",
-           authopt, hostname);
-       /*NOTREACHED*/
+       errstr = newvstrallocf(errstr,
+               _("[could not find security driver '%s']"), authopt);
+       amfree(req);
+       return 2;
      }
  
      protocol_sendreq(hostname, secdrv, dumper_get_security_conf, req,
diff --combined server-src/find.c
index 2e5dd1813489907296df8d3502bdc0f4b0c3a01e,3ff744e69c16a93cc954036e6556e9e309d92e6b..38e8fd03759b0c2c8bc025167ecf85f85a5d1d3c
  #include "logfile.h"
  #include "holding.h"
  #include "find.h"
+ #include "cmdline.h"
  
  int find_match(char *host, char *disk);
- int search_logfile(find_result_t **output_find, char *label, char *datestamp, char *logfile);
  void search_holding_disk(find_result_t **output_find);
- void strip_failed_chunks(find_result_t **output_find);
  char *find_nicedate(char *datestamp);
  static int find_compare(const void *, const void *);
  static int parse_taper_datestamp_log(char *logline, char **datestamp, char **level);
- static int seen_chunk_of(find_result_t *output_find, char *date, char *host, char *disk, int level);
+ static gboolean logfile_has_tape(char * label, char * datestamp,
+                                  char * logfile);
  
  static char *find_sort_order = NULL;
- int dynamic_disklist = 0;
- disklist_t* find_diskqp = NULL;
  
- find_result_t *
- find_dump(
-     int dyna_disklist,
-     disklist_t* diskqp)
- {
+ find_result_t * find_dump(disklist_t* diskqp) {
      char *conf_logdir, *logfile = NULL;
      int tape, maxtape, logs;
      unsigned seq;
      tape_t *tp;
      find_result_t *output_find = NULL;
  
-     dynamic_disklist = dyna_disklist;
-     find_diskqp = diskqp;
-     conf_logdir = getconf_str(CNF_LOGDIR);
-     if (*conf_logdir == '/') {
-       conf_logdir = stralloc(conf_logdir);
-     } else {
-       conf_logdir = stralloc2(config_dir, conf_logdir);
-     }
+     conf_logdir = config_dir_relative(getconf_str(CNF_LOGDIR));
      maxtape = lookup_nb_tape();
  
      for(tape = 1; tape <= maxtape; tape++) {
        for(seq = 0; 1; seq++) {
            char seq_str[NUM_STR_SIZE];
  
-           snprintf(seq_str, SIZEOF(seq_str), "%u", seq);
+           g_snprintf(seq_str, SIZEOF(seq_str), "%u", seq);
            logfile = newvstralloc(logfile,
                        conf_logdir, "/log.", tp->datestamp, ".", seq_str, NULL);
            if(access(logfile, R_OK) != 0) break;
-           logs += search_logfile(&output_find, tp->label, tp->datestamp, logfile);
+           if (search_logfile(&output_find, tp->label, tp->datestamp,
+                                logfile, diskqp)) {
+                 logs ++;
+             }
        }
  
        /* search old-style amflush log, if any */
  
-       logfile = newvstralloc(logfile,
-                              conf_logdir, "/log.", tp->datestamp, ".amflush", NULL);
+       logfile = newvstralloc(logfile, conf_logdir, "/log.",
+                                tp->datestamp, ".amflush", NULL);
        if(access(logfile,R_OK) == 0) {
-           logs += search_logfile(&output_find, tp->label, tp->datestamp, logfile);
-       }
+           if (search_logfile(&output_find, tp->label, tp->datestamp,
+                                logfile, diskqp)) {
+                 logs ++;
+             }
+         }
+         
        /* search old-style main log, if any */
  
-       logfile = newvstralloc(logfile, conf_logdir, "/log.", tp->datestamp, NULL);
+       logfile = newvstralloc(logfile, conf_logdir, "/log.", tp->datestamp,
+                                NULL);
        if(access(logfile,R_OK) == 0) {
-           logs += search_logfile(&output_find, tp->label, tp->datestamp, logfile);
+           if (search_logfile(&output_find, tp->label, tp->datestamp,
+                                logfile, diskqp)) {
+                 logs ++;
+             }
        }
        if(logs == 0 && strcmp(tp->datestamp,"0") != 0)
-           fprintf(stderr, "Warning: no log files found for tape %s written %s\n",
-                  tp->label, find_nicedate(tp->datestamp));
+           g_fprintf(stderr,
+                       _("Warning: no log files found for tape %s written %s\n"),
+                       tp->label, find_nicedate(tp->datestamp));
      }
      amfree(logfile);
      amfree(conf_logdir);
  
      search_holding_disk(&output_find);
  
-     strip_failed_chunks(&output_find);
-     
      return(output_find);
  }
  
@@@ -123,18 -119,14 +119,14 @@@ char *
  find_log(void)
  {
      char *conf_logdir, *logfile = NULL;
+     char *pathlogfile = NULL;
      int tape, maxtape, logs;
      unsigned seq;
      tape_t *tp;
      char **output_find_log = NULL;
      char **current_log;
  
-     conf_logdir = getconf_str(CNF_LOGDIR);
-     if (*conf_logdir == '/') {
-       conf_logdir = stralloc(conf_logdir);
-     } else {
-       conf_logdir = stralloc2(config_dir, conf_logdir);
-     }
+     conf_logdir = config_dir_relative(getconf_str(CNF_LOGDIR));
      maxtape = lookup_nb_tape();
  
      output_find_log = alloc((maxtape*5+10) * SIZEOF(char *));
        for(seq = 0; 1; seq++) {
            char seq_str[NUM_STR_SIZE];
  
-           snprintf(seq_str, SIZEOF(seq_str), "%u", seq);
-           logfile = newvstralloc(logfile,
-                       conf_logdir, "/log.", tp->datestamp, ".", seq_str, NULL);
-           if(access(logfile, R_OK) != 0) break;
-           if( search_logfile(NULL, tp->label, tp->datestamp, logfile)) {
-               *current_log = vstralloc("log.", tp->datestamp, ".", seq_str, NULL);
-               current_log++;
+           g_snprintf(seq_str, SIZEOF(seq_str), "%u", seq);
+           logfile = newvstralloc(logfile, "log.", tp->datestamp, ".", seq_str, NULL);
+           pathlogfile = newvstralloc(pathlogfile, conf_logdir, "/", logfile, NULL);
+           if (access(pathlogfile, R_OK) != 0) break;
+           if (logfile_has_tape(tp->label, tp->datestamp, pathlogfile)) {
+               if (current_log == output_find_log || strcmp(*(current_log-1), logfile)) {
+                   *current_log = stralloc(logfile);
+                   current_log++;
+               }
                logs++;
                break;
            }
  
        /* search old-style amflush log, if any */
  
-       logfile = newvstralloc(logfile,
-                              conf_logdir, "/log.", tp->datestamp, ".amflush", NULL);
-       if(access(logfile,R_OK) == 0) {
-           if( search_logfile(NULL, tp->label, tp->datestamp, logfile)) {
-               *current_log = vstralloc("log.", tp->datestamp, ".amflush", NULL);
-               current_log++;
+       logfile = newvstralloc(logfile, "log.", tp->datestamp, ".amflush", NULL);
+       pathlogfile = newvstralloc(pathlogfile, conf_logdir, "/", logfile, NULL);
+       if (access(pathlogfile, R_OK) == 0) {
+           if (logfile_has_tape(tp->label, tp->datestamp, pathlogfile)) {
+               if (current_log == output_find_log || strcmp(*(current_log-1), logfile)) {
+                   *current_log = stralloc(logfile);
+                   current_log++;
+               }
                logs++;
            }
        }
  
        /* search old-style main log, if any */
  
-       logfile = newvstralloc(logfile, conf_logdir, "/log.", tp->datestamp, NULL);
-       if(access(logfile,R_OK) == 0) {
-           if(search_logfile(NULL, tp->label, tp->datestamp, logfile)) {
-               *current_log = vstralloc("log.", tp->datestamp, NULL);
-               current_log++;
+       logfile = newvstralloc(logfile, "log.", tp->datestamp, NULL);
+       pathlogfile = newvstralloc(pathlogfile, conf_logdir, "/", logfile, NULL);
+       if (access(pathlogfile, R_OK) == 0) {
+           if (logfile_has_tape(tp->label, tp->datestamp, pathlogfile)) {
+               if (current_log == output_find_log || strcmp(*(current_log-1), logfile)) {
+                   *current_log = stralloc(logfile);
+                   current_log++;
+               }
                logs++;
            }
        }
        if(logs == 0 && strcmp(tp->datestamp,"0") != 0)
-           fprintf(stderr, "Warning: no log files found for tape %s written %s\n",
+           g_fprintf(stderr, _("Warning: no log files found for tape %s written %s\n"),
                   tp->label, find_nicedate(tp->datestamp));
      }
      amfree(logfile);
+     amfree(pathlogfile);
      amfree(conf_logdir);
      *current_log = NULL;
      return(output_find_log);
  }
  
- /*
-  * Remove CHUNK entries from dumps that ultimately failed from our report.
-  */
- void strip_failed_chunks(
-     find_result_t **output_find)
- {
-     find_result_t *cur, *prev = NULL, *failed = NULL, *failures = NULL;
-     /* Generate a list of failures */
-     for(cur=*output_find; cur; cur=cur->next) {
-       if(!cur->hostname  || !cur->diskname ||
-          !cur->timestamp || !cur->label)
-           continue;
-       if(strcmp(cur->status, "OK")){
-           failed = alloc(SIZEOF(find_result_t));
-           memcpy(failed, cur, SIZEOF(find_result_t));
-           failed->next = failures;
-           failures = failed;
-       }
-     }
-     /* Now if a CHUNK matches the parameters of a failed dump, remove it */
-     for(failed=failures; failed; failed=failed->next) {
-       prev = NULL;
-       cur = *output_find;
-       while (cur != NULL) {
-           find_result_t *next = cur->next;
-           if(!cur->hostname  || !cur->diskname || 
-              !cur->timestamp || !cur->label    || !cur->partnum ||
-              !strcmp(cur->partnum, "--") || strcmp(cur->status, "OK")) {
-               prev = cur;
-               cur = next;
-           }
-           else if(!strcmp(cur->hostname, failed->hostname) &&
-                !strcmp(cur->diskname, failed->diskname) &&
-                !strcmp(cur->timestamp, failed->timestamp) &&
-                !strcmp(cur->label, failed->label) &&
-                cur->level == failed->level){
-               amfree(cur->diskname);
-               amfree(cur->hostname);
-               amfree(cur->label);
-               amfree(cur->timestamp);
-               amfree(cur->partnum);
-               amfree(cur->status);
-               cur = next;
-               if (prev) {
-                   amfree(prev->next);
-                   prev->next = next;
-               } else {
-                   amfree(*output_find);
-                   *output_find = next;
-               }
-           }
-             else {
-               prev = cur;
-               cur = next;
-           }
-       }
-     }
-     for(failed=failures; failed;) {
-       find_result_t *fai = failed->next;
-       fai = failed->next;
-       amfree(failed);
-       failed=fai;
-     }
- }
  void
  search_holding_disk(
      find_result_t **output_find)
  {
-     sl_t  *holding_file_list;
-     sle_t *e;
+     GSList *holding_file_list;
+     GSList *e;
      char *holding_file;
      disk_t *dp;
      dumpfile_t file;
  
-     holding_file_list = holding_get_files(NULL, NULL, 1);
+     holding_file_list = holding_get_files(NULL, 1);
  
-     for(e = holding_file_list->first; e != NULL; e = e->next) {
-       holding_file = e->name;
+     for(e = holding_file_list; e != NULL; e = e->next) {
+       holding_file = (char *)e->data;
  
        if (!holding_file_get_dumpfile(holding_file, &file))
            continue;
        }
      }
  
-     free_sl(holding_file_list);
+     g_slist_free_full(holding_file_list);
  }
  
  static int
@@@ -327,53 -258,44 +258,44 @@@ find_compare
      const void *j1)
  {
      int compare=0;
-     find_result_t **i = (find_result_t **)i1;
-     find_result_t **j = (find_result_t **)j1;
+     find_result_t *i, *j;
  
      size_t nb_compare=strlen(find_sort_order);
      size_t k;
  
      for(k=0;k<nb_compare;k++) {
-       switch (find_sort_order[k]) {
-       case 'h' : compare=strcmp((*i)->hostname,(*j)->hostname);
-                  break;
-       case 'H' : compare=strcmp((*j)->hostname,(*i)->hostname);
+         char sort_key = find_sort_order[k];
+         if (isupper((int)sort_key)) {
+             /* swap */
+             sort_key = tolower(sort_key);
+             j = *(find_result_t **)i1;
+             i = *(find_result_t **)j1;
+         } else {
+             i = *(find_result_t **)i1;
+             j = *(find_result_t **)j1;
+         }            
+         
+       switch (sort_key) {
+       case 'h' : compare=strcmp(i->hostname,j->hostname);
                   break;
-       case 'k' : compare=strcmp((*i)->diskname,(*j)->diskname);
+       case 'k' : compare=strcmp(i->diskname,j->diskname);
                   break;
-       case 'K' : compare=strcmp((*j)->diskname,(*i)->diskname);
+       case 'd' : compare=strcmp(i->timestamp,j->timestamp);
                   break;
-       case 'd' : compare=strcmp((*i)->timestamp,(*j)->timestamp);
+       case 'l' : compare=j->level - i->level;
                   break;
-       case 'D' : compare=strcmp((*j)->timestamp,(*i)->timestamp);
-                  break;
-       case 'l' : compare=(*j)->level - (*i)->level;
-                  break;
-       case 'f' : compare=((*i)->filenum == (*j)->filenum) ? 0 :
-                          (((*i)->filenum < (*j)->filenum) ? -1 : 1);
-                  break;
-       case 'F' : compare=((*j)->filenum == (*i)->filenum) ? 0 :
-                          (((*j)->filenum < (*i)->filenum) ? -1 : 1);
-                  break;
-       case 'L' : compare=(*i)->level - (*j)->level;
-                  break;
-       case 'b' : compare=strcmp((*i)->label,(*j)->label);
-                  break;
-       case 'B' : compare=strcmp((*j)->label,(*i)->label);
+       case 'f' : compare=(i->filenum == j->filenum) ? 0 :
+                          ((i->filenum < j->filenum) ? -1 : 1);
                   break;
+       case 'b' : compare=compare_possibly_null_strings(i->label,
+                                                          j->label);
+                    break;
        case 'p' :
-                  if(strcmp((*i)->partnum, "--") != 0 &&
-                     strcmp((*j)->partnum, "--") != 0){
-                     compare = atoi((*i)->partnum) - atoi((*j)->partnum);
-                  }
-                  else compare=strcmp((*i)->partnum,(*j)->partnum);
-                  break;
-       case 'P' :
-                  if(strcmp((*i)->partnum, "--") != 0 &&
-                     strcmp((*j)->partnum, "--") != 0){
-                     compare = atoi((*j)->partnum) - atoi((*i)->partnum);
+                  if(strcmp(i->partnum, "--") != 0 &&
+                     strcmp(j->partnum, "--") != 0){
+                     compare = atoi(i->partnum) - atoi(j->partnum);
                   }
-                  else compare=strcmp((*j)->partnum,(*i)->partnum);
+                  else compare=strcmp(i->partnum,j->partnum);
                   break;
        }
        if(compare != 0)
@@@ -444,6 -366,7 +366,7 @@@ print_find_result
      for(output_find_result=output_find;
        output_find_result;
        output_find_result=output_find_result->next) {
+       char *qdiskname;
  
        len=strlen(find_nicedate(output_find_result->timestamp));
        if((int)len > max_len_datestamp)
        if((int)len > max_len_hostname)
            max_len_hostname = (int)len;
  
-       len=strlen(output_find_result->diskname);
+       qdiskname=quote_string(output_find_result->diskname);
+       len=strlen(qdiskname);
+       amfree(qdiskname);
        if((int)len > max_len_diskname)
            max_len_diskname = (int)len;
  
-       len=strlen(output_find_result->label);
-       if((int)len > max_len_label)
-           max_len_label = (int)len;
+         if (output_find_result->label != NULL) {
+             len=strlen(output_find_result->label);
+             if((int)len > max_len_label)
+                 max_len_label = (int)len;
+         }
  
        len=strlen(output_find_result->status);
        if((int)len > max_len_status)
      max_len_status = 1;
  
      if(output_find==NULL) {
-       printf("\nNo dump to list\n");
+       g_printf(_("\nNo dump to list\n"));
      }
      else {
-       printf("\ndate%*s host%*s disk%*s lv%*s tape or file%*s file%*s part%*s status\n",
+       g_printf(_("\ndate%*s host%*s disk%*s lv%*s tape or file%*s file%*s part%*s status\n"),
               max_len_datestamp-4,"",
               max_len_hostname-4 ,"",
               max_len_diskname-4 ,"",
                output_find_result;
                output_find_result=output_find_result->next) {
            char *qdiskname;
+             char * formatted_label;
  
            qdiskname = quote_string(output_find_result->diskname);
+             formatted_label = output_find_result->label;
+             if (formatted_label == NULL)
+                 formatted_label = "";
            /*@ignore@*/
-           printf("%-*s %-*s %-*s %*d %-*s %*" OFF_T_RFMT " %*s %-*s\n",
-                   max_len_datestamp, 
-                       find_nicedate(output_find_result->timestamp),
-                   max_len_hostname,  output_find_result->hostname,
-                   max_len_diskname,  qdiskname,
-                   max_len_level,     output_find_result->level,
-                   max_len_label,     output_find_result->label,
-                   max_len_filenum,   (OFF_T_FMT_TYPE)output_find_result->filenum,
-                   max_len_part,      output_find_result->partnum,
-                   max_len_status,    output_find_result->status
+           g_printf("%-*s %-*s %-*s %*d %-*s %*lld %*s %-*s\n",
+                      max_len_datestamp, 
+                      find_nicedate(output_find_result->timestamp),
+                      max_len_hostname,  output_find_result->hostname,
+                      max_len_diskname,  qdiskname,
+                      max_len_level,     output_find_result->level,
+                      max_len_label,     formatted_label,
+                      max_len_filenum,   (long long)output_find_result->filenum,
+                      max_len_part,      output_find_result->partnum,
+                      max_len_status,    output_find_result->status
                    );
            /*@end@*/
            amfree(qdiskname);
@@@ -530,7 -461,6 +461,7 @@@ free_find_result
        amfree(output_find_result->label);
        amfree(output_find_result->partnum);
        amfree(output_find_result->status);
 +      amfree(output_find_result->timestamp);
        prev = output_find_result;
      }
      amfree(prev);
@@@ -564,7 -494,7 +495,7 @@@ find_nicedate
      day   = numdate % 100;
  
      if(strlen(datestamp) <= 8) {
-       snprintf(nice, SIZEOF(nice), "%4d-%02d-%02d",
+       g_snprintf(nice, SIZEOF(nice), "%4d-%02d-%02d",
                year, month, day);
      }
      else {
        minutes = (numtime / 100) % 100;
        seconds = numtime % 100;
  
-       snprintf(nice, SIZEOF(nice), "%4d-%02d-%02d %02d:%02d:%02d",
+       g_snprintf(nice, SIZEOF(nice), "%4d-%02d-%02d %02d:%02d:%02d",
                year, month, day, hours, minutes, seconds);
      }
  
@@@ -629,123 -559,161 +560,161 @@@ parse_taper_datestamp_log
      return 1;
  }
  
- /*
-  * Check whether we've already seen a CHUNK log entry for the given dump.
-  * This is so we can interpret the final SUCCESS entry for a split dump as 
-  * 'list its parts' instead.  Return 1 if we have, 0 if not.
-  */
- int
- seen_chunk_of(
-     find_result_t *output_find,
-     char *date,
-     char *host,
-     char *disk,
-     int level)
- {
-     find_result_t *cur;
-     if(!host || !disk) return(0);
-     for(cur=output_find; cur; cur=cur->next) {
-       if(atoi(cur->partnum) < 1 || !cur->hostname || !cur->diskname) continue;
+ /* Returns TRUE if the given logfile mentions the given tape. */
+ static gboolean logfile_has_tape(char * label, char * datestamp,
+                                  char * logfile) {
+     FILE * logf;
+     char * ck_datestamp, *ck_label;
+     if((logf = fopen(logfile, "r")) == NULL) {
+       error(_("could not open logfile %s: %s"), logfile, strerror(errno));
+       /*NOTREACHED*/
+     }
  
-       if(strcmp(cur->timestamp, date) == 0 && strcmp(cur->hostname, host) == 0 &&
-               strcmp(cur->diskname, disk) == 0 && cur->level == level){
-           return(1);
+     while(get_logline(logf)) {
+       if(curlog == L_START && curprog == P_TAPER) {
+           if(parse_taper_datestamp_log(curstr,
+                                        &ck_datestamp, &ck_label) == 0) {
+               g_printf(_("strange log line \"start taper %s\" curstr='%s'\n"),
+                          logfile, curstr);
+           } else if(strcmp(ck_datestamp, datestamp) == 0
+                     && strcmp(ck_label, label) == 0) {
+                 afclose(logf);
+                 return TRUE;
+           }
        }
      }
-     return(0);
+     afclose(logf);
+     return FALSE;
  }
  
- /* if output_find is NULL                                     */
- /*    return 1 if this is the logfile for this label          */
- /*    return 0 if this is not the logfile for this label      */
- /* else                                                               */
- /*    add to output_find all the dump for this label          */
- /*    return the number of dump added.                        */
- int
+ /* Like (strcmp(label1, label2) == 0), except that NULL values force TRUE. */
+ static gboolean volume_matches(const char * label1, const char * label2) {
+     return (label1 == NULL || label2 == NULL || strcmp(label1, label2) == 0);
+ }
+ /* WARNING: Function accesses globals find_diskqp, curlog, curlog, curstr,
+  * dynamic_disklist */
+ gboolean
  search_logfile(
      find_result_t **output_find,
-     char *label,
-     char *datestamp,
-     char *logfile)
+     const char *label,
+     const char *passed_datestamp,
+     const char *logfile,
+     disklist_t * dynamic_disklist)
  {
      FILE *logf;
      char *host, *host_undo;
      char *disk, *qdisk, *disk_undo;
      char *date, *date_undo;
      char *partnum=NULL, *partnum_undo;
+     char *number;
+     int fileno;
+     char *current_label = NULL;
      char *rest;
      char *ck_label=NULL;
      int level = 0; 
-     int tapematch;
      off_t filenum;
-     int passlabel;
-     char *ck_datestamp, *ck_datestamp2;
+     char *ck_datestamp, *datestamp;
      char *s;
      int ch;
      disk_t *dp;
+     find_result_t *part_find = NULL;  /* List for all part of a DLE */
+     find_result_t *a_part_find;
+     gboolean right_label = FALSE;
+     gboolean found_something = FALSE;
+     g_return_val_if_fail(output_find != NULL, 0);
+     g_return_val_if_fail(logfile != NULL, 0);
+     datestamp = g_strdup(passed_datestamp);
  
      if((logf = fopen(logfile, "r")) == NULL) {
-       error("could not open logfile %s: %s", logfile, strerror(errno));
+       error(_("could not open logfile %s: %s"), logfile, strerror(errno));
        /*NOTREACHED*/
      }
  
-     /* check that this log file corresponds to the right tape */
-     tapematch = 0;
-     while(!tapematch && get_logline(logf)) {
-       if(curlog == L_START && curprog == P_TAPER) {
-           if(parse_taper_datestamp_log(curstr,
-                                        &ck_datestamp, &ck_label) == 0) {
-               printf("strange log line \"start taper %s\" curstr='%s'\n",
-                   logfile, curstr);
-           } else if(strcmp(ck_datestamp, datestamp) == 0
-                     && strcmp(ck_label, label) == 0) {
-               tapematch = 1;
+     filenum = (off_t)0;
+     while(get_logline(logf)) {
+       if (curlog == L_START && curprog == P_TAPER) {
+           if(parse_taper_datestamp_log(curstr, &ck_datestamp,
+                                          &ck_label) == 0) {
+               g_printf(_("strange log line in %s \"start taper %s\"\n"),
+                          logfile, curstr);
+                 continue;
+           }
+             if (datestamp != NULL) {
+                 if (strcmp(datestamp, ck_datestamp) != 0) {
+                     g_printf(_("Log file %s stamped %s, expecting %s!\n"),
+                              logfile, ck_datestamp, datestamp);
+                     break;
+                 }
+             }
+             
+             right_label = volume_matches(label, ck_label);
+           if (label && datestamp && right_label) {
+               found_something = TRUE;
            }
+             amfree(current_label);
+             current_label = g_strdup(ck_label);
+             if (datestamp == NULL) {
+                 datestamp = g_strdup(ck_datestamp);
+             }
        }
-     }
-     if(output_find == NULL) {
-       afclose(logf);
-         if(tapematch == 0)
-           return 0;
-       else
-           return 1;
-     }
-     if(tapematch == 0) {
-       afclose(logf);
-       return 0;
-     }
-     filenum = (off_t)0;
-     passlabel = 1;
-     while(get_logline(logf) && passlabel) {
-       if((curlog == L_SUCCESS || curlog == L_CHUNK || curlog == L_PARTIAL) &&
-                               curprog == P_TAPER && passlabel){
-           filenum++;
+         if (!right_label) {
+           continue;
        }
-       if(curlog == L_START && curprog == P_TAPER) {
-           if(parse_taper_datestamp_log(curstr,
-                                        &ck_datestamp2, &ck_label) == 0) {
-               printf("strange log line in %s \"start taper %s\"\n",
-                   logfile, curstr);
-           } else if (strcmp(ck_label, label)) {
-               passlabel = !passlabel;
-           }
+       if ((curlog == L_SUCCESS ||
+            curlog == L_CHUNK || curlog == L_PART || curlog == L_PARTPARTIAL) &&
+           curprog == P_TAPER) {
+           filenum++;
        }
        partnum = "--";
-       if(curlog == L_SUCCESS || curlog == L_PARTIAL || curlog == L_FAIL || curlog == L_CHUNK) {
+       if (curlog == L_SUCCESS || curlog == L_CHUNKSUCCESS ||
+           curlog == L_DONE    || curlog == L_FAIL ||
+           curlog == L_CHUNK   || curlog == L_PART || curlog == L_PARTIAL ||
+           curlog == L_PARTPARTIAL ) {
            s = curstr;
            ch = *s++;
  
            skip_whitespace(s, ch);
            if(ch == '\0') {
-               printf("strange log line in %s \"%s\"\n",
+               g_printf(_("strange log line in %s \"%s\"\n"),
                    logfile, curstr);
                continue;
            }
+           if (curlog == L_PART || curlog == L_PARTPARTIAL) {
+               char * part_label = s - 1;
+               skip_non_whitespace(s, ch);
+               s[-1] = '\0';
+               if (strcmp(current_label, part_label) != 0) {
+                   g_printf("PART label %s doesn't match START label %s\n",
+                              part_label, current_label);
+                   continue;
+               }
+               skip_whitespace(s, ch);
+               if(ch == '\0') {
+                   g_printf("strange log line in %s \"%s\"\n",
+                          logfile, curstr);
+                   continue;
+               }
+               number = s - 1;
+               skip_non_whitespace(s, ch);
+               s[-1] = '\0';
+               fileno = atoi(number);
+               filenum = fileno;
+               skip_whitespace(s, ch);
+               if(ch == '\0') {
+                   g_printf("strange log line in %s \"%s\"\n",
+                          logfile, curstr);
+                   continue;
+               }
+           }
            host = s - 1;
            skip_non_whitespace(s, ch);
            host_undo = s - 1;
  
            skip_whitespace(s, ch);
            if(ch == '\0') {
-               printf("strange log line in %s \"%s\"\n",
+               g_printf(_("strange log line in %s \"%s\"\n"),
                    logfile, curstr);
                continue;
            }
  
            skip_whitespace(s, ch);
            if(ch == '\0') {
-               printf("strange log line in %s \"%s\"\n",
-                   logfile, curstr);
+               g_printf(_("strange log line in %s \"%s\"\n"),
+                          logfile, curstr);
                continue;
            }
            date = s - 1;
            if(strlen(date) < 3) { /* old log didn't have datestamp */
                level = atoi(date);
                date = stralloc(datestamp);
-           }
-           else {
-               if(curlog == L_CHUNK){
+           } else {
+               if (curlog == L_CHUNK || curlog == L_PART ||
+                   curlog == L_PARTPARTIAL || curlog == L_DONE){
                    skip_whitespace(s, ch);
                    partnum = s - 1;
                    skip_non_whitespace(s, ch);
                }
                skip_whitespace(s, ch);
                if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) {
-                   printf("strange log line in %s \"%s\"\n",
+                   g_printf(_("strange log line in %s \"%s\"\n"),
                    logfile, curstr);
                    continue;
                }
  
            skip_whitespace(s, ch);
            if(ch == '\0') {
-               printf("strange log line in %s \"%s\"\n",
+               g_printf(_("strange log line in %s \"%s\"\n"),
                    logfile, curstr);
                continue;
            }
  
            dp = lookup_disk(host,disk);
            if ( dp == NULL ) {
-               if (dynamic_disklist == 0) {
+               if (dynamic_disklist == NULL) {
                    continue;
                }
-               dp = add_disk(find_diskqp, host, disk);
-               enqueue_disk(find_diskqp, dp);
+               dp = add_disk(dynamic_disklist, host, disk);
+               enqueue_disk(dynamic_disklist, dp);
            }
-             if(find_match(host, disk) && (curlog != L_SUCCESS ||
-               !seen_chunk_of(*output_find, date, host, disk, level))) {
+             if (find_match(host, disk)) {
                if(curprog == P_TAPER) {
                    find_result_t *new_output_find =
                        (find_result_t *)alloc(SIZEOF(find_result_t));
-                   new_output_find->next=*output_find;
                    new_output_find->timestamp = stralloc(date);
                    new_output_find->hostname=stralloc(host);
                    new_output_find->diskname=stralloc(disk);
                    new_output_find->level=level;
                    new_output_find->partnum = stralloc(partnum);
-                   new_output_find->label=stralloc(label);
+                     new_output_find->label=stralloc(current_label);
+                   new_output_find->status=NULL;
                    new_output_find->filenum=filenum;
-                   if(curlog == L_SUCCESS || curlog == L_CHUNK) 
-                       new_output_find->status=stralloc("OK");
-                   else if(curlog == L_PARTIAL)
-                       new_output_find->status=stralloc("PARTIAL");
-                   else
-                       new_output_find->status=stralloc(rest);
-                   *output_find=new_output_find;
+                   new_output_find->next=NULL;
+                   if (curlog == L_SUCCESS) {
+                       new_output_find->status = stralloc("OK");
+                       new_output_find->next = *output_find;
+                       *output_find = new_output_find;
+                         found_something = TRUE;
+                   } else if (curlog == L_CHUNKSUCCESS || curlog == L_DONE ||
+                              curlog == L_PARTIAL      || curlog == L_FAIL) {
+                       /* result line */
+                       if (curlog == L_PARTIAL || curlog == L_FAIL) {
+                           /* change status of each part */
+                           for (a_part_find = part_find; a_part_find;
+                                a_part_find = a_part_find->next) {
+                               if (curlog == L_PARTIAL)
+                                   a_part_find->status = stralloc("PARTIAL");
+                               else
+                                   a_part_find->status = stralloc(rest);
+                           }
+                       }
+                       if (part_find) { /* find last element */
+                           for (a_part_find = part_find;
+                                a_part_find->next != NULL;
+                                a_part_find=a_part_find->next) {
+                           }
+                           /* merge part_find to *output_find */
+                           a_part_find->next = *output_find;
+                           *output_find = part_find;
+                           part_find = NULL;
+                             found_something = TRUE;
+                       }
+                       free_find_result(&new_output_find);
+                   } else { /* part line */
+                       if (curlog == L_PART || curlog == L_CHUNK)
+                           new_output_find->status=stralloc("OK");
+                       else /* PARTPARTIAL */
+                           new_output_find->status=stralloc("PARTIAL");
+                       /* Add to part_find list */
+                       new_output_find->next = part_find;
+                       part_find = new_output_find;
+                       found_something = TRUE;
+                   }
                }
                else if(curlog == L_FAIL) {     /* print other failures too */
                    find_result_t *new_output_find =
                    new_output_find->hostname=stralloc(host);
                    new_output_find->diskname=stralloc(disk);
                    new_output_find->level=level;
-                   new_output_find->label=stralloc(label);
+                   new_output_find->label=NULL;
                    new_output_find->partnum=stralloc(partnum);
                    new_output_find->filenum=0;
                    new_output_find->status=vstralloc(
                         rest,
                         NULL);
                    *output_find=new_output_find;
+                     found_something = TRUE;
                }
            }
            amfree(disk);
        }
      }
+     if (part_find != NULL) {
+       if (label) {
+           /* parse log file until PARTIAL/DONE/SUCCESS/FAIL from taper */
+           while(get_logline(logf)) {
+               if (curprog == P_TAPER &&
+                   (curlog == L_DONE || curlog == L_SUCCESS ||
+                    curlog == L_PARTIAL || curlog == L_FAIL)) {
+                   break;
+               }
+           }
+       }
+       for (a_part_find = part_find; a_part_find;
+            a_part_find = a_part_find->next) {
+           if (curlog == L_PARTIAL)
+               a_part_find->status = stralloc("PARTIAL");
+           else if (curlog == L_FAIL)
+               a_part_find->status = stralloc("FAIL");
+       }
+       for (a_part_find = part_find;
+            a_part_find->next != NULL;
+            a_part_find=a_part_find->next) {
+       }
+       /* merge part_find to *output_find */
+       a_part_find->next = *output_find;
+       *output_find = part_find;
+       part_find = NULL;
+     }
      afclose(logf);
-     return 1;
+     amfree(datestamp);
+     amfree(current_label);
+     return found_something;
  }
  
  
   * Return the set of dumps that match *all* of the given patterns (we consider
   * an empty pattern to match .*, though).  If 'ok' is true, will only match
   * dumps with SUCCESS status.
+  *
+  * Returns a newly allocated list of results, where all strings are also newly
+  * allocated.  Apparently some part of Amanda leaks under this condition.
   */
  find_result_t *
  dumps_match(
        cur_result;
        cur_result=cur_result->next) {
        char level_str[NUM_STR_SIZE];
-       snprintf(level_str, SIZEOF(level_str), "%d", cur_result->level);
-       if((*hostname == '\0' || match_host(hostname, cur_result->hostname)) &&
-          (*diskname == '\0' || match_disk(diskname, cur_result->diskname)) &&
-          (*datestamp== '\0' || match_datestamp(datestamp, cur_result->timestamp)) &&
-          (*level== '\0' || match_level(level, level_str)) &&
+       g_snprintf(level_str, SIZEOF(level_str), "%d", cur_result->level);
+       if((!hostname || *hostname == '\0' || match_host(hostname, cur_result->hostname)) &&
+          (!diskname || *diskname == '\0' || match_disk(diskname, cur_result->diskname)) &&
+          (!datestamp || *datestamp== '\0' || match_datestamp(datestamp, cur_result->timestamp)) &&
+          (!level || *level== '\0' || match_level(level, level_str)) &&
           (!ok || !strcmp(cur_result->status, "OK"))){
  
            find_result_t *curmatch = alloc(SIZEOF(find_result_t));
            memcpy(curmatch, cur_result, SIZEOF(find_result_t));
  
- /*
+           curmatch->timestamp = stralloc(cur_result->timestamp);
            curmatch->hostname = stralloc(cur_result->hostname);
            curmatch->diskname = stralloc(cur_result->diskname);
-           curmatch->datestamp = stralloc(cur_result->datestamp);
-           curmatch->partnum = stralloc(cur_result->partnum);
+           curmatch->level = cur_result->level;
+           curmatch->label = stralloc(cur_result->label);
+           curmatch->filenum = cur_result->filenum;
            curmatch->status = stralloc(cur_result->status);
-           curmatch->level = stralloc(cur_result->level);
- */        
+           curmatch->partnum = stralloc(cur_result->partnum);
            curmatch->next = matches;
            matches = curmatch;
        }
      return(matches);
  }
  
+ /*
+  * Return the set of dumps that match one or more of the given dumpspecs,
+  * If 'ok' is true, only dumps with a SUCCESS status will be matched.
+  * 
+  * Returns a newly allocated list of results, where all strings are also newly
+  * allocated.  Apparently some part of Amanda leaks under this condition.
+  */
+ find_result_t *
+ dumps_match_dumpspecs(
+     find_result_t *output_find,
+     GSList        *dumpspecs,
+     int ok)
+ {
+     find_result_t *cur_result;
+     find_result_t *matches = NULL;
+     GSList        *dumpspec;
+     dumpspec_t    *ds;
+     for(cur_result=output_find;
+       cur_result;
+       cur_result=cur_result->next) {
+       char level_str[NUM_STR_SIZE];
+       g_snprintf(level_str, SIZEOF(level_str), "%d", cur_result->level);
+       for (dumpspec = dumpspecs; dumpspec; dumpspec = dumpspec->next) {
+           ds = (dumpspec_t *)dumpspec->data;
+           if((!ds->host || *ds->host == '\0' || match_host(ds->host, cur_result->hostname)) &&
+              (!ds->disk || *ds->disk == '\0' || match_disk(ds->disk, cur_result->diskname)) &&
+              (!ds->datestamp || *ds->datestamp== '\0' || match_datestamp(ds->datestamp, cur_result->timestamp)) &&
+              (!ds->level || *ds->level== '\0' || match_level(ds->level, level_str)) &&
+              (!ok || !strcmp(cur_result->status, "OK"))){
+               find_result_t *curmatch = alloc(SIZEOF(find_result_t));
+               memcpy(curmatch, cur_result, SIZEOF(find_result_t));
+               curmatch->timestamp = stralloc(cur_result->timestamp);
+               curmatch->hostname = stralloc(cur_result->hostname);
+               curmatch->diskname = stralloc(cur_result->diskname);
+               curmatch->level = cur_result->level;
+               curmatch->label = stralloc(cur_result->label);
+               curmatch->filenum = cur_result->filenum;
+               curmatch->status = stralloc(cur_result->status);
+               curmatch->partnum = stralloc(cur_result->partnum);
+               curmatch->next = matches;
+               matches = curmatch;
+               break;
+           }
+       }
+     }
+     return(matches);
+ }
  find_result_t *
  dump_exist(
      find_result_t *output_find,
diff --combined server-src/getconf.c
index 9d8394daa72ab298d544557b083176752df4ae8a,fb90b37afb0150863f3dc9a7a0b3288c53fa3b78..27d02dd660800c97887df948d54a2354c75920aa
@@@ -40,8 -40,8 +40,8 @@@ int main(int argc, char **argv)
   * HOSTNAME_INSTANCE may not be defined at this point.
   * We define it locally if it is needed...
   *
-  * If CLIENT_HOST_PRINCIPLE is defined as HOSTNAME_INSTANCE
-  * then local host is the client host principle.
+  * If CLIENT_HOST_PRINCIPAL is defined as HOSTNAME_INSTANCE
+  * then local host is the client host principal.
   */
  #ifndef HOSTNAME_INSTANCE
  #  define HOSTNAME_INSTANCE "localhost"
@@@ -62,10 -62,13 +62,13 @@@ static struct build_info 
      { "bindir",                               bindir },
      { "sbindir",                      sbindir },
      { "libexecdir",                   libexecdir },
+     { "amlibexecdir",                 amlibexecdir },
      { "mandir",                               mandir },
      { "AMANDA_TMPDIR",                        AMANDA_TMPDIR },
      { "CONFIG_DIR",                   CONFIG_DIR },
+ #ifdef MAILER
      { "MAILER",                               MAILER },
+ #endif
      { "DEFAULT_SERVER",                       DEFAULT_SERVER },
      { "DEFAULT_CONFIG",                       DEFAULT_CONFIG },
      { "DEFAULT_TAPE_SERVER",          DEFAULT_TAPE_SERVER },
        "1"
  #else
        NULL
 +#endif
 +    },
 +    { "AIX_TAPEIO",
 +#if defined(AIX_TAPEIO)
 +      "1"
 +#else
 +      NULL
  #endif
      },
      { "DUMP_RETURNS_1",
        "1"
  #else
        NULL
 +#endif
 +    },
 +    { "DEBUG_CODE",
 +#if defined(DEBUG_CODE)
 +      "1"
 +#else
 +      NULL
  #endif
      },
      { "BSD_SECURITY",
        NULL
  #endif
      },
-     { "FORCE_USERID",
- #if defined(FORCE_USERID)
+     { "CHECK_USERID",
+ #if defined(CHECK_USERID)
        "1"
  #else
        NULL
        NULL
  #endif
      },
-     { "SERVER_HOST_PRINCIPLE",
+     { "SERVER_HOST_PRINCIPAL",
+ #if defined(KRB4_SECURITY)
+       SERVER_HOST_PRINCIPAL
+ #else
+       NULL
+ #endif
+     },
+     { "SERVER_HOST_PRINCIPLE", /* backward-compatibility (spelling error) */
  #if defined(KRB4_SECURITY)
-       SERVER_HOST_PRINCIPLE
+       SERVER_HOST_PRINCIPAL
  #else
        NULL
  #endif
        NULL
  #endif
      },
-     { "CLIENT_HOST_PRINCIPLE",
+     { "CLIENT_HOST_PRINCIPAL",
+ #if defined(KRB4_SECURITY)
+       CLIENT_HOST_PRINCIPAL
+ #else
+       NULL
+ #endif
+     },
+     { "CLIENT_HOST_PRINCIPLE", /* backward-compatibility (spelling error) */
  #if defined(KRB4_SECURITY)
-       CLIENT_HOST_PRINCIPLE
+       CLIENT_HOST_PRINCIPAL
  #else
        NULL
  #endif
@@@ -417,29 -420,32 +434,32 @@@ main
      int               argc,
      char **   argv)
  {
-     char *result;
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
-     char *pgm;
-     char *conffile;
-     char *parmname;
+     char *result = NULL;
+     char *pgm = NULL;
+     char *parmname = NULL;
      int i;
      int asklist;
      char number[NUM_STR_SIZE];
-     int    new_argc,   my_argc;
-     char **new_argv, **my_argv;
      int myarg;
+     config_overwrites_t *cfg_ovr = NULL;
+     char *cfg_opt = NULL;
+     gboolean cfg_ok;
  
-     safe_fd(-1, 0);
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
-     malloc_size_1 = malloc_inuse(&malloc_hist_1);
+     safe_fd(-1, 0);
  
-     parse_conf(argc, argv, &new_argc, &new_argv);
-     my_argc = new_argc;
-     my_argv = new_argv;
+     cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
  
 -    if((pgm = strrchr(argv[0], '/')) == NULL) {
 -      pgm = argv[0];
 +    if((pgm = strrchr(my_argv[0], '/')) == NULL) {
 +      pgm = my_argv[0];
      } else {
        pgm++;
      }
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
-     if(my_argc < 2) {
-       fprintf(stderr, "Usage: %s [config] [--list] <parmname> [-o configoption]*\n", pgm);
+     if(argc < 2) {
+       g_fprintf(stderr, _("Usage: %s [config] [--list] <parmname> [-o configoption]*\n"), pgm);
        exit(1);
      }
  
      asklist = 0;
      myarg = 1;
-     if (strcmp(my_argv[1],"--list") == 0) {
+     if (strcmp(argv[1],"--list") == 0) {
        asklist = 1;
        myarg = 2;
-     } else if (my_argc > 2 && strcmp(my_argv[2],"--list") == 0) {
+     } else if (argc > 2 && strcmp(argv[2],"--list") == 0) {
        asklist = 1;
        myarg = 3;
-     } else if (my_argc > 2) {
+     } else if (argc > 2) {
        myarg = 2;
      }
  
-     if (myarg > asklist+1) {
-       config_name = stralloc(my_argv[1]);
-       config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-     } else {
-       char my_cwd[STR_SIZE];
+     if (myarg > asklist + 1)
+       cfg_opt = argv[1];
  
-       if (getcwd(my_cwd, SIZEOF(my_cwd)) == NULL) {
-           error("cannot determine current working directory");
-           /*NOTREACHED*/
-       }
-       config_dir = stralloc2(my_cwd, "/");
-       if ((config_name = strrchr(my_cwd, '/')) != NULL) {
-           config_name = stralloc(config_name + 1);
-       }
+     if (myarg >= argc) {
+       error(_("Must specify a parameter"));
      }
-     if (myarg >= my_argc) {
-       error("Must specify a parameter");
-     }
-     parmname = my_argv[myarg];
+     parmname = argv[myarg];
+     /* do the config_init() now, although the result isn't checked until the end,
+      * when we try to look up config parameters */
+     cfg_ok = config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_USE_CWD, cfg_opt);
+     if (cfg_ok) apply_config_overwrites(cfg_ovr);
  
-     safe_cd();
+     safe_cd(); /* call this *after* config_init() */
+     /* Note that we dont use check_running_as(..) here, because we may not have a configuration
+      * (e.g., when we're examining build parameters).  If folks run this as the wrong user, that's
+      * their own problem. */
  
      /*
       * Fill in the build values that need runtime help.
  #else
      i = -1;
  #endif
-     snprintf(number, SIZEOF(number), "%ld", (long)i);
+     g_snprintf(number, SIZEOF(number), "%ld", (long)i);
      build_info[1].value = stralloc(number);
  #if defined(KRB4_SECURITY)
      i = TICKET_LIFETIME;
  #else
      i = -1;
  #endif
-     snprintf(number, SIZEOF(number), "%ld", (long)i);
+     g_snprintf(number, SIZEOF(number), "%ld", (long)i);
      build_info[2].value = stralloc(number);
  
  #undef p
  
        t = stralloc(parmname + SIZEOF(p) - 1);
        if((dbname = strchr(t, ':')) == NULL) {
-           error("cannot parse %s", parmname);
+           error(_("cannot parse %s"), parmname);
            /*NOTREACHED*/
        }
        *dbname++ = '\0';
        amfree(t);
  
      } else {
-       conffile = stralloc2(config_dir, CONFFILE_NAME);
-       if(read_conffile(conffile)) {
-           error("errors processing config file \"%s\"", conffile);
-           /*NOTREACHED*/
+       /* *now* we check the result of config_init */
+       if (!cfg_ok) {
+           if (cfg_opt) {
+               error(_("errors processing conf file \"%s\""), cfg_opt);
+               /*NOTREACHED*/
+           } else {
+               error(_("errors processing conf file in current directory."));
+               /*NOTREACHED*/
+           }
        }
-       amfree(conffile);
        dbrename(config_name, DBG_SUBDIR_SERVER);
-       report_bad_conf_arg();
        if (asklist) {
-           result = getconf_list(parmname);
+           GSList *list = getconf_list(parmname);
+           GSList *iter;
+           result = stralloc("");
+           for (iter = list; iter != NULL; iter = iter->next) {
+               result = newvstralloc(result, result, iter->data, "\n", NULL);
+           }
+           g_slist_free(list);
        } else {
-           result = getconf_byname(parmname);
+           val_t *val = getconf_byname(parmname);
+           if (val) {
+               char **dispstrs = val_t_display_strs(val, FALSE);
+               result = g_strjoinv("\n", dispstrs);
+               g_strfreev(dispstrs);
+           }
        }
      }
  
      if (result == NULL) {
-       fprintf(stderr, "%s: no such parameter \"%s\"\n",
+       g_fprintf(stderr, _("%s: no such parameter \"%s\"\n"),
                get_pname(), parmname);
        fflush(stderr);
      } else {
            puts(result); /* add a '\n' */
      }
  
-     free_new_argv(new_argc, new_argv);
-     free_server_config();
      amfree(result);
-     amfree(config_dir);
-     amfree(config_name);
      for(i = 0; i < 3; i++) {
        amfree(build_info[i].value);
      }
  
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
      return 0;
  }
diff --combined server-src/holding.c
index 7d9ee32362c3ebf481ae1bd676b3f8eecff6ac99,e6a5f6626f840c98fa58729c8be134eeb2fba503..a1057f03b5922dce8b3adafb01400bc827467275
   */
  static int is_dir(char *fname);
  
+ /* Is fname an empty file?
+  *
+  * @param fname: filename (fully qualified)
+  * @returns: boolean
+  */
+ static int is_emptyfile(char *fname);
  /* sanity check that datestamp is of the form YYYYMMDD or 
   * YYYYMMDDhhmmss
   *
   */
  static int is_datestr(char *fname);
  
- /*
-  * Static variables */
- static int verbose = 0;
  /*
   * Static functions */
  
@@@ -131,151 -134,124 +134,124 @@@ is_datestr
  }
  
  /*
-  * Verbosity
+  * Recursion functions
+  *
+  * These implement a general-purpose walk down the holding-* hierarchy.
   */
- int
- holding_set_verbosity(int v)
- {
-     int old = verbose;
-     verbose = v;
-     return old;
- }
  
- /*
-  * Holding directories
+ /* Perform a custom action for this holding element (disk, dir, file, chunk).
+  *
+  * If the element is not cruft, the next step into the tree will only take place 
+  * if this function returns a nonzero value.
+  *
+  * The walk is depth-first, with the callback for an element invoked
+  * before entering that element.  Callbacks may depend on this behavior.
+  *
+  * @param datap: generic user-data pointer
+  * @param base: the parent of the element being examined, or NULL for 
+  * holding disks
+  * @param element: the name of the element being examined
+  * @param fqpath: fully qualified path to 'element'
+  * @param is_cruft: nonzero if this element doesn't belong here
+  * @returns: nonzero if the walk should descend into this element.
   */
- static void
- holding_get_directories_per_disk(
-     char *hdisk,
-     sl_t *date_list,
-     int fullpaths,
-     sl_t *rv)
+ typedef int (*holding_walk_fn)(
+     gpointer datap,
+     char *base,
+     char *element,
+     char *fqpath,
+     int is_cruft);
+ typedef enum {
+     STOP_AT_DISK,
+     STOP_AT_DIR,
+     STOP_AT_FILE,
+     STOP_AT_CHUNK
+ } stop_at_t;
+ /* Recurse over all holding chunks in a holding file.
+  *
+  * Call per_chunk_fn for each chunk of the given file
+  *
+  * datap is passed, unchanged, to all holding_walk_fns.
+  *
+  * @param hfile: holding file to examine (fully qualified path)
+  * @param datap: generic user-data pointer
+  * @param per_chunk_fn: function to call for each holding chunk
+  */
+ static void holding_walk_file(
+     char *hfile,
+     gpointer datap,
+     holding_walk_fn per_chunk_fn)
  {
-     DIR *dir;
-     struct dirent *workdir;
-     char *hdir = NULL;
-     sle_t *dl;
-     int date_found;
-     if ((dir = opendir(hdisk)) == NULL) {
-         if (verbose && errno != ENOENT)
-            printf(_("Warning: could not open holding disk %s: %s\n"),
-                   hdisk, strerror(errno));
-         return;
-     }
-     if (verbose)
-         printf(_("Scanning %s...\n"), hdisk);
-     while ((workdir = readdir(dir)) != NULL) {
-         if (is_dot_or_dotdot(workdir->d_name))
-             continue;
+     dumpfile_t file;
+     char *filename = NULL;
  
-         if(verbose) 
-             printf("  %s: ", workdir->d_name);
-             
-         hdir = newvstralloc(hdir,
-                      hdisk, "/", workdir->d_name,
-                      NULL);
+     /* Loop through all cont_filenames (subsequent chunks) */
+     filename = stralloc(hfile);
+     while (filename != NULL && filename[0] != '\0') {
+       int is_cruft = 0;
  
-         /* filter out various undesirables */
-         if (!is_dir(hdir)) {
-             if (verbose)
-                 puts(_("skipping cruft file, perhaps you should delete it."));
-         } else if (!is_datestr(workdir->d_name)) {
-             /* EXT2/3 leave these in the root of each volume */
-             if (strcmp(workdir->d_name, "lost+found")==0)
-                 puts(_("skipping system directory"));
-             if (verbose)
-                 puts(_("skipping cruft directory, perhaps you should delete it."));
-         } else {
-             /* found a holding directory -- keep it */
-           if (date_list) {
-               date_found = 0;
-               for (dl= date_list->first; dl != NULL; dl = dl->next) {
-                   if (strcmp(dl->name, workdir->d_name) == 0) {
-                       date_found = 1;
-                       break;
-                   }
-               }
-           } else {
-               date_found = 1;
-           }
-           if (date_found == 1) {
-               if (fullpaths)
-                     rv = insert_sort_sl(rv, hdir);
-               else
-                     rv = insert_sort_sl(rv, workdir->d_name);
-               if (verbose) {
-                     puts(_("found Amanda directory."));
-               }
-           }
+         /* get the header to look for cont_filename */
+         if (!holding_file_get_dumpfile(filename, &file)) {
+           is_cruft = 1;
          }
-     }
-     if (hdir) amfree(hdir);
- }
- sl_t *
- holding_get_directories(
-     char *hdisk,
-     sl_t *date_list,
-     int fullpaths)
- {
-     holdingdisk_t *hdisk_conf;
-     sl_t *rv;
-     rv = new_sl();
-     if (!rv) {
-         return NULL;
-     }
  
-     /* call _per_disk for the hdisk we were given, or for all
-      * hdisks if we were given NULL */
-     if (hdisk) {
-         holding_get_directories_per_disk(hdisk, date_list, fullpaths, rv);
-     } else {
-         for (hdisk_conf = getconf_holdingdisks(); 
-                     hdisk_conf != NULL;
-                     hdisk_conf = hdisk_conf->next) {
-             hdisk = holdingdisk_get_diskdir(hdisk_conf);
-             holding_get_directories_per_disk(hdisk, date_list, fullpaths, rv);
-         }
+       if (per_chunk_fn) 
+           per_chunk_fn(datap, 
+                       hfile, 
+                       filename, 
+                       filename, 
+                       is_cruft);
+       amfree(filename);
+         /* and go on to the next chunk if this wasn't cruft */
+       if (!is_cruft)
+           filename = stralloc(file.cont_filename);
      }
  
-     return rv;
+     amfree(filename);
  }
  
- /*
-  * Holding files
+ /* Recurse over all holding files in a holding directory.
+  *
+  * Call per_file_fn for each file, and so on, stopping at the level given by 
+  * stop_at.
+  *
+  * datap is passed, unchanged, to all holding_walk_fns.
+  *
+  * @param hdir: holding directory to examine (fully qualified path)
+  * @param datap: generic user-data pointer
+  * @param stop_at: do not proceed beyond this level of the hierarchy
+  * @param per_file_fn: function to call for each holding file
+  * @param per_chunk_fn: function to call for each holding chunk
   */
- static void
- holding_get_files_per_dir(
+ static void holding_walk_dir(
      char *hdir,
-     int fullpaths,
-     sl_t *rv)
+     gpointer datap,
+     stop_at_t stop_at,
+     holding_walk_fn per_file_fn,
+     holding_walk_fn per_chunk_fn)
  {
      DIR *dir;
      struct dirent *workdir;
      char *hfile = NULL;
      dumpfile_t dumpf;
      int dumpf_ok;
+     int proceed = 1;
  
      if ((dir = opendir(hdir)) == NULL) {
-         if (verbose && errno != ENOENT)
-            printf(_("Warning: could not open holding dir %s: %s\n"),
+         if (errno != ENOENT)
+            dbprintf(_("Warning: could not open holding dir %s: %s\n"),
                    hdir, strerror(errno));
          return;
      }
  
-     if (verbose)
-         printf(_("Scanning %s...\n"), hdir);
      while ((workdir = readdir(dir)) != NULL) {
+       int is_cruft = 0;
          if (is_dot_or_dotdot(workdir->d_name))
-             continue;
+             continue; /* expected cruft */
  
          hfile = newvstralloc(hfile,
                       hdir, "/", workdir->d_name,
  
          /* filter out various undesirables */
          if (is_emptyfile(hfile))
-             continue;
+             is_cruft = 1;
  
          if (is_dir(hfile)) {
-             if (verbose)
-                 printf(_("%s: ignoring directory\n"), hfile);
-             continue;
+             is_cruft= 1;
          }
  
          if (!(dumpf_ok=holding_file_get_dumpfile(hfile, &dumpf)) ||
              dumpf.type != F_DUMPFILE) {
              if (dumpf_ok && dumpf.type == F_CONT_DUMPFILE)
                  continue; /* silently skip expected file */
-             if (verbose)
-                 printf(_("%s: not a dumpfile\n"), hfile);
-             continue;
+             is_cruft = 1;
          }
  
        if (dumpf.dumplevel < 0 || dumpf.dumplevel > 9) {
-             if (verbose)
-                 printf(_("%s: ignoring file with bogus dump level %d.\n"),
-                        hfile, dumpf.dumplevel);
-           continue;
+           is_cruft = 1;
        }
  
-         /* found a holding file -- keep it */
-         if (fullpaths)
-             rv = insert_sort_sl(rv, hfile);
-         else
-             rv = insert_sort_sl(rv, workdir->d_name);
+       if (per_file_fn) 
+           proceed = per_file_fn(datap, 
+                       hdir, 
+                       workdir->d_name, 
+                       hfile, 
+                       is_cruft);
+       if (!is_cruft && proceed && stop_at != STOP_AT_FILE)
+           holding_walk_file(hfile,
+                   datap,
+                   per_chunk_fn);
+     }
+     closedir(dir);
+     amfree(hfile);
+ }
+ /* Recurse over all holding directories in a holding disk.
+  *
+  * Call per_dir_fn for each dir, and so on, stopping at the level given by 
+  * stop_at.
+  *
+  * datap is passed, unchanged, to all holding_walk_fns.
+  *
+  * @param hdisk: holding disk to examine (fully qualified path)
+  * @param datap: generic user-data pointer
+  * @param stop_at: do not proceed beyond this level of the hierarchy
+  * @param per_dir_fn: function to call for each holding dir
+  * @param per_file_fn: function to call for each holding file
+  * @param per_chunk_fn: function to call for each holding chunk
+  */
+ static void 
+ holding_walk_disk(
+     char *hdisk,
+     gpointer datap,
+     stop_at_t stop_at,
+     holding_walk_fn per_dir_fn,
+     holding_walk_fn per_file_fn,
+     holding_walk_fn per_chunk_fn)
+ {
+     DIR *dir;
+     struct dirent *workdir;
+     char *hdir = NULL;
+     int proceed = 1;
+     if ((dir = opendir(hdisk)) == NULL) {
+         if (errno != ENOENT)
+            dbprintf(_("Warning: could not open holding disk %s: %s\n"),
+                   hdisk, strerror(errno));
+         return;
+     }
+     while ((workdir = readdir(dir)) != NULL) {
+       int is_cruft = 0;
+         if (is_dot_or_dotdot(workdir->d_name))
+             continue; /* expected cruft */
+         hdir = newvstralloc(hdir,
+                      hdisk, "/", workdir->d_name,
+                      NULL);
+         /* detect cruft */
+         if (!is_dir(hdir)) {
+           is_cruft = 1;
+         } else if (!is_datestr(workdir->d_name)) {
+             /* EXT2/3 leave these in the root of each volume */
+             if (strcmp(workdir->d_name, "lost+found") == 0)
+               continue; /* expected cruft */
+           else
+               is_cruft = 1; /* unexpected */
+         }
+       if (per_dir_fn) 
+           proceed = per_dir_fn(datap, 
+                       hdisk, 
+                       workdir->d_name, 
+                       hdir, 
+                       is_cruft);
+       if (!is_cruft && proceed && stop_at != STOP_AT_DIR)
+           holding_walk_dir(hdir,
+                   datap,
+                   stop_at,
+                   per_file_fn,
+                   per_chunk_fn);
+     }
+     closedir(dir);
+     amfree(hdir);
+ }
+ /* Recurse over all holding disks.
+  *
+  * Call per_disk_fn for each disk, per_dir_fn for each dir, and so on, stopping
+  * at the level given by stop_at.
+  *
+  * datap is passed, unchanged, to all holding_walk_fns.
+  *
+  * @param datap: generic user-data pointer
+  * @param stop_at: do not proceed beyond this level of the hierarchy
+  * @param per_disk_fn: function to call for each holding disk
+  * @param per_dir_fn: function to call for each holding dir
+  * @param per_file_fn: function to call for each holding file
+  * @param per_chunk_fn: function to call for each holding chunk
+  */
+ static void 
+ holding_walk(
+     gpointer datap,
+     stop_at_t stop_at,
+     holding_walk_fn per_disk_fn,
+     holding_walk_fn per_dir_fn,
+     holding_walk_fn per_file_fn,
+     holding_walk_fn per_chunk_fn)
+ {
+     holdingdisk_t *hdisk_conf;
+     char *hdisk;
+     int proceed = 1;
+     for (hdisk_conf = getconf_holdingdisks(); 
+               hdisk_conf != NULL;
+               hdisk_conf = holdingdisk_next(hdisk_conf)) {
+       int is_cruft = 0;
+       hdisk = holdingdisk_get_diskdir(hdisk_conf);
+       if (!is_dir(hdisk))
+           is_cruft = 1;
+       if (per_disk_fn) 
+           proceed = per_disk_fn(datap, 
+                       NULL, 
+                       hdisk, 
+                       hdisk, 
+                       0);
+       if (proceed && stop_at != STOP_AT_DISK)
+           holding_walk_disk(hdisk,
+                   datap,
+                   stop_at,
+                   per_dir_fn,
+                   per_file_fn,
+                   per_chunk_fn);
      }
+ }
+ /*
+  * holding_get_* functions
+  */
+ typedef struct {
+     GSList *result;
+     int fullpaths;
+ } holding_get_datap_t;
  
-     if (hfile) amfree(hfile);
+ /* Functor for holding_get_*; adds 'element' or 'fqpath' to
+  * the result.
+  */
+ static int
+ holding_get_walk_fn(
+     gpointer datap,
+     G_GNUC_UNUSED char *base,
+     char *element,
+     char *fqpath,
+     int is_cruft)
+ {
+     holding_get_datap_t *data = (holding_get_datap_t *)datap;
+     /* ignore cruft */
+     if (is_cruft) return 0;
+     if (data->fullpaths)
+       data->result = g_slist_insert_sorted(data->result,
+               stralloc(fqpath), 
+               g_compare_strings);
+     else
+       data->result = g_slist_insert_sorted(data->result, 
+               stralloc(element), 
+               g_compare_strings);
+     /* don't proceed any deeper */
+     return 0;
  }
  
- sl_t *
+ GSList *
+ holding_get_disks(void)
+ {
+     holding_get_datap_t data;
+     data.result = NULL;
+     data.fullpaths = 1; /* ignored anyway */
+     holding_walk((gpointer)&data,
+       STOP_AT_DISK,
+       holding_get_walk_fn, NULL, NULL, NULL);
+     return data.result;
+ }
+ GSList *
  holding_get_files(
      char *hdir,
-     sl_t *date_list,
      int fullpaths)
  {
-     sl_t *hdirs;
-     sle_t *e;
-     sl_t *rv;
-     rv = new_sl();
-     if (!rv) {
-         return NULL;
-     }
+     holding_get_datap_t data;
+     data.result = NULL;
+     data.fullpaths = fullpaths;
  
-     /* call _per_dir for the hdir we were given, or for all
-      * hdir if we were given NULL */
      if (hdir) {
-         holding_get_files_per_dir(hdir, fullpaths, rv);
+         holding_walk_dir(hdir, (gpointer)&data,
+           STOP_AT_FILE,
+           holding_get_walk_fn, NULL);
      } else {
-         hdirs = holding_get_directories(NULL, date_list, 1);
-         for (e = hdirs->first; e != NULL; e = e->next) {
-             holding_get_files_per_dir(e->name, fullpaths, rv);
-         }
+         holding_walk((gpointer)&data,
+           STOP_AT_FILE,
+           NULL, NULL, holding_get_walk_fn, NULL);
      }
  
-     return rv;
+     return data.result;
+ }
+ GSList *
+ holding_get_file_chunks(char *hfile)
+ {
+     holding_get_datap_t data;
+     data.result = NULL;
+     holding_walk_file(hfile, (gpointer)&data,
+       holding_get_walk_fn);
+     return data.result;
  }
  
sl_t *
GSList *
  holding_get_files_for_flush(
-     sl_t *dateargs,
-     int interactive)
+     GSList *dateargs)
  {
-     sl_t *date_list;
-     sl_t *file_list;
-     sl_t *result_list;
-     sle_t *datearg;
-     sle_t *date, *next_date;
-     sle_t *file_elt;
+     GSList *file_list, *file_elt;
+     GSList *date;
+     int date_matches;
      disk_t *dp;
-     char *host;
-     char *disk;
-     char *datestamp;
-     filetype_t filetype;
-     /* make date_list the intersection of available holding directories and
-      * the dateargs parameter.  */
-     if (dateargs) {
-         int ok;
-         date_list = pick_all_datestamp(verbose);
-         for (date = date_list->first; date != NULL;) {
-             next_date = date->next;
-             ok = 0;
-             for(datearg=dateargs->first; datearg != NULL && ok==0;
-                 datearg = datearg->next) {
-                 ok = match_datestamp(datearg->name, date->name);
-             }
-             if(ok == 0) { /* remove dir */
-                 remove_sl(date_list, date);
-             }
-             date = next_date;
-         }
-     }
-     else {
-         /* no date args were provided, so use everything */
-         if (interactive)
-             date_list = pick_datestamp(verbose);
-         else
-             date_list = pick_all_datestamp(verbose);
-     }
-     result_list = new_sl();
-     if (!result_list) {
-         return NULL;
-     }
+     dumpfile_t file;
+     GSList *result_list = NULL;
  
-     /* loop over *all* files, checking each one */
-     file_list = holding_get_files(NULL, date_list, 1);
-     for (file_elt = file_list->first; file_elt != NULL; file_elt = file_elt->next) {
+     /* loop over *all* files, checking each one's datestamp against the expressions
+      * in dateargs */
+     file_list = holding_get_files(NULL, 1);
+     for (file_elt = file_list; file_elt != NULL; file_elt = file_elt->next) {
          /* get info on that file */
-         filetype = holding_file_read_header(file_elt->name, &host, &disk, NULL, &datestamp);
-         if (filetype != F_DUMPFILE)
+       if (!holding_file_get_dumpfile((char *)file_elt->data, &file))
+           continue;
+         if (file.type != F_DUMPFILE)
+             continue;
+       if (dateargs) {
+           date_matches = 0;
+           /* loop over date args, until we find a match */
+           for (date = dateargs; date !=NULL; date = date->next) {
+               if (strcmp((char *)date->data, file.datestamp) == 0) {
+                   date_matches = 1;
+                   break;
+               }
+           }
+       } else {
+           /* if no date list was provided, then all dates match */
+           date_matches = 1;
+       }
+         if (!date_matches)
              continue;
  
          /* check that the hostname and disk are in the disklist */
-         dp = lookup_disk(host, disk);
+         dp = lookup_disk(file.name, file.disk);
          if (dp == NULL) {
-             if (verbose)
-               printf(_("%s: disk %s:%s not in database, skipping it."),
-                         file_elt->name, host, disk);
+           dbprintf(_("%s: disk %s:%s not in database, skipping it."),
+                         (char *)file_elt->data, file.name, file.disk);
              continue;
          }
  
          /* passed all tests -- we'll flush this file */
-         result_list = insert_sort_sl(result_list, file_elt->name);
+         result_list = g_slist_insert_sorted(result_list, 
+           stralloc(file_elt->data), 
+           g_compare_strings);
      }
  
-     if (date_list) free_sl(date_list);
-     if (file_list) free_sl(file_list);
+     if (file_list) g_slist_free_full(file_list);
  
      return result_list;
  }
  
sl_t *
- holding_get_file_chunks(char *hfile)
GSList *
+ holding_get_all_datestamps(void)
  {
-     dumpfile_t file;
-     char *filename;
-     sl_t *rv = new_sl();
-     if (!rv) {
-         return NULL;
+     GSList *all_files, *file;
+     GSList *datestamps = NULL;
+     /* enumerate all files */
+     all_files = holding_get_files(NULL, 1);
+     for (file = all_files; file != NULL; file = file->next) {
+       dumpfile_t dfile;
+       if (!holding_file_get_dumpfile((char *)file->data, &dfile))
+           continue;
+       if (!g_slist_find_custom(datestamps, dfile.datestamp,
+                                g_compare_strings)) {
+           datestamps = g_slist_insert_sorted(datestamps, 
+                                              stralloc(dfile.datestamp), 
+                                              g_compare_strings);
+       }
      }
  
-     /* Loop through all cont_filenames (subsequent chunks) */
-     filename = stralloc(hfile);
-     while (filename != NULL && filename[0] != '\0') {
-         /* get the header to look for cont_filename */
-         if (!holding_file_get_dumpfile(filename, &file)) {
-             if (verbose)
-                 printf(_("holding_get_file_chunks: open of %s failed.\n"), filename);
-             amfree(filename);
-             return rv;
-         }
-         /* add the file to the results */
-         insert_sort_sl(rv, filename);
+     g_slist_free_full(all_files);
  
-         /* and go on to the next chunk */
-         filename = newstralloc(filename, file.cont_filename);
-     }
-     amfree(filename);
-     return rv;
+     return datestamps;
  }
  
  off_t
@@@ -472,8 -604,7 +604,7 @@@ holding_file_size
      while (filename != NULL && filename[0] != '\0') {
          /* stat the file for its size */
          if (stat(filename, &finfo) == -1) {
-             if (verbose)
-                 printf(_("stat %s: %s\n"), filename, strerror(errno));
+           dbprintf(_("stat %s: %s\n"), filename, strerror(errno));
              return (off_t)-1;
          }
          size += (finfo.st_size+(off_t)1023)/(off_t)1024;
  
          /* get the header to look for cont_filename */
          if (!holding_file_get_dumpfile(filename, &file)) {
-             if (verbose)
-                 printf(_("holding_file_size: open of %s failed.\n"), filename);
+           dbprintf(_("holding_file_size: open of %s failed.\n"), filename);
              amfree(filename);
              return (off_t)-1;
          }
@@@ -500,56 -630,23 +630,23 @@@ in
  holding_file_unlink(
      char *hfile)
  {
-     sl_t *chunklist;
-     sle_t *chunk;
+     GSList *chunklist;
+     GSList *chunk;
  
      chunklist = holding_get_file_chunks(hfile);
      if (!chunklist)
          return 0;
  
-     for (chunk = chunklist->first; chunk != NULL; chunk = chunk->next) {
-         if (unlink(chunk->name)<0) {
-             if (verbose)
-                 printf(_("holding_file_unlink: could not unlink %s: %s\n"),
-                     chunk->name, strerror(errno));
+     for (chunk = chunklist; chunk != NULL; chunk = chunk->next) {
+         if (unlink((char *)chunk->data)<0) {
+           dbprintf(_("holding_file_unlink: could not unlink %s: %s\n"),
+                     (char *)chunk->data, strerror(errno));
              return 0;
          }
      }
      return 1;
  }
  
- filetype_t
- holding_file_read_header( 
-     char *    fname,
-     char **   hostname,
-     char **   diskname,
-     int *     level,
-     char ** datestamp)
- {
-     dumpfile_t file;
-     if (hostname) *hostname = NULL;
-     if (diskname) *diskname = NULL;
-     if (datestamp) *datestamp = NULL;
-     if (!holding_file_get_dumpfile(fname, &file)) {
-         return F_UNKNOWN;
-     }
-     if(file.type != F_DUMPFILE && file.type != F_CONT_DUMPFILE) {
-         return file.type;
-     }
-     if (hostname) *hostname = stralloc(file.name);
-     if (diskname) *diskname = stralloc(file.disk);
-     if (level) *level = file.dumplevel;
-     if (datestamp) *datestamp = stralloc(file.datestamp);
-     return file.type;
- }
  int
  holding_file_get_dumpfile(
      char *    fname,
  
      fh_init(file);
      file->type = F_UNKNOWN;
-     if((fd = open(fname, O_RDONLY)) == -1)
+     if((fd = robust_open(fname, O_RDONLY, 0)) == -1)
          return 0;
  
      if(fullread(fd, buffer, SIZEOF(buffer)) != (ssize_t)sizeof(buffer)) {
  }
  
  /*
-  * Interactive functions 
+  * Cleanup
   */
  
- sl_t *
- pick_all_datestamp(
-     int       v)
+ typedef struct {
+     corrupt_dle_fn corrupt_dle;
+     FILE *verbose_output;
+ } holding_cleanup_datap_t;
+ static int
+ holding_cleanup_disk(
+     gpointer datap,
+     G_GNUC_UNUSED char *base,
+     G_GNUC_UNUSED char *element,
+     char *fqpath,
+     int is_cruft)
+ {
+     holding_cleanup_datap_t *data = (holding_cleanup_datap_t *)datap;
+     if (data->verbose_output) {
+       if (is_cruft)
+           g_fprintf(data->verbose_output, 
+               _("Invalid holding disk '%s'\n"), fqpath);
+       else
+           g_fprintf(data->verbose_output, 
+               _("Cleaning up holding disk '%s'\n"), fqpath);
+     }
+     return 1;
+ }
+ static int
+ holding_cleanup_dir(
+     gpointer datap,
+     G_GNUC_UNUSED char *base,
+     char *element,
+     char *fqpath,
+     int is_cruft)
  {
-     int old_verbose = holding_set_verbosity(v);
-     sl_t *rv;
+     holding_cleanup_datap_t *data = (holding_cleanup_datap_t *)datap;
+     if (is_cruft) {
+       if (data->verbose_output)
+           g_fprintf(data->verbose_output, 
+               _("Invalid holding directory '%s'\n"), fqpath);
+       return 0;
+     }
  
-     /* get all holding directories, without full paths -- this
-      * will be datestamps only */
-     rv = holding_get_directories(NULL, NULL, 0);
+     /* try removing it */
+     if (rmdir(fqpath) == 0) {
+       /* success, so don't try to walk into it */
+       if (data->verbose_output)
+           g_fprintf(data->verbose_output,
+               _(" ..removed empty directory '%s'\n"), element);
+       return 0;
+     }
  
-     holding_set_verbosity(old_verbose);
-     return rv;
+     if (data->verbose_output)
+       g_fprintf(data->verbose_output, 
+           _(" ..cleaning up holding directory '%s'\n"), element);
+     return 1;
  }
  
- sl_t *
- pick_datestamp(
-     int               verbose)
+ static int
+ holding_cleanup_file(
+     gpointer datap,
+     G_GNUC_UNUSED char *base,
+     char *element,
+     char *fqpath,
+     int is_cruft)
  {
-     sl_t *holding_list;
-     sl_t *r_holding_list = NULL;
-     sle_t *dir;
-     char **directories = NULL;
-     int i;
-     char *answer = NULL;
-     char *a = NULL;
-     int ch = 0;
-     char max_char = '\0', chupper = '\0';
-     holding_list = pick_all_datestamp(verbose);
-     if(holding_list->nb_element == 0) {
-       return holding_list;
+     holding_cleanup_datap_t *data = (holding_cleanup_datap_t *)datap;
+     int stat;
+     int l;
+     dumpfile_t file;
+     disk_t *dp;
+     if (is_cruft) {
+       if (data->verbose_output)
+           g_fprintf(data->verbose_output, 
+               _("Invalid holding file '%s'\n"), element);
+       return 0;
      }
-     else if(holding_list->nb_element == 1 || !verbose) {
-       return holding_list;
+     stat = holding_file_get_dumpfile(fqpath, &file);
+     if (!stat) {
+       if (data->verbose_output)
+           g_fprintf(data->verbose_output, 
+               _("Could not read read header from '%s'\n"), element);
+       return 0;
      }
-     else {
-       directories = alloc((holding_list->nb_element) * SIZEOF(char *));
-       for(dir = holding_list->first, i=0; dir != NULL; dir = dir->next,i++) {
-           directories[i] = dir->name;
-       }
  
-       while(1) {
-           puts(_("\nMultiple Amanda directories, please pick one by letter:"));
-           for(dir = holding_list->first, max_char = 'A';
-               dir != NULL && max_char <= 'Z';
-               dir = dir->next, max_char++) {
-               printf("  %c. %s\n", max_char, dir->name);
-           }
-           max_char--;
-           printf(_("Select directories to flush [A..%c]: [ALL] "), max_char);
-           fflush(stdout); fflush(stderr);
-           amfree(answer);
-           if ((answer = agets(stdin)) == NULL) {
-               clearerr(stdin);
-               continue;
-           }
+     if (file.type != F_DUMPFILE && file.type != F_CONT_DUMPFILE) {
+       if (data->verbose_output)
+           g_fprintf(data->verbose_output, 
+               _("File '%s' is not a dump file\n"), element);
+       return 0;
+     }
  
-           if (*answer == '\0' || strncasecmp(answer, "ALL", 3) == 0) {
-               break;
-           }
+     if(file.dumplevel < 0 || file.dumplevel > 9) {
+       if (data->verbose_output)
+           g_fprintf(data->verbose_output, 
+               _("File '%s' has invalid level %d\n"), element, file.dumplevel);
+       return 0;
+     }
  
-           a = answer;
-           while ((ch = *a++) != '\0') {
-               if (!isspace(ch))
-                   break;
-           }
+     dp = lookup_disk(file.name, file.disk);
  
-           do {
-               if (isspace(ch) || ch == ',') {
-                   continue;
-               }
-               chupper = (char)toupper(ch);
-               if (chupper < 'A' || chupper > max_char) {
-                   free_sl(r_holding_list);
-                   r_holding_list = NULL;
-                   break;
-               }
-               r_holding_list = append_sl(r_holding_list,
-                                          directories[chupper - 'A']);
-           } while ((ch = *a++) != '\0');
-           if (r_holding_list && ch == '\0') {
-               free_sl(holding_list);
-               holding_list = r_holding_list;
-               break;
-           }
+     if (dp == NULL) {
+       if (data->verbose_output)
+           g_fprintf(data->verbose_output, 
+               _("File '%s' is for '%s:%s', which is not in the disklist\n"), 
+                   element, file.name, file.disk);
+       return 0;
+     }
+     if ((l = strlen(element)) >= 7 && strncmp(&fqpath[l-4],".tmp",4) == 0) {
+       char *destname;
+       /* generate a name without '.tmp' */
+       destname = stralloc(fqpath);
+       destname[strlen(destname) - 4] = '\0';
+       /* OK, it passes muster -- rename it to salvage some data,
+        * and mark the DLE as corrupted */
+       if (data->verbose_output)
+           g_fprintf(data->verbose_output, 
+               _("Processing partial holding file '%s'\n"), element);
+       if(rename_tmp_holding(destname, 0)) {
+           if (data->corrupt_dle)
+               data->corrupt_dle(dp->host->hostname, dp->name);
+       } else {
+           dbprintf(_("rename_tmp_holding(%s) failed\n"), destname);
+           if (data->verbose_output)
+               g_fprintf(data->verbose_output, 
+                   _("Rename of '%s' to '%s' failed.\n"), element, destname);
        }
+       amfree(destname);
      }
-     amfree(directories);
-     amfree(answer);
-     return holding_list;
+     return 1;
+ }
+ void
+ holding_cleanup(
+     corrupt_dle_fn corrupt_dle,
+     FILE *verbose_output)
+ {
+     holding_cleanup_datap_t data;
+     data.corrupt_dle = corrupt_dle;
+     data.verbose_output = verbose_output;
+     holding_walk((gpointer)&data,
+       STOP_AT_FILE,
+       holding_cleanup_disk,
+       holding_cleanup_dir,
+       holding_cleanup_file,
+       NULL);
  }
  
  /*
@@@ -693,8 -857,8 +857,8 @@@ rename_tmp_holding
      filename = stralloc(holding_file);
      while(filename != NULL && filename[0] != '\0') {
        filename_tmp = newvstralloc(filename_tmp, filename, ".tmp", NULL);
-       if((fd = open(filename_tmp,O_RDONLY)) == -1) {
-           fprintf(stderr,_("rename_tmp_holding: open of %s failed: %s\n"),filename_tmp,strerror(errno));
+       if((fd = robust_open(filename_tmp,O_RDONLY, 0)) == -1) {
+           dbprintf(_("rename_tmp_holding: open of %s failed: %s\n"),filename_tmp,strerror(errno));
            amfree(filename);
            amfree(filename_tmp);
            return 0;
        close(fd);
  
        if(rename(filename_tmp, filename) != 0) {
-           fprintf(stderr,
-                   _("rename_tmp_holding: could not rename \"%s\" to \"%s\": %s"),
+           dbprintf(_("rename_tmp_holding: could not rename \"%s\" to \"%s\": %s"),
                    filename_tmp, filename, strerror(errno));
        }
  
        if (buflen <= 0) {
-           fprintf(stderr,_("rename_tmp_holding: %s: empty file?\n"), filename);
+           dbprintf(_("rename_tmp_holding: %s: empty file?\n"), filename);
            amfree(filename);
            amfree(filename_tmp);
            return 0;
        }
        parse_file_header(buffer, &file, (size_t)buflen);
        if(complete == 0 ) {
-           if((fd = open(filename, O_RDWR)) == -1) {
-               fprintf(stderr, _("rename_tmp_holdingX: open of %s failed: %s\n"),
+             char * header;
+           if((fd = robust_open(filename, O_RDWR, 0)) == -1) {
+               dbprintf(_("rename_tmp_holdingX: open of %s failed: %s\n"),
                        filename, strerror(errno));
                amfree(filename);
                amfree(filename_tmp);
  
            }
            file.is_partial = 1;
-           build_header(buffer, &file, SIZEOF(buffer));
-           fullwrite(fd, buffer, SIZEOF(buffer));
+             header = build_header(&file, DISK_BLOCK_BYTES);
+           fullwrite(fd, header, DISK_BLOCK_BYTES);
            close(fd);
        }
        filename = newstralloc(filename, file.cont_filename);
      return 1;
  }
  
 +void
 +cleanup_holdingdisk(
 +    char *    diskdir,
 +    int               verbose)
 +{
 +    DIR *topdir;
 +    struct dirent *workdir;
 +
 +    if((topdir = opendir(diskdir)) == NULL) {
 +      if(verbose && errno != ENOENT)
 +          printf(_("Warning: could not open holding dir %s: %s\n"),
 +                 diskdir, strerror(errno));
 +      return;
 +   }
 +
 +    /* find all directories of the right format  */
 +
 +    if(verbose)
 +      printf(_("Scanning %s...\n"), diskdir);
 +    if ((chdir(diskdir)) == -1) {
 +      log_add(L_INFO, _("%s: could not chdir: %s"),
 +                  diskdir, strerror(errno));
 +    }
 +    while((workdir = readdir(topdir)) != NULL) {
 +      if(strcmp(workdir->d_name, ".") == 0
 +         || strcmp(workdir->d_name, "..") == 0
 +         || strcmp(workdir->d_name, "lost+found") == 0)
 +          continue;
 +
 +      if(verbose)
 +          printf("  %s: ", workdir->d_name);
 +      if(!is_dir(workdir->d_name)) {
 +          if(verbose)
 +              puts(_("skipping cruft file, perhaps you should delete it."));
 +      }
 +      else if(!is_datestr(workdir->d_name)) {
 +          if(verbose && (strcmp(workdir->d_name, "lost+found")!=0) )
 +              puts(_("skipping cruft directory, perhaps you should delete it."));
 +      }
 +      else if(rmdir(workdir->d_name) == 0) {
 +          if(verbose)
 +              puts(_("deleted empty Amanda directory."));
 +      }
 +     }
 +     closedir(topdir);
 +}
 +
  
  int
  mkholdingdir(
diff --combined server-src/infofile.c
index 6ceca7ef5f39e71bb2eec71a68c2ba71f1944dc1,b7db7a89472eea3f835281c00c305fd9027906de..7454382a2396dc08be891c0f2869c2f8acf39b36
@@@ -36,7 -36,6 +36,6 @@@
  
  static void zero_info(info_t *);
  
- #ifdef TEXTDB
    static char *infodir = (char *)0;
    static char *infofile = (char *)0;
    static char *newinfofile;
    static int read_txinfofile(FILE *, info_t *);
    static int write_txinfofile(FILE *, info_t *);
    static int delete_txinfofile(char *, char *);
- #else
- #  define MAX_KEY 256
- /*#  define HEADER    (SIZEOF(info_t)-DUMP_LEVELS*SIZEOF(stats_t))*/
-   static DBM *infodb = NULL;
-   static lockfd = -1;
- #endif
- #ifdef TEXTDB
  
  static FILE *
  open_txinfofile(
@@@ -85,7 -75,7 +75,7 @@@
  
      /* create the directory structure if in write mode */
      if (writing) {
-         if (mkpdir(infofile, 02755, (uid_t)-1, (gid_t)-1) == -1) {
+         if (mkpdir(infofile, 0755, (uid_t)-1, (gid_t)-1) == -1) {
            amfree(infofile);
            return NULL;
        }
@@@ -159,7 -149,7 +149,7 @@@ read_txinfofile
        amfree(line);
      }
      if (line == NULL) return -1;
-     rc = sscanf(line, "version: %d", &version);
+     rc = sscanf(line, _("version: %d"), &version);
      amfree(line);
      if(rc != 1) return -2;
  
        amfree(line);
      }
      if (line == NULL) return -1;
-     rc = sscanf(line, "command: %u", &info->command);
+     rc = sscanf(line, _("command: %u"), &info->command);
      amfree(line);
      if(rc != 1) return -2;
  
  
      for(rc = -2; (line = agets(infof)) != NULL; free(line)) {
        stats_t onestat;        /* one stat record */
-       time_t date = 0;
-         time_t *date_p = &date;
-         time_t *secs_p;
        int level = 0;
+       long long off_t_tmp;
+       intmax_t time_t_tmp;
  
        if (line[0] == '\0')
            continue;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);
-       if(ch == '\0' || sscanf((s - 1), OFF_T_FMT,
-                               (OFF_T_FMT_TYPE *)&onestat.size) != 1) {
+       if(ch == '\0' || sscanf((s - 1), "%lld", &off_t_tmp) != 1) {
            break;
        }
+       onestat.size = (off_t)off_t_tmp;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);
-       if(ch == '\0' || sscanf((s - 1), OFF_T_FMT,
-                               (OFF_T_FMT_TYPE *)&onestat.csize) != 1) {
+       if(ch == '\0' || sscanf((s - 1), "%lld", &off_t_tmp) != 1) {
            break;
        }
+       onestat.csize = (off_t)off_t_tmp;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);
-         secs_p = &onestat.secs;
-       if(ch == '\0' || sscanf((s - 1), TIME_T_FMT,
-                               (TIME_T_FMT_TYPE *)secs_p) != 1) {
+       if(ch == '\0' || sscanf((s - 1), "%jd", &time_t_tmp) != 1) {
            break;
        }
+         onestat.secs = (time_t)time_t_tmp;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);
-       if(ch == '\0' || sscanf((s - 1), TIME_T_FMT,
-                               (TIME_T_FMT_TYPE *)date_p) != 1) {
+       if(ch == '\0' || sscanf((s - 1), "%jd", &time_t_tmp) != 1) {
            break;
        }
+       onestat.date = (time_t)time_t_tmp;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);
        if(ch != '\0') {
-           if(sscanf((s - 1), OFF_T_FMT,
-                       (OFF_T_FMT_TYPE *)&onestat.filenum) != 1) {
+           if(sscanf((s - 1), "%lld", &off_t_tmp) != 1) {
                break;
            }
+           onestat.filenum = (off_t)off_t_tmp;
            skip_integer(s, ch);
  
            skip_whitespace(s, ch);
            onestat.label[SIZEOF(onestat.label)-1] = '\0';
        }
  
-       onestat.date = date;    /* time_t not guarranteed to be long */
        if(level < 0 || level > DUMP_LEVELS-1)
            break;
  
  
      for(rc = -2; (line = agets(infof)) != NULL; free(line)) {
        history_t onehistory;   /* one history record */
-       time_t date;
-       time_t *date_p = &date;
-         time_t *secs_p;
+       long long off_t_tmp;
+       intmax_t time_t_tmp;
  
        if (line[0] == '\0')
            continue;
-       date = 0L;
        if(line[0] == '/' && line[1] == '/') {
            info->history[nb_history].level = -2;
            rc = 0;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);
-       if(ch == '\0' || sscanf((s - 1), OFF_T_FMT,
-                               (OFF_T_FMT_TYPE *)&onehistory.size) != 1) {
+       if(ch == '\0' || sscanf((s - 1), "%lld", &off_t_tmp) != 1) {
            amfree(line);
            break;
        }
+       onehistory.size = (off_t)off_t_tmp;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);
-       if(ch == '\0' || sscanf((s - 1), OFF_T_FMT,
-                               (OFF_T_FMT_TYPE *)&onehistory.csize) != 1) {
+       if(ch == '\0' || sscanf((s - 1), "%lld", &off_t_tmp) != 1) {
            amfree(line);
            break;
        }
+       onehistory.csize = (off_t)off_t_tmp;
        skip_integer(s, ch);
  
        skip_whitespace(s, ch);
-       if(ch == '\0' || sscanf((s - 1), TIME_T_FMT,
-                               (TIME_T_FMT_TYPE *)date_p) != 1) {
+       if(ch == '\0' || sscanf((s - 1), "%jd", &time_t_tmp) != 1) {
            amfree(line);
            break;
        }
+       onehistory.date = (time_t)time_t_tmp;
        skip_integer(s, ch);
  
-       onehistory.date = date; /* time_t not guaranteed to be long */
        onehistory.secs = (unsigned long)-1;
        skip_whitespace(s, ch);
-         secs_p = &onehistory.secs;
        if(ch != '\0') {
-           if(sscanf((s - 1), TIME_T_FMT,
-                               (TIME_T_FMT_TYPE *)secs_p) != 1) {
+           if(sscanf((s - 1), "%jd", &time_t_tmp) != 1) {
                amfree(line);
                break;
            }
+           onehistory.secs = (time_t)time_t_tmp;
            skip_integer(s, ch);
        }
  
@@@ -425,65 -406,62 +406,62 @@@ write_txinfofile
      perf_t *pp;
      int level;
  
-     fprintf(infof, "version: %d\n", 0);
+     g_fprintf(infof, _("version: %d\n"), 0);
  
-     fprintf(infof, "command: %u\n", info->command);
+     g_fprintf(infof, _("command: %u\n"), info->command);
  
      pp = &info->full;
  
-     fprintf(infof, "full-rate:");
+     g_fprintf(infof, "full-rate:");
      for(i=0; i<AVG_COUNT; i++)
        if(pp->rate[i] >= 0.0)
-           fprintf(infof, " %lf", pp->rate[i]);
-     fprintf(infof, "\n");
+           g_fprintf(infof, " %lf", pp->rate[i]);
+     g_fprintf(infof, "\n");
  
-     fprintf(infof, "full-comp:");
+     g_fprintf(infof, "full-comp:");
      for(i=0; i<AVG_COUNT; i++)
        if(pp->comp[i] >= 0.0)
-           fprintf(infof, " %lf", pp->comp[i]);
-     fprintf(infof, "\n");
+           g_fprintf(infof, " %lf", pp->comp[i]);
+     g_fprintf(infof, "\n");
  
      pp = &info->incr;
  
-     fprintf(infof, "incr-rate:");
+     g_fprintf(infof, "incr-rate:");
      for(i=0; i<AVG_COUNT; i++)
        if(pp->rate[i] >= 0.0)
-           fprintf(infof, " %lf", pp->rate[i]);
-     fprintf(infof, "\n");
+           g_fprintf(infof, " %lf", pp->rate[i]);
+     g_fprintf(infof, "\n");
  
-     fprintf(infof, "incr-comp:");
+     g_fprintf(infof, "incr-comp:");
      for(i=0; i<AVG_COUNT; i++)
        if(pp->comp[i] >= 0.0)
-           fprintf(infof, " %lf", pp->comp[i]);
-     fprintf(infof, "\n");
+           g_fprintf(infof, " %lf", pp->comp[i]);
+     g_fprintf(infof, "\n");
  
      for(level=0; level<DUMP_LEVELS; level++) {
        sp = &info->inf[level];
  
        if(sp->date < (time_t)0 && sp->label[0] == '\0') continue;
  
-       fprintf(infof, "stats: %d " OFF_T_FMT " " OFF_T_FMT
-               " " TIME_T_FMT " " OFF_T_FMT,
-               level, (OFF_T_FMT_TYPE)sp->size, (OFF_T_FMT_TYPE)sp->csize,
-               (TIME_T_FMT_TYPE)sp->secs, (OFF_T_FMT_TYPE)sp->date);
+       g_fprintf(infof, "stats: %d %lld %lld %jd %lld",
+               level, (long long)sp->size, (long long)sp->csize,
+               (intmax_t)sp->secs, (long long)sp->date);
        if(sp->label[0] != '\0')
-           fprintf(infof, " " OFF_T_FMT " %s",
-               (OFF_T_FMT_TYPE)sp->filenum, sp->label);
-       fprintf(infof, "\n");
+           g_fprintf(infof, " %lld %s", (long long)sp->filenum, sp->label);
+       g_fprintf(infof, "\n");
      }
  
-     fprintf(infof, "last_level: %d %d\n", info->last_level, info->consecutive_runs);
+     g_fprintf(infof, _("last_level: %d %d\n"), info->last_level, info->consecutive_runs);
  
      for(i=0;info->history[i].level > -1;i++) {
-       fprintf(infof, "history: %d " OFF_T_FMT " " OFF_T_FMT
-               " " TIME_T_FMT " " TIME_T_FMT "\n",
+       g_fprintf(infof, _("history: %d %lld %lld %jd %jd\n"),
                info->history[i].level,
-               (OFF_T_FMT_TYPE)info->history[i].size,
-               (OFF_T_FMT_TYPE)info->history[i].csize,
-               (TIME_T_FMT_TYPE)info->history[i].date,
-               (TIME_T_FMT_TYPE)info->history[i].secs);
+               (long long)info->history[i].size,
+               (long long)info->history[i].csize,
+               (intmax_t)info->history[i].date,
+               (intmax_t)info->history[i].secs);
      }
-     fprintf(infof, "//\n");
+     g_fprintf(infof, "//\n");
  
      return 0;
  }
@@@ -518,66 -496,24 +496,24 @@@ delete_txinfofile
  
      return rc;
  }
- #endif
- #ifndef TEXTDB
- static char *lockname = NULL;
- #endif
  
  int
  open_infofile(
      char *    filename)
  {
- #ifdef TEXTDB
      assert(infodir == (char *)0);
  
      infodir = stralloc(filename);
  
      return 0; /* success! */
- #else
-     /* lock the dbm file */
-     lockname = newstralloc2(lockname, filename, ".lck");
-     if((lockfd = open(lockname, O_CREAT|O_RDWR, 0644)) == -1)
-       return 2;
-     if(amflock(lockfd, "info") == -1) {
-       aclose(lockfd);
-       unlink(lockname);
-       return 3;
-     }
-     if(!(infodb = dbm_open(filename, O_CREAT|O_RDWR, 0644))) {
-       amfunlock(lockfd, "info");
-       aclose(lockfd);
-       unlink(lockname);
-       return 1;
-     }
-     return (infodb == NULL);  /* return 1 on error */
- #endif
  }
  
  void
  close_infofile(void)
  {
- #ifdef TEXTDB
      assert(infodir != (char *)0);
  
      amfree(infodir);
- #else
-     dbm_close(infodb);
-     if(amfunlock(lockfd, "info") == -1) {
-       error("could not unlock infofile: %s", strerror(errno));
-       /*NOTREACHED*/
-     }
-     aclose(lockfd);
-     lockfd = -1;
-     unlink(lockname);
- #endif
  }
  
  /* Convert a dump level to a GMT based time stamp */
@@@ -599,7 -535,7 +535,7 @@@ get_dumpdate
      }
  
      t = gmtime(&last);
-     snprintf(stamp, SIZEOF(stamp), "%d:%d:%d:%d:%d:%d",
+     g_snprintf(stamp, SIZEOF(stamp), "%d:%d:%d:%d:%d:%d",
                t->tm_year+1900, t->tm_mon+1, t->tm_mday,
                t->tm_hour, t->tm_min, t->tm_sec);
  
@@@ -674,7 -610,6 +610,6 @@@ get_info
      (void) zero_info(info);
  
      {
- #ifdef TEXTDB
        FILE *infof;
  
        infof = open_txinfofile(hostname, diskname, "r");
  
            close_txinfofile(infof);
        }
- #else
-       datum k, d;
-       /* setup key */
-       k.dptr = vstralloc(hostname, ":", diskname, NULL);
-       k.dsize = strlen(k.dptr)+1;
-       /* lookup record */
-       d = dbm_fetch(infodb, k);
-       amfree(k.dptr);
-       if(d.dptr == NULL) {
-           rc = -1; /* record not found */
-       }
-       else {
-           memcpy(info, d.dptr, d.dsize);
-           rc = 0;
-       }
- #endif
      }
  
      return rc;
  }
  
  
- int
- get_firstkey(
-     char *    hostname,
-     int               hostname_size,
-     char *    diskname,
-     int               diskname_size)
- {
- #ifdef TEXTDB
-     (void)hostname;           /* Quiet unused parameter warning */
-     (void)hostname_size;      /* Quiet unused parameter warning */
-     (void)diskname;           /* Quiet unused parameter warning */
-     (void)diskname_size;      /* Quiet unused parameter warning */
-     assert(0);
-     return 0;
- #else
-     datum k;
-     int rc;
-     char *s, *fp;
-     int ch;
-     k = dbm_firstkey(infodb);
-     if(k.dptr == NULL) return 0;
-     s = k.dptr;
-     ch = *s++;
-     skip_whitespace(s, ch);
-     if(ch == '\0') return 0;
-     fp = hostname;
-     while(ch && ch != ':') {
-       if(fp >= hostname+hostname_size-1) {
-           fp = NULL;
-           break;
-       }
-       *fp = ch;
-       ch = *s++;
-     }
-     if(fp == NULL) return 0;
-     *fp = '\0';
-     if(ch != ':') return 0;
-     ch = *s++;
-     copy_string(s, ch, diskname, diskname_size, fp);
-     if(fp == NULL) return 0;
-     return 1;
- #endif
- }
- int
- get_nextkey(
-     char *    hostname,
-     int               hostname_size,
-     char *    diskname,
-     int               diskname_size)
- {
- #ifdef TEXTDB
-     (void)hostname;           /* Quiet unused parameter warning */
-     (void)hostname_size;      /* Quiet unused parameter warning */
-     (void)diskname;           /* Quiet unused parameter warning */
-     (void)diskname_size;      /* Quiet unused parameter warning */
-     assert(0);
-     return 0;
- #else
-     datum k;
-     int rc;
-     char *s, *fp;
-     int ch;
-     k = dbm_nextkey(infodb);
-     if(k.dptr == NULL) return 0;
-     s = k.dptr;
-     ch = *s++;
-     skip_whitespace(s, ch);
-     if(ch == '\0') return 0;
-     fp = hostname;
-     while(ch && ch != ':') {
-       if(fp >= hostname+hostname_size-1) {
-           fp = NULL;
-           break;
-       }
-       *fp = ch;
-       ch = *s++;
-     }
-     if(fp == NULL) return 0;
-     *fp = '\0';
-     if(ch != ':') return 0;
-     ch = *s++;
-     copy_string(s, ch, diskname, diskname_size, fp);
-     if(fp == NULL) return 0;
-     return 1;
- #endif
- }
  int
  put_info(
       char *   hostname,
       char *   diskname,
       info_t * info)
  {
- #ifdef TEXTDB
      FILE *infof;
      int rc;
  
      rc = rc || close_txinfofile(infof);
  
      return rc;
- #else
-     datum k, d;
-     int maxlev;
-     /* setup key */
-     k.dptr = vstralloc(hostname, ":", diskname, NULL);
-     k.dsize = strlen(k.dptr)+1;
-     d.dptr = (char *)info;
-     d.dsize = SIZEOF(info_t);
-     /* store record */
-     if(dbm_store(infodb, k, d, DBM_REPLACE) != 0) {
-       amfree(k.dptr);
-       return -1;
-     }
-     amfree(k.dptr);
-     return 0;
- #endif
  }
  
  
@@@ -864,26 -654,7 +654,7 @@@ del_info
      char *    hostname,
      char *    diskname)
  {
- #ifdef TEXTDB
      return delete_txinfofile(hostname, diskname);
- #else
-     char key[MAX_KEY];
-     datum k;
-     /* setup key */
-     k.dptr = vstralloc(hostname, ":", diskname, NULL);
-     k.dsize = strlen(key)+1;
-     /* delete key and record */
-     if(dbm_delete(infodb, k) != 0) {
-       amfree(k.dptr);
-       return -1;
-     }
-     amfree(k.dptr);
-     return 0;
- #endif
  }
  
  
@@@ -898,29 -669,28 +669,28 @@@ dump_rec
      int i;
      stats_t *sp;
  
-     printf("command word: %d\n", info->command);
-     printf("full dump rate (K/s) %5.1lf, %5.1lf, %5.1lf\n",
+     g_printf(_("command word: %d\n"), info->command);
+     g_printf(_("full dump rate (K/s) %5.1lf, %5.1lf, %5.1lf\n"),
           info->full.rate[0],info->full.rate[1],info->full.rate[2]);
-     printf("full comp rate %5.1lf, %5.1lf, %5.1lf\n",
+     g_printf(_("full comp rate %5.1lf, %5.1lf, %5.1lf\n"),
           info->full.comp[0]*100,info->full.comp[1]*100,info->full.comp[2]*100);
-     printf("incr dump rate (K/s) %5.1lf, %5.1lf, %5.1lf\n",
+     g_printf(_("incr dump rate (K/s) %5.1lf, %5.1lf, %5.1lf\n"),
           info->incr.rate[0],info->incr.rate[1],info->incr.rate[2]);
-     printf("incr comp rate %5.1lf, %5.1lf, %5.1lf\n",
+     g_printf(_("incr comp rate %5.1lf, %5.1lf, %5.1lf\n"),
           info->incr.comp[0]*100,info->incr.comp[1]*100,info->incr.comp[2]*100);
      for(i = 0; i < DUMP_LEVELS; i++) {
        sp = &info->inf[i];
        if( sp->size != -1) {
  
-           printf("lev %d date %ld tape %s filenum " OFF_T_FMT " size %ld csize %ld secs %ld\n",
+           g_printf(_("lev %d date %ld tape %s filenum %lld size %ld csize %ld secs %ld\n"),
                   i, (long)sp->date, sp->label, sp->filenum,
                   sp->size, sp->csize, sp->secs);
        }
      }
      putchar('\n');
-    printf("last_level: %d %d\n", info->last_level, info->consecutive_runs);
+     g_printf(_("last_level: %d %d\n"), info->last_level, info->consecutive_runs);
  }
  
- #ifdef TEXTDB
  void dump_db( char *host, char *disk);
  
  void
@@@ -934,39 -704,9 +704,9 @@@ dump_db
      if((rc = get_info(host, disk, &info)) == 0) {
        dump_rec(&info);
      } else {
-       printf("cannot fetch information for %s:%s rc=%d\n", host, disk, rc);
+       g_printf(_("cannot fetch information for %s:%s rc=%d\n"), host, disk, rc);
      }
  }
- #else
- void
- dump_db(
-     char *    str)
- {
-     datum k,d;
-     int rec,r,num;
-     info_t info;
-     printf("info database %s:\n--------\n", str);
-     rec = 0;
-     k = dbm_firstkey(infodb);
-     while(k.dptr != NULL) {
-       printf("%3d: KEY %s =\n", rec, k.dptr);
-       d = dbm_fetch(infodb, k);
-       memset(&info, '\0', SIZEOF(info));
-       memcpy(&info, d.dptr, d.dsize);
-       num = (d.dsize-HEADER)/SIZEOF(stats_t);
-       dump_rec(&info);
-       k = dbm_nextkey(infodb);
-       rec++;
-     }
-     puts("--------\n");
- }
- #endif
  
  int
  main(
      char **   argv)
  {
    int i;
-   unsigned long malloc_hist_1, malloc_size_1;
-   unsigned long malloc_hist_2, malloc_size_2;
+   /*
+    * Configure program for internationalization:
+    *   1) Only set the message locale for now.
+    *   2) Set textdomain for all amanda related programs to "amanda"
+    *      We don't want to be forced to support dozens of message catalogs.
+    */  
+   setlocale(LC_MESSAGES, "C");
+   textdomain("amanda"); 
  
    safe_fd(-1, 0);
  
  
    dbopen(DBG_SUBDIR_SERVER);
  
 +  malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +
    for(i = 1; i < argc; ++i) {
- #ifdef TEXTDB
      if(i+1 >= argc) {
-       fprintf(stderr,"usage: %s host disk [host disk ...]\n",argv[0]);
+       g_fprintf(stderr,_("usage: %s host disk [host disk ...]\n"),argv[0]);
        return 1;
      }
      open_infofile("curinfo");
      dump_db(argv[i], argv[i+1]);
      i++;
- #else
-     open_infofile(argv[i]);
-     dump_db(argv[i]);
- #endif
      close_infofile();
    }
  
-   malloc_size_2 = malloc_inuse(&malloc_hist_2);
-   if(malloc_size_1 != malloc_size_2) {
-     malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-   }
    return 0;
  }
  
diff --combined server-src/logfile.c
index ccddd26aaa2bfd97807f8e3cc20737d375d00017,03cc5f65858078c4d107ccfa10df48de2395eeac..a1517447e8e5b17f0149343e8f655a9f85707039
@@@ -42,7 -42,8 +42,8 @@@ char *logtype_str[] = 
      "ERROR", "WARNING",       "INFO", "SUMMARY",       /* information messages */
      "START", "FINISH",                                   /* start/end of a run */
      "DISK",                                                    /* disk */
-     "SUCCESS", "PARTIAL", "FAIL", "STRANGE",      /* the end of a dump */
+     /* the end of a dump */
+     "DONE", "PART", "PARTPARTIAL", "SUCCESS", "PARTIAL", "FAIL", "STRANGE",
      "CHUNK", "CHUNKSUCCESS",                            /* ... continued */
      "STATS",                                             /* statistics */
      "MARKER",                                   /* marker for reporter */
@@@ -89,7 -90,7 +90,7 @@@ printf_arglist_function2(char *log_gens
      va_list argp;
      char *leader = NULL;
      char linebuf[STR_SIZE];
+     char *xlated_fmt = dgettext("C", format);
  
      /* format error message */
  
      }
  
      arglist_start(argp, format);
-     vsnprintf(linebuf, SIZEOF(linebuf)-1, format, argp);
+     g_vsnprintf(linebuf, SIZEOF(linebuf)-1, xlated_fmt, argp);
                                                /* -1 to allow for '\n' */
      arglist_end(argp);
      return(vstralloc(leader, linebuf, "\n", NULL));
@@@ -113,10 -114,10 +114,11 @@@ printf_arglist_function1(void log_add, 
      va_list argp;
      int saved_errout;
      char *leader = NULL;
+     char *xlated_fmt = gettext(format);
      char linebuf[STR_SIZE];
      size_t n;
  
 +
      /* format error message */
  
      if((int)typ <= (int)L_BOGUS || (int)typ > (int)L_MARKER) typ = L_BOGUS;
      }
  
      arglist_start(argp, format);
-     vsnprintf(linebuf, SIZEOF(linebuf)-1, format, argp);
+     g_vsnprintf(linebuf, SIZEOF(linebuf)-1, xlated_fmt, argp);
                                                /* -1 to allow for '\n' */
      arglist_end(argp);
  
      if(multiline == -1) open_log();
  
      if (fullwrite(logfd, leader, strlen(leader)) < 0) {
-       error("log file write error: %s", strerror(errno));
+       error(_("log file write error: %s"), strerror(errno));
        /*NOTREACHED*/
      }
  
      linebuf[n] = '\0';
  
      if (fullwrite(logfd, linebuf, n) < 0) {
-       error("log file write error: %s", strerror(errno));
+       error(_("log file write error: %s"), strerror(errno));
        /*NOTREACHED*/
      }
  
@@@ -195,16 -196,11 +197,11 @@@ log_rename
  
      if(datestamp == NULL) datestamp = "error";
  
-     conf_logdir = getconf_str(CNF_LOGDIR);
-     if (*conf_logdir == '/') {
-       conf_logdir = stralloc(conf_logdir);
-     } else {
-       conf_logdir = stralloc2(config_dir, conf_logdir);
-     }
+     conf_logdir = config_dir_relative(getconf_str(CNF_LOGDIR));
      logfile = vstralloc(conf_logdir, "/log", NULL);
  
      for(seq = 0; 1; seq++) {  /* if you've got MAXINT files in your dir... */
-       snprintf(seq_str, SIZEOF(seq_str), "%u", seq);
+       g_snprintf(seq_str, SIZEOF(seq_str), "%u", seq);
        fname = newvstralloc(fname,
                             logfile,
                             ".", datestamp,
      }
  
      if(rename(logfile, fname) == -1) {
-       error("could not rename \"%s\" to \"%s\": %s",
+       error(_("could not rename \"%s\" to \"%s\": %s"),
              logfile, fname, strerror(errno));
        /*NOTREACHED*/
      }
@@@ -230,24 -226,24 +227,24 @@@ open_log(void
  {
      char *conf_logdir;
  
-     conf_logdir = getconf_str(CNF_LOGDIR);
-     if (*conf_logdir == '/') {
-       conf_logdir = stralloc(conf_logdir);
-     } else {
-       conf_logdir = stralloc2(config_dir, conf_logdir);
-     }
+     /* now that we have a logfile, let the debug module know how to write
+      * error messages to it.  This is due to some rather obscure linking 
+      * problems. */
+     set_logerror(logerror);
+     conf_logdir = config_dir_relative(getconf_str(CNF_LOGDIR));
      logfile = vstralloc(conf_logdir, "/log", NULL);
      amfree(conf_logdir);
  
      logfd = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0600);
  
      if(logfd == -1) {
-       error("could not open log file %s: %s", logfile, strerror(errno));
+       error(_("could not open log file %s: %s"), logfile, strerror(errno));
        /*NOTREACHED*/
      }
  
      if(amflock(logfd, "log") == -1) {
-       error("could not lock log file %s: %s", logfile, strerror(errno));
+       error(_("could not lock log file %s: %s"), logfile, strerror(errno));
        /*NOTREACHED*/
      }
  }
@@@ -257,12 -253,12 +254,12 @@@ static voi
  close_log(void)
  {
      if(amfunlock(logfd, "log") == -1) {
-       error("could not unlock log file %s: %s", logfile, strerror(errno));
+       error(_("could not unlock log file %s: %s"), logfile, strerror(errno));
        /*NOTREACHED*/
      }
  
      if(close(logfd) == -1) {
-       error("close log file: %s", strerror(errno));
+       error(_("close log file: %s"), strerror(errno));
        /*NOTREACHED*/
      }
  
      amfree(logfile);
  }
  
+ /* WARNING: Function accesses globals curstr, curlog, and curprog
+  * WARNING: Function has static member logline, returned via globals */
  int
  get_logline(
      FILE *    logf)
diff --combined server-src/planner.c
index c0f7fc6bf656c993b947f5347e0942455d17d69a,1c612e4f53e73146d587991403f5aa30aa74efe5..2f3c378e44a1c1f9cd48e9fb238591fcef6183a1
@@@ -43,6 -43,7 +43,7 @@@
  #include "amfeatures.h"
  #include "server_util.h"
  #include "holding.h"
+ #include "timestamp.h"
  
  #define planner_debug(i,x) do {               \
        if ((i) <= debug_planner) {     \
@@@ -159,61 -160,66 +160,66 @@@ static int promote_hills(void)
  static void output_scheduleline(disk_t *dp);
  int main(int, char **);
  
- int main(int argc, char **argv)
+ int
+ main(
+     int               argc,
+     char **   argv)
  {
      disklist_t origq;
      disk_t *dp;
      int moved_one;
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
+     int diskarg_offset;
      off_t initial_size;
      int i;
-     char *conffile;
      char *conf_diskfile;
      char *conf_tapelist;
      char *conf_infofile;
      times_t section_start;
-     uid_t ruid;
      char *qname;
-     int    new_argc,   my_argc;
-     char **new_argv, **my_argv;
      int    nb_disk;
      char  *errstr = NULL;
+     config_overwrites_t *cfg_ovr = NULL;
+     char *cfg_opt = NULL;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
+     /* drop root privileges */
+     if (!set_root_privs(0)) {
+       error(_("planner must be run setuid root"));
+     }
  
      safe_fd(-1, 0);
  
-     setvbuf(stderr, (char *)NULL, (int)_IOLBF, 0);
+     set_pname("planner");
  
-     parse_conf(argc, argv, &new_argc, &new_argv);
-     my_argc = new_argc;
-     my_argv = new_argv;
+     dbopen(DBG_SUBDIR_SERVER);
  
-     if (my_argc > 1) {
-       config_name = stralloc(my_argv[1]);
-       config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-     } else {
-       char my_cwd[STR_SIZE];
+     cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
  
-       if (getcwd(my_cwd, SIZEOF(my_cwd)) == NULL) {
-           error("cannot determine current working directory");
-           /*NOTREACHED*/
-       }
-       config_dir = stralloc2(my_cwd, "/");
-       if ((config_name = strrchr(my_cwd, '/')) != NULL) {
-           config_name = stralloc(config_name + 1);
-       }
-     }
+     if (argc > 1) 
+       cfg_opt = argv[1];
+     config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_USE_CWD | CONFIG_INIT_FATAL,
+               cfg_opt);
+     apply_config_overwrites(cfg_ovr);
  
      safe_cd();
  
-     set_pname("planner");
+     check_running_as(RUNNING_AS_DUMPUSER);
  
-     dbopen(DBG_SUBDIR_SERVER);
+     dbrename(config_name, DBG_SUBDIR_SERVER);
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
-     malloc_size_1 = malloc_inuse(&malloc_hist_1);
+     setvbuf(stderr, (char *)NULL, (int)_IOLBF, 0);
  
      erroutput_type = (ERR_AMANDALOG|ERR_INTERACTIVE);
      set_logerror(logerror);
      our_features = am_init_feature_set();
      our_feature_string = am_feature_to_string(our_features);
  
-     fprintf(stderr, "%s: pid %ld executable %s version %s\n",
-           get_pname(), (long) getpid(), my_argv[0], version());
+     g_fprintf(stderr, _("%s: pid %ld executable %s version %s\n"),
+           get_pname(), (long) getpid(), argv[0], version());
      for (i = 0; version_info[i] != NULL; i++)
-       fprintf(stderr, "%s: %s", get_pname(), version_info[i]);
+       g_fprintf(stderr, _("%s: %s"), get_pname(), version_info[i]);
+     diskarg_offset = 2;
+     if (argc > 3 && strcmp(argv[2], "--starttime") == 0) {
+       planner_timestamp = stralloc(argv[3]);
+       diskarg_offset += 2;
+     }
  
      /*
       * 1. Networking Setup
       *
-      * Planner runs setuid to get a priviledged socket for BSD security.
-      * We get the socket right away as root, then set euid to normal
-      * user. Keeping saved uid as root.
       */
  
      protocol_init();
  
 +    ruid = getuid();
 +    if(geteuid() == 0) {
 +      seteuid(ruid);
 +      setgid(getgid());
 +    }
 +
 +    /*
 +     * From this point on we are running under our real uid, so we don't
 +     * have to worry about opening security holes below.  Make sure we
 +     * are a valid user.
 +     */
 +
 +    if(getpwuid(getuid()) == NULL) {
 +      error("can't get login name for my uid %ld", (long)getuid());
 +      /*NOTREACHED*/
 +    }
 +
      /*
       * 2. Read in Configuration Information
       *
       * All the Amanda configuration files are loaded before we begin.
       */
  
-     fprintf(stderr,"READING CONF FILES...\n");
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     if(read_conffile(conffile)) {
-       error("errors processing config file \"%s\"", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
+     g_fprintf(stderr,_("READING CONF INFO...\n"));
  
-     dbrename(config_name, DBG_SUBDIR_SERVER);
-     report_bad_conf_arg();
-     conf_diskfile = getconf_str(CNF_DISKFILE);
-     if (*conf_diskfile == '/') {
-       conf_diskfile = stralloc(conf_diskfile);
-     } else {
-       conf_diskfile = stralloc2(config_dir, conf_diskfile);
-     }
+     conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
      if (read_diskfile(conf_diskfile, &origq) < 0) {
-       error("could not load disklist \"%s\"", conf_diskfile);
+       error(_("could not load disklist \"%s\""), conf_diskfile);
        /*NOTREACHED*/
      }
      if(origq.head == NULL) {
-       error("empty disklist \"%s\"", conf_diskfile);
+       error(_("empty disklist \"%s\""), conf_diskfile);
        /*NOTREACHED*/
      }
  
-     errstr = match_disklist(&origq, my_argc-2, my_argv+2);
+     errstr = match_disklist(&origq, argc-diskarg_offset,
+                                   argv+diskarg_offset);
      if (errstr) {
-       fprintf(stderr,"%s",errstr);
+       g_fprintf(stderr,"%s",errstr);
        amfree(errstr);
      }
      nb_disk = 0;
      }
  
      if(nb_disk == 0) {
-       error("no DLE to backup");
+       error(_("no DLE to backup"));
        /*NOTREACHED*/
      }
      amfree(conf_diskfile);
  
-     conf_tapelist = getconf_str(CNF_TAPELIST);
-     if (*conf_tapelist == '/') {
-       conf_tapelist = stralloc(conf_tapelist);
-     } else {
-       conf_tapelist = stralloc2(config_dir, conf_tapelist);
-     }
+     conf_tapelist = config_dir_relative(getconf_str(CNF_TAPELIST));
      if(read_tapelist(conf_tapelist)) {
-       error("could not load tapelist \"%s\"", conf_tapelist);
+       error(_("could not load tapelist \"%s\""), conf_tapelist);
        /*NOTREACHED*/
      }
      amfree(conf_tapelist);
  
-     conf_infofile = getconf_str(CNF_INFOFILE);
-     if (*conf_infofile == '/') {
-       conf_infofile = stralloc(conf_infofile);
-     } else {
-       conf_infofile = stralloc2(config_dir, conf_infofile);
-     }
+     conf_infofile = config_dir_relative(getconf_str(CNF_INFOFILE));
      if(open_infofile(conf_infofile)) {
-       error("could not open info db \"%s\"", conf_infofile);
+       error(_("could not open info db \"%s\""), conf_infofile);
        /*NOTREACHED*/
      }
      if (check_infofile(conf_infofile, &origq, &errstr) == -1) {
      conf_autoflush = getconf_boolean(CNF_AUTOFLUSH);
      conf_usetimestamps = getconf_boolean(CNF_USETIMESTAMPS);
  
-     amfree(planner_timestamp);
      today = time(0);
-     if(conf_usetimestamps == 0) {
-       planner_timestamp = construct_datestamp(NULL);
+     if (planner_timestamp) {
+       if (conf_usetimestamps == 0) {
+           planner_timestamp[8] = '\0';
+       }
+     } else if(conf_usetimestamps == 0) {
+       planner_timestamp = get_datestamp_from_time(0);
      }
      else {
-       planner_timestamp = construct_timestamp(NULL);
+       planner_timestamp = get_timestamp_from_time(0);
      }
-     log_add(L_START, "date %s", planner_timestamp);
-     printf("DATE %s\n", planner_timestamp);
+     log_add(L_START, _("date %s"), planner_timestamp);
+     g_printf("DATE %s\n", planner_timestamp);
      fflush(stdout);
-     fprintf(stderr, "%s: timestamp %s\n",
+     g_fprintf(stderr, _("%s: timestamp %s\n"),
                    get_pname(), planner_timestamp);
  
      /* some initializations */
       * do some basic sanity checking
       */
       if(conf_tapecycle <= runs_per_cycle) {
-       log_add(L_WARNING, "tapecycle (%d) <= runspercycle (%d)",
+       log_add(L_WARNING, _("tapecycle (%d) <= runspercycle (%d)"),
                conf_tapecycle, runs_per_cycle);
       }
      
      tt_blocksize_kb = (size_t)tapetype_get_blocksize(tape);
      tt_blocksize = tt_blocksize_kb * 1024;
  
-     fprintf(stderr, "%s: time %s: startup took %s secs\n",
+     g_fprintf(stderr, _("%s: time %s: startup took %s secs\n"),
                    get_pname(),
                    walltime_str(curclock()),
                    walltime_str(timessub(curclock(), section_start)));
       * dump schedule.
       */
  
-     fprintf(stderr,"\nSENDING FLUSHES...\n");
+     g_fprintf(stderr,_("\nSENDING FLUSHES...\n"));
  
      if(conf_autoflush) {
-       dumpfile_t file;
-       sl_t *holding_list;
-       sle_t *holding_file;
+       dumpfile_t  file;
+       GSList *holding_list, *holding_file;
        char *qdisk, *qhname;
-       holding_list = holding_get_files_for_flush(NULL, 0);
-       for(holding_file=holding_list->first; holding_file != NULL;
+       /* get *all* flushable files in holding */
+       holding_list = holding_get_files_for_flush(NULL);
+       for(holding_file=holding_list; holding_file != NULL;
                                       holding_file = holding_file->next) {
-           holding_file_get_dumpfile(holding_file->name, &file);
+           holding_file_get_dumpfile((char *)holding_file->data, &file);
  
-           if (holding_file_size(holding_file->name, 1) <= 0) {
+           if (holding_file_size((char *)holding_file->data, 1) <= 0) {
                log_add(L_INFO, "%s: removing file with no data.",
-                       holding_file->name);
-               holding_file_unlink(holding_file->name);
+                       (char *)holding_file->data);
+               holding_file_unlink((char *)holding_file->data);
                continue;
            }
-           
            qdisk = quote_string(file.disk);
-           qhname = quote_string(holding_file->name);
+           qhname = quote_string((char *)holding_file->data);
            log_add(L_DISK, "%s %s", file.name, qdisk);
-           fprintf(stderr,
+           g_fprintf(stderr,
                    "FLUSH %s %s %s %d %s\n",
                    file.name,
                    qdisk,
                    file.datestamp,
                    file.dumplevel,
                    qhname);
-           fprintf(stdout,
+           g_fprintf(stdout,
                    "FLUSH %s %s %s %d %s\n",
                    file.name,
                    qdisk,
            amfree(qdisk);
            amfree(qhname);
        }
-       free_sl(holding_list);
+       g_slist_free_full(holding_list);
        holding_list = NULL;
      }
-     fprintf(stderr, "ENDFLUSH\n");
-     fprintf(stdout, "ENDFLUSH\n");
+     g_fprintf(stderr, _("ENDFLUSH\n"));
+     g_fprintf(stdout, _("ENDFLUSH\n"));
      fflush(stdout);
  
      /*
       * based on the curinfo database.
       */
  
-     fprintf(stderr,"\nSETTING UP FOR ESTIMATES...\n");
+     g_fprintf(stderr,_("\nSETTING UP FOR ESTIMATES...\n"));
      section_start = curclock();
  
      startq.head = startq.tail = NULL;
        }
      }
  
-     fprintf(stderr, "%s: time %s: setting up estimates took %s secs\n",
+     g_fprintf(stderr, _("%s: time %s: setting up estimates took %s secs\n"),
                    get_pname(),
                    walltime_str(curclock()),
                    walltime_str(timessub(curclock(), section_start)));
  
      /* go out and get the dump estimates */
  
-     fprintf(stderr,"\nGETTING ESTIMATES...\n");
+     g_fprintf(stderr,_("\nGETTING ESTIMATES...\n"));
      section_start = curclock();
  
      estq.head = estq.tail = NULL;
  
      get_estimates();
  
-     fprintf(stderr, "%s: time %s: getting estimates took %s secs\n",
+     g_fprintf(stderr, _("%s: time %s: getting estimates took %s secs\n"),
                    get_pname(),
                    walltime_str(curclock()),
                    walltime_str(timessub(curclock(), section_start)));
       * total expected size is accumulated as well.
       */
  
-     fprintf(stderr,"\nANALYZING ESTIMATES...\n");
+     g_fprintf(stderr,_("\nANALYZING ESTIMATES...\n"));
      section_start = curclock();
  
                        /* an empty tape still has a label and an endmark */
      {
        disk_t *dp;
  
-       fprintf(stderr, "INITIAL SCHEDULE (size " OFF_T_FMT "):\n",
-               (OFF_T_FMT_TYPE)total_size);
+       g_fprintf(stderr, _("INITIAL SCHEDULE (size %lld):\n"),
+               (long long)total_size);
        for(dp = schedq.head; dp != NULL; dp = dp->next) {
            qname = quote_string(dp->name);
-           fprintf(stderr, "  %s %s pri %d lev %d nsize " OFF_T_FMT " csize " OFF_T_FMT "\n",
+           g_fprintf(stderr, _("  %s %s pri %d lev %d nsize %lld csize %lld\n"),
                    dp->host->hostname, qname, est(dp)->dump_priority,
                    est(dp)->dump_level,
-                   (OFF_T_FMT_TYPE)est(dp)->dump_nsize,
-                     (OFF_T_FMT_TYPE)est(dp)->dump_csize);
+                   (long long)est(dp)->dump_nsize,
+                     (long long)est(dp)->dump_csize);
            amfree(qname);
        }
      }
       * until the dumps fit on the tape.
       */
  
-     fprintf(stderr, "\nDELAYING DUMPS IF NEEDED, total_size " OFF_T_FMT
-           ", tape length " OFF_T_FMT " mark " SIZE_T_FMT "\n",
-           (OFF_T_FMT_TYPE)total_size,
-           (OFF_T_FMT_TYPE)tape_length,
-           (SIZE_T_FMT_TYPE)tape_mark);
+     g_fprintf(stderr, _("\nDELAYING DUMPS IF NEEDED, total_size %lld, tape length %lld mark %zu\n"),
+           (long long)total_size,
+           (long long)tape_length,
+           tape_mark);
  
      initial_size = total_size;
  
  
      /* XXX - why bother checking this? */
      if(empty(schedq) && total_size < initial_size) {
-       error("cannot fit anything on tape, bailing out");
+       error(_("cannot fit anything on tape, bailing out"));
        /*NOTREACHED*/
      }
  
       * a big bump.
       */
  
-     fprintf(stderr,
-      "\nPROMOTING DUMPS IF NEEDED, total_lev0 %1.0lf, balanced_size %1.0lf...\n",
+     g_fprintf(stderr,
+      _("\nPROMOTING DUMPS IF NEEDED, total_lev0 %1.0lf, balanced_size %1.0lf...\n"),
            total_lev0, balanced_size);
  
      balance_threshold = balanced_size * PROMOTE_THRESHOLD;
  
      moved_one = promote_hills();
  
-     fprintf(stderr, "%s: time %s: analysis took %s secs\n",
+     g_fprintf(stderr, _("%s: time %s: analysis took %s secs\n"),
                    get_pname(),
                    walltime_str(curclock()),
                    walltime_str(timessub(curclock(), section_start)));
  
  
 +    /* done with prvileged ops, make sure root privilege is dropped */
 +    if ( geteuid() == 0 ) {
 +      setuid(ruid);
 +      seteuid(ruid);
 +    }
 +
      /*
       * 9. Output Schedule
       *
       * on stderr for the debug file.
       */
  
-     fprintf(stderr,"\nGENERATING SCHEDULE:\n--------\n");
+     g_fprintf(stderr,_("\nGENERATING SCHEDULE:\n--------\n"));
  
      while(!empty(schedq)) output_scheduleline(dequeue_disk(&schedq));
-     fprintf(stderr, "--------\n");
+     g_fprintf(stderr, _("--------\n"));
  
      close_infofile();
-     log_add(L_FINISH, "date %s time %s", planner_timestamp, walltime_str(curclock()));
+     log_add(L_FINISH, _("date %s time %s"), planner_timestamp, walltime_str(curclock()));
  
      clear_tapelist();
-     free_new_argv(new_argc, new_argv);
-     free_server_config();
      amfree(planner_timestamp);
-     amfree(config_dir);
-     amfree(config_name);
      amfree(our_feature_string);
      am_release_feature_set(our_features);
      our_features = NULL;
  
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
      dbclose();
  
      return 0;
@@@ -685,12 -640,12 +663,12 @@@ static void askfor
      info_t *info)     /* info block for disk */
  {
      if(seq < 0 || seq >= MAX_LEVELS) {
-       error("error [planner askfor: seq out of range 0..%d: %d]",
+       error(_("error [planner askfor: seq out of range 0..%d: %d]"),
              MAX_LEVELS, seq);
        /*NOTREACHED*/
      }
      if(lev < -1 || lev >= DUMP_LEVELS) {
-       error("error [planner askfor: lev out of range -1..%d: %d]",
+       error(_("error [planner askfor: lev out of range -1..%d: %d]"),
              DUMP_LEVELS, lev);
        /*NOTREACHED*/
      }
      ep->level[seq] = lev;
  
      ep->dumpdate[seq] = stralloc(get_dumpdate(info,lev));
-     malloc_mark(ep->dumpdate[seq]);
  
      ep->est_size[seq] = (off_t)-2;
  
@@@ -725,7 -679,7 +702,7 @@@ setup_estimate
      assert(dp && dp->host);
  
      qname = quote_string(dp->name);
-     fprintf(stderr, "%s: time %s: setting up estimates for %s:%s\n",
+     g_fprintf(stderr, _("%s: time %s: setting up estimates for %s:%s\n"),
                    get_pname(), walltime_str(curclock()),
                    dp->host->hostname, qname);
  
  
      if(get_info(dp->host->hostname, dp->name, &info)) {
        /* no record for this disk, make a note of it */
-       log_add(L_INFO, "Adding new disk %s:%s.", dp->host->hostname, dp->name);
+       log_add(L_INFO, _("Adding new disk %s:%s."), dp->host->hostname, dp->name);
      }
  
      /* setup working data struct for disk */
  
      ep = alloc(SIZEOF(est_t));
-     malloc_mark(ep);
      dp->up = (void *) ep;
      ep->state = DISK_READY;
      ep->dump_nsize = (off_t)-1;
             * now.
             */
            log_add(L_ERROR,
-                   "Cannot force full dump of %s:%s with no-full option.",
+                   _("Cannot force full dump of %s:%s with no-full option."),
                    dp->host->hostname, qname);
  
            /* clear force command */
            CLR(info.command, FORCE_FULL);
            if(put_info(dp->host->hostname, dp->name, &info)) {
-               error("could not put info record for %s:%s: %s",
+               error(_("could not put info record for %s:%s: %s"),
                      dp->host->hostname, qname, strerror(errno));
                /*NOTREACHED*/
            }
        else {
            ep->last_level = -1;
            ep->next_level0 = -conf_dumpcycle;
-           log_add(L_INFO, "Forcing full dump of %s:%s as directed.",
+           log_add(L_INFO, _("Forcing full dump of %s:%s as directed."),
                    dp->host->hostname, qname);
        }
      }
      if (ep->last_level > -1 && strlen(info.inf[0].label) > 0) {
        overwrite_runs = when_overwrite(info.inf[0].label);
        if(overwrite_runs == 0) {
-           log_add(L_WARNING, "Last full dump of %s:%s "
-                   "on tape %s overwritten on this run.",
+           log_add(L_WARNING, _("Last full dump of %s:%s "
+                   "on tape %s overwritten on this run."),
                    dp->host->hostname, qname, info.inf[0].label);
-       }
-       else if(overwrite_runs <= RUNS_REDZONE) {
-           log_add(L_WARNING, "Last full dump of %s:%s on "
-                   "tape %s overwritten in %d run%s.",
+       } else if(overwrite_runs <= RUNS_REDZONE) {
+           log_add(L_WARNING,
+                   plural(_("Last full dump of %s:%s on tape %s overwritten in %d run."),
+                          _("Last full dump of %s:%s on tape %s overwritten in %d runs."), overwrite_runs),
                    dp->host->hostname, qname, info.inf[0].label,
-                   overwrite_runs, overwrite_runs == 1? "" : "s");
+                   overwrite_runs);
+       }
+     }
+     /* warn if last level 1 will be overwritten */
+     if (ep->last_level > 1 && strlen(info.inf[1].label) > 0) {
+       overwrite_runs = when_overwrite(info.inf[1].label);
+       if(overwrite_runs == 0) {
+           log_add(L_WARNING, _("Last level 1 dump of %s:%s "
+                   "on tape %s overwritten on this run, resetting to level 1"),
+                   dp->host->hostname, qname, info.inf[1].label);
+           ep->last_level = 0;
+       } else if(overwrite_runs <= RUNS_REDZONE) {
+           log_add(L_WARNING,
+                   plural(_("Last level 1 dump of %s:%s on tape %s overwritten in %d run."),
+                          _("Last level 1 dump of %s:%s on tape %s overwritten in %d runs."), overwrite_runs),
+                   dp->host->hostname, qname, info.inf[1].label,
+                   overwrite_runs);
        }
      }
  
      if(ep->next_level0 < 0) {
-       fprintf(stderr,"%s:%s overdue %d day%s for level 0\n",
-               dp->host->hostname, qname,
-               - ep->next_level0, ((- ep->next_level0) == 1) ? "" : "s");
+       g_fprintf(stderr,plural(_("%s:%s overdue %d day for level 0\n"),
+                             _("%s:%s overdue %d days for level 0\n"),
+                             (-ep->next_level0)),
+               dp->host->hostname, qname, (-ep->next_level0));
        ep->dump_priority -= ep->next_level0;
      }
      else if (ISSET(info.command, FORCE_FULL))
            ep->next_level0 += conf_dumpcycle;
            ep->last_level = 0;
            if(put_info(dp->host->hostname, dp->name, &info)) {
-               error("could not put info record for %s:%s: %s",
+               error(_("could not put info record for %s:%s: %s"),
                      dp->host->hostname, qname, strerror(errno));
                /*NOTREACHED*/
            }
-           log_add(L_INFO, "Skipping full dump of %s:%s today.",
+           log_add(L_INFO, _("Skipping full dump of %s:%s today."),
                    dp->host->hostname, qname);
-           fprintf(stderr,"%s:%s lev 0 skipped due to skip-full flag\n",
+           g_fprintf(stderr,_("%s:%s lev 0 skipped due to skip-full flag\n"),
                    dp->host->hostname, qname);
            /* don't enqueue the disk */
            askfor(ep, 0, -1, &info);
            askfor(ep, 1, -1, &info);
            askfor(ep, 2, -1, &info);
-           fprintf(stderr, "%s: SKIPPED %s %s 0 [skip-full]\n",
+           g_fprintf(stderr, _("%s: SKIPPED %s %s 0 [skip-full]\n"),
                    get_pname(), dp->host->hostname, qname);
-           log_add(L_SUCCESS, "%s %s %s 0 [skipped: skip-full]",
+           log_add(L_SUCCESS, _("%s %s %s 0 [skipped: skip-full]"),
                    dp->host->hostname, qname, planner_timestamp);
            amfree(qname);
            return;
        }
  
        if(ep->next_level0 == 1) {
-           log_add(L_WARNING, "Skipping full dump of %s:%s tomorrow.",
+           log_add(L_WARNING, _("Skipping full dump of %s:%s tomorrow."),
                    dp->host->hostname, qname);
        }
      }
        askfor(ep, 0, -1, &info);
        askfor(ep, 1, -1, &info);
        askfor(ep, 2, -1, &info);
-       log_add(L_FAIL, "%s %s 19000101 1 [Skipping incronly because no full dump were done]",
+       log_add(L_FAIL, _("%s %s 19000101 1 [Skipping incronly because no full dump were done]"),
                dp->host->hostname, qname);
-       fprintf(stderr,"%s:%s lev 1 skipped due to strategy incronly and no full dump were done\n",
+       g_fprintf(stderr,_("%s:%s lev 1 skipped due to strategy incronly and no full dump were done\n"),
                dp->host->hostname, qname);
        amfree(qname);
        return;
      /* handle "skip-incr" type archives */
  
      if(dp->skip_incr && ep->next_level0 > 0) {
-       fprintf(stderr,"%s:%s lev 1 skipped due to skip-incr flag\n",
+       g_fprintf(stderr,_("%s:%s lev 1 skipped due to skip-incr flag\n"),
                dp->host->hostname, qname);
        /* don't enqueue the disk */
        askfor(ep, 0, -1, &info);
        askfor(ep, 1, -1, &info);
        askfor(ep, 2, -1, &info);
  
-       fprintf(stderr, "%s: SKIPPED %s %s 1 [skip-incr]\n",
+       g_fprintf(stderr, _("%s: SKIPPED %s %s 1 [skip-incr]\n"),
                get_pname(), dp->host->hostname, qname);
  
-       log_add(L_SUCCESS, "%s %s %s 1 [skipped: skip-incr]",
+       log_add(L_SUCCESS, _("%s %s %s 1 [skipped: skip-incr]"),
                dp->host->hostname, qname, planner_timestamp);
        amfree(qname);
        return;
      if( ep->last_level == -1 && ep->next_level0 > 0 && 
        dp->strategy != DS_NOFULL && dp->strategy != DS_INCRONLY &&
        conf_reserve == 100) {
-       log_add(L_WARNING, "%s:%s mismatch: no tapelist record, "
-               "but curinfo next_level0: %d.",
+       log_add(L_WARNING, _("%s:%s mismatch: no tapelist record, "
+               "but curinfo next_level0: %d."),
                dp->host->hostname, qname, ep->next_level0);
        ep->next_level0 = 0;
      }
          ep->last_level == -1))) {
        if(info.command & FORCE_BUMP && ep->last_level == -1) {
            log_add(L_INFO,
-                 "Remove force-bump command of %s:%s because it's a new disk.",
+                 _("Remove force-bump command of %s:%s because it's a new disk."),
                    dp->host->hostname, qname);
        }
        switch (dp->strategy) {
        case DS_NOINC:
            askfor(ep, i++, 0, &info);
            if(dp->skip_full) {
-               log_add(L_INFO, "Ignoring skip_full for %s:%s "
-                       "because the strategy is NOINC.",
+               log_add(L_INFO, _("Ignoring skip_full for %s:%s "
+                       "because the strategy is NOINC."),
                        dp->host->hostname, qname);
            }
            if(info.command & FORCE_BUMP) {
                log_add(L_INFO,
-                "Ignoring FORCE_BUMP for %s:%s because the strategy is NOINC.",
+                _("Ignoring FORCE_BUMP for %s:%s because the strategy is NOINC."),
                        dp->host->hostname, qname);
            }
            
  
        case DS_INCRONLY:
            if (ISSET(info.command, FORCE_FULL))
-               askfor(ep, i++, 0, &info);
+               ep->last_level = 0;
            break;
        }
      }
                if(curr_level > 0) { /* level 0 already asked for */
                    askfor(ep, i++, curr_level, &info);
                }
-               log_add(L_INFO,"Preventing bump of %s:%s as directed.",
+               log_add(L_INFO,_("Preventing bump of %s:%s as directed."),
                        dp->host->hostname, qname);
            } else if (ISSET(info.command, FORCE_BUMP)
                       && curr_level + 1 < DUMP_LEVELS) {
                askfor(ep, i++, curr_level+1, &info);
-               log_add(L_INFO,"Bumping of %s:%s at level %d as directed.",
+               log_add(L_INFO,_("Bumping of %s:%s at level %d as directed."),
                        dp->host->hostname, qname, curr_level+1);
            } else if (curr_level == 0) {
                askfor(ep, i++, 1, &info);
  
      /* debug output */
  
-     fprintf(stderr, "setup_estimate: %s:%s: command %u, options: %s    "
+     g_fprintf(stderr, _("setup_estimate: %s:%s: command %u, options: %s    "
            "last_level %d next_level0 %d level_days %d    getting estimates "
-           "%d (" OFF_T_FMT ") %d (" OFF_T_FMT ") %d (" OFF_T_FMT ")\n",
+           "%d (%lld) %d (%lld) %d (%lld)\n"),
            dp->host->hostname, qname, info.command,
            dp->strategy == DS_NOFULL ? "no-full" :
                 dp->strategy == DS_INCRONLY ? "incr-only" :
                 dp->skip_full ? "skip-full" :
                 dp->skip_incr ? "skip-incr" : "none",
            ep->last_level, ep->next_level0, ep->level_days,
-           ep->level[0], (OFF_T_FMT_TYPE)ep->est_size[0],
-           ep->level[1], (OFF_T_FMT_TYPE)ep->est_size[1],
-           ep->level[2], (OFF_T_FMT_TYPE)ep->est_size[2]);
+           ep->level[0], (long long)ep->est_size[0],
+           ep->level[1], (long long)ep->est_size[1],
+           ep->level[2], (long long)ep->est_size[2]);
  
      assert(ep->level[0] != -1);
      enqueue_disk(&startq, dp);
@@@ -1247,7 -1218,7 +1241,7 @@@ static void get_estimates(void
  
      while(!empty(waitq)) {
        disk_t *dp = dequeue_disk(&waitq);
-       est(dp)->errstr = "hmm, disk was stranded on waitq";
+       est(dp)->errstr = _("hmm, disk was stranded on waitq");
        enqueue_disk(&failq, dp);
      }
  
        
        if(est(dp)->level[0] != -1 && est(dp)->est_size[0] < (off_t)0) {
            if(est(dp)->est_size[0] == (off_t)-1) {
-               log_add(L_WARNING, "disk %s:%s, estimate of level %d failed.",
+               log_add(L_WARNING, _("disk %s:%s, estimate of level %d failed."),
                        dp->host->hostname, qname, est(dp)->level[0]);
            }
            else {
                log_add(L_WARNING,
-                       "disk %s:%s, estimate of level %d timed out.",
+                       _("disk %s:%s, estimate of level %d timed out."),
                        dp->host->hostname, qname, est(dp)->level[0]);
            }
            est(dp)->level[0] = -1;
        if(est(dp)->level[1] != -1 && est(dp)->est_size[1] < (off_t)0) {
            if(est(dp)->est_size[1] == (off_t)-1) {
                log_add(L_WARNING,
-                       "disk %s:%s, estimate of level %d failed.",
+                       _("disk %s:%s, estimate of level %d failed."),
                        dp->host->hostname, qname, est(dp)->level[1]);
            }
            else {
                log_add(L_WARNING,
-                       "disk %s:%s, estimate of level %d timed out.",
+                       _("disk %s:%s, estimate of level %d timed out."),
                        dp->host->hostname, qname, est(dp)->level[1]);
            }
            est(dp)->level[1] = -1;
        if(est(dp)->level[2] != -1 && est(dp)->est_size[2] < (off_t)0) {
            if(est(dp)->est_size[2] == (off_t)-1) {
                log_add(L_WARNING,
-                       "disk %s:%s, estimate of level %d failed.",
+                       _("disk %s:%s, estimate of level %d failed."),
                        dp->host->hostname, qname, est(dp)->level[2]);
            }
            else {
                log_add(L_WARNING,
-                       "disk %s:%s, estimate of level %d timed out.",
+                       _("disk %s:%s, estimate of level %d timed out."),
                        dp->host->hostname, qname, est(dp)->level[2]);
            }
            est(dp)->level[2] = -1;
        }
        else {
           est(dp)->errstr = vstralloc("disk ", qname,
-                                      ", all estimate timed out", NULL);
+                                      _(", all estimate timed out"), NULL);
           enqueue_disk(&failq, dp);
        }
        amfree(qname);
@@@ -1350,7 -1321,7 +1344,7 @@@ static void getsize
        int has_config   = am_has_feature(hostp->features,
                                          fe_req_options_config);
  
-       snprintf(number, SIZEOF(number), "%d", hostp->maxdumps);
+       g_snprintf(number, SIZEOF(number), "%d", hostp->maxdumps);
        req = vstralloc("SERVICE ", "sendsize", "\n",
                        "OPTIONS ",
                        has_features ? "features=" : "",
  
                    if(lev == -1) break;
  
-                   snprintf(level, SIZEOF(level), "%d", lev);
-                   snprintf(spindle, SIZEOF(spindle), "%d", dp->spindle);
+                   g_snprintf(level, SIZEOF(level), "%d", lev);
+                   g_snprintf(spindle, SIZEOF(spindle), "%d", dp->spindle);
                    if(am_has_feature(hostp->features,fe_sendsize_req_options)){
                        exclude1 = " OPTIONS |";
                        exclude2 = optionstr(dp, hostp->features, NULL);
                        if ( exclude2 == NULL ) {
-                         error("problem with option string, check the dumptype definition.\n");
+                         error(_("problem with option string, check the dumptype definition.\n"));
                        }
                        excludefree = exclude2;
                        includefree = NULL;
  
                    if(dp->estimate == ES_CALCSIZE &&
                       !am_has_feature(hostp->features, fe_calcsize_estimate)) {
-                       log_add(L_WARNING,"%s:%s does not support CALCSIZE for estimate, using CLIENT.\n",
+                       log_add(L_WARNING,_("%s:%s does not support CALCSIZE for estimate, using CLIENT.\n"),
                                hostp->hostname, qname);
                        dp->estimate = ES_CLIENT;
                    }
                        }
                    }
                }
-               fprintf(stderr,"%s time %s: got result for host %s disk %s:",
+               g_fprintf(stderr,_("%s time %s: got result for host %s disk %s:"),
                        get_pname(), walltime_str(curclock()),
                        dp->host->hostname, qname);
-               fprintf(stderr," %d -> " OFF_T_FMT "K, %d -> " OFF_T_FMT "K, %d -> " OFF_T_FMT "K\n",
-                       est(dp)->level[0], (OFF_T_FMT_TYPE)est(dp)->est_size[0],
-                       est(dp)->level[1], (OFF_T_FMT_TYPE)est(dp)->est_size[1],
-                       est(dp)->level[2], (OFF_T_FMT_TYPE)est(dp)->est_size[2]);
+               g_fprintf(stderr,_(" %d -> %lldK, %d -> %lldK, %d -> %lldK\n"),
+                       est(dp)->level[0], (long long)est(dp)->est_size[0],
+                       est(dp)->level[1], (long long)est(dp)->est_size[1],
+                       est(dp)->level[2], (long long)est(dp)->est_size[2]);
                est(dp)->state = DISK_DONE;
                remove_disk(&startq, dp);
                enqueue_disk(&estq, dp);
  
      secdrv = security_getdriver(hostp->disks->security_driver);
      if (secdrv == NULL) {
-       error("could not find security driver '%s' for host '%s'",
-           hostp->disks->security_driver, hostp->hostname);
-       /*NOTREACHED*/
+       hostp->up = HOST_DONE;
+       log_add(L_ERROR,
+               _("Could not find security driver '%s' for host '%s'"),
+               hostp->disks->security_driver, hostp->hostname);
+       amfree(req);
+       return;
      }
      hostp->up = HOST_ACTIVE;
  
  
      protocol_sendreq(hostp->hostname, secdrv, amhost_get_security_conf, 
        req, timeout, handle_result, hostp);
      amfree(req);
  }
  
@@@ -1678,14 -1653,14 +1676,14 @@@ static void handle_result
      int tch;
      char *qname;
      char *disk;
-     OFF_T_FMT_TYPE size_;
+     long long size_;
  
      hostp = (am_host_t *)datap;
      hostp->up = HOST_READY;
  
      if (pkt == NULL) {
-       errbuf = vstralloc("Request to ", hostp->hostname, " failed: ", 
-           security_geterror(sech), NULL);
+       errbuf = vstrallocf(_("Request to %s failed: %s"),
+                       hostp->hostname, security_geterror(sech));
        goto error_return;
      }
      if (pkt->type == P_NAK) {
                t += SIZEOF("features=")-1;
                am_release_feature_set(hostp->features);
                if((hostp->features = am_string_to_feature(t)) == NULL) {
-                   errbuf = vstralloc(hostp->hostname,
-                                      ": bad features value: ",
-                                      line,
-                                      "\n",
-                                      NULL);
+                   errbuf = vstrallocf(hostp->hostname,
+                                      _(": bad features value: %s\n"), line);
                    goto error_return;
                }
            }
        dp = lookup_hostdisk(hostp, disk);
        dp = lookup_hostdisk(hostp, disk);
        if(dp == NULL) {
-           log_add(L_ERROR, "%s: invalid reply from sendsize: `%s'\n",
+           log_add(L_ERROR, _("%s: invalid reply from sendsize: `%s'\n"),
                    hostp->hostname, line);
            goto bad_msg;
        }
  
        size = (off_t)-1;
        if (strncmp_const(t-1,"SIZE ") == 0) {
-           if (sscanf(t - 1, "SIZE " OFF_T_FMT ,
-                      (OFF_T_FMT_TYPE *)&size_) != 1) {
+           if (sscanf(t - 1, "SIZE %lld", &size_) != 1) {
                goto bad_msg;
            }
-           size = size_;
+           size = (off_t)size_;
        } else if (strncmp_const(t-1,"ERROR ") == 0) {
            skip_non_whitespace(t, tch);
            skip_whitespace(t, tch);
         * The client does not support the features list, so give it an
         * empty one.
         */
-       dbprintf(("%s: no feature set from host %s\n",
-                 debug_prefix_time(NULL), hostp->hostname));
+       dbprintf(_("no feature set from host %s\n"), hostp->hostname);
        hostp->features = am_set_default_feature_set();
      }
  
  
        qname = quote_string(dp->name);
        if(pkt->type == P_PREP) {
-               fprintf(stderr,"%s: time %s: got partial result for host %s disk %s:",
+               g_fprintf(stderr,_("%s: time %s: got partial result for host %s disk %s:"),
                        get_pname(), walltime_str(curclock()),
                        dp->host->hostname, qname);
-               fprintf(stderr," %d -> " OFF_T_FMT "K, %d -> " OFF_T_FMT "K, %d -> " OFF_T_FMT "K\n",
-                       est(dp)->level[0], (OFF_T_FMT_TYPE)est(dp)->est_size[0],
-                       est(dp)->level[1], (OFF_T_FMT_TYPE)est(dp)->est_size[1],
-                       est(dp)->level[2], (OFF_T_FMT_TYPE)est(dp)->est_size[2]);
+               g_fprintf(stderr,_(" %d -> %lldK, %d -> %lldK, %d -> %lldK\n"),
+                       est(dp)->level[0], (long long)est(dp)->est_size[0],
+                       est(dp)->level[1], (long long)est(dp)->est_size[1],
+                       est(dp)->level[2], (long long)est(dp)->est_size[2]);
            enqueue_disk(&pestq, dp);
        }
        else if(pkt->type == P_REP) {
-               fprintf(stderr,"%s: time %s: got result for host %s disk %s:",
+               g_fprintf(stderr,_("%s: time %s: got result for host %s disk %s:"),
                        get_pname(), walltime_str(curclock()),
                        dp->host->hostname, qname);
-               fprintf(stderr," %d -> " OFF_T_FMT "K, %d -> " OFF_T_FMT "K, %d -> " OFF_T_FMT "K\n",
-                       est(dp)->level[0], (OFF_T_FMT_TYPE)est(dp)->est_size[0],
-                       est(dp)->level[1], (OFF_T_FMT_TYPE)est(dp)->est_size[1],
-                       est(dp)->level[2], (OFF_T_FMT_TYPE)est(dp)->est_size[2]);
+               g_fprintf(stderr,_(" %d -> %lldK, %d -> %lldK, %d -> %lldK\n"),
+                       est(dp)->level[0], (long long)est(dp)->est_size[0],
+                       est(dp)->level[1], (long long)est(dp)->est_size[1],
+                       est(dp)->level[2], (long long)est(dp)->est_size[2]);
                if((est(dp)->level[0] != -1 && est(dp)->est_size[0] > (off_t)0) ||
                   (est(dp)->level[1] != -1 && est(dp)->est_size[1] > (off_t)0) ||
                   (est(dp)->level[2] != -1 && est(dp)->est_size[2] > (off_t)0)) {
  
                    if(est(dp)->level[2] != -1 && est(dp)->est_size[2] < (off_t)0) {
                        log_add(L_WARNING,
-                               "disk %s:%s, estimate of level %d failed.",
+                               _("disk %s:%s, estimate of level %d failed."),
                                dp->host->hostname, qname, est(dp)->level[2]);
                        est(dp)->level[2] = -1;
                    }
                    if(est(dp)->level[1] != -1 && est(dp)->est_size[1] < (off_t)0) {
                        log_add(L_WARNING,
-                               "disk %s:%s, estimate of level %d failed.",
+                               _("disk %s:%s, estimate of level %d failed."),
                                dp->host->hostname, qname,
                                est(dp)->level[1]);
                        est(dp)->level[1] = -1;
                    }
                    if(est(dp)->level[0] != -1 && est(dp)->est_size[0] < (off_t)0) {
                        log_add(L_WARNING,
-                               "disk %s:%s, estimate of level %d failed.",
+                               _("disk %s:%s, estimate of level %d failed."),
                                dp->host->hostname, qname, est(dp)->level[0]);
                        est(dp)->level[0] = -1;
                    }
            else {
                enqueue_disk(&failq, dp);
                if(est(dp)->got_estimate) {
-                   est(dp)->errstr = vstralloc("disk ", qname,
-                                               ", all estimate failed", NULL);
+                   est(dp)->errstr = vstrallocf("disk %s, all estimate failed",
+                                                qname);
                }
                else {
-                   fprintf(stderr,
-                        "error result for host %s disk %s: missing estimate\n",
+                   g_fprintf(stderr,
+                        _("error result for host %s disk %s: missing estimate\n"),
                         dp->host->hostname, qname);
                    if (est(dp)->errstr == NULL) {
-                       est(dp)->errstr = vstralloc("missing result for ",
-                                                   qname, " in ",
-                                                   dp->host->hostname,
-                                                   " response", NULL);
+                       est(dp)->errstr = vstrallocf(_("missing result for %s in %s response"),
+                                                   qname, dp->host->hostname);
                    }
                }
            }
        amfree(qname);
      }
      getsize(hostp);
+     /* try to clean up any defunct processes, since Amanda doesn't wait() for
+        them explicitly */
+     while(waitpid(-1, NULL, WNOHANG)> 0);
      return;
  
   NAK_parse_failed:
  
-     errbuf = stralloc2(hostp->hostname, " NAK: [NAK parse failed]");
-     fprintf(stderr, "got strange nak from %s:\n----\n%s----\n\n",
+     errbuf = vstrallocf(_("%s NAK: [NAK parse failed]"), hostp->hostname);
+     g_fprintf(stderr, _("got strange nak from %s:\n----\n%s----\n\n"),
            hostp->hostname, pkt->body);
      goto error_return;
  
   bad_msg:
-     fprintf(stderr,"got a bad message, stopped at:\n");
+     g_fprintf(stderr,_("got a bad message, stopped at:\n"));
      /*@ignore@*/
-     fprintf(stderr,"----\n%s----\n\n", line);
-     errbuf = stralloc2("badly formatted response from ", hostp->hostname);
+     g_fprintf(stderr,_("----\n%s----\n\n"), line);
+     errbuf = stralloc2(_("badly formatted response from "), hostp->hostname);
      /*@end@*/
  
   error_return:
      i = 0;
      for(dp = hostp->disks; dp != NULL; dp = dp->hostnext) {
-       if(est(dp)->state != DISK_ACTIVE) continue;
-       qname = quote_string(dp->name);
-       est(dp)->state = DISK_DONE;
-       if(est(dp)->state == DISK_ACTIVE) {
-           est(dp)->state = DISK_DONE;
-           remove_disk(&waitq, dp);
-           enqueue_disk(&failq, dp);
-           i++;
+       if (dp->todo) {
+           if(est(dp)->state == DISK_ACTIVE) {
+               qname = quote_string(dp->name);
+               est(dp)->state = DISK_DONE;
+               remove_disk(&waitq, dp);
+               enqueue_disk(&failq, dp);
+               i++;
  
-           est(dp)->errstr = stralloc(errbuf);
-           fprintf(stderr, "error result for host %s disk %s: %s\n",
-                   dp->host->hostname, qname, errbuf);
+               est(dp)->errstr = stralloc(errbuf);
+               g_fprintf(stderr, _("error result for host %s disk %s: %s\n"),
+                         dp->host->hostname, qname, errbuf);
+               amfree(qname);
+           }
        }
 +      amfree(qname);
      }
      if(i == 0) {
        /*
      }
      hostp->up = HOST_DONE;
      amfree(errbuf);
+     /* try to clean up any defunct processes, since Amanda doesn't wait() for
+        them explicitly */
+     while(waitpid(-1, NULL, WNOHANG)> 0);
  }
  
  
@@@ -1995,9 -1969,9 +1993,9 @@@ static void analyze_estimate
  
      ep = est(dp);
  
-     fprintf(stderr, "pondering %s:%s... ",
+     g_fprintf(stderr, _("pondering %s:%s... "),
            dp->host->hostname, qname);
-     fprintf(stderr, "next_level0 %d last_level %d ",
+     g_fprintf(stderr, _("next_level0 %d last_level %d "),
            ep->next_level0, ep->last_level);
  
      if(get_info(dp->host->hostname, dp->name, &info) == 0) {
      if(ep->next_level0 <= 0 || (have_info && ep->last_level == 0
         && (info.command & FORCE_NO_BUMP))) {
        if(ep->next_level0 <= 0) {
-           fprintf(stderr,"(due for level 0) ");
+           g_fprintf(stderr,_("(due for level 0) "));
        }
        ep->dump_level = 0;
        ep->dump_nsize = est_size(dp, 0);
        ep->dump_csize = est_tape_size(dp, 0);
        if(ep->dump_csize <= (off_t)0) {
-           fprintf(stderr,
-                   "(no estimate for level 0, picking an incr level)\n");
+           g_fprintf(stderr,
+                   _("(no estimate for level 0, picking an incr level)\n"));
            ep->dump_level = pick_inclevel(dp);
            ep->dump_nsize = est_size(dp, ep->dump_level);
            ep->dump_csize = est_tape_size(dp, ep->dump_level);
        else {
            total_lev0 += (double) ep->dump_csize;
            if(ep->last_level == -1 || dp->skip_incr) {
-               fprintf(stderr,"(%s disk, can't switch to degraded mode)\n",
-                       dp->skip_incr? "skip-incr":"new");
+               g_fprintf(stderr,_("(%s disk, can't switch to degraded mode)\n"),
+                       dp->skip_incr? "skip-incr":_("new"));
                ep->degr_level = -1;
                ep->degr_nsize = (off_t)-1;
                ep->degr_csize = (off_t)-1;
            }
            else {
                /* fill in degraded mode info */
-               fprintf(stderr,"(picking inclevel for degraded mode)");
+               g_fprintf(stderr,_("(picking inclevel for degraded mode)"));
                ep->degr_level = pick_inclevel(dp);
                ep->degr_nsize = est_size(dp, ep->degr_level);
                ep->degr_csize = est_tape_size(dp, ep->degr_level);
                    ep->degr_csize = est_tape_size(dp, ep->degr_level);
                }
                if(ep->degr_csize == (off_t)-1) {
-                   fprintf(stderr,"(no inc estimate)");
+                   g_fprintf(stderr,_("(no inc estimate)"));
                    ep->degr_level = -1;
                }
-               fprintf(stderr,"\n");
+               g_fprintf(stderr,"\n");
            }
        }
      }
      else {
-       fprintf(stderr,"(not due for a full dump, picking an incr level)\n");
+       g_fprintf(stderr,_("(not due for a full dump, picking an incr level)\n"));
        /* XXX - if this returns -1 may be we should force a total? */
        ep->dump_level = pick_inclevel(dp);
        ep->dump_nsize = est_size(dp, ep->dump_level);
        }
      }
  
-     fprintf(stderr,"  curr level %d nsize " OFF_T_FMT " csize " OFF_T_FMT " ",
-           ep->dump_level, (OFF_T_FMT_TYPE)ep->dump_nsize, 
-             (OFF_T_FMT_TYPE)ep->dump_csize);
+     g_fprintf(stderr,_("  curr level %d nsize %lld csize %lld "),
+           ep->dump_level, (long long)ep->dump_nsize, 
+             (long long)ep->dump_csize);
  
      insert_disk(&schedq, dp, schedule_order);
  
        balanced_size += (double)(lev0size / (off_t)runs_per_cycle);
      }
  
-     fprintf(stderr,"total size " OFF_T_FMT " total_lev0 %1.0lf balanced-lev0size %1.0lf\n",
-           (OFF_T_FMT_TYPE)total_size, total_lev0, balanced_size);
+     g_fprintf(stderr,_("total size %lld total_lev0 %1.0lf balanced-lev0size %1.0lf\n"),
+           (long long)total_size, total_lev0, balanced_size);
      amfree(qname);
  }
  
  static void handle_failed(
      disk_t *dp)
  {
-     char *errstr;
+     char *errstr, *errstr1, *qerrstr;
      char *qname = quote_string(dp->name);
  
- /*
-  * From George Scott <George.Scott@cc.monash.edu.au>:
-  * --------
-  * If a machine is down when the planner is run it guesses from historical
-  * data what the size of tonights dump is likely to be and schedules a
-  * dump anyway.  The dumper then usually discovers that that machine is
-  * still down and ends up with a half full tape.  Unfortunately the
-  * planner had to delay another dump because it thought that the tape was
-  * full.  The fix here is for the planner to ignore unavailable machines
-  * rather than ignore the fact that they are unavailable.
-  * --------
-  */
- #ifdef old_behavior
-     if(est(dp)->last_level != -1) {
-       log_add(L_WARNING,
-               "Could not get estimate for %s:%s, using historical data.",
-               dp->host->hostname, qname);
-       analyze_estimate(dp);
-       amfree(qname);
-       return;
-     }
- #endif
-     errstr = est(dp)->errstr? est(dp)->errstr : "hmm, no error indicator!";
+     errstr = est(dp)->errstr? est(dp)->errstr : _("hmm, no error indicator!");
+     errstr1 = vstralloc("[",errstr,"]", NULL);
+     qerrstr = quote_string(errstr1);
+     amfree(errstr1);
  
- fprintf(stderr,"errstr:%s:\n", errstr);
-     fprintf(stderr, "%s: FAILED %s %s %s 0 [%s]\n",
-       get_pname(), dp->host->hostname, qname, planner_timestamp, errstr);
+     g_fprintf(stderr, _("%s: FAILED %s %s %s 0 %s\n"),
+       get_pname(), dp->host->hostname, qname, planner_timestamp, qerrstr);
  
-     log_add(L_FAIL, "%s %s %s 0 [%s]", dp->host->hostname, qname, 
-           planner_timestamp, errstr);
+     log_add(L_FAIL, _("%s %s %s 0 %s"), dp->host->hostname, qname, 
+           planner_timestamp, qerrstr);
  
+     amfree(qerrstr);
      amfree(qname);
      /* XXX - memory leak with *dp */
  }
@@@ -2183,13 -2136,13 +2160,13 @@@ static int pick_inclevel
  
      /* if last night was level 0, do level 1 tonight, no ifs or buts */
      if(base_level == 0) {
-       fprintf(stderr,"   picklev: last night 0, so tonight level 1\n");
+       g_fprintf(stderr,_("   picklev: last night 0, so tonight level 1\n"));
        return 1;
      }
  
      /* if no-full option set, always do level 1 */
      if(dp->strategy == DS_NOFULL) {
-       fprintf(stderr,"   picklev: no-full set, so always level 1\n");
+       g_fprintf(stderr,_("   picklev: no-full set, so always level 1\n"));
        return 1;
      }
  
        base_size = est_size(dp, base_level+1);
        if(base_size > (off_t)0) /* FORCE_BUMP */
            return base_level+1;
-       fprintf(stderr,"   picklev: no estimate for level %d, so no incs\n", base_level);
+       g_fprintf(stderr,_("   picklev: no estimate for level %d, so no incs\n"), base_level);
        return base_level;
      }
  
      thresh = bump_thresh(base_level, est_size(dp, 0), dp->bumppercent, dp->bumpsize, dp->bumpmult);
  
-     fprintf(stderr,
-           "   pick: size " OFF_T_FMT " level %d days %d (thresh " OFF_T_FMT "K, %d days)\n",
-           (OFF_T_FMT_TYPE)base_size, base_level, est(dp)->level_days,
-           (OFF_T_FMT_TYPE)thresh, dp->bumpdays);
+     g_fprintf(stderr,
+           _("   pick: size %lld level %d days %d (thresh %lldK, %d days)\n"),
+           (long long)base_size, base_level, est(dp)->level_days,
+           (long long)thresh, dp->bumpdays);
  
      if(base_level == 9
         || est(dp)->level_days < dp->bumpdays
  
      if(bump_size == (off_t)-1) return base_level;
  
-     fprintf(stderr, "   pick: next size " OFF_T_FMT "... ",
-           (OFF_T_FMT_TYPE)bump_size);
+     g_fprintf(stderr, _("   pick: next size %lld... "),
+           (long long)bump_size);
  
      if(base_size - bump_size < thresh) {
-       fprintf(stderr, "not bumped\n");
+       g_fprintf(stderr, _("not bumped\n"));
        return base_level;
      }
  
      qname = quote_string(dp->name);
-     fprintf(stderr, "BUMPED\n");
-     log_add(L_INFO, "Incremental of %s:%s bumped to level %d.",
+     g_fprintf(stderr, _("BUMPED\n"));
+     log_add(L_INFO, _("Incremental of %s:%s bumped to level %d."),
            dp->host->hostname, qname, bump_level);
      amfree(qname);
  
@@@ -2309,16 -2262,14 +2286,14 @@@ static void delay_dumps(void
        if (full_size > tapetype_get_length(tape) * (off_t)avail_tapes) {
            char *qname = quote_string(dp->name);
            if (conf_runtapes > 1 && dp->tape_splitsize == (off_t)0) {
-               log_add(L_WARNING, "disk %s:%s, full dump (" OFF_T_FMT 
-                       "KB) will be larger than available tape space"
-                       ", you could define a splitsize",
+               log_add(L_WARNING, _("disk %s:%s, full dump (%lldKB) will be larger than available tape space"
+                       ", you could define a splitsize"),
                        dp->host->hostname, qname,
-                       (OFF_T_FMT_TYPE)full_size);
+                       (long long)full_size);
            } else {
-               log_add(L_WARNING, "disk %s:%s, full dump (" OFF_T_FMT 
-                       "KB) will be larger than available tape space",
+               log_add(L_WARNING, _("disk %s:%s, full dump (%lldKB) will be larger than available tape space"),
                        dp->host->hostname, qname,
-                       (OFF_T_FMT_TYPE)full_size);
+                       (long long)full_size);
            }
            amfree(qname);
        }
        }
  
        /* Format dumpsize for messages */
-       snprintf(est_kb, 20, OFF_T_FMT " KB,",
-                (OFF_T_FMT_TYPE)est(dp)->dump_csize);
+       g_snprintf(est_kb, 20, "%lld KB,",
+                (long long)est(dp)->dump_csize);
  
        if(est(dp)->dump_level == 0) {
            if(dp->skip_incr) {
                delete = 1;
-               message = "but cannot incremental dump skip-incr disk";
+               message = _("but cannot incremental dump skip-incr disk");
            }
            else if(est(dp)->last_level < 0) {
                delete = 1;
-               message = "but cannot incremental dump new disk";
+               message = _("but cannot incremental dump new disk");
            }
            else if(est(dp)->degr_level < 0) {
                delete = 1;
-               message = "but no incremental estimate";
+               message = _("but no incremental estimate");
            }
            else if (est(dp)->degr_csize > tapetype_get_length(tape)) {
                delete = 1;
-               message = "incremental dump also larger than tape";
+               message = _("incremental dump also larger than tape");
            }
            else {
                delete = 0;
-               message = "full dump delayed";
+               message = _("full dump delayed");
            }
        }
        else {
            delete = 1;
-           message = "skipping incremental";
+           message = _("skipping incremental");
        }
-       delay_one_dump(dp, delete, "dump larger than available tape space,",
+       delay_one_dump(dp, delete, _("dump larger than available tape space,"),
                       est_kb, message, NULL);
      }
  
        if(dp != preserve) {
  
            /* Format dumpsize for messages */
-           snprintf(est_kb, 20, OFF_T_FMT " KB,",
-                    (OFF_T_FMT_TYPE)est(dp)->dump_csize);
+           g_snprintf(est_kb, 20, "%lld KB,",
+                    (long long)est(dp)->dump_csize);
  
            if(dp->skip_incr) {
                delete = 1;
-               message = "but cannot incremental dump skip-incr disk";
+               message = _("but cannot incremental dump skip-incr disk");
            }
            else if(est(dp)->last_level < 0) {
                delete = 1;
-               message = "but cannot incremental dump new disk";
+               message = _("but cannot incremental dump new disk");
            }
            else if(est(dp)->degr_level < 0) {
                delete = 1;
-               message = "but no incremental estimate";
+               message = _("but no incremental estimate");
            }
            else {
                delete = 0;
-               message = "full dump delayed";
+               message = _("full dump delayed");
            }
-           delay_one_dump(dp, delete, "dumps too big,", est_kb,
+           delay_one_dump(dp, delete, _("dumps too big,"), est_kb,
                           message, NULL);
        }
      }
            if(est(dp)->dump_level == 0 && dp != preserve) {
  
                /* Format dumpsize for messages */
-               snprintf(est_kb, 20, OFF_T_FMT " KB,",
-                            (OFF_T_FMT_TYPE)est(dp)->dump_csize);
+               g_snprintf(est_kb, 20, "%lld KB,",
+                            (long long)est(dp)->dump_csize);
  
                if(dp->skip_incr) {
                    delete = 1;
-                   message = "but cannot incremental dump skip-incr disk";
+                   message = _("but cannot incremental dump skip-incr disk");
                }
                else if(est(dp)->last_level < 0) {
                    delete = 1;
-                   message = "but cannot incremental dump new disk";
+                   message = _("but cannot incremental dump new disk");
                }
                else if(est(dp)->degr_level < 0) {
                    delete = 1;
-                   message = "but no incremental estimate";
+                   message = _("but no incremental estimate");
                }
                else {
                    delete = 0;
-                   message = "full dump delayed";
+                   message = _("full dump delayed");
                }
-               delay_one_dump(dp, delete, "dumps too big,", est_kb,
+               delay_one_dump(dp, delete, _("dumps too big,"), est_kb,
                               message, NULL);
            }
        }
        if(est(dp)->dump_level != 0) {
  
            /* Format dumpsize for messages */
-           snprintf(est_kb, 20, OFF_T_FMT " KB,",
-                    (OFF_T_FMT_TYPE)est(dp)->dump_csize);
+           g_snprintf(est_kb, 20, "%lld KB,",
+                    (long long)est(dp)->dump_csize);
  
            delay_one_dump(dp, 1,
-                          "dumps way too big,",
+                          _("dumps way too big,"),
                           est_kb,
-                          "must skip incremental dumps",
+                          _("must skip incremental dumps"),
                           NULL);
        }
      }
  /*@i@*/ for(bi = biq.head; bi != NULL; bi = nbi) {
        nbi = bi->next;
        if(bi->deleted) {
-           fprintf(stderr, "%s: FAILED %s\n", get_pname(), bi->errstr);
+           g_fprintf(stderr, "%s: FAILED %s\n", get_pname(), bi->errstr);
            log_add(L_FAIL, "%s", bi->errstr);
        }
        else {
            dp = bi->dp;
-           fprintf(stderr, "  delay: %s now at level %d\n",
+           g_fprintf(stderr, _("  delay: %s now at level %d\n"),
                bi->errstr, est(dp)->dump_level);
            log_add(L_INFO, "%s", bi->errstr);
        }
        /*@end@*/
      }
  
-     fprintf(stderr, "  delay: Total size now " OFF_T_FMT ".\n",
-            (OFF_T_FMT_TYPE)total_size);
+     g_fprintf(stderr, _("  delay: Total size now %lld.\n"),
+            (long long)total_size);
  
      return;
  }
@@@ -2586,6 -2537,7 +2561,7 @@@ arglist_function1
      char *sep;
      char *next;
      char *qname = quote_string(dp->name);
+     char *errstr, *qerrstr;
  
      arglist_start(argp, delete);
  
      bi->nsize = est(dp)->dump_nsize;
      bi->csize = est(dp)->dump_csize;
  
-     snprintf(level_str, SIZEOF(level_str), "%d", est(dp)->dump_level);
+     g_snprintf(level_str, SIZEOF(level_str), "%d", est(dp)->dump_level);
      bi->errstr = vstralloc(dp->host->hostname,
                           " ", qname,
                           " ", planner_timestamp ? planner_timestamp : "?",
                           " ", level_str,
                           NULL);
-     sep = " [";
+     errstr = NULL;
+     sep = "[";
      while ((next = arglist_val(argp, char *)) != NULL) {
-       bi->errstr = newvstralloc(bi->errstr, bi->errstr, sep, next, NULL);
+       vstrextend(&errstr, sep, next, NULL);
        sep = " ";
      }
-     strappend(bi->errstr, "]");
+     strappend(errstr, "]");
+     qerrstr = quote_string(errstr);
+     vstrextend(&bi->errstr, " ", qerrstr, NULL);
+     amfree(errstr);
+     amfree(qerrstr);
      arglist_end(argp);
  
      if (delete) {
@@@ -2715,11 -2672,11 +2696,11 @@@ static int promote_highest_priority_inc
        qname = quote_string(dp->name);
        if(!dp_promote || est(dp_promote)->promote < est(dp)->promote) {
            dp_promote = dp;
-           fprintf(stderr,"   try %s:%s %d %d %d = %d\n",
+           g_fprintf(stderr,"   try %s:%s %d %d %d = %d\n",
                    dp->host->hostname, qname, nb_same_day, nb_today, est(dp)->next_level0, est(dp)->promote);
        }
        else {
-           fprintf(stderr,"no try %s:%s %d %d %d = %d\n",
+           g_fprintf(stderr,"no try %s:%s %d %d %d = %d\n",
                    dp->host->hostname, qname, nb_same_day, nb_today, est(dp)->next_level0, est(dp)->promote);
        }
        amfree(qname);
        est(dp)->dump_csize = new_size;
        est(dp)->next_level0 = 0;
  
-       fprintf(stderr,
-             "   promote: moving %s:%s up, total_lev0 %1.0lf, total_size " OFF_T_FMT "\n",
+       g_fprintf(stderr,
+             _("   promote: moving %s:%s up, total_lev0 %1.0lf, total_size %lld\n"),
                dp->host->hostname, qname,
-               total_lev0, (OFF_T_FMT_TYPE)total_size);
+               total_lev0, (long long)total_size);
  
        log_add(L_INFO,
-               "Full dump of %s:%s promoted from %d day%s ahead.",
-               dp->host->hostname, qname,
-               check_days, (check_days == 1) ? "" : "s");
+               plural(_("Full dump of %s:%s promoted from %d day ahead."),
+                      _("Full dump of %s:%s promoted from %d days ahead."),
+                     check_days),
+               dp->host->hostname, qname, check_days);
        amfree(qname);
        return 1;
      }
@@@ -2837,15 -2795,16 +2819,16 @@@ static int promote_hills(void
            est(dp)->dump_nsize = est_size(dp, 0);
            est(dp)->dump_csize = new_size;
  
-           fprintf(stderr,
-                   "   promote: moving %s:%s up, total_lev0 %1.0lf, total_size " OFF_T_FMT "\n",
+           g_fprintf(stderr,
+                   _("   promote: moving %s:%s up, total_lev0 %1.0lf, total_size %lld\n"),
                    dp->host->hostname, qname,
-                   total_lev0, (OFF_T_FMT_TYPE)total_size);
+                   total_lev0, (long long)total_size);
  
            log_add(L_INFO,
-                   "Full dump of %s:%s specially promoted from %d day%s ahead.",
-                   dp->host->hostname, qname,
-                   hill_days, (hill_days == 1) ? "" : "s");
+                   plural(_("Full dump of %s:%s specially promoted from %d day ahead."),
+                          _("Full dump of %s:%s specially promoted from %d days ahead."),
+                          hill_days),
+                   dp->host->hostname, qname, hill_days);
  
            amfree(qname);
            amfree(sp);
@@@ -2892,11 -2851,11 +2875,11 @@@ static void output_scheduleline
  
      if(ep->dump_csize == (off_t)-1) {
        /* no estimate, fail the disk */
-       fprintf(stderr,
-               "%s: FAILED %s %s %s %d [no estimate]\n",
+       g_fprintf(stderr,
+               _("%s: FAILED %s %s %s %d \"[no estimate]\"\n"),
                get_pname(),
                dp->host->hostname, qname, planner_timestamp, ep->dump_level);
-       log_add(L_FAIL, "%s %s %s %d [no estimate]",
+       log_add(L_FAIL, _("%s %s %s %d [no estimate]"),
                dp->host->hostname, qname, planner_timestamp, ep->dump_level);
        amfree(qname);
        return;
      }
  
      if(ep->dump_level == 0 && ep->degr_csize != (off_t)-1) {
-       snprintf(degr_level_str, sizeof(degr_level_str),
+       g_snprintf(degr_level_str, sizeof(degr_level_str),
                    "%d", ep->degr_level);
-       snprintf(degr_nsize_str, sizeof(degr_nsize_str),
-                   OFF_T_FMT, (OFF_T_FMT_TYPE)ep->degr_nsize);
-       snprintf(degr_csize_str, sizeof(degr_csize_str),
-                   OFF_T_FMT, (OFF_T_FMT_TYPE)ep->degr_csize);
-       snprintf(degr_time_str, sizeof(degr_time_str),
-                   OFF_T_FMT, (OFF_T_FMT_TYPE)degr_time);
-       snprintf(degr_kps_str, sizeof(degr_kps_str),
+       g_snprintf(degr_nsize_str, sizeof(degr_nsize_str),
+                   "%lld", (long long)ep->degr_nsize);
+       g_snprintf(degr_csize_str, sizeof(degr_csize_str),
+                   "%lld", (long long)ep->degr_csize);
+       g_snprintf(degr_time_str, sizeof(degr_time_str),
+                   "%lld", (long long)degr_time);
+       g_snprintf(degr_kps_str, sizeof(degr_kps_str),
                    "%.0lf", degr_kps);
        degr_str = vstralloc(" ", degr_level_str,
                             " ", degr_date,
                             " ", degr_kps_str,
                             NULL);
      }
-     snprintf(dump_priority_str, SIZEOF(dump_priority_str),
+     g_snprintf(dump_priority_str, SIZEOF(dump_priority_str),
                "%d", ep->dump_priority);
-     snprintf(dump_level_str, SIZEOF(dump_level_str),
+     g_snprintf(dump_level_str, SIZEOF(dump_level_str),
                "%d", ep->dump_level);
-     snprintf(dump_nsize_str, sizeof(dump_nsize_str),
-               OFF_T_FMT, (OFF_T_FMT_TYPE)ep->dump_nsize);
-     snprintf(dump_csize_str, sizeof(dump_csize_str),
-               OFF_T_FMT, (OFF_T_FMT_TYPE)ep->dump_csize);
-     snprintf(dump_time_str, sizeof(dump_time_str),
-               OFF_T_FMT, (OFF_T_FMT_TYPE)dump_time);
-     snprintf(dump_kps_str, sizeof(dump_kps_str),
+     g_snprintf(dump_nsize_str, sizeof(dump_nsize_str),
+               "%lld", (long long)ep->dump_nsize);
+     g_snprintf(dump_csize_str, sizeof(dump_csize_str),
+               "%lld", (long long)ep->dump_csize);
+     g_snprintf(dump_time_str, sizeof(dump_time_str),
+               "%lld", (long long)dump_time);
+     g_snprintf(dump_kps_str, sizeof(dump_kps_str),
                "%.0lf", dump_kps);
      features = am_feature_to_string(dp->host->features);
      schedline = vstralloc("DUMP ",dp->host->hostname,
diff --combined server-src/reporter.c
index 21c171c057227705cb4b43c048108ae2fdc49dc5,6f0e248678157a65224dff3e8d92f3fdd760acf1..ae3b1d204b17a719b11f1e9bb7a19ca666d54aa1
   * report format
   *     tape label message
   *     error messages
+  *     strange messages
   *     summary stats
   *     details for errors
+  *     details for strange
   *     notes
   *     success summary
   */
  
  #include "amanda.h"
  #include "conffile.h"
+ #include "columnar.h"
  #include "tapefile.h"
  #include "diskfile.h"
  #include "infofile.h"
  #include "logfile.h"
  #include "version.h"
  #include "util.h"
+ #include "timestamp.h"
+ #include "holding.h"
  
  /* don't have (or need) a skipped type except internally to reporter */
  #define L_SKIPPED     L_MARKER
@@@ -69,6 -74,7 +74,7 @@@ typedef struct timedata_s 
      double sec, kps;
      int filenum;
      char *tapelabel;
+     int totpart;
  } timedata_t;
  
  typedef struct repdata_s {
@@@ -104,15 -110,16 +110,16 @@@ typedef struct taper_s 
  static taper_t *stats_by_tape = NULL;
  static taper_t *current_tape = NULL;
  
- typedef struct strange_s {
+ typedef struct X_summary_s {
      char *hostname;
      char *diskname;
      int  level;
      char *str;
-     struct strange_s *next;
- } strange_t;
+     struct X_summary_s *next;
+ } X_summary_t;
  
- static strange_t *first_strange=NULL, *last_strange=NULL;
+ static X_summary_t *first_strange=NULL, *last_strange=NULL;
+ static X_summary_t *first_failed=NULL, *last_failed=NULL;
  
  static double total_time, startup_time, planner_time;
  
@@@ -127,6 -134,7 +134,7 @@@ static int degraded_mode = 0; /* define
  static int normal_run = 0;
  static int amflush_run = 0;
  static int got_finish = 0;
+ static int cmdlogfname = 0;
  static char *ghostname = NULL;
  
  static char *tapestart_error = NULL;
@@@ -141,12 -149,13 +149,13 @@@ static disklist_t sortq
  
  static line_t *errsum = NULL;
  static line_t *errdet = NULL;
+ static line_t *strangedet = NULL;
  static line_t *notes = NULL;
  
  static char MaxWidthsRequested = 0;   /* determined via config data */
  
- char *displayunit;
- long int unitdivisor;
static char *displayunit;
static long int unitdivisor;
  
  /* local functions */
  int main(int argc, char **argv);
@@@ -162,10 -171,11 +171,11 @@@ static int      ColWidth(int From, int To)
  static int    contline_next(void);
  static int    sort_by_name(disk_t *a, disk_t *b);
  static repdata_t *find_repdata(disk_t *dp, char *datestamp, int level);
- static repdata_t *handle_chunk(void);
+ static repdata_t *handle_chunk(logtype_t logtype);
  static repdata_t *handle_success(logtype_t logtype);
  static void   addline(line_t **lp, char *str);
- static void   addtostrange(char *host, char *disk, int level, char *str);
+ static void   addtoX_summary(X_summary_t **first, X_summary_t **last,
+                              char *host, char *disk, int level, char *str);
  static void   bogus_line(const char *);
  static void   CalcMaxWidth(void);
  static void   CheckFloatMax(ColumnInfo *cd, double d);
@@@ -187,7 -197,7 +197,7 @@@ static void        handle_strange(void)
  static void   handle_summary(void);
  static void   output_lines(line_t *lp, FILE *f);
  static void   output_stats(void);
- static void   output_strange(void);
+ static void   output_X_summary(X_summary_t *first);
  static void   output_summary(void);
  static void   output_tapeinfo(void);
  static void   sort_disks(void);
@@@ -237,7 -247,7 +247,7 @@@ TextRule
      leng = (int)strlen(s);
      if(leng >= (RuleSpaceSize - cd->PrefixSpace))
        leng = RuleSpaceSize - cd->PrefixSpace - 1;
-     snprintf(RuleSpace, (size_t)RuleSpaceSize, "%*s%*.*s ", cd->PrefixSpace, "", 
+     g_snprintf(RuleSpace, (size_t)RuleSpaceSize, "%*s%*.*s ", cd->PrefixSpace, "", 
             leng, leng, s);
      txtlength = cd->PrefixSpace + leng + 1;
      nbrules = ColWidth(From,To) - txtlength;
@@@ -256,10 -266,10 +266,10 @@@ sDivZero
      ColumnInfo *cd= &ColumnData[cn];
      static char PrtBuf[256];
      if (!isnormal(b))
-       snprintf(PrtBuf, SIZEOF(PrtBuf),
+       g_snprintf(PrtBuf, SIZEOF(PrtBuf),
          "%*s", cd->Width, "-- ");
      else
-       snprintf(PrtBuf, SIZEOF(PrtBuf),
+       g_snprintf(PrtBuf, SIZEOF(PrtBuf),
          cd->Format, cd->Width, cd->Precision, a/b);
      return PrtBuf;
  }
@@@ -272,10 -282,10 +282,10 @@@ contline_next(void
      if ((ch = getc(logfile)) != EOF) {
            if (ungetc(ch, logfile) == EOF) {
                if (ferror(logfile)) {
-                   error("ungetc failed: %s\n", strerror(errno));
+                   error(_("ungetc failed: %s\n"), strerror(errno));
                    /*NOTREACHED*/
                }
-               error("ungetc failed: EOF\n");
+               error(_("ungetc failed: EOF\n"));
                /*NOTREACHED*/
            }
      }
@@@ -308,7 -318,7 +318,7 @@@ addline
  static void
  usage(void)
  {
-     error("Usage: amreport conf [-i] [-M address] [-f output-file] [-l logfile] [-p postscript-file] [-o configoption]*");
+     error(_("Usage: amreport conf [-i] [-M address] [-f output-file] [-l logfile] [-p postscript-file] [-o configoption]*"));
      /*NOTREACHED*/
  }
  
@@@ -317,26 -327,32 +327,32 @@@ main
      int               argc,
      char **   argv)
  {
-     char *conffile;
      char *conf_diskfile;
      char *conf_tapelist;
      char *conf_infofile;
      char *logfname, *psfname, *outfname, *subj_str = NULL;
      tapetype_t *tp;
      int opt;
-     unsigned long malloc_hist_1, malloc_size_1;
-     unsigned long malloc_hist_2, malloc_size_2;
      char *mail_cmd = NULL, *printer_cmd = NULL;
      extern int optind;
-     char my_cwd[STR_SIZE];
+     char * cwd = NULL;
      char *ColumnSpec = "";
      char *errstr = NULL;
      int cn;
      int mailout = 1;
      char *mailto = NULL;
-     int    new_argc,   my_argc;
-     char **new_argv, **my_argv;
      char *lbl_templ = NULL;
+     config_overwrites_t *cfg_ovr = NULL;
+     char *cfg_opt = NULL;
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */  
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda"); 
  
      safe_fd(-1, 0);
  
      /* Don't die when child closes pipe */
      signal(SIGPIPE, SIG_IGN);
  
 +    malloc_size_1 = malloc_inuse(&malloc_hist_1);
 +
      /* Process options */
      
      erroutput_type = ERR_INTERACTIVE;
      outfname = NULL;
      psfname = NULL;
      logfname = NULL;
+     cmdlogfname = 0;
  
-     if (getcwd(my_cwd, SIZEOF(my_cwd)) == NULL) {
-       error("cannot determine current working directory");
+     cwd = g_get_current_dir();
+     if (cwd == NULL) {
+       error(_("Cannot determine current working directory: %s"),
+             strerror(errno));
        /*NOTREACHED*/
      }
  
-     parse_conf(argc, argv, &new_argc, &new_argv);
-     my_argc = new_argc;
-     my_argv = new_argv;
-     if (my_argc < 2) {
-       config_dir = stralloc2(my_cwd, "/");
-       if ((config_name = strrchr(my_cwd, '/')) != NULL) {
-           config_name = stralloc(config_name + 1);
-       }
-     } else {
-       if (my_argv[1][0] == '-') {
+     if (argc >= 2) {
+       if (argv[1][0] == '-') {
            usage();
            return 1;
        }
-       config_name = stralloc(my_argv[1]);
-       config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
-       --my_argc; ++my_argv;
-       while((opt = getopt(my_argc, my_argv, "M:f:l:p:i")) != EOF) {
+       /* get the config name and move past it */
+       cfg_opt = argv[1];
+       --argc; ++argv;
+       cfg_ovr = new_config_overwrites(argc/2);
+       while((opt = getopt(argc, argv, "o:M:f:l:p:i")) != EOF) {
            switch(opt) {
            case 'i': 
                mailout = 0;
                break;
              case 'M':
                if (mailto != NULL) {
-                   error("you may specify at most one -M");
+                   error(_("you may specify at most one -M"));
                    /*NOTREACHED*/
                }
                  mailto = stralloc(optarg);
                if(!validate_mailto(mailto)) {
-                   error("mail address has invalid characters");
+                   error(_("mail address has invalid characters"));
                    /*NOTREACHED*/
                }
                  break;
              case 'f':
                if (outfname != NULL) {
-                   error("you may specify at most one -f");
+                   error(_("you may specify at most one -f"));
                    /*NOTREACHED*/
                }
                if (*optarg == '/') {
                      outfname = stralloc(optarg);
                } else {
-                     outfname = vstralloc(my_cwd, "/", optarg, NULL);
+                     outfname = vstralloc(cwd, "/", optarg, NULL);
                }
                  break;
              case 'l':
+               cmdlogfname = 1;
                if (logfname != NULL) {
-                   error("you may specify at most one -l");
+                   error(_("you may specify at most one -l"));
                    /*NOTREACHED*/
                }
                if (*optarg == '/') {
                    logfname = stralloc(optarg);
                } else {
-                     logfname = vstralloc(my_cwd, "/", optarg, NULL);
+                     logfname = vstralloc(cwd, "/", optarg, NULL);
                }
                  break;
              case 'p':
                if (psfname != NULL) {
-                   error("you may specify at most one -p");
+                   error(_("you may specify at most one -p"));
                    /*NOTREACHED*/
                }
                if (*optarg == '/') {
                      psfname = stralloc(optarg);
                } else {
-                     psfname = vstralloc(my_cwd, "/", optarg, NULL);
+                     psfname = vstralloc(cwd, "/", optarg, NULL);
                }
                  break;
+           case 'o':
+               add_config_overwrite_opt(cfg_ovr, optarg);
+               break;
              case '?':
                usage();
                return 1;
            }
        }
  
-       my_argc -= optind;
-       my_argv += optind;
+       argc -= optind;
+       argv += optind;
      }
      if( !mailout && mailto ){
-       printf("You cannot specify both -i & -M at the same time\n");
+       g_printf(_("You cannot specify both -i & -M at the same time\n"));
        exit(1);
      }
  
+     amfree(cwd);
  
  #if !defined MAILER
      if(!outfname) {
-       printf("You must run amreport with '-f <output file>' because configure\n");
-       printf("didn't find a mailer.\n");
+       g_printf(_("You must run amreport with '-f <output file>' because configure\n"));
+       g_printf(_("didn't find a mailer.\n"));
        exit (1);
      }
  #endif
  
-     safe_cd();
      /* read configuration files */
  
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     /* Ignore error from read_conffile */
-     read_conffile(conffile);
-     amfree(conffile);
+     /* ignore any errors reading the config file (amreport can run without a config) */
+     config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_USE_CWD, cfg_opt);
+     if (cfg_ovr) apply_config_overwrites(cfg_ovr);
+     check_running_as(RUNNING_AS_DUMPUSER);
  
      dbrename(config_name, DBG_SUBDIR_SERVER);
  
-     report_bad_conf_arg();
-     conf_diskfile = getconf_str(CNF_DISKFILE);
-     if (*conf_diskfile == '/') {
-       conf_diskfile = stralloc(conf_diskfile);
-     } else {
-       conf_diskfile = stralloc2(config_dir, conf_diskfile);
-     }
+     safe_cd(); /* must be called *after* config_init() */
+     conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
      /* Ignore error from read_diskfile */
      read_diskfile(conf_diskfile, &diskq);
      amfree(conf_diskfile);
                  }
      }
      
-     conf_tapelist = getconf_str(CNF_TAPELIST);
-     if (*conf_tapelist == '/') {
-       conf_tapelist = stralloc(conf_tapelist);
-     } else {
-       conf_tapelist = stralloc2(config_dir, conf_tapelist);
-     }
+     conf_tapelist = config_dir_relative(getconf_str(CNF_TAPELIST));
      /* Ignore error from read_tapelist */
      read_tapelist(conf_tapelist);
      amfree(conf_tapelist);
-     conf_infofile = getconf_str(CNF_INFOFILE);
-     if (*conf_infofile == '/') {
-       conf_infofile = stralloc(conf_infofile);
-     } else {
-       conf_infofile = stralloc2(config_dir, conf_infofile);
-     }
+     conf_infofile = config_dir_relative(getconf_str(CNF_INFOFILE));
      if(open_infofile(conf_infofile)) {
-       error("could not open info db \"%s\"", conf_infofile);
+       error(_("could not open info db \"%s\""), conf_infofile);
        /*NOTREACHED*/
      }
      amfree(conf_infofile);
      unitdivisor = getconf_unit_divisor();
  
      ColumnSpec = getconf_str(CNF_COLUMNSPEC);
-     if(SetColumDataFromString(ColumnData, ColumnSpec, &errstr) < 0) {
+     if(SetColumnDataFromString(ColumnData, ColumnSpec, &errstr) < 0) {
        curlog = L_ERROR;
        curprog = P_REPORTER;
        curstr = errstr;
          amfree(errstr);
        curstr = NULL;
        ColumnSpec = "";                /* use the default */
-       if(SetColumDataFromString(ColumnData, ColumnSpec, &errstr) < 0) {
+       if(SetColumnDataFromString(ColumnData, ColumnSpec, &errstr) < 0) {
            curlog = L_ERROR;
            curprog = P_REPORTER;
            curstr = errstr;
      if(!logfname) {
        char *conf_logdir;
  
-       conf_logdir = getconf_str(CNF_LOGDIR);
-       if (*conf_logdir == '/') {
-           conf_logdir = stralloc(conf_logdir);
-       } else {
-           conf_logdir = stralloc2(config_dir, conf_logdir);
-       }
+       conf_logdir = config_dir_relative(getconf_str(CNF_LOGDIR));
        logfname = vstralloc(conf_logdir, "/", "log", NULL);
        amfree(conf_logdir);
      }
      if((logfile = fopen(logfname, "r")) == NULL) {
        curlog = L_ERROR;
        curprog = P_REPORTER;
-       curstr = vstralloc("could not open log ",
+       curstr = vstralloc(_("could not open log "),
                           logfname,
                           ": ",
                           strerror(errno),
  
      while(logfile && get_logline(logfile)) {
        switch(curlog) {
-       case L_START:   handle_start(); break;
-       case L_FINISH:  handle_finish(); break;
+       case L_START:        handle_start(); break;
+       case L_FINISH:       handle_finish(); break;
  
-       case L_INFO:    handle_note(); break;
-       case L_WARNING: handle_note(); break;
+       case L_INFO:         handle_note(); break;
+       case L_WARNING:      handle_note(); break;
  
-       case L_SUMMARY: handle_summary(); break;
-       case L_STATS:   handle_stats(); break;
+       case L_SUMMARY:      handle_summary(); break;
+       case L_STATS:        handle_stats(); break;
  
-       case L_ERROR:   handle_error(); break;
-       case L_FATAL:   handle_error(); break;
+       case L_ERROR:        handle_error(); break;
+       case L_FATAL:        handle_error(); break;
  
-       case L_DISK:    handle_disk(); break;
+       case L_DISK:         handle_disk(); break;
  
-       case L_SUCCESS: handle_success(curlog); break;
+       case L_DONE:         handle_success(curlog); break;
+       case L_SUCCESS:      handle_success(curlog); break;
        case L_CHUNKSUCCESS: handle_success(curlog); break;
-       case L_CHUNK:   handle_chunk(); break;
-       case L_PARTIAL: handle_partial(); break;
-       case L_STRANGE: handle_strange(); break;
-       case L_FAIL:    handle_failed(); break;
+       case L_PART:         handle_chunk(curlog); break;
+       case L_PARTPARTIAL:  handle_chunk(curlog); break;
+       case L_CHUNK:        handle_chunk(curlog); break;
+       case L_PARTIAL:      handle_partial(); break;
+       case L_STRANGE:      handle_strange(); break;
+       case L_FAIL:         handle_failed(); break;
  
        default:
            curlog = L_ERROR;
            curprog = P_REPORTER;
-           curstr = stralloc2("unexpected log line: ", curstr);
+           curstr = vstrallocf(_("unexpected log line: %s"), curstr);
            handle_error();
            amfree(curstr);
        }
      if(outfname) {
        /* output to a file */
        if((mailf = fopen(outfname,"w")) == NULL) {
-           error("could not open output file: %s %s", outfname, strerror(errno));
+           error(_("could not open output file: %s %s"), outfname, strerror(errno));
            /*NOTREACHED*/
        }
-       fprintf(mailf, "To: %s\n", mailto);
-       fprintf(mailf, "Subject: %s\n\n", subj_str);
+         if (mailto != NULL) {
+               g_fprintf(mailf, "To: %s\n", mailto);
+               g_fprintf(mailf, "Subject: %s\n\n", subj_str);
+       }
  
      } else {
  #ifdef MAILER
                             " -s", " \"", subj_str, "\"",
                             " ", mailto, NULL);
                if((mailf = popen(mail_cmd, "w")) == NULL) {
-               error("could not open pipe to \"%s\": %s",
+               error(_("could not open pipe to \"%s\": %s"),
                        mail_cmd, strerror(errno));
                /*NOTREACHED*/
                }
        }
        else {
                if(mailout) {
-                    printf("No mail sent! ");
-                  printf("No valid mail address has been specified in amanda.conf or on the commmand line\n");
+                    g_printf(_("No mail sent! "));
+                  g_printf(_("No valid mail address has been specified in amanda.conf or on the commmand line\n"));
                }
                mailf = NULL;
        }
            if ((postscript = fopen(psfname, "w")) == NULL) {
                curlog = L_ERROR;
                curprog = P_REPORTER;
-               curstr = vstralloc("could not open ",
+               curstr = vstrallocf(_("could not open %s: %s"),
                                   psfname,
-                                  ": ",
-                                  strerror(errno),
-                                  NULL);
+                                  strerror(errno));
                handle_error();
                amfree(curstr);
            }
            if ((postscript = popen(printer_cmd, "w")) == NULL) {
                curlog = L_ERROR;
                curprog = P_REPORTER;
-               curstr = vstralloc("could not open pipe to ",
-                                  printer_cmd,
-                                  ": ",
-                                  strerror(errno),
-                                  NULL);
+               curstr = vstrallocf(_("could not open pipe to %s: %s"),
+                                  printer_cmd, strerror(errno));
                handle_error();
                amfree(curstr);
            }
  #else
            curlog = L_ERROR;
            curprog = P_REPORTER;
-           curstr = stralloc("no printer command defined");
+           curstr = vstrallocf(_("no printer command defined"));
            handle_error();
            amfree(curstr);
  #endif
  
      amfree(subj_str);
  
+     sort_disks();
      if(mailf) {
  
-       if(!got_finish) fputs("*** THE DUMPS DID NOT FINISH PROPERLY!\n\n", mailf);
+       if(!got_finish) fputs(_("*** THE DUMPS DID NOT FINISH PROPERLY!\n\n"), mailf);
  
        if (ghostname) {
-           fprintf(mailf, "Hostname: %s\n", ghostname);
-           fprintf(mailf, "Org     : %s\n", getconf_str(CNF_ORG));
-           fprintf(mailf, "Config  : %s\n", config_name);
-           fprintf(mailf, "Date    : %s\n",
+           g_fprintf(mailf, _("Hostname: %s\n"), ghostname);
+           g_fprintf(mailf, _("Org     : %s\n"), getconf_str(CNF_ORG));
+           g_fprintf(mailf, _("Config  : %s\n"), config_name);
+           g_fprintf(mailf, _("Date    : %s\n"),
                    nicedate(run_datestamp ? run_datestamp : "0"));
-           fprintf(mailf,"\n");
+           g_fprintf(mailf,"\n");
        }
  
        output_tapeinfo();
  
-       if(first_strange || errsum) {
-               fprintf(mailf,"\nFAILURE AND STRANGE DUMP SUMMARY:\n");
-               if(first_strange) output_strange();
+       if(first_failed || errsum) {
+               g_fprintf(mailf,_("\nFAILURE DUMP SUMMARY:\n"));
+               if(first_failed) output_X_summary(first_failed);
                if(errsum) output_lines(errsum, mailf);
        }
+       if(first_strange) {
+               g_fprintf(mailf,_("\nSTRANGE DUMP SUMMARY:\n"));
+               if(first_strange) output_X_summary(first_strange);
+       }
        fputs("\n\n", mailf);
        
        output_stats();
        
        if(errdet) {
-               fprintf(mailf,"\n\014\nFAILED AND STRANGE DUMP DETAILS:\n");
+               g_fprintf(mailf,"\n\f\n");
+               g_fprintf(mailf,_("FAILED DUMP DETAILS:\n"));
                output_lines(errdet, mailf);
        }
+       if(strangedet) {
+               g_fprintf(mailf,"\n\f\n");
+               g_fprintf(mailf,_("STRANGE DUMP DETAILS:\n"));
+               output_lines(strangedet, mailf);
+       }
        if(notes) {
-               fprintf(mailf,"\n\014\nNOTES:\n");
+               g_fprintf(mailf,"\n\f\n");
+               g_fprintf(mailf,_("NOTES:\n"));
                output_lines(notes, mailf);
        }
-       sort_disks();
        if(sortq.head != NULL) {
-               fprintf(mailf,"\n\014\nDUMP SUMMARY:\n");
+               g_fprintf(mailf,"\n\f\n");
+               g_fprintf(mailf,_("DUMP SUMMARY:\n"));
                output_summary();
        }
-       fprintf(mailf,"\n(brought to you by Amanda version %s)\n",
+       g_fprintf(mailf,_("\n(brought to you by Amanda version %s)\n"),
                version());
      }
  
      }
      else {
        if (postscript != NULL && pclose(postscript) != 0) {
-           error("printer command failed: %s", printer_cmd);
+           error(_("printer command failed: %s"), printer_cmd);
            /*NOTREACHED*/
        }
        postscript = NULL;
          afclose(mailf);
      }
      else if(mailf) {
-         if(pclose(mailf) != 0) {
-             error("mail command failed: %s", mail_cmd);
+       int exitcode;
+         if((exitcode = pclose(mailf)) != 0) {
+           char *exitstr = str_exit_status("mail command", exitcode);
+             error(exitstr);
            /*NOTREACHED*/
        }
          mailf = NULL;
  
      clear_tapelist();
      free_disklist(&diskq);
-     free_new_argv(new_argc, new_argv);
-     free_server_config();
      amfree(run_datestamp);
      amfree(tape_labels);
-     amfree(config_dir);
-     amfree(config_name);
      amfree(printer_cmd);
      amfree(mail_cmd);
      amfree(logfname);
  
-     malloc_size_2 = malloc_inuse(&malloc_hist_2);
-     if(malloc_size_1 != malloc_size_2) {
-       malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-     }
      dbclose();
      return exit_status;
  }
      do {                                          \
        double q = (b);                     \
        if (!isnormal(q))                   \
-           fprintf((fp),"  -- ");          \
+           g_fprintf((fp),"  -- ");        \
        else if ((q = (a)/q) >= 999.95)     \
-           fprintf((fp), "###.#");         \
+           g_fprintf((fp), "###.#");       \
        else                                \
-           fprintf((fp), "%5.1lf",q);      \
+           g_fprintf((fp), "%5.1lf",q);            \
      } while(0)
  #define divzero_wide(fp,a,b)              \
      do {                                          \
        double q = (b);                     \
        if (!isnormal(q))                   \
-           fprintf((fp),"    -- ");        \
+           g_fprintf((fp),"    -- ");      \
        else if ((q = (a)/q) >= 99999.95)   \
-           fprintf((fp), "#####.#");       \
+           g_fprintf((fp), "#####.#");     \
        else                                \
-           fprintf((fp), "%7.1lf",q);      \
+           g_fprintf((fp), "%7.1lf",q);            \
      } while(0)
  
  static void
@@@ -856,142 -857,142 +859,142 @@@ output_stats(void
      idle_time = (total_time - startup_time) - stats[2].taper_time;
      if(idle_time < 0) idle_time = 0.0;
  
-     fprintf(mailf,"STATISTICS:\n");
-     fprintf(mailf,
-           "                          Total       Full      Incr.\n");
-     fprintf(mailf,
-           "                        --------   --------   --------\n");
+     g_fprintf(mailf,_("STATISTICS:\n"));
+     g_fprintf(mailf,
+           _("                          Total       Full      Incr.\n"));
+     g_fprintf(mailf,
+           _("                        --------   --------   --------\n"));
  
-     fprintf(mailf,
-           "Estimate Time (hrs:min)   %2d:%02d\n", hrmn(planner_time));
+     g_fprintf(mailf,
+           _("Estimate Time (hrs:min)   %2d:%02d\n"), hrmn(planner_time));
  
-     fprintf(mailf,
-           "Run Time (hrs:min)        %2d:%02d\n", hrmn(total_time));
+     g_fprintf(mailf,
+           _("Run Time (hrs:min)        %2d:%02d\n"), hrmn(total_time));
  
-     fprintf(mailf,
-           "Dump Time (hrs:min)       %2d:%02d      %2d:%02d      %2d:%02d\n",
+     g_fprintf(mailf,
+           _("Dump Time (hrs:min)       %2d:%02d      %2d:%02d      %2d:%02d\n"),
            hrmn(stats[2].dumper_time), hrmn(stats[0].dumper_time),
            hrmn(stats[1].dumper_time));
  
-     fprintf(mailf,
-           "Output Size (meg)      %8.1lf   %8.1lf   %8.1lf\n",
+     g_fprintf(mailf,
+           _("Output Size (meg)      %8.1lf   %8.1lf   %8.1lf\n"),
            mb(stats[2].outsize), mb(stats[0].outsize), mb(stats[1].outsize));
  
-     fprintf(mailf,
-           "Original Size (meg)    %8.1lf   %8.1lf   %8.1lf\n",
+     g_fprintf(mailf,
+           _("Original Size (meg)    %8.1lf   %8.1lf   %8.1lf\n"),
            mb(stats[2].origsize), mb(stats[0].origsize),
            mb(stats[1].origsize));
  
-     fprintf(mailf, "Avg Compressed Size (%%)   ");
+     g_fprintf(mailf, _("Avg Compressed Size (%%)   "));
      divzero(mailf, pct(stats[2].coutsize),stats[2].corigsize);
-     fputs("      ", mailf);
+     fputs(_("      "), mailf);
      divzero(mailf, pct(stats[0].coutsize),stats[0].corigsize);
-     fputs("      ", mailf);
+     fputs(_("      "), mailf);
      divzero(mailf, pct(stats[1].coutsize),stats[1].corigsize);
  
-     if(stats[1].dumpdisks > 0) fputs("   (level:#disks ...)", mailf);
+     if(stats[1].dumpdisks > 0) fputs(_("   (level:#disks ...)"), mailf);
      putc('\n', mailf);
  
-     fprintf(mailf,
-           "Filesystems Dumped         %4d       %4d       %4d",
+     g_fprintf(mailf,
+           _("Filesystems Dumped         %4d       %4d       %4d"),
            stats[2].dumpdisks, stats[0].dumpdisks, stats[1].dumpdisks);
  
      if(stats[1].dumpdisks > 0) {
        first = 1;
        for(lv = 1; lv < 10; lv++) if(dumpdisks[lv]) {
-           fputs(first?"   (":" ", mailf);
+           fputs(first?_("   ("):_(" "), mailf);
            first = 0;
-           fprintf(mailf, "%d:%d", lv, dumpdisks[lv]);
+           g_fprintf(mailf, _("%d:%d"), lv, dumpdisks[lv]);
        }
        putc(')', mailf);
      }
      putc('\n', mailf);
  
-     fprintf(mailf, "Avg Dump Rate (k/s)     ");
+     g_fprintf(mailf, _("Avg Dump Rate (k/s)     "));
      divzero_wide(mailf, stats[2].outsize,stats[2].dumper_time);
-     fputs("    ", mailf);
+     fputs(_("    "), mailf);
      divzero_wide(mailf, stats[0].outsize,stats[0].dumper_time);
-     fputs("    ", mailf);
+     fputs(_("    "), mailf);
      divzero_wide(mailf, stats[1].outsize,stats[1].dumper_time);
      putc('\n', mailf);
  
      putc('\n', mailf);
-     fprintf(mailf,
-           "Tape Time (hrs:min)       %2d:%02d      %2d:%02d      %2d:%02d\n",
+     g_fprintf(mailf,
+           _("Tape Time (hrs:min)       %2d:%02d      %2d:%02d      %2d:%02d\n"),
            hrmn(stats[2].taper_time), hrmn(stats[0].taper_time),
            hrmn(stats[1].taper_time));
  
-     fprintf(mailf,
-           "Tape Size (meg)        %8.1lf   %8.1lf   %8.1lf\n",
+     g_fprintf(mailf,
+           _("Tape Size (meg)        %8.1lf   %8.1lf   %8.1lf\n"),
            mb(stats[2].tapesize), mb(stats[0].tapesize),
            mb(stats[1].tapesize));
  
-     fprintf(mailf, "Tape Used (%%)             ");
+     g_fprintf(mailf, _("Tape Used (%%)             "));
      divzero(mailf, pct(stats[2].tapesize+marksize*(stats[2].tapedisks+stats[2].tapechunks)),(double)tapesize);
-     fputs("      ", mailf);
+     fputs(_("      "), mailf);
      divzero(mailf, pct(stats[0].tapesize+marksize*(stats[0].tapedisks+stats[0].tapechunks)),(double)tapesize);
-     fputs("      ", mailf);
+     fputs(_("      "), mailf);
      divzero(mailf, pct(stats[1].tapesize+marksize*(stats[1].tapedisks+stats[1].tapechunks)),(double)tapesize);
  
-     if(stats[1].tapedisks > 0) fputs("   (level:#disks ...)", mailf);
+     if(stats[1].tapedisks > 0) fputs(_("   (level:#disks ...)"), mailf);
      putc('\n', mailf);
  
-     fprintf(mailf,
-           "Filesystems Taped          %4d       %4d       %4d",
+     g_fprintf(mailf,
+           _("Filesystems Taped          %4d       %4d       %4d"),
            stats[2].tapedisks, stats[0].tapedisks, stats[1].tapedisks);
  
      if(stats[1].tapedisks > 0) {
        first = 1;
        for(lv = 1; lv < 10; lv++) if(tapedisks[lv]) {
-           fputs(first?"   (":" ", mailf);
+           fputs(first?_("   ("):_(" "), mailf);
            first = 0;
-           fprintf(mailf, "%d:%d", lv, tapedisks[lv]);
+           g_fprintf(mailf, _("%d:%d"), lv, tapedisks[lv]);
        }
        putc(')', mailf);
      }
      putc('\n', mailf);
  
-     if(stats[1].tapechunks > 0) fputs("   (level:#chunks ...)", mailf);
+     if(stats[1].tapechunks > 0) fputs(_("   (level:#chunks ...)"), mailf);
      putc('\n', mailf);
  
-     fprintf(mailf,
-           "Chunks Taped               %4d       %4d       %4d",
+     g_fprintf(mailf,
+           _("Chunks Taped               %4d       %4d       %4d"),
            stats[2].tapechunks, stats[0].tapechunks, stats[1].tapechunks);
  
      if(stats[1].tapechunks > 0) {
        first = 1;
        for(lv = 1; lv < 10; lv++) if(tapechunks[lv]) {
-           fputs(first?"   (":" ", mailf);
+           fputs(first?_("   ("):_(" "), mailf);
            first = 0;
-           fprintf(mailf, "%d:%d", lv, tapechunks[lv]);
+           g_fprintf(mailf, _("%d:%d"), lv, tapechunks[lv]);
        }
        putc(')', mailf);
      }
      putc('\n', mailf);
  
-     fprintf(mailf, "Avg Tp Write Rate (k/s) ");
+     g_fprintf(mailf, _("Avg Tp Write Rate (k/s) "));
      divzero_wide(mailf, stats[2].tapesize,stats[2].taper_time);
-     fputs("    ", mailf);
+     fputs(_("    "), mailf);
      divzero_wide(mailf, stats[0].tapesize,stats[0].taper_time);
-     fputs("    ", mailf);
+     fputs(_("    "), mailf);
      divzero_wide(mailf, stats[1].tapesize,stats[1].taper_time);
      putc('\n', mailf);
  
      if(stats_by_tape) {
        int label_length = (int)strlen(stats_by_tape->label) + 5;
-       fprintf(mailf,"\nUSAGE BY TAPE:\n");
-       fprintf(mailf,"  %-*s  Time      Size      %%    Nb    Nc\n",
-               label_length, "Label");
+       g_fprintf(mailf,_("\nUSAGE BY TAPE:\n"));
+       g_fprintf(mailf,_("  %-*s  Time      Size      %%    Nb    Nc\n"),
+               label_length, _("Label"));
        for(current_tape = stats_by_tape; current_tape != NULL;
            current_tape = current_tape->next) {
-           fprintf(mailf, "  %-*s", label_length, current_tape->label);
-           fprintf(mailf, " %2d:%02d", hrmn(current_tape->taper_time));
-           fprintf(mailf, " %8.0lf%s  ", du(current_tape->coutsize), displayunit);
+           g_fprintf(mailf, _("  %-*s"), label_length, current_tape->label);
+           g_fprintf(mailf, _(" %2d:%02d"), hrmn(current_tape->taper_time));
+           g_fprintf(mailf, _(" %8.0lf%s  "), du(current_tape->coutsize), displayunit);
            divzero(mailf, pct(current_tape->coutsize + marksize *
                   (current_tape->tapedisks+current_tape->tapechunks)),
                   (double)tapesize);
-           fprintf(mailf, "  %4d", current_tape->tapedisks);
-           fprintf(mailf, "  %4d\n", current_tape->tapechunks);
+           g_fprintf(mailf, _("  %4d"), current_tape->tapedisks);
+           g_fprintf(mailf, _("  %4d\n"), current_tape->tapechunks);
        }
      }
  }
  static void
  output_tapeinfo(void)
  {
-     tape_t *tp, *lasttp;
+     tape_t *tp;
      int run_tapes;
      int skip = 0;
+     int i, nb_new_tape;
  
      if (last_run_tapes > 0) {
        if(amflush_run)
-           fprintf(mailf, "The dumps were flushed to tape%s %s.\n",
-                   last_run_tapes == 1 ? "" : "s",
+           g_fprintf(mailf,
+                   plural(_("The dumps were flushed to tape %s.\n"),
+                          _("The dumps were flushed to tapes %s.\n"),
+                          last_run_tapes),
                    tape_labels ? tape_labels : "");
        else
-           fprintf(mailf, "These dumps were to tape%s %s.\n",
-                   last_run_tapes == 1 ? "" : "s",
+           g_fprintf(mailf,
+                   plural(_("These dumps were to tape %s.\n"),
+                          _("These dumps were to tapes %s.\n"),
+                          last_run_tapes),
                    tape_labels ? tape_labels : "");
      }
  
      if(degraded_mode) {
-       fprintf(mailf,
-               "*** A TAPE ERROR OCCURRED: %s.\n", tapestart_error);
-       fputs("Some dumps may have been left in the holding disk.\n", mailf);
-       fprintf(mailf,
-               "Run amflush%s to flush them to tape.\n",
-               amflush_run ? " again" : "");
+       g_fprintf(mailf,
+               _("*** A TAPE ERROR OCCURRED: %s.\n"), tapestart_error);
+     }
+     if (cmdlogfname == 1) {
+       if(degraded_mode) {
+           fputs(_("Some dumps may have been left in the holding disk.\n"),
+                 mailf);
+           g_fprintf(mailf,"\n");
+       }
+     }  else {
+       GSList *holding_list, *holding_file;
+       off_t  h_size = 0, mh_size;
+       holding_list = holding_get_files_for_flush(NULL);
+       for(holding_file=holding_list; holding_file != NULL;
+                                      holding_file = holding_file->next) {
+           mh_size = holding_file_size((char *)holding_file->data, 1);
+           if (mh_size > 0)
+               h_size += mh_size;
+       }
+       if (h_size > 0) {
+           g_fprintf(mailf,
+                   _("There are %lld%s of dumps left in the holding disk.\n"),
+                   (long long)h_size, displayunit);
+           if (getconf_boolean(CNF_AUTOFLUSH)) {
+               g_fprintf(mailf, _("They will be flushed on the next run.\n"));
+           } else {
+               g_fprintf(mailf, _("Run amflush to flush them to tape.\n"));
+           }
+           g_fprintf(mailf,"\n");
+       } else if (degraded_mode) {
+           g_fprintf(mailf, _("No dumps are left in the holding disk. %lld%s\n"), (long long)h_size, displayunit);
+           g_fprintf(mailf,"\n");
+       }
      }
  
      tp = lookup_last_reusable_tape(skip);
      run_tapes = getconf_int(CNF_RUNTAPES);
  
      if (run_tapes == 1)
-       fputs("The next tape Amanda expects to use is: ", mailf);
+       fputs(_("The next tape Amanda expects to use is: "), mailf);
      else if(run_tapes > 1)
-       fprintf(mailf, "The next %d tapes Amanda expects to use are: ",
+       g_fprintf(mailf, _("The next %d tapes Amanda expects to use are: "),
                run_tapes);
-     
-     while(run_tapes > 0) {
+     nb_new_tape = 0;
+     for (i=0 ; i < run_tapes ; i++) {
        if(tp != NULL) {
-           fprintf(mailf, "%s", tp->label);
+           if (nb_new_tape > 0) {
+               if (nb_new_tape == 1)
+                   g_fprintf(mailf, _("1 new tape, "));
+               else
+                   g_fprintf(mailf, _("%d new tapes, "), nb_new_tape);
+               nb_new_tape = 0;
+           }
+           g_fprintf(mailf, "%s", tp->label);
+           if (i < run_tapes-1) fputs(", ", mailf);
        } else {
-           if (run_tapes == 1)
-               fprintf(mailf, "a new tape");
-           else
-               fprintf(mailf, "%d new tapes", run_tapes);
-           run_tapes = 1;
+           nb_new_tape++;
        }
-       if(run_tapes > 1) fputs(", ", mailf);
-       run_tapes -= 1;
        skip++;
        tp = lookup_last_reusable_tape(skip);
      }
+     if (nb_new_tape > 0) {
+       if (nb_new_tape == 1)
+           g_fprintf(mailf, _("1 new tape"));
+       else
+           g_fprintf(mailf, _("%d new tapes"), nb_new_tape);
+     }
      fputs(".\n", mailf);
  
-     lasttp = lookup_tapepos(lookup_nb_tape());
      run_tapes = getconf_int(CNF_RUNTAPES);
-     if(lasttp && run_tapes > 0 && strcmp(lasttp->datestamp,"0") == 0) {
-       int c = 0;
-       while(lasttp && run_tapes > 0 && strcmp(lasttp->datestamp,"0") == 0) {
-           c++;
-           lasttp = lasttp->prev;
-           run_tapes--;
-       }
-       lasttp = lookup_tapepos(lookup_nb_tape());
-       if(c == 1) {
-           fprintf(mailf, "The next new tape already labelled is: %s.\n",
-                   lasttp->label);
-       }
-       else {
-           fprintf(mailf, "The next %d new tapes already labelled are: %s", c,
-                   lasttp->label);
-           lasttp = lasttp->prev;
-           c--;
-           while(lasttp && c > 0 && strcmp(lasttp->datestamp,"0") == 0) {
-               fprintf(mailf, ", %s", lasttp->label);
-               lasttp = lasttp->prev;
-               c--;
-           }
-           fprintf(mailf, ".\n");
-       }
-     }
+     print_new_tapes(mailf, run_tapes);
  }
  
  /* ----- */
  static void
- output_strange(void)
+ output_X_summary(
+     X_summary_t *first)
  {
      size_t len_host=0, len_disk=0;
-     strange_t *strange;
+     X_summary_t *strange;
      char *str = NULL;
  
-     for(strange=first_strange; strange != NULL; strange = strange->next) {
+     for(strange=first; strange != NULL; strange = strange->next) {
        if(strlen(strange->hostname) > len_host)
            len_host = strlen(strange->hostname);
        if(strlen(strange->diskname) > len_disk)
            len_disk = strlen(strange->diskname);
      }
-     for(strange=first_strange; strange != NULL; strange = strange->next) {
+     for(strange=first; strange != NULL; strange = strange->next) {
        str = vstralloc("  ", prefixstrange(strange->hostname, strange->diskname, strange->level, len_host, len_disk),
                        "  ", strange->str, NULL);
-       fprintf(mailf, "%s\n", str);
+       g_fprintf(mailf, "%s\n", str);
        amfree(str);
      }
  }
@@@ -1173,7 -1192,7 +1194,7 @@@ CheckIntMax
        char testBuf[200];
        int l;
  
-       snprintf(testBuf, SIZEOF(testBuf),
+       g_snprintf(testBuf, SIZEOF(testBuf),
          cd->Format, cd->Width, cd->Precision, n);
        l = (int)strlen(testBuf);
        if (cd->Width < l)
@@@ -1189,7 -1208,8 +1210,8 @@@ CheckFloatMax
      if (cd->MaxWidth) {
        char testBuf[200];
        int l;
-       snprintf(testBuf, SIZEOF(testBuf),
+       g_snprintf(testBuf, SIZEOF(testBuf),
          cd->Format, cd->Width, cd->Precision, d);
        l = (int)strlen(testBuf);
        if (cd->Width < l)
@@@ -1221,6 -1241,15 +1243,15 @@@ CalcMaxWidth(void
      double f;
      repdata_t *repdata;
      char *qdevname;
+     int i, l;
+     for (i=0;ColumnData[i].Name != NULL; i++) {
+       if (ColumnData[i].MaxWidth) {
+           l = (int)strlen(ColumnData[i].Title);
+           if (ColumnData[i].Width < l)
+               ColumnData[i].Width= l;
+       }
+     }
  
      for(dp = sortq.head; dp != NULL; dp = dp->next) {
        if(dp->todo) {
                              (double)du(repdata->dumper.origsize));
                CheckFloatMax(&ColumnData[OutKB],
                              (double)du(repdata->dumper.outsize));
-               if(dp->compress == COMP_NONE)
+               if(abs(repdata->dumper.outsize - repdata->dumper.origsize)< 32)
                    f = 0.0;
                else 
                    f = repdata->dumper.origsize;
-               CheckStringMax(&ColumnData[Disk], 
+               CheckStringMax(&ColumnData[Compress], 
                        sDivZero(pct(repdata->dumper.outsize), f, Compress));
  
                if(!amflush_run)
-                   snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
+                   g_snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
                                "%3d:%02d", mnsc(repdata->dumper.sec));
                else
-                   snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
+                   g_snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
                                "N/A ");
                CheckStringMax(&ColumnData[DumpTime], TimeRateBuffer);
  
            }
            if(repdata->taper.result == L_SUCCESS ||
               repdata->taper.result == L_CHUNKSUCCESS)
-               snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer), 
+               g_snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer), 
                  "%3d:%02d", mnsc(repdata->taper.sec));
            else
-               snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
+               g_snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
                  "N/A ");
            CheckStringMax(&ColumnData[TapeTime], TimeRateBuffer);
  
@@@ -1322,23 -1351,23 +1353,23 @@@ output_summary(void
      } else {
        h = (wDump-h)/2;
      }
-     fprintf(mailf, "%*s", w1+h, "");
-     fprintf(mailf, "%-*s", wDump-h, ds);
+     g_fprintf(mailf, "%*s", w1+h, "");
+     g_fprintf(mailf, "%-*s", wDump-h, ds);
      h = (int)strlen(ts);
      if (h > wTape) {
        h = 0;
      } else {
        h = (wTape-h)/2;
      }
-     fprintf(mailf, "%*s", h, "");
-     fprintf(mailf, "%-*s", wTape-h, ts);
+     g_fprintf(mailf, "%*s", h, "");
+     g_fprintf(mailf, "%-*s", wTape-h, ts);
      fputc('\n', mailf);
  
      /* print the titles */
      for (i=0; ColumnData[i].Name != NULL; i++) {
        char *fmt;
        ColumnInfo *cd= &ColumnData[i];
-       fprintf(mailf, "%*s", cd->PrefixSpace, "");
+       g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
        if (cd->Format[1] == '-')
            fmt= "%-*s";
        else
            cd->Title = stralloc("OUT-KB");
            cd->Title[4] = displayunit[0];
        }
-       fprintf(mailf, fmt, cd->Width, cd->Title);
+       g_fprintf(mailf, fmt, cd->Width, cd->Title);
      }
      fputc('\n', mailf);
  
            size_t devlen;
  
            cd= &ColumnData[HostName];
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
-           fprintf(mailf, cd->Format, cd->Width, cd->Width, dp->host->hostname);
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, cd->Format, cd->Width, cd->Width, dp->host->hostname);
  
            cd= &ColumnData[Disk];
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
            devname = sanitize_string(dp->name);
            qdevname = quote_string(devname);
            devlen = strlen(qdevname);
            if (devlen > (size_t)cd->Width) {
                fputc('-', mailf); 
-               fprintf(mailf, cd->Format, cd->Width-1, cd->Precision-1,
+               g_fprintf(mailf, cd->Format, cd->Width-1, cd->Precision-1,
                        qdevname+devlen - (cd->Width-1) );
            }
            else
-               fprintf(mailf, cd->Format, cd->Width, cd->Width, qdevname);
+               g_fprintf(mailf, cd->Format, cd->Width, cd->Width, qdevname);
            amfree(devname);
            amfree(qdevname);
            cd= &ColumnData[Level];
            if (repdata->dumper.result == L_BOGUS &&
                repdata->taper.result  == L_BOGUS) {
              if(amflush_run){
-               fprintf(mailf, "%*s%s\n", cd->PrefixSpace+cd->Width, "",
+               g_fprintf(mailf, "%*s%s\n", cd->PrefixSpace+cd->Width, "",
                        tmp=TextRule(OrigKB, TapeRate, "NO FILE TO FLUSH"));
              } else {
-               fprintf(mailf, "%*s%s\n", cd->PrefixSpace+cd->Width, "",
+               g_fprintf(mailf, "%*s%s\n", cd->PrefixSpace+cd->Width, "",
                        tmp=TextRule(OrigKB, TapeRate, "MISSING"));
              }
              amfree(tmp);
              continue;
            }
            
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
-           fprintf(mailf, cd->Format, cd->Width, cd->Precision,repdata->level);
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, cd->Format, cd->Width, cd->Precision,repdata->level);
  
            if (repdata->dumper.result == L_SKIPPED) {
-               fprintf(mailf, "%s\n",
+               g_fprintf(mailf, "%s\n",
                        tmp=TextRule(OrigKB, TapeRate, "SKIPPED"));
                amfree(tmp);
                continue;
            }
            if (repdata->dumper.result == L_FAIL && (repdata->chunker.result != L_PARTIAL && repdata->taper.result  != L_PARTIAL)) {
-               fprintf(mailf, "%s\n",
+               g_fprintf(mailf, "%s\n",
                        tmp=TextRule(OrigKB, TapeRate, "FAILED"));
                amfree(tmp);
                exit_status |= STATUS_FAILED;
                outsize  = repdata->dumper.outsize;
  
            cd= &ColumnData[OrigKB];
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
            if(isnormal(origsize))
-               fprintf(mailf, cd->Format, cd->Width, cd->Precision, du(origsize));
+               g_fprintf(mailf, cd->Format, cd->Width, cd->Precision, du(origsize));
            else
-               fprintf(mailf, "%*.*s", cd->Width, cd->Width, "N/A");
+               g_fprintf(mailf, "%*.*s", cd->Width, cd->Width, "N/A");
  
            cd= &ColumnData[OutKB];
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
  
-           fprintf(mailf, cd->Format, cd->Width, cd->Precision, du(outsize));
+           g_fprintf(mailf, cd->Format, cd->Width, cd->Precision, du(outsize));
                
            cd= &ColumnData[Compress];
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
  
-           if(dp->compress == COMP_NONE)
+           if(abs(outsize - origsize) < 32)
                f = 0.0;
            else if(origsize < 1.0)
                f = 0.0;
            fputs(sDivZero(pct(outsize), f, Compress), mailf);
  
            cd= &ColumnData[DumpTime];
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
            if(repdata->dumper.result == L_SUCCESS ||
               repdata->dumper.result == L_CHUNKSUCCESS)
-               snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
+               g_snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
                  "%3d:%02d", mnsc(repdata->dumper.sec));
            else
-               snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
+               g_snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
                  "N/A ");
-           fprintf(mailf, cd->Format, cd->Width, cd->Width, TimeRateBuffer);
+           g_fprintf(mailf, cd->Format, cd->Width, cd->Width, TimeRateBuffer);
  
            cd= &ColumnData[DumpRate];
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
            if(repdata->dumper.result == L_SUCCESS ||
                    repdata->dumper.result == L_CHUNKSUCCESS)
-               fprintf(mailf, cd->Format, cd->Width, cd->Precision, repdata->dumper.kps);
+               g_fprintf(mailf, cd->Format, cd->Width, cd->Precision, repdata->dumper.kps);
            else
-               fprintf(mailf, "%*s", cd->Width, "N/A ");
+               g_fprintf(mailf, "%*s", cd->Width, "N/A ");
  
            cd= &ColumnData[TapeTime];
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
            if(repdata->taper.result == L_FAIL) {
-               fprintf(mailf, "%s\n",
+               g_fprintf(mailf, "%s\n",
                        tmp=TextRule(TapeTime, TapeRate, "FAILED "));
                amfree(tmp);
                continue;
            if(repdata->taper.result == L_SUCCESS || 
               repdata->taper.result == L_PARTIAL ||
               repdata->taper.result == L_CHUNKSUCCESS)
-               snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
+               g_snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
                  "%3d:%02d", mnsc(repdata->taper.sec));
            else
-               snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
+               g_snprintf(TimeRateBuffer, SIZEOF(TimeRateBuffer),
                  "N/A ");
-           fprintf(mailf, cd->Format, cd->Width, cd->Width, TimeRateBuffer);
+           g_fprintf(mailf, cd->Format, cd->Width, cd->Width, TimeRateBuffer);
  
            cd= &ColumnData[TapeRate];
-           fprintf(mailf, "%*s", cd->PrefixSpace, "");
+           g_fprintf(mailf, "%*s", cd->PrefixSpace, "");
            if(repdata->taper.result == L_SUCCESS || 
               repdata->taper.result == L_PARTIAL ||
               repdata->taper.result == L_CHUNKSUCCESS)
-               fprintf(mailf, cd->Format, cd->Width, cd->Precision, repdata->taper.kps);
+               g_fprintf(mailf, cd->Format, cd->Width, cd->Precision, repdata->taper.kps);
            else
-               fprintf(mailf, "%*s", cd->Width, "N/A ");
+               g_fprintf(mailf, "%*s", cd->Width, "N/A ");
  
            if (repdata->chunker.result == L_PARTIAL)
-               fprintf(mailf, " PARTIAL");
+               g_fprintf(mailf, " PARTIAL");
            else if(repdata->taper.result == L_PARTIAL)
-               fprintf(mailf, " TAPE-PARTIAL");
+               g_fprintf(mailf, " TAPE-PARTIAL");
  
            fputc('\n', mailf);
        }
@@@ -1528,8 -1557,14 +1559,14 @@@ static voi
  bogus_line(
      const char *err_text)
  {
-     printf("line %d of log is bogus: <%s>\n", curlinenum, curstr);
-     printf("  Scan failed at: <%s>\n", err_text);
+     char * s;
+     s = g_strdup_printf(_("line %d of log is bogus: <%s %s %s>\n"),
+                         curlinenum, 
+                         logtype_str[curlog], program_str[curprog], curstr);
+     g_printf("%s\n", s);
+     g_printf(_("  Scan failed at: <%s>\n"), err_text);
+     addline(&errsum, s);
+     amfree(s);
  }
  
  
@@@ -1546,9 -1581,20 +1583,20 @@@ nicedate
      static char nice[64];
      char date[9];
      int  numdate;
-     static char *months[13] = { "BogusMonth",
-       "January", "February", "March", "April", "May", "June",
-       "July", "August", "September", "October", "November", "December"
+     static char *months[13] = {
+               T_("BogusMonth"),
+               T_("January"),
+               T_("February"),
+               T_("March"),
+               T_("April"),
+               T_("May"),
+               T_("June"),
+               T_("July"),
+               T_("August"),
+               T_("September"),
+               T_("October"),
+               T_("November"),
+               T_("December")
      };
      int year, month, day;
  
      if (month > 12 )
        month = 0;
  
-     snprintf(nice, SIZEOF(nice), "%s %d, %d", months[month], day, year);
+     g_snprintf(nice, SIZEOF(nice), "%s %d, %d", _(months[month]), day, year);
  
      return nice;
  }
@@@ -1678,7 -1724,7 +1726,7 @@@ handle_start(void
      if(amflush_run && normal_run) {
        amflush_run = 0;
        addline(&notes,
-      "  reporter: both amflush and planner output in log, ignoring amflush.");
+      _("  reporter: both amflush and planner output in log, ignoring amflush."));
      }
  }
  
@@@ -1739,7 -1785,7 +1787,7 @@@ handle_stats(void
  {
      char *s, *fp;
      int ch;
-     char *hostname, *diskname, *datestamp;
+     char *hostname, *diskname, *datestamp, *qdiskname;
      int level = 0;
      double sec, kps, nbytes, cbytes;
      repdata_t *repdata;
                amfree(hostname);
                return;
            }
-           fp = s - 1;
-           skip_non_whitespace(s, ch);
+           qdiskname = s - 1;
+           skip_quoted_string(s, ch);
            s[-1] = '\0';
-           diskname = stralloc(fp);
+           diskname = unquote_string(qdiskname);
            s[-1] = (char)ch;
  
            skip_whitespace(s, ch);
            s[-1] = '\0';
            datestamp = stralloc(fp);
            s[-1] = (char)ch;
            skip_whitespace(s, ch);
            if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) {
                bogus_line(s - 1);
                amfree(hostname);
  
            dp = lookup_disk(hostname, diskname);
            if(dp == NULL) {
-               addtostrange(hostname, diskname, level,
-                            "ERROR [not in disklist]");
+               addtoX_summary(&first_failed, &last_failed,
+                              hostname, diskname, level,
+                              _("ERROR [not in disklist]"));
                exit_status |= STATUS_FAILED;
                amfree(hostname);
                amfree(diskname);
@@@ -1869,7 -1917,7 +1919,7 @@@ handle_note(void
  {
      char *str = NULL;
  
-     str = vstralloc("  ", program_str[curprog], ": ", curstr, NULL);
+     str = vstrallocf("  %s: %s", program_str[curprog], curstr);
      addline(&notes, str);
      amfree(str);
  }
@@@ -1904,8 -1952,8 +1954,8 @@@ handle_error(void
        }
        /* else some other tape error, handle like other errors */
      }
-     s = vstralloc("  ", program_str[curprog], ": ",
-                 logtype_str[curlog], " ", curstr, NULL);
+     s = vstrallocf("  %s: %s %s", program_str[curprog],
+                 logtype_str[curlog], curstr);
      addline(&errsum, s);
      amfree(s);
  }
@@@ -1981,7 -2029,8 +2031,8 @@@ handle_disk(void
   * for a split chunk of the overall dumpfile.
   */
  static repdata_t *
- handle_chunk(void)
+ handle_chunk(
+     logtype_t logtype)
  {
      disk_t *dp;
      double sec, kps, kbytes;
      repdata_t *repdata;
      int level, chunk;
      char *datestamp;
+     char *label = NULL;
+     int fileno;
+     int totpart;
      
      if(curprog != P_TAPER) {
        bogus_line(curstr);
      
      s = curstr;
      ch = *s++;
-     
      skip_whitespace(s, ch);
      if(ch == '\0') {
        bogus_line(s - 1);
        return NULL;
      }
+     if (logtype == L_PART || logtype == L_PARTPARTIAL) {
+       fp = s - 1;
+       skip_non_whitespace(s, ch);
+       s[-1] = '\0';
+       label = stralloc(fp);
+       s[-1] = (char)ch;
+     
+       skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf(s - 1, "%d", &fileno) != 1) {
+           bogus_line(s - 1);
+           amfree(label);
+           return NULL;
+       }
+       skip_integer(s, ch);
+       skip_whitespace(s, ch);
+       if(ch == '\0') {
+           bogus_line(s - 1);
+           amfree(label);
+           return NULL;
+       }
+       amfree(label);
+     }
      fp = s - 1;
      skip_non_whitespace(s, ch);
      s[-1] = '\0';
      }
      skip_integer(s, ch);
  
+     if (ch != '\0' && s[-1] == '/') {
+       s++; ch = s[-1];
+       if (sscanf(s - 1, "%d", &totpart) != 1) {
+           bogus_line(s - 1);
+           amfree(hostname);
+           amfree(diskname);
+           amfree(datestamp);
+           return NULL;
+       }
+       skip_integer(s, ch);
+     }
      skip_whitespace(s, ch);
      if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) {
        bogus_line(s - 1);
      if(dp == NULL) {
        char *str = NULL;
        
-       str = vstralloc("  ", prefix(hostname, diskname, level),
-                       " ", "ERROR [not in disklist]",
-                       NULL);
+       str = vstrallocf(_("  %s ERROR [not in disklist]"),
+                       prefix(hostname, diskname, level));
        addline(&errsum, str);
        amfree(str);
        amfree(hostname);
@@@ -2135,8 -2222,11 +2224,11 @@@ handle_success
      char *diskname = NULL;
      repdata_t *repdata;
      int level = 0;
+     int totpart = 0;
      char *datestamp;
  
+     (void)logtype;
      if(curprog != P_TAPER && curprog != P_DUMPER && curprog != P_PLANNER &&
         curprog != P_CHUNKER) {
        bogus_line(curstr);
      datestamp = stralloc(fp);
      s[-1] = (char)ch;
  
-     if(strlen(datestamp) < 3) {
-       level = atoi(datestamp);
+     //datestamp is optional
+     if(strlen(datestamp) < 6) {
+       totpart = atoi(datestamp);
        datestamp = newstralloc(datestamp, run_datestamp);
      }
      else {
        skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf(s - 1, "%d", &totpart) != 1) {
+           bogus_line(s - 1);
+           amfree(hostname);
+           amfree(diskname);
+           amfree(datestamp);
+           return NULL;
+       }
+       skip_integer(s, ch);
+     }
+     skip_whitespace(s, ch);
+     //totpart is optional
+     if (*(s-1) == '"')
+       s++;
+     if (*(s-1) == '[') {
+       level = totpart;
+       totpart = -1;
+     } else {
        if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) {
            bogus_line(s - 1);
            amfree(hostname);
            return NULL;
        }
        skip_integer(s, ch);
+       skip_whitespace(s, ch);
      }
  
      if(level < 0 || level > 9) {
        amfree(hostname);
        amfree(diskname);
        return NULL;
      }
  
-     skip_whitespace(s, ch);
                                /* Planner success messages (for skipped
                                   dumps) do not contain statistics */
      if(curprog != P_PLANNER) {
  
      dp = lookup_disk(hostname, diskname);
      if(dp == NULL) {
-       addtostrange(hostname, qdiskname, level, "ERROR [not in disklist]");
+       addtoX_summary(&first_failed, &last_failed, hostname, qdiskname, level,
+                      _("ERROR [not in disklist]"));
        exit_status |= STATUS_FAILED;
        amfree(hostname);
        amfree(diskname);
  
      i = level > 0;
  
-     if(origkb < 0.0) {
+     if (origkb < 0.0 && (curprog == P_CHUNKER || curprog == P_TAPER) &&
+       isnormal(repdata->dumper.outsize)) {
+       /* take origkb from DUMPER line */
+       origkb = repdata->dumper.outsize;
+     } else if (origkb < 0.0) {
+       /* take origkb from infofile, needed for amflush */
        info_t inf;
        struct tm *tm;
        int Idatestamp;
  
      if (curprog == P_DUMPER &&
        (sp->result == L_FAIL || sp->result == L_PARTIAL)) {
-       addtostrange(hostname, qdiskname, level, "was successfully retried");
+       addtoX_summary(&first_failed, &last_failed, hostname, qdiskname, level,
+                      _("was successfully retried"));
      }
  
      amfree(hostname);
  
      if(curprog == P_TAPER) {
        if(current_tape == NULL) {
-           error("current_tape == NULL");
+           error(_("current_tape == NULL"));
            /*NOTREACHED*/
        }
        stats[i].taper_time += sec;
        sp->filenum = ++tapefcount;
        sp->tapelabel = current_tape->label;
+       sp->totpart = totpart;
        tapedisks[level] +=1;
        stats[i].tapedisks +=1;
        stats[i].tapesize += kbytes;
        sp->outsize = kbytes;
        if(!isnormal(repdata->chunker.outsize) && isnormal(repdata->dumper.outsize)) { /* dump to tape */
            stats[i].outsize += kbytes;
-           if(dp->compress != COMP_NONE) {
+           if (abs(kbytes - origkb) >= 32) {
+               /* server compressed */
+               stats[i].corigsize += origkb;
                stats[i].coutsize += kbytes;
            }
        }
-       if (logtype == L_SUCCESS || logtype== L_PARTIAL) {
-           current_tape->taper_time += sec;
-           current_tape->coutsize += kbytes;
-       }
-       current_tape->corigsize += origkb;
        current_tape->tapedisks += 1;
      }
  
      if(curprog == P_DUMPER) {
        stats[i].dumper_time += sec;
-       if(dp->compress == COMP_NONE) {
+       if (abs(kbytes - origkb) < 32) {
+           /* not client compressed */
            sp->origsize = kbytes;
        }
        else {
+           /* client compressed */
            stats[i].corigsize += sp->origsize;
+           stats[i].coutsize += kbytes;
        }
        dumpdisks[level] +=1;
        stats[i].dumpdisks +=1;
      if(curprog == P_CHUNKER) {
        sp->outsize = kbytes;
        stats[i].outsize += kbytes;
-       if(dp->compress != COMP_NONE) {
+       if (abs(kbytes - origkb) >= 32) {
+           /* server compressed */
+           stats[i].corigsize += origkb;
            stats[i].coutsize += kbytes;
        }
      }
@@@ -2378,12 -2499,10 +2501,10 @@@ handle_strange(void
  
      qdisk = quote_string(repdata->disk->name);
  
-     addline(&errdet,"");
-     str = vstralloc("/-- ", prefix(repdata->disk->host->hostname, 
-                                  qdisk, repdata->level),
-                   " ", "STRANGE",
-                   NULL);
-     addline(&errdet, str);
+     addline(&strangedet,"");
+     str = vstrallocf("/-- %s STRANGE",
+               prefix(repdata->disk->host->hostname, qdisk, repdata->level));
+     addline(&strangedet, str);
      amfree(str);
  
      while(contline_next()) {
        if(strncmp_const_skip(curstr, "sendbackup: warning ", s, ch) == 0) {
            strangestr = newstralloc(strangestr, s);
        }
-       addline(&errdet, curstr);
+       addline(&strangedet, curstr);
      }
-     addline(&errdet,"\\--------");
+     addline(&strangedet,"\\--------");
  
-     str = vstralloc("STRANGE", " ", strangestr, NULL);
-     addtostrange(repdata->disk->host->hostname, qdisk, repdata->level, str);
+     str = vstrallocf("STRANGE %s", strangestr? strangestr : _("(see below)"));
+     addtoX_summary(&first_strange, &last_strange,
+                  repdata->disk->host->hostname, qdisk, repdata->level, str);
      exit_status |= STATUS_STRANGE;
      amfree(qdisk);
      amfree(str);
@@@ -2486,7 -2606,8 +2608,8 @@@ handle_failed(void
      dp = lookup_disk(hostname, diskname);
      amfree(diskname);
      if(dp == NULL) {
-       addtostrange(hostname, qdiskname, level, "ERROR [not in disklist]");
+       addtoX_summary(&first_failed, &last_failed, hostname, qdiskname, level,
+                      _("ERROR [not in disklist]"));
      } else {
        repdata = find_repdata(dp, datestamp, level);
  
      }
      amfree(datestamp);
  
-     str = vstralloc("FAILED", " ", errstr, NULL);
-     addtostrange(hostname, qdiskname, level, str);
+     str = vstrallocf(_("FAILED %s"), errstr);
+     addtoX_summary(&first_failed, &last_failed, hostname, qdiskname, level,
+                  str);
      amfree(str);
  
      if(curprog == P_DUMPER) {
        addline(&errdet,"");
-       str = vstralloc("/-- ", prefix(hostname, qdiskname, level),
-                       " ", "FAILED",
-                       " ", errstr,
-                       NULL);
+       str = vstrallocf("/-- %s FAILED %s",
+                       prefix(hostname, qdiskname, level), 
+                       errstr);
        addline(&errdet, str);
        amfree(str);
        while(contline_next()) {
@@@ -2531,7 -2652,8 +2654,8 @@@ generate_missing(void
      for(dp = diskq.head; dp != NULL; dp = dp->next) {
        if(dp->todo && data(dp) == NULL) {
            qdisk = quote_string(dp->name);
-           addtostrange(dp->host->hostname, qdisk, -987, "RESULTS MISSING");
+           addtoX_summary(&first_failed, &last_failed, dp->host->hostname,
+                          qdisk, -987, _("RESULTS MISSING"));
            exit_status |= STATUS_MISSING;
            amfree(qdisk);
        }
@@@ -2563,30 -2685,30 +2687,30 @@@ generate_bad_estimate(void
                        outsize  = repdata->dumper.outsize;
  
                    if(repdata->est_csize * 0.9 > outsize) {
-                       snprintf(s, 1000,
-                               "  big estimate: %s %s %d",
+                       g_snprintf(s, 1000,
+                               _("  big estimate: %s %s %d"),
                                 repdata->disk->host->hostname,
                                 repdata->disk->name,
                                 repdata->level);
                        s[999] = '\0';
                        addline(&notes, s);
-                       snprintf(s, 1000,
-                                "                est: %.0lf%s    out %.0lf%s",
+                       g_snprintf(s, 1000,
+                                _("                est: %.0lf%s    out %.0lf%s"),
                                 du(repdata->est_csize), displayunit,
                                 du(outsize), displayunit);
                        s[999] = '\0';
                        addline(&notes, s);
                    }
                    else if(repdata->est_csize * 1.1 < outsize) {
-                       snprintf(s, 1000,
-                               "  small estimate: %s %s %d",
+                       g_snprintf(s, 1000,
+                               _("  small estimate: %s %s %d"),
                                 repdata->disk->host->hostname,
                                 repdata->disk->name,
                                 repdata->level);
                        s[999] = '\0';
                        addline(&notes, s);
-                       snprintf(s, 1000,
-                                "                  est: %.0lf%s    out %.0lf%s",
+                       g_snprintf(s, 1000,
+                                _("                  est: %.0lf%s    out %.0lf%s"),
                                 du(repdata->est_csize), displayunit,
                                 du(outsize), displayunit);
                        s[999] = '\0';
@@@ -2604,16 -2726,18 +2728,18 @@@ prefix 
      char *    disk,
      int               level)
  {
-     char number[NUM_STR_SIZE];
      static char *str = NULL;
  
-     snprintf(number, SIZEOF(number), "%d", level);
-     str = newvstralloc(str,
-                      " ", host ? host : "(host?)",
-                      " ", disk ? disk : "(disk?)",
-                      level != -987 ? " lev " : "",
-                      level != -987 ? number : "",
-                      NULL);
+     if (level == -987) {
+       str = newvstrallocf(str, " %s %s",
+                       host ? host : _("(host?)"),
+                       disk ? disk : _("(disk?)"));
+     } else {
+       str = newvstrallocf(str, " %s %s lev %d",
+                       host ? host : _("(host?)"),
+                       disk ? disk : _("(disk?)"),
+                       level);
+     }
      return str;
  }
  
@@@ -2628,15 -2752,13 +2754,13 @@@ prefixstrange 
  {
      char *h, *d;
      size_t l;
-     char number[NUM_STR_SIZE];
      static char *str = NULL;
  
-     snprintf(number, SIZEOF(number), "%d", level);
      h=alloc(len_host+1);
      if(host) {
        strncpy(h, host, len_host);
      } else {
-       strncpy(h, "(host?)", len_host);
+       strncpy(h, _("(host?)"), len_host);
      }
      h[len_host] = '\0';
      for(l = strlen(h); l < len_host; l++) {
      if(disk) {
        strncpy(d, disk, len_disk);
      } else {
-       strncpy(d, "(disk?)", len_disk);
+       strncpy(d, _("(disk?)"), len_disk);
      }
      d[len_disk] = '\0';
      for(l = strlen(d); l < len_disk; l++) {
        d[l] = ' ';
      }
-     str = newvstralloc(str,
-                      h,
-                      "  ", d,
-                      level != -987 ? "  lev " : "",
-                      level != -987 ? number : "",
-                      NULL);
+     if (level == -987) {
+       str = newvstrallocf(str, " %s %s", h, d);
+     } else {
+       str = newvstrallocf(str, " %s %s lev %d", h, d, level);
+     }
      amfree(h);
      amfree(d);
      return str;
  
  
  static void
- addtostrange (
-     char *    host,
-     char *    disk,
-     int               level,
-     char *    str)
+ addtoX_summary (
+     X_summary_t **first,
+     X_summary_t **last,
+     char       *host,
+     char       *disk,
+     int                 level,
+     char       *str)
  {
-     strange_t *strange;
+     X_summary_t *X_summary;
  
-     strange = alloc(SIZEOF(strange_t));
-     strange->hostname = stralloc(host);
-     strange->diskname = stralloc(disk);
-     strange->level    = level;
-     strange->str      = stralloc(str);
-     strange->next = NULL;
-     if(first_strange == NULL) {
-       first_strange = strange;
+     X_summary = alloc(SIZEOF(X_summary_t));
+     X_summary->hostname = stralloc(host);
+     X_summary->diskname = stralloc(disk);
+     X_summary->level    = level;
+     X_summary->str      = stralloc(str);
+     X_summary->next = NULL;
+     if (*first == NULL) {
+       *first = X_summary;
      }
      else {
-         last_strange->next = strange;
+         (*last)->next = X_summary;
      }
-     last_strange = strange;
+     *last = X_summary;
  }
  
  static void
  copy_template_file(
      char *    lbl_templ)
    int fd;
    ssize_t numread;
  
-   if (strchr(lbl_templ, '/') == NULL) {
-     lbl_templ = stralloc2(config_dir, lbl_templ);
-   } else {
-     lbl_templ = stralloc(lbl_templ);
-   }
+   lbl_templ = config_dir_relative(lbl_templ);
    if ((fd = open(lbl_templ, 0)) < 0) {
      curlog = L_ERROR;
      curprog = P_REPORTER;
-     curstr = vstralloc("could not open PostScript template file ",
-                      lbl_templ,
-                      ": ",
-                      strerror(errno),
-                      NULL);
+     curstr = vstrallocf(_("could not open PostScript template file %s: %s"),
+                      lbl_templ, strerror(errno));
      handle_error();
      amfree(curstr);
      amfree(lbl_templ);
      if (fwrite(buf, (size_t)numread, 1, postscript) != 1) {
        curlog = L_ERROR;
        curprog = P_REPORTER;
-       curstr = vstralloc("error copying PostScript template file ",
-                        lbl_templ,
-                        ": ",
-                        strerror(errno),
-                        NULL);
+       curstr = vstrallocf(_("error copying PostScript template file %s: %s"),
+                        lbl_templ, strerror(errno));
        handle_error();
        amfree(curstr);
        amfree(lbl_templ);
    if (numread < 0) {
      curlog = L_ERROR;
      curprog = P_REPORTER;
-     curstr = vstralloc("error reading PostScript template file ",
-                      lbl_templ,
-                      ": ",
-                      strerror(errno),
-                      NULL);
+     curstr = vstrallocf(_("error reading PostScript template file %s: %s"),
+                      lbl_templ, strerror(errno));
      handle_error();
      amfree(curstr);
      amfree(lbl_templ);
@@@ -2811,28 -2920,28 +2922,28 @@@ do_postscript_output(void
            return;
  
        /* generate a few elements */
-       fprintf(postscript,"(%s) DrawDate\n\n",
+       g_fprintf(postscript,"(%s) DrawDate\n\n",
                    nicedate(run_datestamp ? run_datestamp : "0"));
-       fprintf(postscript,"(Amanda Version %s) DrawVers\n",version());
-       fprintf(postscript,"(%s) DrawTitle\n", current_tape->label);
+       g_fprintf(postscript,_("(Amanda Version %s) DrawVers\n"),version());
+       g_fprintf(postscript,"(%s) DrawTitle\n", current_tape->label);
  
        /* Stats */
-       fprintf(postscript, "(Total Size:        %6.1lf MB) DrawStat\n",
+       g_fprintf(postscript, "(Total Size:        %6.1lf MB) DrawStat\n",
              mb(current_tape->coutsize));
-       fprintf(postscript, "(Tape Used (%%)       ");
+       g_fprintf(postscript, _("(Tape Used (%%)       "));
        divzero(postscript, pct(current_tape->coutsize + 
                                marksize * (current_tape->tapedisks + current_tape->tapechunks)),
                                (double)tapesize);
-       fprintf(postscript," %%) DrawStat\n");
-       fprintf(postscript, "(Compression Ratio:  ");
+       g_fprintf(postscript," %%) DrawStat\n");
+       g_fprintf(postscript, _("(Compression Ratio:  "));
        divzero(postscript, pct(current_tape->coutsize),current_tape->corigsize);
-       fprintf(postscript," %%) DrawStat\n");
-       fprintf(postscript,"(Filesystems Taped: %4d) DrawStat\n",
+       g_fprintf(postscript," %%) DrawStat\n");
+       g_fprintf(postscript,_("(Filesystems Taped: %4d) DrawStat\n"),
                  current_tape->tapedisks);
  
        /* Summary */
  
-       fprintf(postscript,
+       g_fprintf(postscript,
              "(-) (%s) (-) (  0) (      32) (      32) DrawHost\n",
              current_tape->label);
  
                if (repdata->taper.result == L_SUCCESS ||
                    repdata->taper.result == L_PARTIAL) {
                    if(isnormal(origsize)) {
-                       fprintf(postscript,"(%s) (%s) (%d) (%3.0d) (%8.0lf) (%8.0lf) DrawHost\n",
+                       g_fprintf(postscript,"(%s) (%s) (%d) (%3.0d) (%8.0lf) (%8.0lf) DrawHost\n",
                            dp->host->hostname, dp->name, repdata->level,
                            repdata->taper.filenum, origsize, 
                            outsize);
                    }
                    else {
-                       fprintf(postscript,"(%s) (%s) (%d) (%3.0d) (%8s) (%8.0lf) DrawHost\n",
+                       g_fprintf(postscript,"(%s) (%s) (%d) (%3.0d) (%8s) (%8.0lf) DrawHost\n",
                            dp->host->hostname, dp->name, repdata->level,
                            repdata->taper.filenum, "N/A", 
                            outsize);
            }
        }
        
-       fprintf(postscript,"\nshowpage\n");
+       g_fprintf(postscript,"\nshowpage\n");
      }
  }
diff --combined server-src/taper.c
index 3a10efe8e5367e224e55aa48576c450a4c83652a,d5b72af25578559da2f06619a78911551d6060ce..71fba25fcff1cb97f73371a07eb8d50f3215ab16
   * Authors: the Amanda Development Team.  Its members are listed in a
   * file named AUTHORS, in the root directory of this distribution.
   */
- /* $Id: taper.c,v 1.144 2006/08/24 11:23:32 martinea Exp $
+ /* $Id: taper.c 6512 2007-05-24 17:00:24Z ian $
   *
   * moves files from holding disk to tape, or from a socket to tape
   */
  
- #include "amanda.h"
- #include "util.h"
- #include "conffile.h"
- #include "tapefile.h"
+ /* FIXME: This file needs to use gettext. */
+ #include <glib.h>
+ #include "physmem.h"
+ #include "changer.h"
  #include "clock.h"
- #include "stream.h"
- #include "holding.h"
+ #include "conffile.h"
+ #include "device.h"
  #include "logfile.h"
- #include "tapeio.h"
- #include "changer.h"
- #include "version.h"
- #include "arglist.h"
- #include "token.h"
- #include "amfeatures.h"
- #include "fileheader.h"
  #include "server_util.h"
- #include "taperscan.c"
- #ifdef HAVE_SYS_MMAN_H
- #include <sys/mman.h>
- #endif
- #define taper_debug(i,x) do {         \
-       if ((i) <= debug_taper) {       \
-           dbprintf(x);                \
-       }                               \
- } while (0)
- #ifdef HAVE_LIBVTBLC
- #include <vtblc.h>
- #include <strings.h>
- #include <math.h>
- static int vtbl_no   = -1;
- static int len       =  0;
- static int offset    =  0;
- static char *datestr = NULL;
- static char start_datestr[20];
- static time_t raw_time;
- static struct tm tape_time;
- static struct tm backup_time;
- static struct tm *tape_timep = &tape_time;
- typedef struct vtbl_lbls {
-     u_int8_t  label[45];
-     u_int8_t  date[20];
- } vtbl_lbls;
- static vtbl_lbls vtbl_entry[MAX_VOLUMES];
- #endif /* HAVE_LIBVTBLC */
- /*
-  * XXX update stat collection/printing
-  * XXX advance to next tape first in next_tape
-  * XXX label is being read twice?
-  */
- static off_t splitsize = (off_t)0; /* max size of dumpfile before split (Kb) */
- static off_t mmap_splitsize = (off_t)0;
- static char *mmap_filename = NULL;
- static char *mmap_splitbuf = NULL;
- static char *mem_splitbuf = NULL;
- static char *splitbuf = NULL;
- static off_t mem_splitsize = (off_t)0;
- static char *splitbuf_wr_ptr = NULL; /* the number of Kb we've written into splitbuf */
- int orig_holdfile = -1;
- /* NBUFS replaced by conf_tapebufs */
- /* #define NBUFS              20 */
- static int conf_tapebufs;
- static off_t maxseek = (off_t)1 << ((SIZEOF(off_t) * 8) - 11);
- static char *holdfile_path = NULL;
- static char *holdfile_path_thischunk = NULL;
- static int num_holdfile_chunks = 0;
- static off_t holdfile_offset_thischunk = (off_t)0;
- static int mmap_splitbuffer_fd = -1;
- #define MODE_NONE 0
- #define MODE_FILE_WRITE 1
- #define MODE_PORT_WRITE 2
- static mode_t mode = MODE_NONE;
- /* This is now the number of empties, not full bufs */
- #define THRESHOLD     1
- #define CONNECT_TIMEOUT 2*60
- #define EMPTY 1
- #define FILLING 2
- #define FULL 3
- typedef struct buffer_s {
-     long status;
-     ssize_t size;
-     char *buffer;
- } buffer_t;
- #define nextbuf(p)    ((p) == buftable+conf_tapebufs-1? buftable : (p)+1)
- #define prevbuf(p)    ((p) == buftable? buftable+conf_tapebufs-1 : (p)-1)
- /* major modules */
- int main(int main_argc, char **main_argv);
- void file_reader_side(int rdpipe, int wrpipe);
- void tape_writer_side(int rdpipe, int wrpipe);
- void put_syncpipe_fault_result(char *handle);
- /* shared-memory routines */
- char *attach_buffers(size_t size);
- void detach_buffers(char *bufp);
- void destroy_buffers(void);
- #define REMOVE_SHARED_MEMORY() \
-     detach_buffers(buffers); \
-     if (strcmp(procname, "reader") == 0) { \
-       destroy_buffers(); \
-     }
- /* synchronization pipe routines */
- void syncpipe_init(int rd, int wr);
- void syncpipe_read_error(ssize_t rc, ssize_t expected);
- void syncpipe_write_error(ssize_t rc, ssize_t expected);
- int syncpipe_get(int *intp);
- int syncpipe_getint(void);
- char *syncpipe_getstr(void);
- int syncpipe_put(int ch, int intval);
- int syncpipe_putint(int i);
- int syncpipe_putstr(const char *str);
- /* tape manipulation subsystem */
- int first_tape(char *new_datestamp);
- int next_tape(int writerr);
- int end_tape(int writerr);
- int write_filemark(void);
- /* support crap */
- int seek_holdfile(int fd, buffer_t *bp, off_t kbytes);
- /* signal handling */
- static void install_signal_handlers(void);
- static void signal_handler(int);
- /* exit routine */
- static void cleanup(void);
- /*
-  * ========================================================================
-  * GLOBAL STATE
-  *
-  */
- int interactive;
- pid_t writerpid;
- times_t total_wait;
- char *buffers = NULL;
- buffer_t *buftable = NULL;
- int err;
- char *procname = "parent";
- char *taper_timestamp = NULL;
- char *label = NULL;
- int filenum;
- char *errstr = NULL;
- int tape_fd = -1;
- char *tapedev = NULL;
- char *tapetype = NULL;
- tapetype_t *tt = NULL;
- size_t tt_blocksize;
- size_t tt_blocksize_kb;
- size_t buffer_size;
- int tt_file_pad;
- static unsigned long malloc_hist_1, malloc_size_1;
- static unsigned long malloc_hist_2, malloc_size_2;
- dumpfile_t file;
- dumpfile_t *save_holdfile = NULL;
- off_t cur_span_chunkstart = (off_t)0; /* start of current split dump chunk (Kb) */
- char *holdfile_name;
- int num_splits = 0;
- int expected_splits = 0;
- int num_holdfiles = 0;
- times_t curdump_rt;
- am_feature_t *their_features = NULL;
- int runtapes, cur_tape, have_changer, tapedays;
- char *labelstr, *conf_tapelist;
- #ifdef HAVE_LIBVTBLC
- char *rawtapedev;
- int first_seg, last_seg;
- #endif /* HAVE_LIBVTBLC */
- /*
-  * ========================================================================
-  * MAIN PROGRAM
-  *
-  */
- int
- main(
-     int main_argc,
-     char **main_argv)
- {
-     int p2c[2], c2p[2];               /* parent-to-child, child-to-parent pipes */
-     char *conffile;
-     size_t size;
-     int i;
-     size_t j;
-     size_t page_size;
-     char *first_buffer;
-     int    new_argc,   my_argc;
-     char **new_argv, **my_argv;
-     safe_fd(-1, 0);
-     set_pname("taper");
-     dbopen("server");
-     /* Don't die when child closes pipe */
-     signal(SIGPIPE, SIG_IGN);
-     malloc_size_1 = malloc_inuse(&malloc_hist_1);
-     parse_conf(main_argc, main_argv, &new_argc, &new_argv);
-     my_argc = new_argc;
-     my_argv = new_argv;
-     fprintf(stderr, "%s: pid %ld executable %s version %s\n",
-           get_pname(), (long) getpid(), my_argv[0], version());
-     dbprintf(("%s: pid %ld executable %s version %s\n",
-           get_pname(), (long) getpid(), my_argv[0], version()));
-     fflush(stderr);
-     if (my_argc > 1 && my_argv[1][0] != '-') {
-       config_name = stralloc(my_argv[1]);
-       config_dir = vstralloc(CONFIG_DIR, "/", my_argv[1], "/", NULL);
-       my_argc--;
-       my_argv++;
-     } else {
-       char my_cwd[STR_SIZE];
-       if (getcwd(my_cwd, SIZEOF(my_cwd)) == NULL) {
-           error("cannot determine current working directory");
-           /*NOTREACHED*/
-       }
-       config_dir = stralloc2(my_cwd, "/");
-       if ((config_name = strrchr(my_cwd, '/')) != NULL) {
-           config_name = stralloc(config_name + 1);
-       }
-     }
-     safe_cd();
-     install_signal_handlers();
-     atexit(cleanup);
-     /* print prompts and debug messages if running interactive */
-     interactive = (my_argc > 1 && strcmp(my_argv[1],"-t") == 0);
-     if (interactive) {
-       erroutput_type = ERR_INTERACTIVE;
-     } else {
-       erroutput_type = ERR_AMANDALOG;
-       set_logerror(logerror);
-     }
-     free_new_argv(new_argc, new_argv);
-     conffile = stralloc2(config_dir, CONFFILE_NAME);
-     if (read_conffile(conffile)) {
-       error("errors processing config file \"%s\"", conffile);
-       /*NOTREACHED*/
-     }
-     amfree(conffile);
-     dbrename(config_name, DBG_SUBDIR_SERVER);
-     report_bad_conf_arg();
-     conf_tapelist = getconf_str(CNF_TAPELIST);
-     if (*conf_tapelist == '/') {
-       conf_tapelist = stralloc(conf_tapelist);
-     } else {
-       conf_tapelist = stralloc2(config_dir, conf_tapelist);
-     }
-     if (read_tapelist(conf_tapelist)) {
-       error("could not load tapelist \"%s\"", conf_tapelist);
-       /*NOTREACHED*/
-     }
-     tapedev   = getconf_str(CNF_TAPEDEV);
-     if (tapedev != NULL)
-       tapedev = stralloc(tapedev);
-     tapetype    = getconf_str(CNF_TAPETYPE);
-     tt                = lookup_tapetype(tapetype);
- #ifdef HAVE_LIBVTBLC
-     rawtapedev = stralloc(getconf_str(CNF_RAWTAPEDEV));
- #endif /* HAVE_LIBVTBLC */
-     tapedays  = getconf_int(CNF_TAPECYCLE);
-     labelstr  = getconf_str(CNF_LABELSTR);
-     runtapes  = getconf_int(CNF_RUNTAPES);
-     cur_tape  = 0;
-     conf_tapebufs = getconf_int(CNF_TAPEBUFS);
-     tt_blocksize_kb = (size_t)tapetype_get_blocksize(tt);
-     tt_blocksize = tt_blocksize_kb * 1024;
-     tt_file_pad = tapetype_get_file_pad(tt);
-     if (interactive) {
-       fprintf(stderr,"taper: running in interactive test mode\n");
-       dbprintf(("taper: running in interactive test mode\n"));
-       fflush(stderr);
-     }
-     /* create read/write syncronization pipes */
-     if (pipe(p2c)) {
-       error("creating sync pipes: %s", strerror(errno));
-       /*NOTREACHED*/
-     }
-     if (pipe(c2p)) {
-       error("creating sync pipes: %s", strerror(errno));
-       /*NOTREACHED*/
-     }
-     /* create shared memory segment */
- #if defined(HAVE_GETPAGESIZE)
-     page_size = (size_t)getpagesize();
-     fprintf(stderr, "%s: page size = " SIZE_T_FMT "\n",
-               get_pname(), (SIZE_T_FMT_TYPE)page_size);
-     dbprintf(("%s: page size = " SIZE_T_FMT "\n", get_pname(),
-               (SIZE_T_FMT_TYPE)page_size));
- #else
-     page_size = 1024;
-     fprintf(stderr, "%s: getpagesize() not available, using " SIZE_T_FMT "\n",
-           get_pname(), page_size);
-     dbprintf((stderr, "%s: getpagesize() not available, using " SIZE_T_FMT "\n",
-           get_pname(), page_size));
- #endif
-     buffer_size = am_round(tt_blocksize, page_size);
-     fprintf(stderr, "%s: buffer size is " SIZE_T_FMT "\n",
-           get_pname(), (SIZE_T_FMT_TYPE)buffer_size);
-     dbprintf(("%s: buffer size is " SIZE_T_FMT "\n",
-           get_pname(), (SIZE_T_FMT_TYPE)buffer_size));
-     while (conf_tapebufs > 0) {
-       size  = page_size;
-       size += conf_tapebufs * buffer_size;
-       size += conf_tapebufs * SIZEOF(buffer_t);
-       if ((buffers = attach_buffers(size)) != NULL) {
-           break;
-       }
-       log_add(L_INFO, "attach_buffers: (%d tapebuf%s: " SIZE_T_FMT " bytes) %s",
-                       conf_tapebufs,
-                       (conf_tapebufs == 1) ? "" : "s",
-                       size,
-                       strerror(errno));
-       conf_tapebufs--;
-     }
-     if (buffers == NULL) {
-       error("cannot allocate shared memory");
-       /*NOTREACHED*/
-     }
-     /* page boundary offset */
-     i = (int)((buffers - (char *)0) & (page_size - 1));
-     if (i != 0) {
-       first_buffer = buffers + page_size - i;
-       dbprintf(("%s: shared memory at %p, first buffer at %p\n",
-               get_pname(),
-               (void *)buffers,
-               (void *)first_buffer));
-     } else {
-       first_buffer = buffers;
-     }
-     /*LINTED  first_buffer, conf_tapebufs and buffer size are all * pagesize */
-     buftable = (buffer_t *)(first_buffer + (conf_tapebufs * buffer_size));
-     memset(buftable, 0, conf_tapebufs * SIZEOF(buffer_t));
-     if (conf_tapebufs < 10) {
-       j = 1;
-     } else if (conf_tapebufs < 100) {
-       j = 2;
-     } else {
-       j = 3;
-     }
-     for (i = 0; i < conf_tapebufs; i++) {
-       buftable[i].buffer = first_buffer + i * buffer_size;
-       dbprintf(("%s: buffer[%0*d] at %p\n",
-               get_pname(),
-               (int)j, i,
-               (void *)buftable[i].buffer));
-     }
-     dbprintf(("%s: buffer structures at %p for %d bytes\n",
-           get_pname(),
-           (void *)buftable,
-           (int)(conf_tapebufs * SIZEOF(buffer_t))));
-     /* fork off child writer process, parent becomes reader process */
-     switch(writerpid = fork()) {
-     case -1:
-       error("fork: %s", strerror(errno));
-       /*NOTREACHED*/
-     case 0:   /* child */
-       aclose(p2c[1]);
-       aclose(c2p[0]);
-       tape_writer_side(p2c[0], c2p[1]);
-       error("tape writer terminated unexpectedly");
-       /*NOTREACHED*/
-     default:  /* parent */
-       aclose(p2c[0]);
-       aclose(c2p[1]);
-       file_reader_side(c2p[0], p2c[1]);
-       error("file reader terminated unexpectedly");
-       /*NOTREACHED*/
-     }
-     /*NOTREACHED*/
-     return 0;
- }
- /*
-  * ========================================================================
-  * FILE READER SIDE
-  *
-  */
- int read_file(int fd, char *handle,
-                 char *host, char *disk, char *datestamp, 
-                 int level);
- ssize_t taper_fill_buffer(int fd, buffer_t *bp, size_t buflen);
- void dumpbufs(char *str1);
- void dumpstatus(buffer_t *bp);
- ssize_t get_next_holding_file(int fd, buffer_t *bp, char **strclosing, size_t rc);
- int predict_splits(char *filename);
- void create_split_buffer(char *split_diskbuffer, size_t fallback_splitsize, char *id_string);
- void free_split_buffer(void);
- /*
-  * Create a buffer, either in an mmapped file or in memory, where PORT-WRITE
-  * dumps can buffer the current split chunk in case of retry.
-  */
- void
- create_split_buffer(
-     char *split_diskbuffer,
-     size_t fallback_splitsize,
-     char *id_string)
- {
-     char *buff_err = NULL;
-     off_t offset;
-     char *splitbuffer_path = NULL;
-     
-     /* don't bother if we're not actually splitting */
-     if (splitsize <= (off_t)0) {
-       splitbuf = NULL;
-       splitbuf_wr_ptr = NULL;
-       return;
-     }
- #ifdef HAVE_MMAP
- #ifdef HAVE_SYS_MMAN_H
-     if (strcmp(split_diskbuffer, "NULL")) {
-       void *nulls = NULL;
-       char *quoted;
-       off_t c;
-       splitbuffer_path = vstralloc(split_diskbuffer,
-                                    "/splitdump_buffer",
-                                    NULL);
-       /* different file, munmap the previous */
-       if (mmap_filename && strcmp(mmap_filename, splitbuffer_path) != 0) {
-           dbprintf(("create_split_buffer: new file %s\n", splitbuffer_path));
-           munmap(splitbuf, (size_t)mmap_splitsize);
-           aclose(mmap_splitbuffer_fd);
-           mmap_splitbuf = NULL;
-           amfree(mmap_filename);
-           mmap_splitsize = 0;
-       }
-       if (!mmap_filename) {
-           dbprintf(("create_split_buffer: open file %s\n",
-                     splitbuffer_path));
-           mmap_splitbuffer_fd = open(splitbuffer_path, O_RDWR|O_CREAT, 0600);
-           if (mmap_splitbuffer_fd == -1) {
-               buff_err = newvstralloc(buff_err, "open of ", 
-                                       splitbuffer_path, "failed (",
-                                       strerror(errno), ")", NULL);
-               goto fallback;
-           }
-       }
-       offset = lseek(mmap_splitbuffer_fd, (off_t)0, SEEK_END) / 1024;
-       if (offset < splitsize) { /* Increase file size */
-           dbprintf(("create_split_buffer: increase file size of %s to "
-                     OFF_T_FMT "kb\n",
-                     splitbuffer_path, (OFF_T_FMT_TYPE)splitsize));
-           if (mmap_filename) {
-               dbprintf(("create_split_buffer: munmap old file %s\n",
-                         mmap_filename));
-               munmap(splitbuf, (size_t)mmap_splitsize);
-               mmap_splitsize = 0;
-               mmap_splitbuf = NULL;
-           }
-           nulls = alloc(1024); /* lame */
-           memset(nulls, 0, 1024);
-           for (c = offset; c < splitsize ; c += (off_t)1) {
-               if (fullwrite(mmap_splitbuffer_fd, nulls, 1024) < 1024) {
-                   buff_err = newvstralloc(buff_err, "write to ",
-                                           splitbuffer_path,
-                                           "failed (", strerror(errno),
-                                           ")", NULL);
-                   c -= 1;
-                   if (c <= (off_t)fallback_splitsize) {
-                       goto fallback;
-                   }
-                   splitsize = c;
-                   break;
-               }
-           }
-       }
-       amfree(nulls);
-       if (mmap_splitsize < splitsize*1024) {
-           mmap_splitsize = splitsize*1024;
-           mmap_filename = stralloc(splitbuffer_path);
-           dbprintf(("create_split_buffer: mmap file %s for " OFF_T_FMT "kb\n",
-                         mmap_filename,(OFF_T_FMT_TYPE)splitsize));
-             mmap_splitbuf = mmap(NULL, (size_t)mmap_splitsize,
-                                PROT_READ|PROT_WRITE,
-                                MAP_SHARED, mmap_splitbuffer_fd, (off_t)0);
-           if (mmap_splitbuf == (char*)-1) {
-               buff_err = newvstralloc(buff_err, "mmap failed (",
-                                       strerror(errno), ")", NULL);
-               aclose(mmap_splitbuffer_fd);
-               amfree(mmap_filename);
-               mmap_splitsize = 0;
-               mmap_splitbuf = NULL;
-               goto fallback;
-           }
-       }
-       quoted = quote_string(splitbuffer_path);
-       fprintf(stderr,
-               "taper: r: buffering " OFF_T_FMT
-               "kb split chunks in mmapped file %s\n",
-               (OFF_T_FMT_TYPE)splitsize, quoted);
-       dbprintf(("taper: r: buffering " OFF_T_FMT
-               "kb split chunks in mmapped file %s\n",
-               (OFF_T_FMT_TYPE)splitsize, quoted));
-       amfree(splitbuffer_path);
-       amfree(quoted);
-       amfree(buff_err);
-       splitbuf = mmap_splitbuf;
-       splitbuf_wr_ptr = splitbuf;
-       return;
-     } else {
-       buff_err = stralloc("no split_diskbuffer specified");
-     }
- #else
-     (void)split_diskbuffer;   /* Quite unused parameter warning */
-     buff_err = stralloc("mman.h not available");
-     goto fallback;
- #endif
- #else
-     (void)split_diskbuffer;   /* Quite unused parameter warning */
-     buff_err = stralloc("mmap not available");
-     goto fallback;
- #endif
-     /*
-       Buffer split dumps in memory, if we can't use a file.
-     */
-     fallback:
-       amfree(splitbuffer_path);
-         splitsize = (off_t)fallback_splitsize;
-       dbprintf(("create_split_buffer: fallback size " OFF_T_FMT "\n",
-                 (OFF_T_FMT_TYPE)splitsize));
-       log_add(L_INFO,
-               "%s: using fallback split size of " OFF_T_FMT "kb to buffer %s in-memory",
-               buff_err, (OFF_T_FMT_TYPE)splitsize, id_string);
-       amfree(buff_err);
-       if (splitsize > mem_splitsize) {
-           amfree(mem_splitbuf);
-           mem_splitbuf = alloc(fallback_splitsize * 1024);
-           mem_splitsize = fallback_splitsize;
-           dbprintf(("create_split_buffer: alloc buffer size " OFF_T_FMT "\n",
-                         (OFF_T_FMT_TYPE)splitsize *1024));
-       }
-       splitbuf = mem_splitbuf;
-       splitbuf_wr_ptr = splitbuf;
- }
- /*
-  * Free up resources that create_split_buffer eats.
-  */
- void
- free_split_buffer(void)
- {
-     if (mmap_splitbuffer_fd != -1) {
- #ifdef HAVE_MMAP
- #ifdef HAVE_SYS_MMAN_H
-       if (mmap_splitbuf != NULL) {
-           munmap(mmap_splitbuf, (size_t)mmap_splitsize);
-           mmap_splitbuf = NULL;
-       }
- #endif
- #endif
-       aclose(mmap_splitbuffer_fd);
-       amfree(mmap_filename);
-       mmap_splitsize = 0;
-     }
-     if (mem_splitbuf) {
-       amfree(mem_splitbuf);
-       mem_splitsize = 0;
-     }
- }
- void
- put_syncpipe_fault_result(
-     char *    handle)
- {
-     char *q;
-     if (handle == NULL)
-       handle = "<nohandle>";
-     q = squotef("[Taper syncpipe fault]");
-     putresult(TAPE_ERROR, "%s %s\n", handle, q);
-     log_add(L_ERROR, "tape-error %s %s", handle, q);
-     amfree(q);
- }
- void
- file_reader_side(
-     int rdpipe,
-     int wrpipe)
- {
-     cmd_t cmd;
-     struct cmdargs cmdargs;
-     char *handle = NULL;
-     char *filename = NULL;
-     char *qfilename = NULL;
-     char *hostname = NULL;
-     char *diskname = NULL;
-     char *qdiskname = NULL;
-     char *result = NULL;
-     char *datestamp = NULL;
-     char *split_diskbuffer = NULL;
-     char *id_string = NULL;
-     int tok;
-     char *q = NULL;
-     int level, fd;
-     in_port_t data_port;
-     int data_socket;
-     pid_t wpid;
-     char level_str[64];
-     struct stat stat_file;
-     int tape_started;
-     int a;
-     size_t fallback_splitsize = 0;
-     int tmpint;
-     char *c, *c1;
-     procname = "reader";
-     syncpipe_init(rdpipe, wrpipe);
-     /* must get START_TAPER before beginning */
-     startclock();
-     cmd = getcmd(&cmdargs);
-     total_wait = stopclock();
-     if (cmd != START_TAPER || cmdargs.argc != 2) {
-       error("error [file_reader_side cmd %d argc %d]", cmd, cmdargs.argc);
-       /*NOTREACHED*/
-     }
-     /* pass start command on to tape writer */
-     taper_timestamp = newstralloc(taper_timestamp, cmdargs.argv[2]);
-     if (tapedev == NULL) {
-       if (getconf_str(CNF_TPCHANGER) == NULL) {
-           putresult(TAPE_ERROR, "[No tapedev or tpchanger defined]\n");
-           log_add(L_ERROR, "No tapedev or tpchanger defined");
-           dbprintf(("taper: No tapedev or tpchanger defined\n"));
-           exit(1);
-       }
-     } else {
-       tapedev = stralloc(tapedev);
-     }
-     tape_started = 0;
-     if (syncpipe_put('S', 0) == -1) {
-       put_syncpipe_fault_result(NULL);
-     }
-     if (syncpipe_putstr(taper_timestamp) == -1) {
-       put_syncpipe_fault_result(NULL);
-     }
-     /* get result of start command */
-     tok = syncpipe_get(&tmpint);
-     switch(tok) {
-     case -1:
-       put_syncpipe_fault_result(NULL);
-       break;
-     case 'S':
-       putresult(TAPER_OK, "\n");
-       tape_started = 1;
-       /* start is logged in writer */
-       break;
-     case 'E':
-       /* no tape, bail out */
-       if ((result = syncpipe_getstr()) == NULL) {
-           put_syncpipe_fault_result(NULL);
-       } else {
-           q = squotef("[%s]", result);
-           putresult(TAPE_ERROR, "<nohandle> %s\n", q);
-           amfree(q);
-           log_add(L_ERROR,"no-tape [%s]", "No writable valid tape found");
-           c = c1 = result;
-           while (*c != '\0') {
-               if (*c == '\n') {
-                   *c = '\0';
-                   log_add(L_WARNING,"%s", c1);
-                   c1 = c+1;
-               }
-               c++;
-           }
-           if (strlen(c1) > 1 )
-               log_add(L_WARNING,"%s", c1);
-           amfree(result);
-           (void)syncpipe_put('e', 0);                 /* ACK error */
-       }
-       break;
-     case 'H': /* Syncpipe I/O error */
-       /* No ACK syncpipe is down just exit */
-         put_syncpipe_fault_result(handle);
-       break;
-     case 'X':
-       /*
-        * Pipe read error: Communications is severed at least
-        * back to us.  We send a blind 'Q' (quit) and we don't
-        * wait for a response...
-        */
-       syncpipe_put('Q', 0);                   /* ACK error */
-       error("error [communications pipe from writer severed]");
-       /*NOTREACHED*/
-     default:
-       q = squotef("[syncpipe sequence fault: Expected 'S' or 'E']");
-       putresult(TAPE_ERROR, "<nohandle> %s\n", q);
-       log_add(L_ERROR, "no-tape %s]", q);
-       amfree(q);
-     }
-     /* process further driver commands */
-     while (1) {
-       startclock();
-       cmd = getcmd(&cmdargs);
-       if (cmd != QUIT && !tape_started) {
-           error("error [file_reader_side cmd %d without tape ready]", cmd);
-           /*NOTREACHED*/
-       }
-       total_wait = timesadd(total_wait, stopclock());
-       switch(cmd) {
-       case PORT_WRITE:
-           /*
-            * PORT-WRITE
-            *   handle
-            *   hostname
-            *   features
-            *   diskname
-            *   level
-            *   datestamp
-            *   splitsize
-            *   split_diskbuffer
-            */
-           mode = MODE_PORT_WRITE;
-           cmdargs.argc++;                     /* true count of args */
-           a = 2;
-           if (a >= cmdargs.argc) {
-               error("error [taper PORT-WRITE: not enough args: handle]");
-               /*NOTREACHED*/
-           }
-           handle = newstralloc(handle, cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper PORT-WRITE: not enough args: hostname]");
-               /*NOTREACHED*/
-           }
-           hostname = newstralloc(hostname, cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper PORT-WRITE: not enough args: features]");
-               /*NOTREACHED*/
-           }
-           am_release_feature_set(their_features);
-           their_features = am_string_to_feature(cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper PORT-WRITE: not enough args: diskname]");
-               /*NOTREACHED*/
-           }
-           qdiskname = newstralloc(qdiskname, cmdargs.argv[a++]);
-           if (diskname != NULL)
-               amfree(diskname);
-           diskname = unquote_string(qdiskname);
-           if (a >= cmdargs.argc) {
-               error("error [taper PORT-WRITE: not enough args: level]");
-               /*NOTREACHED*/
-           }
-           level = atoi(cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper PORT-WRITE: not enough args: datestamp]");
-               /*NOTREACHED*/
-           }
-           datestamp = newstralloc(datestamp, cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper PORT-WRITE: not enough args: splitsize]");
-               /*NOTREACHED*/
-           }
-           splitsize = OFF_T_ATOI(cmdargs.argv[a++]);
-           if (SIZEOF_OFF_T == 4 && splitsize > 1048576) { /* 1G in 32 bits */
-               splitsize = 1048576;
-           }
-           if (a >= cmdargs.argc) {
-               error("error [taper PORT-WRITE: not enough args: split_diskbuffer]");
-               /*NOTREACHED*/
-           }
-           split_diskbuffer = newstralloc(split_diskbuffer, cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper PORT-WRITE: not enough args: fallback_splitsize]");
-               /*NOTREACHED*/
-           }
-           /* Must fit in memory... */
-           fallback_splitsize = (size_t)atoi(cmdargs.argv[a++]);
-           if (SIZEOF_OFF_T == 4 && fallback_splitsize > 1048576) { /* 1G */
-               fallback_splitsize = 1048576;
-           }
-           if (a != cmdargs.argc) {
-               error("error [taper file_reader_side PORT-WRITE: too many args: %d != %d]",
-                     cmdargs.argc, a);
-               /*NOTREACHED*/
-           }
-           if (fallback_splitsize < 128 ||
-               fallback_splitsize > 64 * 1024 * 1024) {
-               error("error [bad value for fallback_splitsize]");
-               /*NOTREACHED*/
-           }
-           snprintf(level_str, SIZEOF(level_str), "%d", level);
-           id_string = newvstralloc(id_string, hostname, ":", qdiskname, ".",
-                                    level_str, NULL);
-           create_split_buffer(split_diskbuffer, fallback_splitsize, id_string);
-           amfree(id_string);
-           data_port = 0;
-           data_socket = stream_server(&data_port, 0, STREAM_BUFSIZE, 0);      
-           if (data_socket < 0) {
-               char *m;
-               m = vstralloc("[port create failure: ",
-                             strerror(errno),
-                             "]",
-                             NULL);
-               q = squote(m);
-               putresult(TAPE_ERROR, "%s %s\n", handle, q);
-               amfree(m);
-               amfree(q);
-               break;
-           }
-           putresult(PORT, "%d\n", data_port);
-           if ((fd = stream_accept(data_socket, CONNECT_TIMEOUT,
-                                  0, STREAM_BUFSIZE)) == -1) {
-               q = squote("[port connect timeout]");
-               putresult(TAPE_ERROR, "%s %s\n", handle, q);
-               aclose(data_socket);
-               amfree(q);
-               break;
-           }
-           expected_splits = -1;
-           while(read_file(fd, handle, hostname, qdiskname, datestamp, level))
-               (void)fd;  /* Quiet lint */
-           aclose(data_socket);
-           break;
-       case FILE_WRITE:
-           /*
-            * FILE-WRITE
-            *   handle
-            *   filename
-            *   hostname
-            *   features
-            *   diskname
-            *   level
-            *   datestamp
-            *   splitsize
-            */
-           mode = MODE_FILE_WRITE;
-           cmdargs.argc++;                     /* true count of args */
-           a = 2;
-           if (a >= cmdargs.argc) {
-               error("error [taper FILE-WRITE: not enough args: handle]");
-               /*NOTREACHED*/
-           }
-           handle = newstralloc(handle, cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper FILE-WRITE: not enough args: filename]");
-               /*NOTREACHED*/
-           }
-           qfilename = newstralloc(qfilename, cmdargs.argv[a++]);
-           if (filename != NULL)
-               amfree(filename);
-           filename = unquote_string(qfilename);
-           if (a >= cmdargs.argc) {
-               error("error [taper FILE-WRITE: not enough args: hostname]");
-               /*NOTREACHED*/
-           }
-           hostname = newstralloc(hostname, cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper FILE-WRITE: not enough args: features]");
-               /*NOTREACHED*/
-           }
-           am_release_feature_set(their_features);
-           their_features = am_string_to_feature(cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper FILE-WRITE: not enough args: diskname]");
-               /*NOTREACHED*/
-           }
-           qdiskname = newstralloc(qdiskname, cmdargs.argv[a++]);
-           if (diskname != NULL)
-               amfree(diskname);
-           diskname = unquote_string(qdiskname);
-           if (a >= cmdargs.argc) {
-               error("error [taper FILE-WRITE: not enough args: level]");
-               /*NOTREACHED*/
-           }
-           level = atoi(cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper FILE-WRITE: not enough args: datestamp]");
-               /*NOTREACHED*/
-           }
-           datestamp = newstralloc(datestamp, cmdargs.argv[a++]);
-           if (a >= cmdargs.argc) {
-               error("error [taper FILE-WRITE: not enough args: splitsize]");
-               /*NOTREACHED*/
-           }
-           splitsize = OFF_T_ATOI(cmdargs.argv[a++]);
-           if (a != cmdargs.argc) {
-               error("error [taper file_reader_side FILE-WRITE: too many args: %d != %d]",
-                     cmdargs.argc, a);
-               /*NOTREACHED*/
-           }
-           if (holdfile_name != NULL) {
-               filename = newstralloc(filename, holdfile_name);
-           }
-           if ((expected_splits = predict_splits(filename)) < 0) {
-               break;
-           }
-           if (stat(filename, &stat_file)!=0) {
-               q = squotef("[%s]", strerror(errno));
-               putresult(TAPE_ERROR, "%s %s\n", handle, q);
-               amfree(q);
-               break;
-           }
-           if ((fd = open(filename, O_RDONLY)) == -1) {
-               q = squotef("[%s]", strerror(errno));
-               putresult(TAPE_ERROR, "%s %s\n", handle, q);
-               amfree(q);
-               break;
-           }
-           holdfile_path = stralloc(filename);
-           holdfile_path_thischunk = stralloc(filename);
-           holdfile_offset_thischunk = (off_t)0;
-           while (read_file(fd,handle,hostname,qdiskname,datestamp,level)) {
-               if (splitsize > (off_t)0 && holdfile_path_thischunk)
-                   filename = newstralloc(filename, holdfile_path_thischunk);
-               if ((fd = open(filename, O_RDONLY)) == -1) {
-                   q = squotef("[%s]", strerror(errno));
-                   putresult(TAPE_ERROR, "%s %s\n", handle, q);
-                   amfree(q);
-                   break;
-               }
-           }
-           break;
-       case QUIT:
-           putresult(QUITTING, "\n");
-           fprintf(stderr,"taper: DONE [idle wait: %s secs]\n",
-                   walltime_str(total_wait));
-           fflush(stderr);
-           (void)syncpipe_put('Q', 0); /* tell writer we're exiting gracefully */
-           aclose(wrpipe);
-           if ((wpid = wait(NULL)) != writerpid) {
-               dbprintf(("taper: writer wait returned %u instead of %u: %s\n",
-                       (unsigned)wpid, (unsigned)writerpid, strerror(errno)));
-               fprintf(stderr,
-                       "taper: writer wait returned %u instead of %u: %s\n",
-                       (unsigned)wpid, (unsigned)writerpid, strerror(errno));
-               fflush(stderr);
-           }
-           free_split_buffer();
-           amfree(datestamp);
-           clear_tapelist();
-           amfree(taper_timestamp);
-           amfree(label);
-           amfree(errstr);
-           amfree(changer_resultstr);
-           amfree(tapedev);
-           amfree(filename);
-           amfree(conf_tapelist);
-           amfree(config_dir);
-           amfree(config_name);
-           amfree(holdfile_name);
-           malloc_size_2 = malloc_inuse(&malloc_hist_2);
-           if (malloc_size_1 != malloc_size_2) {
-               malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-           }
-           exit(0);
-           /*NOTREACHED*/
-       default:
-           if (cmdargs.argc >= 1) {
-               q = squote(cmdargs.argv[1]);
-           } else if (cmdargs.argc >= 0) {
-               q = squote(cmdargs.argv[0]);
-           } else {
-               q = stralloc("(no input?)");
-           }
-           putresult(BAD_COMMAND, "%s\n", q);
-           amfree(q);
-           break;
-       }
-     }
-     /* NOTREACHED */
- }
- void
- dumpbufs(
-     char *str1)
- {
-     int i,j;
-     long v;
-     fprintf(stderr, "%s: state", str1);
-     for (i = j = 0; i < conf_tapebufs; i = j+1) {
-       v = buftable[i].status;
-       for(j = i; j < conf_tapebufs && buftable[j].status == v; j++)
-           (void)j; /* Quiet lint */
-       j--;
-       if (i == j) {
-           fprintf(stderr, " %d:", i);
-       } else {
-           fprintf(stderr, " %d-%d:", i, j);
-       }
-       switch(v) {
-       case FULL:
-           fputc('F', stderr);
-           break;
-       case FILLING:
-           fputc('f', stderr);
-           break;
-       case EMPTY:
-           fputc('E', stderr);
-           break;
-       default:
-           fprintf(stderr, "%ld", v);
-           break;
-       }
-     }
-     fputc('\n', stderr);
-     fflush(stderr);
- }
- void
- dumpstatus(
-     buffer_t *bp)
- {
-     char pn[2];
-     char bt[NUM_STR_SIZE];
-     char status[NUM_STR_SIZE + 1];
-     char *str = NULL;
-     pn[0] = procname[0];
-     pn[1] = '\0';
-     snprintf(bt, SIZEOF(bt), "%d", (int)(bp-buftable));
-     switch(bp->status) {
-     case FULL:
-       snprintf(status, SIZEOF(status), "F" SIZE_T_FMT,
-               (SIZE_T_FMT_TYPE)bp->size);
-       break;
-     case FILLING:
-       snprintf(status, SIZEOF(status), "f");
-       break;
-     case EMPTY:
-       snprintf(status, SIZEOF(status), "E");
-       break;
-     default:
-       snprintf(status, SIZEOF(status), "%ld", bp->status);
-       break;
-     }
-     str = vstralloc("taper: ", pn, ": [buf ", bt, ":=", status, "]", NULL);
-     dumpbufs(str);
-     amfree(str);
- }
- /*
-   Handle moving to the next chunk of holding file, if any.  Returns -1 for
-   errors, 0 if there's no more file, or a positive integer for the amount of
-   stuff read that'll go into 'rc' (XXX That's fugly, maybe that should just
-   be another global.  What is rc anyway, 'read count?' I keep thinking it
-   should be 'return code')
- */
- ssize_t
- get_next_holding_file(
-     int fd,
-     buffer_t *bp,
-     char **strclosing,
-     size_t rc)
- {
-     int save_fd;
-     ssize_t rc1;
-     struct stat stat_file;
-     ssize_t ret = -1;
-     
-     save_fd = fd;
-     close(fd);
-     
-     /* see if we're fresh out of file */
-     if (file.cont_filename[0] == '\0') {
-       err = 0;
-       ret = 0;
-     } else if (stat(file.cont_filename, &stat_file) != 0) {
-       err = errno;
-       ret = -1;
-       *strclosing = newvstralloc(*strclosing, "can't stat: ",
-                                  file.cont_filename, NULL);
-     } else if ((fd = open(file.cont_filename,O_RDONLY)) == -1) {
-       err = errno;
-       ret = -1;
-       *strclosing = newvstralloc(*strclosing, "can't open: ",
-                                  file.cont_filename, NULL);
-     } else if ((fd != save_fd) && dup2(fd, save_fd) == -1) {
-       err = errno;
-       ret = -1;
-       *strclosing = newvstralloc(*strclosing, "can't dup2: ",
-                                  file.cont_filename, NULL);
-     } else {
-       buffer_t bp1;
-       char *quoted;
-       holdfile_path = stralloc(file.cont_filename);
-       quoted = quote_string(holdfile_path);
-       fprintf(stderr, "taper: r: switching to next holding chunk '%s'\n",
-               quoted); 
-       amfree(quoted);
-       num_holdfile_chunks++;
-       
-       bp1.status = EMPTY;
-       bp1.size = DISK_BLOCK_BYTES;
-       bp1.buffer = alloc(DISK_BLOCK_BYTES);
-       
-       if (fd != save_fd) {
-           close(fd);
-           fd = save_fd;
-       }
-       
-       rc1 = taper_fill_buffer(fd, &bp1, DISK_BLOCK_BYTES);
-       if (rc1 <= 0) {
-           amfree(bp1.buffer);
-           err = (rc1 < 0) ? errno : 0;
-           ret = -1;
-           *strclosing = newvstralloc(*strclosing,
-                                      "Can't read header: ",
-                                      file.cont_filename,
-                                      NULL);
-       } else {
-           parse_file_header(bp1.buffer, &file, (size_t)rc1);
-           
-           amfree(bp1.buffer);
-           bp1.buffer = bp->buffer + rc;
-           
-           rc1 = taper_fill_buffer(fd, &bp1, (size_t)tt_blocksize - rc);
-           if (rc1 <= 0) {
-               err = (rc1 < 0) ? errno : 0;
-               ret = -1;
-               if (rc1 < 0) {
-                   *strclosing = newvstralloc(*strclosing,
-                                              "Can't read data: ",
-                                              file.cont_filename,
-                                              NULL);
-               }
-           } else {
-               ret = rc1;
-               num_holdfiles++;
-           }
-       }
-     }
-     return(ret);
- }
- int
- read_file(
-     int               fd,
-     char *    handle,
-     char *    hostname,
-     char *    qdiskname,
-     char *    datestamp,
-     int               level)
- {
-     buffer_t *bp;
-     int tok;
-     ssize_t rc;
- #ifdef ASSERTIONS
-     int opening;
- #endif
-     int closing, bufnum, need_closing, nexting;
-     off_t filesize;
-     times_t runtime;
-     char *strclosing = NULL;
-     char seekerrstr[STR_SIZE];
-     char *str;
-     int header_written = 0;
-     size_t buflen;
-     dumpfile_t first_file;
-     dumpfile_t cur_holdfile;
-     off_t kbytesread = (off_t)0;
-     int header_read = 0;
-     char *cur_filename = NULL;
-     int retry_from_splitbuf = 0;
-     char *splitbuf_rd_ptr = NULL;
-     char *q = NULL;
- #ifdef HAVE_LIBVTBLC
-     static char desc[45];
-     static char vol_date[20];
-     static char vol_label[45];
- #endif /* HAVE_LIBVTBLC */
-     /* initialize */
-     memset(&first_file, 0, SIZEOF(first_file));
-     memset(&cur_holdfile, 0, SIZEOF(cur_holdfile));
-     filesize = (off_t)0;
-     closing = 0;
-     need_closing = 0;
-     nexting = 0;
-     err = 0;
-     /* don't break this if we're still on the same file as a previous init */
-     if (cur_span_chunkstart <= (off_t)0) {
-       fh_init(&file);
-       header_read = 0;
-     } else if(mode == MODE_FILE_WRITE){
-       memcpy(&file, save_holdfile, SIZEOF(dumpfile_t));
-       memcpy(&cur_holdfile, save_holdfile, SIZEOF(dumpfile_t));
-     }
-     taper_debug(1, ("taper: r: start file\n"));
-     for (bp = buftable; bp < buftable + conf_tapebufs; bp++) {
-       bp->status = EMPTY;
-     }
-     bp = buftable;
-     if (interactive || debug_taper >= 1)
-       dumpstatus(bp);
-     if ((cur_span_chunkstart >= (off_t)0) && (splitsize > (off_t)0)) {
-         /* We're supposed to start at some later part of the file, not read the
-          whole thing. "Seek" forward to where we want to be. */
-       if (label)
-           putresult(SPLIT_CONTINUE, "%s %s\n", handle, label);
-         if ((mode == MODE_FILE_WRITE) && (cur_span_chunkstart > (off_t)0)) {
-           char *quoted = quote_string(holdfile_path_thischunk);
-           fprintf(stderr, "taper: r: seeking %s to " OFF_T_FMT " kb\n",
-                           quoted,
-                           (OFF_T_FMT_TYPE)holdfile_offset_thischunk);
-           fflush(stderr);
-           if (holdfile_offset_thischunk > maxseek) {
-               snprintf(seekerrstr, SIZEOF(seekerrstr), "Can't seek by "
-                       OFF_T_FMT " kb (compiled for %d-bit file offsets), "
-                       "recompile with large file support or "
-                       "set holdingdisk chunksize to <" OFF_T_FMT " Mb",
-                       (OFF_T_FMT_TYPE)holdfile_offset_thischunk,
-                       (int)(sizeof(off_t) * 8),
-                       (OFF_T_FMT_TYPE)(maxseek/(off_t)1024));
-               log_add(L_ERROR, "%s", seekerrstr);
-               fprintf(stderr, "taper: r: FATAL: %s\n", seekerrstr);
-               fflush(stderr);
-               if (syncpipe_put('X', 0) == -1) {
-                       put_syncpipe_fault_result(handle);
-               }
-               amfree(quoted);
-               return -1;
-           }
-           if (lseek(fd, holdfile_offset_thischunk*(off_t)1024, SEEK_SET) == (off_t)-1) {
-               fprintf(stderr, "taper: r: FATAL: seek_holdfile lseek error "
-                       "while seeking into %s by "
-                       OFF_T_FMT "kb: %s\n", quoted,
-                       (OFF_T_FMT_TYPE)holdfile_offset_thischunk,
-                       strerror(errno));
-               fflush(stderr);
-               if (syncpipe_put('X', 0) == -1) {
-                       put_syncpipe_fault_result(handle);
-               }
-               amfree(quoted);
-               return -1;
-           }
-           amfree(quoted);
-         } else if (mode == MODE_PORT_WRITE) {
-           fprintf(stderr, "taper: r: re-reading split dump piece from buffer\n");
-           fflush(stderr);
-           retry_from_splitbuf = 1;
-           splitbuf_rd_ptr = splitbuf;
-           if (splitbuf_rd_ptr >= splitbuf_wr_ptr)
-               retry_from_splitbuf = 0;
-         }
-         if (cur_span_chunkstart > (off_t)0)
-           header_read = 1; /* really initialized in prior run */
-     }
-     /* tell writer to open tape */
- #ifdef ASSERTIONS
-     opening = 1;
- #endif
-     if (syncpipe_put('O', 0) == -1) {
-       put_syncpipe_fault_result(handle);
-       return -1;
-     }
-     if (syncpipe_putstr(datestamp) == -1) {
-       put_syncpipe_fault_result(handle);
-       return -1;
-     }
-     if (syncpipe_putstr(hostname) == -1) {
-       put_syncpipe_fault_result(handle);
-       return -1;
-     }
-     if (syncpipe_putstr(qdiskname) == -1) {
-       put_syncpipe_fault_result(handle);
-       return -1;
-     }
-     if (syncpipe_putint(level) == -1) {
-       put_syncpipe_fault_result(handle);
-       return -1;
-     }
-     startclock();
-     
-     /* read file in loop */
-     
-     while (1) {
-       if ((tok = syncpipe_get(&bufnum)) == -1) {
-           put_syncpipe_fault_result(handle);
-           return -1;
-       }
-       switch(tok) {
-       case 'O':
- #ifdef ASSERTIONS
-           assert(opening);
-           opening = 0;
- #endif
-           err = 0;
-           break;
-           
-       case 'R':
-           taper_debug(1, ("taper: r: got R%d\n", bufnum));
-           
-           if (need_closing) {
-               if (syncpipe_put('C', 0) == -1) {
-                   put_syncpipe_fault_result(handle);
-                   return (-1);
-               }
-               closing = 1;
-               need_closing = 0;
-               break;
-           }
-           
-           if (closing)
-               break;  /* ignore extra read tokens */
-           
- #ifdef ASSERTIONS
-           assert(!opening);
- #endif
-           if(bp->status != EMPTY || bufnum != (int)(bp - buftable)) {
-               /* XXX this SHOULD NOT HAPPEN.  Famous last words. */
-               fprintf(stderr,"taper: panic: buffer mismatch at ofs "
-                       OFF_T_FMT ":\n", (OFF_T_FMT_TYPE)filesize);
-               if(bufnum != (int)(bp - buftable)) {
-                   fprintf(stderr, "    my buf %d but writer buf %d\n",
-                           (int)(bp-buftable), bufnum);
-               } else {
-                   fprintf(stderr,"buf %d state %s (%ld) instead of EMPTY\n",
-                           (int)(bp-buftable),
-                           bp->status == FILLING? "FILLING" :
-                           bp->status == FULL? "FULL" : "EMPTY!?!?",
-                           (long)bp->status);
-               }
-               dumpbufs("taper");
-               sleep(1);
-               dumpbufs("taper: after 1 sec");
-               if (bp->status == EMPTY)
-                   fprintf(stderr, "taper: result now correct!\n");
-               fflush(stderr);
-               
-               errstr = newstralloc(errstr,
-                                    "[fatal buffer mismanagement bug]");
-               q = squote(errstr);
-               putresult(TRYAGAIN, "%s %s\n", handle, q);
-               cur_span_chunkstart = (off_t)0;
-               amfree(q);
-               log_add(L_INFO, "retrying %s:%s.%d on new tape due to: %s",
-                       hostname, qdiskname, level, errstr);
-               closing = 1;
-               if (syncpipe_put('X', 0) == -1) {/* X == buffer snafu, bail */
-                   put_syncpipe_fault_result(handle);
-                   return (-1);
-               }
-               do {
-                   if ((tok = syncpipe_get(&bufnum)) == -1) {
-                       put_syncpipe_fault_result(handle);
-                       return (-1);
-                   }
-               } while (tok != 'x');
-               aclose(fd);
-               return -1;
-           } /* end 'if (bf->status != EMPTY || bufnum != (int)(bp-buftable))' */
-           bp->status = FILLING;
-           buflen = header_read ? (size_t)tt_blocksize : DISK_BLOCK_BYTES;
-           if (interactive || debug_taper >= 1)
-               dumpstatus(bp);
-           if (header_written == 0 &&
-                       (header_read == 1 || cur_span_chunkstart > (off_t)0)) {
-               /* for split dumpfiles, modify headers for the second - nth
-                  pieces that signify that they're continuations of the last
-                  normal one */
-               char *cont_filename;
-               file.type = F_SPLIT_DUMPFILE;
-               file.partnum = num_splits + 1;
-               file.totalparts = expected_splits;
-                 cont_filename = stralloc(file.cont_filename);
-               file.cont_filename[0] = '\0';
-               build_header(bp->buffer, &file, tt_blocksize);
-   
-               if (cont_filename[0] != '\0') {
-                 file.type = F_CONT_DUMPFILE;
-                    strncpy(file.cont_filename, cont_filename,
-                            SIZEOF(file.cont_filename));
-                       }
-               memcpy(&cur_holdfile, &file, SIZEOF(dumpfile_t));
-   
-               if (interactive || debug_taper >= 1)
-                   dumpstatus(bp);
-               bp->size = (ssize_t)tt_blocksize;
-               rc = (ssize_t)tt_blocksize;
-               header_written = 1;
-               amfree(cont_filename);
-           } else if (retry_from_splitbuf) {
-               /* quietly pull dump data from our in-memory cache, and the
-                  writer side need never know the wiser */
-               memcpy(bp->buffer, splitbuf_rd_ptr, tt_blocksize);
-               bp->size = (ssize_t)tt_blocksize;
-               rc = (ssize_t)tt_blocksize;
-  
-               splitbuf_rd_ptr += tt_blocksize;
-               if (splitbuf_rd_ptr >= splitbuf_wr_ptr)
-                   retry_from_splitbuf = 0;
-           } else if ((rc = taper_fill_buffer(fd, bp, buflen)) < 0) {
-               err = errno;
-               closing = 1;
-               strclosing = newvstralloc(strclosing,"Can't read data: ",
-                                         NULL);
-               if (syncpipe_put('C', 0) == -1) {
-                   put_syncpipe_fault_result(handle);
-                   return (-1);
-               }
-           }
-   
-           if (!closing) {
-               if (rc < (ssize_t)buflen) { /* switch to next holding file */
-                   ssize_t ret;
-                   if (file.cont_filename[0] != '\0') {
-                       cur_filename = newvstralloc(cur_filename, file.cont_filename, NULL);
-                   }
-                   ret = get_next_holding_file(fd, bp, &strclosing, (size_t)rc);
-                   if (ret <= 0) {
-                       need_closing = 1;
-                   } else {
-                       memcpy(&cur_holdfile, &file, SIZEOF(dumpfile_t));
-                       rc += ret;
-                       bp->size = rc;
-                   }
-               }
-               if (rc > 0) {
-                   bp->status = FULL;
-                   /* rebuild the header block, which might have CONT junk */
-                   if (header_read == 0) {
-                       char *cont_filename;
-                       /* write the "real" filename if the holding-file
-                          is a partial one */
-                       parse_file_header(bp->buffer, &file, (size_t)rc);
-                       parse_file_header(bp->buffer, &first_file, (size_t)rc);
-                       cont_filename = stralloc(file.cont_filename);
-                       file.cont_filename[0] = '\0';
-                       if (splitsize > (off_t)0) {
-                           file.type = F_SPLIT_DUMPFILE;
-                           file.partnum = 1;
-                           file.totalparts = expected_splits;
-                       }
-                       file.blocksize = tt_blocksize;
-                       build_header(bp->buffer, &file, tt_blocksize);
-  
-                       file.type = F_CONT_DUMPFILE;
-  
-                       /* add CONT_FILENAME back to in-memory header */
-                       strncpy(file.cont_filename, cont_filename, 
-                               SIZEOF(file.cont_filename));
-                       if (interactive || debug_taper >= 1)
-                           dumpstatus(bp);
-                       bp->size = (ssize_t)tt_blocksize; /* output a full tape block */
-                       /* save the header, we'll need it if we jump tapes */
-                       memcpy(&cur_holdfile, &file, SIZEOF(dumpfile_t));
-                       header_read = 1;
-                       header_written = 1;
-                       amfree(cont_filename);
-                   } else {
-                       filesize = kbytesread;
-                   }
-                   taper_debug(1, ("taper: r: put W%d\n",
-                                   (int)(bp-buftable)));
-                   if (syncpipe_put('W', (int)(bp-buftable)) == -1) {
-                       put_syncpipe_fault_result(handle);
-                       return (-1);
-                   }
-                   bp = nextbuf(bp);
-               }
-               if (((kbytesread + (off_t)(DISK_BLOCK_BYTES/1024)) >= splitsize)
-                       && (splitsize > (off_t)0) && !need_closing) {
-                   if (mode == MODE_PORT_WRITE) {
-                       splitbuf_wr_ptr = splitbuf;
-                       splitbuf_rd_ptr = splitbuf;
-                       memset(splitbuf, 0, SIZEOF(splitbuf));
-                       retry_from_splitbuf = 0;
-                   }
-                   fprintf(stderr,"taper: r: end %s.%s.%s.%d part %d, "
-                               "splitting chunk that started at "
-                               OFF_T_FMT "kb after " OFF_T_FMT
-                               "kb (next chunk will start at "
-                               OFF_T_FMT "kb)\n",
-                               hostname, qdiskname, datestamp, level,
-                               num_splits+1,
-                               (OFF_T_FMT_TYPE)cur_span_chunkstart,
-                               (OFF_T_FMT_TYPE)kbytesread,
-                               (OFF_T_FMT_TYPE)(cur_span_chunkstart+kbytesread));
-                   fflush(stderr);
-                   nexting = 1;
-                   need_closing = 1;
-               } /* end '(kbytesread >= splitsize && splitsize > 0)' */
-               if (need_closing && rc <= 0) {
-                   if (syncpipe_put('C', 0) == -1) {
-                       put_syncpipe_fault_result(handle);
-                       return (-1);
-                   }
-                   need_closing = 0;
-                   closing = 1;
-               }
-                 kbytesread += (off_t)(rc / 1024);
-           } /* end the 'if (!closing)' (successful buffer fill) */
-           break;
-       case 'T':
-       case 'E':
-       case 'H':
-           if (syncpipe_put('e', 0) == -1) {   /* ACK error */
-               put_syncpipe_fault_result(handle);
-               return (-1);
-           }
-           if ((str = syncpipe_getstr()) == NULL) {
-               put_syncpipe_fault_result(handle);
-               return (-1);
-           }
-           
-           errstr = newvstralloc(errstr, "[", str, "]", NULL);
-           amfree(str);
-           q = squote(errstr);
-           if (tok == 'T') {
-               if (splitsize > (off_t)0) {
-                   /* we'll be restarting this chunk on the next tape */
-                   if (mode == MODE_FILE_WRITE) {
-                     aclose(fd);
-                   }
-                   putresult(SPLIT_NEEDNEXT, "%s " OFF_T_FMT "\n", handle,
-                               (OFF_T_FMT_TYPE)cur_span_chunkstart);
-                   log_add(L_INFO, "continuing %s:%s.%d on new tape from "
-                               OFF_T_FMT "kb mark: %s",
-                               hostname, qdiskname, level,
-                               (OFF_T_FMT_TYPE)cur_span_chunkstart, errstr);
-                   return 1;
-               } else {
-                   /* restart the entire dump (failure propagates to driver) */
-                   aclose(fd);
-                   putresult(TRYAGAIN, "%s %s\n", handle, q);
-                   cur_span_chunkstart = (off_t)0;
-                   log_add(L_INFO, "retrying %s:%s.%d on new tape due to: %s",
-                           hostname, qdiskname, level, errstr);
-               }
-           } else {
-               aclose(fd);
-               putresult(TAPE_ERROR, "%s %s\n", handle, q);
-               log_add(L_FAIL, "%s %s %s %d [out of tape]",
-                       hostname, qdiskname, datestamp, level);
-               log_add(L_ERROR,"no-tape [%s]", "No more writable valid tape found");
-           }
-           amfree(q);
-           return 0;
-       case 'C':
- #ifdef ASSERTIONS
-           assert(!opening);
- #endif
-           assert(closing);
-           if (nexting) {
-             cur_span_chunkstart += kbytesread; /* XXX possibly wrong */
-             if (cur_filename)
-               holdfile_name = newvstralloc(holdfile_name, cur_filename,
-                                            NULL);
-             else
-               amfree(holdfile_name);
-             kbytesread = (off_t)0;
-             amfree(cur_filename);
-           }
-           if ((str = syncpipe_getstr()) == NULL) {
-               put_syncpipe_fault_result(handle);
-               return (-1);
-           }
-           label = newstralloc(label, str ? str : "(null)");
-           amfree(str);
-           if ((str = syncpipe_getstr()) == NULL) {
-               put_syncpipe_fault_result(handle);
-               return (-1);
-           }
-           filenum = atoi(str ? str : "-9876");        /* ??? */
-           amfree(str);
-           fprintf(stderr, "taper: reader-side: got label %s filenum %d\n",
-                   label, filenum);
-           fflush(stderr);
-           /* we'll need that file descriptor if we're gonna write more */
-           if (!nexting) {
-               aclose(fd);
-           }
-           runtime = stopclock();
-           if (nexting)
-               startclock();
-           if (err) {
-               if (strclosing) {
-                   errstr = newvstralloc(errstr,
-                                         "[input: ", strclosing, ": ",
-                                         strerror(err), "]", NULL);
-                   amfree(strclosing);
-               } else
-                   errstr = newvstralloc(errstr,
-                                         "[input: ", strerror(err), "]",
-                                         NULL);
-               q = squote(errstr);
-               putresult(TAPE_ERROR, "%s %s\n", handle, q);
-               amfree(q);
-               if (splitsize != (off_t)0) {
-                   log_add(L_FAIL, "%s %s %s.%d %d %s", hostname, qdiskname,
-                               datestamp, num_splits, level, errstr);
-               } else {
-                   log_add(L_FAIL, "%s %s %s %d %s",
-                               hostname, qdiskname, datestamp, level, errstr);
-               }
-               if ((str = syncpipe_getstr()) == NULL) {        /* reap stats */
-                   put_syncpipe_fault_result(handle);
-                   return (-1);
-               }
-               amfree(str);
-                 amfree(errstr);
-           } else {
-               char kb_str[NUM_STR_SIZE];
-               char kps_str[NUM_STR_SIZE];
-               double rt;
-               rt = (double)(runtime.r.tv_sec) +
-                    ((double)(runtime.r.tv_usec) / 1000000.0);
-               curdump_rt = timesadd(runtime, curdump_rt);
-               snprintf(kb_str, SIZEOF(kb_str), OFF_T_FMT,
-                       (OFF_T_FMT_TYPE)filesize);
-               snprintf(kps_str, SIZEOF(kps_str), "%3.1lf",
-                                 (isnormal(rt) ? (double)filesize / rt : 0.0));
-               if ((str = syncpipe_getstr()) == NULL) {
-                   put_syncpipe_fault_result(handle);
-                   return (-1);
-               }
-               errstr = newvstralloc(errstr,
-                                     "[sec ", walltime_str(runtime),
-                                     " kb ", kb_str,
-                                     " kps ", kps_str,
-                                     " ", str,
-                                     "]",
-                                     NULL);
-               if (splitsize == (off_t)0) { /* Ordinary dump */
-                   q = squote(errstr);
- /*@i@*/                   if (first_file.is_partial) {
-                       putresult(PARTIAL, "%s %s %d %s\n",
-                                 handle, label, filenum, q);
-                       log_add(L_PARTIAL, "%s %s %s %d %s",
-                               hostname, qdiskname, datestamp, level, errstr);
-                   } else {
-                       putresult(DONE, "%s %s %d %s\n",
-                                 handle, label, filenum, q);
-                       log_add(L_SUCCESS, "%s %s %s %d %s",
-                               hostname, qdiskname, datestamp, level, errstr);
-                   }
-                   amfree(q);
-               } else { /* Chunked dump */
-                   num_splits++;
-                   if (mode == MODE_FILE_WRITE) {
-                       holdfile_path_thischunk = stralloc(holdfile_path);
-                       holdfile_offset_thischunk = (lseek(fd, (off_t)0, SEEK_CUR))/(off_t)1024;
-                       if(!save_holdfile){
-                           save_holdfile = alloc(SIZEOF(dumpfile_t));
-                       }
-                       memcpy(save_holdfile, &cur_holdfile,SIZEOF(dumpfile_t));
-                   }
-                   log_add(L_CHUNK, "%s %s %s %d %d %s", hostname, qdiskname,
-                           datestamp, num_splits, level, errstr);
-                   if (!nexting) { /* split dump complete */
-                       rt = (double)(curdump_rt.r.tv_sec) +
-                            ((double)(curdump_rt.r.tv_usec) / 1000000.0);
-                       snprintf(kb_str, SIZEOF(kb_str), OFF_T_FMT,
-                               (OFF_T_FMT_TYPE)(filesize + cur_span_chunkstart));
-                       snprintf(kps_str, SIZEOF(kps_str), "%3.1lf",
-                           isnormal(rt) ?
-                           ((double)(filesize+cur_span_chunkstart)) / rt :
-                           0.0);
-                         amfree(errstr);
-                       errstr = newvstralloc(errstr,
-                                             "[sec ", walltime_str(curdump_rt),
-                                             " kb ", kb_str,
-                                             " kps ", kps_str,
-                                             " ", str,
-                                             "]",
-                                             NULL);
-                         q = squote(errstr);
-                       putresult(DONE, "%s %s %d %s\n", handle, label,
-                                 filenum, q);
-                       log_add(L_CHUNKSUCCESS, "%s %s %s %d %s",
-                               hostname, qdiskname, datestamp, level, errstr);
-                       amfree(save_holdfile);
-                       amfree(holdfile_path_thischunk);
-                         amfree(q);
-                   }
-               }
-               amfree(str);
-               if (!nexting) {
-                   num_splits = 0;
-                   expected_splits = 0;
-                   amfree(holdfile_name);
-                   num_holdfiles = 0;
-                   cur_span_chunkstart = (off_t)0;
-                   curdump_rt = times_zero;
-               }
-               amfree(errstr);
-               
- #ifdef HAVE_LIBVTBLC
-               /* 
-                *  We have 44 characters available for the label string:
-                *  use max 20 characters for hostname
-                *      max 20 characters for diskname 
-                *             (it could contain a samba share or dos path)
-                *           2 for level
-                */
-               memset(desc, '\0', 45);
-               strncpy(desc, hostname, 20);
-               if ((len = strlen(hostname)) <= 20) {
-                   memset(desc + len, ' ', 1);
-                   offset = len + 1;
-               } else {
-                   memset(desc + 20, ' ', 1);
-                   offset = 21;
-               }
-               strncpy(desc + offset, qdiskname, 20);
-               if ((len = strlen(qdiskname)) <= 20) {
-                   memset(desc + offset + len, ' ', 1);
-                   offset = offset + len + 1;
-               } else {
-                   memset(desc + offset + 20, ' ', 1);
-                   offset = offset + 21;
-               }
-               sprintf(desc + offset, "%i", level);
-               strncpy(vol_label, desc, 44);
-               fprintf(stderr, "taper: added vtbl label string %i: \"%s\"\n",
-                       filenum, vol_label);
-               fflush(stderr);
-               /* pass label string on to tape writer */
-               if (syncpipe_put('L', filenum) == -1) {
-                   put_syncpipe_fault_result(handle);
-                   return (-1);
-               }
-               if (syncpipe_putstr(vol_label) == -1) {
-                   put_syncpipe_fault_result(handle);
-                   return (-1);
-               }
-               /* 
-                * reformat datestamp for later use with set_date from vtblc 
-                */
-               strptime(datestamp, "%Y%m%d", &backup_time);
-               strftime(vol_date, 20, "%T %D", &backup_time);
-               fprintf(stderr, 
-                       "taper: reformatted vtbl date string: \"%s\"->\"%s\"\n",
-                       datestamp,
-                       vol_date);
-               /* pass date string on to tape writer */                
-               if (syncpipe_put('D', filenum) == -1) {
-                   put_syncpipe_fault_result(handle);
-                   return (-1);
-               }
-               if (syncpipe_putstr(vol_date) == -1) {
-                   put_syncpipe_fault_result(handle);
-                   return (-1);
-               }
- #endif /* HAVE_LIBVTBLC */
-           }
-           /* reset stuff that assumes we're on a new file */
-           if (!nexting)
-               return 0;
- #ifdef ASSERTIONS
-           opening = 1;
- #endif
-           nexting = 0;
-           closing = 0;
-           filesize = (off_t)0;
-           if (syncpipe_put('O', 0) == -1) {
-               put_syncpipe_fault_result(handle);
-               return -1;
-           }
-           if (syncpipe_putstr(datestamp) == -1) {
-               put_syncpipe_fault_result(handle);
-               return -1;
-           }
-           if (syncpipe_putstr(hostname) == -1) {
-               put_syncpipe_fault_result(handle);
-               return -1;
-           }
-           if (syncpipe_putstr(qdiskname) == -1) {
-               put_syncpipe_fault_result(handle);
-               return -1;
-           }
-           if (syncpipe_putint(level) == -1) {
-               put_syncpipe_fault_result(handle);
-               return -1;
-           }
-           for (bp = buftable; bp < buftable + conf_tapebufs; bp++) {
-               bp->status = EMPTY;
-           }
-           bp = buftable;
-           header_written = 0;
-           break;
-       case 'X':
-           /*
-            * Pipe read error: Communications is severed at least
-            * back to us.  We send a blind 'Q' (quit) and we don't
-            * wait for a response...
-            */
-           syncpipe_put('Q', 0);                       /* ACK error */
-           fprintf(stderr, "taper: communications pipe from reader severed\n");
-           return -1;
-       default:
-           q = squotef("[Taper syncpipe protocol error]");
-           putresult(TAPE_ERROR, "%s %s\n", handle, q);
-           log_add(L_ERROR, "tape-error %s %s", handle, q);
-           amfree(q);
-           return -1;
-       }
-     }
-     return 0;
- }
- ssize_t
- taper_fill_buffer(
-     int fd,
-     buffer_t *bp,
-     size_t buflen)
- {
-     char *curptr;
-     ssize_t cnt;
-     curptr = bp->buffer;
-     cnt = fullread(fd, curptr, buflen);
-     switch(cnt) {
-     case 0:   /* eof */
-       if (interactive)
-           fputs("r0", stderr);
-       bp->size = 0;
-       return (ssize_t)0;
-       /*NOTREACHED*/
-     case -1:  /* error on read, punt */
-       if (interactive)
-           fputs("rE", stderr);
-       bp->size = 0;
-       return -1;
-       /*NOTREACHED*/
-     default:
-       if ((mode == MODE_PORT_WRITE) && (splitsize > (off_t)0)) {
-           memcpy(splitbuf_wr_ptr, curptr, (size_t)cnt);
-           splitbuf_wr_ptr += cnt;
-       }
-       bp->size = cnt;
-       break;
-     }
-     if (interactive)
-       fputs("R", stderr);
-     return ((ssize_t)bp->size);
- }
- /* Given a dumpfile in holding, determine its size and figure out how many
-  * times we'd have to split it.
-  */
- int
- predict_splits(
-     char *filename)
- {
-     int splits = 0;
-     off_t total_kb = (off_t)0;
-     off_t adj_splitsize = splitsize - (off_t)(DISK_BLOCK_BYTES / 1024);
-     if (splitsize <= (off_t)0)
-       return(0);
-     if (adj_splitsize <= (off_t)0) {
-       error("Split size must be > " OFF_T_FMT "k",
-             (OFF_T_FMT_TYPE)(DISK_BLOCK_BYTES/1024));
-       /*NOTREACHED*/
-     }
-     /* should only calculuate this once, not on retries etc */
-     if (expected_splits != 0)
-       return(expected_splits);
-     total_kb = holding_file_size(filename, 1);
-     
-     if (total_kb <= (off_t)0) {
-       fprintf(stderr, "taper: r: " OFF_T_FMT
-                       " kb holding file makes no sense, setting splitsize to 0\n",
-               (OFF_T_FMT_TYPE)total_kb);
-       fflush(stderr);
-       splitsize = 0;  /* disabling split */
-       return(0);
-     }
-     fprintf(stderr, "taper: r: Total dump size should be " OFF_T_FMT
-               "kb, chunk size is " OFF_T_FMT "kb\n",
-               (OFF_T_FMT_TYPE)total_kb,
-               (OFF_T_FMT_TYPE)splitsize);
-     fflush(stderr);
-     splits = (int)(total_kb / adj_splitsize);
-     if ((splits == 0) || (total_kb % adj_splitsize))
-       splits++;
-     fprintf(stderr, "taper: r: Expecting to split into %d parts \n", splits);
-     fflush(stderr);
-     return(splits);
- }
- /*
-  * ========================================================================
-  * TAPE WRITER SIDE
-  *
-  */
- times_t idlewait, rdwait, wrwait, fmwait;
- unsigned long total_writes;
- off_t total_tape_used;
- int total_tape_fm;
- void write_file(void);
- int write_buffer(buffer_t *bp);
- void
- tape_writer_side(
-     int getp,
-     int putp)
- {
-     int tok;
-     int tape_started;
-     char *str;
-     char *hostname;
-     char *diskname;
-     char *datestamp;
-     int level;
-     int tmpint;
- #ifdef HAVE_LIBVTBLC
-     char *vol_label;
-     char *vol_date;
- #endif /* HAVE_LIBVTBLC */
-     procname = "writer";
-     syncpipe_init(getp, putp);
-     tape_started = 0;
-     idlewait = times_zero;
-     if (tapedev != NULL) {
-       tapedev = stralloc(tapedev);
-     }
-     while (1) {
-       startclock();
-       if ((tok = syncpipe_get(&tmpint)) == -1) {
-           error("writer: Syncpipe failure before start");
-           /*NOTREACHED*/
-       }
-       idlewait = timesadd(idlewait, stopclock());
-       if (tok != 'S' && tok != 'Q' && !tape_started) {
-           error("writer: token '%c' before start", tok);
-           /*NOTREACHED*/
-       }
-       switch(tok) {
-       case 'H':               /* Reader read pipe side is down */
-           dbprintf(("writer: Communications with reader is down"));
-           error("writer: Communications with reader is down");
-           /*NOTREACHED*/
-           
-       case 'S':               /* start-tape */
-           if (tape_started) {
-               error("writer: multiple start requests");
-               /*NOTREACHED*/
-           }
-           if ((str = syncpipe_getstr()) == NULL) {
-               error("writer: Syncpipe failure");
-               /*NOTREACHED*/
-           }
-           if (!first_tape(str ? str : "bad-datestamp")) {
-               if (tape_fd >= 0) {
-                   tapefd_close(tape_fd);
-                   tape_fd = -1;
-               }
-               if (syncpipe_put('E', 0) == -1) {
-                   error("writer: Syncpipe failure passing exit code");
-                   /*NOTREACHED*/
-               }
-               if (syncpipe_putstr(errstr) == -1) {
-                   error("writer: Syncpipe failure passing exit string");
-                   /*NOTREACHED*/
-               }
-               /* wait for reader to acknowledge error */
-               do {
-                   if ((tok = syncpipe_get(&tmpint)) == -1) {
-                       error("writer: Syncpipe failure waiting for error ack");
-                       /*NOTREACHED*/
-                   }
-                   if (tok != 'e') {
-                       error("writer: got '%c' unexpectedly after error", tok);
-                       /*NOTREACHED*/
-                   }
-               } while (tok != 'e');
-           } else {
-               if (syncpipe_put('S', 0) == -1) {
-                   error("writer: syncpipe failure while starting tape");
-                   /*NOTREACHED*/
-               }
-               tape_started = 1;
-           }
-           amfree(str);
-           break;
+ #include "stream.h"
+ #include "tapefile.h"
+ #include "taperscan.h"
+ #include "taper-source.h"
+ #include "timestamp.h"
+ #include "token.h"
+ #include "version.h"
  
-       case 'O':               /* open-output */
-           if ((datestamp = syncpipe_getstr()) == NULL) {
-               error("writer: Syncpipe failure during open");
-               /*NOTREACHED*/
-           }
-           tapefd_setinfo_datestamp(tape_fd, datestamp);
-           amfree(datestamp);
+ /* FIXME: This should not be here. */
+ #define CONNECT_TIMEOUT (2*60)
+ /* Use this instead of global variables, so that we are reentrant. */
+ typedef struct {
+     Device * device;
+     char * driver_start_time;
+     int    cur_tape;
+     char * next_tape_label;
+     char * next_tape_device;
+     taper_scan_tracker_t * taper_scan_tracker;
+ } taper_state_t;
+ typedef struct {
+     char * handle;
+     char * hostname;
+     char * diskname;
+     int level;
+     char * timestamp;
+     char * id_string;
+     TaperSource * source;
+     int current_part;
+     GTimeVal total_time;
+     guint64 total_bytes;
+ } dump_info_t;
+ static gboolean label_new_tape(taper_state_t * state, dump_info_t * dump_info);
+ static void init_taper_state(taper_state_t* state) {
+     state->device = NULL;
+     state->driver_start_time = NULL;
+     state->taper_scan_tracker = taper_scan_tracker_new();
+ }
  
-           if ((hostname = syncpipe_getstr()) == NULL) {
-               error("writer: Syncpipe failure fetching hostname");
-               /*NOTREACHED*/
-           }
-           tapefd_setinfo_host(tape_fd, hostname);
-           amfree(hostname);
+ static void cleanup(taper_state_t * state) {
+     amfree(state->driver_start_time);
+     amfree(state->next_tape_label);
+     amfree(state->next_tape_device);
+     taper_scan_tracker_free(state->taper_scan_tracker);
+     if (state->device != NULL) {
+         g_object_unref(state->device);
+         state->device = NULL;
+     }
+ }
  
-           if ((diskname = syncpipe_getstr()) == NULL) {
-               error("writer: Syncpipe failure fetching diskname");
-               /*NOTREACHED*/
-           }
-           tapefd_setinfo_disk(tape_fd, diskname);
-           amfree(diskname);
-           if ((level = syncpipe_getint()) == -1) {
-               error("writer: Syncpipe failure fetching level");
-               /*NOTREACHED*/
-           }
-           tapefd_setinfo_level(tape_fd, level);
-           write_file();
-           break;
- #ifdef HAVE_LIBVTBLC
-       case 'L':               /* read vtbl label */
-           vtbl_no = tmpint;
-           if ((vol_label = syncpipe_getstr()) == NULL) {
-               error("writer: Syncpipe failure fetching vrbl label");
-               /*NOTREACHED*/
-           }
-           fprintf(stderr, "taper: read label string \"%s\" from pipe\n", 
-                   vol_label);
-           strncpy(vtbl_entry[vtbl_no].label, vol_label, 45);
-           break;
-       case 'D':               /* read vtbl date */
-           vtbl_no = tmpint;
-           if ((vol_date = syncpipe_getstr()) == NULL) {
-               error("writer: Syncpipe failure fetching vrbl date");
-               /*NOTREACHED*/
-           }
-           fprintf(stderr, "taper: read date string \"%s\" from pipe\n", 
-                   vol_date);
-           strncpy(vtbl_entry[vtbl_no].date, vol_date, 20);
-           break;
- #endif /* HAVE_LIBVTBLC */
-       case 'Q':
-           end_tape(0);        /* XXX check results of end tape ?? */
-           clear_tapelist();
-           amfree(taper_timestamp);
-           amfree(label);
-           amfree(errstr);
-           amfree(changer_resultstr);
-           amfree(tapedev);
-           amfree(conf_tapelist);
-           amfree(config_dir);
-           amfree(config_name);
-           malloc_size_2 = malloc_inuse(&malloc_hist_2);
-           if (malloc_size_1 != malloc_size_2) {
-               malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2);
-           }
-           exit(0);
-           /*NOTREACHED*/
+ static void free_dump_info(dump_info_t * info) {
+     amfree(info->handle);
+     amfree(info->hostname);
+     amfree(info->diskname);
+     amfree(info->timestamp);
+     amfree(info->id_string);
+     if (info->source != NULL) {
+         g_object_unref(info->source);
+         info->source = NULL;
+     }
+ }
  
-       default:
-           assert(0);
-       }
+ /* Validate that a command has the proper number of arguments, and
+    print a meaningful error message if not. It returns only if the
+    check is successful. */
+ static void validate_args(cmd_t cmd, struct cmdargs * args,
+                           char ** argnames) {
+     int i;
+     
+     for (i = 0; argnames[i] != NULL; i ++) {
+         if (i > args->argc) {
+             error("error [taper %s: not enough args: %s]",
+                   cmdstr[cmd], argnames[i]);
+         }
+     }
+     if (i < args->argc) {
+         error("error [taper %s: Too many args: Got %d, expected %d.]",
+               cmdstr[cmd], args->argc, i);
      }
  }
  
- void
- write_file(void)
- {
-     buffer_t *bp;
-     int full_buffers, i, bufnum;
-     int tok;
-     char number[NUM_STR_SIZE];
-     char *rdwait_str, *wrwait_str, *fmwait_str;
-     int tmpint;
+ /* Open a socket to the dumper. Returns TRUE if everything is happy, FALSE
+    otherwise. */
+ static gboolean open_read_socket(dump_info_t * info, char * split_diskbuffer,
+                              guint64 splitsize, guint64 fallback_splitsize) {
+     in_port_t port = 0;
+     int socket;
+     int fd;
+     int result;
+     struct addrinfo *res;
+     if ((result = resolve_hostname("localhost", 0, &res, NULL) != 0)) {
+         char *m;
+         char *q;
+       int save_errno = errno;
+         char *qdiskname = quote_string(info->diskname);
+         m = vstralloc("[localhost resolve failure: ",
+                       strerror(save_errno),
+                       "]",
+                       NULL);
+         q = squote(m);
+         putresult(TAPE_ERROR, "%s %s\n", info->handle, q);
+         log_add(L_FAIL, "%s %s %s %d %s",
+                 info->hostname, qdiskname, info->timestamp,
+                 info->level, q);
+         amfree(qdiskname);
+         amfree(m);
+         amfree(q);
+         return FALSE;
+     }
+     socket = stream_server(res->ai_family, &port, 0, STREAM_BUFSIZE, 0);
+     freeaddrinfo(res);
+     if (socket < 0) {
+         char *m;
+         char *q;
+       int save_errno = errno;
+         char *qdiskname = quote_string(info->diskname);
  
-     rdwait = wrwait = times_zero;
-     total_writes = 0;
+         m = vstralloc("[port create failure: ",
+                       strerror(save_errno),
+                       "]",
+                       NULL);
+         q = squote(m);
+         putresult(TAPE_ERROR, "%s %s\n", info->handle, q);
+         log_add(L_FAIL, "%s %s %s %d %s",
+                 info->hostname, qdiskname, info->timestamp,
+                 info->level, q);
+         amfree(qdiskname);
+         amfree(m);
+         amfree(q);
+         return FALSE;
+     }
  
-     bp = buftable;
-     full_buffers = 0;
-     tok = '?';
+     putresult(PORT, "%d\n", port);
  
-     taper_debug(1, ("taper: w: start file\n"));
+     fd = stream_accept(socket, CONNECT_TIMEOUT, 0, STREAM_BUFSIZE);
  
-     /*
-      * Tell the reader that the tape is open, and give it all the buffers.
-      */
-     if (syncpipe_put('O', 0) == -1) {
-       error("writer: Syncpipe failure starting write sequence");
-       /*NOTREACHED*/
-     }
-     for (i = 0; i < conf_tapebufs; i++) {
-       taper_debug(1, ("taper: w: put R%d\n", i));
-       if (syncpipe_put('R', i) == -1) {
-           error("writer: Syncpipe failure readying write buffers");
-           /*NOTREACHED*/
-       }
+     if (fd < 0) {
+         char *m, *q;
+       int save_errno = errno;
+         char *qdiskname = quote_string(info->diskname);
+         m = vstralloc("[port connect failure: ",
+                       strerror(save_errno),
+                       "]",
+                       NULL);
+         q = squote(m);
+         putresult(TAPE_ERROR, "%s %s\n", info->handle, q);
+         log_add(L_FAIL, "%s %s %s %d %s",
+                 info->hostname, qdiskname, info->timestamp,
+                 info->level, q);
+         amfree(qdiskname);
+         aclose(socket);
+         amfree(m);
+         amfree(q);
+         return FALSE;
+     } else {
+         aclose(socket);
      }
  
-     /*
-      * We write the filemark at the start of the file rather than at the end,
-      * so that it can proceed in parallel with the reader's initial filling
-      * up of the buffers.
-      */
-     startclock();
-     if (!write_filemark())
-       goto tape_error;
-     fmwait = stopclock();
-     filenum += 1;
-     do {
-       /*
-        * STOPPED MODE
-        *
-        * At the start of the file, or if the input can't keep up with the
-        * tape, we enter STOPPED mode, which waits for most of the buffers
-        * to fill up before writing to tape.  This maximizes the amount of
-        * data written in chunks to the tape drive, minimizing the number
-        * of starts/stops, which in turn saves tape and time.
-        */
-       if (interactive)
-           fputs("[WS]", stderr);
-       startclock();
-       while (full_buffers < conf_tapebufs - THRESHOLD) {
-           if ((tok = syncpipe_get(&bufnum)) == -1) {
-               error("writer: Syncpipe failure during buffer advance");
-               /*NOTREACHED*/
-           }
-           if (tok != 'W')
-               break;
-           taper_debug(1, ("taper: w: got W%d\n",bufnum));
-           full_buffers++;
-       }
-       rdwait = timesadd(rdwait, stopclock());
-       /*
-        * STARTING MODE
-        *
-        * We start output when sufficient buffers have filled up, or at
-        * end-of-file, whichever comes first.  Here we drain all the buffers
-        * that were waited on in STOPPED mode.  If more full buffers come
-        * in, then we will be STREAMING.
-        */
-       while (full_buffers) {
-           if (tt_file_pad && bp->size < (ssize_t)tt_blocksize) {
-               memset(bp->buffer+bp->size, 0, tt_blocksize - bp->size);
-               bp->size = (ssize_t)tt_blocksize;
-           }
-           if (!write_buffer(bp))
-               goto tape_error;
-           full_buffers--;
-           bp = nextbuf(bp);
-       }
-       /*
-        * STREAMING MODE
-        *
-        * With any luck, the input source is faster than the tape drive.  In
-        * this case, full buffers will appear in the circular queue faster
-        * than we can write them, so the next buffer in the queue will always
-        * be marked FULL by the time we get to it.  If so, we'll stay in
-        * STREAMING mode.
-        *
-        * On the other hand, if we catch up to the input and thus would have
-        * to wait for buffers to fill, we are then STOPPED again.
-        */
-       while (tok == 'W' && bp->status == FULL) {
-           if ((tok = syncpipe_get(&bufnum)) == -1) {
-               error("writer: Syncpipe failure advancing buffer");
-               /*NOTREACHED*/
-           }
-           if (tok == 'W') {
-               taper_debug(1, ("taper: w: got W%d\n",bufnum));
-               if(bufnum != (int)(bp - buftable)) {
-                   fprintf(stderr,
-                           "taper: tape-writer: my buf %d reader buf %d\n",
-                           (int)(bp-buftable), bufnum);
-                   fflush(stderr);
-                   if (syncpipe_put('E', 0) == -1) { 
-                       error("writer: Syncpipe failure putting error token");
-                       /*NOTREACHED*/
-                   }
-                   if (syncpipe_putstr("writer-side buffer mismatch") == -1) {
-                       error("writer: Syncpipe failure putting error messgae");
-                       /*NOTREACHED*/
-                   }
-                   goto error_ack;
-               }
-               if (tt_file_pad && bp->size < (ssize_t)tt_blocksize) {
-                   memset(bp->buffer+bp->size, 0, tt_blocksize - bp->size);
-                   bp->size = (ssize_t)tt_blocksize;
-               }
-               if (!write_buffer(bp))
-                   goto tape_error;
-               bp = nextbuf(bp);
-           } else if (tok == 'Q') {
-               return;
-           } else if (tok == 'X') {
-               goto reader_buffer_snafu;
-           } else {
-               error("writer-side not expecting token: %c", tok);
-               /*NOTREACHED*/
-           }
-       }
-     } while (tok == 'W');
+     info->source = taper_source_new(info->handle, PORT_WRITE, NULL, fd,
+                                     split_diskbuffer, splitsize,
+                                     fallback_splitsize);
+     /* FIXME: This should be handled properly. */
+     g_assert(info->source != NULL);
+     return TRUE;
+ }
  
-     /* got close signal from reader, acknowledge it */
+ typedef struct {
+     ConsumerFunctor next_consumer;
+     gpointer next_consumer_data;
+     guint64 bytes_written;
+ } CountingConsumerData;
  
-     if (tok == 'X')
-       goto reader_buffer_snafu;
+ /* A ConsumerFunctor. This consumer just passes its arguments on to a
+    second consumer, but counts the number of bytes successfully
+    written. */
+ static int counting_consumer(gpointer user_data, queue_buffer_t * buffer) {
+     int result;
+     CountingConsumerData * data = user_data;
  
-     assert(tok == 'C');
-     if (syncpipe_put('C', 0) == -1) {
-       error("writer: Syncpipe failure putting close");
-       /*NOTREACHED*/
+     result = data->next_consumer(data->next_consumer_data, buffer);
+     
+     if (result > 0) {
+         data->bytes_written += result;
      }
  
-     /* tell reader the tape and file number */
+     return result;
+ }
  
-     if (syncpipe_putstr(label) == -1) {
-       error("writer: Syncpipe failure putting label");
-       /*NOTREACHED*/
-     }
-     snprintf(number, SIZEOF(number), "%d", filenum);
-     if (syncpipe_putstr(number) == -1) {
-       error("writer: Syncpipe failure putting filenum");
-       /*NOTREACHED*/
+ static gboolean boolean_prolong(void * data) {
+     if (data == NULL) {
+         return TRUE; /* Do not interrupt. */
+     } else {
+         return *(gboolean*)data;
      }
+ }
+ /* A (simpler) wrapper around taper_scan(). */
+ static gboolean simple_taper_scan(taper_state_t * state,
+                                   gboolean* prolong, char ** error_message) {
+     char ** label = &(state->next_tape_label);
+     char ** device = &(state->next_tape_device);
+     char *timestamp = NULL;
+     int result;
+     result = taper_scan(NULL, label, &timestamp, device,
+                         state->taper_scan_tracker,
+                         CHAR_taperscan_output_callback,
+                         error_message, boolean_prolong, prolong);
+     if (prolong != NULL && !*prolong) {
+         g_fprintf(stderr, _("Cancelled taper scan.\n"));
+         return FALSE;
+     } else if (result < 0) {
+         g_fprintf(stderr, _("Failed taper scan: %s\n"), (*error_message)?(*error_message):_("(no error message)"));
+         amfree(timestamp);
+         return FALSE;
+     } else {
+         g_fprintf(stderr, _("taper: using label `%s' date `%s'\n"), *label,
+                 state->driver_start_time);
+         if (result == 3) {
+             log_add(L_INFO,
+             _("Will write new label `%s' to new (previously non-amanda) tape"),
+                     *label);
+         }
  
-     snprintf(number, SIZEOF(number), "%lu", total_writes);
-     rdwait_str = stralloc(walltime_str(rdwait));
-     wrwait_str = stralloc(walltime_str(wrwait));
-     fmwait_str = stralloc(walltime_str(fmwait));
-     errstr = newvstralloc(errstr,
-                         "{wr:",
-                         " writers ", number,
-                         " rdwait ", rdwait_str,
-                         " wrwait ", wrwait_str,
-                         " filemark ", fmwait_str,
-                         "}",
-                         NULL);
-     amfree(rdwait_str);
-     amfree(wrwait_str);
-     amfree(fmwait_str);
-     if (syncpipe_putstr(errstr) == -1) {
-       error("writer: Syncpipe failure putting '%s'", errstr);
-       /*NOTREACHED*/
      }
+     amfree(timestamp);
+     return TRUE;
+ }
  
-     /* XXX go to next tape if past tape size? */
+ typedef struct {
+     taper_state_t * state;
+     gboolean prolong; /* scan stops when this is FALSE. */
+     char *errmsg;
+ } tape_search_request_t;
  
-     return;
+ /* A GThread that runs taper_scan. */
+ static gpointer tape_search_thread(gpointer data) {
+     tape_search_request_t * request = data;
  
-  tape_error:
-     if (errstr) 
-       dbprintf(("tape_error: %s\n", errstr));
-     /* got tape error */
-     if (next_tape(1)) {
-       if (syncpipe_put('T', 0) == -1) {   /* next tape in place, try again */
-           error("writer: Syncpipe failure during tape advance");
-           /*NOTREACHED*/
-       }
+     if (request->state->next_tape_label != NULL &&
+         request->state->next_tape_device != NULL) {
+         return GINT_TO_POINTER(TRUE);
      } else {
-       if (syncpipe_put('E', 0) == -1) {   /* no more tapes, fail */
-           error("writer: Syncpipe failure during tape error");
-           /*NOTREACHED*/
-       }
-     }
-     if (syncpipe_putstr(errstr) == -1) {
-       error("writer: Syncpipe failure putting '%s'", errstr);
-       /*NOTREACHED*/
+         amfree(request->state->next_tape_label);
+         amfree(request->state->next_tape_device);
      }
  
-  error_ack:
-     /* wait for reader to acknowledge error */
-     do {
-       if ((tok = syncpipe_get(&tmpint)) == -1) {
-           error("writer: syncpipe failure waiting for error ack");
-           /*NOTREACHED*/
-       }
-       if (tok != 'W' && tok != 'C' && tok != 'e') {
-           error("writer: got '%c' unexpectedly after error", tok);
-           /*NOTREACHED*/
-       }
-     } while (tok != 'e');
-     return;
-  reader_buffer_snafu:
-     if (syncpipe_put('x', 0) == -1) {
-       error("writer: syncpipe failure putting buffer snafu");
-       /*NOTREACHED*/
-     }
-     return;
+     return GINT_TO_POINTER
+         (simple_taper_scan(request->state,
+                            &(request->prolong),
+                          &(request->errmsg)));
  }
  
- int
- write_buffer(
-     buffer_t *bp)
- {
-     ssize_t rc;
-     assert(bp->status == FULL);
-     startclock();
-     rc = tapefd_write(tape_fd, bp->buffer, (size_t)bp->size);
-     if (rc == (ssize_t)bp->size) {
- #if defined(NEED_RESETOFS)
-       static double tape_used_modulus_2gb = 0;
-       /*
-        * If the next write will go over the 2 GByte boundary, reset
-        * the kernel concept of where we are to make sure it does not
-        * go silly on us.
-        */
-       tape_used_modulus_2gb += (double)rc;
-       if (tape_used_modulus_2gb + (double)rc > (double)0x7fffffff) {
-           tape_used_modulus_2gb = 0;
-           tapefd_resetofs(tape_fd);
-       }
- #endif
-       wrwait = timesadd(wrwait, stopclock());
-       total_writes += 1;
-       total_tape_used += (off_t)rc;
-       bp->status = EMPTY;
-       if (interactive || debug_taper >= 1)
-           dumpstatus(bp);
-       if (interactive)
-           fputs("W", stderr);
-       taper_debug(1, ("taper: w: put R%d\n", (int)(bp-buftable)));
-       if (syncpipe_put('R', (int)(bp-buftable)) == -1) {
-           error("writer: Syncpipe failure during advancing write bufffer");
-           /*NOTREACHED*/
-       }
-       return 1;
-     } else {
-       errstr = newvstralloc(errstr,
-                             "writing file: ",
-                             (rc != -1) ? "short write" : strerror(errno),
-                             NULL);
-       wrwait = timesadd(wrwait, stopclock());
-       if (interactive)
-           fputs("[WE]", stderr);
-       return 0;
+ static void log_taper_scan_errmsg(char * errmsg) {
+     char *c, *c1;
+     if (errmsg == NULL)
+         return;
+     c = c1 = errmsg;
+     while (*c != '\0') {
+         if (*c == '\n') {
+             *c = '\0';
+             log_add(L_WARNING,"%s", c1);
+             c1 = c+1;
+         }
+         c++;
      }
+     if (strlen(c1) > 1 )
+         log_add(L_WARNING,"%s", c1);
+     amfree(errmsg);
  }
  
+ /* If handle is NULL, then this function assumes that we are in startup mode.
+  * In that case it will wait for a command from driver. If handle is not NULL,
+  * this this function will ask for permission with REQUEST-NEW-TAPE. */
+ static gboolean find_new_tape(taper_state_t * state, dump_info_t * dump) {
+     GThread * tape_search = NULL;
+     tape_search_request_t search_request;
+     gboolean use_threads;
+     cmd_t cmd;
+     struct cmdargs args;
  
- static void 
- cleanup(void)
- {
-     REMOVE_SHARED_MEMORY(); 
- }
+     if (state->device != NULL) {
+         return TRUE;
+     }
  
- /*
-  * Cleanup shared memory segments 
-  */
- static void 
- signal_handler(
-     int signum)
- {
-     log_add(L_INFO, "Received signal %d", signum);
+     /* We save the value here in case it changes while we're running. */
+     use_threads = g_thread_supported();
  
-     exit(1);
+     search_request.state = state;
+     search_request.prolong = TRUE;
+     search_request.errmsg = NULL;
+     if (use_threads) {
+         tape_search = g_thread_create(tape_search_thread,
+                                       &search_request, TRUE, NULL);
+     }
+     
+     putresult(REQUEST_NEW_TAPE, "%s\n", dump->handle);
+     cmd = getcmd(&args);
+     switch (cmd) {
+     default:
+         g_fprintf(stderr, "taper: Got odd message from driver, expected NEW-TAPE or NO-NEW-TAPE.\n");
+         /* FALLTHROUGH. */
+     case NEW_TAPE: {
+         gboolean search_result;
+         if (use_threads) {
+             search_result = GPOINTER_TO_INT(g_thread_join(tape_search));
+         } else {
+             search_result =
+                 GPOINTER_TO_INT(tape_search_thread(&search_request));
+         }
+         if (search_result) {
+             /* We don't say NEW_TAPE until we actually write the label. */
+           amfree(search_request.errmsg);
+             return TRUE;
+         } else {
+             putresult(NO_NEW_TAPE, "%s\n", dump->handle);
+             log_taper_scan_errmsg(search_request.errmsg);
+             return FALSE;
+         }
+     }
+     case NO_NEW_TAPE:
+         search_request.prolong = FALSE;
+         if (use_threads) {
+             g_thread_join(tape_search);
+         }
+         return FALSE;
+     }
  }
  
+ /* Returns TRUE if the old volume details are not the same as the new ones. */
+ static gboolean check_volume_changed(Device * device,
+                                      char * old_label, char * old_timestamp) {
+     /* If one is NULL and the other is not, something changed. */
+     if ((old_label == NULL) != (device->volume_label == NULL))
+         return TRUE;
+     if ((old_timestamp == NULL) != (device->volume_time == NULL))
+         return TRUE;
+     /* If details were not NULL and is now different, we have a difference. */
+     if (old_label != NULL && strcmp(old_label, device->volume_label) != 0)
+         return TRUE;
+     if (old_timestamp != NULL &&
+         strcmp(old_timestamp, device->volume_time) != 0)
+         return TRUE;
+     /* If we got here, everything is cool. */
+     return FALSE;
+ }
  
- /*
-  * Installing signal handlers for signal whose default action is 
-  * process termination so that we can clean up shared memory
-  * segments
-  */
  static void
- install_signal_handlers(void)
+ update_tapelist(
+     taper_state_t *state)
  {
-     struct sigaction act;
-     act.sa_handler = signal_handler;
-     act.sa_flags = 0;
-     sigemptyset(&act.sa_mask);
-     signal(SIGPIPE, SIG_IGN);
+     char *tapelist_name = NULL;
+     char *tapelist_name_old = NULL;
  
-     if (sigaction(SIGINT, &act, NULL) != 0) {
-       error("taper: couldn't install SIGINT handler [%s]", strerror(errno));
-       /*NOTREACHED*/
+     tapelist_name = config_dir_relative(getconf_str(CNF_TAPELIST));
+     if (state->cur_tape == 0) {
+       tapelist_name_old = stralloc2(tapelist_name, ".yesterday");
+     } else {
+       char cur_str[NUM_STR_SIZE];
+       g_snprintf(cur_str, SIZEOF(cur_str), "%d", state->cur_tape - 1);
+       tapelist_name_old = vstralloc(tapelist_name,
+                                     ".today.", cur_str, NULL);
      }
  
-     if (sigaction(SIGHUP, &act, NULL) != 0) {
-       error("taper: couldn't install SIGHUP handler [%s]", strerror(errno));
-       /*NOTREACHED*/
-     }
-    
-     if (sigaction(SIGTERM, &act, NULL) != 0) {
-       error("taper: couldn't install SIGTERM handler [%s]", strerror(errno));
+     if (write_tapelist(tapelist_name_old)) {
+       error("could not write tapelist: %s", strerror(errno));
        /*NOTREACHED*/
      }
+     amfree(tapelist_name_old);
  
-     if (sigaction(SIGUSR1, &act, NULL) != 0) {
-       error("taper: couldn't install SIGUSR1 handler [%s]", strerror(errno));
+     remove_tapelabel(state->device->volume_label);
+     add_tapelabel(state->driver_start_time,
+                   state->device->volume_label);
+     if (write_tapelist(tapelist_name)) {
+       error("could not write tapelist: %s", strerror(errno));
        /*NOTREACHED*/
      }
+     amfree(tapelist_name);
+ }
  
-     if (sigaction(SIGUSR2, &act, NULL) != 0) {
-       error("taper: couldn't install SIGUSR2 handler [%s]", strerror(errno));
-       /*NOTREACHED*/
+ /* Find and label a new tape, if one is not already open. Returns TRUE
+  * if a tape could be written. */
+ static gboolean find_and_label_new_tape(taper_state_t * state,
+                                         dump_info_t * dump_info) {
+     if (state->device != NULL) {
+         return TRUE;
      }
-     if (sigaction(SIGALRM, &act, NULL) != 0) {
-       error("taper: couldn't install SIGALRM handler [%s]", strerror(errno));
-       /*NOTREACHED*/
+     
+     if (!find_new_tape(state, dump_info)) {
+         return FALSE;
      }
- }
  
- /*
-  * ========================================================================
-  * SHARED-MEMORY BUFFER SUBSYSTEM
-  *
-  */
+     return label_new_tape(state, dump_info);
+ }
  
- #ifdef HAVE_SYSVSHM
+ static gboolean label_new_tape(taper_state_t * state, dump_info_t * dump_info) {
+     char *old_volume_name = NULL;
+     char *old_volume_time = NULL;
+     tape_search_request_t request;
+     gboolean search_result;
+     ReadLabelStatusFlags status;
+     /* If we got here, it means that we have found a tape to label and
+      * have gotten permission from the driver to write it. But we
+      * still can say NO-NEW-TAPE if a problem shows up, and must still
+      * say NEW-TAPE if one doesn't. */
+     state->device = device_open(state->next_tape_device);
+     amfree(state->next_tape_device);
+     if (state->device == NULL)
+       goto skip_volume;
+     device_set_startup_properties_from_config(state->device);
+     /* if we have an error, and are sure it isn't just an unlabeled volume,
+      * then skip this volume */
+     status = device_read_label(state->device);
+     if ((status & ~READ_LABEL_STATUS_VOLUME_UNLABELED) &&
+       !(status & READ_LABEL_STATUS_VOLUME_UNLABELED))
+       goto skip_volume;
+     old_volume_name = g_strdup(state->device->volume_label);
+     old_volume_time = g_strdup(state->device->volume_time);
+     if (!device_start(state->device, ACCESS_WRITE, state->next_tape_label,
+                       state->driver_start_time)) {
+         gboolean tape_used;
+         /* Something broke, see if we can tell if the volume was erased or
+          * not. */
+         g_fprintf(stderr, "taper: Error writing label %s to device %s.\n",
+                 state->next_tape_label, state->device->device_name);
+         if (!device_finish(state->device))
+           goto request_new_volume;
+       /* This time, if we can't read the label, assume we've overwritten
+        * the volume or otherwise corrupted it */
+       status = device_read_label(state->device);
+       if ((status & ~READ_LABEL_STATUS_VOLUME_UNLABELED) &&
+           !(status & READ_LABEL_STATUS_VOLUME_UNLABELED))
+           goto request_new_volume;
+         tape_used = check_volume_changed(state->device, old_volume_name, 
+                                          old_volume_time);
+         if (tape_used) {
+           goto request_new_volume;
+         } else {
+           goto skip_volume;
+         }
+     }
  
- int shmid = -1;
+     amfree(old_volume_name);
+     amfree(old_volume_time);
+     amfree(state->next_tape_label);
  
- char *
- attach_buffers(
-     size_t size)
- {
-     char *result;
+     update_tapelist(state);
+     state->cur_tape++;
  
-     shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|0700);
-     if (shmid == -1) {
-       return NULL;
+     log_add(L_START, "datestamp %s label %s tape %d",
+             state->driver_start_time, state->device->volume_label,
+             state->cur_tape);
+     putresult(NEW_TAPE, "%s %s\n", dump_info->handle,
+             state->device->volume_label);
+     return TRUE;
+ request_new_volume:
+     /* Tell the driver we overwrote this volume, even if it was empty, and request
+      * a new volume. */
+     if (state->device) {
+         g_object_unref(state->device);
+         state->device = NULL;
+     }
+     putresult(NEW_TAPE, "%s %s\n", dump_info->handle,
+             state->next_tape_label);
+     if (old_volume_name) {
+       log_add(L_WARNING, "Problem writing label '%s' to volume %s, "
+               "volume may be erased.\n",
+               state->next_tape_label, old_volume_name);
+     } else {
+       log_add(L_WARNING, "Problem writing label '%s' to new volume, "
+               "volume may be erased.\n", state->next_tape_label);
      }
  
-     result = (char *)shmat(shmid, (SHM_ARG_TYPE *)NULL, 0);
+     amfree(state->next_tape_label);
+     amfree(old_volume_name);
+     amfree(old_volume_time);
  
-     if (result == (char *)-1) {
-       int save_errno = errno;
+     return find_and_label_new_tape(state, dump_info);
  
-       destroy_buffers();
-       errno = save_errno;
-       error("shmat: %s", strerror(errno));
-       /*NOTREACHED*/
+ skip_volume:
+     /* grab a new volume without talking to the driver again -- we do this if we're
+      * confident we didn't overwrite the last tape we got. */
+     if (state->device) {
+         g_object_unref(state->device);
+         state->device = NULL;
      }
  
-     return result;
- }
+     if (old_volume_name) {
+       log_add(L_WARNING, "Problem writing label '%s' to volume '%s', "
+               "old volume data intact\n",
+               state->next_tape_label, old_volume_name);
+     } else {
+       log_add(L_WARNING, "Problem writing label '%s' to new volume, "
+               "old volume data intact\n", state->next_tape_label);
+     }
  
+     amfree(state->next_tape_label);
+     amfree(old_volume_name);
+     amfree(old_volume_time);
  
- void
- detach_buffers(
-     char *bufp)
- {
-     if ((bufp != NULL) &&
-         (shmdt((SHM_ARG_TYPE *)bufp) == -1)) {
-       error("shmdt: %s", strerror(errno));
-       /*NOTREACHED*/
+     request.state = state;
+     request.prolong = TRUE;
+     request.errmsg = NULL;
+     search_result = GPOINTER_TO_INT(tape_search_thread(&request));
+     if (search_result) {
+       amfree(request.errmsg);
+       return label_new_tape(state, dump_info);
+     } else {
+       /* Problem finding a new tape! */
+       log_taper_scan_errmsg(request.errmsg);
+       putresult(NO_NEW_TAPE, "%s\n", dump_info->handle);
+       return FALSE;
+     }
 -}
+ /* Find out if the dump is PARTIAL or not, and set the proper driver
+    and logfile tags for the dump. */
+ static void find_completion_tags(dump_info_t * dump_info, /* IN */
+                                  cmd_t * result_cmd,      /* OUT */
+                                  logtype_t * result_log   /* OUT */) {
+     if (taper_source_is_partial(dump_info->source)) {
+         *result_cmd = PARTIAL;
+         *result_log = L_PARTIAL;
+     } else {
+         *result_cmd = DONE;
+         *result_log = L_DONE;
      }
- }
 +
- void
- destroy_buffers(void)
- {
-     if (shmid == -1)
-       return; /* nothing to destroy */
-     if (shmctl(shmid, IPC_RMID, NULL) == -1) {
-       error("shmctl: %s", strerror(errno));
-       /*NOTREACHED*/
-     }
++    memcpy(intp, &buf[1], SIZEOF(int));
++    return (int)buf[0];
  }
  
- #else
- #ifdef HAVE_MMAP
+ /* Put an L_PARTIAL message to the logfile. */
+ static void put_partial_log(dump_info_t * dump_info, double dump_time,
+                             guint64 dump_kbytes) {
+     char * qdiskname = quote_string(dump_info->diskname);
+     log_add(L_PARTIAL, "%s %s %s %d %d [sec %f kb %ju kps %f] \"\"",
+             dump_info->hostname, qdiskname, dump_info->timestamp,
+             dump_info->current_part, dump_info->level, dump_time,
+             (uintmax_t)dump_kbytes, dump_kbytes / dump_time);
+     amfree(qdiskname);
+ }
  
- #ifdef HAVE_SYS_MMAN_H
- #include <sys/mman.h>
- #endif
+ /* Figure out what to do after a part attempt. Returns TRUE if another
+    attempt should proceed for this dump; FALSE if we are done. */
+ static gboolean finish_part_attempt(taper_state_t * taper_state,
+                                     dump_info_t * dump_info,
+                                     queue_result_flags queue_result,
+                                     GTimeVal run_time, guint64 run_bytes) {
+     double part_time = g_timeval_to_double(run_time);
+     guint64 part_kbytes = run_bytes / 1024;
+     double part_kbps = run_bytes / (1024 * part_time);
+         
+     char * qdiskname = quote_string(dump_info->diskname);
+     if (queue_result == QUEUE_SUCCESS) {
+         dump_info->total_time = timesadd(run_time, dump_info->total_time);
+         dump_info->total_bytes += run_bytes;
+         log_add(L_PART, "%s %d %s %s %s %d/%d %d [sec %f kb %ju kps %f]",
+                 taper_state->device->volume_label,
+                 taper_state->device->file, dump_info->hostname, qdiskname,
+                 dump_info->timestamp, dump_info->current_part,
+                 taper_source_predict_parts(dump_info->source),
+                 dump_info->level, part_time, (uintmax_t)part_kbytes, part_kbps);
+         putresult(PARTDONE, "%s %s %d %ju \"[sec %f kb %ju kps %f]\"\n",
+                   dump_info->handle, taper_state->device->volume_label,
+                   taper_state->device->file, (uintmax_t)part_kbytes, part_time,
+                 (uintmax_t)part_kbytes, part_kbps);
+         
+         if (taper_source_get_end_of_data(dump_info->source)) {
+             cmd_t result_cmd;
+             logtype_t result_log;
+             double dump_time = g_timeval_to_double(dump_info->total_time);
+             guint64 dump_kbytes = dump_info->total_bytes / 1024;
+             double dump_kbps = dump_info->total_bytes / (1024 * dump_time);
+             find_completion_tags(dump_info, &result_cmd, &result_log);
+             g_object_unref(dump_info->source);
+             dump_info->source = NULL;
+         
+             log_add(result_log, "%s %s %s %d %d [sec %f kb %ju kps %f]",
+                     dump_info->hostname, qdiskname, dump_info->timestamp,
+                     dump_info->current_part, dump_info->level, dump_time,
+                   (uintmax_t)dump_kbytes, dump_kbps);
+             putresult(result_cmd, "%s INPUT-GOOD TAPE-GOOD "
+                       "\"[sec %f kb %ju kps %f]\" \"\" \"\"\n",
+                       dump_info->handle, dump_time, (uintmax_t)dump_kbytes,
+                       dump_kbps);
+             
+             amfree(qdiskname);
+             return FALSE;
+         } else if (taper_source_get_end_of_part(dump_info->source)) {
+             taper_source_start_new_part(dump_info->source);
+             dump_info->current_part ++;
+             amfree(qdiskname);
+             return TRUE;
+         }
+         /* If we didn't read EOF or EOP, then an error
+            occured. But we read QUEUE_SUCCESS, so something is
+            b0rked. */
+         g_assert_not_reached();
+     } else {
+         char * volume_label = strdup(taper_state->device->volume_label);
+         int file_number = taper_state->device->file;
+         double dump_time, dump_kbps;
+         guint64 dump_kbytes;
+         /* A problem occured. */
+         if (queue_result & QUEUE_CONSUMER_ERROR) {
+             /* Close the device. */
+             device_finish(taper_state->device);
+             g_object_unref(taper_state->device);
+             taper_state->device = NULL;
+         }
+         
+         log_add(L_PARTPARTIAL,
+                 "%s %d %s %s %s %d/%d %d [sec %f kb %ju kps %f] \"\"",
+                 volume_label, file_number, dump_info->hostname, qdiskname,
+                 dump_info->timestamp, dump_info->current_part,
+                 taper_source_predict_parts(dump_info->source),
+                 dump_info->level, part_time, (uintmax_t)part_kbytes, part_kbps);
+         amfree(volume_label);
+         
+         if ((queue_result & QUEUE_CONSUMER_ERROR) &&
+             (!(queue_result & QUEUE_PRODUCER_ERROR)) &&
+             taper_source_seek_to_part_start(dump_info->source)) {
+             /* It is recoverable. */
+             log_add(L_INFO, "Will request retry of failed split part.");
+             if (find_and_label_new_tape(taper_state, dump_info)) {
+                 /* dump_info->current_part is unchanged. */
+                 amfree(qdiskname);
+                 return TRUE;
+             }
+         }
  
- #ifndef MAP_ANON
- #  ifdef MAP_ANONYMOUS                        /* OSF/1-style */
- #    define MAP_ANON MAP_ANONYMOUS
- #  else                                       /* SunOS4-style */
- #    define MAP_ANON 0
- #    define ZERO_FILE "/dev/zero"
- #  endif
- #endif
+         dump_info->total_time = timesadd(run_time, dump_info->total_time);
+         dump_info->total_bytes += run_bytes;
+         dump_time = g_timeval_to_double(dump_info->total_time);
+         dump_kbytes = dump_info->total_bytes / 1024;
+         dump_kbps = dump_info->total_bytes / (1024 * dump_time);
+         
+         putresult(PARTIAL,
+                   "%s INPUT-%s TAPE-%s "
+                   "\"[sec %f kb %ju kps %f]\" \"\" \"\"\n",
+                   dump_info->handle,
+                   (queue_result & QUEUE_PRODUCER_ERROR) ? "ERROR" : "GOOD",
+                   (queue_result & QUEUE_CONSUMER_ERROR) ? "ERROR" : "GOOD",
+                   dump_time, (uintmax_t)dump_kbytes, dump_kbps);
+         put_partial_log(dump_info, dump_time, dump_kbytes);
+     }
+     amfree(qdiskname);
+     return FALSE;
+ }
  
- int shmfd = -1;
- size_t saved_size;
+ /* Generate the actual header structure to write to tape. This means dropping
+  * bits related to the holding disk, and adding bits for split dumps. */
+ static dumpfile_t * munge_headers(dump_info_t * dump_info) {
+     dumpfile_t * rval;
+     int expected_splits;
+     
+     rval = taper_source_get_first_header(dump_info->source);
  
- char *
- attach_buffers(
-     size_t size)
- {
-     char *shmbuf;
- #ifdef ZERO_FILE
-     shmfd = open(ZERO_FILE, O_RDWR);
-     if (shmfd == -1) {
-       error("attach_buffers: could not open %s: %s",
-             ZERO_FILE,
-             strerror(errno));
-         /*NOTREACHED*/
+     if (rval == NULL) {
+         return NULL;
      }
- #endif
  
-     saved_size = size;
-     shmbuf = (char *) mmap((void *) 0,
-                          size,
-                          PROT_READ|PROT_WRITE,
-                          MAP_ANON|MAP_SHARED,
-                          shmfd, 0);
+     rval->cont_filename[0] = '\0';
  
-     return shmbuf;
- }
+     expected_splits = taper_source_predict_parts(dump_info->source);
  
- void
- detach_buffers(
-     char *bufp)
- {
-     if ((bufp != NULL) && 
-       (munmap((void *)bufp, saved_size) == -1)) {
-       error("detach_buffers: munmap: %s", strerror(errno));
-       /*NOTREACHED*/
+     if (expected_splits != 1) {
+         rval->type = F_SPLIT_DUMPFILE;
+         rval->partnum = dump_info->current_part;
+         rval->totalparts = expected_splits;
      }
  
-     if (shmfd != -1)
-       aclose(shmfd);
+     return rval;
  }
  
- void
- destroy_buffers(void)
- {
+ /* We call this when we can't find a tape to write data to. This could
+    happen with the first (or only) part of a file, but it could also
+    happen with an intermediate part of a split dump. dump_bytes
+    is 0 if this is the first part of a dump. */
+ static void bail_no_volume(dump_info_t * dump_info) {
+     if (dump_info->total_bytes > 0) {
+         /* Second or later part of a split dump, so PARTIAL message. */
+         double dump_time = g_timeval_to_double(dump_info->total_time);
+         guint64 dump_kbytes = dump_info->total_bytes / 1024;
+         double dump_kbps = dump_kbytes / dump_time;
+         putresult(PARTIAL,
+                   "%s INPUT-GOOD TAPE-ERROR "
+                   "\"[sec %f kb %ju kps %f]\" \"\" \"no new tape\"\n",
+                   dump_info->handle, 
+                   dump_time, (uintmax_t)dump_kbytes, dump_kbps);
+         put_partial_log(dump_info, dump_time, dump_kbytes);
+     } else {
+         char * qdiskname = quote_string(dump_info->diskname);
+         putresult(FAILED,
+                   "%s INPUT-GOOD TAPE-ERROR \"\" \"No new tape.\"\n",
+                   dump_info->handle);
+         log_add(L_FAIL, "%s %s %s %d \"No new tape.\"",
+                 dump_info->hostname, qdiskname, dump_info->timestamp,
+                 dump_info->level);
+       amfree(qdiskname);
+     }
  }
  
- #else
- #error: must define either HAVE_SYSVSHM or HAVE_MMAP!
- #endif
- #endif
+ /* Link up the TaperSource with the Device, including retries etc. */
+ static void run_device_output(taper_state_t * taper_state,
+                               dump_info_t * dump_info) {
+     GValue val;
+     guint file_number;
+     dump_info->current_part = 1;
+     dump_info->total_time.tv_sec = 0;
+     dump_info->total_time.tv_usec = 0;
+     dump_info->total_bytes = 0;
+     for (;;) {
+         GTimeVal start_time, end_time, run_time;
+         StreamingRequirement streaming_mode;
+         queue_result_flags queue_result;
+         CountingConsumerData consumer_data;
+         dumpfile_t *this_header;
+         size_t max_memory;
+         
+         this_header = munge_headers(dump_info);
+         if (this_header == NULL) {
+             char * qdiskname = quote_string(dump_info->diskname);
+             putresult(FAILED,
+              "%s INPUT-ERROR TAPE-GOOD \"Failed reading dump header.\" \"\"\n",
+                       dump_info->handle);
+             log_add(L_FAIL, "%s %s %s %d \"Failed reading dump header.\"",
+                     dump_info->hostname, qdiskname, dump_info->timestamp,
+                     dump_info->level);
+             amfree(qdiskname);
+             return;
+         }            
+         if (!find_and_label_new_tape(taper_state, dump_info)) {
+             bail_no_volume(dump_info);
+           amfree(this_header);
+             return;
+         }
  
- /*
-  * ========================================================================
-  * SYNC-PIPE SUBSYSTEM
-  *
-  */
+         if (!device_start_file(taper_state->device, this_header)) {
+             bail_no_volume(dump_info);
+           amfree(this_header);
+             return;
+         }
+       amfree(this_header);
+         bzero(&val, sizeof(val));
+         if (!device_property_get(taper_state->device, PROPERTY_STREAMING, &val)
+             || !G_VALUE_HOLDS(&val, STREAMING_REQUIREMENT_TYPE)) {
+             g_fprintf(stderr, "taper: Couldn't get streaming type!\n");
+             streaming_mode = STREAMING_REQUIREMENT_REQUIRED;
+         } else {
+             streaming_mode = g_value_get_enum(&val);
+         }
+     
+         file_number = taper_state->device->file;
+         consumer_data.next_consumer = device_write_consumer;
+         consumer_data.next_consumer_data = taper_state->device;
+         consumer_data.bytes_written = 0;
+         g_get_current_time(&start_time);
+         if (getconf_seen(CNF_DEVICE_OUTPUT_BUFFER_SIZE)) {
+             max_memory = getconf_size(CNF_DEVICE_OUTPUT_BUFFER_SIZE);
+             if (getconf_seen(CNF_TAPEBUFS)) {
+                 g_fprintf(stderr,
+                         "Configuration directives 'device_output_buffer_size' "
+                         "and \n"
+                         "'tapebufs' are incompatible; using former.\n");
+             }
+         } else if (getconf_seen(CNF_TAPEBUFS)) {
+             max_memory = getconf_int(CNF_TAPEBUFS) *
+                 device_write_max_size(taper_state->device);
+         } else {
+             /* Use default. */
+             max_memory = getconf_size(CNF_DEVICE_OUTPUT_BUFFER_SIZE);
+         }
  
- int getpipe, putpipe;
+         queue_result = do_consumer_producer_queue_full
+             (taper_source_producer,
+              dump_info->source,
+              counting_consumer,
+              &consumer_data,
+              device_write_max_size(taper_state->device), max_memory,
+              streaming_mode);
+         g_get_current_time(&end_time);
+         run_time = timesub(end_time, start_time);
+         /* The device_write_consumer may have closed the file with a short
+          * write, so we only finish here if it needs it. */
+         if (taper_state->device->in_file &&
+             !device_finish_file(taper_state->device)) {
+             queue_result = queue_result | QUEUE_CONSUMER_ERROR;
+         }
  
- void
- syncpipe_init(
-     int rd,
-     int wr)
- {
-     getpipe = rd;
-     putpipe = wr;
+         if (!finish_part_attempt(taper_state, dump_info, queue_result,
+                                  run_time, consumer_data.bytes_written)) {
+             break;
+         }
+     }
  }
  
- void
- syncpipe_read_error(
-     ssize_t   rc,
-     ssize_t   expected)
- {
-     char buf[sizeof(char) + sizeof(int)];
-     if (rc == 0) {
-       dbprintf(("syncpipe_get %s halting: Unexpected read EOF\n", procname));
-       fprintf(stderr, "syncpipe_get %s halting: Unexpected read EOF\n", procname);
-     } else if (rc < 0) {
-       dbprintf(("syncpipe_get %s halting: Read error - %s\n",
-                       procname, strerror(errno)));
-       fprintf(stderr, "syncpipe_get %s halting: Read error - %s\n",
-                       procname, strerror(errno));
-     } else {
-       dbprintf(("syncpipe_get %s halting: Read "
-               SSIZE_T_FMT " bytes short of " SSIZE_T_FMT "\n",
-               procname, (SSIZE_T_FMT_TYPE)(rc - expected),
-               (SSIZE_T_FMT_TYPE)expected));
-       fprintf(stderr, "syncpipe_get %s halting: Read "
-               SSIZE_T_FMT " bytes short of " SSIZE_T_FMT "\n",
-               procname, (SSIZE_T_FMT_TYPE)(rc - expected),
-               (SSIZE_T_FMT_TYPE)expected);
+ /* Handle a PORT_WRITE command. */
+ static void process_port_write(taper_state_t * state,
+                                struct cmdargs * cmdargs) {
+     dump_info_t dump_state;
+     guint64 splitsize;
+     guint64 fallback_splitsize;
+     char * split_diskbuffer;
+     char * argnames[] = {"command",               /* 1 */
+                        "handle",                /* 2 */
+                          "hostname",              /* 3 */
+                          "diskname",              /* 4 */
+                          "level",                 /* 5 */
+                          "datestamp",             /* 6 */
+                          "splitsize",             /* 7 */
+                          "split_diskbuffer",      /* 8 */
+                          "fallback_splitsize",    /* 9 */
+                           NULL };
+     validate_args(PORT_WRITE, cmdargs, argnames);
+     dump_state.handle = g_strdup(cmdargs->argv[2]);
+     dump_state.hostname = g_strdup(cmdargs->argv[3]);
+     dump_state.diskname = unquote_string(cmdargs->argv[4]);
+     
+     errno = 0;
+     dump_state.level = strtol(cmdargs->argv[5], NULL, 10);
+     if (errno != 0) {
+         error("error [taper PORT-WRITE: Invalid dump level %s]",
+               cmdargs->argv[5]);
+         g_assert_not_reached();
      }
-     /* Halt the other side if it's still alive */
-     buf[0] = 'H';
-     memset(&buf[1], 0, SIZEOF(int));
-     if (write(putpipe, buf, SIZEOF(buf)))
-       return;
- }
+     
+     dump_state.timestamp = strdup(cmdargs->argv[6]);
  
- void
- syncpipe_write_error(
-     ssize_t   rc,
-     ssize_t   expected)
- {
-     char buf[sizeof(char) + sizeof(int)];
-     if (rc == 0) {            /* EOF */
-       dbprintf(("syncpipe %s halting: Write EOF\n", procname));
-       fprintf(stderr, "syncpipe %s halting: Write EOF\n", procname);
-     } else if (rc < 0) {
-       dbprintf(("syncpipe %s halting: Write error - %s\n",
-                       procname, strerror(errno)));
-       fprintf(stderr, "syncpipe %s halting: Write error - %s\n",
-                       procname, strerror(errno));
+     errno = 0;
+     splitsize = g_ascii_strtoull(cmdargs->argv[7], NULL, 10);
+     if (errno != 0) {
+         error("error [taper PORT-WRITE: Invalid splitsize %s]",
+               cmdargs->argv[7]);
+         g_assert_not_reached();
+     }
+     
+     if (strcmp(cmdargs->argv[8], "NULL") == 0) {
+         split_diskbuffer = NULL;
      } else {
-       dbprintf(("syncpipe %s halting: Write "
-                       SSIZE_T_FMT " bytes short of " SSIZE_T_FMT "\n",
-                       procname, (SSIZE_T_FMT_TYPE)(rc - expected),
-                       (SSIZE_T_FMT_TYPE)expected));
-       fprintf(stderr, "syncpipe %s halting: Write "
-                       SSIZE_T_FMT " bytes short of " SSIZE_T_FMT "\n",
-                       procname, (SSIZE_T_FMT_TYPE)(rc - expected),
-                       (SSIZE_T_FMT_TYPE)expected);
+         split_diskbuffer = g_strdup(cmdargs->argv[8]);
      }
-     /* Halt the other side if it's still alive */
-     buf[0] = 'H';
-     memset(&buf[1], 0, SIZEOF(int));
-     if (write(putpipe, buf, SIZEOF(buf)))
-       return;
- }
- int
- syncpipe_get(
-     int *intp)
- {
-     ssize_t rc;
-     char buf[SIZEOF(char) + SIZEOF(int)];
-     memset(buf, 0, sizeof(buf));
-     rc = fullread(getpipe, buf, SIZEOF(buf));
-     if (rc != (ssize_t)sizeof(buf)) {
-       syncpipe_read_error(rc, (ssize_t)sizeof(buf));
-       return (-1);
+     
+     errno = 0;
+     fallback_splitsize = g_ascii_strtoull(cmdargs->argv[9], NULL, 10);
+     if (errno != 0) {
+         error("error [taper PORT-WRITE: Invalid fallback_splitsize %s]",
+               cmdargs->argv[9]);
+         g_assert_not_reached();
      }
  
-     if (debug_taper >= 1 && *buf != 'R' && *buf != 'W') {
-       taper_debug(1, ("taper: %c: getc %c\n", *procname, *buf));
+     dump_state.id_string = g_strdup_printf("%s:%s.%d", dump_state.hostname,
+                                            dump_state.diskname,
+                                          dump_state.level);
+     
+     if (!open_read_socket(&dump_state, split_diskbuffer, splitsize,
+                           fallback_splitsize)) {
+         free(split_diskbuffer);
+         return;
      }
+     free(split_diskbuffer);
  
-     memcpy(intp, &buf[1], SIZEOF(int));
-     return (int)buf[0];
- }
- int
- syncpipe_getint(void)
- {
-     ssize_t rc;
-     int i = 0;
-     rc = fullread(getpipe, &i, SIZEOF(i));
-     if (rc != (ssize_t)sizeof(i)) {
-       syncpipe_read_error(rc, (ssize_t)sizeof(i));
-       return (-1);
-     }
+     run_device_output(state, &dump_state);
  
-     return (i);
+     free_dump_info(&dump_state);
  }
  
- char *
- syncpipe_getstr(void)
- {
-     ssize_t rc;
-     int len;
-     char *str;
-     if ((len = syncpipe_getint()) <= 0) {
-       fprintf(stderr, "syncpipe %s halting: Protocol error - "
-                       "Invalid string length (%d)\n", procname, len);
-       syncpipe_put('H', 0); /* Halt the other side */
-       exit(1);
-       /*NOTREACHED*/
+ /* Handle a FILE_WRITE command. */
+ static void process_file_write(taper_state_t * state,
+                                struct cmdargs * cmdargs) {
+     dump_info_t dump_state;
+     char * holding_disk_file;
+     guint64 splitsize;
+     char * argnames[] = {"command",               /* 1 */
+                        "handle",                /* 2 */
+                          "filename",              /* 3 */
+                          "hostname",              /* 4 */
+                          "diskname",              /* 5 */
+                          "level",                 /* 6 */
+                          "datestamp",             /* 7 */
+                          "splitsize",             /* 8 */
+                           NULL };
+     validate_args(FILE_WRITE, cmdargs, argnames);
+     dump_state.handle = g_strdup(cmdargs->argv[2]);
+     holding_disk_file = unquote_string(cmdargs->argv[3]);
+     dump_state.hostname = g_strdup(cmdargs->argv[4]);
+     dump_state.diskname = unquote_string(cmdargs->argv[5]);
+     
+     errno = 0;
+     dump_state.level = strtol(cmdargs->argv[6], NULL, 10);
+     if (errno != 0) {
+         error("error [taper FILE-WRITE: Invalid dump level %s]",
+               cmdargs->argv[5]);
+         g_assert_not_reached();
      }
+     
+     dump_state.timestamp = strdup(cmdargs->argv[7]);
  
-     str = alloc((size_t)len);
-     rc = fullread(getpipe, str, (size_t)len);
-     if (rc != (ssize_t)len) {
-       syncpipe_read_error(rc, (ssize_t)len);
-       return (NULL);
+     errno = 0;
+     splitsize = g_ascii_strtoull(cmdargs->argv[8], NULL, 10);
+     if (errno != 0) {
+         error("error [taper FILE-WRITE: Invalid splitsize %s]",
+               cmdargs->argv[8]);
+         g_assert_not_reached();
      }
-     return (str);
- }
  
- int
- syncpipe_put(
-     int chi,
-     int intval)
- {
-     char buf[sizeof(char) + sizeof(int)];
-     ssize_t   rc;
+     dump_state.id_string = g_strdup_printf("%s:%s.%d", dump_state.hostname,
+                                            dump_state.diskname,
+                                          dump_state.level);
+     
+     dump_state.source = taper_source_new(dump_state.handle, FILE_WRITE,
+                                          holding_disk_file, -1,
+                                          NULL, splitsize, -1);
+     /* FIXME: This should be handled properly. */
+     g_assert(dump_state.source != NULL);
  
-     buf[0] = (char)chi;
-     memcpy(&buf[1], &intval, SIZEOF(int));
-     if (debug_taper >= 1 && buf[0] != 'R' && buf[0] != 'W') {
-       taper_debug(1, ("taper: %c: putc %c\n",*procname,buf[0]));
-     }
+     run_device_output(state, &dump_state);
  
-     rc = fullwrite(putpipe, buf, SIZEOF(buf));
-     if (rc != (ssize_t)sizeof(buf)) {
-       syncpipe_write_error(rc, (ssize_t)sizeof(buf));
-       return (-1);
-     }
-     return (0);
+     free_dump_info(&dump_state);
+     amfree(holding_disk_file);
  }
  
- int
- syncpipe_putint(
-     int i)
- {
-     ssize_t   rc;
-     rc = fullwrite(putpipe, &i, SIZEOF(i));
-     if (rc != (ssize_t)sizeof(i)) {
-       syncpipe_write_error(rc, (ssize_t)sizeof(i));
-       return (-1);
-       /* NOTREACHED */
-     }
-     return (0);
+ /* Send QUITTING message to driver and associated logging. Always
+    returns false. */
+ static gboolean send_quitting(taper_state_t * state) {
+     putresult(QUITTING, "\n");
+     g_fprintf(stderr,"taper: DONE\n");
+     cleanup(state);
+     return FALSE;
  }
  
- int
- syncpipe_putstr(
-     const char *str)
- {
-     ssize_t n, rc;
-     if(!str)
-       str = "UNKNOWN syncpipe_putstr STRING";
+ /* This function recieves the START_TAPER command from driver, and
+    returns the attached timestamp. */
+ static gboolean find_first_tape(taper_state_t * state) {
+     cmd_t cmd;
+     /* Note: cmdargs.argv is never freed. In the entire Amanda codebase. */
+     struct cmdargs cmdargs;
+     tape_search_request_t search_request;
+     GThread * tape_search = NULL;
+     gboolean use_threads;
  
-     n = (ssize_t)strlen(str) + 1;                     /* send '\0' as well */
-     syncpipe_putint((int)n);
+     /* We save the value here in case it changes while we're running. */
+     use_threads = g_thread_supported();
  
-     rc = fullwrite(putpipe, str, (size_t)n);
-     if (rc != n) {
-       syncpipe_write_error(rc, n);
-       return (-1);
-     }
-     return (0);
- }
\f
- /*
-  * ========================================================================
-  * TAPE MANIPULATION SUBSYSTEM
-  *
-  */
- int label_tape(void);
- /* local functions */
- /* return 0 on success              */
- /* return 1 on error and set errstr */
- int
- label_tape(void)
- {  
-     char *conf_tapelist_old = NULL;
-     char *result;
-     static int first_call = 1;
-     char *timestamp;
-     char *error_msg = NULL;
-     char *s, *r;
-     int slot = -1;
-     int scan_result;
-     amfree(label);
-     amfree(tapedev);
-     if ((scan_result = taper_scan(NULL, &label, &timestamp, &tapedev, CHAR_taperscan_output_callback, &error_msg)) < 0) {
-       fprintf(stderr, "%s\n", error_msg);
-       errstr = error_msg;
-       error_msg = NULL;
-       amfree(timestamp);
-       return 0;
+     search_request.state = state;
+     search_request.prolong = TRUE;
+     search_request.errmsg = NULL;
+     
+     if (use_threads) {
+         tape_search = g_thread_create(tape_search_thread,
+                                       &search_request, TRUE, NULL);
      }
-     amfree(timestamp);
  
-     if(error_msg) {
-       s = error_msg; r = NULL;
-       while((s=strstr(s,"slot "))) { s += 5; r=s; };
-       if(r) {
-           slot = atoi(r);
-       }
-       amfree(error_msg);
+     cmd = getcmd(&cmdargs);
+     switch (cmd) {
+     case START_TAPER: {
+         gboolean search_result;
+         state->driver_start_time = strdup(cmdargs.argv[2]);
+         if (use_threads) {
+             search_result = GPOINTER_TO_INT(g_thread_join(tape_search));
+         } else {
+             search_result =
+                 GPOINTER_TO_INT(tape_search_thread(&search_request));
+         }
+         if (search_result) {
+             putresult(TAPER_OK, "\n");
+         } else {
+             putresult(TAPE_ERROR, "Could not find a tape to use.\n");
+           log_add(L_ERROR, "no-tape [%s]", "Could not find a tape to use");
+           if (search_request.errmsg != NULL) {
+               char *c, *c1;
+               c = c1 = search_request.errmsg;
+               while (*c != '\0') {
+                   if (*c == '\n') {
+                       *c = '\0';
+                       log_add(L_WARNING,"%s", c1);
+                       c1 = c+1;
+                   }
+                   c++;
+               }
+               if (strlen(c1) > 1 )
+                   log_add(L_WARNING,"%s", c1);
+           }
+         }
+       amfree(search_request.errmsg);
+         return TRUE;
      }
-     if ((tape_fd = tape_open(tapedev, O_WRONLY)) == -1) {
-       if (errno == EACCES) {
-           errstr = newstralloc2(errstr,
-                                "writing label: tape is write protected or I don't have write permission on ", tapedev);
-       } else {
-           errstr = newstralloc2(errstr,
-                                 "writing label: ", strerror(errno));
-       }
-       return 0;
+     case QUIT:
+         search_request.prolong = FALSE;
+         if (use_threads) {
+             g_thread_join(tape_search);
+         }
+         return send_quitting(state);
+     default:
+         error("error [file_reader_side cmd %d argc %d]", cmd, cmdargs.argc);
      }
  
-     tapefd_setinfo_length(tape_fd, tapetype_get_length(tt));
-     tapefd_setinfo_datestamp(tape_fd, taper_timestamp);
-     tapefd_setinfo_disk(tape_fd, label);
-     result = tapefd_wrlabel(tape_fd, taper_timestamp, label, tt_blocksize);
-     if (result != NULL) {
-       errstr = newstralloc(errstr, result);
-       return 0;
-     }
+     g_assert_not_reached();
+ }
  
-     /* Output a description of what we just did. A result of '3' from taper_scan
-      * means that a new tape was found and will be labeled. */
-     if (slot > -1) {
-       fprintf(stderr, _("taper: slot: %d wrote label `%s' date `%s'\n"), slot, label, taper_timestamp);
-       if (scan_result == 3)
-           log_add(L_INFO, _("Wrote new label `%s' to new (non-amanda) tape in slot %d"), label, slot);
-     } else {
-       fprintf(stderr, _("taper: wrote label `%s' date `%s'\n"), label, taper_timestamp);
-       if (scan_result == 3)
-           log_add(L_INFO, _("Wrote new label `%s' to new (non-amanda) tape"), label);
-     }
-     fflush(stderr);
- #ifdef HAVE_LIBVTBLC
-     /* store time for the first volume entry */
-     time(&raw_time);
-     tape_timep = localtime(&raw_time);
-     strftime(start_datestr, 20, "%T %D", tape_timep);
-     fprintf(stderr, "taper: got vtbl start time: %s\n", start_datestr);
-     fflush(stderr);
- #endif /* HAVE_LIBVTBLC */
-     if (strcmp(label, FAKE_LABEL) != 0) {
-       if (cur_tape == 0) {
-           conf_tapelist_old = stralloc2(conf_tapelist, ".yesterday");
-       } else {
-           char cur_str[NUM_STR_SIZE];
-           snprintf(cur_str, SIZEOF(cur_str), "%d", cur_tape - 1);
-           conf_tapelist_old = vstralloc(conf_tapelist,
-                                         ".today.", cur_str, NULL);
-       }
-       if (write_tapelist(conf_tapelist_old)) {
-           error("could not write tapelist: %s", strerror(errno));
-           /*NOTREACHED*/
-       }
-       amfree(conf_tapelist_old);
-       remove_tapelabel(label);
-       add_tapelabel(taper_timestamp, label);
-       if (write_tapelist(conf_tapelist)) {
-           error("could not write tapelist: %s", strerror(errno));
-           /*NOTREACHED*/
-       }
-     }
+ /* In running mode (not startup mode), get a command from driver and
+    deal with it. */
+ static gboolean process_driver_command(taper_state_t * state) {
+     cmd_t cmd;
+     struct cmdargs cmdargs;
+     char * q;
  
-     log_add(L_START, "datestamp %s label %s tape %d",
-           taper_timestamp, label, cur_tape);
-     if (first_call && strcmp(label, FAKE_LABEL) == 0) {
-       first_call = 0;
-       log_add(L_WARNING, "tapedev is %s, dumps will be thrown away", tapedev);
+     /* This will return QUIT if driver has died. */
+     cmd = getcmd(&cmdargs);
+     switch (cmd) {
+     case PORT_WRITE:
+         /*
+          * PORT-WRITE
+          *   handle
+          *   hostname
+          *   features
+          *   diskname
+          *   level
+          *   datestamp
+          *   splitsize
+          *   split_diskbuffer
+          */
+         process_port_write(state, &cmdargs);
+         break;
+         
+     case FILE_WRITE:
+         /*
+          * FILE-WRITE
+          *   handle
+          *   filename
+          *   hostname
+          *   features
+          *   diskname
+          *   level
+          *   datestamp
+          *   splitsize
+          */
+         process_file_write(state, &cmdargs);
+         break;
+         
+     case QUIT:
+         return send_quitting(state);
+     default:
+         if (cmdargs.argc >= 1) {
+             q = squote(cmdargs.argv[1]);
+         } else if (cmdargs.argc >= 0) {
+             q = squote(cmdargs.argv[0]);
+         } else {
+             q = stralloc("(no input?)");
+         }
+         putresult(BAD_COMMAND, "%s\n", q);
+         amfree(q);
+         break;
      }
  
-     total_tape_used=(off_t)0;
-     total_tape_fm = 0;
-     return 1;
+     return TRUE;
  }
  
- /* return 0 on error and set errstr */
- /* return 1 on success              */
- int
- first_tape(
-     char *new_datestamp)
- {
-     if ((have_changer = changer_init()) < 0) {
-       error("changer initialization failed: %s", strerror(errno));
-       /*NOTREACHED*/
-     }
-     changer_debug = 1;
+ int main(int argc, char ** argv) {
+     char * tapelist_name;
+     int have_changer;
+     taper_state_t state;
+     config_overwrites_t *cfg_ovr = NULL;
+     char *cfg_opt = NULL;
  
-     taper_timestamp = newstralloc(taper_timestamp, new_datestamp);
+     /*
+      * Configure program for internationalization:
+      *   1) Only set the message locale for now.
+      *   2) Set textdomain for all amanda related programs to "amanda"
+      *      We don't want to be forced to support dozens of message catalogs.
+      */
+     setlocale(LC_MESSAGES, "C");
+     textdomain("amanda");
+     
+     safe_fd(-1, 0);
+     set_pname("taper");
  
-     if (!label_tape())
-       return 0;
+     dbopen("server");
  
-     filenum = 0;
-     return 1;
- }
+     device_api_init();
+     init_taper_state(&state);
  
- int
- next_tape(
-     int writerror)
- {
-     end_tape(writerror);
+     /* Don't die when child closes pipe */
+     signal(SIGPIPE, SIG_IGN);
  
-     if (++cur_tape >= runtapes)
-       return 0;
+     g_fprintf(stderr, _("%s: pid %ld executable %s version %s\n"),
+           get_pname(), (long) getpid(), argv[0], version());
+     dbprintf(_("%s: pid %ld executable %s version %s\n"),
+               get_pname(), (long) getpid(), argv[0], version());
  
-     if (!label_tape()) {
-       return 0;
-     }
+     /* Process options */
  
-     filenum = 0;
-     return 1;
- }
+     cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
  
+     if(argc > 2) {
+         error("Too many arguments!\n");
+         g_assert_not_reached();
+     }
+     if (argc > 1)
+       cfg_opt = argv[1];
+     config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_USE_CWD | CONFIG_INIT_FATAL,
+               cfg_opt);
+     apply_config_overwrites(cfg_ovr);
  
- int
- end_tape(
-     int writerror)
- {
-     char *result;
-     int rc = 0;
-     if (tape_fd >= 0) {
-       log_add(L_INFO, "tape %s kb " OFF_T_FMT " fm %d %s", 
-               label,
-               (OFF_T_FMT_TYPE)((total_tape_used+(off_t)1023) / (off_t)1024),
-               total_tape_fm,
-               writerror? errstr : "[OK]");
-       fprintf(stderr, "taper: writing end marker. [%s %s kb "
-               OFF_T_FMT " fm %d]\n", label,
-               writerror? "ERR" : "OK",
-               (OFF_T_FMT_TYPE)((total_tape_used+(off_t)1023) / (off_t)1024),
-               total_tape_fm);
-       fflush(stderr);
-       if (! writerror) {
-           if (! write_filemark()) {
-               rc = 1;
-               goto common_exit;
-           }
+     safe_cd();
  
-           result = tapefd_wrendmark(tape_fd, taper_timestamp, tt_blocksize);
-           if (result != NULL) {
-               errstr = newstralloc(errstr, result);
-               rc = 1;
-               goto common_exit;
-           }
-       }
-     }
+     set_logerror(logerror);
  
- #ifdef HAVE_LINUX_ZFTAPE_H
-     if (tape_fd >= 0 && is_zftape(tapedev) == 1) {
-       /* rewind the tape */
-       if (tapefd_rewind(tape_fd) == -1 ) {
-           errstr = newstralloc2(errstr, "rewinding tape: ", strerror(errno));
-           rc = 1;
-           goto common_exit;
-       }
-       /* close the tape */
-       if (tapefd_close(tape_fd) == -1) {
-           errstr = newstralloc2(errstr, "closing tape: ", strerror(errno));
-           rc = 1;
-           goto common_exit;
-       }
-       tape_fd = -1;
- #ifdef HAVE_LIBVTBLC
-       /* update volume table */
-       fprintf(stderr, "taper: updating volume table ...\n");
-       fflush(stderr);
-     
-       if ((tape_fd = raw_tape_open(rawtapedev, O_RDWR)) == -1) {
-           if (errno == EACCES) {
-               errstr = newstralloc(errstr,
-                                    "updating volume table: tape is write protected");
-           } else {
-               errstr = newstralloc2(errstr,
-                                     "updating volume table: ", 
-                                     strerror(errno));
-           }
-           rc = 1;
-           goto common_exit;
-       }
-       /* read volume table */
-       if ((num_volumes = read_vtbl(tape_fd, volumes, vtbl_buffer,
-                                    &first_seg, &last_seg)) == -1 ) {
-           errstr = newstralloc2(errstr,
-                                 "reading volume table: ", 
-                                 strerror(errno));
-           rc = 1;
-           goto common_exit;
-       }
-       /* set volume label and date for first entry */
-       vtbl_no = 0;
-       if (set_label(label, volumes, num_volumes, vtbl_no)) {
-           errstr = newstralloc2(errstr,
-                                 "setting label for entry 1: ",
-                                 strerror(errno));
-           rc = 1;
-           goto common_exit;
-       }
-       /* date of start writing this tape */
-       if (set_date(start_datestr, volumes, num_volumes, vtbl_no)) {
-           errstr = newstralloc2(errstr,
-                                 "setting date for entry 1: ", 
-                                 strerror(errno));
-           rc = 1;
-           goto common_exit;
-       }
-       /* set volume labels and dates for backup files */
-       for (vtbl_no = 1; vtbl_no <= num_volumes - 2; vtbl_no++) { 
-           fprintf(stderr,"taper: label %i: %s, date %s\n", 
-                   vtbl_no,
-                   vtbl_entry[vtbl_no].label,
-                   vtbl_entry[vtbl_no].date);
-           fflush(stderr);
-           if (set_label(vtbl_entry[vtbl_no].label, 
-                        volumes, num_volumes, vtbl_no)) {
-               errstr = newstralloc2(errstr,
-                                     "setting label for entry i: ", 
-                                     strerror(errno));
-               rc = 1;
-               goto common_exit;
-           }
-           if (set_date(vtbl_entry[vtbl_no].date, 
-                       volumes, num_volumes, vtbl_no)) {
-               errstr = newstralloc2(errstr,
-                                     "setting date for entry i: ",
-                                     strerror(errno));
-               rc = 1;
-               goto common_exit;
-           }
-       }
-       /* set volume label and date for last entry */
-       vtbl_no = num_volumes - 1;
-       if (set_label("AMANDA Tape End", volumes, num_volumes, vtbl_no)) {
-           errstr = newstralloc2(errstr,
-                                 "setting label for last entry: ", 
-                                 strerror(errno));
-           rc = 1;
-           goto common_exit;
-       }
-       datestr = NULL; /* take current time */ 
-       if (set_date(datestr, volumes, num_volumes, vtbl_no)) {
-           errstr = newstralloc2(errstr,
-                                 "setting date for last entry 1: ", 
-                                 strerror(errno));
-           rc = 1;
-           goto common_exit;
-       }
-       /* write volume table back */
-       if (write_vtbl(tape_fd, volumes, vtbl_buffer, num_volumes, first_seg,
-                      op_mode == trunc)) {
-           errstr = newstralloc2(errstr,
-                                 "writing volume table: ", 
-                                 strerror(errno));
-           rc = 1;
-           goto common_exit;
-       }  
-       fprintf(stderr, "taper: updating volume table: done.\n");
-       fflush(stderr);
- #endif /* HAVE_LIBVTBLC */
-     }
- #endif /* !HAVE_LINUX_ZFTAPE_H */
+     check_running_as(RUNNING_AS_DUMPUSER);
  
-     /* close the tape and let the OS write the final filemarks */
+     dbrename(config_name, DBG_SUBDIR_SERVER);
  
- common_exit:
+     tapelist_name = config_dir_relative(getconf_str(CNF_TAPELIST));
  
-     if (tape_fd >= 0 && tapefd_close(tape_fd) == -1 && ! writerror) {
-       errstr = newstralloc2(errstr, "closing tape: ", strerror(errno));
-       rc = 1;
+     if (read_tapelist(tapelist_name) != 0) {
+         error("could not load tapelist \"%s\"", tapelist_name);
+         g_assert_not_reached();
      }
-     tape_fd = -1;
-     amfree(label);
-     return rc;
- }
+     amfree(tapelist_name);
  
+     have_changer = changer_init();
+     if (have_changer < 0) {
+         error("changer initialization failed: %s", strerror(errno));
+         g_assert_not_reached();
+     }
  
- int
- write_filemark(void)
- {
-     if (tapefd_weof(tape_fd, (off_t)1) == -1) {
-       errstr = newstralloc2(errstr, "writing filemark: ", strerror(errno));
-       return 0;
+     state.next_tape_label = NULL;
+     state.next_tape_device = NULL;
+     state.cur_tape = 0;
+     
+     if (!find_first_tape(&state)) {
+         return EXIT_SUCCESS;
      }
-     total_tape_fm++;
-     return 1;
+     while (process_driver_command(&state));
+     return EXIT_SUCCESS;
  }
diff --combined tape-src/Makefile.in
index acdcd45246fe4d158826fdbe0d7edd2ec659adbc,4a0c8acb5886a8c08ccd54b543eb5c6940ca2de2..3418164722ed138e92eea4858c57e4f52dad5d3d
@@@ -1,8 -1,8 +1,8 @@@
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # Makefile.in generated by automake 1.10 from Makefile.am.
  # @configure_input@
  
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005  Free Software Foundation, Inc.
+ # 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
  # This Makefile.in is free software; the Free Software Foundation
  # gives unlimited permission to copy and/or distribute it,
  # with or without modifications, as long as this notice is preserved.
  
  # Makefile for Amanda tape library.
  
+ # vim:ft=automake
  
  
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
  VPATH = @srcdir@
  pkgdatadir = $(datadir)/@PACKAGE@
  pkglibdir = $(libdir)/@PACKAGE@
  pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = ..
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
  install_sh_DATA = $(install_sh) -c -m 644
  install_sh_PROGRAM = $(install_sh) -c
  install_sh_SCRIPT = $(install_sh) -c
@@@ -41,49 -39,119 +39,119 @@@ POST_UNINSTALL = 
  build_triplet = @build@
  host_triplet = @host@
  target_triplet = @target@
+ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in \
+       $(top_srcdir)/config/automake/precompile.am
  sbin_PROGRAMS = ammt$(EXEEXT) amdd$(EXEEXT) amtapetype$(EXEEXT)
  EXTRA_PROGRAMS = $(am__EXEEXT_1)
  subdir = tape-src
- DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/config/gnulib/absolute-header.m4 \
+ am__aclocal_m4_deps =  \
+       $(top_srcdir)/config/macro-archive/ac_define_dir.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_perl_version.m4 \
+       $(top_srcdir)/config/macro-archive/ac_prog_swig.m4 \
+       $(top_srcdir)/config/macro-archive/ax_compare_version.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-dtd.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt-min.m4 \
+       $(top_srcdir)/config/macro-archive/docbook-xslt.m4 \
+       $(top_srcdir)/config/macro-archive/xsltproc.m4 \
+       $(top_srcdir)/config/amanda/amplot.m4 \
+       $(top_srcdir)/config/amanda/bsd-security.m4 \
+       $(top_srcdir)/config/amanda/bsdtcp-security.m4 \
+       $(top_srcdir)/config/amanda/bsdudp-security.m4 \
+       $(top_srcdir)/config/amanda/changer.m4 \
+       $(top_srcdir)/config/amanda/components.m4 \
+       $(top_srcdir)/config/amanda/compress.m4 \
+       $(top_srcdir)/config/amanda/config.m4 \
+       $(top_srcdir)/config/amanda/debugging.m4 \
+       $(top_srcdir)/config/amanda/defaults.m4 \
+       $(top_srcdir)/config/amanda/devprefix.m4 \
+       $(top_srcdir)/config/amanda/dirs.m4 \
+       $(top_srcdir)/config/amanda/documentation.m4 \
+       $(top_srcdir)/config/amanda/dumpers.m4 \
+       $(top_srcdir)/config/amanda/flags.m4 \
+       $(top_srcdir)/config/amanda/flock.m4 \
+       $(top_srcdir)/config/amanda/funcs.m4 \
+       $(top_srcdir)/config/amanda/getfsent.m4 \
+       $(top_srcdir)/config/amanda/i18n.m4 \
+       $(top_srcdir)/config/amanda/ipv6.m4 \
+       $(top_srcdir)/config/amanda/krb4-security.m4 \
+       $(top_srcdir)/config/amanda/krb5-security.m4 \
+       $(top_srcdir)/config/amanda/lfs.m4 \
+       $(top_srcdir)/config/amanda/libs.m4 \
+       $(top_srcdir)/config/amanda/net.m4 \
+       $(top_srcdir)/config/amanda/progs.m4 \
+       $(top_srcdir)/config/amanda/readdir.m4 \
+       $(top_srcdir)/config/amanda/readline.m4 \
+       $(top_srcdir)/config/amanda/rsh-security.m4 \
+       $(top_srcdir)/config/amanda/s3-device.m4 \
+       $(top_srcdir)/config/amanda/shmem.m4 \
+       $(top_srcdir)/config/amanda/socklen_t_equiv.m4 \
+       $(top_srcdir)/config/amanda/ssh-security.m4 \
+       $(top_srcdir)/config/amanda/summary.m4 \
+       $(top_srcdir)/config/amanda/swig.m4 \
+       $(top_srcdir)/config/amanda/syshacks.m4 \
+       $(top_srcdir)/config/amanda/tape.m4 \
+       $(top_srcdir)/config/amanda/types.m4 \
+       $(top_srcdir)/config/amanda/userid.m4 \
+       $(top_srcdir)/config/amanda/version.m4 \
        $(top_srcdir)/config/gnulib/alloca.m4 \
        $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \
+       $(top_srcdir)/config/gnulib/base64.m4 \
        $(top_srcdir)/config/gnulib/eoverflow.m4 \
        $(top_srcdir)/config/gnulib/extensions.m4 \
+       $(top_srcdir)/config/gnulib/float_h.m4 \
+       $(top_srcdir)/config/gnulib/fsusage.m4 \
        $(top_srcdir)/config/gnulib/getaddrinfo.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-cache.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-common.m4 \
+       $(top_srcdir)/config/gnulib/gettimeofday.m4 \
        $(top_srcdir)/config/gnulib/gnulib-comp.m4 \
-       $(top_srcdir)/config/gnulib/gnulib-tool.m4 \
+       $(top_srcdir)/config/gnulib/include_next.m4 \
        $(top_srcdir)/config/gnulib/inet_ntop.m4 \
        $(top_srcdir)/config/gnulib/intmax_t.m4 \
-       $(top_srcdir)/config/gnulib/inttypes_h.m4 \
-       $(top_srcdir)/config/gnulib/lib-ld.m4 \
-       $(top_srcdir)/config/gnulib/lib-link.m4 \
-       $(top_srcdir)/config/gnulib/lib-prefix.m4 \
        $(top_srcdir)/config/gnulib/lock.m4 \
-       $(top_srcdir)/config/gnulib/longdouble.m4 \
        $(top_srcdir)/config/gnulib/longlong.m4 \
+       $(top_srcdir)/config/gnulib/malloc.m4 \
+       $(top_srcdir)/config/gnulib/mkdtemp.m4 \
        $(top_srcdir)/config/gnulib/netinet_in_h.m4 \
        $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \
-       $(top_srcdir)/config/gnulib/size_max.m4 \
+       $(top_srcdir)/config/gnulib/physmem.m4 \
+       $(top_srcdir)/config/gnulib/safe-read.m4 \
+       $(top_srcdir)/config/gnulib/safe-write.m4 \
        $(top_srcdir)/config/gnulib/snprintf.m4 \
        $(top_srcdir)/config/gnulib/socklen.m4 \
        $(top_srcdir)/config/gnulib/sockpfaf.m4 \
+       $(top_srcdir)/config/gnulib/ssize_t.m4 \
        $(top_srcdir)/config/gnulib/stdbool.m4 \
-       $(top_srcdir)/config/gnulib/stdint_h.m4 \
+       $(top_srcdir)/config/gnulib/stdint.m4 \
+       $(top_srcdir)/config/gnulib/stdio_h.m4 \
+       $(top_srcdir)/config/gnulib/stdlib_h.m4 \
        $(top_srcdir)/config/gnulib/strdup.m4 \
        $(top_srcdir)/config/gnulib/string_h.m4 \
        $(top_srcdir)/config/gnulib/sys_socket_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_stat_h.m4 \
+       $(top_srcdir)/config/gnulib/sys_time_h.m4 \
+       $(top_srcdir)/config/gnulib/tempname.m4 \
+       $(top_srcdir)/config/gnulib/ulonglong.m4 \
+       $(top_srcdir)/config/gnulib/unistd_h.m4 \
        $(top_srcdir)/config/gnulib/vasnprintf.m4 \
        $(top_srcdir)/config/gnulib/visibility.m4 \
-       $(top_srcdir)/config/gnulib/wchar_t.m4 \
-       $(top_srcdir)/config/gnulib/wint_t.m4 \
-       $(top_srcdir)/config/gnulib/xsize.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/config/gnulib/wchar.m4 \
+       $(top_srcdir)/config/gettext-macros/gettext.m4 \
+       $(top_srcdir)/config/gettext-macros/iconv.m4 \
+       $(top_srcdir)/config/gettext-macros/inttypes_h.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-ld.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-link.m4 \
+       $(top_srcdir)/config/gettext-macros/lib-prefix.m4 \
+       $(top_srcdir)/config/gettext-macros/longlong.m4 \
+       $(top_srcdir)/config/gettext-macros/nls.m4 \
+       $(top_srcdir)/config/gettext-macros/po.m4 \
+       $(top_srcdir)/config/gettext-macros/progtest.m4 \
+       $(top_srcdir)/config/gettext-macros/size_max.m4 \
+       $(top_srcdir)/config/gettext-macros/stdint_h.m4 \
+       $(top_srcdir)/config/gettext-macros/wchar_t.m4 \
+       $(top_srcdir)/config/gettext-macros/wint_t.m4 \
+       $(top_srcdir)/config/gettext-macros/xsize.m4 \
+       $(top_srcdir)/config/libtool.m4 $(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
  mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@@ -95,13 -163,16 +163,16 @@@ am__vpath_adj = case $$p in 
      *) f=$$p;; \
    esac;
  am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
- am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)"
- libLTLIBRARIES_INSTALL = $(INSTALL)
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libamtape_la_LIBADD =
+ am__installdirs = "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(sbindir)"
amlibLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(amlib_LTLIBRARIES)
+ libamtape_la_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION)
  am_libamtape_la_OBJECTS = output-file.lo output-null.lo output-rait.lo \
        output-tape.lo tapeio.lo
  libamtape_la_OBJECTS = $(am_libamtape_la_OBJECTS)
+ libamtape_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(libamtape_la_LDFLAGS) $(LDFLAGS) -o $@
  am__EXEEXT_1 = amtapeio$(EXEEXT)
  sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
  PROGRAMS = $(sbin_PROGRAMS)
@@@ -128,17 -199,18 +199,18 @@@ amtapetype_LDADD = $(LDADD
  amtapetype_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \
        libamtape.$(LIB_EXTENSION) \
        ../common-src/libamanda.$(LIB_EXTENSION)
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
+ DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
  am__depfiles_maybe = depfiles
  COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  CCLD = $(CC)
- LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
  SOURCES = $(libamtape_la_SOURCES) amdd.c ammt.c $(amtapeio_SOURCES) \
        $(amtapetype_SOURCES)
  DIST_SOURCES = $(libamtape_la_SOURCES) amdd.c ammt.c \
@@@ -147,15 -219,14 +219,15 @@@ HEADERS = $(noinst_HEADERS
  ETAGS = etags
  CTAGS = ctags
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
  ACLOCAL = @ACLOCAL@
  ALLOCA = @ALLOCA@
  ALLOCA_H = @ALLOCA_H@
  AMANDA_DBGDIR = @AMANDA_DBGDIR@
  AMANDA_DEBUG_DAYS = @AMANDA_DEBUG_DAYS@
+ AMANDA_STATIC_LDFLAGS = @AMANDA_STATIC_LDFLAGS@
  AMANDA_TMPDIR = @AMANDA_TMPDIR@
- AMDEP_FALSE = @AMDEP_FALSE@
- AMDEP_TRUE = @AMDEP_TRUE@
+ AMANDA_WARNING_CFLAGS = @AMANDA_WARNING_CFLAGS@
  AMLINT = @AMLINT@
  AMLINTFLAGS = @AMLINTFLAGS@
  AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@
@@@ -163,14 -234,19 +235,20 @@@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP
  AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@
  AMPLOT_COMPRESS = @AMPLOT_COMPRESS@
  AMTAR = @AMTAR@
 +AM_CFLAGS = @AM_CFLAGS@
  AR = @AR@
  ARPA_INET_H = @ARPA_INET_H@
  AUTOCONF = @AUTOCONF@
  AUTOHEADER = @AUTOHEADER@
  AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
+ BASH = @BASH@
  BINARY_OWNER = @BINARY_OWNER@
+ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
  CAT = @CAT@
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
@@@ -181,20 -257,19 +259,19 @@@ CHS = @CHS
  CLIENT_LOGIN = @CLIENT_LOGIN@
  CLIENT_SCRIPTS_OPT = @CLIENT_SCRIPTS_OPT@
  COMPRESS = @COMPRESS@
- CONFIGURE_COMMAND = @CONFIGURE_COMMAND@
  CONFIG_DIR = @CONFIG_DIR@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
+ CURL_CONFIG = @CURL_CONFIG@
  CXX = @CXX@
  CXXCPP = @CXXCPP@
  CXXDEPMODE = @CXXDEPMODE@
  CXXFLAGS = @CXXFLAGS@
  CYGPATH_W = @CYGPATH_W@
- DB_EXT = @DB_EXT@
  DD = @DD@
+ DEFAULT_AMANDATES_FILE = @DEFAULT_AMANDATES_FILE@
  DEFAULT_CHANGER_DEVICE = @DEFAULT_CHANGER_DEVICE@
  DEFAULT_CONFIG = @DEFAULT_CONFIG@
- DEFAULT_RAW_TAPE_DEVICE = @DEFAULT_RAW_TAPE_DEVICE@
  DEFAULT_SERVER = @DEFAULT_SERVER@
  DEFAULT_TAPE_DEVICE = @DEFAULT_TAPE_DEVICE@
  DEFAULT_TAPE_SERVER = @DEFAULT_TAPE_SERVER@
@@@ -208,60 -283,169 +285,171 @@@ ECHO_C = @ECHO_C
  ECHO_N = @ECHO_N@
  ECHO_T = @ECHO_T@
  EGREP = @EGREP@
- ENABLE_MANPAGE_BUILD_FALSE = @ENABLE_MANPAGE_BUILD_FALSE@
- ENABLE_MANPAGE_BUILD_TRUE = @ENABLE_MANPAGE_BUILD_TRUE@
  EOVERFLOW = @EOVERFLOW@
  EXAMPLE_TAPEDEV = @EXAMPLE_TAPEDEV@
  EXEEXT = @EXEEXT@
  F77 = @F77@
  FFLAGS = @FFLAGS@
- GCC_COMPILER_FALSE = @GCC_COMPILER_FALSE@
- GCC_COMPILER_TRUE = @GCC_COMPILER_TRUE@
+ FLOAT_H = @FLOAT_H@
  GETCONF = @GETCONF@
- GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
- GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+ GETTEXT = @GETTEXT@
+ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_MKENUMS = @GLIB_MKENUMS@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+ GNULIB_CHOWN = @GNULIB_CHOWN@
+ GNULIB_DUP2 = @GNULIB_DUP2@
+ GNULIB_FCHDIR = @GNULIB_FCHDIR@
+ GNULIB_FFLUSH = @GNULIB_FFLUSH@
+ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+ GNULIB_FSEEK = @GNULIB_FSEEK@
+ GNULIB_FSEEKO = @GNULIB_FSEEKO@
+ GNULIB_FTELL = @GNULIB_FTELL@
+ GNULIB_FTELLO = @GNULIB_FTELLO@
+ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+ GNULIB_GETCWD = @GNULIB_GETCWD@
+ GNULIB_GETDELIM = @GNULIB_GETDELIM@
+ GNULIB_GETLINE = @GNULIB_GETLINE@
+ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+ GNULIB_LCHOWN = @GNULIB_LCHOWN@
+ GNULIB_LSEEK = @GNULIB_LSEEK@
+ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+ GNULIB_MBSCHR = @GNULIB_MBSCHR@
+ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+ GNULIB_MBSLEN = @GNULIB_MBSLEN@
+ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+ GNULIB_MBSSEP = @GNULIB_MBSSEP@
+ GNULIB_MBSSPN = @GNULIB_MBSSPN@
+ GNULIB_MBSSTR = @GNULIB_MBSSTR@
+ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+ GNULIB_MEMMEM = @GNULIB_MEMMEM@
+ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+ GNULIB_READLINK = @GNULIB_READLINK@
+ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+ GNULIB_SLEEP = @GNULIB_SLEEP@
+ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+ GNULIB_STPCPY = @GNULIB_STPCPY@
+ GNULIB_STPNCPY = @GNULIB_STPNCPY@
+ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+ GNULIB_STRDUP = @GNULIB_STRDUP@
+ GNULIB_STRNDUP = @GNULIB_STRNDUP@
+ GNULIB_STRNLEN = @GNULIB_STRNLEN@
+ GNULIB_STRPBRK = @GNULIB_STRPBRK@
+ GNULIB_STRSEP = @GNULIB_STRSEP@
+ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
  GNUPLOT = @GNUPLOT@
  GNUTAR = @GNUTAR@
  GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@
- GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@
+ GOBJECT_QUERY = @GOBJECT_QUERY@
  GREP = @GREP@
  GZIP = @GZIP@
+ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
  HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
  HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+ HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
  HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
  HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
  HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
  HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
  HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+ HAVE_DUP2 = @HAVE_DUP2@
+ HAVE_FSEEKO = @HAVE_FSEEKO@
+ HAVE_FTELLO = @HAVE_FTELLO@
+ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+ HAVE_IO_H = @HAVE_IO_H@
+ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+ HAVE_LSTAT = @HAVE_LSTAT@
+ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
  HAVE_MEMPCPY = @HAVE_MEMPCPY@
+ HAVE_MKDTEMP = @HAVE_MKDTEMP@
+ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+ HAVE_READLINK = @HAVE_READLINK@
+ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+ HAVE_SLEEP = @HAVE_SLEEP@
+ HAVE_STDINT_H = @HAVE_STDINT_H@
  HAVE_STPCPY = @HAVE_STPCPY@
  HAVE_STPNCPY = @HAVE_STPNCPY@
+ HAVE_STRCASECMP = @HAVE_STRCASECMP@
+ HAVE_STRCASESTR = @HAVE_STRCASESTR@
  HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
  HAVE_STRNDUP = @HAVE_STRNDUP@
  HAVE_STRPBRK = @HAVE_STRPBRK@
  HAVE_STRSEP = @HAVE_STRSEP@
+ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+ HAVE_UNISTD_H = @HAVE_UNISTD_H@
+ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+ HAVE_VASPRINTF = @HAVE_VASPRINTF@
  HAVE_VISIBILITY = @HAVE_VISIBILITY@
+ HAVE_WCHAR_H = @HAVE_WCHAR_H@
+ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
  HAVE__BOOL = @HAVE__BOOL@
+ INCLUDE_NEXT = @INCLUDE_NEXT@
+ INSTALL = @INSTALL@
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
  LDFLAGS = @LDFLAGS@
  LEX = @LEX@
  LEXLIB = @LEXLIB@
  LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBCURL = @LIBCURL@
+ LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
  LIBMULTITHREAD = @LIBMULTITHREAD@
  LIBOBJS = @LIBOBJS@
  LIBPTH = @LIBPTH@
- LIBPTH_PREFIX = @LIBPTH_PREFIX@
  LIBS = @LIBS@
  LIBTHREAD = @LIBTHREAD@
  LIBTOOL = @LIBTOOL@
  LIBTOOL_DEPS = @LIBTOOL_DEPS@
 +LL_FMT = @LL_FMT@
 +LL_RFMT = @LL_RFMT@
  LN_S = @LN_S@
- LTALLOCA = @LTALLOCA@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
  LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
  LTLIBOBJS = @LTLIBOBJS@
  LTLIBPTH = @LTLIBPTH@
@@@ -271,10 -455,24 +459,24 @@@ MAKEINFO = @MAKEINFO
  MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@
  MCUTIL = @MCUTIL@
  MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
  MT = @MT@
  MTX = @MTX@
  MT_FILE_FLAG = @MT_FILE_FLAG@
  NETINET_IN_H = @NETINET_IN_H@
+ NEXT_FLOAT_H = @NEXT_FLOAT_H@
+ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+ NEXT_STDINT_H = @NEXT_STDINT_H@
+ NEXT_STDIO_H = @NEXT_STDIO_H@
+ NEXT_STDLIB_H = @NEXT_STDLIB_H@
+ NEXT_STRING_H = @NEXT_STRING_H@
+ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+ NEXT_UNISTD_H = @NEXT_UNISTD_H@
+ NEXT_WCHAR_H = @NEXT_WCHAR_H@
  OBJEXT = @OBJEXT@
  PACKAGE = @PACKAGE@
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@@ -285,24 -483,58 +487,58 @@@ PACKAGE_VERSION = @PACKAGE_VERSION
  PATH_SEPARATOR = @PATH_SEPARATOR@
  PCAT = @PCAT@
  PERL = @PERL@
+ PERLEXTLIBS = @PERLEXTLIBS@
+ PERL_INC = @PERL_INC@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
  PRINT = @PRINT@
+ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
  RANLIB = @RANLIB@
  READLINE_LIBS = @READLINE_LIBS@
- REPLACE_STRCASECMP = @REPLACE_STRCASECMP@
- REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
- REPLACE_STRSTR = @REPLACE_STRSTR@
+ REPLACE_CHOWN = @REPLACE_CHOWN@
+ REPLACE_FCHDIR = @REPLACE_FCHDIR@
+ REPLACE_FFLUSH = @REPLACE_FFLUSH@
+ REPLACE_FPRINTF = @REPLACE_FPRINTF@
+ REPLACE_FSEEK = @REPLACE_FSEEK@
+ REPLACE_FSEEKO = @REPLACE_FSEEKO@
+ REPLACE_FTELL = @REPLACE_FTELL@
+ REPLACE_FTELLO = @REPLACE_FTELLO@
+ REPLACE_GETCWD = @REPLACE_GETCWD@
+ REPLACE_GETLINE = @REPLACE_GETLINE@
+ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+ REPLACE_LCHOWN = @REPLACE_LCHOWN@
+ REPLACE_LSEEK = @REPLACE_LSEEK@
+ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+ REPLACE_PRINTF = @REPLACE_PRINTF@
+ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+ REPLACE_SPRINTF = @REPLACE_SPRINTF@
+ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+ REPLACE_VPRINTF = @REPLACE_VPRINTF@
+ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
  RESTORE = @RESTORE@
  SAMBA_CLIENT = @SAMBA_CLIENT@
  SERVICE_SUFFIX = @SERVICE_SUFFIX@
  SETUID_GROUP = @SETUID_GROUP@
  SET_MAKE = @SET_MAKE@
  SHELL = @SHELL@
+ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
  SNAPSHOT_STAMP = @SNAPSHOT_STAMP@
  SORT = @SORT@
  SSH = @SSH@
  STDBOOL_H = @STDBOOL_H@
+ STDINT_H = @STDINT_H@
  STRIP = @STRIP@
+ SVN = @SVN@
+ SWIG = @SWIG@
+ SWIG_LIB = @SWIG_LIB@
  SYS_SOCKET_H = @SYS_SOCKET_H@
+ SYS_STAT_H = @SYS_STAT_H@
+ SYS_TIME_H = @SYS_TIME_H@
+ USE_NLS = @USE_NLS@
  USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@
  VDUMP = @VDUMP@
  VERSION = @VERSION@
@@@ -314,59 -546,46 +550,46 @@@ VERSION_SUFFIX = @VERSION_SUFFIX
  VRESTORE = @VRESTORE@
  VXDUMP = @VXDUMP@
  VXRESTORE = @VXRESTORE@
- WANT_AMPLOT_FALSE = @WANT_AMPLOT_FALSE@
- WANT_AMPLOT_TRUE = @WANT_AMPLOT_TRUE@
- WANT_CHG_SCSI_FALSE = @WANT_CHG_SCSI_FALSE@
- WANT_CHG_SCSI_TRUE = @WANT_CHG_SCSI_TRUE@
- WANT_CHIO_SCSI_FALSE = @WANT_CHIO_SCSI_FALSE@
- WANT_CHIO_SCSI_TRUE = @WANT_CHIO_SCSI_TRUE@
- WANT_CLIENT_FALSE = @WANT_CLIENT_FALSE@
- WANT_CLIENT_TRUE = @WANT_CLIENT_TRUE@
- WANT_RECOVER_FALSE = @WANT_RECOVER_FALSE@
- WANT_RECOVER_TRUE = @WANT_RECOVER_TRUE@
- WANT_RESTORE_FALSE = @WANT_RESTORE_FALSE@
- WANT_RESTORE_TRUE = @WANT_RESTORE_TRUE@
- WANT_RUNTIME_PSEUDO_RELOC_FALSE = @WANT_RUNTIME_PSEUDO_RELOC_FALSE@
- WANT_RUNTIME_PSEUDO_RELOC_TRUE = @WANT_RUNTIME_PSEUDO_RELOC_TRUE@
- WANT_SAMBA_FALSE = @WANT_SAMBA_FALSE@
- WANT_SAMBA_TRUE = @WANT_SAMBA_TRUE@
- WANT_SERVER_FALSE = @WANT_SERVER_FALSE@
- WANT_SERVER_TRUE = @WANT_SERVER_TRUE@
- WANT_SETUID_CLIENT_FALSE = @WANT_SETUID_CLIENT_FALSE@
- WANT_SETUID_CLIENT_TRUE = @WANT_SETUID_CLIENT_TRUE@
- WANT_SSH_SECURITY_FALSE = @WANT_SSH_SECURITY_FALSE@
- WANT_SSH_SECURITY_TRUE = @WANT_SSH_SECURITY_TRUE@
- WANT_TAPE_FALSE = @WANT_TAPE_FALSE@
- WANT_TAPE_TRUE = @WANT_TAPE_TRUE@
+ WCHAR_H = @WCHAR_H@
+ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+ WINT_T_SUFFIX = @WINT_T_SUFFIX@
  XFSDUMP = @XFSDUMP@
  XFSRESTORE = @XFSRESTORE@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XSLREL = @XSLREL@
  XSLTPROC = @XSLTPROC@
  XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
  YACC = @YACC@
- ac_c = @ac_c@
- ac_ct_AR = @ac_ct_AR@
+ YFLAGS = @YFLAGS@
+ _libcurl_config = @_libcurl_config@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
  ac_ct_CC = @ac_ct_CC@
  ac_ct_CXX = @ac_ct_CXX@
  ac_ct_F77 = @ac_ct_F77@
- ac_ct_RANLIB = @ac_ct_RANLIB@
- ac_ct_STRIP = @ac_ct_STRIP@
- ac_n = @ac_n@
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
+ amincludedir = @amincludedir@
+ amlibdir = @amlibdir@
+ amlibexecdir = @amlibexecdir@
+ amperldir = @amperldir@
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
+ builddir = @builddir@
  datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
  exec_prefix = @exec_prefix@
  gl_LIBOBJS = @gl_LIBOBJS@
  gl_LTLIBOBJS = @gl_LTLIBOBJS@
@@@ -375,32 -594,41 +598,41 @@@ host_alias = @host_alias
  host_cpu = @host_cpu@
  host_os = @host_os@
  host_vendor = @host_vendor@
+ htmldir = @htmldir@
  includedir = @includedir@
  infodir = @infodir@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
+ localedir = @localedir@
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
  oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
  prefix = @prefix@
  program_transform_name = @program_transform_name@
+ psdir = @psdir@
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
  sysconfdir = @sysconfdir@
  target = @target@
  target_alias = @target_alias@
  target_cpu = @target_cpu@
  target_os = @target_os@
  target_vendor = @target_vendor@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
  INCLUDES = -I$(top_builddir)/common-src \
                -I$(top_srcdir)/common-src   \
                -I$(top_srcdir)/gnulib
  
+ AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
+ AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
  LINT = @AMLINT@
  LINTFLAGS = @AMLINTFLAGS@
- lib_LTLIBRARIES = libamtape.la
amlib_LTLIBRARIES = libamtape.la
  LIB_EXTENSION = la
  libamtape_la_SOURCES = output-file.c \
                        output-null.c \
                        tapeio.c
  
  libamtape_la_LDFLAGS = -release $(VERSION)
+ libamtape_la_LIBADD = ../common-src/libamanda.$(LIB_EXTENSION)
  
  ###
  # Because libamanda includes routines (e.g. regex) provided by some system
@@@ -432,6 -661,10 +665,10 @@@ noinst_HEADERS = 
                        output-tape.h \
                        tapeio.h
  
+ INSTALLPERMS_exec = \
+       dest=$(sbindir) chown=amanda $(sbin_PROGRAMS) $(sbin_SCRIPTS) \
+       dest=$(amlibexecdir) chown=amanda $(amlibexec_PROGRAMS) $(amlibexec_SCRIPTS)
  amtapeio_SOURCES = amtapeio.test.c
  amtapeio_LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
                        libamtape.$(LIB_EXTENSION) \
@@@ -441,7 -674,7 +678,7 @@@ all: all-a
  
  .SUFFIXES:
  .SUFFIXES: .c .lo .o .obj
- $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/config/automake/precompile.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@@ -470,38 -703,38 +707,38 @@@ $(top_srcdir)/configure:  $(am__configu
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
- install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ install-amlibLTLIBRARIES: $(amlib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       test -z "$(amlibdir)" || $(MKDIR_P) "$(DESTDIR)$(amlibdir)"
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
            f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           echo " $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(amlibdir)/$$f'"; \
+           $(LIBTOOL) --mode=install $(amlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(amlibdir)/$$f"; \
          else :; fi; \
        done
  
- uninstall-libLTLIBRARIES:
+ uninstall-amlibLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(amlibdir)/$$p'"; \
+         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(amlibdir)/$$p"; \
        done
  
- clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ clean-amlibLTLIBRARIES:
+       -test -z "$(amlib_LTLIBRARIES)" || rm -f $(amlib_LTLIBRARIES)
+       @list='$(amlib_LTLIBRARIES)'; for p in $$list; do \
          dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
          test "$$dir" != "$$p" || dir=.; \
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
  libamtape.la: $(libamtape_la_OBJECTS) $(libamtape_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libamtape_la_LDFLAGS) $(libamtape_la_OBJECTS) $(libamtape_la_LIBADD) $(LIBS)
+       $(libamtape_la_LINK) -rpath $(amlibdir) $(libamtape_la_OBJECTS) $(libamtape_la_LIBADD) $(LIBS)
  install-sbinPROGRAMS: $(sbin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
+       test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
        @list='$(sbin_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
@@@ -529,16 -762,16 +766,16 @@@ clean-sbinPROGRAMS
        done
  amdd$(EXEEXT): $(amdd_OBJECTS) $(amdd_DEPENDENCIES) 
        @rm -f amdd$(EXEEXT)
-       $(LINK) $(amdd_LDFLAGS) $(amdd_OBJECTS) $(amdd_LDADD) $(LIBS)
+       $(LINK) $(amdd_OBJECTS) $(amdd_LDADD) $(LIBS)
  ammt$(EXEEXT): $(ammt_OBJECTS) $(ammt_DEPENDENCIES) 
        @rm -f ammt$(EXEEXT)
-       $(LINK) $(ammt_LDFLAGS) $(ammt_OBJECTS) $(ammt_LDADD) $(LIBS)
+       $(LINK) $(ammt_OBJECTS) $(ammt_LDADD) $(LIBS)
  amtapeio$(EXEEXT): $(amtapeio_OBJECTS) $(amtapeio_DEPENDENCIES) 
        @rm -f amtapeio$(EXEEXT)
-       $(LINK) $(amtapeio_LDFLAGS) $(amtapeio_OBJECTS) $(amtapeio_LDADD) $(LIBS)
+       $(LINK) $(amtapeio_OBJECTS) $(amtapeio_LDADD) $(LIBS)
  amtapetype$(EXEEXT): $(amtapetype_OBJECTS) $(amtapetype_DEPENDENCIES) 
        @rm -f amtapetype$(EXEEXT)
-       $(LINK) $(amtapetype_LDFLAGS) $(amtapetype_OBJECTS) $(amtapetype_LDADD) $(LIBS)
+       $(LINK) $(amtapetype_OBJECTS) $(amtapetype_LDADD) $(LIBS)
  
  mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@@ -557,22 -790,22 +794,22 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tapetype.Po@am__quote@
  
  .c.o:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c $<
  
  .c.obj:
- @am__fastdepCC_TRUE@  if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
  
  .c.lo:
- @am__fastdepCC_TRUE@  if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- @am__fastdepCC_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ @am__fastdepCC_TRUE@  $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@@ -583,10 -816,6 +820,6 @@@ mostlyclean-libtool
  clean-libtool:
        -rm -rf .libs _libs
  
- distclean-libtool:
-       -rm -f libtool
- uninstall-info-am:
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@@ -636,22 -865,21 +869,21 @@@ distclean-tags
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
  distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
@@@ -666,8 -894,8 +898,8 @@@ check-am: all-a
  check: check-am
  all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
  installdirs:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(amlibdir)" "$(DESTDIR)$(sbindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
  install: install-am
  install-exec: install-exec-am
@@@ -696,14 -924,14 +928,14 @@@ maintainer-clean-generic
        @echo "it deletes files that may require special tools to rebuild."
  clean: clean-am
  
- clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-am: clean-amlibLTLIBRARIES clean-generic clean-libtool \
        clean-sbinPROGRAMS mostlyclean-am
  
  distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
  
  dvi: dvi-am
  
@@@ -715,16 -943,22 +947,22 @@@ info: info-a
  
  info-am:
  
- install-data-am:
+ install-data-am: install-amlibLTLIBRARIES
  
- install-exec-am: install-libLTLIBRARIES install-sbinPROGRAMS
-       @$(NORMAL_INSTALL)
-       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+ install-dvi: install-dvi-am
+ install-exec-am: install-sbinPROGRAMS
+ install-html: install-html-am
  
  install-info: install-info-am
  
  install-man:
  
+ install-pdf: install-pdf-am
+ install-ps: install-ps-am
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
@@@ -745,41 -979,36 +983,36 @@@ ps: ps-a
  
  ps-am:
  
- uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
-       uninstall-sbinPROGRAMS
+ uninstall-am: uninstall-amlibLTLIBRARIES uninstall-sbinPROGRAMS
  
- .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libLTLIBRARIES clean-libtool clean-sbinPROGRAMS ctags \
-       distclean distclean-compile distclean-generic \
-       distclean-libtool distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-exec-hook \
-       install-info install-info-am install-libLTLIBRARIES \
-       install-man install-sbinPROGRAMS install-strip installcheck \
+ .MAKE: install-am install-strip
+ .PHONY: CTAGS GTAGS all all-am check check-am clean \
+       clean-amlibLTLIBRARIES clean-generic clean-libtool \
+       clean-sbinPROGRAMS ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-amlibLTLIBRARIES install-data install-data-am \
+       install-dvi install-dvi-am install-exec install-exec-am \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-sbinPROGRAMS install-strip installcheck \
        installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-info-am \
-       uninstall-libLTLIBRARIES uninstall-sbinPROGRAMS
- install-exec-hook:
-       @list="$(sbin_PROGRAMS) $(sbin_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
-       @list="$(libexec_PROGRAMS) $(libexec_SCRIPTS)"; \
-       for p in $$list; do \
-               pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
-               echo chown $(BINARY_OWNER) $$pa; \
-               chown $(BINARY_OWNER) $$pa; \
-               echo chgrp $(SETUID_GROUP) $$pa; \
-               chgrp $(SETUID_GROUP) $$pa; \
-       done
+       tags uninstall uninstall-am uninstall-amlibLTLIBRARIES \
+       uninstall-sbinPROGRAMS
+ # A rule to make precompiler output from C files.  This is not used during
+ # ordinary builds, but but can very useful in debugging problems on strange
+ # architectures.  With this rule, we can ask users to 'make foo.i' and send
+ # the result to us.
+ #
+ # It touches some automake internals ($COMPILE), but since it's not
+ # build-critical, that's OK.
+ %.i : %.c
+       $(COMPILE) -E -o $@ $<
  
  amtapeio.test.c: $(srcdir)/tapeio.c
        echo '#define TEST' >$@
@@@ -804,7 -1033,7 +1037,7 @@@ lint
                (cd ../common-src; make listlibsrc);                            \
                f="$$f "`cat ../common-src/listlibsrc.output`;                  \
                echo $(LINT) $$f;                                               \
-               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config        \
+               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config   \
                    $(INCLUDES) $$f;                                            \
                if [ $$? -ne 0 ]; then                                          \
                    exit 1;                                                     \