From: Bdale Garbee Date: Wed, 22 Oct 2008 16:12:03 +0000 (+0200) Subject: Merge branch 'upstream' X-Git-Tag: debian/2.6.1p1-1~38 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=e442edb4d5816c4ad107ad9e71164f845eba70ad;hp=6ba576375c19b829b2a13dbe6562eedd2716b9ea;p=debian%2Famanda Merge branch 'upstream' 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 --- diff --git a/AUTHORS b/AUTHORS index 1c7e95f..3f98f3d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -33,8 +33,7 @@ point after release 2.3.0.4. - John R. Jackson : security fixes, active developer and supporter -- Jean-Louis Martineau : active developer -and supporter +- Jean-Louis Martineau : active developer and supporter - Thomas Hepper : active developer of changer-src @@ -50,5 +49,7 @@ and supporter - Ian Turner (ian@zmanda.com>: active developer and supporter +- Dustin J. Mitchell (dustin@zmanda.com>: active developer and supporter + Many other people have contributed to the development of Amanda; check the ChangeLog for their names and e-mail addresses. diff --git a/ChangeLog b/ChangeLog index fbba979..271276c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,45 +1,2586 @@ -2007-06-06 Jean-Louis Martineau - * Amanda 2.5.2p1 released. +2008-08-22 Jean-Louis Martineau + * 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 + * perl/amglue/bigint.c: add #include "stdint.h" + +2008-08-22 Jean-Louis Martineau + * 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 + Thanks to Stefan G. Weichinger + * 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 + * changer-src/chg-disk.sh: replace == with = + +2008-08-22 Dustin J. Mitchell + * changer-src/chg-lib.sh.in: fix sed invocation for BSD's sed + +2008-08-22 Jean-Louis Martineau + * server-src/reporter.c: Fix computation of compression ratio. + +2008-08-21 Jean-Louis Martineau + * common-src/krb5-security.c: Fix security_seterror use. + +2008-08-21 Jean-Louis Martineau + * device-src/queueing.c: Fix compiler warning. + +2008-08-19 Dustin J. Mitchell + * configure.in: check for getgrgid_r and getpwuid_r + * common-src/security-util.c: conditionalize on checks + +2008-08-18 Dustin J. Mitchell + * common-src/version.h: remove #include of config.h + * device-src/vfs-device.c: #include amanda.h first + +2008-08-15 Dustin J. Mitchell + * 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 + * packaging/rpm/amanda.spec: Merged fixes from trunk .spec for + parsing redhat-release for fedora versions correctly. + +2008-08-04 Dan Locks + * 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 + * 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 + * 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 + * packaging/rpm/amanda.spec: removed activate-devpay from %files section + +2008-07-30 Dan Locks + * 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 + * installcheck/Amanda_Config.pl: add + to avoid perl-5.6.0 parsing bug + * installcheck/amgetconf.pl: ditto + +2008-07-28 Dustin J. Mitchell + * client-src/sendsize.c: remove cruft causing compile errors on HP/UX + +2008-07-28 Dustin J. Mitchell + * device-src/tests/semaphore-test.c: move function call out of + variable initialization + +2008-07-25 Dan Locks + * 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 + * common-src/conffile.c: fix handling for config overwrites of + non-string parameters + +2008-07-17 Jean-Louis Martineau + * amandad-src/amandad.c: amandad must be run by root for krb5 auth. + +200i-07-14 Dan Locks + * packaging/rpm/amanda.spec: fix distribution detection, add + activate-devpay to server files list + +2008-07-11 Dustin J. Mitchell + * 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 + Thanks to Stefan G. Weichinger + * 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 + * 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 + * perl/Amanda/Logfile.swg: POD tweaks + +2008-07-06 Dan Locks + * 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 + * packaging/rpm/buildpkg: add lines to copy rpms to root of the build dir. + +2008-06-30 Ian Turner + * 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 + * device-src/rait-device.c (rait_device_start): Check for consistent + volume label on all child devices, otherwise fail + +2008-06-27 Ian Turner + * device-src/rait-device.c: Silence a compiler warning. + +2008-06-27 Dustin J. Mitchell + * device-src/rait-device.c: hack around glib bug in versions <2.10.2 + +2008-06-09 Dustin J. Mitchell + * 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 + * 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 + * 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 + * common-src/security-util.c: Remove unneeded pointer cast. + * common-src/stream.c: Fix compiler error. -2007-06-06 Jean-Louis Martineau - * restore-src/restore.c: accept all header with size >= DISK_BLOCK_BYTES +2008-05-30 Dustin J. Mitchell + * 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 + * 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 + * common-src/conffile.c (client_keytab): Remove "DEVICE-PROPERTY". + +2008-05-28 Dustin J. Mitchell + * device-src/rait-device.c: rait-device returns correct size when + blocksize is too small + +2008-05-25 Jean-Louis Martineau + * changer-src/chg-zd-mtx.sh: Fix logging. + +2008-05-25 Jean-Louis Martineau + * packaging/rpm/amanda.spec: Fix output message. + +2008-05-21 Jean-Louis Martineau + * server-src/driver.c: Fix quoting of diskname. + +2008-05-20 Dustin J. Mitchell + * 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 + * 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 + * common-src/conffile.c: Fix conf_parserror use. + +2008-05-13 Dan Locks + * packaging/deb/buildpkg: modified build script to create unsigned + packages + +2008-05-12 Jean-Louis Martineau + 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 + * 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 + * 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 + * common-src/conffile.c: Define default tapetype. + +2008-05-07 Jean-Louis Martineau + * common-src/conffile.c: Check the tapetype is defined. + +2008-05-07 Jean-Louis Martineau + * 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 + * packaging/rpm/amanda.spec: Replace ${ with %{ where applicable. + +2008-04-23 Jean-Louis Martineau + * common-src/security-util.c: Typo. + +2008-04-23 Jean-Louis Martineau + * server-src/driver.c: Always sent a FAILED to taper if dumper failed. + +2008-04-23 Jean-Louis Martineau + * server-src/planner.c: Fix vstrextend use. + +2008-04-16 Dan Locks + * 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 + * 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 + * 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 + * common-src/file.c(mk1dir): fix reversed conditional to handle + a race condition + +2008-04-15 Jean-Louis Martineau + * common-src/debug.c (debug_logging_handler, debug_printf): Don't print + msg_timestamp() to stderr. + +2008-04-15 Jean-Louis Martineau + * 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 + * tape-src/tapetype.c: Initialize an default config. + +2008-04-15 Jean-Louis Martineau + * common-src/util.c (connect_portrange, connect_port, bind_portrange): + Return the latest errno reported. + +2008-04-04 Jean-Louis Martineau + * man/xml-source/*.xml: Use ulink tag to link to wiki.zmanda.com. + +2008-04-04 Jean-Louis Martineau + * restore-src/restore.c: Check last_header->type != F_UNKNOWN. + +2008-03-31 Dan Locks + * packaging/deb/buildpkg + packaging/rpm/buildpkg: added -p to cp to preserve file timestamps. + +2008-03-31 Dan Locks + * packaging/Makefile.am: add deb subdirectory. + +2008-03-27 Jean-Louis Martineau + * device-src/activate-devpay.c (parse_commandline): Always return. + +2008-03-25 Jean-Louis Martineau + * 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 + * server-src/reporter.c: Check difference between origsize and outsize + to find if the image is compressed. + +2008-03-25 Jean-Louis Martineau + 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 + * common-src/security-util.c (show_stat_info): Use getpwuid_r + and getgrgid_r. + +2008-03-25 Dustin J. Mitchell + * config/amanda/swig.m4: fix the fix to the fix for FreeBSD systems' + peculiar linking of threading libraries. + +2008-03-20 Dan Locks + * 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 + * 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 + * server-src/diskfile.c: Correctly check if two hosts map to the same + name. + +2008-03-14 Dan Locks + * 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 + * 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 + * 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 + * device-src/tests/semaphore-test.c, + device-src/tests/vfs_test.c: Call amanda_thread_init(NULL). + +2008-03-07 Jean-Louis Martineau + * 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 + * common-src/Makefile.am: dest=$(amlibexecdir). + +2008-03-06 Jean-Louis Martineau + * 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 + * 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 + * config/amanda/swig.m4: Check for *freebsd[123456]* + +2008-03-05 Jean-Louis Martineau + * 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 + * packaging/rpm/amanda.spec: Give CFLAGS after ./configure + +2008-03-05 Dustin J. Mitchell + * config/amanda/swig.m4: With many thanks to John E. Hein + , fix the comment and make the change committed + yesterday apply to all FreeBSD < 7.0. + +2008-03-05 Dustin J. Mitchell + * 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 + * packaging/rpm/amanda.spec: Add %{PERLSITELIB} in %files sections. + +2008-03-05 Jean-Louis Martineau + * 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 + * device-src/tape-device.c: Set d_self->is_eof to FALSE. + +2008-03-04 Dustin J. Mitchell + * 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 + * common-src/security-util.c: getnameinfo return != 0 on error. + +2008-03-03 Jean-Louis Martineau + * config/amanda/dumpers.m4: Typo. + +2008-03-03 Jean-Louis Martineau + * device-src/tests/vfs_test.c: Fix ignoring + return value of 'pipe', declared with attribute warn_unused_result. + +2008-02-29 Dustin J. Mitchell + * common-src/amanda.h: add + +2008-02-29 Dustin J. Mitchell + * installcheck/Amanda_Config.pl: fix Amanda_Config's use of the + missing Amanda::Tests + +2008-02-29 Dustin J. Mitchell + * installcheck/Makefile.am: remove Amconfig.pm from EXTRA_DIST, as it + is a generated file. + +2008-02-28 Dustin J. Mitchell + Thanks to John E. Hein 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 + * 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 + * server-src/find.c: Use sort_key in switch statement. + +2008-02-26 Jean-Louis Martineau + * 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 + * 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 + for help and suggestions. + +2008-02-26 Jean-Louis Martineau + * client-src/getfsent.c: Don't fail if stat of mount point fail. + +2008-02-26 Jean-Louis Martineau + * common-src/util.c: Don't log a note if CLIENT_LOGIN == dumpuser for + RUNNING_AS_DUMPUSER_PREFERRED. + +2008-02-25 Jean-Louis Martineau + * server-src/reporter.c: Report size of data on holding disk. + +2008-02-20 Jean-Louis Martineau + * config/amanda/dirs.m4: Add --with-amlibdir and --with-amlibexecdir. + * NEWS, ReleaseNotes: Document it. + +2008-02-20 Jean-Louis Martineau + * server-src/amcheck.c, server-src/dumper.c, + server-src/planner.c: Call waitpid to cleanup defunct process. + +2008-02-20 Dustin J. Mitchell + * device-src/tape-posix.c: keep ioctl error message in + debug log + +2008-02-19 Jean-Louis Martineau + * 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 + * common-src/util.c (quote_string): Quote single quote ('). + * server-src/find.c:Correctly compute length of diskname. + +2008-02-15 Dustin J. Mitchell + * 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 + * packaging/rpm/amanda.spec: Fix typo. + +2008-02-15 Jean-Louis Martineau + * 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 + * 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 + * server-src/amdump.sh: Don't use 'date -d', use sed. + +2008-02-13 Dan Locks + * 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 + * server-src/dumper.c: Fail if no header or no data. + +2008-02-12 Jean-Louis Martineau + * server-src/amstatus.pl: Report failure if dumper succeed and + chunker failed. + +2008-02-07 Jean-Louis Martineau + * NEWS, ReleaseNotes: Add notes about rsh/ssh and amandad_path. + +2008-02-07 Jean-Louis Martineau + * 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 + * 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 + * device-src/tape-device.c (tape_device_init): Init min_block_size + and fixed_block_size to 32768. + +2008-02-07 Jean-Louis Martineau + * device-src/tape-posix.c (tape_is_ready): Don't use GMT_ONLINE. + +2008-02-07 Dustin J. Mitchell + * 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 + * 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 + * 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 + * man/xml-src/*: added wiki.zmanda.com to "see also" section of all + man pages. + +2008-01-29 Jean-Louis Martineau + * 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 + * server-src/amstatus.pl: Fix "Use of uninitialized value in string". + +2008-01-28 Dustin J. Mitchell + * installcheck/Amanda_Config.pl common-src/conffile.c: uppercase + displayunit, and add a unit test to be sure. + +2008-01-28 Jean-Louis Martineau + * server-src/amstatus.pl: handle lowercase displayunit. + +2008-01-28 Dustin J. Mitchell + * 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 + for the suggestion. + +2008-01-28 Paddy Sreenivasan + * man/xml-source/amanda.8.xml: Update amanda(8) to reflect 2.6.0 + status + +2008-01-28 Jean-Louis Martineau + * 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 + * 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 + * man/Makefile.am man/xml-source/amcheckdump.8.xml: new manpage + * server-src/amcheckdump.pl: fix usage message + +2008-01-22 Dustin J. Mitchell + * configure.in config/amanda/userid.m4: add --with-single-userid + +2008-01-22 Dustin J. Mitchell + * 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 + * installcheck/Makefile.am: condition installchecks on the selected + components + +2008-01-22 Dustin J. Mitchell + * 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 + * config/amanda/dumpers.m4: eliminate strange warning when + --without-smbclient is given + +2008-01-16 Dustin J. Mitchell + * installcheck/Makefile.am: Require user to specify + CLOBBER_MY_CONFIG=OK when running installchecks + +2008-01-16 Jean-Louis Martineau + * packaging/rpm/amanda.spec: Don't set PKG_CONFIG_PATH. + +2008-01-16 Jean-Louis Martineau + * 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 + * packaging/rpm/amanda.spec: Remove build_host. + +2008-01-15 Dustin J. Mitchell + * 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 + * 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 + * 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 + * 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 + * config/amanda/krb5-security.m4: abort configure run if krb5 + is requested by libraries aren't found + +2008-01-13 Dustin J. Mitchell + * man/xml-source/amanda.conf.5.xml: use × instead of × + +2008-01-11 Paddy Sreenivasan + * device-src/Makefile.am: Don't install queueing.h and device.h + +2008-01-11 Dustin J. Mitchell + * perl/Amanda/Config.swg perl/Amanda/Debug.swg: complete documentation + +2008-01-11 Jean-Louis Martineau + * 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 + * NEWS: Add amcryptsimple, amgpgcrypt, amserverconfig and amaddclient. + * ReleaseNotes: Ditto. + +2008-01-11 Jean-Louis Martineau + * 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 + * common-src/conffile.c (usetimestamps): Default ot yes. + * man/xml-source/amanda.conf.5.xml (usetimestamps): Document it. + +2008-01-10 Jean-Louis Martineau + * 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 + * config/amanda/defaults.m4: Set amandates to $localstatedir/amanda/amandate + +2008-01-10 Jean-Louis Martineau + * server-src/amfreetapes.sh: Use amlibexecdir. + +2008-01-10 Jean-Louis Martineau + * 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 + * 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 + * 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 + * changer-src/scsi-solaris.c: Cleanup. + +2008-01-09 Ian Turner + * 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 + * server-src/amcheckdump.pl: call critical() rather than + using die(). + +2008-01-08 Jean-Louis Martineau + * server-src/amcheckdump.pl: Parse 'amflush: starttime' and + 'planner: timestamp' line. + * server-src/amflush.c: Print correct starttime line. + +2008-01-08 Ian Turner + Most of this work was done by Dustin J. Mitchell + , with contributions by Ian Turner . + * 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 + * server-src/amcheckdump.pl: call critical() rather than + using die(). + +2008-01-08 Jean-Louis Martineau + * 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 + * 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 + * 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 + * recover-src/amrecover.c: Call apply_config_overwrites before + config_init(CONFIG_INIT_EXPLICIT_NAME ...) + +2008-01-07 Jean-Louis Martineau + * 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 + * perl/Amanda/Changer.pm: Use Amanda::Config::get_config_dir(). + +2008-01-07 Jean-Louis Martineau + * 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 + * 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 + * device-src/Makefile.am: Merge typo. + * example/Makefile.am: Merge Typo. + +2007-12-27 Dustin J. Mitchell + * configure.in config/amanda/printf.m4: remove unused + configure checks + +2007-12-27 Paddy Sreenivasan + * server-src/reporter.c: Check for NULL mailto + +2007-12-27 Satya Ganga + * 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 + * server-src/taperscan.c server-src/taper.c: only print error_message + if it is non-NULL + +2007-12-27 Dustin J. Mitchell + * server-src/amrmtape.sh: remove @DB_EXT@, which no longer + exists (since 2007-10-09). + +2007-12-26 Dustin J. Mitchell + * server-src/amverify.sh: fix multiple non-portable shell + techniques + +2007-12-23 Dustin J. Mitchell + 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 + ) + * server-src/amcheckdump.pl: Output partnum. (Jean-Louis + Martineau ) + * server-src/amcheckdump.pl: Add a '/' after the config name. + (Jean-Louis Martineau ) + * 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 ) + * 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 + + * 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 + * server-src/amserverconfig.pl: correct holding disk size + validation logic so that it works on solaris too + +2007-12-21 Satya Ganga + * server-src/amserverconfig.pl: amserverconfig needs to create a empty + changer.conf file + +2007-12-21 Jean-Louis Martineau + Bug reported by Tim Bunnell. + * client-src/getfsent.c (dev2rdev): Do it only for block device. + +2007-12-21 Jean-Louis Martineau + * server-src/taper.c: Unquote holding_disk_file. + +2007-12-20 Dustin J. Mitchell + * common-src/debug.h: fix (cosmetic, but confusing) typo + +2007-12-19 Jean-Louis Martineau + * common-src/util.c (quote_string): Quote ':'. + +2007-12-19 Ian Turner + * server-src/taper.c: Don't crash if there is a problem writing a + brand new tape. + +2007-12-19 Jean-Louis Martineau + * server-src/planner.c: Correctly set planner_timestamp if + usetimestamps is set to no. + +2007-12-18 Jean-Louis Martineau + * server-src/driverio.c (childstr): Check dumper->chunker. + +2007-12-14 Ian Turner + * 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 + * config/amanda/dumpers.m4: Don't set STAR in AMANDA_PROG_SAMBA_CLIENT. + +2007-12-14 Jean-Louis Martineau + * server-src/find.c (search_logfile): Parse taper result line before + merging part_find. + +2007-12-14 Jean-Louis Martineau + * server-src/find.c (find_log): Result should not have duplicate + logfile. + +2007-12-10 Jean-Louis Martineau + * 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 + * config/amanda/progs.m4: Define AMLINT To 'echo;false' to no lint + are found. + +2007-12-10 Jean-Louis Martineau + * 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 + * server-src/amindexd.c: Don't use duplicate part. + +2007-12-07 Jean-Louis Martineau + * restore-src/amfetchdump.c: Don't use duplicate part. + +2007-12-07 Jean-Louis Martineau + * server-src/holding.c (holding_get_all_datestamps): Don't add + duplicate datestamp. + +2007-12-07 Jean-Louis Martineau + * server-src/amcheck.c: Don't complain about correct unlabeled + volumes. + +2007-12-06 Jean-Louis Martineau + * 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 + * server-src/find.c (search_logfile): Parse PARTPARTIAL line. + +2007-12-06 Jean-Louis Martineau + * server-src/taper.c: Use g_strdup if pointer can be NULL. + +2007-12-05 Jean-Louis Martineau + * server-src/taperscan.c: Don't output the latest changer result. + +2007-12-05 Jean-Louis Martineau + * 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 + * 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 + * 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 + * server-src/amtape.c: Correctly output the result of taper scan. + +2007-12-04 Jean-Louis Martineau + * 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 + * server-src/changer.c: Print better message if the changer script + has no output. + +2007-12-03 Jean-Louis Martineau + * man/xml-source/amserverconfig.8.xml: Fix indentation. + +2007-11-30 Jean-Louis Martineau + * 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 + * man/xml-source/amanda.conf.5.xml: Improve documentation. + * example/amanda.conf.in: Ditto. + +2007-11-30 Jean-Louis Martineau + * 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 + * server-src/taperscan.c: Fix output formating. + +2007-11-30 Jean-Louis Martineau + * recover-src/set_commands.c: Add a terminating '/' in cd_regex. + Never add it in cd_dir. + +2007-11-30 Jean-Louis Martineau + * config/automake/scripts.am: Build of the scripts also depend on + $(top_builddir)/config.status + +2007-11-30 Jean-Louis Martineau + * 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 + * 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 + * server-src/find.c: Remove seen_chunk_of function. + +2007-11-28 Jean-Louis Martineau + * config/macro-archive/docbook-dtd.m4: Check return code of 5. + +2007-11-28 Dustin J. Mitchell + * installcheck/Amconfig.pm.in: fix quoting error leading to + directories named '"' + +2007-11-28 Dustin J. Mitchell + * common-src/file.c: only chown new directories when running as root + +2007-11-28 Dustin J. Mitchell + * config/automake/installperms.am: strip directory names from build + filenames when setting permissions; fixes errors from examples/ + install + +2007-11-28 Dustin J. Mitchell + * man/Makefile.am: Allow installs, but not tarballs, without + manpages + +2007-11-27 Jean-Louis Martineau + * server-src/planner.c: Check dp->todo before using (est)->dp. + +2007-11-27 Jean-Louis Martineau + * device-src/device.c (default_device_start): Overwrite label only + if mode == ACCESS_WRITE. + +2007-11-20 Ian Turner + * 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 + for suggesting this change. + +2007-11-20 Ian Turner + * device-src/vfs-device.c: Be more thourough about updating volume + usage statistics. + +2007-11-20 Ian Turner + * 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 + * server-src/taperscan.c: Fix a memory allocation bug and be a little + more paranoid. + +2007-11-06 Ian Turner + * server-src/taperscan.c: Print a proper message if there is + only one flag from device_read_label(). + +2007-11-26 Dustin J. Mitchell + * 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 + * server-src/Makefile.am: Move amdevcheck from libexec/ to sbin/. + Thanks to Satya Ganga for noticing this problem. + +2007-11-26 John Franks + * 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 + * server-src/amflush.c: Send config option (-o) to child process. + +2007-11-23 Jean-Louis Martineau + * server-src/planner.c: Don't set est(dp)->state before testing it. + +2007-11-23 Jean-Louis Martineau + * config/amanda/readline.m4: Include termcap, curses or ncurese in LIBS. + +2007-11-23 Jean-Louis Martineau + * server-src/diskfile.c (match_disklist): Fix for disk not found. + +2007-11-23 Jean-Louis Martineau + * server-src/driver.c: Don't release taper_ev_read in + start_degraded_mode. + +2007-11-20 Paddy Sreenivasan + * amanda.spec: Added calls to Zmanda + * example/amanda-client.conf.in: Switch to bsdtcp + +2007-11-14 Jean-Louis Martineau + * server-src/amstatus.pl: Handle taper FAILED message. + +2007-11-14 Jean-Louis Martineau + * config/amanda/userid.m4: Use $enableval in AC_ARG_ENABLE. + +2007-11-07 Paddy Sreenivasan + * 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 + * 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 + 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 + * AUTHORS: Add Dustin J. Mitchell. + +2007-10-31 John Franks (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 + * 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 + * server-src/taperscan.c: Don't segfault if there is an error opening + a device during taperscan. + +2007-10-30 Dustin J. Mitchell + * 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 + * changer-src/chg-zd-mtx.sh: fix typo + +2007-10-29 Ian Turner + * restore-src/restore.c: Don't mention slot numbers when running + without a changer. + +2007-10-29 Ian Turner + * man/xml-source/amfetchdump.8.xml: Remove documentation for + amfetchdump -i. + +2007-10-26 Dustin J. Mitchell + 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 + * 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 + * 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 + * client-src/Makefile.am: Remove duplicate entry for + libamclient_la_SOURCES. + +2007-10-23 Dustin J. Mitchell + * 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 + * server-src/reporter.c: Always call sort_disks. + +2007-10-20 Jean-Louis Martineau + * man/xml-source/amanda.conf.5.xml: Correctly document portrange. + * common-src/conffile.c: Fix portrange. + +2007-10-20 Jean-Louis Martineau + * common-src/conffile.c: Allow reserved-udp-port and reserved-tcp-port + in amanda-client.conf. + +2007-10-17 Dustin J. Mitchell + * common-src/amanda.h: remove amflock cruft + +2007-10-16 Dustin J. Mitchell + * 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 + * 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 + * device-src/device.c: Fix a compilation error in + device_set_startup_properties_from_config(). + +2007-10-16 Ian Turner + * 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 + * 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 + * client-src/sendbackup-gnutar.c: Use GNUTAR. + +2007-10-15 Dustin J. Mitchell + * 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 + * 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 + * common-src/protocol.c (s_repwait): return PA_FINISH on P_NAK. + +2007-10-11 Dustin J. Mitchell + * config/amanda/tape.m4: fix typo (have_MTIOCTOP -> HAVE_MTIOCTOP) + +2007-10-10 Dustin J. Mitchell + * 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 + * 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 + * 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 + * 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 + * common-src/util.c (portable_readdir): Don't use reentrant function. + +2007-10-08 Dustin J. Mitchell + * 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 (merged by dustin@zmanda.com) + * example/amanda.conf.in: add segate LTO tapetype + +2007-10-08 Paddy Sreenivasan + * 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 + * 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 + * amanda.spec: add .spec file Zmanda uses for community builds + +2007-10-04 Dustin J. Mitchell + * 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 + * configure.in: Added /opt/local/bin AC_PATH_PROG(PKG_CONFIG.. for + mac osx and macports + +2007-10-03 Jean-Louis Martineau + * server-src/driver.c: Go in degraded mode after out of tape. + +2007-10-02 Jean-Louis Martineau + * man/xml-source/amanda.conf.5.xml: Fix indentation. + +2007-10-02 Dustin J. Mitchell + * server-src/amcheck.c: Fix typo in merge found by + martineau@zmanda.com + +2007-10-01 Ian Turner + * 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 + Coverity bug #237 + * amandad-src/amandad.c: fix a use-after-free + +2007-10-01 Ian Turner + * device-src/device.c: Automatically register the CANONICAL_NAME + property for all devices. + +2007-10-01 Ian Turner + * device-src/tape-posix.c: Use MTEOD on systems that have it but not + MTEOM. + +2007-10-01 Ian Turner + * 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 + * changer-src/chg-lib.sh.in: Fix some compilation problems on + Solaris 10. + +2007-09-25 Dan Locks + * common-src/util.c: cast uid_t to long long for printf formatting + +2007-09-25 Dustin J. Mitchell + * 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 + * client-src/sendsize.c: change "smbclient" to SAMBA_CLIENT to allow + configurable name + +2007-09-25 Dustin J. Mitchell + * 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 + * common-src/amanda.h common-src/file.h: move declaration of + canonicalize_pathname to file.h + +2007-09-25 Dustin J. Mitchell + * 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 + * device-src/property.c device-src/property.h: create VERBOSE property + +2007-09-25 Dustin J. Mitchell + * 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 (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 (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 (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 (merged by dustin@zmanda.com) + * device-src/tape-device.c: Use g_strdup() instead of strdup(). + +2007-09-25 Ian Turner (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 (merged by dustin@zmanda.com) + * server-src/taperscan.c: Fix the order of arguments to + scan_read_label(). Patch by Dustin J. Mitchell . + +2007-09-25 Jean-Louis Martineau (merged by dustin@zmanda.com) + * restore-src/restore.c: Change "no tapedev specified" message. + +2007-09-25 Jean-Louis Martineau (merged by dustin@zmanda.com) + * server-src/amtape.c: changer_label should be called only on success. + +2007-09-25 Jean-Louis Martineau (merged by dustin@zmanda.com) + * restore-src/restore.c: init cur_tapedev. + +2007-09-25 Dustin J. Mitchell + * 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 (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 (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 (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 (merged by dustin@zmanda.com) + * server-src/dumper.c (add_msg_data): Remove bogus handling of " + in mesg stream. + +2007-09-25 Ian Turner (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 (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 (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 (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 (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 (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 (merged by dustin@zmanda.com) + * device-src/vfs-device.c: Use old VFS device specification. + +2007-09-25 Ian Turner (merged by dustin@zmanda.com) + * server-src/amlabel.c: Don't dump core on successful labeling. + +2007-09-25 Dustin J. Mitchell + * 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 (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 (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 + * 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 (merged by dustin@zmanda.com) + Thanks to Pavel Pragin for finding these issues. + * server-src/amtape.c: Update the changer database in 'amtape update'. + Thanks to Dustin J. Mitchell for this fix. + * server-src/taperscan.c: Update the changer database during the + taper scan algorithm. + +2007-09-25 Ian Turner (merged by dustin@zmanda.com) + Thanks to Jean-Louis Martineau 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 (merged by dustin@zmanda.com) + * device-src/tape-device.c: Use the right default block size for + reading. + +2007-09-25 Dustin J. Mitchell + * device-src/vfs-device.c: add forgotten device_add_property() call + +2007-09-25 Ian Turner (merged by dustin@zmanda.com) + * server-src/taper.c: Remove an erroneous assertion. Thanks to + Jean-Louis Martineau for noticing this issue. + +2007-09-25 Patch by Jean-Louis Martineau (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 (merged by dustin@zmanda.com) + * restore-src/restore.c: Don't send text to prompt_out if amidxtaped. + +2007-09-25 Jean-Louis Martineau (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 (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 + * 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 + * 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 + * 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 (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 for help in the development of + this patch. + +2007-09-25 Dustin J. Mitchell + * 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 + * server-src/holding.c (holding_walk_file): amfree(filename). + +2007-09-25 John Franks (merged by dustin@zmanda.com) + * man/Makefile.am: fixes for conditional compiles + +2007-09-25 Ian Turner (merged by dustin@zmanda.com) + * common-src/conffile.c: Clean up some bad warning suppression and + obselete unused code. + +2007-09-25 Ian Turner (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 + * 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 + * 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 (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 + and Jean-Louis Martineau + for help identifying warnings that need fixing. + +2007-09-25 Dustin J. Mitchell + * 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 (merged by dustin@zmanda.com) + * device-src/device.c: Suppress a compiler warning. + +2007-09-24 Ian Turner (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 and + Jean-Louis Martineau for help with this patch. + * restore-src/restore.c: Use the new API. + +2007-09-24 Ian Turner (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 . + * 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 + for help with these fixes. + +2007-09-24 Dustin J. Mitchell + * 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 - * NEWS: Change in 2.5.2p1. - * configure.in: AM_INIT_AUTOMAKE(amanda, 2.5.2p1). +2007-09-24 Dustin J. Mitchell + * 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 (merged by dustin@zmanda.com) + * Correct Cygwin build errors: + common-src/Makefile.am + common-src/amanda.h + +2007-09-24 Dustin J. Mitchell + * 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 + * 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 + * common-src/Makefile.am: remove redundant use of EXTRA_DIST + +2007-09-24 Dustin J. Mitchell + * 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 + * restore-src/restore.c: fix uninitialized value error + +2007-09-24 Dustin J. Mitchell + * 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 + * device-src/tests/queue_test.c: simplify signal handling to + be more portable + +2007-09-24 Dustin J. Mitchell + * 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 (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 for finding and + fixing this bug. + +2007-09-24 Ian Turner (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 (merged by dustin@zmanda.com) + * server-src/amcheck.c: Return 0 if everything is good with the + tape. Thanks to Dustin Mitchell for + reporting this issue, and to Jean-Louis Martineau + for suggesting the form of the fix. + +2007-09-24 Ian Turner (merged by dustin@zmanda.com) + * server-src/restore.c: Only restore files matching requested + disknames. Report and patch by Jean-Louis Martineau + . + +2007-09-24 Ian Turner (merged by dustin@zmanda.com) + * server-src/restore.c: Drop some globals, use data types + responsibly. + +2007-09-24 Ian Turner (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 (merged by dustin@zmanda.com) + * device-src/vfs-device.c: Accept device names without a + terminating '/'. + +2007-09-24 Ian Turner (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 + * 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 + * 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 + * 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 + * 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 + Bug identified by Satya Ganga + * common-src/util.c: handle bad call to check_running_as correctly + +2007-09-11 Dustin J. Mitchell + Bug reported by Bill Bartlett; patch by Jean-Louis Martineau + + * common-src/statfs.c: fix error in available-space calculations + +2007-09-10 Dustin J. Mitchell + * server-src/amcheck.c: quiet compiler warnings when SINGLE_USERID is + defined + +2007-09-10 Dustin J. Mitchell + * 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 + Change by Paul Bijnens + * man/xml-source/amanda.conf.5.xml: Clarify 'etimeout' + +2007-09-07 Dustin J. Mitchell + * gnulib/regenerate/no-error.patch gnulib/Makefile.am: remove + spurious sign-compare warnings from gnulib + +2007-09-05 Dustin J. Mitchell + Bug identified downstream in Debian packaging + * changer-src/chg-null.sh.in: fix typo + +2007-08-29 Dustin J. Mitchell + * common-src/genversion.c common-src/Makefile.am: add subversion revision + and branch info to 'amadmin x version' + +2007-08-23 Dustin J. Mitchell + sf bug #1775316 reported by joerg + * configure.in: use 'sed' instead of shell substitutions to C-quote + ssh arguments + +2007-08-22 Dustin J. Mitchell + * common-src/Makefile.am: adjust dependencies so that 'make dist' can + run without a 'make all' + +2007-08-20 Dustin J. Mitchell + * 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 + * 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 + Patch by C R Ritson + * server-src/amverifyrun.sh.in: "lock" the logfile by creating a + symlink. + +2007-08-06 Dustin J. Mitchell + * example/DLT-A4.ps example/Makefile.am: add new template contributed + by Terry Burton . + +2007-08-01 Dustin J. Mitchell + Patch by Satya Ganga + * server-src/amcleanup.sh.in: shell-compatibility fixes for bash-2.03 + (Solaris 8) + +2007-07-31 Dustin J. Mitchell + * 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 + * restore-src/amfetchdump.c: Check for required arguments in + all cases. + +2007-07-27 Dustin J. Mitchell + * 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 + * restore-src/restore.c: If tpchanger is not defined, then (duh) + don't use the changer. This patch by Jean-Louis Martineau + . + +2007-07-24 Dustin J. Mitchell + * 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 + * 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 + Patch by Dimitri Gorokhovik + * changer-src/chg-multi.sh.in: Typo. + +2007-07-18 Ian Turner (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 + * server-src/reporter.c: fix reporting of STRANGE messages + +2007-07-16 Dustin J. Mitchell + * 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 + * configure.in: add /usr/sfw/bin to SYSPATH for Solaris 10 + +2007-07-13 Jean-Louis Martineau + * changer-src/chg-lib.sh.in: Remoce duplicate amdd, add ammt. + +2007-07-12 Dustin J. Mitchell + * 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 + * recover-src/amrecover.c recover-src/extract_list.c: Add detailed + logging of the amrecover user conversation. + +2007-07-11 Jean-Louis Martineau + Patch by Paul Bijnens + * changer-src/chg-multi.sh.in: Typo. + +2007-07-10 Dustin J. Mitchell + * 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 + 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 + * restore-src/restore.c: Don't do superfluous fsf, + improve error handling. + +2007-07-05 Dustin J. Mitchell + * server-src/amadmin.c: correct misalignment of 'amadmin x balance' + output, as reported by Stefan G. Weichinger . + +2007-07-03 Dustin J. Mitchell + * common-src/amanda.h common-src/amflock.c: remove unused + CONFIGURE_TEST conditionals + +2007-06-28 Dustin J. Mitchell + * 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 . + +2007-06-28 Dustin J. Mitchell + * 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 + * 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 , 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 + * 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 + * 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 + * 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 + * 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 + * tape-src/tapetype.c: close and re-open tape after rewind + (patch from Franz Fischer , modified + by Jean-Louis Martineau ) 2007-06-06 Jean-Louis Martineau - * 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 - Original patch by franz Fischer - * tape-src/tapetype.c: close and open after a rewind. +2007-06-18 Jean-Louis Martineau + * server-src/amstatus.pl.in: Set and use chunk_time. -2007-06-04 Jean-Louis Martineau - * 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 + * server-src/amcleanupdisk.c: don't try to clean up holding disks + if they are empty. + +2007-06-06 Dustin J. Mitchell + * client-src/sendbackup.c: remove bogus check for unknown program + +2007-06-07 Jean-Louis Martineau + Christopher McCrory found the cause of the problem. + * server-src/find.c: Send ouput to stderr. + +2007-06-07 Jean-Louis Martineau + * configure.in: detect GNU tar's 'backup' and ignore it. Thanks + to Jeanna Geier for spotting this. + +2007-06-05 Jean-Louis Martineau + * common-src/util.c: Don't use -w flags for od execution. + +2007-06-05 Dustin J. Mitchell + * 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 + * 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 + * 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 + * 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 + * server-src/amstatus.pl.in: use perl flags -Tw + +2007-06-04 Dustin J. Mitchell + * common-src/debug.c common-src/error.c: fix compilation errors + on strict platforms. 2007-06-04 Jean-Louis Martineau - * 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 - * 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 - * configure.in: Check backup is not from gnutar. +2007-06-04 Dustin J. Mitchell + * 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 - * recover-src/set_commands.c (cd_dir): Validate regex. +2007-06-04 Dustin J. Mitchell + * 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 - * common-src/krb5-security.c: Use keytab_name. - * server-src/holding.c: Remove unused date_matches variable. +2007-06-04 Jean-Louis Martineau + * common-src/krb5-security.c: Typo. -2007-05-30 Jean-Louis Martineau - * server-src/amstatus.pl.in: Set and use chunk_time. +2007-06-01 Ian Turner + * restore-src/restore.c: Set flags->fsf = 0 by default. -2007-05-30 Jean-Louis Martineau - * common-src/util.c: Don't use -w flags for od execution. +2007-05-29 Jean-Louis Martineau + * 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 + * server-src/amstatus.pl.in: Use compressed size. 2007-05-29 Jean-Louis Martineau * server-src/planner.c: Don't report overwrite if no label. @@ -47,22 +2588,243 @@ 2007-05-29 Jean-Louis Martineau * changer-src/chg-manual.sh.in: Don't reset the slot to 0 on eject. -2007-05-25 Jean-Louis Martineau - * server-src/amstatus.pl.in: Put all flags in one arguments. +2007-05-25 Kevin Till + * example/amanda.conf.in: ditto + * man/xml-source/amanda.conf.5.xml: ditto + * common-src/conffile.c: ditto + +2007-05-24 Dustin J. Mitchell + * 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 (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 (merged by dustin@zmanda.com) + * common-src/fileheader.c: + Remove ".exe" extension from program name is tape header. + +2007-05-24 John Franks (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 + * configure.in: add configure.in recognition for Mac OS X + +2007-05-24 John Franks (merged by dustin@zmanda.com) + * configure.in: IPV6 on cygwin only partially works. + Force WORKING_IPV6 to false. + +2007-05-24 Kevin Till (merged by dustin@zmanda.com) + * server-src/driver.c: use amanda text domain in driver + +2007-05-24 John Franks (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 (merged by dustin@zmanda.com) + * server-src/amstatus.pl.in: parse directory and holding_disk_dir with + space correctly + +2007-05-24 John Franks (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 (merged by dustin@zmanda.com) + * server-src/reporter.c: Split FAILED and STRANGE section. + +2007-05-23 John Franks (merged by dustin@zmanda.com) + * common-src/conffile.c: Fix windows compilation warning. + +2007-05-23 John Franks (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 (merged by dustin@zmanda.com) + * configure.in: Prevent annoying lint usage message from + being displayed in configure console output. + +2007-05-23 John Franks (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 (merged by dustin@zmanda.com) + * changer-src/chg-manual.sh.in: Fix quoting; fix gettext usage. + +2007-05-23 John Franks (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 (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 (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 (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 (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 - * common-src/util.c: Fix missing NULL in vstralloc call. +2007-05-17 John Franks (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 - * server-src/amstatus.pl.in: Use compressed size. +2007-05-17 Jean-Louis Martineau + * server-src/amcheck.c: Remove bogus amfree(newtapefile). -2007-05-23 Jean-Louis Martineau - * 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 + * server-src/amcheck.c: Check all tapelist filename. -2007-05-23 Jean-Louis Martineau - * server-src/find.c: Send ouput to stderr. +2007-05-17 Jean-Louis Martineau + * server-src/dumper.c (read_datafd): Reset timeout after the write. 2007-05-17 Jean-Louis Martineau * amplot/amplot.sh.in: Remove function keyword. @@ -70,69 +2832,164 @@ * 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 - * server-src/dumper.c (read_datafd): Reset timeout after the write. - -2007-05-15 Jean-Louis Martineau - * client-src/sendsize.c: Set qlist before using it. - -2007-05-15 Jean-Louis Martineau - * 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 - * 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 - * 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 - * util.c (cmp_sockaddr): Fix compilation. - -2007-05-10 Jean-Louis Martineau - * util.c (cmp_sockaddr): un-map V4mapped address before comparison. - * common-src/security-util.c: add debugging. - -2007-05-08 Jean-Louis Martineau +2007-05-17 Jean-Louis Martineau * server-src/diskfile.c: Fix double free. -2007-05-07 Jean-Louis Martineau - * common-src/alloc.c (debug_vstrallocf): Remove file and line. - * common-src/amanda.h (vstrallocf): Change define. - -2007-05-07 Jean-Louis Martineau +2007-05-17 Jean-Louis Martineau * 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 +2007-05-17 Jean-Louis Martineau * common-src/amanda.h: Define AI_V4MAPPED and AI_ALL. -2007-05-07 Jean-Louis Martineau - * 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 + * util.c (cmp_sockaddr): un-map V4mapped address before comparison. + * common-src/security-util.c: add debugging. + +2007-05-17 Dustin J. Mitchell (merged by dustin@zmanda.com) + * common-src/amanda.h: fix typo (missing 'extern') in erroutput_type + +2007-05-16 John Franks (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 (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 (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 (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 + * client-src/sendsize.c: fix parsing of include/excludes for + old clients + +2007-05-11 Jean-Louis Martineau + * 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 + * common-src/krb5-security.c: Fix compilation. + +2007-05-09 Dustin J. Mitchell + * common-src/stream.c: add errno's to stream_client_internal + +2007-05-09 Dustin J. Mitchell + * 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 + * 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 + * 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 * common-src/stream.c: pass correct sockaddr size to bind() 2007-05-07 Pieter Bowman * common-src/file.c: reverse the order of chown/chmod to correctly - create temporary files. + create temporary files. + +2007-05-07 Jean-Louis Martineau + * common-src/krb5-security.c: Fix compilation. + +2007-05-04 Dustin J. Mitchell + * 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 + * 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 + * 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 + * 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 + * 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 + * configure.in: AM_INIT_AUTOMAKE(amanda, 2.5.3alpha) 2007-05-03 Jean-Louis Martineau * docs/*.txt: Update from xml-docs. @@ -625,6 +3482,7 @@ 2007-01-23 Jean-Louis Martineau * common-src/security-util.c (tcpm_recv_token): Check size < 0. + 2007-01-23 Jean-Louis Martineau * server-src/diskfile.c: Check duplicate DLE with match_host and match_disk. @@ -3660,7 +6518,7 @@ 2006-02-03 Ian Turner * server-src/amadmin.c (main): Don't free conf_tapelist too - early. Thanks to Cédric Lucantis + early. Thanks to Cédric Lucantis for the patch. 2006-02-02 Kevin Till @@ -10553,7 +13411,7 @@ * server-src/amverify.sh.in: Wait until device becomes ready after rewinding. -1999-06-15 Björn Brezger , Alexandre Oliva +1999-06-15 Björn Brezger , Alexandre Oliva * client-src/calcsize.c (ROUND): Rewrite, it was broken. Reported by Erik Lindahl @@ -14240,7 +17098,7 @@ * example/Makefile.am (EXTRA_DIST): add DIN-A4.ps -1998-08-07 Günter Felkel +1998-08-07 Günter Felkel * example/DIN-A4.ps: new file @@ -15054,7 +17912,7 @@ Version 2.4.0p1 -Rob Riggs pass kerberos encryption switch to client. - -Fredrik Jönsson + -Fredrik Jönsson rename afree to amfree, to work around IRIX 6.4's afree. -oliva, reported Stephan P. Martin diff --git a/INSTALL b/INSTALL index 3b50ea9..47bae08 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,10 @@ Basic Installation ================== - These are generic installation instructions. + These are generic installation instructions, and describe in +general how to use ./configure. For Amanda-specific installation +instructions, including system-specific notes, please see +http://wiki.zmanda.com. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses diff --git a/Makefile.am b/Makefile.am index 532bcce..b6824ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,7 @@ ## Process this file with automake to produce Makefile.in 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 if WANT_CLIENT CLIENT_SUBDIRS = client-src dumper-src @@ -14,7 +10,7 @@ if WANT_TAPE TAPE_SUBDIRS = tape-src endif if WANT_SERVER -SERVER_SUBDIRS = server-src changer-src +SERVER_SUBDIRS = device-src server-src changer-src endif if WANT_RESTORE RESTORE_SUBDIRS = restore-src @@ -37,11 +33,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) \ @@ -64,11 +67,9 @@ EXTRA_DIST = $(SNAPSHOT_STAMP) \ contrib/gsc/ucfggsc.c \ patches/regex-3.6alpha.patch \ patches/samba-largefs.patch \ - patches/tar-1.12.patch - -$(ACINCLUDE_M4): $(ACINCLUDE_M4_DEPS) - @-rm -f $@ - @cat $(ACINCLUDE_M4_DEPS) > $@ + patches/tar-1.12.patch \ + UPGRADING \ + DEVELOPING libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck @@ -96,3 +97,7 @@ lint: dist-hook: find $(distdir)/. -name '*.test.c' -exec rm {} \; + +# 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 diff --git a/Makefile.in b/Makefile.in index 1679e3c..209160d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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. @@ -14,15 +14,11 @@ @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 @@ 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 @@ 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) @@ -125,9 +203,9 @@ 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,7 +220,13 @@ 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 +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,52 +263,162 @@ 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@ @@ -233,7 +426,8 @@ 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 +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 +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 +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 +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 +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) \ @@ -417,9 +656,15 @@ EXTRA_DIST = $(SNAPSHOT_STAMP) \ 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 +701,16 @@ $(top_srcdir)/configure: $(am__configure_deps) 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 +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 +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 +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; \ @@ -649,7 +900,7 @@ distdir: $(DISTFILES) 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`; \ @@ -657,6 +908,8 @@ distdir: $(DISTFILES) $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ @@ -667,7 +920,7 @@ distdir: $(DISTFILES) -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 +995,7 @@ distcheck: dist $(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 +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 +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 +1102,28 @@ ps: ps-recursive 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 --git a/NEWS b/NEWS index 2fb1902..a039ad8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,59 @@ +Changes in release 2.6.0p2 + + * Bugs fix only: + o Various device-api fix + o Compilation on various platform + o others small fixes. + +Changes in release 2.6.0p1 + + * Bugs fix only: + o amfetchdump -p + o amtapetype crash + o Fix DS_INCRONLY and FORCE_FULL + o planner crash + o others small bugs + +Changes in release 2.6.0 + + * configure --disable-shared doesn't work because perl modules require + shared libraries. Use configure --with-static-binaries to build + statically linked binaries. + * 'amverify' and 'amverifyrun' are deprecated and replaced with the + new, more flexible 'amcheckdump' + * 'amdd' and 'ammt' are deprecated. + * Some Amanda files are now installed in new "amanda/" subdirectories: + libraries are now installed in $libdir/amanda and internal programs + are now installed in $libexecdir/amanda. You can set --with-amlibdir + and --with-amlibexecdir if you don't want the amanda suffix. + If you mix 2.6.0 and earlier version with rsh/ssh auth, you need to + add an 'amandad_path' to the dumptype and to amanda-client.conf + * The amandates file, previously at /etc/amandates, is now at + $localstatedir/amanda/amandates. You may want to move your existing + /etc/amandates when you upgrade Amanda. + * New 'amcryptsimple', 'amgpgcrypt' - encryption plugins based on gpg. + * New 'amserverconfig', 'amaddclient' - Initial Amanda configuration tools + these tools make assumptions, please see man page. + * Many bugs fixed and code rewrite/cleanup. + Speedup in 'amrecover find' and starting amrecover. + * glib is required to compile and run amanda. + * Device API: pluggable interface to storage devices, supporting tapes, + vtapes, RAIT, and Amazon S3 + * New perl modules link directly to Amanda, to support writing Amanda + applications in Perl. Perl module are installed by default in the perl + installsitelib directory. It can be changed with + 'configure --with-amperldir'. + * New 'local' security driver supports backups of the amanda server + without any network connection or other configuration. + * Almost 200 unit tests are available via 'make installcheck'. + * Amanda configuration file changes + o amanda.conf changes + + flush-threshold-dumped + + flush-threshold-scheduled + + taperflush + + device_property + + usetimestamps default to yes + Changes in release 2.5.2p1 * Many bugs fixed @@ -24,8 +80,6 @@ Changes in release 2.5.2 see all debug_* config option + tapetype 'readblocksize', if maxtapeblocksize is set too larger for your hardware - * Amanda command changes - o amadmin: new 'holding list' and 'holding delete' subcommand. Changes in release 2.5.1p3 diff --git a/ReleaseNotes b/ReleaseNotes index 47d9399..e6f11b2 100644 --- a/ReleaseNotes +++ b/ReleaseNotes @@ -1,3 +1,102 @@ + Release Notes for amanda-2.6.0 + +amcheckdump + New program written entirely in perl, it replaces 'amverify' and + 'amveryfyrun' + +amcryptsimple, amgpgcrypt + New encryption plugins based on gpg. + +amserverconfig, amaddclient + New Initial Amanda configuration tools, these tools make assumptions, + please see man page. + +Deprecated programs + 'amverify' and 'amveryfyrun' are deprecated -- use amcheckdump. + 'amdd' and 'ammt' are also deprecated. If you have scripts that use + them, then you must rewrite them in perl using the new perl modules. + +Configure options + --disable-shared doesn't work because perl modules require shared library. + Instead, use --with-static-binaries to build statically linked binaries. + --with-amlibdir, libraries are now installed in $amlibdir + --without-amlibdir : amlibdir=$libdir + --with-amlibdir=yes : amlibdir=$libdir/amanda (default value) + --with-amlibdir=/path/to/libdir : amlibdir=/path/to/libdir + --with-amlibexecdir, internal programs are installed in $amlibexecdir + --without-amlibexecdir : amlibdir=$libexecdir + --with-amlibexecdir=yes : amlibdir=$libexecdir/amanda + (default value) + --with-amlibexecdir=/path/to/libexecdir : amlibdir=/path/to/libexecdir + --with-amperldir, Where to install perl modules + --without-amperldir : amperldir=$amlibdir/perl + --with-amperldir=yes : amperldir= $(perl installsitelib) + (default value) + --with-amperldir=/path/to/perldir : amperldir=/path/to/perldir + +Path changes + Libraries are installed in $amlibdir (previously $libdir) + Internal programs are installed in $amlibexecdir (previously $libexecdir) + You must change your inetd/xinetd config for the new amandad path. + The amandad path change affect rsh/ssh auth, amanda-2.6.0 installations + will need to add an 'amandad_path' parameter to configuration files in + order to talk to older versions of Amanda: + amanda-2.6.0 client -> amanda-2.5.2 or earlier server: add + 'amandad_path "/usr/libexec/amandad"' (or the appropriate path) to + /etc/amanda/amanda-client.conf + amanda-2.5.2 or earlier client -> amanda-2.6.0 server: add + 'amandad_path "/usr/libexec/amanda/amandad"' (or the appropriate path) + to /etc/amanda/amanda-client.conf + amanda-2.6.0 server -> amanda-2.5.2 or earlier client: add + 'amandad_path "/usr/libexec/amandad"' (or the appropriate path) to the + dumptype + amanda-2.5.2 or earlier server -> amanda-2.6.0 client: add + 'amandad_path "/usr/libexec/amanda/amandad"' (or the appropriate path) + to the dumptype + The amandates files is now $localstatedir/amanda/amandates, previously it + was /etc/amandates, this file must be created on all client. + +usetimestamps + It now defaults to 'yes'. + +Glib + glib is required to compile and run amanda. + It is free and can be downloaded form http://www.gtk.org/download/ + +Device API + The Device API is a complete rewrite of all tape-access functionality. + To use the Device API, all devices must be specified by their full + name, e.g., tape:/dev/nst0. Existing functionality is now available + in the tape, file, and rait devices, and a new Amazon S3 backend named + 's3' is also available. + +Perl Module + Link directly to Amanda, to support writing Amanda applications in Perl + Available Modules: + Changer (Execute changer scripts) + Cmdline (Parse command line argument) + Config (Parse config files) + Device (device-api) + Debug (Write to debug files) + Logfile (Parse log files) + Tapefile (Parse tapelist file) + Perl modules are installed in $amperldir + +local security driver (auth) + Allows backups of the Amanda server without any need for network + configuration, and similarly allows amrecover to work on the Amanda + server without any network configuration. + +make installcheck + Almost 200 unit tests are available, which should be run on an installed + copy of Amanda. See http://wiki.zmanda.com/index.php/Testing for more + information. + +flush-threshold-dumped, flush-threshold-scheduled, taperflush + These three config options allow to better fill your tapes. + They are what was known as the taperstart/taperflush feature. + + Release Notes for amanda-2.5.2 IPv6 diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index 0451d2a..0000000 --- a/acinclude.m4 +++ /dev/null @@ -1,7475 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -## Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit , 1996 -## -## This file 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. - -# serial 47 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# 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' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH - -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 - -# 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'] - -# 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' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# 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" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# 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 - -# 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= - -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 - -_LT_CC_BASENAME([$compiler]) - -# 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 - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; 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_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[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* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[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* -])# _LT_LINKER_BOILERPLATE - - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -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],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -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 AC_TRY_EVAL(ac_compile); 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 __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); 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 AC_TRY_EVAL(ac_compile); 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" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - 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 - ;; -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # 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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - 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 - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - 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>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp - $SED '/^$/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - 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 - ;; - - 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; - ;; - - 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; - ;; - - 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; - ;; - - 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 -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# -------------------- -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ------------------------------------------------------------------ -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#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 AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_unknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -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= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) - ]) - ]) - ]) - ]) - ]) - ;; - 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" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - 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 - - 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 -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - 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_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $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* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - 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 - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[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]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != 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, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = 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 -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -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" - AC_MSG_RESULT([yes]) -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" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) -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.so - # instead of lib.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 - - # 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' - ;; - -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 - ;; - -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" - ;; - -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 - ;; - -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' - ;; - -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 - ;; - 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 - ;; - -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 -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - 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 - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - 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_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - 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" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [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], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -#- set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [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], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [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], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognise shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[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 -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - 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 <&2 - -*** 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 - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognise a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - 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 - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[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 &1 /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 - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -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 - ;; - -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 - ;; - -# This must be Linux ELF. -linux*) - 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)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - 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)$' - 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 -]) -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 -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, -[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 - fi - done - IFS="$lt_save_ifs" - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# --------------- -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([AC_PROG_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_PROG_CXXCPP -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# -------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' - -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# -# Check for any special shared library compilation flags. -# -_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' - ;; - esac -fi -if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then - AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) - if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : - else - AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) - _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) - - -## 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... -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) - -# Report which librarie types wil actually be built -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -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 -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# 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 -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_LD - - # 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 - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${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}' - - # 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 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - 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. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - 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"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -_LT_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=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 - - 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. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=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 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=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 - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - 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. - _LT_AC_TAGVAR(always_export_symbols, $1)=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. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${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. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$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... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=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 - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(module_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(module_expsym_cmds, $1)='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' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='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}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - ia64*|hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$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. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - 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. - _LT_AC_TAGVAR(archive_cmds, $1)='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' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$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."*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - osf3*) - 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. - _LT_AC_TAGVAR(archive_cmds, $1)='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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - 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. - _LT_AC_TAGVAR(archive_cmds, $1)='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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sco*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=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?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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 - _LT_AC_TAGVAR(link_all_deplibs, $1)=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. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$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. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - fi - ;; - esac - ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -## 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... -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -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 -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" -ifelse([$1], [], -[#! $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 , 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 - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# 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], -[# ### 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=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# 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_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# 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_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# 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_AC_TAGVAR(lt_prog_compiler_pic, $1) -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_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# 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 - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -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_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -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_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# 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=$_LT_AC_TAGVAR(hardcode_action, $1) - -# 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_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) - -# 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_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# 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=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# 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="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" - -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# 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_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - 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 - # 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_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# 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]]*\)' - -# 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'" - -# 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 - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # 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 - - rm -f conftest* - cat > conftest.$ac_ext < $nlist) && 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 - - # 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 < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> 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[[]] = -{ -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 -} -#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_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && 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" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # 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 -]) -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 - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-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*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - sco*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - *) - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - unixware*) - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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 - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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' - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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 - _LT_AC_TAGVAR(include_expsyms, $1)= - # 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'. - _LT_AC_TAGVAR(exclude_expsyms, $1)="_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. - _LT_CC_BASENAME([$compiler]) - 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 - - _LT_AC_TAGVAR(ld_shlibs, $1)=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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${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 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - 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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&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. - -EOF - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$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)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II 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. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$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... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(ld_shlibs, $1)=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 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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 - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&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. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=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 - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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 - - # 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 - - 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. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - 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 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=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 - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - 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. - _LT_AC_TAGVAR(always_export_symbols, $1)=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. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${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. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$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)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-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. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=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. - _LT_AC_TAGVAR(archive_cmds, $1)='$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. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='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' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='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}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_TAGVAR(ld_shlibs, $1)=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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$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*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - sco3.2v5*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=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 - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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 - _LT_AC_TAGVAR(link_all_deplibs, $1)=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. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4.2uw2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv5*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -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 - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = 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$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) 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. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# 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 -]) -SED=$lt_cv_path_SED -AC_MSG_RESULT([$SED]) -]) -m4_include([config/gnulib/absolute-header.m4]) -m4_include([config/gnulib/alloca.m4]) -m4_include([config/gnulib/arpa_inet_h.m4]) -m4_include([config/gnulib/eoverflow.m4]) -m4_include([config/gnulib/extensions.m4]) -m4_include([config/gnulib/getaddrinfo.m4]) -m4_include([config/gnulib/gnulib-cache.m4]) -m4_include([config/gnulib/gnulib-common.m4]) -m4_include([config/gnulib/gnulib-comp.m4]) -m4_include([config/gnulib/gnulib-tool.m4]) -m4_include([config/gnulib/inet_ntop.m4]) -m4_include([config/gnulib/intmax_t.m4]) -m4_include([config/gnulib/inttypes_h.m4]) -m4_include([config/gnulib/lib-ld.m4]) -m4_include([config/gnulib/lib-link.m4]) -m4_include([config/gnulib/lib-prefix.m4]) -m4_include([config/gnulib/lock.m4]) -m4_include([config/gnulib/longdouble.m4]) -m4_include([config/gnulib/longlong.m4]) -m4_include([config/gnulib/netinet_in_h.m4]) -m4_include([config/gnulib/onceonly_2_57.m4]) -m4_include([config/gnulib/size_max.m4]) -m4_include([config/gnulib/snprintf.m4]) -m4_include([config/gnulib/socklen.m4]) -m4_include([config/gnulib/sockpfaf.m4]) -m4_include([config/gnulib/stdbool.m4]) -m4_include([config/gnulib/stdint_h.m4]) -m4_include([config/gnulib/strdup.m4]) -m4_include([config/gnulib/string_h.m4]) -m4_include([config/gnulib/sys_socket_h.m4]) -m4_include([config/gnulib/vasnprintf.m4]) -m4_include([config/gnulib/visibility.m4]) -m4_include([config/gnulib/wchar_t.m4]) -m4_include([config/gnulib/wint_t.m4]) -m4_include([config/gnulib/xsize.m4]) -dnl Check if the compiler can handle unsigned long constants, ie 2ul. -AC_DEFUN([AMANDA_C_UNSIGNED_LONG_CONSTANTS], - [ - AC_CACHE_CHECK( - [for working unsigned long constants], - amanda_cv_c_unsigned_long_constants, - [ - AC_TRY_COMPILE( - [ - ], - [ - long l = 1ul; - ], - amanda_cv_c_unsigned_long_constants=yes, - amanda_cv_c_unsigned_long_constants=no - ) - ] - ) - if test "$amanda_cv_c_unsigned_long_constants" = yes; then - AC_DEFINE(HAVE_UNSIGNED_LONG_CONSTANTS,1,[Define if the compiler support unsigned long constants. ]) - fi - ] -) - -dnl Check for the argument type for shmat() and shmdt() -AC_DEFUN([AMANDA_FUNC_SHM_ARG_TYPE], - [ - AC_CACHE_CHECK( - [for shmdt() argument type], - amanda_cv_shmdt_arg_type, - [ - if test "$ac_cv_func_shmget" = yes; then - cat <conftest.$ac_ext -#include "confdefs.h" -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_IPC_H -# include -#endif -#ifdef HAVE_SYS_SHM_H -# include -#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 - ] - ) - AC_DEFINE_UNQUOTED(SHM_ARG_TYPE,$amanda_cv_shmdt_arg_type,[Define to type of shmget() function argument. ]) - ] -) - -dnl Figure out the select() argument type. -AC_DEFUN([AMANDA_FUNC_SELECT_ARG_TYPE], - [ - AC_CACHE_CHECK( - [for select() argument type], - amanda_cv_select_arg_type, - [ - rm -f conftest.c - cat <conftest.$ac_ext -#include "confdefs.h" -#ifdef HAVE_SYS_TIME_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#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; -} -EOF - - dnl Figure out the select argument type by first trying to - dnl compile with the fd_set argument. If the compile fails, - dnl then we know to use the int. If it suceeds, then try to - dnl use the int. If the int fails, then use fd_set. If - dnl both suceeed, then do a line count on the number of - dnl lines that the compiler spit out, assuming that the - dnl 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 -#include -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -main() { -#ifdef SO_SNDTIMEO - int sock = socket(AF_INET, SOCK_STREAM, 0); - struct timeval timeout; - timeout.tv_sec = 1; - timeout.tv_usec = 0; - return (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, - (void *)&timeout, sizeof(timeout))); -#else - return -1; -#endif -} - ], - amanda_cv_setsockopt_SO_SNDTIMEO=yes, - amanda_cv_setsockopt_SO_SNDTIMEO=no, - amanda_cv_setsockopt_SO_SNDTIMEO=no - ) - ] - ) - if test "$amanda_cv_setsockopt_SO_SNDTIMEO" = yes; then - AC_DEFINE(HAVE_SO_SNDTIMEO,1,[Define if SO_SNDTIMEO is available. ]) - fi - ] -) - -dnl Check for the one or two argument version of gettimeofday. -AC_DEFUN([AMANDA_FUNC_GETTIMEOFDAY_ARGS], - [ - AC_REQUIRE([AC_HEADER_TIME]) - AC_CACHE_CHECK( - [for gettimeofday number of arguments], - amanda_cv_gettimeofday_args, - [ - AC_TRY_COMPILE( - [ -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - ], - [ - struct timeval val; - struct timezone zone; - gettimeofday(&val, &zone); - ], - amanda_cv_gettimeofday_args=2, - amanda_cv_gettimeofday_args=1 - ) - ] - ) - if test "$amanda_cv_gettimeofday_args" = 2; then - AC_DEFINE(HAVE_TWO_ARG_GETTIMEOFDAY,1,[Define if gettimeofday takes two arguments. ]) - fi - ] -) - - - -dnl Check for if pid_t is a long, int, or short. -AC_DEFUN([AMANDA_TYPE_PID_T], - [ - AC_REQUIRE([AC_TYPE_PID_T]) - AC_CACHE_CHECK([for pid_t type], amanda_cv_pid_type, - [ - amanda_cv_pid_type=unknown - if test "$ac_cv_type_pid_t" = no; then - amanda_cv_pid_type=int - fi - for TEST_amanda_cv_pid_type in long short int; do - if test $amanda_cv_pid_type = unknown; then - AC_EGREP_CPP(typedef.*${TEST_amanda_cv_pid_type}.*pid_t, - [ -#include -#if STDC_HEADERS -#include -#include -#endif - ], - amanda_cv_pid_type=$TEST_amanda_cv_pid_type) - fi - if test $amanda_cv_pid_type = unknown; then - AC_EGREP_CPP(ZZZZ.*${TEST_amanda_cv_pid_type}, - [ -#include -#if STDC_HEADERS -#include -#include -#endif - ZZZZ pid_t - ], - amanda_cv_pid_type=$TEST_amanda_cv_pid_type) - fi - done - if test $amanda_cv_pid_type = unknown; then - amanda_cv_pid_type=int - fi - ] - ) - case $amanda_cv_pid_type in - int) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%d",[Define to printf formatting string to print a PID. ]) ;; - long) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%ld") ;; - short) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%d") ;; - esac - ] -) - -dnl -dnl -dnl ICE_CHECK_DECL (FUNCTION, HEADER-FILE...) -dnl If FUNCTION is available, define `HAVE_FUNCTION'. If it is declared -dnl in one of the headers named in the whitespace-separated list -dnl HEADER_FILE, define `HAVE_FUNCTION_DECL` (in all capitals). -dnl -AC_DEFUN([ICE_CHECK_DECL], -[ -ice_have_$1=no -AC_CHECK_FUNCS($1, ice_have_$1=yes) -if test "${ice_have_$1}" = yes; then -AC_MSG_CHECKING(for $1 declaration in $2) -AC_CACHE_VAL(ice_cv_have_$1_decl, -[ -ice_cv_have_$1_decl=no -changequote(,)dnl -ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' -ice_re_word='(^|[^a-zA-Z0-9_])' -changequote([,])dnl -for header in $2; do -# Check for ordinary declaration -AC_EGREP_HEADER([${ice_re_word}$1[ ]*\(], $header, - ice_cv_have_$1_decl=yes) -if test "$ice_cv_have_$1_decl" = yes; then - break -fi -# Check for "fixed" declaration like "getpid _PARAMS((int))" -AC_EGREP_HEADER([${ice_re_word}$1[ ]*$ice_re_params\(\(], $header, - ice_cv_have_$1_decl=yes) -if test "$ice_cv_have_$1_decl" = yes; then - break -fi -done -]) -AC_MSG_RESULT($ice_cv_have_$1_decl) -if test "$ice_cv_have_$1_decl" = yes; then -AC_DEFINE_UNQUOTED([HAVE_]translit($1,[a-z],[A-Z])[_DECL],1,[Define if $1 is declared. ]) -fi -fi -])dnl -dnl Test for the presence of , 'union wait', arg-type of 'wait()'. -dnl by T.E.Dickey" , Jim Spath -dnl -dnl FIXME: These tests should have been in autoconf 1.11! -dnl -dnl Note that we cannot simply grep for 'union wait' in the wait.h file, -dnl because some Posix systems turn this on only when a BSD variable is -dnl defined. Since I'm trying to do without special defines, I'll live -dnl with the default behavior of the include-file. -dnl -dnl I do _2_ compile checks, because we may have union-wait, but the -dnl prototype for 'wait()' may want an int. -dnl -dnl Don't use HAVE_UNION_WAIT, because the autoconf documentation implies -dnl that if we've got union-wait, we'll automatically use it. -dnl -dnl Garrett Wollman adds: -dnl The tests described above don't quite do the right thing, -dnl since some systems have hacks which allow `union wait' to -dnl still work even though `int' is preferred (and generates -dnl fewer warnings). Since all of these systems use prototypes, -dnl we can use the prototype of wait(2) to disambiguate them. -dnl -dnl Alexandre Oliva adds: -dnl A single compile check is enough. If we don't have union wait, -dnl it's obvious that the test will fail, and that we must use int. -dnl If we do, the prototype (on STDC systems) and WIFEXITED will tell -dnl whether we're supposed to be using union wait instead of int. -dnl -AC_DEFUN([CF_WAIT], -[ -AC_REQUIRE([AC_TYPE_PID_T]) -AC_HAVE_HEADERS(sys/wait.h wait.h) -AC_CACHE_CHECK([whether wait uses union wait], [cf_cv_arg_union_wait], - [AC_TRY_COMPILE([ -#include - -#if HAVE_SYS_WAIT_H -# include -#else -# if HAVE_WAIT_H -# include -# endif -#endif - -#ifdef __STDC__ -pid_t wait(union wait *); -#endif -], [ - union wait x; int i; - wait(&x); i = WIFEXITED(x) -], [cf_cv_arg_union_wait=yes], [cf_cv_arg_union_wait=no])]) -if test $cf_cv_arg_union_wait = yes; then - AC_DEFINE(WAIT_USES_UNION,1,[Defined if wait() puts the status in a union wait instead of int. ]) -fi -])dnl -AC_DEFUN([CF_WAIT_INT], -[ -AC_REQUIRE([AC_TYPE_PID_T]) -AC_HAVE_HEADERS(sys/wait.h wait.h) -AC_CACHE_CHECK([whether wait uses int], [cf_cv_arg_int], - [AC_TRY_COMPILE([ -#include - -#if HAVE_SYS_WAIT_H -# include -#else -# if HAVE_WAIT_H -# include -# endif -#endif - -#ifdef __STDC__ -pid_t wait(int *); -#endif -], [ - int x; int i; - wait(&x); i = WIFEXITED(x) -], [cf_cv_arg_int=yes], [cf_cv_arg_int=no])]) -if test $cf_cv_arg_int = yes; then - AC_DEFINE(WAIT_USES_INT,1,[Defined if wait() puts the status in a int instead of a union wait. ]) -fi -])dnl - -dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] -dnl -dnl the "ISO C9X: 7.18 Integer types " section requires the -dnl existence of an include file that defines a set of -dnl typedefs, especially uint8_t,int32_t,uintptr_t. -dnl Many older installations will not provide this file, but some will -dnl have the very same definitions in . In other enviroments -dnl we can use the inet-types in which would define the -dnl typedefs int8_t and u_int8_t respectivly. -dnl -dnl This macros will create a local "_stdint.h" or the headerfile given as -dnl an argument. In many cases that file will just "#include " -dnl or "#include ", while in other environments it will provide -dnl the set of basic 'stdint's definitions/typedefs: -dnl int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t -dnl int_least32_t.. int_fast32_t.. intmax_t -dnl which may or may not rely on the definitions of other files, -dnl or using the AC_CHECK_SIZEOF macro to determine the actual -dnl sizeof each type. -dnl -dnl if your header files require the stdint-types you will want to create an -dnl installable file mylib-int.h that all your other installable header -dnl may include. So if you have a library package named "mylib", just use -dnl AX_CREATE_STDINT_H(mylib-int.h) -dnl in configure.ac and go to install that very header file in Makefile.am -dnl along with the other headers (mylib.h) - and the mylib-specific headers -dnl can simply use "#include " to obtain the stdint-types. -dnl -dnl Remember, if the system already had a valid , the generated -dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things... -dnl -dnl @, (status: used on new platforms) (see http://ac-archive.sf.net/gstdint/) -dnl @version Id: ax_create_stdint_h.m4,v 1.5 2005/01/06 18:27:27 guidod Exp -dnl @author Guido Draheim - -AC_DEFUN([AX_CHECK_DATA_MODEL],[ - AC_CHECK_SIZEOF(char) - AC_CHECK_SIZEOF(short) - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(void*) - 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" - AC_MSG_CHECKING([data model]) - 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 - AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)]) -]) - -dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF]) -AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[ -AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ - ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h]) ; do - unset ac_cv_type_uintptr_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$1],[$1]) break - done - AC_MSG_CHECKING([for stdint uintptr_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ -AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ - ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h stdint.h]) ; do - unset ac_cv_type_uint32_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$1],[$1]) break - break; - done - AC_MSG_CHECKING([for stdint uint32_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ -AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ - ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do - unset ac_cv_type_u_int32_t - unset ac_cv_type_u_int64_t - AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$1],[$1]) break - break; - done - AC_MSG_CHECKING([for stdint u_int32_t]) - ]) -]) - -AC_DEFUN([AX_CREATE_STDINT_H], -[# ------ AX CREATE STDINT H ------------------------------------- -AC_MSG_CHECKING([for stdint types]) -ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` -# try to shortcircuit - if the default include path of the compiler -# can find a "stdint.h" header then we assume that all compilers can. -AC_CACHE_VAL([ac_cv_header_stdint_t],[ -old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" -old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" -old_CFLAGS="$CFLAGS" ; CFLAGS="" -AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], -[ac_cv_stdint_result="(assuming C99 compatible system)" - ac_cv_header_stdint_t="stdint.h"; ], -[ac_cv_header_stdint_t=""]) -CXXFLAGS="$old_CXXFLAGS" -CPPFLAGS="$old_CPPFLAGS" -CFLAGS="$old_CFLAGS" ]) - -v="... $ac_cv_header_stdint_h" -if test "$ac_stdint_h" = "stdint.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) -elif test "$ac_stdint_h" = "inttypes.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) -elif test "_$ac_cv_header_stdint_t" = "_" ; then - AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) -else - ac_cv_header_stdint="$ac_cv_header_stdint_t" - AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) -fi - -if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. - -dnl .....intro message done, now do a few system checks..... -dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, -dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW -dnl instead that is triggered with 3 or more arguments (see types.m4) - -inttype_headers=`echo $2 | sed -e 's/,/ /g'` - -ac_cv_stdint_result="(no helpful system typedefs seen)" -AX_CHECK_HEADER_STDINT_X(dnl - stdint.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") - -if test "_$ac_cv_header_stdint_x" = "_" ; then -AX_CHECK_HEADER_STDINT_O(dnl, - inttypes.h sys/inttypes.h stdint.h $inttype_headers, - ac_cv_stdint_result="(seen uint32_t$and64 in $i)") -fi - -if test "_$ac_cv_header_stdint_x" = "_" ; then -if test "_$ac_cv_header_stdint_o" = "_" ; then -AX_CHECK_HEADER_STDINT_U(dnl, - sys/types.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") -fi fi - -dnl if there was no good C99 header file, do some typedef checks... -if test "_$ac_cv_header_stdint_x" = "_" ; then - AC_MSG_CHECKING([for stdint datatype model]) - AC_MSG_RESULT([(..)]) - AX_CHECK_DATA_MODEL -fi - -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" -else - ac_cv_header_stdint="stddef.h" -fi - -AC_MSG_CHECKING([for extra inttypes in chosen header]) -AC_MSG_RESULT([($ac_cv_header_stdint)]) -dnl see if int_least and int_fast types are present in _this_ header. -unset ac_cv_type_int_least32_t -unset ac_cv_type_int_fast32_t -AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) -AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) -AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) - -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" -fi - -AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl -$ac_cv_stdint_result]) - -dnl ----------------------------------------------------------------- -# ----------------- DONE inttypes.h checks START header ------------- -AC_CONFIG_COMMANDS([$ac_stdint_h],[ -AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) -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 " >>$ac_stdint -echo "#endif" >>$ac_stdint -echo "#endif" >>$ac_stdint -else - -cat >>$ac_stdint < -#else -#include - -/* .................... configured part ............................ */ - -STDINT_EOF - -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 -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 -else -echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint -echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -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 -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 -else -echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - - cat >>$ac_stdint <= 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) */ - -dnl /* have a look at "64bit and data size neutrality" at */ -dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ -dnl /* (the shorthand "ILP" types always have a "P" part) */ - -#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. - */ - -#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 - -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 - -#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 - -/* 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 - - /* literalnumbers */ -#endif -#endif - -/* 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)) - -/* 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 - -/* 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 - AC_MSG_NOTICE([$ac_stdint_h is unchanged]) - else - ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` - AS_MKDIR_P(["$ac_dir"]) - rm -f $ac_stdint_h - mv $ac_stdint $ac_stdint_h - fi -],[# variables for create stdint.h replacement -PACKAGE="$PACKAGE" -VERSION="$VERSION" -ac_stdint_h="$ac_stdint_h" -_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) -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" -]) -]) - -# AC_PROG_XSLTPROC -# ----------------------------------------------------------------- -# Find an xsltproc executable. -# -# Input: -# $1 is the default $XSLTPROC_FLAGS, which will be overridden if the -# user specifies --with-xsltproc-flags. -# Output: -# $XSLTPROC contains the path to xsltproc, or is empty if none was -# found or the user specified --without-xsltproc. $XSLTPROC_FLAGS -# contains the flags to use with xsltproc. - -AC_DEFUN([AC_PROG_XSLTPROC], -[ -XSLTPROC_FLAGS="$1" -AC_SUBST(XSLTPROC_FLAGS) - -# The (lack of) whitespace and overquoting here are all necessary for -# proper formatting. -AC_ARG_WITH(xsltproc, -AS_HELP_STRING([--with-xsltproc[[[[[=PATH]]]]]], - [Use the xsltproc binary in in PATH.]), - [ ac_with_xsltproc=$withval; ], - [ ac_with_xsltproc=maybe; ]) - -AC_ARG_WITH(xsltproc-flags, -AS_HELP_STRING([ --with-xsltproc-flags=FLAGS], - [Flags to pass to xsltproc (default $1)]), - [ if test "x$withval" == "xno"; then - XSLTPROC_FLAGS='' - else - if test "x$withval" != "xyes"; then - XSLTPROC_FLAGS="$withval" - fi - fi - ]) - -# search for xsltproc if it wasn't specified -if test "$ac_with_xsltproc" = "yes" -o "$ac_with_xsltproc" = "maybe"; then - AC_PATH_PROGS(XSLTPROC,xsltproc,,$LOCSYSPATH) -else - if test "$ac_with_xsltproc" != "no"; then - if test -x "$ac_with_xsltproc"; then - XSLTPROC="$ac_with_xsltproc"; - else - AC_MSG_WARN([Specified xsltproc of $ac_with_xsltproc isn't]) - AC_MSG_WARN([executable; searching for an alternative.]) - AC_PATH_PROGS(XSLTPROC,xsltproc,,$LOCSYSPATH) - fi - fi -fi -]) - -# AC_CHECK_DOCBOOK_XSLT -# ----------------------------------------------------------------- -# Check for access to docbook stylesheets of a particular revision. -# This macro can be used for multiple versions within the same script. -# -# Input: -# $1 is the version of docbook to search for; default 'current' -# Output: -# $HAVE_DOCBOOK_XSLT_VERS will be set to 'yes' or 'no' depending -# on the results of the test, where VERS is $1, with '_' substituted -# for '.' $HAVE_DOCBOOK_XSLT will also be set to the same value. -AC_DEFUN([AC_CHECK_DOCBOOK_XSLT], -[ - AC_REQUIRE([AC_PROG_XSLTPROC]) - - dnl define a temporary variable for the version, so this macro can be - dnl used with multiple versions - define([_VERS], $1) - ifelse(_VERS, [], [define([_VERS], [current])]) - define([ac_cv_docbook_xslt_VERS], patsubst([ac_cv_docbook_xslt_]_VERS, [\.], [_])) - define([HAVE_DOCBOOK_XSLT_VERS], patsubst([HAVE_DOCBOOK_XSLT_]_VERS, [\.], [_])) - - AC_CACHE_CHECK([for Docbook XSLT version ]_VERS, [ac_cv_docbook_xslt_VERS], - [ - ac_cv_docbook_xslt_VERS=no - if test -n "$XSLTPROC"; then - echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/_VERS/xhtml/docbook.xsl'" >&AS_MESSAGE_LOG_FD - $XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/_VERS/xhtml/docbook.xsl >&AS_MESSAGE_LOG_FD 2>&1 - - if test "$?" = 0; then - ac_cv_docbook_xslt_VERS=yes - fi - fi - ]) - - HAVE_DOCBOOK_XSLT_VERS="$ac_cv_docbook_xslt_VERS" - HAVE_DOCBOOK_XSLT=HAVE_DOCBOOK_XSLT_VERS - undefine([_VERS]) -]) - -# AC_CHECK_DOCBOOK_DTD -# ----------------------------------------------------------------- -# Check for access to docbook DTD of a particular revision. -# This macro can be used for multiple versions within the same script. -# -# Input: -# $1 is the version of docbook to search for; default 'current' -# Output: -# $HAVE_DOCBOOK_DTD_VERS will be set to 'yes' or 'no' depending -# on the results of the test, where VERS is $1, with '_' substituted -# for '.' $HAVE_DOCBOOK_DTD will also be set to the same value. -AC_DEFUN([AC_CHECK_DOCBOOK_DTD], -[ - AC_REQUIRE([AC_PROG_XSLTPROC]) - - dnl define a temporary variable for the version, so this macro can be - dnl used with multiple versions - define([_VERS], $1) - ifelse(_VERS, [], [define([_VERS], [current])]) - define([ac_cv_docbook_dtd_VERS], patsubst([ac_cv_docbook_dtd_]_VERS, [\.], [_])) - define([HAVE_DOCBOOK_DTD_VERS], patsubst([HAVE_DOCBOOK_DTD_]_VERS, [\.], [_])) - - AC_CACHE_CHECK([for Docbook DTD version ]_VERS, [ac_cv_docbook_dtd_VERS], - [ - ac_cv_docbook_dtd_VERS=no - if test -n "$XSLTPROC"; then - MY_XSLTPROC_FLAGS=`echo "" $XSLTPROC_FLAGS|sed -e s/--novalid//g` - cat <conftest.xml - - - - -EOF - echo "Trying '$XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml'" >&AS_MESSAGE_LOG_FD - $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_VERS=yes - fi - fi - cat conftest.out >&AS_MESSAGE_LOG_FD - - rm -f conftest.xml conftest.out - fi - ]) - - HAVE_DOCBOOK_DTD_VERS="$ac_cv_docbook_dtd_VERS" - HAVE_DOCBOOK_DTD=HAVE_DOCBOOK_DTD_VERS - undefine([_VERS]) -]) -dnl -dnl Checks to see if there's a sockaddr_storage structure -dnl -dnl usage: -dnl -dnl AC_SOCKADDR_STORAGE -dnl -dnl results: -dnl -dnl HAVE_SOCKADDR_STORAGE (defined) -dnl -AC_DEFUN([AC_SOCKADDR_STORAGE], - [AC_MSG_CHECKING(if sockaddr_storage struct exists) - AC_CACHE_VAL(ac_cv_has_sockaddr_storage, - AC_TRY_COMPILE([ -# include -# include ], - [u_int i = sizeof (struct sockaddr_storage)], - ac_cv_has_sockaddr_storage=yes, - ac_cv_has_sockaddr_storage=no)) - AC_MSG_RESULT($ac_cv_has_sockaddr_storage) - if test $ac_cv_has_sockaddr_storage = yes ; then - AC_DEFINE(HAVE_SOCKADDR_STORAGE,1,[if struct sockaddr_storage exists]) - fi]) - - diff --git a/aclocal.m4 b/aclocal.m4 index 8358075..09703f0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006 Free Software Foundation, Inc. # This file 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. @@ -11,7 +11,379 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# Configure paths for GLIB +# Owen Taylor 1997-2001 + +dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or +dnl gthread is specified in MODULES, pass to pkg-config +dnl +AC_DEFUN([AM_PATH_GLIB_2_0], +[dnl +dnl Get the cflags and libraries from pkg-config +dnl +AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], + , enable_glibtest=yes) + + pkg_config_args=glib-2.0 + for module in . $4 + 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 + + PKG_PROG_PKG_CONFIG([0.16]) + + no_glib="" + + if test "x$PKG_CONFIG" = x ; then + no_glib=yes + PKG_CONFIG=no + fi + + min_glib_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) + + 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" +dnl +dnl Now check if the installed GLIB is sufficiently new. (Also sanity +dnl checks the results of pkg-config to some extent) +dnl + rm -f conf.glibtest + AC_TRY_RUN([ +#include +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.glibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_glib_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 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; +} +],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_glib" = x ; then + AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + 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" + AC_TRY_LINK([ +#include +#include +], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], + [ 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" ], + [ 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."]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GLIB_CFLAGS="" + GLIB_LIBS="" + GLIB_GENMARSHAL="" + GOBJECT_QUERY="" + GLIB_MKENUMS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + AC_SUBST(GLIB_GENMARSHAL) + AC_SUBST(GOBJECT_QUERY) + AC_SUBST(GLIB_MKENUMS) + rm -f conf.glibtest +]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# Copyright © 2004 Scott James Remnant . +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + ifelse([$4], , [AC_MSG_ERROR(dnl +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,14 +393,29 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -85,14 +472,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file 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. -# serial 7 +# serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -101,8 +488,10 @@ AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -116,15 +505,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file 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. -# serial 8 +# serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -152,6 +540,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -217,6 +606,7 @@ AC_CACHE_CHECK([dependency style of $depcc], 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 @@ -269,7 +659,8 @@ if test "x$enable_dependency_tracking" != xno; then AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -294,8 +685,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # 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 + # 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")` else continue @@ -340,22 +732,10 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -378,16 +758,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -407,6 +791,9 @@ m4_ifval([$2], AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -442,6 +829,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) @@ -477,7 +868,7 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -576,14 +967,14 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file 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. -# serial 4 +# serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -599,6 +990,7 @@ AC_SUBST($1)]) # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then @@ -609,7 +1001,7 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -617,60 +1009,23 @@ fi # AM_PROG_MKDIR_P # --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) +# Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], -[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)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) # Helper functions for option handling. -*- Autoconf -*- @@ -782,9 +1137,21 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file 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. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. @@ -881,4 +1248,108 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([acinclude.m4]) +m4_include([config/macro-archive/ac_define_dir.m4]) +m4_include([config/macro-archive/ac_prog_perl_version.m4]) +m4_include([config/macro-archive/ac_prog_swig.m4]) +m4_include([config/macro-archive/ax_compare_version.m4]) +m4_include([config/macro-archive/docbook-dtd.m4]) +m4_include([config/macro-archive/docbook-xslt-min.m4]) +m4_include([config/macro-archive/docbook-xslt.m4]) +m4_include([config/macro-archive/xsltproc.m4]) +m4_include([config/amanda/amplot.m4]) +m4_include([config/amanda/bsd-security.m4]) +m4_include([config/amanda/bsdtcp-security.m4]) +m4_include([config/amanda/bsdudp-security.m4]) +m4_include([config/amanda/changer.m4]) +m4_include([config/amanda/components.m4]) +m4_include([config/amanda/compress.m4]) +m4_include([config/amanda/config.m4]) +m4_include([config/amanda/debugging.m4]) +m4_include([config/amanda/defaults.m4]) +m4_include([config/amanda/devprefix.m4]) +m4_include([config/amanda/dirs.m4]) +m4_include([config/amanda/documentation.m4]) +m4_include([config/amanda/dumpers.m4]) +m4_include([config/amanda/flags.m4]) +m4_include([config/amanda/flock.m4]) +m4_include([config/amanda/funcs.m4]) +m4_include([config/amanda/getfsent.m4]) +m4_include([config/amanda/i18n.m4]) +m4_include([config/amanda/ipv6.m4]) +m4_include([config/amanda/krb4-security.m4]) +m4_include([config/amanda/krb5-security.m4]) +m4_include([config/amanda/lfs.m4]) +m4_include([config/amanda/libs.m4]) +m4_include([config/amanda/net.m4]) +m4_include([config/amanda/progs.m4]) +m4_include([config/amanda/readdir.m4]) +m4_include([config/amanda/readline.m4]) +m4_include([config/amanda/rsh-security.m4]) +m4_include([config/amanda/s3-device.m4]) +m4_include([config/amanda/shmem.m4]) +m4_include([config/amanda/socklen_t_equiv.m4]) +m4_include([config/amanda/ssh-security.m4]) +m4_include([config/amanda/summary.m4]) +m4_include([config/amanda/swig.m4]) +m4_include([config/amanda/syshacks.m4]) +m4_include([config/amanda/tape.m4]) +m4_include([config/amanda/types.m4]) +m4_include([config/amanda/userid.m4]) +m4_include([config/amanda/version.m4]) +m4_include([config/gnulib/alloca.m4]) +m4_include([config/gnulib/arpa_inet_h.m4]) +m4_include([config/gnulib/base64.m4]) +m4_include([config/gnulib/eoverflow.m4]) +m4_include([config/gnulib/extensions.m4]) +m4_include([config/gnulib/float_h.m4]) +m4_include([config/gnulib/fsusage.m4]) +m4_include([config/gnulib/getaddrinfo.m4]) +m4_include([config/gnulib/gettimeofday.m4]) +m4_include([config/gnulib/gnulib-comp.m4]) +m4_include([config/gnulib/include_next.m4]) +m4_include([config/gnulib/inet_ntop.m4]) +m4_include([config/gnulib/intmax_t.m4]) +m4_include([config/gnulib/lock.m4]) +m4_include([config/gnulib/longlong.m4]) +m4_include([config/gnulib/malloc.m4]) +m4_include([config/gnulib/mkdtemp.m4]) +m4_include([config/gnulib/netinet_in_h.m4]) +m4_include([config/gnulib/onceonly_2_57.m4]) +m4_include([config/gnulib/physmem.m4]) +m4_include([config/gnulib/safe-read.m4]) +m4_include([config/gnulib/safe-write.m4]) +m4_include([config/gnulib/snprintf.m4]) +m4_include([config/gnulib/socklen.m4]) +m4_include([config/gnulib/sockpfaf.m4]) +m4_include([config/gnulib/ssize_t.m4]) +m4_include([config/gnulib/stdbool.m4]) +m4_include([config/gnulib/stdint.m4]) +m4_include([config/gnulib/stdio_h.m4]) +m4_include([config/gnulib/stdlib_h.m4]) +m4_include([config/gnulib/strdup.m4]) +m4_include([config/gnulib/string_h.m4]) +m4_include([config/gnulib/sys_socket_h.m4]) +m4_include([config/gnulib/sys_stat_h.m4]) +m4_include([config/gnulib/sys_time_h.m4]) +m4_include([config/gnulib/tempname.m4]) +m4_include([config/gnulib/ulonglong.m4]) +m4_include([config/gnulib/unistd_h.m4]) +m4_include([config/gnulib/vasnprintf.m4]) +m4_include([config/gnulib/visibility.m4]) +m4_include([config/gnulib/wchar.m4]) +m4_include([config/gettext-macros/gettext.m4]) +m4_include([config/gettext-macros/iconv.m4]) +m4_include([config/gettext-macros/inttypes_h.m4]) +m4_include([config/gettext-macros/lib-ld.m4]) +m4_include([config/gettext-macros/lib-link.m4]) +m4_include([config/gettext-macros/lib-prefix.m4]) +m4_include([config/gettext-macros/longlong.m4]) +m4_include([config/gettext-macros/nls.m4]) +m4_include([config/gettext-macros/po.m4]) +m4_include([config/gettext-macros/progtest.m4]) +m4_include([config/gettext-macros/size_max.m4]) +m4_include([config/gettext-macros/stdint_h.m4]) +m4_include([config/gettext-macros/wchar_t.m4]) +m4_include([config/gettext-macros/wint_t.m4]) +m4_include([config/gettext-macros/xsize.m4]) +m4_include([config/libtool.m4]) diff --git a/amandad-src/Makefile.am b/amandad-src/Makefile.am index a673cb5..f62a51e 100644 --- a/amandad-src/Makefile.am +++ b/amandad-src/Makefile.am @@ -1,23 +1,26 @@ # Makefile for Amanda client programs. +include $(top_srcdir)/config/automake/installperms.am +include $(top_srcdir)/config/automake/precompile.am + 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 -libexec_PROGRAMS = amandad - -if WANT_RUNTIME_PSEUDO_RELOC -AM_LDFLAGS = -Wl,-enable-runtime-pseudo-reloc -endif +amlibexec_PROGRAMS = amandad libamandad_la_SOURCES= amandad_util.c libamandad_la_LDFLAGS = -release $(VERSION) +libamandad_la_LIBADD = ../common-src/libamanda.la noinst_HEADERS = amandad.h @@ -33,25 +36,23 @@ LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \ ../common-src/libamanda.$(LIB_EXTENSION) \ ../gnulib/libgnu.$(LIB_EXTENSION) -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 +INSTALLPERMS_exec = \ + dest=$(amlibexecdir) chown=amanda \ + $(amlibexec_PROGRAMS) + +INSTALLPERMS_data = \ + dest=$(amlibexecdir) chown=amanda \ + $(amlibexec_SCRIPTS) 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 --git a/amandad-src/Makefile.in b/amandad-src/Makefile.in index 9ea0a5c..09c5621 100644 --- a/amandad-src/Makefile.in +++ b/amandad-src/Makefile.in @@ -16,17 +16,54 @@ # 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 @@ 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 @@ 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 @@ amandad_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \ ../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 @@ $(top_srcdir)/configure: $(am__configure_deps) 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 @@ 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 @@ 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 @@ 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 @@ check-am: all-am 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 @@ 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 @@ info: info-am 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 @@ ps: ps-am 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 --git a/amandad-src/amandad.c b/amandad-src/amandad.c index f04d4e3..c5e057f 100644 --- a/amandad-src/amandad.c +++ b/amandad-src/amandad.c @@ -147,6 +147,7 @@ static struct { 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 +172,11 @@ static struct active_service *service_new(security_handle_t *, 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, @@ -206,13 +187,20 @@ main( 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(); @@ -232,49 +220,27 @@ main( 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 * @@ -305,7 +271,7 @@ main( 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; @@ -338,16 +304,15 @@ main( 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 @@ -360,8 +325,8 @@ main( 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*/ } @@ -376,7 +341,7 @@ main( struct sockaddr_in sin; #endif int sock; - socklen_t n; + socklen_t_equiv n; argv[i] += strlen("-tcp="); #ifdef WORKING_IPV6 @@ -385,16 +350,15 @@ main( 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 @@ -406,13 +370,13 @@ main( 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); } /* @@ -437,8 +401,7 @@ main( 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; @@ -453,7 +416,7 @@ main( 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*/ } } @@ -465,25 +428,41 @@ main( 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 +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 +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); @@ -579,15 +548,15 @@ protocol_accept( 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; } @@ -623,18 +592,16 @@ protocol_accept( 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; } @@ -644,8 +611,8 @@ protocol_accept( 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; } @@ -655,14 +622,12 @@ protocol_accept( * 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; } @@ -682,9 +647,9 @@ protocol_accept( 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 +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; /* @@ -746,25 +707,23 @@ state_machine( * 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 +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 +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 @@ -840,8 +805,7 @@ s_repwait( * 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); @@ -854,9 +818,8 @@ s_repwait( 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); } @@ -873,14 +836,55 @@ s_repwait( } 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 +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 +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); } @@ -1065,6 +1071,10 @@ s_ackwait( 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 */ @@ -1072,9 +1082,8 @@ s_ackwait( 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; @@ -1109,8 +1118,7 @@ s_ackwait( * 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 +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 +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; } @@ -1227,7 +1235,7 @@ process_readnetfd( } 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 +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 +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 +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: /* @@ -1416,16 +1423,12 @@ service_new( * 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*/ } @@ -1436,7 +1439,7 @@ service_new( * 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]); @@ -1456,14 +1459,14 @@ service_new( 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; } } @@ -1476,24 +1479,25 @@ service_new( */ 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 +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 +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 +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 +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 --git a/amandad-src/amandad.h b/amandad-src/amandad.h deleted file mode 100644 index 471f73c..0000000 --- a/amandad-src/amandad.h +++ /dev/null @@ -1,56 +0,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 --git a/amandad-src/amandad_util.c b/amandad-src/amandad_util.c index 9ce31fd..7444c5e 100644 --- a/amandad-src/amandad_util.c +++ b/amandad-src/amandad_util.c @@ -65,46 +65,41 @@ parse_g_options( while (tok != NULL) { if(strncmp(tok,"features=", 9) == 0) { if(g_options->features != NULL) { - dbprintf(("%s: multiple features option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple features option\n")); if(verbose) { - printf("ERROR [multiple features option]\n"); + g_printf(_("ERROR [multiple features option]\n")); } } if((g_options->features = am_string_to_feature(tok+9)) == NULL) { - dbprintf(("%s: bad features value \"%s\n", - debug_prefix_time(NULL), tok+10)); + dbprintf(_("bad features value \"%s\"\n"), tok+10); if(verbose) { - printf("ERROR [bad features value \"%s\"]\n", tok+10); + g_printf(_("ERROR [bad features value \"%s\"]\n"), tok+10); } } } else if(strncmp(tok,"hostname=", 9) == 0) { if(g_options->hostname != NULL) { - dbprintf(("%s: multiple hostname option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple hostname option\n")); if(verbose) { - printf("ERROR [multiple hostname option]\n"); + g_printf(_("ERROR [multiple hostname option]\n")); } } g_options->hostname = stralloc(tok+9); } else if(strncmp(tok,"auth=", 5) == 0) { if(g_options->auth != NULL) { - dbprintf(("%s: multiple auth option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple auth option\n")); if(verbose) { - printf("ERROR [multiple auth option]\n"); + g_printf(_("ERROR [multiple auth option]\n")); } } g_options->auth = stralloc(tok+5); } else if(strncmp(tok,"maxdumps=", 9) == 0) { if(g_options->maxdumps != 0) { - dbprintf(("%s: multiple maxdumps option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple maxdumps option\n")); if(verbose) { - printf("ERROR [multiple maxdumps option]\n"); + g_printf(_("ERROR [multiple maxdumps option]\n")); } } if(sscanf(tok+9, "%d;", &new_maxdumps) == 1) { @@ -115,46 +110,41 @@ parse_g_options( g_options->maxdumps = new_maxdumps; } else { - dbprintf(("%s: bad maxdumps value \"%s\"\n", - debug_prefix_time(NULL), tok+9)); + dbprintf(_("bad maxdumps value \"%s\"\n"), tok+9); if(verbose) { - printf("ERROR [bad maxdumps value \"%s\"]\n", + g_printf(_("ERROR [bad maxdumps value \"%s\"]\n"), tok+9); } } } else { - dbprintf(("%s: bad maxdumps value \"%s\"\n", - debug_prefix_time(NULL), tok+9)); + dbprintf(_("bad maxdumps value \"%s\"\n"), tok+9); if(verbose) { - printf("ERROR [bad maxdumps value \"%s\"]\n", + g_printf(_("ERROR [bad maxdumps value \"%s\"]\n"), tok+9); } } } else if(strncmp(tok,"config=", 7) == 0) { if(g_options->config != NULL) { - dbprintf(("%s: multiple config option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple config option\n")); if(verbose) { - printf("ERROR [multiple config option]\n"); + g_printf(_("ERROR [multiple config option]\n")); } } g_options->config = stralloc(tok+7); if (strchr(g_options->config, '/')) { amfree(g_options->config); - dbprintf(("%s: invalid character in config option\n", - debug_prefix_time(NULL))); + dbprintf(_("invalid character in config option\n")); if(verbose) { - printf("ERROR [invalid character in config option]\n"); + g_printf(_("ERROR [invalid character in config option]\n")); } } } else { - dbprintf(("%s: unknown option \"%s\"\n", - debug_prefix_time(NULL), tok)); + dbprintf(_("unknown option \"%s\"\n"), tok); if(verbose) { - printf("ERROR [unknown option \"%s\"]\n", tok); + g_printf(_("ERROR [unknown option \"%s\"]\n"), tok); } } tok = strtok(NULL, ";"); @@ -172,10 +162,12 @@ void free_g_options( g_option_t * g_options) { - amfree(g_options->str); - am_release_feature_set(g_options->features); - amfree(g_options->hostname); - amfree(g_options->auth); - amfree(g_options->config); - amfree(g_options); + if (g_options != NULL) { + amfree(g_options->str); + am_release_feature_set(g_options->features); + amfree(g_options->hostname); + amfree(g_options->auth); + amfree(g_options->config); + amfree(g_options); + } } diff --git a/amplot/Makefile.am b/amplot/Makefile.am index 7723ed9..f0b0c10 100644 --- a/amplot/Makefile.am +++ b/amplot/Makefile.am @@ -1,44 +1,28 @@ # Makefile for amplot. -SUFFIXES = .sh +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 -.sh: - cat $< > $@ - chmod a+x $@ +SCRIPTS_SHELL = amplot +SCRIPTS_AWK = amcat.awk -sbin_SCRIPTS = amplot +sbin_SCRIPTS = $(SCRIPTS_SHELL) +amplotdir = $(amlibexecdir) +amplot_DATA = $(SCRIPTS_AWK) amplot.awk amplot.g amplot.gp -amplot_DATA = amcat.awk amplot.awk amplot.g amplot.gp +EXTRA_DIST += amplot.awk amplot.g -amplotdir = $(libexecdir) +CLEANFILES += amplot.gp.new +DISTCLEANFILES += amplot.gp -EXTRA_DIST = amplot.awk amplot.g +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 -CLEANFILES = amplot.gp.new -DISTCLEANFILES = amplot.gp amplot - -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 - -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 +INSTALLPERMS_data = \ + dest=$(amplotdir) chown=amanda $(amplot_DATA) \ + dest=$(sbindir) chown=amanda $(sbin_SCRIPTS) diff --git a/amplot/Makefile.in b/amplot/Makefile.in index a0c2eda..12179cb 100644 --- a/amplot/Makefile.in +++ b/amplot/Makefile.in @@ -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. @@ -16,16 +16,135 @@ # 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 @@ 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) @@ -106,9 +297,9 @@ 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@ @@ -123,7 +314,13 @@ 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 +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,52 +357,162 @@ 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@ @@ -214,7 +520,8 @@ 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 +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 +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 +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 +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 +758,9 @@ $(top_srcdir)/configure: $(am__configure_deps) 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 +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 +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; \ @@ -471,14 +833,20 @@ distdir: $(DISTFILES) || 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 +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 +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 +899,22 @@ install-data-am: install-amplotDATA @$(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 +933,160 @@ ps: ps-am 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 --git a/amplot/amplot.sh b/amplot/amplot.sh index fe47bcc..cfbe3f9 100644 --- a/amplot/amplot.sh +++ b/amplot/amplot.sh @@ -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 --git a/amplot/amplot.sh.in b/amplot/amplot.sh.in deleted file mode 100644 index f771e74..0000000 --- a/amplot/amplot.sh.in +++ /dev/null @@ -1,215 +0,0 @@ -#!@SHELL@ -# Amanda, The Advanced Maryland Automatic Network Disk Archiver -# Copyright (c) 1992-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. -# -# Author: Olafur Gudumundsson, (ogud@tis.com) Trusted Information Systems -# Formerly at: Systems Design and Analysis Group -# Computer Science Department -# University of Maryland at College Park -# -# Amplot: a program to generate postscript plots of each nights amanda -# performance -# -# Author: Olafur Gudmundsson (ogud@tis.com) -# Creation Date: April 1992 -# Last modified: April 1995 -# Input: list of amdumps -# Output: Plot of amdump files as either gnuplots on the screen or -# Postscript files -# - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -confdir=@CONFIG_DIR@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb:$PATH -export PATH - -AWK=@AWK@ -GNUPLOT=@GNUPLOT@ -COMPRESS=@AMPLOT_COMPRESS@ - -#+ -# 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="$1" - shift - printf "$fmt" $* -} - -# Function to check that awk can do command-line variable -# substitution. If no, then exit; if yes, set $AVARFLAG -# to the commandline switch used to introduce a variable. This -# check used to be performed at build time in configure; it's -# now performed at runtime. -test_awk() { - local tmpfile result - tmpfile=`mktemp /tmp/amplot.XXXXXX` - echo 'BEGIN{print i; exit}' > ${tmpfile} - result=`$AWK -f ${tmpfile} i=xx | wc -c` - if test "$result" -le 1; then - result=`$AWK -f ${tmpfile} -v i=xx | wc -c` - if test "$result" -le 1; then - echo "$AWK does not support command-line variable assignment; amplot cannot run" >&2 - rm -fr $tmpfile - exit 1 - else - AVARFLAG=-v - fi - else - AVARFLAG='' - fi - - rm -fr $tmpfile -} - -# Function to search for gnuplot and ensure it's working. This -# first tries the location detected/configured when amanda was built, -# then tries 'gnuplot', assuming it's in the user's path. If no -# working gnuplot executable is found, it exits with an error. The -# variable $GNUPLOT is set to the resulting executable. -find_gnuplot() { - if test "x$GNUPLOT" = "x"; then - # look for it in the user's PATH - GNUPLOT=gnuplot - fi - - if ${GNUPLOT} --version 2>/dev/null | grep '^gnuplot' >/dev/null; then - : # looks OK - else - echo "${GNUPLOT} was not found; amplot cannot run" - exit 1 - fi -} - -# check our environment, using functions from above -test_awk -find_gnuplot - -if [ $# -eq 0 ] ; then - _ 'Usage: %s [-c] [-e] [-g] [-l] [-p] [-t hours] \n' $0 - _ '%s generates plot for screen with fixed dimensions\n' $0 - _ ' -c Compress the input amdump files after plotting\n' - _ ' -e Extends x (time) axes if needed\n' - _ ' -g Run gnuplot directly no postscript file generated DEFAULT\n' - _ ' -l Landscape mode suitable for printing\n' - _ ' -p Postscript output (color)\n' - _ ' -b The postscipt will be b/w\n' - _ ' -t T Set the right edge of the plot to be T hours\n' - exit 1 -fi - -tmp_files="bandw_free disk_alloc dump_idle finished run_queue tape_* title" - -my_plot=$libexecdir/amplot.g -paper=0 -gnuplot=1 -cmpres=0 -para="" -maxtime=4 -bw=0 - -# setting up the parameters to pass to [gn]awk -while :; do - case "$1" in - -c) cmpres=1; shift;; - -e) para=$para"$AVARFLAG extend=1 "; shift;; - -g) gnuplot=1; shift;; - -l) paper=1; para=$para"$AVARFLAG paper=1 "; shift;; - -p) gnuplot=0; shift;; - -b) bw=1; shift;; - -t) shift - if test "$#" -eq 0; then - _ '%s: no argument for -t option\n' $0 1>&2 - exit 5 - fi - maxtime="$1"; shift;; - *) break;; - esac -done -if [ $# -eq 0 ] ; then - _ '%s: no input files\n' $0 1>&2 - exit 5 -fi -para=$para"$AVARFLAG maxtime=$maxtime" - -if [ $gnuplot -eq 1 ] ; then - my_plot=$my_plot"p" # use the plot prog that pauses - plot=" -geometry 800x700+40+0" - para=$para"$AVARFLAG gnuplot=1 " - _ "Displaying graph on the screen, for next graph" - - if [ "$paper" -eq 1 ] ; then - _ '%s: -l requires -p flag at the same time\n' $0 1>&2 - exit 6 - fi - if [ "$bw" -eq 1 ] ; then - _ '%s: -b requires -p flag at the same time\n' $0 1>&2 - exit 6 - fi -fi - -if [ $bw -eq 1 ]; then - para=$para" bw=1" -fi - -list=""; # files to compress at the end - -for i in ${1+"$@"} # for all the input files -do - f="$i"; - if [ ! -f "$f" ] ; then - f=`ls "$i" "$i".*[zZ] 2>/dev/null` - fi - if [ -f "$f" ] ; then # found file - disp=`$AWK -f $libexecdir/amcat.awk $AVARFLAG f="$f"` - if [ -z "$disp" ] ; then - _ 'Do not know how to [gz|z]cat this file\n' - else - /bin/rm -f $tmp_files - $disp "$f" | $AWK -f $libexecdir/amplot.awk $para - $GNUPLOT $plot $my_plot - if [ $disp = "cat" -a $cmpres -eq 1 ] ; then - list=$list" "$f - fi - fi - else # check if file has been compressed - _ 'No such file %s or %s\n' "$i" "$i.*[zZ]" - fi -done - -/bin/rm -f $tmp_files - -if [ "$list" != "" ] ; then # now compress the files we worked on -# comment out next line if you do not want compression at the end - _ 'Compressing %s\n' "$list" - $COMPRESS $list -fi -exit 0 diff --git a/autogen b/autogen index e15c807..2e6bf5a 100755 --- a/autogen +++ b/autogen @@ -1,19 +1,46 @@ #! /bin/sh -# rebuilds files generated by autoconf&automake. -# autoconf 2.13 and automake 1.4 or newer are required -# arguments are forwarded to the autoreconf script. +# cd to the directory we're run from cd `dirname $0` -touch config/config.h.in +# if you change this, please also change it in the root Makefile.am +includes="-I . -I config -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive" + +# clean up +rm -f aclocal.m4 +rm -rf autom4te*.cache +rm -f configure + +die() { + echo x"${@}" | sed s/^x// + exit 1 +} + +echo "See DEVELOPING for instructions on updating:" +echo " * gettext macros" +echo " * gnulib" +echo " * libtool files" + +echo "..creating file lists" +( cd config + for m4dir in amanda gettext-macros gnulib macro-archive; do + echo "## this file is automatically generated by autogen" > "$m4dir/file-list" + for f in $m4dir/*.m4; do echo "EXTRA_DIST += $f" >> "$m4dir/file-list"; done + done -if test x`ls -1t acinclude.m4 2>/dev/null \ - config/gnulib.m4i config/acinclude.m4i config/libtool.m4i | - sed 1q` != x"acinclude.m4"; then - rm -f acinclude.m4 - # keep libtool.m4i first here, as it has a "serial number" comment that it wants - # first in the file - cat config/libtool.m4i config/gnulib.m4i config/acinclude.m4i > acinclude.m4 -fi + echo "## this file is automatically generated by autogen" > "automake/file-list" + for f in automake/*.am; do echo "EXTRA_DIST += $f" >> "automake/file-list"; done +) + +echo "..aclocal" +aclocal $includes || die "aclocal failed" + +echo "..autoconf" +autoconf || die "autoconf failed" + +echo "..autoheader" +autoheader || die "autoheader failed" +touch config/config.h.in -autoreconf --warning=syntax --warning=no-portability --force ${1+"$@"} || exit 1 +echo "..automake" +automake --force --copy --warnings=none || die "automake failed" diff --git a/changer-src/Makefile.am b/changer-src/Makefile.am index 7632845..8fa0c37 100644 --- a/changer-src/Makefile.am +++ b/changer-src/Makefile.am @@ -1,17 +1,22 @@ # Makefile for Amanda tape changer programs. +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_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@ +AM_CFLAGS = $(AMANDA_WARNING_CFLAGS) +AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS) -LIB_EXTENSION = la +LINT=$(AMLINT) +LINTFLAGS=$(AMLINTFLAGS) -if WANT_CHIO_SCSI +if WANT_CHG_SCSI_CHIO CHIO_SCSI = chg-scsi-chio endif @@ -19,16 +24,35 @@ if WANT_CHG_SCSI CHG_SCSI = chg-scsi endif -libexec_PROGRAMS = $(CHG_SCSI) +amlibexec_PROGRAMS = $(CHG_SCSI) EXTRA_PROGRAMS = $(CHIO_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 + +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 -CLEANFILES = $(libexec_SCRIPTS) +EXTRA_DIST += chg-lib.sh.in + +amlibexec_SCRIPTS = $(SCRIPTS_PERL) $(SCRIPTS_SHELL) +amlibexec_DATA = $(SCRIPTS_INCLUDE) ### # Because libamanda includes routines (e.g. regex) provided by some system @@ -37,54 +61,60 @@ CLEANFILES = $(libexec_SCRIPTS) # 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-changer-driver.c sense.c +if WANT_SCSI_AIX +chg_scsi_CSRC += scsi-aix.c +endif +if WANT_SCSI_HPUX_NEW +chg_scsi_CSRC += scsi-hpux_new.c +endif +if WANT_SCSI_IRIX +chg_scsi_CSRC += scsi-irix.c +endif +if WANT_SCSI_LINUX +chg_scsi_CSRC += scsi-linux.c +endif +if WANT_SCSI_SOLARIS +chg_scsi_CSRC += scsi-solaris.c +endif +if WANT_SCSI_BSD +chg_scsi_CSRC += scsi-bsd.c +endif +if WANT_SCSI_CAM +chg_scsi_CSRC += scsi-cam.c +endif -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_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 +if WANT_SCSI_HPUX +chg_scsi_chio_CSRC += scsi-hpux.c +endif +if WANT_SCSI_CHIO +chg_scsi_chio_CSRC += scsi-chio.c +endif chg_scsi_chio_SOURCES = libscsi.h $(chg_scsi_chio_CSRC) -EXTRA_DIST = scsi-proto.c - -.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 +EXTRA_DIST += scsi-proto.c + +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) 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`; \ @@ -93,7 +123,7 @@ lint: (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 --git a/changer-src/Makefile.in b/changer-src/Makefile.in index a161797..6c5552c 100644 --- a/changer-src/Makefile.in +++ b/changer-src/Makefile.in @@ -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. @@ -16,16 +16,136 @@ # 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,106 +160,199 @@ 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) @@ -149,9 +362,9 @@ 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@ @@ -166,7 +379,13 @@ 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 +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,52 +422,162 @@ 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@ @@ -257,7 +585,8 @@ 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 +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 +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 +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 +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 @@ -415,27 +820,35 @@ CLEANFILES = $(libexec_SCRIPTS) # 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 +877,58 @@ $(top_srcdir)/configure: $(am__configure_deps) 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 +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 +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 +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; \ @@ -672,14 +1069,20 @@ distdir: $(DISTFILES) || 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 +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 +1135,26 @@ info: info-am 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 +1175,161 @@ ps: ps-am 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`; \ @@ -810,7 +1338,7 @@ lint: (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 --git a/changer-src/chg-chio.pl.in b/changer-src/chg-chio.pl.in deleted file mode 100644 index 56bb358..0000000 --- a/changer-src/chg-chio.pl.in +++ /dev/null @@ -1,488 +0,0 @@ -#! @PERL@ -w - -# Catch for sh/csh on systems without #! ability. -eval '(exit $?0)' && eval 'exec @PERL@ -S $0 ${1+"$@"}' - & eval 'exec @PERL@ -S $0 $argv:q' - if 0; - -# -# This changer script controls tape libraries on operating systems that have a -# chgio program -# DSL 7000 on FreeBSD is an example -# -# The changer being used is a n tape juke, that can be used with 1, n-1 or n -# tapes in the juke. The special slot is slot n. The script does not -# make assumptions about the number of slots, except that the special slot -# is the highest number. The slot is special in the sense that it contains the -# the only tape if the juke contains 1 tape and contains no tape if the juke -# contains n-1 tapes. See getCurrentTape. -# -# Furthermore, the script uses drive 0 and assumes that the device is able to -# figure itself how to move a type from slot m to drive 0 if asked to do so and -# multiple pickers are present. -# -# The numbering of the slots is by the way from 1 to n with slots. The chio -# program returns the slot numbers numbered from 0 to n-1 however. -# -# This script is built up out of bits and pieces of the other scripts -# and no credits are claimed. Most notably the chg-rth.pl script was used. That -# script was written by Erik Frederick, . -# -# Permission to freely use and distribute is granted (by me and was granted by -# the original authors). -# -# Nick Hibma - nick.hibma@jrc.it -# - -require 5.001; - -($progname = $0) =~ s#/.*/##; - -use English; -use Getopt::Long; - -delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV', 'PATH'}; -$ENV{'PATH'} = "/usr/bin:/usr/sbin:/sbin:/bin"; - -$| = 1; - -if (-d "@AMANDA_DBGDIR@") { - $logfile = "@AMANDA_DBGDIR@/changer.debug"; -} else { - $logfile = "/dev/null"; -} -die "$progname: cannot open $logfile: $ERRNO\n" - unless (open (LOG, ">> $logfile")); - -# -# get the information from the configuration file -# - -$prefix="@prefix@"; -$prefix=$prefix; # avoid warnings about possible typo -$exec_prefix="@exec_prefix@"; -$exec_prefix=$exec_prefix; # Ditto -$sbindir="@sbindir@"; -if ( "@USE_VERSION_SUFFIXES@" eq "yes" ) { - $SUF = "-@VERSION@"; -} else { - $SUF = ""; -} - -chomp ($tapeDevice = `$sbindir/amgetconf$SUF tapedev 2>&1`); -die "tapedev not found in amanda.conf" - if !$tapeDevice or $tapeDevice eq "" or - $tapeDevice =~ m/no such parameter/; -chomp ($changerDevice = `$sbindir/amgetconf$SUF changerdev 2>&1`); -chomp $changerDevice; -die "changerdev not found in amanda.conf" - if !$changerDevice or $changerDevice eq "" or - $changerDevice =~ m/no such parameter/; - -# -# Initialise a few global variables -# - -@slots = (); -@drives = (); -$max_slot = 0; -$max_drive = 0; -$nr_tapes = 0; - -@dow = ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); -@moy = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); - -sub do_time { - my (@t); - my ($r); - - ### - # Get the local time for the value. - ### - - @t = localtime (time ()); - - ### - # Return the result. - ### - - $r = sprintf "%s %s %2d %2d:%02d:%02d %4d", - $dow[$t[6]], - $moy[$t[4]], - $t[3], - $t[2], $t[1], $t[0], - 1900 + $t[5]; - - return $r; -} - -sub getCurrentTape { - print LOG &do_time(), ": enter: getCurrentTape\n"; - - # - # Determines the slot number for the tape that is currently in the - # drive. getTapeParams and getTapeStatus should have been called. - # If there is no tape in the drive, no current tape, 0 is returned. - # - - my($slot, $i); - - if ( !$drives[0] ) { # drive empty - $i = 0; - } elsif ( $nr_tapes == 1 ) { # one tape -> comes from slot max_slot - $i = $max_slot; - } else { # find first empty slot - $i = 0; - while ( $i < $#slots and $slots[$i] ) { - $i++ - } - $i++; - } - - print LOG &do_time(), ": leave: getCurrentTape: $i\n"; - return $i; -} - -sub getTapeStatus { - print LOG &do_time(), ": enter: getTapeStatus\n"; - - # - # Sets $nr_tapes, @slots, @drives, $current_tape - # - - my($type,$num,$status); - - print LOG &do_time(), ": running: @CHIO@ -f $changerDevice status\n"; - if ( !(open(FH,"@CHIO@ -f $changerDevice status|")) ) { - print "$progname: '@CHIO@ -f $changerDevice status' failed, $!\n"; - exit(2); - } - - # - # This routine requires the format of the output of 'chio status' to - # be as follows: - # picker 0: - # slot 0: - # slot 1: - # slot 2: - # (etc.) - # drive 0: - - - @slots=(); - @drives=(); - - while( defined ($line = ) ) { - chomp( $line ); - print LOG &do_time(), ": $line\n"; - next unless $line =~ m/(\w+)\s+(\d+):\s*<([^>]+)>/; - ($type,$num,$status) = ($1,$2,$3); - if ( $type =~ m/slot/i ) { - $slots[$num] = ( $status =~ m/full/i ) ? 1 : 0; - if ($slots[ $num ]) { $nr_tapes++ } - } elsif ( $type =~ m/drive/i ) { - $drives[$num] = 0; - if ( $status =~ m/full/i ) { - $drives[$num] = 1; - $nr_tapes++; - } - } else { - # ignore 'picker', empty ones, etc... - } - } - close(FH); - - if ( $nr_tapes == 0 ) { - print "$progname: No tapes in changer!\n"; - exit(2); - } - - $currentTape = &getCurrentTape(); - - print LOG &do_time(), ": leave: getTapeStatus: $nr_tapes\n"; - return($nr_tapes); -} - -sub getTapeParams { - print LOG &do_time(), ": enter: getTapeParams\n"; - - # - # Requests information on the number of slots, pickers and drives - # from the changer. - # - - my($max_slot,$max_drive,$max_picker); - - print LOG &do_time(), ": running: @CHIO@ -f $changerDevice params\n"; - if ( !open(FH,"@CHIO@ -f $changerDevice params|") ) { - print "$progname: '@CHIO@ -f $changerDevice params' failed, $!\n"; - exit(2); - } - - # - # the format of the output of 'chio params' should be - # /dev/ch0: 8 slots, 1 drive, 1 picker - # /dev/ch0: current picker: 0 - # - - $max_slot = 0; - $max_picker = -1; - $max_drive = 0; - - while( defined ($line = ) ) { - chomp $line; - print LOG &do_time(), ": $line\n"; - $max_slot = $1 if $line =~ m/(\d+) slot/i; - $max_drive = $1 if $line =~ m/(\d+) drive/i; - $max_picker = $1 if $line =~ m/(\d+) picker/i; - - } - close(FH); - if ( $max_drive == 0 or $max_picker == -1 ) { - print "$progname: No drive or picker ? ($max_drive/$max_picker)\n"; - exit(2); - } - - print LOG &do_time(), ": leave: getTapeParams: $max_slot, $max_drive, $max_picker\n"; - return ($max_slot, $max_drive, $max_picker); -} - -sub testTape { - my($tape) = @_; - - # - # Check a few parameters to avoid the most serious problems - # - - return - if $currentTape == $tape; - - if( $slots[$tape-1] == 0 ) { - print " $progname: no tape in slot requested\n"; - exit(1); - } - if( $tape > $max_slot ) { - print $tape," $progname: requested a tape > $max_slot\n"; - exit(2); - } - if( $tape < 1 ) { - print $tape," $progname: requested a tape < 1\n"; - exit(2); - } - return; -} - -sub Load { - my($tape) = @_; - print LOG &do_time(), ": enter: Load: $tape\n"; - - # - # Load tape $tape into drive 0 - # - - print LOG &do_time(), ": running: @CHIO@ -f $changerDevice move slot ", $tape - 1, " drive 0\n"; - if ( system("@CHIO@ -f $changerDevice move slot ".($tape-1)." drive 0") ) { - print "$progname: cannot '@CHIO@ -f $changerDevice move' tape $tape into drive 0\n"; - exit(2); - } - - # wait for tape to load - $count = 1800; - while ( $count > 0 && - system("$MT $MTF $tapeDevice status > /dev/null 2>&1" ) ) { - print LOG &do_time(), ": waiting for tape to load\n"; - sleep 30; - $count -= 30; - } - - print LOG &do_time(), ": leave: Load\n"; -} - -sub Unload { - my($tape) = @_; - print LOG &do_time(), ": enter: Unload: $tape\n"; - - # - # Unload the tape from drive 0 and put it into the slot specified by - # $tape. - # - - # - # Ecrix AutoPAK devices (based on the Spectra Logics 215 changer) - # can lock up if you try to move a tape from a drive to an open slot - # without first rewinding and ejecting the tape. This appears to - # occur when the operation times out and the ch driver sends a device - # or bus reset. Ecrix claims this is about to be fixed with a new - # firmware rev but for now it's safest to just explicitly eject - # the tape before moving the cartridge. - # - if ( system ("$MT $MTF $tapeDevice offline") ) { - print "$progname: Warning, failed to eject the tape with '$MT $MTF $tapeDevice offline'\n"; - # NB: not fatal; let chio try it's thing - } - - if ( system("@CHIO@ -f $changerDevice move drive 0 slot ".($tape-1)." ") ) { - print "$progname: cannot '@CHIO@ -f $changerDevice move' tape $tape from drive 0\n"; - exit(2); - } - print LOG &do_time(), ": leave: Unload\n"; -} - -sub changeTape { - my($tape) = @_; - print LOG &do_time(), ": enter: changeTape: $tape\n"; - - # - # Unload current tape and load a new tape from slot $tape. - # - - if ($tape != $currentTape) { - - &testTape($tape); - - if( $currentTape != 0 ) { - &Unload($currentTape); - } - &Load($tape); - $currentTape = $tape; - } - print LOG &do_time(), ": leave: changeTape\n"; -} - - -# -# Main program -# - -# -# Initialise -# - -($max_slot, $max_drive) = &getTapeParams(); - -$opt_slot = 0; # perl -w fodder -$opt_info = 0; # perl -w fodder -$opt_reset = 0; # perl -w fodder -$opt_eject = 0; # perl -w fodder - -GetOptions("slot=s", "info", "reset", "eject"); - -$nr_tapes = &getTapeStatus(); - -# -# Before we do anything with the tape changer we'll have to rewind the tape -# - -if (-x "$sbindir/ammt$SUF") { - $MT="$sbindir/ammt$SUF"; - $MTF="-f"; -} elsif (-x "@MT@") { - $MT="@MT@"; - $MTF="@MT_FILE_FLAG@"; -} else { - print LOG &do_time(), ": mt program not found\n"; - print " mt program not found\n"; - exit(1); -} -print LOG &do_time(), ": MT -> $MT $MTF\n"; - -system ("$MT $MTF $tapeDevice rewind") - unless $currentTape == 0; - - -if ( $opt_slot ) { - if ( $opt_slot =~ /first/ ) { - &changeTape(1); - print LOG &do_time(), ": $currentTape $tapeDevice\n"; - print "$currentTape $tapeDevice\n"; - } - if ( $opt_slot =~ /last/ ) { - &changeTape($max_slot); - print LOG &do_time(), ": $currentTape $tapeDevice\n"; - print "$currentTape $tapeDevice\n"; - } - if ( $opt_slot =~ /current/ ) { - &changeTape($currentTape); - print LOG &do_time(), ": $currentTape $tapeDevice\n"; - print "$currentTape $tapeDevice\n"; - } - if ( $opt_slot =~ /next/ ) { - $tape = $currentTape+1; - if ( $tape > $max_slot ) { - $tape = 1; - } - while ( $slots[$tape-1] == 0 ) { # there is at least 1 - if ( ++$tape > $max_slot ) { - $tape = 1; - } - } - &changeTape($tape); - print LOG &do_time(), ": $currentTape $tapeDevice\n"; - print "$currentTape $tapeDevice\n"; - } - if ( $opt_slot =~ /prev/ ) { - $tape = $currentTape-1; - if ( $tape < 1 ) { - $tape = $max_slot; - } - while ( $slots[$tape-1] == 0 ) { # there is at least 1 - if ( --$tape < 1 ) { - $tape = $max_slot; - } - } - &changeTape($tape); - print LOG &do_time(), ": $currentTape $tapeDevice\n"; - print "$currentTape $tapeDevice\n"; - } - if ( $opt_slot =~ /^\d+$/ ) { - &changeTape($opt_slot); - print LOG &do_time(), ": $currentTape $tapeDevice\n"; - print "$currentTape $tapeDevice\n"; - } - if ( $opt_slot =~ /advance/ ) { - $tape=$currentTape+1; - if ( $tape > $max_slot ) { - $tape = 1; - } - if ( $currentTape ) { - &Unload($currentTape); - } - print LOG &do_time(), ": $currentTape $tapeDevice\n"; - print "$currentTape , /dev/null\n"; - } - - exit 0; -} - -if ( $opt_info ) { - if ( $currentTape == 0 ) { - &Load(1); # load random tape - $currentTape = 1; - } - - print LOG &do_time(), ": $currentTape $max_slot 1\n"; - print "$currentTape $max_slot 1\n"; - exit 0; -} - -if ( $opt_reset ) { - &changeTape(1); - print LOG &do_time(), ": $currentTape $tapeDevice\n"; - print "$currentTape $tapeDevice\n"; - exit 0; -} - -if ( $opt_eject ) { - if ( $currentTape ) { - &Unload($currentTape); - print "0 $tapeDevice\n"; - exit 0; - } else { - print "$progname: drive was not loaded\n"; - exit 1; - } -} - -print "$progname: No command was received. Exiting.\n"; -exit 1; diff --git a/changer-src/chg-chs.sh.in b/changer-src/chg-chs.sh.in deleted file mode 100644 index 5980436..0000000 --- a/changer-src/chg-chs.sh.in +++ /dev/null @@ -1,426 +0,0 @@ -#!@SHELL@ -# -# 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. -# -# Author: James da Silva, Systems Design and Analysis Group -# Computer Science Department -# University of Maryland at College Park -# - -# -# chg-chs.sh - chs tape changer script -# - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -pname="chg-chs" - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH - -if [ -d "@AMANDA_DBGDIR@" ]; then - logfile=@AMANDA_DBGDIR@/changer.debug -else - logfile=/dev/null -fi - -CHS=@CHS@ - -if [ -x $sbindir/ammt$SUF ]; then - MT=$sbindir/ammt$SUF - MTF=-f -elif [ -x "@MT@" ]; then - MT=@MT@ - MTF=@MT_FILE_FLAG@ -else - answer=" $myname: mt program not found" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi -echo MT "->" $MT $MTF >> $logfile - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -ourconf=`amgetconf$SUF changerfile` -changerdev=`amgetconf$SUF changerdev` -if test -n "$changerdev" && test x"$changerdev" != x/dev/null; then - CHS="$CHS -f$changerdev" -fi - -# read in some config parameters - -if [ \! -f $ourconf ]; then - answer=" $pname: $ourconf does not exist" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi - -firstslot=`awk '$1 == "firstslot" {print $2}' $ourconf 2>/dev/null` -if [ "$firstslot" = "" ]; then - answer=" $pname: firstslot not specified in $ourconf" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi - -lastslot=`awk '$1 == "lastslot" {print $2}' $ourconf 2>/dev/null` -if [ "$lastslot" = "" ]; then - answer=" $pname: lastslot not specified in $ourconf" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi - -nslots=`expr $lastslot - $firstslot + 1` - -gravity=`awk '$1 == "gravity" {print $2}' $ourconf 2>/dev/null` -if [ "$gravity" = "" ]; then - answer=" $pname: gravity not specified in $ourconf" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi - -needeject=`awk '$1 == "needeject" {print $2}' $ourconf 2>/dev/null` -if [ "$needeject" = "" ]; then - answer=" $pname: needeject not specified in $ourconf" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi - -multieject=`awk '$1 == "multieject" {print $2}' $ourconf 2>/dev/null` -if [ "$multieject" = "" ]; then - echo "Note -> multieject not specified in $ourconf" >> $logfile - multieject=0 -fi - -ejectdelay=`awk '$1 == "ejectdelay" {print $2}' $ourconf 2>/dev/null` -if [ "$ejectdelay" = "" ]; then - echo "Note -> ejectdelay not specified in $ourconf" >> $logfile - ejectdelay=0 -fi - -ourstate=`awk '$1 == "statefile" {print $2}' $ourconf 2>/dev/null` -if [ "$ourstate" = "" ]; then - answer=" $pname: statefile not specified in $ourconf" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi - -# read in state: only curslot and curloaded at the present time - -curslot=`awk '$1 == "curslot" {print $2}' $ourstate 2>/dev/null` -if [ "$curslot" = "" ]; then - curslot=$firstslot -fi - -curloaded=`awk '$1 == "curloaded" {print $2}' $ourstate 2>/dev/null` -if [ "$curloaded" = "" ]; then - curloaded=0 -fi - - -# process the command-line - -# control vars to avoid code duplication: not all shells have functions! -usage=0 -checkgravity=0 -ejectslot=0 -loadslot=0 -slotempty=0 - -if [ $# -ge 1 ]; then command=$1; else command="-usage"; fi - -case "$command" in - --info) # return basic information about changer - - backwards=`expr 1 - $gravity` - answer="$curslot $nslots $backwards" - code=0 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - ;; - --reset) # reset changer - - checkgravity=0 - loadslot=1 - newslot=$firstslot - - # XXX put changer-specific reset here, if applicable - ;; - --eject) # eject tape if loaded - - checkgravity=0 - loadslot=0 - newslot=$curslot - ejectslot=1 - - if [ $curloaded -eq 0 ]; then - answer="$curslot $pname: slot already empty" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi - ;; - --slot) # change to slot - - checkgravity=1 - loadslot=1 - - slotparm=$2 - case "$slotparm" in - [0-9]*) - newslot=$slotparm - if [ \( $newslot -gt $lastslot \) -o \ - \( $newslot -lt $firstslot \) ]; then - answer="$newslot $pname: no slot $newslot: legal range is $firstslot ... $lastslot" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi - ;; - current) - newslot=$curslot - ;; - first) - newslot=$firstslot - ;; - last) - newslot=$lastslot - ;; - next|advance) - newslot=`expr $curslot + 1` - if [ $newslot -gt $lastslot ]; then - newslot=$firstslot - fi - if [ $slotparm = advance ]; then - loadslot=0 - fi - ;; - prev) - newslot=`expr $curslot - 1` - if [ $newslot -lt $firstslot ]; then - newslot=$lastslot - fi - ;; - *) - answer=" $pname: bad slot name \"$slotparm\"" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - ;; - esac - ;; -*) - usage=1 - ;; -esac - - -if [ $usage -eq 1 ]; then - answer=" usage: $pname {-reset | -slot [|current|next|prev|advance]}" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi - - -# check for legal move - -if [ \( $checkgravity -eq 1 \) -a \( $gravity -ne 0 \) ]; then - if [ \( $newslot -lt $curslot \) -o \( "$slotparm" = "prev" \) ] - then - answer="$newslot $pname: cannot go backwards in gravity stacker" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi -fi - -# get tape device name - -device=`awk '$1 == "slot" && $2 == '$newslot' {print $3}' $ourconf 2>/dev/null` -if [ "$device" = "" ]; then - answer="$newslot $pname: slot $newslot device not specified in $ourconf" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi - -# check if load needs an eject first - -if [ \( $needeject -eq 1 \) -a \( $loadslot -eq 1 \) -a \ - \( $curloaded -eq 1 \) -a \( $newslot -ne $curslot \) ]; then - ejectslot=1 -fi - - -if [ $ejectslot -eq 1 ]; then # eject the tape from the drive - - # XXX put changer-specific load command here, if applicable - - curloaded=0 # unless something goes wrong - slotempty=0 - - # generically, first check that the device is there - - if [ ! -c $device ]; then - answer="$newslot $pname: $device: not a device file" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi - - # if multiple eject is required, do it now - if [ $multieject -eq 1 ]; then - loopslot=$curslot - while [ $loopslot -lt $newslot ]; do - $MT $MTF $device offline >/dev/null 2>&1 - if [ $? -ne 0 ]; then - answer="$newslot $pname: $device: unable to change slot $loopslot" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi - loopslot=`/usr/bin/expr $loopslot + 1` - done - fi - - # second, try to unload the device - $MT $MTF $device offline >/dev/null 2>&1 - $CHS deselect -d1 -s$curslot >/dev/null 2>&1 - if [ $? -ne 0 ]; then - # - # XXX if the changer-specific eject command can distinguish - # betweeen "slot empty" and more serious errors, return 1 - # for the first case, 2 for the second case. Generically, - # we just presume an error signifies an empty slot. - # - #slotempty=1 - answer=" $pname: tape unload to slot $curslot failed" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - else - sleep $ejectdelay - fi -fi - -if [ \( $loadslot -eq 1 \) -a \( \( $curloaded -ne 1 \) -o \( \( $curloaded -eq 1 \) -a \( $newslot -ne $curslot \) \) \) ]; then # load the tape from the slot - - # XXX put changer-specific load command here, if applicable - - curloaded=1 # unless something goes wrong - slotempty=0 - - # generically, first check that the device is there - - if [ ! -c $device ]; then - answer="$newslot $pname: $device: not a device file" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi - - $CHS select -s$newslot -d1 >/dev/null 2>&1 - if [ $? -ne 0 ]; then - answer=" $pname: tape load from slot $newslot failed" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi - sleep 60 - - # second, try to rewind the device - $MT $MTF $device rewind >/dev/null 2>&1 - if [ $? -ne 0 ]; then - # - # XXX if the changer-specific load command can distinguish - # betweeen "slot empty" and more serious errors, return 1 - # for the first case, 2 for the second case. Generically, - # we just presume an error signifies an empty slot. - # - slotempty=1 - curloaded=0 - fi -fi - -# update state - -echo "# $pname state cache: DO NOT EDIT!" > $ourstate -echo curslot $newslot >> $ourstate -echo curloaded $curloaded >> $ourstate - -# return slot info - -if [ $slotempty -eq 1 ]; then - answer=" $pname: $newslot slot is empty" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi - -if [ "$command" = -slot -a "$slotparm" = advance ]; then - device=/dev/null -fi - -answer="$newslot $device" -code=0 -echo "Exit -> $answer" >> $logfile -echo "$answer" -exit $code diff --git a/changer-src/chg-disk.sh.in b/changer-src/chg-disk.sh.in deleted file mode 100644 index 5ac3783..0000000 --- a/changer-src/chg-disk.sh.in +++ /dev/null @@ -1,318 +0,0 @@ -#! @SHELL@ -# -# Amanda, The Advanced Maryland Automatic Network Disk Archiver -# Copyright (c) 1991-1999 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. -# -# Author: Jean-Christian SIMONETTI, System and Network Engineer -# Wanadoo Portails -# Sophia Antipolis, France -# -# This changer script is based on a directory structure like: -# slot_root_dir -| -# |- info -# |- data -> slot1 -# |- slot1 -# |- slot2 -# |- ... -# |- slotn -# where 'slot_root_dir' is the tapedev 'file:xxx' parameter and 'n' -# is the LASTSLOT value of your changerfile config file. If LASTSLOT is -# not defined, the value of the tapecycle parameter is used. -# -# To use this driver, just put the line 'tpchanger "chg-disk"' in your -# amanda.conf. -# -# Example of use (amanda.conf): -# --- cut here --- -# tapedev "file:/BACKUP2/slots/" -# rawtapedev "file:/BACKUP2/slots/" -# changerdev "/dev/null" -# changerfile "chg-disk" -# tpchanger "chg-disk" -# changerfile "/usr/local/amanda/etc/changer" -# tapetype HARD-DISK -# define tapetype HARD-DISK { -# length 12000 mbytes -# } -# --- cut here --- -# -# Example changerfile (chg-disk.conf): -# --- cut here --- -# LASTSLOT=12 -# --- cut here --- -# -# The number of slot is equal to your LASTSLOT or tapecycle. -# You must create the slots and data directory. -# - - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb:/usr/local/bin -export PATH - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -MYNAME=$0 - -TAPE=`amgetconf$SUF tapedev` -if test X"$TAPE" == X""; then - echo " tapedev not specified in amanda.conf." - exit 2 -fi -SLOTDIR=`echo $TAPE | sed 's/^file://'` - -isinteger() { - # should be exactly one arg - [ $# = 1 ] || return 1 - # if arg is null, no expr needed - [ "${1}" = '' ] && return 1 - # expr will return 0 on match - expr "$1" : '[0-9][0-9]*$' > /dev/null 2>&1 -} - -# Need rwx access to the virtual tape itself. -if ! test -d $SLOTDIR; then - echo " Virtual-tape directory $SLOTDIR does not exist." - exit 2 -fi -if ! test -w $SLOTDIR; then - echo " Virtual-tape directory $SLOTDIR is not writable." - exit 2 -fi - - -# need rwx access to directory of changer file -CHANGERFILE=`amgetconf$SUF changerfile` -conf_match=`expr "$CHANGERFILE" : .\*\.conf\$` -if [ $conf_match -ge 6 ]; then - CONFIGFILE=$CHANGERFILE - CHANGERFILE=`echo $CHANGERFILE | sed 's/.conf$//g'` -else - CONFIGFILE=$CHANGERFILE.conf -fi - -CFDir=`dirname ${CHANGERFILE}` -[ -d ${CFDir} -a -r ${CFDir} -a -w ${CFDir} -a -x ${CFDir} ] || - { echo " $MYNAME: need 'rwx' access to '$CFDir'"; exit 2 ; } - -# check or create changer metadata files -ACCESSFILE=$CHANGERFILE-access -[ -f $ACCESSFILE -a -r $ACCESSFILE -a -w $ACCESSFILE ] || - echo 0 > $ACCESSFILE || - { echo " $MYNAME: could not access or create '$ACCESSFILE'" ; exit 2 ; } -CLEANFILE=$CHANGERFILE-clean -[ -f $CLEANFILE -a -r $CLEANFILE -a -w $CLEANFILE ] || - echo 0 > $CLEANFILE || - { echo " $MYNAME: could not access or create '$CLEANFILE'" ; exit 2 ; } -SLOTFILE=$CHANGERFILE-slot -[ -f $SLOTFILE -a -r $SLOTFILE -a -w $SLOTFILE ] || - echo 0 > $SLOTFILE || - { echo " $MYNAME: could not access or create '$SLOTFILE'" ; exit 2 ; } - -# read and check metadata -ACCESSCOUNT=`cat $ACCESSFILE` -isinteger $ACCESSCOUNT || { ACCESSCOUNT=0 ; echo 0 > $ACCESSFILE ; } -CLEANCOUNT=`cat $CLEANFILE` -isinteger $CLEANCOUNT || { CLEANCOUNT=0 ; echo 0 > $CLEANFILE ; } - -FIRSTSLOT=1 -LASTSLOT=`amgetconf$SUF tapecycle` -if test -r $CONFIGFILE; then - . $CONFIGFILE -fi -CURSLOT=0 -CLEANSLOT=$LASTSLOT -NSLOT=`expr $LASTSLOT - $FIRSTSLOT + 1` - -load() { - WHICHSLOT=$1; - # unload should have been called, but just in case ... - [ -h $SLOTDIR/data ] && unload - ln -s $SLOTDIR/slot$WHICHSLOT $SLOTDIR/data - echo $WHICHSLOT > $SLOTFILE -} - -unload() { - rm -f $SLOTDIR/data - echo "0" > $SLOTFILE -} - -readstatus() { - CURSLOT=`cat $SLOTFILE` -} - -loadslot() { - WHICHSLOT=$1 - - TYPE=string # default if not numeric - isinteger $WHICHSLOT && TYPE=digit - - readstatus - NEWSLOT=0 - if [ $WHICHSLOT = "current" ]; then - if [ $CURSLOT -le 0 ]; then - load $FIRSTSLOT - echo "$FIRSTSLOT $TAPE" - exit 0 - else - echo "$CURSLOT $TAPE" - exit 0 - fi - elif [ $WHICHSLOT = "next" -o $WHICHSLOT = "advance" ]; then - NEWSLOT=`expr $CURSLOT + 1` - [ $NEWSLOT -gt $LASTSLOT ] && NEWSLOT=$FIRSTSLOT - elif [ $WHICHSLOT = "prev" ]; then - NEWSLOT=`expr $CURSLOT - 1` - [ $NEWSLOT -lt $FIRSTSLOT ] && NEWSLOT=$LASTSLOT - elif [ $WHICHSLOT = "first" ]; then - NEWSLOT=$FIRSTSLOT - elif [ $WHICHSLOT = "last" ]; then - NEWSLOT=$LASTSLOT - elif [ $TYPE = "digit" ]; then - if [ $WHICHSLOT -ge $FIRSTSLOT -a $WHICHSLOT -le $LASTSLOT ]; then - NEWSLOT=$WHICHSLOT - else - echo "$WHICHSLOT illegal slot" - exit 1 - fi - elif [ $WHICHSLOT = "clean" ]; then - NEWSLOT=$CLEANSLOT - else - echo "$WHICHSLOT illegal request" - exit 1 - fi - if [ $NEWSLOT = $CURSLOT ]; then - echo "$CURSLOT $TAPE" - exit 0 - fi - if [ $NEWSLOT = $CLEANSLOT ]; then - expr ${CLEANCOUNT:=0} + 1 > $CLEANFILE - echo 0 > $ACCESSFILE - else - expr ${ACCESSCOUNT:=0} + 1 > $ACCESSFILE - if [ $ACCESSCOUNT -gt $LASTSLOT ]; then - $MYNAME -slot clean >/dev/null - fi - fi - - readstatus - if [ $CURSLOT -ne 0 ]; then - unload - fi - - if [ $WHICHSLOT = "advance" ]; then - echo "$NEWSLOT /dev/null" - exit 0 - fi - load $NEWSLOT - echo "$NEWSLOT $TAPE" - exit 0 -} - -info() { - readstatus - echo "$CURSLOT $NSLOT 1" - exit 0 -} - -reset() { - readstatus - [ $CURSLOT -gt 0 ] && unload - load $FIRSTSLOT - echo "$FIRSTSLOT $tape" - exit 0 -} - -eject() { - readstatus - if [ $CURSLOT -le 0 ]; then - echo "0 Drive was not loaded" - exit 1 - else - unload - echo $CURSLOT - exit 0 - fi -} - - -while [ $# -ge 1 ];do - case $1 in - -slot) - shift - loadslot $* - ;; - -clean) - shift - loadslot clean - ;; - -current) - shift - loadslot current - ;; - -next) - shift - loadslot next - ;; - -advance) - shift - loadslot advance - ;; - -prev) - shift - loadslot prev - ;; - -first) - shift - loadslot first - ;; - -last) - shift - loadslot last - ;; - -info) - shift - info - ;; - -reset) - shift - reset - ;; - -eject) - shift - eject - ;; - *) - echo " Unknown option $1" - exit 2 - ;; - esac -done - diff --git a/changer-src/chg-iomega.pl.in b/changer-src/chg-iomega.pl.in deleted file mode 100644 index 56a1329..0000000 --- a/changer-src/chg-iomega.pl.in +++ /dev/null @@ -1,290 +0,0 @@ -#! @PERL@ -w - -# Catch for sh/csh on systems without #! ability. -eval '(exit $?0)' && eval 'exec @PERL@ -S $0 ${1+"$@"}' - & eval 'exec @PERL@ -S $0 $argv:q' - if 0; - -# -# This changer script is designed for IOMEGA or JAZZ disks of various sizes -# as well as any other removable disk media. -# -# This is a PURELY MANUAL changer. It requests insertion of disk media via -# messages on /dev/tty. So it cannot be used via crontab. -# -# Make sure you comply with any of the following. -# - Add statements -# tpchanger "chg-iomega" -# tapedev "file:" -# # (e.g. tapedev "file:/mnt/iomega" ) -# tapetype IOMEGA -# -# -# define tapetype IOMEGA { -# comment "IOMega 250 MB floppys" -# length 250 mbytes -# filemark 100 kbytes -# speed 1 mbytes -# } -# to your /etc/amanda//amanda.conf file -# - Add entry to /etc/fstab to specify mount point of removable disk -# and make this disk mountable by any user. -# - Format all disks, add a "data" sub directory and label all disks -# by a call to amlabel. -# - Be aware that as of version 2.4.4p1, amanda can't handle backups that are -# larger than the size of the removable disk media. So make sure -# /etc/amanda//disklist specifies chunks smaller than the -# disk size. -# -# This script is built up out of bits and pieces of other scripts, in -# particular chg-chio.pl. That script was written by -# Nick Hibma - nick.hibma@jrc.it -# -# Permission to freely use and distribute is granted (by me and was granted by -# the original authors). -# -# Christoph Pospiech -# - -require 5.001; - -($progname = $0) =~ s#/.*/##; - -use English; -use Getopt::Long; - -delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV', 'PATH'}; -$ENV{'PATH'} = "/usr/bin:/usr/sbin:/sbin:/bin"; - -$| = 1; - -if (-d "@AMANDA_DBGDIR@") { - $logfile = "@AMANDA_DBGDIR@/changer.debug"; -} else { - $logfile = "/dev/null"; -} -die "$progname: cannot open $logfile: $ERRNO\n" - unless (open (LOG, ">> $logfile")); - - -# -# get the information from the configuration file -# - -$prefix="@prefix@"; -$prefix=$prefix; # avoid warnings about possible typo -$exec_prefix="@exec_prefix@"; -$exec_prefix=$exec_prefix; # Ditto -$sbindir="@sbindir@"; -if ( "@USE_VERSION_SUFFIXES@" eq "yes" ) { - $SUF = "-@VERSION@"; -} else { - $SUF = ""; -} - -chomp ($tapeDevice = `$sbindir/amgetconf$SUF tapedev 2>&1`); -die "tapedev not found in amanda.conf" - if !$tapeDevice or $tapeDevice eq "" or - $tapeDevice =~ m/no such parameter/; -chomp ($changerDevice = `$sbindir/amgetconf$SUF changerdev 2>&1`); -chomp $changerDevice; -die "changerdev not found in amanda.conf" - if !$changerDevice or $changerDevice eq "" or - $changerDevice =~ m/no such parameter/; - -# -# Initialise a few global variables -# - -$current_label = ""; -#$current_slot = 0; -$max_slot = 1; - -@dow = ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); -@moy = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); - -sub do_time { - my (@t); - my ($r); - - ### - # Get the local time for the value. - ### - - @t = localtime (time ()); - - ### - # Return the result. - ### - - $r = sprintf "%s %s %2d %2d:%02d:%02d %4d", - $dow[$t[6]], - $moy[$t[4]], - $t[3], - $t[2], $t[1], $t[0], - 1900 + $t[5]; - - return $r; -} - - -sub is_mounted { - my $device = shift @_; - my ($directory) = ($device =~ m/file\:(.*)$/); - if ( -d "$directory/data" ) { return 1;} - else {return 0;} -} - -sub request { - my $label = shift @_; - my $answer; - open (TTY, "+= 5) { - print LOG &do_time(), ": disk not found\n"; - print "disk not found\n"; - exit 1; - } else { - print LOG &do_time(), ": 1 $tapeDevice\n"; - print "1 $tapeDevice\n"; - exit 0; - } -} - -if ( $opt_label ) { - print LOG &do_time(), ": label $opt_label requested\n"; - # no operation - print LOG &do_time(), ": 1 $tapeDevice\n"; - print "1 $tapeDevice\n"; - exit 0; -} - -print "$progname: No command was received. Exiting.\n"; -exit 1; diff --git a/changer-src/chg-juke.sh.in b/changer-src/chg-juke.sh.in deleted file mode 100755 index b894623..0000000 --- a/changer-src/chg-juke.sh.in +++ /dev/null @@ -1,266 +0,0 @@ -#!@SHELL@ - -# chg-juke -# -# This assumes we have possibly rait-striped drives in several -# jukeboxes, controlled by the Fermilab "juke" package -# -# So we could have 3 drives in 3 jukeboxes: -# changerscript="chg-juke" -# changerfile=/some/file -# tapedev="rait:/dev/nst{1,2,3}" -# changerdev="myjuke{0,1,2}" -# Or, if the jukebox has multiple drives: -# changerscript="chg-juke" -# changerfile=/some/file -# tapedev="rait:/dev/nst{1,2,3}" -# changerdev="myjuke" -# We need therefore to generate lists with csh to expand the tapedev -# and changerdev, and deal with the possibility that there are several -# jukeboxes and several drives in each jukebox involved. - -# -# debugging... -# -if [ -d "@AMANDA_DBGDIR@" ]; then - DBGFILE=@AMANDA_DBGDIR@/changer.debug -else - DBGFILE=/dev/null -fi -exec 2>$DBGFILE -echo "args: $0 $*" >&2 -set -x - -# -# the usual config fun -# -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ -MT=ammt - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@"; -else - SUF= -fi -getconf=$sbindir/amgetconf$SUF - -# -# make sure we can find JUKE later -# -JUKE_DIR=/usr/local -# Fermilab specific -if [ -f /usr/local/etc/setups.sh ] -then - . /usr/local/etc/setups.sh - setup juke -fi - -PATH=$sbindir:$libexecdir:$JUKE_DIR/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH JUKE_DIR - -build_drivelists() { - # - # figure out which drives are in which jukebox - # - count=0 - for juke in $jlist - do - for d in $dlist - do - if juke list -j $juke drive $d | grep 'drive [0-9]' >&2 - then - eval "drives_in_$juke=\"\$drives_in_$juke $d\"" - fi - done - done -} - -unload_drive_n_clean() { - - # - # $1 is whether to clean it - # - cleanit=$1 - - # - # if the drive is ONLINE, mt unload it - # - if $MT -t $tapedev status | egrep "$ONLINEREGEX" >&2 - then - $MT -t $tapedev offline >&2 || true - fi - - # - # unload any tapes present, maybe load/unload a cleaning cartridge - # - for juke in $jlist - do - eval "jdlist=\"\$drives_in_$juke\"" - for drive in $jdlist - do - juke unload -j $juke drive $drive >&2 || true - if juke list -j $juke drive $drive | grep '(empty)' >&2 - then - : - else - echo "$slot $tapedev unable to empty preceding tape from drive $drive" - exit 1 - fi - - if $cleanit - then - juke load -j $juke drive $drive clean - sleep 120 - juke unload -j $juke drive $drive - fi - done - done -} - -load_drives() { - # - # load slots. If it's a stripe, load several... - # - for juke in $jlist - do - eval "jdlist=\"\$drives_in_$juke\"" - jndrives=`echo $jdlist | wc -w` - count=0 - for drive in $jdlist - do - rslot=`expr $newslot '*' $jndrives + $count` - juke load -j $changerdev drive $drive slot $rslot >&2 - if juke list -j $changerdev drive $drive | grep '(empty)' >&2 - then - echo "$slot $tapedev unable to load tape into drive" - exit 1 - fi - count=`expr $count + 1` - done - done - - # - # wait for drive(s) to come online - # - count=0 - until $MT -t $tapedev status | egrep "$ONLINEREGEX" >&2 - do - count=`expr $count + 1` - if [ $count -gt 24 ] - then - echo "$slot $tapedev never came online" - exit 1 - fi - sleep 5 - done -} - - -ONLINEREGEX="ONLINE|READY|sense[_ ]key[(]0x0[)]|sense key error = 0|^er=0$" - -# -# get config variables -# -changerfile=`$getconf changerfile` - tapedev=`$getconf tapedev` - changerdev=`$getconf changerdev` - dlist=`csh -c "echo $tapedev" | sed -e 's/rait://g' -e 's/tape://g'` - ndrives=`echo $dlist | wc -w` - jlist=`csh -c "echo $changerdev"` - njukes=`echo $jlist | wc -w` - totalslots=`for juke in $jlist ; do juke list -j $juke; done | - grep -v '^clean' | - grep 'slot [0-9]' | - wc -l` - -if [ $ndrives -gt 1 ] -then - # - # if it's a 3 tape stripe and we have 30 actual slots - # we only have 10 virtual slots... - # - totalslots=`expr $totalslots / $ndrives` -fi - -build_drivelists - -# -# get current slot if we have one -# -if [ -f "$changerfile" ] -then - slot="`cat $changerfile`" -else - slot=0 - echo $slot > $changerfile -fi - -# -# We treat -reset just like -slot 0 -# -if [ x$1 = 'x-reset' ] -then - set : -slot 0 - shift -fi - -case x$1 in - -x-slot) - - # - # handle special slots... - # - case "$2" in - current) newslot=$slot ; load=true;; - next) newslot=`expr $slot + 1`; load=true;; - advance) newslot=`expr $slot + 1`; load=false;; - prev) newslot=`expr $slot - 1`; load=true;; - first) newslot=0 ; load=true;; - last) newslot=-1 ; load=true;; - *) newslot=$2 ; load=true;; - esac - - if [ $newslot = "clean" ] - then - unload_drive_n_clean true - else - if [ 0 -gt $newslot ] - then - newslot=`expr $totalslots - 1` - fi - - if [ $totalslots -le $newslot ] - then - newslot=0 - fi - - echo $newslot > $changerfile - slot=$newslot - - if $load - then - unload_drive_n_clean false - load_drives - fi - fi - - echo $slot $tapedev - ;; - -x-info) - echo $slot $totalslots 1 - exit 0 - ;; - -x-eject) - unload_drive_n_clean false - echo $slot $tapedev - ;; -esac - -exit $rc diff --git a/changer-src/chg-lib.sh.in b/changer-src/chg-lib.sh.in index 2df29bf..0e383e6 100644 --- a/changer-src/chg-lib.sh.in +++ b/changer-src/chg-lib.sh.in @@ -45,25 +45,116 @@ _() { #### # 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 --git a/changer-src/chg-manual.sh.in b/changer-src/chg-manual.sh.in deleted file mode 100644 index 1c45651..0000000 --- a/changer-src/chg-manual.sh.in +++ /dev/null @@ -1,365 +0,0 @@ -#!@SHELL@ -# -# Exit Status: -# 0 Alles Ok -# 1 Illegal Request -# 2 Fatal Error -# - -# try to hit all the possibilities here -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH - -# -# Changer config file (changerfile) -# -# resend_mail=900 # 15 minutes -# timeout_mail=604800 # 7 days -# request="tty" # Use the tty to ask the user to change tape. -# # Can't be use by cron -# request="email" # Send an email to ask the user to change tape. -# request="tty_email" # Use the tty if it exist or send an email. -# #Default is "tty_email" -# -# - -if [ -d "@AMANDA_DBGDIR@" ]; then - logfile=@AMANDA_DBGDIR@/changer.debug -else - logfile=/dev/null -fi - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -myname=$0 - -EGREP='@EGREP@' - -if [ -x $sbindir/ammt$SUF ]; then - MT=$sbindir/ammt$SUF - MTF=-f -elif [ -x "@MT@" ]; then - MT=@MT@ - MTF=@MT_FILE_FLAG@ -else - answer=" $myname: mt program not found" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi -echo MT "->" $MT $MTF >> $logfile - -if [ -x $sbindir/amdd$SUF ]; then - DD=$sbindir/amdd$SUF -elif [ -x "@DD@" ]; then - DD=@DD@ -else - answer=" $myname: dd program not found" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi -echo DD "->" $DD >> $logfile - -MAILER=@MAILER@ -ONLINEREGEX="ONLINE|READY|sense[_ ]key[(]0x0[)]|sense key error = 0|^er=0$|, mt_erreg: 0x0|^Current Driver State: at rest$" -REPORTTO=`amgetconf$SUF mailto` -tape=`amgetconf$SUF tapedev` - -if [ -z "$tape" ]; then - echo " tapedev not specified in amanda.conf." - exit 2 -fi - -ORG=`amgetconf$SUF ORG` - -firstslot=1 -lastslot=99 -resend_mail=900 # 15 minutes -timeout_mail=604800 # 7 days - -changerfile=`amgetconf$SUF changerfile` - -conf_match=`expr "$changerfile" : .\*\.conf\$` -if [ $conf_match -ge 6 ]; then - configfile=$changerfile - changerfile=`echo $changerfile | sed 's/.conf$//g'` -else - configfile=$changerfile.conf -fi - -cleanfile=$changerfile-clean -accessfile=$changerfile-access -slotfile=$changerfile-slot -[ ! -f $cleanfile ] && echo 0 > $cleanfile -[ ! -f $accessfile ] && echo 0 > $accessfile -[ ! -f $slotfile ] && echo $firstslot > $slotfile -cleancount=`cat $cleanfile` -accesscount=`cat $accessfile` -slot=`cat $slotfile` - -request_tty() { - if > /dev/tty; then - echo -n "Insert tape into slot $1 and press return" > /dev/tty - read ANSWER < /dev/tty - else - echo "no /dev/tty to ask to change tape" - exit 1 - fi -} - - -### -# If $changerfile exists, source it into this script. One reason is to -# override the request() function above which gets called to request -# that a tape be mounted. Here is an alternate versions of request() -# that does things more asynchronous: -# -request_email() { - # Send E-mail about the mount request and wait for the drive - # to go ready by checking the status once a minute. Repeat - # the E-mail once an hour in case it gets lost. - timeout=0 - gtimeout=$timeout_mail - while true;do - if [ $gtimeout -le 0 ]; then - echo "timeout waiting for tape online" - exit 1; - fi - if [ $timeout -le 0 ]; then - msg="insert Amanda tape into slot $1 ($tape)" - subject="$ORG AMANDA TAPE MOUNT REQUEST FOR SLOT $1" - echo "$msg" | $MAILER -s "$subject" $REPORTTO - timeout=$resend_mail - fi - echo " -> rewind $tape" >> $logfile - $MT $MTF $tape rewind >> $logfile 2>&1 - echo " -> status $tape" >> $logfile - used=`$MT $MTF $tape status 2>&1 | tee -a $logfile | $EGREP "$ONLINEREGEX"` - echo " -> loaded <$used>" >> $logfile - if [ ! -z "$used" ];then - break - fi - sleep 60 - timeout=`expr $timeout - 60` - gtimeout=`expr $gtimeout - 60` - done -} -request_tty_email() { - if > /dev/tty; then - echo -n "Insert tape into slot $1 and press return" > /dev/tty - read ANSWER < /dev/tty - else - request_email "$1" - fi -} - -request() { - if [ X"$request" = X"tty" ]; then - request_tty "$1" - else if [ X"$request" = X"email" ]; then - request_email "$1" - else - request_tty_email "$1" - fi - fi -} - -if [ -f $configfile ]; then - . $configfile -fi - -# - -eject() { - echo " -> rewind $tape" >> $logfile - $MT $MTF $tape rewind >> $logfile 2>&1 - echo " -> status $tape" >> $logfile - used=`$MT $MTF $tape status 2>&1 | tee -a $logfile | $EGREP "$ONLINEREGEX"` - echo " -> loaded <$used>" >> $logfile - if [ ! -z "$used" ];then - echo " -> offline $tape" >> $logfile - $MT $MTF $tape offline >> $logfile 2>&1 - answer="$slot $tape" - code=0 - else - answer=" $myname: Drive was not loaded" - code=1 - fi - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -} - -# - -reset() { - echo " -> rewind $tape" >> $logfile - $MT $MTF $tape rewind >> $logfile 2>&1 - echo " -> status $tape" >> $logfile - used=`$MT $MTF $tape status 2>&1 | tee -a $logfile | $EGREP "$ONLINEREGEX"` - echo " -> loaded <$used>" >> $logfile - if [ ! -z "$used" ];then - answer="$slot $tape" - else - answer="0 $tape" - fi - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit 0 -} - -# load # - -loadslot() { - echo " -> rewind $tape" >> $logfile - $MT $MTF $tape rewind >> $logfile 2>&1 - echo " -> status $tape" >> $logfile - used=`$MT $MTF $tape status 2>&1 | tee -a $logfile | $EGREP "$ONLINEREGEX"` - echo " -> loaded <$used>" >> $logfile - whichslot=$1 - case $whichslot in - current) - load=$slot - [ $load -eq 0 ] && load=$firstslot - [ $load -gt $lastslot ] && load=$firstslot - [ $load -lt $firstslot ] && load=$lastslot - ;; - next|advance) - load=`expr $slot + 1` - [ $load -gt $lastslot ] && load=$firstslot - ;; - prev) - load=`expr $slot - 1` - [ $load -lt $firstslot ] && load=$lastslot - ;; - first) - load=$firstslot - ;; - last) - load=$lastslot - ;; - [0-9]|[0-9][0-9]) - if [ $1 -lt $firstslot -o $1 -gt $lastslot ]; then - answer=" $myname: slot must be $firstslot .. $lastslot" - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit 1 - fi - load=$1 - ;; - *) - answer=" $myname: illegal slot: $1" - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit 1 - ;; - esac - # - if [ ! -z "$used" -a $load = $slot ];then - # already loaded - answer="$slot $tape" - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit 0 - fi - - # if [ $load = $ecleanslot ]; then - # expr $cleancount + 1 > $cleanfile - # echo 0 > $accessfile - # else - expr $accesscount + 1 > $accessfile - # if [ $accesscount -gt 9 ]; then - # $myname -slot $cleanslot >/dev/null - # used=0 - # fi - # fi - - # - if [ ! -z "$used" ]; then - echo " -> offline $tape" >> $logfile - $MT $MTF $tape offline >> $logfile 2>&1 - used="" - fi - if [ $whichslot = advance ]; then - tape=/dev/null - else - echo " -> load $load" >> $logfile - while [ -z "$used" ]; do - request $load - echo " -> rewind $tape" >> $logfile - $MT $MTF $tape rewind >> $logfile 2>&1 - echo " -> status $tape" >> $logfile - used=`$MT $MTF $tape status 2>&1 | tee -a $logfile | $EGREP "$ONLINEREGEX"` - echo " -> loaded <$used>" >> $logfile - done - $DD if=$tape bs=32k count=1 >> $logfile 2>&1 - fi - echo $load > $slotfile - answer="$load $tape" - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit 0 -} - -# - -info() { - echo " -> rewind $tape" >> $logfile - $MT $MTF $tape rewind >> $logfile 2>&1 - echo " -> status $tape" >> $logfile - used=`$MT $MTF $tape status 2>&1 | tee -a $logfile | $EGREP "$ONLINEREGEX"` - echo " -> loaded <$used>" >> $logfile - if [ -z "$used" ];then - answer="0 $lastslot 1" - else - answer="$slot $lastslot 1" - fi - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit 0 -} - -# -# main part -# - -echo Args "->" "$@" >> $logfile -while [ $# -ge 1 ];do - case $1 in - -slot) - shift - loadslot $* - ;; - -info) - shift - info - ;; - -reset) - shift - reset - ;; - -eject) - shift - eject - ;; - *) - echo " $myname: Unknown option $1" - exit 2 - ;; - esac -done - -exit 0 diff --git a/changer-src/chg-mcutil.sh.in b/changer-src/chg-mcutil.sh.in deleted file mode 100644 index d31201f..0000000 --- a/changer-src/chg-mcutil.sh.in +++ /dev/null @@ -1,564 +0,0 @@ -#!@SHELL@ -# -# Author: Robert Dege -# -# -# version 1.2 -# ----------- -# fixed last_cleaned file so that if it doesn't exist, it gets created with current date, not '0,0' -# fixed a bug that was reporting the wrong slot # to amcheck -# -# version 1.1 -# ----------- -# amverify was failing when using -slot current. Fixed exit $code from 1 -> 0. -# removed useless $current variables from movetape() function. -# -# -# -# Exit Status: -# 0 Alles Ok -# 1 Illegal Request -# 2 Fatal Error -# - - -# -# Set Path so that it includes Amanda binaries, and access to tapechanger & drive programs -# -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb:/usr/local/bin -export PATH - - -# -# Define Suffix for amanda binaries -# -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - - -# -# Load configuration data from the config file -# - -ourconf=`amgetconf$SUF changerfile` -myname=$0 - - -if [ ! -f "$ourconf" ]; then - code=2 - echo "Command Line -> $myname $@\nExit($code): $ourconf not found as listed in amanda.conf" - exit $code -fi - - -# grab mcutil info -tmpval1=`grep ^mcutil $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^mcutil $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): mcutil not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - MCUTIL=$tmpval2 -else - MCUTIL=$tmpval1 -fi - - -# grab tape info -tmpval1=`grep ^tape $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^tape $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): tape not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - tape=$tmpval2 -else - tape=$tmpval1 -fi - - -# grab firstslot info -tmpval1=`grep ^firstslot $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^firstslot $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): firstslot not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - firstslot=$tmpval2 -else - firstslot=$tmpval1 -fi - - -# grab lastslot info -tmpval1=`grep ^lastslot $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^lastslot $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): lastslot not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - lastslot=$tmpval2 -else - lastslot=$tmpval1 -fi - - -# grab use_cleaning info -tmpval1=`grep ^use_cleaning $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^use_cleaning $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): use_cleaning not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - use_cleaning=$tmpval2 -else - use_cleaning=$tmpval1 -fi - - -# grab cleanslot info -tmpval1=`grep ^cleanslot $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^cleanslot $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): cleanslot not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - cleanslot=$tmpval2 -else - cleanslot=$tmpval1 -fi - - -# grab cleansleep info -tmpval1=`grep ^cleansleep $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^cleansleep $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): cleansleep not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - cleansleep=$tmpval2 -else - cleansleep=$tmpval1 -fi - - -# grab cleanme info -tmpval1=`grep ^cleanme $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^cleanme $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): cleanme not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - cleanme=$tmpval2 -else - cleanme=$tmpval1 -fi - - -# grab cleanfile info -tmpval1=`grep ^cleanfile $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^cleanfile $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): cleanfile not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - cleanfile=$tmpval2 -else - cleanfile=$tmpval1 -fi - - -# grab lastfile info -tmpval1=`grep ^lastfile $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^lastfile $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): lastfile not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - lastfile=$tmpval2 -else - lastfile=$tmpval1 -fi - - -# grab currentslot info -tmpval1=`grep ^currentslot $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^currentslot $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): currentslot not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - currentslot=$tmpval2 -else - currentslot=$tmpval1 -fi - - -# grab logfile info -tmpval1=`grep ^logfile $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^logfile $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): logfile not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - logfile=$tmpval2 -else - logfile=$tmpval1 -fi - -[ ! -w $logfile ] && logfile=/dev/null - - -# grab slot0source info -tmpval1=`grep ^slot0source $ourconf | awk -F\ '{print $2}'` -tmpval2=`grep ^slot0source $ourconf | awk -F= '{print $2}'` -if [ -z "$tmpval1" ] && [ -z "$tmpval2" ]; then - code=2 - echo "Command Line -> $myname $@ \nExit($code): slot0source not specified in $ourconf" - exit $code -elif [ -z "$tmpval1" ]; then - slot0source=$tmpval2 -else - slot0source=$tmpval1 -fi - - - -# -# Verify currentslot contains a value -# -if [ ! -f $currentslot ] || [ `cat $currentslot` -lt $firstslot ];then - readstatus - echo $used > $currentslot -fi - -current=`cat $currentslot` - - -# Start logging to $logfile -echo "\n\n==== `date` ====" >> $logfile -echo "Command Line -> $myname $@" >> $logfile - - -# -# is Use Cleaning activated? -# -if [ $use_cleaning -eq 1 ]; then - curday=`date +%j` - curyear=`date +%Y` - - [ ! -f $cleanfile ] && echo 0 > $cleanfile - [ ! -f $lastfile ] && echo $curday,$curyear > $lastfile - - -# -# Check to see when tape drive was last cleaned -# output warning message if it's been too long -# Currently, if it's been more than 45days, then -# an error message is displayed everytime the -# script is called, until the clean parameter -# is run -# - cleaned=`cat $cleanfile` - lastcleaned=`cut -d, -f1 $lastfile` - yearcleaned=`cut -d, -f2 $lastfile` - - if [ `expr $curday - $lastcleaned` -lt 0 ];then - diffday=`expr $curday - $lastcleaned + 365` - diffyear=`expr $curyear - $yearcleaned - 1` - else - diffday=`expr $curday - $lastcleaned` - diffyear=`expr $curyear - $yearcleaned` - fi - - if [ $diffday -gt $cleanme ] || [ $diffyear -ge 1 ];then - if [ $diffyear -ge 1 ];then - echo "Warning, it's been $diffyear year(s) & $diffday days since you last cleaned the tape drive!" - else - echo "Warning, it's been $diffday days since you last cleaned the tape drive!" - fi - fi - -fi - - -# -# Read if there is a tape in the tape drive -# If so, determine what slot is the tape from -# -readstatus() { - echo -n "querying tape drive....." >> $logfile - used=`expr \`$MCUTIL -e drive | tr = \] | cut -d\] -f2\` - $slot0source` - echo " Done" >> $logfile - - # Give changer a chance to reset itself - sleep 3 -} - - -# -# If tape is in the drive, eject it -# -eject() { - echo "tape drive eject was called" >> $logfile - - readstatus - - if [ $used -ge $firstslot ];then - $MCUTIL -m drive slot:$used - code=$? - else - code=1 - fi - - if [ $code -eq 0 ];then - answer="Cartridge $used successfully ejected from $tape" - echo "Exit($code): $answer" >> $logfile - echo $current $tape #For amtape output - return $code - elif [ $code -eq 1 ];then - answer="No Cartridge in Tape Drive" - echo "Exit($code): $answer" >> $logfile - echo $current $answer #For amtape output - exit $code - else - answer="Tape abnormally failed" - echo "Exit($code): $answer" >> $logfile - echo $current $answer #For amtape output - exit $code - fi -} - - -# -# reset tape drive to a current state. -# This involves ejecting the current tape (if occupied) -# and inserting the tape in $firstslot -# -reset() { - echo "tape drive reset was called" >> $logfile - - readstatus - - if [ $used -ge $firstslot ];then - eject - fi - - res=`$MCUTIL -m slot:$firstslot drive` - code=$? - - - if [ $code -eq 0 ];then - echo $firstslot > $currentslot - answer="$firstslot - Tape drive was successfully reset" - elif [ $code -eq 1 ];then - answer="$firstslot - Tape drive reset failed\nCommand -> $res" - else - code=2 - answer="$firstlot - Tape abnormally failed -> $res" - fi - - echo "Exit($code): slot $answer" >> $logfile - echo $firstslot #For amtape output - exit $code -} - - - - -# -# Load a specific cartridge into the changer -# -loadslot() { - echo "loadslot was called" >> $logfile - - readstatus - - whichslot=$1 - - case $whichslot in - current) - if [ $current -ge $firstslot ];then - load=$current - else - load=$used - fi - - movetape - ;; - next|advance) - [ $used -lt $firstslot ] && used=$current - - load=`expr $used + 1` - [ $load -gt $lastslot ] && load=$firstslot - - if [ $whichslot = advance ];then - echo $load > $currentslot - code=0 - answer="advancing to slot $load" - echo "Exit($code): $answer" >> $logfile - echo $load $code - exit $code - else - movetape - fi - ;; - prev) - [ $used -lt $firstslot ] && used=$current - - load=`expr $used - 1` - [ $load -lt $firstslot ] && load=$lastslot - movetape - ;; - first) - load=$firstslot - movetape - ;; - last) - load=$lastslot - movetape - ;; - [$firstslot-$lastslot]) - load=$1 - movetape - ;; - clean) - if [ use_cleaning -eq 1 ];then - current=$cleanslot - eject - $MCUTIL slot:$cleanslot drive - sleep $cleansleep - echo "$curday,$curyear" > $lastfile - echo `expr $cleaned + 1` > $cleanfile - reset - else - code=1 - answer="Cleaning not enabled in config" >> $logfile - echo "Exit($code): $answer" >> $logfile - echo $cleanslot $answer - exit $code - fi - ;; - *) - code=1 - answer="\"$whichslot\" invalid menu option" - echo "Exit($code): slot $answer" >> $logfile - echo "$answer" - exit $code - ;; - esac -} - - -# -# sub-function that slot calls to actually eject the tape -# & load in the correct slot cartridge -# -movetape() { - - # If the requested slot is already loaded in the tape drive - if [ $load -eq $used ]; then - code=0 - answer="$load is already loaded" - echo "Exit($code): slot $answer" >> $logfile - echo $load $tape # For amtape output - exit $code - elif [ $used -ge $firstslot ];then - current=$load - eject - else - echo $load $tape # For amtape output - fi - - echo "Loading slot $load into Tape drive" >> $logfile - $MCUTIL -m slot:$load drive - code=$? - - if [ $code -eq 0 ];then - echo $load > $currentslot - answer="Cartridge $load successfully loaded in Tape drive" - else - answer="Cartridge $load failed to load in Tape drive" - fi - echo "Exit($code): $answer" >> $logfile - exit $code -} - - -info() { - echo "tape drive info was called" >> $logfile - - readstatus - - if [ $used -lt 0 ];then - used=0 - fi - - code=0 - answer="$used $lastslot 1" - echo "Exit($code): $answer" >> $logfile - echo "$answer" - exit $code -} - - - case $1 in - -slot) - shift - loadslot $* - ;; - -device) - echo $tape - ;; - -info) - shift - info - ;; - -reset) - shift - reset - ;; - -eject) - shift - eject - ;; - --help|-help) - echo "-slot {current|next|previous|first|last|$firstslot-$lastslot|clean}" - echo " current - show contents of current slot" - echo " next - load tape from next slot" - echo " previous - load tape from previous slot" - echo " first - load tape from first slot" - echo " last - load tape from last slot" - echo " $firstslot - $lastslot - load tape from slot " - echo " clean - Clean the drive" - echo "-device : Show current tape device" - echo "-reset : Reset changer to known state" - echo "-eject : Eject current tape from drive" - echo "-info : Output {current slot | # of slots | can changer go backwards}" - echo "-help : Display this help" - ;; - *) - echo " $myname -{slot|device|reset|eject|help}" - ;; - esac diff --git a/changer-src/chg-mtx.sh.in b/changer-src/chg-mtx.sh.in deleted file mode 100644 index 3c8086d..0000000 --- a/changer-src/chg-mtx.sh.in +++ /dev/null @@ -1,296 +0,0 @@ -#!@SHELL@ -# -# Exit Status: -# 0 Alles Ok -# 1 Illegal Request -# 2 Fatal Error -# - -# try to hit all the possibilities here -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb:/usr/local/bin -export PATH - -if [ -d "@AMANDA_DBGDIR@" ]; then - logfile=@AMANDA_DBGDIR@/changer.debug -else - logfile=/dev/null -fi - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -myname=$0 - -tape=`amgetconf$SUF tapedev` -if [ -z "$tape" ]; then - echo " tapedev not specified in amanda.conf"; - exit 2; -fi - -TAPE=`amgetconf$SUF changerdev`; export TAPE # for mtx command -if [ -z "$TAPE" ]; then - echo " changerdev not specified in amanda.conf"; - exit 2; -fi - -if [ "$tape" = "/dev/null" -o "$TAPE" = "/dev/null" ]; then - echo " Both tapedev and changerdev must be specified in config file"; - exit 2; -fi - -MTX=@MTX@ - -if [ -x $sbindir/ammt$SUF ]; then - MT=$sbindir/ammt$SUF - MTF=-f -elif [ -x "@MT@" ]; then - MT=@MT@ - MTF=@MT_FILE_FLAG@ -else - answer=" $myname: mt program not found" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi -echo MT "->" $MT $MTF >> $logfile - -if [ -x $sbindir/amdd$SUF ]; then - DD=$sbindir/amdd$SUF -elif [ -x "@DD@" ]; then - DD=@DD@ -else - answer=" $myname: dd program not found" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -fi -echo DD "->" $DD >> $logfile - -firstslot=1 -lastslot=5 -# counted from 1 !!! -cleanslot=6 - -changerfile=`amgetconf$SUF changerfile` - -cleanfile=$changerfile-clean -accessfile=$changerfile-access -[ ! -f $cleanfile ] && echo 0 > $cleanfile -[ ! -f $accessfile ] && echo 0 > $accessfile -cleancount=`cat $cleanfile` -accesscount=`cat $accessfile` -# - -readstatus() { - used=`$MTX -s | - sed -n 's/Drive: No tape Loaded/-1/p;s/Drive: tape \(.\) loaded/\1/p'` - - if [ -z "$used" ]; then - used="-1"; - fi -} - - -eject() { - readstatus - if [ $used -gt 0 ];then - $MTX -u $used - answer="0 $tape" - code=0 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - else - answer=" $myname: Drive was not loaded" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi -} - -reset() { - readstatus - if [ $used -gt 0 ];then - $MTX -u $used - fi - res=`$MTX -l 1` - if [ $? -eq 0 ];then - answer="1 $tape" - code=0 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - else - answer="1 $res" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi -} -# -# -loadslot() { - readstatus - echo " -> loaded $used" >> $logfile - whichslot=$1 - case $whichslot in - current) - if [ $used -lt 0 ];then - $MTX -l 1 - used=1 - fi - answer="$used $tape" - code=0 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - ;; - next|advance) - load=`expr $used + 1` - [ $load -gt $lastslot ] && load=$firstslot - ;; - prev) - load=`expr $used - 1` - [ $load -lt $firstslot ] && load=$lastslot - ;; - first) - load=$firstslot - ;; - last) - load=$lastslot - ;; - [$firstslot-$lastslot]) - load=$1 - ;; - clean) - load=$cleanslot - ;; - *) - answer=" $myname: illegal request: \"$whichslot\"" - code=1 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - ;; - esac - - if [ $load = $used ]; then - answer="$used $tape" - code=0 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi - - if [ $load = $cleanslot ]; then - expr $cleancount + 1 > $cleanfile - echo 0 > $accessfile - else - expr $accesscount + 1 > $accessfile - if [ $accesscount -gt 9 ]; then - $myname -slot clean >/dev/null - fi - fi - - # Slot 6 might contain an ordinary tape rather than a cleaning - # tape. A cleaning tape auto-ejects; an ordinary tape does not. - # We therefore have to read the status again to check what - # actually happened. - readstatus - - - if [ $used -gt 0 ];then - echo " -> unload $used" >> $logfile - res=`$MTX -u $used` - status=$? - echo " -> status $status" >> $logfile - echo " -> res $res" >> $logfile - if [ $status -ne 0 ];then - answer=" $myname: $res" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi - fi - if [ $whichslot = advance ];then - answer="$load /dev/null" - code=0 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - fi - echo " -> load $load" >> $logfile - res=`$MTX -l $load` - status=$? - echo " -> status $status" >> $logfile - echo " -> res $res" >> $logfile - if [ $status -eq 0 ];then - echo " -> rew $load" >> $logfile - $MT $MTF $tape rewind - $DD if=$tape bs=32k count=1 >> $logfile 2>&1 - answer="$load $tape" - code=0 - else - answer="$load $res" - code=2 - fi - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -} -# -info() { - readstatus - echo " -> info $used" >> $logfile - if [ $used -lt 0 ];then - used=0 - fi - answer="$used $lastslot 1" - code=0 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code -} -# -echo Args "->" "$@" >> $logfile -while [ $# -ge 1 ];do - case $1 in - -slot) - shift - loadslot $* - ;; - -info) - shift - info - ;; - -reset) - shift - reset - ;; - -eject) - shift - eject - ;; - *) - answer=" $myname: Unknown option $1" - code=2 - echo "Exit -> $answer" >> $logfile - echo "$answer" - exit $code - ;; - esac -done diff --git a/changer-src/chg-multi.sh.in b/changer-src/chg-multi.sh.in deleted file mode 100644 index af32432..0000000 --- a/changer-src/chg-multi.sh.in +++ /dev/null @@ -1,448 +0,0 @@ -#! @SHELL@ -# -# Amanda, The Advanced Maryland Automatic Network Disk Archiver -# Copyright (c) 1991-1999 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. -# -# Author: James da Silva, Systems Design and Analysis Group -# Computer Science Department -# University of Maryland at College Park -# - -# -# chg-multi.sh - generic tape changer script -# - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -pname="chg-multi" - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH - -if [ -d "@AMANDA_DBGDIR@" ]; then - logfile=@AMANDA_DBGDIR@/changer.debug -else - logfile=/dev/null -fi - -# support simultaneous development with and without gettext -_() { - fmt="$1" - shift - printf "$fmt" $* -} - -echo `_ "arguments ->"` "$@" >> $logfile - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -ourconf=`amgetconf$SUF changerfile` - -if [ -x $sbindir/ammt$SUF ]; then - MT=$sbindir/ammt$SUF - MTF=-f -elif [ -x "@MT@" ]; then - MT=@MT@ - MTF=@MT_FILE_FLAG@ -else - answer=`_ ' %s: mt program not found' "$myname"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 1 -fi -echo "MT ->" $MT $MTF >> $logfile - -EXPR=expr -# EXPR=/usr/local/bin/expr # in case you need a more powerful expr... - -# read in some config parameters - -if [ ! -f "$ourconf" ]; then - answer=`_ ' %s: %s does not exist' "$pname" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 -fi - -firstslot=`awk '$1 == "firstslot" {print $2}' $ourconf 2>/dev/null` -if [ -z "$firstslot" ]; then - answer=`_ ' %s: firstslot not specified in %s' "$pname" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 -fi - -lastslot=`awk '$1 == "lastslot" {print $2}' $ourconf 2>/dev/null` -if [ -z "$lastslot" ]; then - answer=`_ ' %s: lastslot not specified in %s' "$pname" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 -fi - -nslots=`$EXPR $lastslot - $firstslot + 1` - -gravity=`awk '$1 == "gravity" {print $2}' $ourconf 2>/dev/null` -if [ -z "$gravity" ]; then - answer=`_ ' %s: gravity not specified in %s' "$pname" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 -fi - -needeject=`awk '$1 == "needeject" {print $2}' $ourconf 2>/dev/null` -if [ -z "$needeject" ]; then - answer=`_ ' %s: needeject not specified in %s' "$pname" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 -fi - -multieject=`awk '$1 == "multieject" {print $2}' $ourconf 2>/dev/null` -if [ -z "$multieject" ]; then - echo `_ 'Note: setting multieject to a default of zero'` >> $logfile - multieject=0 -fi - -ejectdelay=`awk '$1 == "ejectdelay" {print $2}' $ourconf 2>/dev/null` -if [ -z "$ejectdelay" ]; then - echo `_ 'Note: setting ejectdelay to a default of zero'` >> $logfile - ejectdelay=0 -fi - -posteject=`awk '$1 == "posteject" {print $2}' $ourconf 2>/dev/null` -if [ -z "$posteject" ]; then - echo `_ 'Note: setting posteject to a default of "true"'` >> $logfile - posteject=true -fi - -ourstate=`awk '$1 == "statefile" {print $2}' $ourconf 2>/dev/null` -if [ -z "$ourstate" ]; then - answer=`_ ' %s: statefile not specified in %s' "$pname" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 -fi - -# needeject and multieject are incompatible -if [ $needeject -eq 1 ] && [ $multieject -eq 1 ] ; then - answer=`_ ' %s: needeject and multieject cannot be both enabled in %s' "$pname" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 -fi - -# read in state: only curslot and curloaded at the present time - -curslot=`awk '$1 == "curslot" {print $2}' $ourstate 2>/dev/null` -if [ -z "$curslot" ]; then - curslot=$firstslot -fi - -curloaded=`awk '$1 == "curloaded" {print $2}' $ourstate 2>/dev/null` -if [ -z "$curloaded" ]; then - curloaded=0 -fi - - -# process the command-line - -# control vars to avoid code duplication: not all shells have functions! -usage=0 -checkgravity=0 -ejectslot=0 -loadslot=0 -slotempty=0 -ejectonly=0 - -if [ $# -ge 1 ]; then command=$1; else command="-usage"; fi - -case "$command" in - --info) # return basic information about changer - - backwards=`$EXPR 1 - $gravity` - answer="$curslot $nslots $backwards" - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 0 - ;; - --reset) # reset changer. Actually, we only reset changer state. We - # trust that the operator has reloaded a stack and reset the - # hardware. In most cases, we do not want to actually do - # anything: if the operator has done something with the - # hardware, we have no way to know what the actual current - # slot is. If the hardware state has not changed, and what is - # really wanted is to load the first slot, use "slot first" - # instead - - checkgravity=0 - loadslot=1 - newslot=$firstslot - curslot=$firstslot - # XXX put changer-specific reset here, if applicable - ;; - --eject) # eject tape if loaded. Note that if multieject is set, this - # only can make sense if the position is last and gravity 1 - - checkgravity=0 - loadslot=0 - newslot=$curslot - ejectslot=1 - ejectonly=1 - if [ $multieject -eq 1 ] && \ - ([ $gravity -eq 0 ] || [ $curslot -ne $lastslot ]) ; then - # Can't do this: if we eject, the stacker is going to - # load the next tape, and our state will be botched - answer=`_ '%s %s: Cannot use -eject with multieject/nogravity/notlastslot' "$curslot" "$pname"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 1 - fi - if [ $curloaded -eq 0 ]; then - answer=`_ '%s %s: slot already empty' "$curslot" "$pname"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 1 - fi - ;; - --slot) # change to slot - - checkgravity=1 - loadslot=1 - - slotparm=$2 - case "$slotparm" in - [0-9]*) - newslot=$slotparm - if [ $newslot -gt $lastslot ] || \ - [ $newslot -lt $firstslot ] ; then - answer=`_ '%s %s: no slot %s: legal range is %s ... %s' "$newslot" "$pname" "$newslot" "$firstslot" "$lastslot"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 1 - fi - ;; - current) - newslot=$curslot - ;; - first) - newslot=$firstslot - ;; - last) - newslot=$lastslot - ;; - next|advance) - newslot=`$EXPR $curslot + 1` - if [ $newslot -gt $lastslot ]; then - newslot=$firstslot - fi - if [ $slotparm = advance ]; then - loadslot=0 - fi - ;; - prev) - newslot=`$EXPR $curslot - 1` - if [ $newslot -lt $firstslot ]; then - newslot=$lastslot - fi - ;; - *) - answer=`_ ' %s: bad slot name "%s"' "$pname" "$slotparm"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 1 - ;; - esac - ;; -*) - usage=1 - ;; -esac - - -if [ $usage -eq 1 ]; then - answer=`_ ' usage: %s {-reset | -slot [|current|next|prev|advance] | -info | -eject}' "$pname"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 -fi - - -# check for legal move - -if [ $checkgravity -eq 1 ] && [ $gravity -ne 0 ] ; then - if [ $newslot -lt $curslot ] || [ "$slotparm" = "prev" ] ; then - answer=`_ '%s %s: cannot go backwards in gravity stacker' "$newslot" "$pname"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 1 - fi -fi - -# Do the 'mt offline' style of stacker control if applicable -if [ $multieject -eq 1 ] && [ $loadslot -eq 1 ] && [ $newslot -ne $curslot ] -then - # XXX put changer-specific load command here, if applicable - - curloaded=0 # unless something goes wrong - slotempty=0 - - while [ $curslot -ne $newslot ]; do - device=`awk '$1 == "slot" && $2 == '$curslot' {print $3}' $ourconf 2>/dev/null` - if [ "$device" = "" ]; then - answer=`_ '%s %s: slot %s device not specified in %s' "$curslot" "$pname" "$curslot" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 - fi - echo `_ ' -> offline'` "$device" >> $logfile - $MT $MTF $device offline >> $logfile 2>&1 - if [ $? -ne 0 ]; then - answer=`_ '%s %s: %s: unable to change to slot %s' "$newslot" "$pname" "$device" "$curslot"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 - fi - [ $ejectdelay -gt 0 ] && sleep $ejectdelay - echo `_ ' -> running'` $posteject $device >> $logfile - $posteject $device >> $logfile 2>&1 - status=$? - if [ $status -ne 0 ]; then - answer=`_ '%s %s: %s %s failed: %s' "$newslot" "$pname" "$posteject" "$device" "$status"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 - fi - curslot=`$EXPR $curslot + 1` - if [ $curslot -gt $lastslot ] ; then - curslot=$firstslot - fi - done -fi - -if [ $ejectonly -eq 1 ] \ - || ([ $needeject -eq 1 ] \ - && [ $loadslot -eq 1 ] \ - && [ $curloaded -eq 1 ] \ - && [ $newslot -ne $curslot ]) -then - # XXX put changer-specific load command here, if applicable - - curloaded=0 # unless something goes wrong - slotempty=0 - - # try to unload the current device - device=`awk '$1 == "slot" && $2 == '$curslot' {print $3}' $ourconf 2>/dev/null` - if [ "$device" = "" ]; then - answer=`_ '%s %s: slot %s device not specified in %s' "$curslot" "$pname" "$curslot" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 - fi - echo `_ ' -> offline'` $device >> $logfile - $MT $MTF $device offline >> $logfile 2>&1 - if [ $? -ne 0 ]; then - # - # XXX if the changer-specific eject command can distinguish - # betweeen "slot empty" and more serious errors, return 1 - # for the first case, 2 for the second case. Generically, - # we just presume an error signifies an empty slot. - # - slotempty=1 - else - [ $ejectonly -eq 0 ] && [ $ejectdelay -gt 0 ] && sleep $ejectdelay - echo `_ ' -> running '` $posteject $device >> $logfile - $posteject $device >> $logfile 2>&1 - status=$? - if [ $status -ne 0 ]; then - answer=`_ '%s %s: %s %s failed: %s' "$newslot" "$pname" "$posteject" "$device" "$status"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 - fi - fi -fi - -if [ $loadslot -eq 1 ]; then # load the tape from the slot - - # XXX put changer-specific load command here, if applicable - - curloaded=1 # unless something goes wrong - slotempty=0 - curslot=$newslot - - # try to rewind the device - device=`awk '$1 == "slot" && $2 == '$curslot' {print $3}' $ourconf 2>/dev/null` - if [ "$device" = "" ]; then - answer=`_ '%s %s: slot %s device not specified in %s' "$curslot" "$pname" "$curslot" "$ourconf"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 2 - fi - echo `_ ' -> rewind'` $device >> $logfile - $MT $MTF $device rewind >> $logfile 2>&1 - if [ $? -ne 0 ]; then - # - # XXX if the changer-specific load command can distinguish - # betweeen "slot empty" and more serious errors, return 1 - # for the first case, 2 for the second case. Generically, - # we just presume an error signifies an empty slot. - # - slotempty=1 - curloaded=0 - fi -fi - -# update state - -echo `_ '# multi-changer state cache: DO NOT EDIT!'` > $ourstate -echo curslot $newslot >> $ourstate -echo curloaded $curloaded >> $ourstate - -# return slot info - -if [ $slotempty -eq 1 ]; then - answer=`_ '%s %s: slot is empty' "$newslot" "$pname"` - echo `_ 'Exit ->'` $answer >> $logfile - echo $answer - exit 1 -fi - -if [ "$command" = -slot -a "$slotparm" = advance ]; then - device=/dev/null -fi - -answer="$newslot $device" -echo `_ 'Exit ->'` $answer >> $logfile -echo $answer -exit 0 diff --git a/changer-src/chg-null.sh.in b/changer-src/chg-null.sh.in deleted file mode 100644 index 2d97be4..0000000 --- a/changer-src/chg-null.sh.in +++ /dev/null @@ -1,98 +0,0 @@ -#!@SHELL@ -# -# Exit Status: -# 0 Alles Ok -# 1 Illegal Request -# 2 Fatal Error -# - -# try to hit all the possibilities here -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ -debugdir=@AMANDA_DBGDIR@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH - -if [ -d "$debugdir" ] -then - logfile=$debugdir/changer.debug -else - logfile=/dev/null -fi -exec 2> $logfile -set -x - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -myname=$0 - -EGREP='@EGREP@' - -firstslot=1 -totalslots=200 - -changerfile=`amgetconf$SUF changerfile` - -tapedev=`amgetconf$SUF tapedev` - -cleanfile=$changerfile-clean -accessfile=$changerfile-access -slotfile=$changerfile-slot -[ ! -f $cleanfile ] && echo 0 > $cleanfile -[ ! -f $accessfile ] && echo 0 > $accessfile -[ ! -f $slotfile ] && echo $firstslot > $slotfile -cleancount=`cat $cleanfile` -accesscount=`cat $accessfile` -slot=`cat $slotfile` - -rc=0 - -case x$1 in - -x-slot) - - # - # handle special slots... - # - case "$2" in - current) newslot=$slot ; load=true;; - next) newslot=`expr $slot + 1`; load=true;; - advance) newslot=`expr $slot + 1`; load=false;; - prev) newslot=`expr $slot - 1`; load=true;; - first) newslot=0 ; load=true;; - last) newslot=-1 ; load=true;; - *) newslot=$2 ; load=true;; - esac - - if [ 0 -gt $newslot ] - then - newslot=`expr $totalslots - 1` - fi - - if [ $totalslots -le $newslot ] - then - newslot=0 - fi - echo $newslot > $changerfile-slot - slot=$newslot - echo $slot $tapedev - ;; - -x-info) - echo $slot $totalslots 1 - ;; - -x-eject) - echo $slot $tapedev - ;; -esac - -exit $rc diff --git a/changer-src/chg-rait.sh.in b/changer-src/chg-rait.sh.in deleted file mode 100644 index 550709d..0000000 --- a/changer-src/chg-rait.sh.in +++ /dev/null @@ -1,218 +0,0 @@ -#!@SHELL@ - -# chg-rait -# -# This assumes we have rait-striped drives in several -# other amanda changer configs. -# -# so we have a changerfile that lists other changers and -# changer files. -# nchangers=3 -# tpchanger_1="chg-mtx" -# changerdev_1="/dev/mtx1" -# changerfile_1="/some/file1" -# tapedev_1="/some/dev" -# tpchanger_2="chg-mtx" -# changerdev_2="/dev/mtx2" -# changerfile_2="/some/file2" -# tapedev_2="/some/dev" -# tpchanger_3="chg-mtx" -# changerdev_3="/dev/mtx3" -# changerfile_3="/some/file3" -# tapedev_3="/some/dev" -# -# the tapedev_n entries are only needed if the changer script in question -# uses tapedev. -# - -# -# debugging... -# -if [ -d "@AMANDA_DBGDIR@" ]; then - DBGFILE=@AMANDA_DBGDIR@/rait-changer.debug - KIDDEBUG=@AMANDA_DBGDIR@/changer.debug - WORK=@AMANDA_DBGDIR@/chgwork$$ -else - DBGFILE=/dev/null - KIDDEBUG=/dev/null - WORK=/tmp/chgwork$$ -fi - -exec 2>$DBGFILE -echo "args: $0 $*" >&2 -set -x - -# -# the usual config fun -# -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@"; -else - SUF= -fi -getconf=$sbindir/amgetconf$SUF - - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH - -changerfile=`$getconf changerfile` -. $changerfile - -# -# get config items that other changers use to put in our -# fake amanda.conf files. -# -org=`$getconf ORG` -mailto=`$getconf mailto` - -# -# make a working directory (with amanda.conf) for each changer, and start the -# changer script in background for each one -# - -i=1 -while [ $i -le $nchangers ] -do - eval tpchanger=\$tpchanger_$i - eval changerdev=\$changerdev_$i - eval changerfile=\$changerfile_$i - eval tapedev=\$tapedev_$i - - mkdir -p $WORK/$i - cd $WORK/$i - - cat >> amanda.conf < exitcode - ) > stdout 2>stderr & - - i=`expr $i + 1` -done - -wait - -# -# once they've all finished, collect up the results -# - -myexit=0 -myslot=-1 -mymax=65536 -myflag=1 -mydev="" -mysep="{" - -case x$1 in -x-slot|x-reset|x-eject|x-search|x-label) - - # - # read slot number and device from each - # slot numbers must match(?!), and is our resulting slot number - # resulting device is {dev1,dev2,...} from each one - # - i=1 - while [ $i -le $nchangers ] - do - read exitcode < $WORK/$i/exitcode - read n dev < $WORK/$i/stdout - echo -------------- >&2 - cat $WORK/$i/stderr >&2 - cat $KIDDEBUG >&2 - echo -------------- >&2 - - if [ "$exitcode" != 0 ] - then - myexit=$exitcode - fi - if [ $myslot = -1 ] - then - myslot=$n - fi - if [ $n != $myslot ] - then - # synch error! - myexit=1 - echo "stackers are out of synch, issue a reset" >&2 - fi - mydev="$mydev$mysep$dev" - mysep="," - - i=`expr $i + 1` - done - mydev="rait:$mydev}" - echo $myslot $mydev - ;; -x-info) - # - # read info from each - # slot numbers must match(?!), and is our resulting slot number - # minimum max slots is our resulting max slots - # if any can't go backwards, the aggregate can't either - # - i=1 - while [ $i -le $nchangers ] - do - read exitcode < $WORK/$i/exitcode - read n max flag < $WORK/$i/stdout - echo -------------- >&2 - cat $WORK/$i/stderr >&2 - cat $KIDDEBUG >&2 - echo -------------- >&2 - - if [ "$exitcode" != 0 ] - then - myexit=$exitcode - fi - if [ $myslot = -1 ] - then - myslot=$n - fi - if [ $n != $myslot ] - then - # synch error! - myexit=1 - echo "stackers are out of synch, issue a -reset" >&2 - fi - if [ $max -lt $mymax ] - then - mymax=$max - fi - if [ $flag = 0 ] - then - myflag=0 - fi - i=`expr $i + 1` - done - echo $myslot $mymax $myflag - -esac - -# -# clean up work directories -# -rm -rf $WORK - -exit $myexit diff --git a/changer-src/chg-rth.pl.in b/changer-src/chg-rth.pl.in deleted file mode 100644 index 19f3981..0000000 --- a/changer-src/chg-rth.pl.in +++ /dev/null @@ -1,307 +0,0 @@ -#!@PERL@ - -# Catch for sh/csh on systems without #! ability. -eval '(exit $?0)' && eval 'exec @PERL@ -S $0 ${1+"$@"}' - & eval 'exec @PERL@ -S $0 $argv:q' - if 0; - -# rth-changer - -# A tape changer script for the Robotic Tape Handling system OEM'd -# by Andataco (RTH-406) for use with Amanda, the Advanced Maryland -# Network Disk Archiver. -# -# Author: Erik Frederick 1/10/97 -# edf@tyrell.mc.duke.edu -# -# This changer script controls the HP c1553 tape drive via a -# Peripheral Vision Inc. SCSI control subsystem that interprets -# commands sent on the SCSI bus. It may work with other tape drives -# containing the PVI board. -# -# Permission to freely use and distribute is granted. -# - -require 5.001; - -use Getopt::Long; - -delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV', 'PATH'}; -$ENV{'PATH'} = "/usr/bin:/usr/sbin:/sbin:/bin"; - -$pname = "rth-changer"; - -$prefix="@prefix@"; -$prefix=$prefix; # avoid warnings about possible typo -$exec_prefix="@exec_prefix@"; -$exec_prefix=$exec_prefix; # ditto -$sbindir="@sbindir@"; -$libexecdir="@libexecdir@"; -if ("@USE_VERSION_SUFFIXES@" eq "yes") { - $suf = "-@VERSION@"; -} else { - $suf = ""; -} - -if (-x "$sbindir/ammt$SUF") { - $MT="$sbindir/ammt$SUF"; - $MTF="-f"; -} elsif (-x "@MT@") { - $MT="@MT@"; - $MTF="@MT_FILE_FLAG@"; -} else { - print " $pname: mt program not found\n"; - exit(1); -} - -$tapeDevice=`$sbindir/amgetconf$SUF tapedev`; -die "tapedev not found in amanda.conf" - if !$tapeDevice or $tapeDevice eq "" or - $tapeDevice =~ m/no such parameter/; - -sub getCurrentTape { - - if (!sysopen(RTH, $tapeDevice, 2)) { - print "$currentTape $pname: error in opening `$tapeDevice' for getting current tape: $!\n"; - exit(2); - } - if (syswrite(RTH, "Rd_ElS", 6) != 6) { - print "$currentTape $pname: error in writing `Rd_ElS' to `$tapeDevice': $!\n"; - exit(2); - } - if (!close(RTH)) { - print "$currentTape $pname: error in closing `$tapeDevice' for getting current tape: $!\n"; - exit(2); - } - - if (!sysopen(RTH, $tapeDevice, 2)) { - print "$currentTape $pname: error in opening `$tapeDevice' for getting current tape: $!\n"; - exit(2); - } - if (sysread(RTH, $status, 136) != 136) { - print "$currentTape $pname: error in reading rth status.\n"; - exit(2); - } - if (!close(RTH)) { - print "$currentTape $pname: error in closing `$tapeDevice' for getting current tape: $!\n"; - exit(2); - } - - @statusBits=unpack("c*",$status); - - if( ($statusBits[18] == 0x1) || ($statusBits[18]== 0x9)) { - return ($statusBits[27]-1); - } - - return (0); -} - - -sub getTapeStatus { - - if (!sysopen(RTH, $tapeDevice, 2)) { - print "$currentTape $pname: error in opening `$tapeDevice' for getting tape status: $!\n"; - exit(2); - } - if (syswrite(RTH, "Rd_ElS", 6) != 6) { - print "$currentTape $pname: error in writing `Rd_ElS' to `$tapeDevice': $!\n"; - exit(2); - } - if (!close(RTH)) { - print "$currentTape $pname: error in closing `$tapeDevice' for getting tpae status: $!\n"; - exit(2); - } - - if (!sysopen(RTH, $tapeDevice, 2)) { - print "$currentTape $pname: error in opening `$tapeDevice' for getting tape status: $!\n"; - exit(2); - } - if (sysread(RTH, $status, 136) != 136) { - print "$currentTape $pname: error in reading rth status for tape $currentTape.\n"; - exit(2); - } - if (!close(RTH)) { - print "$currentTape $pname: error in closing `$tapeDevice' for getting tape status: $!\n"; - exit(2); - } - - @statusBits=unpack("c*",$status); - - $curTape=0; - for($i=42;$i<187;$i+=16) { - if($statusBits[$i] == 0x9) { - $slots[$curTape] = 1; - } - else { - $slots[$curTape] = 0; - } - $curTape++; - } - - return (@slots); -} - -sub rthLoad { - my($tape) = @_; - - $command = sprintf "GeT%d", $tape; - if (!sysopen(RTH, $tapeDevice, 2)) { - print "$currentTape $pname: error in opening `$tapeDevice' for loading tape: $!\n"; - exit(2); - } - if (syswrite(RTH, $command, 4) != 4) { - print "$currentTape $pname: error in loading tape by writing `$command' to `$tapeDevice': $!\n"; - exit(2); - } - if (!close (RTH)) { - print "$currentTape $pname: error in closing `$tapeDevice' when trying to load tape: $!\n"; - exit(2); - } -} - -sub rthUnload { - my($tape) = @_; - - $command = sprintf "PuT%d", $tape; - if (!sysopen(RTH, $tapeDevice, 2)) { - print "$currentTape $pname: error in opening `$tapeDevice' for unloading tape: $!\n"; - exit(2); - } - if (syswrite(RTH, $command, 4) != 4) { - print "$currentTape $pname: error in unloading tape by writing `$command' to `$tapeDevice': $!\n"; - exit(2); - } - if (!close (RTH)) { - print "$currentTape $pname: error in closing `$tapeDevice' when trying to unload tape: $!\n"; - exit(2); - } -} - -sub testTape { - my($tape) = @_; - - @slots=getTapeStatus(); - - if($currentTape == $tape) { - return; - } - - if($slots[$tape-1] == 0) { - print " $pname: no tape in slot requested\n"; - exit(1); - } - if($tape>6) { - print $tape," $pname: requested a tape > 6\n"; - exit(2); - } - if($tape<1) { - print $tape," $pname: requested a tape < 1\n"; - exit(2); - } - return; -} - -sub changeTape { - my($tape) = @_; - - if($tape==$currentTape) { - return; - } - - testTape($tape); - - if($currentTape==0) { - rthLoad($tape); - $currentTape=$tape; - return; - } - else { - rthUnload($currentTape); - rthLoad($tape); - $currentTape=$tape; - } -} - - -$result = &GetOptions("slot=s", "info", "reset", "eject"); - -system($MT, 'rewind'); - -$nSlots=6; -$firstTape=1; -$lastTape=6; -$currentTape=getCurrentTape(); - -if($opt_slot) { - if($opt_slot =~ /first/) { - changeTape(1); - print $currentTape, " ", $tapeDevice, "\n"; - } - if($opt_slot =~ /last/) { - changeTape(6); - print $currentTape, " ", $tapeDevice, "\n"; - } - if($opt_slot =~ /current/) { - changeTape($currentTape); - print $currentTape, " ", $tapeDevice, "\n"; - } - if($opt_slot =~ /next/) { - $tape=$currentTape+1; - if ($tape>6) { - $tape=1; - } - changeTape($tape); - print $currentTape, " ", $tapeDevice,"\n"; - } - if($opt_slot =~ /prev/) { - $tape=$currentTape-1; - if($tape<1) { - $tape=6; - } - changeTape($tape); - print $currentTape, " ", $tapeDevice,"\n"; - } - if($opt_slot =~ /\d/) { - changeTape($opt_slot); - print $currentTape, " ", $tapeDevice,"\n"; - } - if($opt_slot =~ /advance/) { - $tape=$currentTape+1; - if ($tape>6) { - $tape=1; - } - if($currentTape) { - rthUnload($currentTape); - } - print $currentTape, " ", "/dev/null","\n"; - } - - exit 0; -} - -if($opt_info) { - - print $currentTape, " 6 1\n"; - - exit 0; -} - -if($opt_reset) { - changeTape(1); - print $currentTape, " ",$tapeDevice,"\n"; - exit 0; -} - -if($opt_eject) { - if($currentTape) { - rthUnload($currentTape); - print "0 ",$tapeDevice,"\n"; - exit 0; - } - else { - print "0 $pname: drive was not loaded\n"; - exit 1; - } -} - -print "$pname: No command was received. Exiting.\n"; -exit 1; diff --git a/changer-src/chg-scsi-chio.c b/changer-src/chg-scsi-chio.c index d6bf467..b5b76bd 100644 --- a/changer-src/chg-scsi-chio.c +++ b/changer-src/chg-scsi-chio.c @@ -59,6 +59,7 @@ #include "conffile.h" #include "libscsi.h" #include "scsi-defs.h" +int Tape_Ready1 ( char *tapedev , int wait); char *tapestatfile = NULL; @@ -104,7 +105,6 @@ int read_config(char *configfile, changer_t *chg); int get_current_slot(char *count_file); void put_current_slot(char *count_file,int slot); void usage(char *argv[]); -void parse_args(int argc, char *argv[],command *rval); int get_relative_target(int fd,int nslots,char *parameter,int loaded, char *changer_file,int slot_offset,int maxslot); int is_positive_number(char *tmp); @@ -122,14 +122,14 @@ init_changer_struct( changer_t * chg, size_t number_of_config) { - int i; + size_t i; memset(chg, 0, SIZEOF(*chg)); chg->number_of_configs = number_of_config; chg->eject = 1; chg->sleep = 0; chg->cleanmax = 0; - chg->device = NULL + chg->device = NULL; chg->conf = alloc(SIZEOF(config_t) * number_of_config); for (i=0; i < number_of_config; i++){ chg->conf[i].drivenum = 0; @@ -156,41 +156,41 @@ dump_changer_struct( { int i; - dbprintf(("Number of configurations: %d\n", chg->number_of_configs)); - dbprintf(("Tapes need eject: %s\n", (chg->eject>0 ? "Yes" : "No"))); - dbprintf(("Tapes need sleep: %d seconds\n", chg->sleep)); - dbprintf(("Cleancycles : %d\n", chg->cleanmax)); - dbprintf(("Changerdevice : %s\n", chg->device)); + dbprintf(_("Number of configurations: %d\n"), chg->number_of_configs); + dbprintf(_("Tapes need eject: %s\n"), (chg->eject>0 ? _("Yes") : _("No"))); + dbprintf(_("Tapes need sleep: %lld seconds\n"), (long long)chg->sleep); + dbprintf(_("Clean cycles : %d\n"), chg->cleanmax); + dbprintf(_("Changer device : %s\n"), chg->device); for (i = 0; i < chg->number_of_configs; i++){ - dbprintf(("Tapeconfig Nr: %d\n", i)); - dbprintf((" Drivenumber : %d\n", chg->conf[i].drivenum)); - dbprintf((" Startslot : %d\n", chg->conf[i].start)); - dbprintf((" Endslot : %d\n", chg->conf[i].end)); - dbprintf((" Cleanslot : %d\n", chg->conf[i].cleanslot)); + dbprintf(_("Tape config Nr: %d\n"), i); + dbprintf(_(" Drive number : %d\n"), chg->conf[i].drivenum); + dbprintf(_(" Start slot : %d\n"), chg->conf[i].start); + dbprintf(_(" End slot : %d\n"), chg->conf[i].end); + dbprintf(_(" Clean slot : %d\n"), chg->conf[i].cleanslot); if (chg->conf[i].device != NULL) - dbprintf((" Devicename : %s\n", chg->conf[i].device)); + dbprintf(_(" Device name : %s\n"), chg->conf[i].device); else - dbprintf((" Devicename : none\n")); + dbprintf(_(" Device name : none\n")); if (chg->conf[i].scsitapedev != NULL) - dbprintf((" SCSITapedev : %s\n", chg->conf[i].scsitapedev)); + dbprintf(_(" SCSI Tape dev : %s\n"), chg->conf[i].scsitapedev); else - dbprintf((" SCSITapedev : none\n")); + dbprintf(_(" SCSI Tape dev : none\n")); if (chg->conf[i].tapestatfile != NULL) - dbprintf((" statfile : %s\n", chg->conf[i].tapestatfile)); + dbprintf(_(" stat file : %s\n"), chg->conf[i].tapestatfile); else - dbprintf((" statfile : none\n")); + dbprintf(_(" stat file : none\n")); if (chg->conf[i].slotfile != NULL) - dbprintf((" Slotfile : %s\n", chg->conf[i].slotfile)); + dbprintf(_(" Slot file : %s\n"), chg->conf[i].slotfile); else - dbprintf((" Slotfile : none\n")); + dbprintf(_(" Slot file : none\n")); if (chg->conf[i].cleanfile != NULL) - dbprintf((" Cleanfile : %s\n", chg->conf[i].cleanfile)); + dbprintf(_(" Clean file : %s\n"), chg->conf[i].cleanfile); else - dbprintf((" Cleanfile : none\n")); + dbprintf(_(" Clean file : none\n")); if (chg->conf[i].timefile != NULL) - dbprintf((" Usagecount : %s\n", chg->conf[i].timefile)); + dbprintf(_(" Usage count : %s\n"), chg->conf[i].timefile); else - dbprintf((" Usagecount : none\n")); + dbprintf(_(" Usage count : none\n")); } } @@ -271,7 +271,7 @@ read_config( size_t numconf; FILE *file; int init_flag = 0; - int drivenum=0; + size_t drivenum=0; char *linebuffer; int token; char *value; @@ -300,9 +300,9 @@ read_config( init_flag=1; } switch (token){ - case NUMDRIVE: if (atoi(value) != numconf) - fprintf(stderr,"Error: number_drives at wrong place, should be "\ - "first in file\n"); + case NUMDRIVE: if ((size_t)atoi(value) != numconf) + g_fprintf(stderr,_("Error: number_drives at wrong place, should be " + "first in file\n")); break; case EJECT: chg->eject = atoi(value); @@ -325,75 +325,75 @@ read_config( case DRIVE: drivenum = atoi(value); if(drivenum >= numconf){ - fprintf(stderr,"Error: drive must be less than number_drives\n"); + g_fprintf(stderr,_("Error: drive must be less than number_drives\n")); } break; case DRIVENUM: if (drivenum < numconf){ chg->conf[drivenum].drivenum = atoi(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " drivenum ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " drivenum ignored\n")); } break; case START: if (drivenum < numconf){ chg->conf[drivenum].start = atoi(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " startuse ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " startuse ignored\n")); } break; case END: if (drivenum < numconf){ chg->conf[drivenum].end = atoi(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " enduse ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " enduse ignored\n")); } break; case CLEAN: if (drivenum < numconf){ chg->conf[drivenum].cleanslot = atoi(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " cleanslot ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " cleanslot ignored\n")); } break; case DEVICE: if (drivenum < numconf){ chg->conf[drivenum].device = stralloc(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " device ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " device ignored\n")); } break; case STATFILE: if (drivenum < numconf){ chg->conf[drivenum].slotfile = stralloc(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " slotfile ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " slotfile ignored\n")); } break; case CLEANFILE: if (drivenum < numconf){ chg->conf[drivenum].cleanfile = stralloc(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " cleanfile ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " cleanfile ignored\n")); } break; case USAGECOUNT: if (drivenum < numconf){ chg->conf[drivenum].timefile = stralloc(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " usagecount ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " usagecount ignored\n")); } break; default: - fprintf(stderr,"Error: Unknown token\n"); + g_fprintf(stderr,_("Error: Unknown token\n")); break; } } @@ -416,13 +416,13 @@ int get_current_slot(char *count_file) FILE *inf; int retval; if ((inf=fopen(count_file,"r")) == NULL) { - fprintf(stderr, "%s: unable to open current slot file (%s)\n", + g_fprintf(stderr, _("%s: unable to open current slot file (%s)\n"), get_pname(), count_file); return 0; } if (fscanf(inf, "%d", &retval) != 1) { - fprintf(stderr, "%s: unable to read current slot file (%s)\n", + g_fprintf(stderr, _("%s: unable to read current slot file (%s)\n"), get_pname(), count_file); retval = 0; } @@ -436,11 +436,11 @@ void put_current_slot(char *count_file,int slot) FILE *inf; if ((inf=fopen(count_file,"w")) == NULL) { - fprintf(stderr, "%s: unable to open current slot file (%s)\n", + g_fprintf(stderr, _("%s: unable to open current slot file (%s)\n"), get_pname(), count_file); exit(2); } - fprintf(inf, "%d\n", slot); + g_fprintf(inf, "%d\n", slot); fclose(inf); } @@ -462,6 +462,8 @@ typedef struct com_stru } command; +void parse_args(int argc, char *argv[], command *rval); + /* major command line args */ #define COMCOUNT 5 #define COM_SLOT 0 @@ -505,13 +507,13 @@ int is_positive_number(char *tmp) /* is the string a valid positive int? */ void usage(char *argv[]) { int cnt; - printf("%s: Usage error.\n", argv[0]); + g_printf(_("%s: Usage error.\n"), argv[0]); for (cnt=0; cnt < COMCOUNT; cnt++){ - printf(" %s %s",argv[0],argdefs[cnt].str); + g_printf(" %s %s",argv[0],argdefs[cnt].str); if (argdefs[cnt].takesparam) - printf(" \n"); + g_printf(_(" \n")); else - printf("\n"); + g_printf("\n"); } exit(2); } @@ -600,7 +602,7 @@ get_relative_target( return maxslot; default: - printf(" no slot `%s'\n",parameter); + g_printf(_(" no slot `%s'\n"),parameter); close(fd); exit(2); /*NOTREACHED*/ @@ -646,34 +648,38 @@ clean_tape( char *mail_cmd; FILE *mailf; int mail_pipe_opened = 1; +#ifdef MAILER if(getconf_seen(CNF_MAILTO) && strlen(getconf_str(CNF_MAILTO)) > 0 && validate_mailto(getconf_str(CNF_MAILTO))) { mail_cmd = vstralloc(MAILER, - " -s", " \"", "AMANDA PROBLEM: PLEASE FIX", "\"", + " -s", " \"", _("AMANDA PROBLEM: PLEASE FIX"), "\"", " ", getconf_str(CNF_MAILTO), NULL); if((mailf = popen(mail_cmd, "w")) == NULL){ - printf("Mail failed\n"); - error("could not open pipe to \"%s\": %s", + g_printf(_("Mail failed\n")); + error(_("could not open pipe to \"%s\": %s"), mail_cmd, strerror(errno)); /*NOTREACHED*/ } - } - else{ + } else { mail_pipe_opened = 0; mailf = stderr; - fprintf(mailf, "\nNo mail recipient specified, output redirected to stderr"); - } - - fprintf(mailf,"\nThe usage count of your cleaning tape in slot %d", + g_fprintf(mailf, _("\nNo mail recipient specified, output redirected to stderr")); + } +#else + mail_pipe_opened = 0; + mailf = stderr; + g_fprintf(mailf, _("\nNo mailer specified; output redirected to stderr")); +#endif + g_fprintf(mailf, _("\nThe usage count of your cleaning tape in slot %d"), cleancart); - fprintf(mailf,"\nis more than %d. (cleanmax)",maxclean); - fprintf(mailf,"\nTapedrive %s needs to be cleaned",tapedev); - fprintf(mailf,"\nPlease insert a new cleaning tape and reset"); - fprintf(mailf,"\nthe countingfile %s",cnt_file); + g_fprintf(mailf,_("\nis more than %d. (cleanmax)"),maxclean); + g_fprintf(mailf,_("\nTapedrive %s needs to be cleaned"),tapedev); + g_fprintf(mailf,_("\nPlease insert a new cleaning tape and reset")); + g_fprintf(mailf,_("\nthe countingfile %s"),cnt_file); if(mail_pipe_opened == 1 && pclose(mailf) != 0) { - error("mail command failed: %s", mail_cmd); + error(_("mail command failed: %s"), mail_cmd); /*NOTREACHED*/ } @@ -693,7 +699,7 @@ clean_tape( int main( int argc, - char * argv[]) + char ** argv) { int loaded; int target = -1; @@ -725,6 +731,15 @@ main( char *changer_file = NULL; char *scsitapedevice = 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"); + set_pname("chg-scsi"); /* Don't die when child closes pipe */ @@ -734,14 +749,10 @@ main( parse_args(argc,argv,&com); changer = alloc(SIZEOF(changer_t)); - if(read_conffile(CONFFILE_NAME)) { - fprintf(stderr, "%s: could not find config file \"%s\"", - changer_dev, conffile); - exit(1); - } + config_init(CONFIG_INIT_USE_CWD | CONFIG_INIT_FATAL, NULL); - changer_dev = getconf_str(CNF_CHNGRDEV); - changer_file = getconf_str(CNF_CHNGRFILE); + changer_dev = getconf_str(CNF_CHANGERDEV); + changer_file = getconf_str(CNF_CHANGERFILE); tape_device = getconf_str(CNF_TAPEDEV); /* Get the configuration parameters */ @@ -777,11 +788,10 @@ main( "changer_dev", changer->conf[confnum].changerident); if (fd == -1) { int localerr = errno; - fprintf(stderr, "%s: open: %s: %s\n", get_pname(), + g_fprintf(stderr, _("%s: open: %s: %s\n"), get_pname(), changer_dev, strerror(localerr)); - printf("%s open: %s: %s\n", "", changer_dev, strerror(localerr)); - dbprintf(("%s: open: %s: %s\n", get_pname(), - changer_dev, strerror(localerr))); + g_printf(_("%s open: %s: %s\n"), "", changer_dev, strerror(localerr)); + dbprintf(_("open: %s: %s\n"), changer_dev, strerror(localerr)); return 2; } @@ -808,11 +818,10 @@ main( "changer_dev", changer->conf[confnum].changerident); if (fd == -1) { int localerr = errno; - fprintf(stderr, "%s: open: %s: %s\n", get_pname(), + g_fprintf(stderr, _("%s: open: %s: %s\n"), get_pname(), changer_dev, strerror(localerr)); - printf("%s open: %s: %s\n", "", changer_dev, strerror(localerr)); - dbprintf(("%s: open: %s: %s\n", get_pname(), - changer_dev, strerror(localerr))); + g_printf(_("%s open: %s: %s\n"), _(""), changer_dev, strerror(localerr)); + dbprintf(_("open: %s: %s\n"), changer_dev, strerror(localerr)); return 2; } slotcnt = get_slot_count(fd); @@ -826,14 +835,13 @@ main( drivecnt = get_drive_count(fd); if (drive_num > drivecnt) { - printf("%s drive number error (%d > %d)\n", "", + g_printf(_("%s drive number error (%d > %d)\n"), _(""), drive_num, drivecnt); - fprintf(stderr, "%s: requested drive number (%d) greater than " - "number of supported drives (%d)\n", get_pname(), + g_fprintf(stderr, _("%s: requested drive number (%d) greater than " + "number of supported drives (%d)\n"), get_pname(), drive_num, drivecnt); - dbprintf(("%s: requested drive number (%d) greater than " - "number of supported drives (%d)\n", get_pname(), - drive_num, drivecnt)); + dbprintf(_("requested drive number (%d) greater than " + "number of supported drives (%d)\n"), drive_num, drivecnt); CloseDevice("", fd); return 2; } @@ -844,7 +852,7 @@ main( case COM_SLOT: /* slot changing command */ if (is_positive_number(com.parameter)) { if ((target = atoi(com.parameter))>=use_slots) { - printf(" no slot `%d'\n",target); + g_printf(_(" no slot `%d'\n"),target); close(fd); endstatus = 2; break; @@ -878,7 +886,7 @@ main( put_current_slot(changer_file, target); } if (!loaded && isempty(fd, target)) { - printf("%d slot %d is empty\n",target-slot_offset, + g_printf(_("%d slot %d is empty\n"),target-slot_offset, target-slot_offset); close(fd); endstatus = 1; @@ -886,25 +894,25 @@ main( } if (!loaded) if (load(fd, drive_num, target) != 0) { - printf("%d slot %d move failed\n",target-slot_offset, + g_printf(_("%d slot %d move failed\n"),target-slot_offset, target-slot_offset); close(fd); endstatus = 2; break; } if (need_sleep) - Tape_Ready(scsitapedevice, need_sleep); - printf("%d %s\n", target-slot_offset, tape_device); + Tape_Ready1(scsitapedevice, need_sleep); + g_printf(_("%d %s\n"), target-slot_offset, tape_device); break; case COM_INFO: if (changer_file != NULL) { - printf("%d ", get_current_slot(changer_file)-slot_offset); + g_printf("%d ", get_current_slot(changer_file)-slot_offset); } else { - printf("%d ", GetCurrentSlot(fd, drive_num)-slot_offset); + g_printf("%d ", GetCurrentSlot(fd, drive_num)-slot_offset); } - printf("%d 1\n", use_slots); + g_printf("%d 1\n", use_slots); break; case COM_RESET: @@ -926,14 +934,14 @@ main( } if (isempty(fd, slot_offset)) { - printf("0 slot 0 is empty\n"); + g_printf(_("0 slot 0 is empty\n")); close(fd); endstatus = 1; break; } if (load(fd, drive_num, slot_offset) != 0) { - printf("%d slot %d move failed\n",slot_offset, + g_printf(_("%d slot %d move failed\n"),slot_offset, slot_offset); close(fd); endstatus = 2; @@ -944,12 +952,12 @@ main( put_current_slot(changer_file, slot_offset); } if (need_sleep) - Tape_Ready(scsitapedevice, need_sleep); + Tape_Ready1(scsitapedevice, need_sleep); if (changer_file != NULL) { - printf("%d %s\n", get_current_slot(changer_file), tape_device); + g_printf("%d %s\n", get_current_slot(changer_file), tape_device); } else { - printf("%d %s\n", GetCurrentSlot(fd, drive_num), tape_device); + g_printf("%d %s\n", GetCurrentSlot(fd, drive_num), tape_device); } break; @@ -967,9 +975,9 @@ main( if (ask_clean(scsitapedevice)) clean_tape(fd,tape_device,clean_file,drive_num,clean_slot, maxclean,time_file); - printf("%d %s\n", target, tape_device); + g_printf("%d %s\n", target, tape_device); } else { - printf("%d %s\n", target, "drive was not loaded"); + g_printf(_("%d drive was not loaded\n"), target); endstatus = 1; } break; @@ -987,7 +995,7 @@ main( } clean_tape(fd,tape_device,clean_file,drive_num,clean_slot, maxclean,time_file); - printf("%s cleaned\n", tape_device); + g_printf(_("%s cleaned\n"), tape_device); break; }; diff --git a/changer-src/chg-scsi.c b/changer-src/chg-scsi.c index 685510b..46d4801 100644 --- a/changer-src/chg-scsi.c +++ b/changer-src/chg-scsi.c @@ -189,68 +189,68 @@ dump_changer_struct( { int i; - dbprintf(("Number of configurations: %d\n",chg->number_of_configs)); - dbprintf(("Tapes need eject: %s\n",(chg->eject>0?"Yes":"No"))); - dbprintf (("\traw: %d\n",chg->eject)); - dbprintf(("Inv. auto update: %s\n",(chg->autoinv>0?"Yes":"No"))); - dbprintf (("\traw: %d\n",chg->autoinv)); - dbprintf(("barcode reader : %s\n",(chg->havebarcode>0?"Yes":"No"))); - dbprintf (("\traw: %d\n",chg->havebarcode)); - dbprintf(("Emulate Barcode : %s\n",(chg->emubarcode>0?"Yes":"No"))); - dbprintf (("\traw: %d\n",chg->emubarcode)); + dbprintf(_("Number of configurations: %d\n"), chg->number_of_configs); + dbprintf(_("Tapes need eject: %s\n"), (chg->eject>0 ? _("Yes") : _("No"))); + dbprintf (_("\traw: %d\n"),chg->eject); + dbprintf(_("Inv. auto update: %s\n"), (chg->autoinv>0 ? _("Yes") : _("No"))); + dbprintf (_("\traw: %d\n"),chg->autoinv); + dbprintf(_("barcode reader : %s\n"), (chg->havebarcode>0 ? _("Yes") : _("No"))); + dbprintf (_("\traw: %d\n"),chg->havebarcode); + dbprintf(_("Emulate Barcode : %s\n"), (chg->emubarcode>0 ? _("Yes") : _("No"))); + dbprintf (_("\traw: %d\n"),chg->emubarcode); if (chg->debuglevel != NULL) - dbprintf(("debug level : %s\n", chg->debuglevel)); - dbprintf(("Tapes need sleep: %d seconds\n", (int)chg->sleep)); - dbprintf(("Cleancycles : %d\n",chg->cleanmax)); - dbprintf(("Changerdevice : %s\n",chg->device)); + dbprintf(_("debug level : %s\n"), chg->debuglevel); + dbprintf(_("Tapes need sleep: %ld seconds\n"), (long int)chg->sleep); + dbprintf(_("Clean cycles : %d\n"), chg->cleanmax); + dbprintf(_("Changer device : %s\n"), chg->device); if (chg->labelfile != NULL) - dbprintf(("Labelfile : %s\n", chg->labelfile)); + dbprintf(_("Label file : %s\n"), chg->labelfile); for (i=0; inumber_of_configs; i++){ - dbprintf(("Tapeconfig Nr: %d\n",i)); - dbprintf((" Drivenumber : %d\n",chg->conf[i].drivenum)); - dbprintf((" Startslot : %d\n",chg->conf[i].start)); - dbprintf((" Endslot : %d\n",chg->conf[i].end)); - dbprintf((" Cleanslot : %d\n",chg->conf[i].cleanslot)); + dbprintf(_("Tape config Nr: %d\n"), i); + dbprintf(_(" Drive number : %d\n"), chg->conf[i].drivenum); + dbprintf(_(" Start slot : %d\n"), chg->conf[i].start); + dbprintf(_(" End slot : %d\n"), chg->conf[i].end); + dbprintf(_(" Clean slot : %d\n"), chg->conf[i].cleanslot); if (chg->conf[i].device != NULL) - dbprintf((" Devicename : %s\n",chg->conf[i].device)); + dbprintf(_(" Device name : %s\n"), chg->conf[i].device); else - dbprintf((" Devicename : none\n")); + dbprintf(_(" Device name : none\n")); if (chg->conf[i].changerident != NULL) - dbprintf((" changerident : %s\n",chg->conf[i].changerident)); + dbprintf(_(" changer ident : %s\n"), chg->conf[i].changerident); else - dbprintf((" changerident : none\n")); + dbprintf(_(" changer ident : none\n")); if (chg->conf[i].scsitapedev != NULL) - dbprintf((" SCSITapedev : %s\n",chg->conf[i].scsitapedev)); + dbprintf(_(" SCSI Tape dev : %s\n"), chg->conf[i].scsitapedev); else - dbprintf((" SCSITapedev : none\n")); + dbprintf(_(" SCSI Tape dev : none\n")); if (chg->conf[i].tapeident != NULL) - dbprintf((" tapeident : %s\n",chg->conf[i].tapeident)); + dbprintf(_(" tape ident : %s\n"), chg->conf[i].tapeident); else - dbprintf((" tapeident : none\n")); + dbprintf(_(" tape ident : none\n")); if (chg->conf[i].tapestatfile != NULL) - dbprintf((" statfile : %s\n", chg->conf[i].tapestatfile)); + dbprintf(_(" stat file : %s\n"), chg->conf[i].tapestatfile); else - dbprintf((" statfile : none\n")); + dbprintf(_(" stat file : none\n")); if (chg->conf[i].slotfile != NULL) - dbprintf((" Slotfile : %s\n",chg->conf[i].slotfile)); + dbprintf(_(" Slot file : %s\n"), chg->conf[i].slotfile); else - dbprintf((" Slotfile : none\n")); + dbprintf(_(" Slot file : none\n")); if (chg->conf[i].cleanfile != NULL) - dbprintf((" Cleanfile : %s\n",chg->conf[i].cleanfile)); + dbprintf(_(" Clean file : %s\n"), chg->conf[i].cleanfile); else - dbprintf((" Cleanfile : none\n")); + dbprintf(_(" Clean file : none\n")); if (chg->conf[i].timefile != NULL) - dbprintf((" Usagecount : %s\n",chg->conf[i].timefile)); + dbprintf(_(" Usage count : %s\n"), chg->conf[i].timefile); else - dbprintf((" Usagecount : none\n")); + dbprintf(_(" Usage count : none\n")); } } @@ -351,7 +351,7 @@ read_config( } else { numconf = atoi(value); if (numconf < 1 || numconf > 100) { - fprintf(stderr,"numconf %d is bad\n", numconf); + g_fprintf(stderr,_("numconf %d is bad\n"), numconf); numconf = 1; } init_changer_struct(chg, numconf); @@ -360,8 +360,8 @@ read_config( } switch (token) { case NUMDRIVE: if (atoi(value) != numconf) - fprintf(stderr,"Error: number_drives at wrong place, should be "\ - "first in file\n"); + g_fprintf(stderr,_("Error: number_drives at wrong place, should be " + "first in file\n")); break; case AUTOINV: chg->autoinv = 1; @@ -396,7 +396,7 @@ read_config( case CHANGERIDENT: chg->conf[drivenum].changerident = stralloc(value); if (drivenum < 0 || drivenum > 100) { - fprintf(stderr,"drivenum %d is bad\n", drivenum); + g_fprintf(stderr,_("drivenum %d is bad\n"), drivenum); drivenum = 0; } if (strcmp(chg->conf[drivenum].changerident,"generic_changer") != 0) { @@ -420,10 +420,10 @@ read_config( case DRIVE: drivenum = atoi(value); if (drivenum < 0) { - fprintf(stderr,"Error: drive must be >= 0\n"); + g_fprintf(stderr,_("Error: drive must be >= 0\n")); drivenum = 0; } else if (drivenum >= numconf) { - fprintf(stderr,"Error: drive must be less than number_drives\n"); + g_fprintf(stderr,_("Error: drive must be less than number_drives\n")); drivenum = numconf; } break; @@ -431,68 +431,68 @@ read_config( if (drivenum < numconf){ chg->conf[drivenum].drivenum = atoi(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " drivenum ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " drivenum ignored\n")); } break; case START: if (drivenum < numconf){ chg->conf[drivenum].start = atoi(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " startuse ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " startuse ignored\n")); } break; case END: if (drivenum < numconf){ chg->conf[drivenum].end = atoi(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " enduse ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " enduse ignored\n")); } break; case CLEAN: if (drivenum < numconf){ chg->conf[drivenum].cleanslot = atoi(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " cleanslot ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " cleanslot ignored\n")); } break; case DEVICE: if (drivenum < numconf){ chg->conf[drivenum].device = stralloc(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " device ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " device ignored\n")); } break; case STATFILE: if (drivenum < numconf){ chg->conf[drivenum].slotfile = stralloc(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " slotfile ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " slotfile ignored\n")); } break; case CLEANFILE: if (drivenum < numconf){ chg->conf[drivenum].cleanfile = stralloc(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " cleanfile ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " cleanfile ignored\n")); } break; case USAGECOUNT: if (drivenum < numconf){ chg->conf[drivenum].timefile = stralloc(value); } else { - fprintf(stderr,"Error: drive is not less than number_drives"\ - " usagecount ignored\n"); + g_fprintf(stderr,_("Error: drive is not less than number_drives" + " usagecount ignored\n")); } break; default: - fprintf(stderr,"Error: Unknown token\n"); + g_fprintf(stderr,_("Error: Unknown token\n")); break; } } @@ -518,7 +518,7 @@ get_current_slot( int retval = -1; int ret; /* return value for the fscanf function */ if ((inf=fopen(count_file,"r")) == NULL) { - fprintf(stderr, "%s: unable to open (%s)\n", + g_fprintf(stderr, _("%s: unable to open (%s)\n"), get_pname(), count_file); exit(2); } @@ -552,11 +552,11 @@ put_current_slot( return; if ((inf=fopen(count_file,"w")) == NULL) { - fprintf(stderr, "%s: unable to open current slot file (%s)\n", + g_fprintf(stderr, _("%s: unable to open current slot file (%s)\n"), get_pname(), count_file); exit(2); } - fprintf(inf, "%d\n", slot); + g_fprintf(inf, "%d\n", slot); fclose(inf); } @@ -589,8 +589,8 @@ MapBarCode( long pos; int rc; - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : Parameter\n"); - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"labelfile -> %s, vol -> %s, barcode -> %s, action -> %c, slot -> %d, from -> %d\n", + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : Parameter\n")); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("labelfile -> %s, vol -> %s, barcode -> %s, action -> %c, slot -> %d, from -> %d\n"), labelfile, result->data.voltag, result->data.barcode, @@ -600,47 +600,47 @@ MapBarCode( if (labelfile == NULL) { - DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE,"Got empty labelfile (NULL)\n"); - ChgExit("MapBarCode", "MapBarCode name of labelfile is not set\n",FATAL); + DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE,_("Got empty labelfile (NULL)\n")); + ChgExit("MapBarCode", _("MapBarCode name of labelfile is not set\n"),FATAL); /*NOTREACHED*/ } if (access(labelfile, F_OK) == -1) { - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE, "MapBarCode : creating %s", labelfile); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE, _("MapBarCode : creating %s"), labelfile); if ((fp = fopen(labelfile, "w+")) == NULL) { - DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE," failed\n"); - ChgExit("MapBarCode", "MapBarCode, creating labelfile failed\n", FATAL); + DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE,_(" failed\n")); + ChgExit("MapBarCode", _("MapBarCode, creating labelfile failed\n"), FATAL); /*NOTREACHED*/ } - fprintf(fp,":%d:", LABEL_DB_VERSION); + g_fprintf(fp,":%d:", LABEL_DB_VERSION); fclose(fp); } if ((fp = fopen(labelfile, "r+")) == NULL) { - DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE,"MapBarCode : failed to open %s\n", labelfile); - ChgExit("MapBarCode", "MapBarCode, opening labelfile for read/write failed\n", FATAL); + DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE,_("MapBarCode : failed to open %s\n"), labelfile); + ChgExit("MapBarCode", _("MapBarCode, opening labelfile for read/write failed\n"), FATAL); /*NOTREACHED*/ } if (fscanf(fp,":%d:", &version) != 1) { - ChgExit("MapBarCode", "MapBarCode, DB Version unreadable.\n", FATAL); + ChgExit("MapBarCode", _("MapBarCode, DB Version unreadable.\n"), FATAL); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : DB version %d\n", version); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : DB version %d\n"), version); pos = ftell(fp); if (version != LABEL_DB_VERSION) { - ChgExit("MapBarCode", "MapBarCode, DB Version does not match\n", FATAL); + ChgExit("MapBarCode", _("MapBarCode, DB Version does not match\n"), FATAL); /*NOTREACHED*/ } if (( plabelv2 = (LabelV2_T *)alloc(SIZEOF(LabelV2_T))) == NULL) { - DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE,"MapBarCode : alloc failed\n"); - ChgExit("MapBarCode", "MapBarCode alloc failed\n", FATAL); + DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE,_("MapBarCode : alloc failed\n")); + ChgExit("MapBarCode", _("MapBarCode alloc failed\n"), FATAL); /*NOTREACHED*/ } @@ -652,7 +652,7 @@ MapBarCode( if (rsize == SIZEOF(LabelV2_T)) { record++; - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : (%d) VolTag \"%s\", BarCode %s, inuse %d, slot %d, from %d, loadcount %d\n",record, + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : (%d) VolTag \"%s\", BarCode %s, inuse %d, slot %d, from %d, loadcount %d\n"),record, plabelv2->voltag, plabelv2->barcode, plabelv2->valid, @@ -665,7 +665,7 @@ MapBarCode( * Only dump the info */ case BARCODE_DUMP: - printf("Slot -> %d, from -> %d, valid -> %d, Tag -> %s, Barcode -> %s, Loadcount %u\n", + g_printf(_("Slot -> %d, from -> %d, valid -> %d, Tag -> %s, Barcode -> %s, Loadcount %u\n"), plabelv2->slot, plabelv2->from, plabelv2->valid, @@ -713,7 +713,7 @@ MapBarCode( if (strcmp(plabelv2->barcode, result->data.barcode) == 0) { - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : update entry\n"); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : update entry\n")); if (fseek(fp, pos, SEEK_SET) == -1) { fclose(fp); amfree(plabelv2); @@ -740,7 +740,7 @@ MapBarCode( case FIND_SLOT: if (strcmp(plabelv2->voltag, result->data.voltag) == 0) { - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode FIND_SLOT : \n"); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode FIND_SLOT : \n")); memcpy(&(result->data), plabelv2, SIZEOF(LabelV2_T)); amfree(plabelv2); return(1); @@ -754,7 +754,7 @@ MapBarCode( case UPDATE_SLOT: if (strcmp(plabelv2->voltag, result->data.voltag) == 0) { - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode UPDATE_SLOT : update entry\n"); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode UPDATE_SLOT : update entry\n")); if (fseek(fp, pos, SEEK_SET) == -1) { fclose(fp); amfree(plabelv2); @@ -781,12 +781,12 @@ MapBarCode( */ case BARCODE_VOL: /* - * DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode: (%d) inside BARCODE_VOL\n", record); - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"file value: %s, searched for value: %s\n", plabelv2->voltag, result->data.voltag); + * DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode: (%d) inside BARCODE_VOL\n"), record); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("file value: %s, searched for value: %s\n"), plabelv2->voltag, result->data.voltag); */ if (strcmp(plabelv2->voltag, result->data.voltag) == 0) { - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : VOL %s match\n", result->data.voltag); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : VOL %s match\n"), result->data.voltag); fclose(fp); memcpy(&(result->data), plabelv2, SIZEOF(LabelV2_T)); @@ -801,7 +801,7 @@ MapBarCode( case BARCODE_BARCODE: if (strcmp(plabelv2->barcode, result->data.barcode) == 0) { - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : BARCODE %s match\n", result->data.barcode); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : BARCODE %s match\n"), result->data.barcode); fclose(fp); memcpy(&(result->data), plabelv2, SIZEOF(LabelV2_T)); @@ -811,13 +811,13 @@ MapBarCode( break; default: - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : unknown action\n"); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : unknown action\n")); break; } pos = ftell(fp); } else { - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : feof (%d)\n", feof(fp)); - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : error in read record expect %d, got %d\n",SIZEOF(LabelV2_T), rsize); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : feof (%d)\n"), feof(fp)); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : error in read record expect %d, got %d\n"),SIZEOF(LabelV2_T), rsize); loop=0; } } @@ -836,7 +836,7 @@ MapBarCode( */ if (unusedpos != 0) { - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,"MapBarCode : reuse record %d\n", unusedrec); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE,_("MapBarCode : reuse record %d\n"), unusedrec); if (fseek(fp, unusedpos, SEEK_SET) == -1) { fclose(fp); amfree(plabelv2); @@ -957,13 +957,13 @@ usage( char *argv[]) { int cnt; - printf("%s: Usage error.\n", argv[0]); + g_printf(_("%s: Usage error.\n"), argv[0]); for (cnt=0; cnt < COMCOUNT; cnt++){ - printf(" %s %s",argv[0],argdefs[cnt].str); + g_printf(" %s %s",argv[0],argdefs[cnt].str); if (argdefs[cnt].takesparam) - printf(" \n"); + g_printf(" \n"); else - printf("\n"); + g_printf("\n"); } exit(2); } @@ -978,7 +978,7 @@ parse_args( int i; for (i=0; i < argc; i++) - dbprintf(("ARG [%d] : %s\n", i, argv[i])); + dbprintf(_("ARG [%d] : %s\n"), i, argv[i]); i = 0; if ((argc<2)||(argc>3)) usage(argv); @@ -1048,7 +1048,7 @@ get_relative_target( default: break; } - printf(" no slot `%s'\n",parameter); + g_printf(_(" no slot `%s'\n"),parameter); close(fd); exit(2); /*NOTREACHED*/ @@ -1096,33 +1096,38 @@ clean_tape( char *mail_cmd = NULL; FILE *mailf = NULL; int mail_pipe_opened = 1; +#ifdef MAILER if(getconf_seen(CNF_MAILTO) && strlen(getconf_str(CNF_MAILTO)) > 0 && validate_mailto(getconf_str(CNF_MAILTO))) { mail_cmd = vstralloc(MAILER, - " -s", " \"", "AMANDA PROBLEM: PLEASE FIX", "\"", + " -s", " \"", _("AMANDA PROBLEM: PLEASE FIX"), "\"", " ", getconf_str(CNF_MAILTO), NULL); if((mailf = popen(mail_cmd, "w")) == NULL){ - printf("Mail failed\n"); - error("could not open pipe to \"%s\": %s", - mail_cmd, strerror(errno)); + g_printf(_("Mail failed\n")); + error(_("could not open pipe to \"%s\": %s"), + mail_cmd, strerror(errno)); /*NOTREACHED*/ } - } - else { + } else { mail_pipe_opened = 0; mailf = stderr; - fprintf(mailf, "\nNo mail recipient specified, output redirected to stderr"); + g_fprintf(mailf, _("\nNo mail recipient specified, output redirected to stderr")); } - fprintf(mailf,"\nThe usage count of your cleaning tape in slot %d", +#else + mail_pipe_opened = 0; + mailf = stderr; + g_fprintf(mailf, _("\nNo mailer specified; output redirected to stderr")); +#endif + g_fprintf(mailf,_("\nThe usage count of your cleaning tape in slot %d"), cleancart); - fprintf(mailf,"\nis more than %d. (cleanmax)",maxclean); - fprintf(mailf,"\nTapedrive %s needs to be cleaned",tapedev); - fprintf(mailf,"\nPlease insert a new cleaning tape and reset"); - fprintf(mailf,"\nthe countingfile %s",cnt_file); + g_fprintf(mailf,_("\nis more than %d. (cleanmax)"),maxclean); + g_fprintf(mailf,_("\nTapedrive %s needs to be cleaned"),tapedev); + g_fprintf(mailf,_("\nPlease insert a new cleaning tape and reset")); + g_fprintf(mailf,_("\nthe countingfile %s"),cnt_file); if(mail_pipe_opened == 1 && pclose(mailf) != 0) { - error("mail command failed: %s", mail_cmd); + error(_("mail command failed: %s"), mail_cmd); /*NOTREACHED*/ } return; @@ -1145,8 +1150,8 @@ clean_tape( int main( - int argc, - char *argv[]) + int argc, + char ** argv) { int loaded; int target, oldtarget; @@ -1190,6 +1195,15 @@ main( int param_index = 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"); + changer = alloc(SIZEOF(changer_t)); pbarcoderes = alloc(SIZEOF(MBC_T)); @@ -1202,7 +1216,7 @@ main( changer->labelfile = NULL; changer->conf = NULL; #ifdef CHG_SCSI_STANDALONE - printf("Ups standalone\n"); + g_printf(_("Ups standalone\n")); #else set_pname("chg-scsi"); @@ -1211,7 +1225,7 @@ main( dbopen(DBG_SUBDIR_SERVER); - dbprintf(("chg-scsi: %s\n", rcsid)); + dbprintf("chg-scsi: %s\n", rcsid); ChangerDriverVersion(); if (debug_file == NULL) @@ -1240,13 +1254,9 @@ main( break; } - if(read_conffile(CONFFILE_NAME)) { - perror(CONFFILE_NAME); - exit(1); - /*NOTREACHED*/ - } + config_init(CONFIG_INIT_USE_CWD | CONFIG_INIT_FATAL, NULL); - chg_scsi_conf = getconf_str(CNF_CHNGRFILE); + chg_scsi_conf = getconf_str(CNF_CHANGERFILE); tape_device = getconf_str(CNF_TAPEDEV); /* Get the configuration parameters */ @@ -1255,18 +1265,18 @@ main( if (strlen(tape_device)==1){ if (read_config(chg_scsi_conf, changer) == -1) { - fprintf(stderr, "%s open: of %s failed\n", get_pname(), chg_scsi_conf); + g_fprintf(stderr, _("%s open: of %s failed\n"), get_pname(), chg_scsi_conf); return (2); } confnum=atoi(tape_device); if (changer->number_of_configs == 0) { - fprintf(stderr,"%s: changer->conf[%d] == NULL\n", + g_fprintf(stderr,_("%s: changer->conf[%d] == NULL\n"), get_pname(), confnum); return (2); } if (confnum >= changer->number_of_configs) { - fprintf(stderr,"%s: Configuration %s config # out of range (%d >= %d)\n", + g_fprintf(stderr,_("%s: Configuration %s config # out of range (%d >= %d)\n"), get_pname(), chg_scsi_conf, confnum, changer->number_of_configs); @@ -1328,11 +1338,10 @@ main( if (OpenDevice(INDEX_CHANGER , changer_dev, "changer_dev", changer->conf[confnum].changerident) == 0) { int localerr = errno; - fprintf(stderr, "%s: open: %s: %s\n", get_pname(), + g_fprintf(stderr, _("%s: open: %s: %s\n"), get_pname(), changer_dev, strerror(localerr)); - printf("%s open: %s: %s\n", "", changer_dev, strerror(localerr)); - dbprintf(("%s: open: %s: %s\n", get_pname(), - changer_dev, strerror(localerr))); + g_printf(_("%s open: %s: %s\n"), _(""), changer_dev, strerror(localerr)); + dbprintf(_("open: %s: %s\n"), changer_dev, strerror(localerr)); return 2; } @@ -1348,7 +1357,7 @@ main( { if (OpenDevice(INDEX_TAPE, tape_device, "tape_device", changer->conf[confnum].tapeident) == 0) { - dbprintf(("warning open of %s: failed\n", tape_device)); + dbprintf(_("warning open of %s: failed\n"), tape_device); } } @@ -1359,7 +1368,7 @@ main( { if (OpenDevice(INDEX_TAPECTL, scsitapedevice, "scsitapedevice", changer->conf[confnum].tapeident) == 0) { - dbprintf(("warning open of %s: failed\n", scsitapedevice)); + dbprintf(_("warning open of %s: failed\n"), scsitapedevice); } } @@ -1373,7 +1382,7 @@ main( { if (pDev[INDEX_TAPE].avail == 0 && pDev[INDEX_TAPECTL].avail == 0) { - printf("No device found for tape eject"); + g_printf(_("No device found for tape eject")); return(2); } } @@ -1395,39 +1404,38 @@ main( { if (changer->labelfile == NULL) { - printf("labelfile param not set in your config\n"); + g_printf(_("labelfile param not set in your config\n")); return(2); } } if (slot_file == NULL) { - printf("slotfile param. not set in your config\n"); + g_printf(_("slotfile param. not set in your config\n")); return(2); } if (access(slot_file,R_OK|W_OK) != 0) { - printf("slotfile %s does not exsist or is not read/write\n", slot_file); + g_printf(_("slotfile %s does not exsist or is not read/write\n"), slot_file); return(2); } } else { /* if (strlen(tape_device)==1) */ - printf("please check your config and use a config file for chg-scsi\n"); + g_printf(_("please check your config and use a config file for chg-scsi\n")); return(2); } drivecnt = get_drive_count(fd); if (drive_num > drivecnt) { - printf("%s drive number error (%d > %d)\n", "", + g_printf(_("%s drive number error (%d > %d)\n"), _(""), drive_num, drivecnt); - fprintf(stderr, "%s: requested drive number (%d) greater than " - "number of supported drives (%d)\n", get_pname(), + g_fprintf(stderr, _("%s: requested drive number (%d) greater than " + "number of supported drives (%d)\n"), get_pname(), drive_num, drivecnt); - dbprintf(("%s: requested drive number (%d) greater than " - "number of supported drives (%d)\n", get_pname(), - drive_num, drivecnt)); + dbprintf(_("requested drive number (%d) is greater than " + "number of supported drives (%d)\n"), drive_num, drivecnt); return 2; } @@ -1451,19 +1459,12 @@ main( break; case COM_LABEL: /* Update BarCode/Label mapping file */ pbarcoderes->action = BARCODE_PUT; - pbarcoderes->data.from = pbarcoderes->data.slot = get_current_slot(slot_file); strncpy(pbarcoderes->data.voltag, com.parameter, SIZEOF(pbarcoderes->data.voltag)); - if (BarCode(fd) == 1 && emubarcode != 1) - { - strncpy(pbarcoderes->data.barcode, pDTE[drive_num].VolTag, + strncpy(pbarcoderes->data.barcode, pDTE[drive_num].VolTag, SIZEOF(pbarcoderes->data.barcode)); - } else { - strncpy(pbarcoderes->data.barcode, com.parameter, - SIZEOF(pbarcoderes->data.barcode)); - } MapBarCode(changer->labelfile, pbarcoderes); - printf("0 0 0\n"); + g_printf("0 0 0\n"); break; /* @@ -1476,9 +1477,9 @@ main( oldtarget = get_current_slot(slot_file); if (oldtarget < 0) { - dbprintf(("COM_INVENTORY: get_current_slot %d\n", oldtarget)); + dbprintf(_("COM_INVENTORY: get_current_slot %d\n"), oldtarget); oldtarget = find_empty(fd, slot_offset, use_slots); - dbprintf(("COM_INVENTORY: find_empty %d\n", oldtarget)); + dbprintf(_("COM_INVENTORY: find_empty %d\n"), oldtarget); } if (need_eject) @@ -1511,7 +1512,7 @@ main( */ if (BarCode(fd) == 1 && emubarcode != 1) { - dbprintf(("search : look for %s\n", com.parameter)); + dbprintf(_("search : look for %s\n"), com.parameter); pbarcoderes->action = BARCODE_VOL; pbarcoderes->data.slot = -1; strncpy(pbarcoderes->data.voltag, com.parameter, @@ -1524,7 +1525,7 @@ main( */ if (pbarcoderes->data.slot == -1 && pbarcoderes->data.barcode == NULL) { - printf("Label %s not found (1)\n",com.parameter); + g_printf(_("Label %s not found (1)\n"),com.parameter); endstatus = 2; close(fd); break; @@ -1542,7 +1543,7 @@ main( { if (strcmp(pSTE[x].VolTag, pbarcoderes->data.barcode) == 0) { - dbprintf(("search : found slot %d\n", x)); + dbprintf(_("search : found slot %d\n"), x); target = x; } } @@ -1556,15 +1557,15 @@ main( { if (strcmp(pDTE[x].VolTag, pbarcoderes->data.barcode) == 0) { - dbprintf(("search : found in tape %d\n", x)); + dbprintf(_("search : found in tape %d\n"), x); /* */ if (x == drive_num) { oldtarget = get_current_slot(slot_file); - printf("%d %s\n", oldtarget - slot_offset, tape_device); + g_printf("%d %s\n", oldtarget - slot_offset, tape_device); return(0); } else { - printf("LABEL in wrong tape Unit\n"); + g_printf(_("LABEL in wrong tape Unit\n")); return(2); } } @@ -1574,7 +1575,7 @@ main( */ if (target == -1) { - printf("Label %s not found (2) \n",com.parameter); + g_printf(_("Label %s not found (2) \n"),com.parameter); close(fd); endstatus = 2; break; @@ -1596,7 +1597,7 @@ main( */ if (target == -1) { - printf("Label %s not found (3)\n",com.parameter); + g_printf(_("Label %s not found (3)\n"),com.parameter); close(fd); endstatus = 2; break; @@ -1611,7 +1612,7 @@ main( */ if (emubarcode == 1 && BarCode(fd) != 1) { - dbprintf(("search : look for %s\n", com.parameter)); + dbprintf(_("search : look for %s\n"), com.parameter); pbarcoderes->action = FIND_SLOT; pbarcoderes->data.slot = -1; strncpy(pbarcoderes->data.voltag, com.parameter, @@ -1623,13 +1624,13 @@ main( { target = pbarcoderes->data.slot; } else { - printf("Barcode DB out of sync \n"); + g_printf(_("Barcode DB out of sync \n")); close(fd); endstatus=2; break; } } else { - printf("Label %s not found \n",com.parameter); + g_printf(_("Label %s not found \n"),com.parameter); close(fd); endstatus = 2; break; @@ -1644,7 +1645,7 @@ main( { if (is_positive_number(com.parameter)) { if ((target = atoi(com.parameter))>=use_slots) { - printf(" no slot `%d'\n",target); + g_printf(_(" no slot `%d'\n"),target); close(fd); endstatus = 2; break; @@ -1670,9 +1671,9 @@ main( oldtarget = get_current_slot(slot_file); if (oldtarget < 0) { - dbprintf(("COM_SLOT: get_current_slot %d\n", oldtarget)); + dbprintf(_("COM_SLOT: get_current_slot %d\n"), oldtarget); oldtarget = find_empty(fd, slot_offset, use_slots); - dbprintf(("COM_SLOT: find_empty %d\n", oldtarget)); + dbprintf(_("COM_SLOT: find_empty %d\n"), oldtarget); } /* @@ -1706,7 +1707,7 @@ main( put_current_slot(slot_file, target); if (!loaded && isempty(fd, target)) { - printf("%d slot %d is empty\n",target - slot_offset, + g_printf(_("%d slot %d is empty\n"),target - slot_offset, target - slot_offset); close(fd); endstatus = 1; @@ -1719,7 +1720,7 @@ main( clean_tape(fd, tape_device, clean_file, drive_num, clean_slot, maxclean, time_file); if (load(fd, drive_num, target) != 0) { - printf("%d slot %d move failed\n",target - slot_offset, + g_printf(_("%d slot %d move failed\n"),target - slot_offset, target - slot_offset); close(fd); endstatus = 2; @@ -1733,21 +1734,21 @@ main( { if (Tape_Ready(INDEX_TAPECTL, need_sleep) == -1) { - printf("tape not ready\n"); + g_printf(_("tape not ready\n")); endstatus = 2; break; } } else { if (Tape_Ready(INDEX_TAPECTL, need_sleep) == -1) { - printf("tape not ready\n"); + g_printf(_("tape not ready\n")); endstatus = 2; break; } } } - printf("%d %s\n", target - slot_offset, tape_device); + g_printf("%d %s\n", target - slot_offset, tape_device); break; case COM_INFO: @@ -1759,13 +1760,13 @@ main( } loaded = loaded - (int)slot_offset; - printf("%d %d 1", loaded, use_slots); + g_printf("%d %d 1", loaded, use_slots); if (BarCode(fd) == 1 || emubarcode == 1) { - printf(" 1\n"); + g_printf(" 1\n"); } else { - printf(" 0\n"); + g_printf(" 0\n"); } break; @@ -1774,9 +1775,9 @@ main( if (target < 0) { - dbprintf(("COM_RESET: get_current_slot %d\n", target)); + dbprintf(_("COM_RESET: get_current_slot %d\n"), target); target = find_empty(fd, slot_offset, use_slots); - dbprintf(("COM_RESET: find_empty %d\n", target)); + dbprintf(_("COM_RESET: find_empty %d\n"), target); } if (loaded) { @@ -1805,14 +1806,14 @@ main( } if (isempty(fd, slot_offset)) { - printf("0 slot 0 is empty\n"); + g_printf(_("0 slot 0 is empty\n")); close(fd); endstatus = 1; break; } if (load(fd, drive_num, slot_offset) != 0) { - printf("%d slot %d move failed\n", + g_printf(_("%d slot %d move failed\n"), drive_num, slot_offset); close(fd); put_current_slot(slot_file, slot_offset); @@ -1828,21 +1829,21 @@ main( { if (Tape_Ready(INDEX_TAPECTL, need_sleep) == -1) { - printf("tape not ready\n"); + g_printf(_("tape not ready\n")); endstatus = 2; break; } } else { if (Tape_Ready(INDEX_TAPECTL, need_sleep) == -1) { - printf("tape not ready\n"); + g_printf(_("tape not ready\n")); endstatus = 2; break; } } } - printf("%d %s\n", slot_offset, tape_device); + g_printf(_("%d %s\n"), slot_offset, tape_device); break; case COM_EJECT: @@ -1850,9 +1851,9 @@ main( target = get_current_slot(slot_file); if (target < 0) { - dbprintf(("COM_EJECT: get_current_slot %d\n", target)); + dbprintf(_("COM_EJECT: get_current_slot %d\n"), target); target = find_empty(fd, slot_offset, use_slots); - dbprintf(("COM_EJECT: find_empty %d\n", target)); + dbprintf(_("COM_EJECT: find_empty %d\n"), target); } if (need_eject) @@ -1870,9 +1871,9 @@ main( if (ask_clean(scsitapedevice)) clean_tape(fd, tape_device, clean_file, drive_num, clean_slot, maxclean, time_file); - printf("%d %s\n", target, tape_device); + g_printf("%d %s\n", target, tape_device); } else { - printf("%d %s\n", target, "drive was not loaded"); + g_printf(_("%d drive was not loaded\n"), target); endstatus = 1; } break; @@ -1881,9 +1882,9 @@ main( target = get_current_slot(slot_file); if (target < 0) { - dbprintf(("COM_CLEAN: get_current_slot %d\n", target)); + dbprintf(_("COM_CLEAN: get_current_slot %d\n"), target); target = find_empty(fd, slot_offset, use_slots); - dbprintf(("COM_CLEAN: find_empty %d\n",target)); + dbprintf(_("COM_CLEAN: find_empty %d\n"),target); } if (need_eject) @@ -1901,7 +1902,7 @@ main( clean_tape(fd, tape_device, clean_file, drive_num, clean_slot, maxclean, time_file); - printf("%s cleaned\n", tape_device); + g_printf(_("%s cleaned\n"), tape_device); break; }; @@ -1921,18 +1922,18 @@ main( { if (changer->autoinv == 1) { - DebugPrint(DEBUG_INFO,SECTION_INFO, "Do an inventory \n"); + DebugPrint(DEBUG_INFO,SECTION_INFO, _("Do an inventory \n")); Inventory(changer->labelfile, drive_num, changer->eject, 0, 0, clean_slot); } else { - DebugPrint(DEBUG_INFO,SECTION_INFO, "Set all entrys in DB to invalid\n"); + DebugPrint(DEBUG_INFO,SECTION_INFO, _("Set all entrys in DB to invalid\n")); memset(pbarcoderes, 0 , SIZEOF(MBC_T)); pbarcoderes->action = RESET_VALID; MapBarCode(changer->labelfile,pbarcoderes); } } - DebugPrint(DEBUG_INFO,SECTION_INFO,"Exit status -> %d\n", endstatus); + DebugPrint(DEBUG_INFO,SECTION_INFO,_("Exit status -> %d\n"), endstatus); dbclose(); return endstatus; } diff --git a/changer-src/chg-zd-mtx.sh.in b/changer-src/chg-zd-mtx.sh.in deleted file mode 100644 index 668c3f1..0000000 --- a/changer-src/chg-zd-mtx.sh.in +++ /dev/null @@ -1,1357 +0,0 @@ -#!@SHELL@ -# -# Exit Status: -# 0 Alles Ok -# 1 Illegal Request -# 2 Fatal Error -# -# Contributed by Eric DOUTRELEAU -# This is supposed to work with Zubkoff/Dandelion version of mtx -# -# Modified by Joe Rhett -# to work with MTX 1.2.9 by Eric Lee Green http://mtx.sourceforge.net -# -# Modified by Jason Hollinden on 13-Feb-2001 -# to work with MTX 1.2.10, >9 slots, has barcode support, and works with -# multiple configs at once. -# NOTE: Only tested the 2 additions with an ADIC Scalar 100. - -################################################################################ -# Here are the things you need to do and know to configure this script: -# -# * Figure out what the robot device name is and what the tape drive -# device name is. They will be different! -# -# You cannot send robot commands to a tape drive and vice versa. -# Both should respond to "mtx -f /dev/... inquiry". Hopefully, -# that output will make it obvious which is which. -# -# For instance, here is what mtx has to say about my current robot: -# -# Product Type: Medium Changer -# Vendor ID: 'ATL ' -# Product ID: 'ACL2640 206 ' -# Revision: '2A5A' -# Attached Changer: No -# -# and here is what it says about a tape drive: -# -# Product Type: Tape Drive -# Vendor ID: 'Quantum ' -# Product ID: 'DLT4000 ' -# Revision: 'CD50' -# Attached Changer: No -# -# Note the "Product Type" value makes it clear which is which. -# -# If it is not obvious, "mf -f /dev/... rewind" should be happy when -# talking to a (loaded) tape drive but the changer should give some -# kind of error. Similarly, "mtx -f /dev/... status" should show good -# results with the changer but fail with a tape drive device name. -# -# Once you have this figured out, set "changerdev" in amanda.conf -# to the changer device and "tapedev" to the tape device. -# -# * Find out what the first and last storage slots are. Running -# "mtx -f /dev/... status" should give you something like this -# (although the output will vary widely based on the version of mtx -# and the specifics of your robot): -# -# Storage Changer /dev/changer:1 Drives, 9 Slots ( 0 Import/Export ) -# Data Transfer Element 0:Empty -# Storage Element 1:Full :VolumeTag=SR0001 -# Storage Element 2:Full :VolumeTag=SR0002 -# Storage Element 3:Full :VolumeTag=SR0003 -# Storage Element 4:Full :VolumeTag=SR0004 -# Storage Element 5:Full :VolumeTag=SR0005 -# Storage Element 6:Full :VolumeTag=SR0006 -# Storage Element 7:Full :VolumeTag=SR0007 -# Storage Element 8:Full :VolumeTag=SR0008 -# Storage Element 9:Full :VolumeTag=SR0009 -# Storage Element 10 IMPORT/EXPORT:Full :VolumeTag=SR0009 -# -# This says the first storage slot (element) is "1" and the last -# is "9". If you allocate the entire robot to Amanda, you do not need -# to set the "firstslot" or "lastslot" configuration file variables -- -# the script will compute these values for you. -# -# You do not have to allocate all of the slots for Amanda use, -# but whatever slots you use must be contiguous (i.e. 4 through 9 -# in the above would be OK but 1, 2, 5, 6, 9 would not). The one -# exception to this is that if one of the slots contains a cleaning -# cartridge, it may be in any slot (Amanda will just skip over it if -# it is between firstslot and lastslot). -# -# * Speaking of cleaning cartridges, if you have a storage slot dedicated -# to one, figure out what slot it is in. That slot number will go in -# the "cleanslot" variable. -# -# Also, decide if you want the changer script to automatically run -# the cleaning tape through the drive after every so many mounts, -# and how many mounts you want to do between cleanings. If you -# want the script to do this, set the "autoclean" variable to 1 and -# the "autocleancount" to the number of mounts between cleanings. -# If you do not want to do automatic cleanings (including not having -# a cleaning cartridge in the robot), set "autoclean" to 0. -# -# Note that only a count of mounts is used to determine when it is -# time to clean. The script does not try to detect if the drive is -# requesting cleaning, or how much the drive was used on a given -# mount. -# -# * If you tell Amanda about a cleaning cartridge, whether for automatic -# operation or manual (amtape clean), you must also tell -# the script how long it takes to run the cleaning cycle. It is -# impossible for the script to determine when the cleaning operation -# is done, so the "cleancycle" variable is the number of seconds -# the longest cleaning operation takes (you'll just have to figure -# this out by watching it a few times, or maybe finding it in a tape -# drive hardware manual). The script will sleep for this length of -# time whenever the cleaning tape is referenced. The default is 120 -# seconds (two minutes). -# -# * Figure out the drive slot number. By default, it is set to 0. -# In the example above, the tape drive ("Data Transfer Element") -# is in slot 0. If your drive slot is not 0, you -# need to set the drive slot number with the "driveslot" variable. -# -# * Figure out whether your robot has a barcode reader and whether -# your version of mtx supports it. If you see "VolumeTag" entries -# in the "mtx -f /dev/xxx status" output you did above, you have -# a reader and mtx can work with it, so you may set the "havereader" -# variable to 1. The default is 0 (do not use a reader). -# -# * Pick any tape to load and then determine if the robot can put it -# away directly or whether an "offline" must be done first. -# -# With the tape still mounted and ready, try to put the tape away -# with "mtx". If you get some kind of error, which is the most -# common response, try "mt -f /dev/... offline", wait for the drive -# to unload and make sure the robot takes no action on its own to -# store the tape. Assuming it does not, try the "mtx" command again -# to store the tape. -# -# If you had to issue the "mt -f /dev/... offline" before you could -# use "mtx" to store the tape, set the "offline_before_unload" -# variable to 1. If "mtx" unloaded the drive and put the tape away -# all by itself, set it to 0. -# -# * Some drives and robots require a small delay between unloading the -# tape and instructing the robot to move it back to storage. -# For instance, if you try to grab the tape too soon on an ATL robot -# with DLT tape drives, it will rip the leader out of the drive and -# require sincerely painful hardware maintenance. -# -# If you need a little delay, set the "unloadpause" variable to -# the number of seconds to wait before trying to take a tape from -# a drive back to storage. The default is 0. -# -# * Some drives also require a short pause after loading, or the drive -# will return an I/O error during a test to see if it's online (which -# this script uses "mt rewind" to test). My drives don't recover from -# this, and must be reloaded before they will come online after failing -# such a test. For this reason there is an "initial_poll_delay" -# variable which will pause for a certain number of seconds before -# looping through the online test for the first time. The default is 0. -#### - -#### -# Now you are ready to set up the variables in the changer configuration -# file. -# -# All variables are in "changerfile".conf where "changerfile" is set -# in amanda.conf. For example, if amanda.conf has: -# -# changerfile="/etc/amanda/Dailyset1/CHANGER" -# or changerfile="/etc/amanda/Dailyset1/CHANGER.conf" -# -# the variables must be in "/etc/amanda/Dailyset1/CHANGER.conf". -# The ".conf" is appended only if it's not there". -# -# If "changerfile" is a relative path, it is relative to the directory -# that contains amanda.conf. That also happens to be the directory Amanda -# makes current before running this script. -# -# Here is a commented out example file with all the variables and showing -# their default value (if any): -#### -# firstslot=? #### First storage slot (element) -- required -# lastslot=? #### Last storage slot (element) -- required -# cleanslot=-1 #### Slot with cleaner tape -- default is "-1" -# #### Set negative to indicate no cleaner available -# driveslot=0 #### Drive slot number. Defaults to 0 -# #### Use the 'Data Transfer Element' you want -# -# # Do you want to clean the drive after a certain number of accesses? -# # NOTE - This is unreliable, since 'accesses' aren't 'uses', and we -# # have no reliable way to count this. A single amcheck could -# # generate as many accesses as slots you have, plus 1. -# # ALSO NOTE - many modern tape loaders handle this automatically. -# -# autoclean=0 #### Set to '1' or greater to enable -# -# autocleancount=99 #### Number of access before a clean. -# -# cleancycle=120 #### Time (seconds) to clean drive (default 120) -# -# havereader=0 #### If you have a barcode reader, set to 1. -# -# offline_before_unload=0 #### Does your robot require an -# #### 'mt offline' before mtx unload? -# -# poll_drive_ready=NN #### Time (seconds) between tests to see if -# #### the tape drive has gone ready (default: 3). -# -# max_drive_wait=NN #### Maximum time (seconds) to wait for the -# #### tape drive to become ready (default: 120). -# -# initial_poll_delay=NN #### initial delay after load before polling for -# #### readiness -# -#### - -#### -# Now it is time to test the setup. Do all of the following in the -# directory that contains the amanda.conf file, and do all of it as -# the Amanda user. -# -# * Run this: -# -# .../chg-zd-mtx -info -# echo $? #### (or "echo $status" if you use csh/tcsh) -# -# You should get a single line from the script like this (the actual -# numbers will vary): -# -# 5 9 1 1 -# -# The first number (5) is the "current" slot. This may or may not be -# the slot actually loaded at the moment (if any). It is the slot -# Amanda will try to use next. -# -# The second number (9) is the number of slots. -# -# The third number will always be "1" and indicates the changer is -# capable of going backward. -# -# The fourth number is optional. If you set $havereader to 1, it -# will be "1", otherwise it will not be present. -# -# The exit code ($? or $status) should be zero. -# -# * Run this: -# -# .../chg-zd-mtx -reset -# echo $? -# -# The script should output a line like this: -# -# 1 /dev/rmt/0mn -# -# The number at the first should match $firstslot. The device name -# after that should be your tape device. -# -# The exit code ($? or $status) should be zero. -# -# * Run this: -# -# .../chg-zd-mtx -slot next -# echo $? -# -# The script should output a line like this: -# -# 2 /dev/rmt/0mn -# -# The number at the first should be one higher than $firstslot. -# The device name after that should be your tape device. -# -# The exit code ($? or $status) should be zero. -# -# * Run this: -# -# .../chg-zd-mtx -slot current -# echo $? -# -# Assuming the tape is still loaded from the previous test, the -# robot should not move and the script should report the same thing -# the previous command did. -# -# * If you continue to run "-slot next" commands, the robot should load -# each tape in turn then wrap back around to the first when it -# reaches $lasttape. If $cleanslot is within the $firstslot to -# $lastslot range, the script will skip over that entry. -# -# * Finally, try some of the amtape commands and make sure they work: -# -# amtape reset -# amtape slot next -# amtape slot current -# -# * If you set $havereader non-zero, now would be a good time to create -# the initial barcode database: -# -# amtape update -#### - -################################################################################ -# To debug this script, first look in @AMANDA_DBGDIR@. The script -# uses one of two log files there, depending on what version of Amanda -# is calling it. It may be chg-zd-mtx.YYYYMMDD*.debug, or it may be -# changer.debug.driveN where 'N' is the drive number. -# -# If the log file does not help, try running the script, **as the Amanda -# user**, in the amanda.conf directory with whatever set of args the log -# said were used when you had a problem. If nothing else useful shows up -# in the output, try running the script with the DEBUG environment variable -# set non-null, e.g.: -# -# env DEBUG=yes .../chg-zd-mtx ... -################################################################################ - -# source utility functions and values from configure -exec_prefix=@exec_prefix@ -libexecdir=@libexecdir@ -. ${libexecdir}/chg-lib.sh - -test -n "$DEBUG" && set -x -TMPDIR="@AMANDA_TMPDIR@" -DBGDIR="@AMANDA_DBGDIR@" - -argv0=$0 -myname=`expr "$argv0" : '.*/\(.*\)'` - -config=`pwd 2>/dev/null` -config=`expr "$config" : '.*/\(.*\)'` - -### -# Functions to write a new log file entry and append more log information. -### - -ds=`date '+%H:%M:%S' 2>/dev/null` -if [ $? -eq 0 -a -n "$ds" ]; then - logprefix=`echo "$ds" | sed 's/./ /g'` -else - logprefix="" -fi - -LogAppend() { - if [ -z "$logprefix" ]; then - echo "$@" >> $DBGFILE - else - echo "$logprefix" "$@" >> $DBGFILE - fi -} - -Log() { - if [ -z "$logprefix" ]; then - echo "===" "`date`" "===" >> $DBGFILE - echo "$@" >> $DBGFILE - else - ds=`date '+%H:%M:%S' 2>/dev/null` - echo "$ds" "$@" >> $DBGFILE - fi -} - -### -# Common exit function. -# -# $1 = exit code -# $2 = slot result -# $3 = additional information (error message, tape devive, etc) -### - -internal_call=0 -Exit() { - if [ $internal_call -gt 0 ]; then - call_type=Return - else - call_type=Exit - fi - code=$1 - shift - exit_slot=$1 - shift - exit_answer="$@" - Log $call_type "($code) -> $exit_slot $@" - echo "$exit_slot" "$@" - if [ $call_type = Return ]; then - return $code - fi - amgetconf$SUF dbclose.$argv0:$DBGFILE > /dev/null 2>&1 - exit $code -} - -### -# Function to run another command and log it. -### - -Run() { - Log `_ 'Running: %s' "$@"` - rm -f $stdout $stderr - "$@" > $stdout 2> $stderr - exitcode=$? - Log `_ 'Exit code: %s' "$exitcode"` - if [ -s $stdout ] - then - LogAppend Stdout: - cat $stdout >> $DBGFILE - fi - if [ -s $stderr ] - then - LogAppend Stderr: - cat $stderr >> $DBGFILE - fi - cat $stdout - cat $stderr 1>&2 - return $exitcode -} - -### -# Return success if the arg is numeric. -### - -IsNumeric() { - test -z "$1" && return 1 - x="`expr "$1" : '\([-0-9][0-9]*\)' 2>/dev/null`" - return `expr X"$1" != X"$x"` -} - -### -# Run $MTX status unless the previous output is still valid. -### - -mtx_status_valid=0 -get_mtx_status() { - test -n "$DEBUG" && set -x - if [ $mtx_status_valid -ne 0 ]; then - return 0 - fi - rm -f $mtx_status - Run $MTX status > $mtx_status 2>&1 - status=$? - if [ $status -eq 0 ]; then - mtx_status_valid=1 - fi - return $status -} - -### -# Determine the slot currently loaded. Set $loadedslot to the slot -# currently loaded, or "-1", and $loadedbarcode to the corresponding -# barcode (or nothing). -### - -get_loaded_info() { - test -n "$DEBUG" && set -x - get_mtx_status - - set x `sed -n ' -/^Data Transfer Element:Empty/ { - s/.*/-1/p - q -} -/^Data Transfer Element '$driveslot':Empty/ { - s/.*/-1/p - q -} -/^Data Transfer Element:Full (Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^ ]*\)/ { - s/.*(Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^ ]*\)/\1 \2/p - q -} -/^Data Transfer Element '$driveslot':Full (Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^ ]*\)/ { - s/.*(Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^ ]*\)/\1 \2/p - q -} -/^Data Transfer Element '$driveslot':Full (Unknown Storage Element Loaded):VolumeTag *= *\([^ ]*\)/ { - s/.*:VolumeTag *= *\([^ ]*\)/-2 \1/p - q -} -/^Data Transfer Element:Full (Storage Element \([0-9][0-9]*\) Loaded)/ { - s/.*(Storage Element \([0-9][0-9]*\) Loaded).*/\1/p - q -} -/^Data Transfer Element '$driveslot':Full (Storage Element \([0-9][0-9]*\) Loaded)/ { - s/.*Storage Element \([0-9][0-9]*\) Loaded.*/\1/p - q -} -/^Data Transfer Element '$driveslot':Full (Unknown Storage Element Loaded)/ { - s/.*/-2/p - q -} -' < $mtx_status 2>&1` - shift # get rid of the "x" - loadedslot=$1 - loadedbarcode=$2 - if [ -z "$loadedslot" ]; then - Exit 2 \ - `_ ''` \ - "could not determine current slot, are you sure your drive slot is $driveslot" - return $? # in case we are internal - fi - - #Use the current slot if it's empty and we don't know which slot is loaded' - if [ $loadedslot -eq -2 ]; then - set x `sed -n ' -{ - /^.*Storage Element '$currentslot':Empty/ { - s/.*Storage Element \([0-9][0-9]*\):Empty/\1/p - q - } - /^.*Storage Element '$currentslot':Full/ { - s/.*Storage Element \([0-9][0-9]*\):Full/-2/p - q - } - /^.*Storage Element '$currentslot' IMPORT\/EXPORT:Empty/ { - s/.*Storage Element \([0-9][0-9]*\) IMPORT\/EXPORT:Empty/\1/p - q - } - /^.*Storage Element '$currentslot' IMPORT\/EXPORT:Full/ { - s/.*Storage Element \([0-9][0-9]*\) IMPORT\/EXPORT:Full/-2/p - q - } -} -' < $mtx_status 2>& 1` - shift # get rid of the "x" - loadedslotx=$1 - if [ ! -z $loadedslotx ]; then - loadedslot=$loadedslotx - fi - fi - - #Use the first empty slot if we don't know which slot is loaded' - if [ $loadedslot -eq -2 ]; then - set x `sed -n ' -{ - /^.*Storage Element \([0-9][0-9]*\):Empty/ { - s/.*Storage Element \([0-9][0-9]*\):Empty/\1/p - q - } - /^.*Storage Element \([0-9][0-9]*\) IMPORT\/EXPORT:Empty/ { - s/.*Storage Element \([0-9][0-9]*\) IMPORT\/EXPORT:Empty/\1/p - q - } -} -' < $mtx_status 2>& 1` - shift # get rid of the "x" - loadedslot=$1 - fi - - if IsNumeric "$loadedslot" ; then - : - else - Exit 2 \ - `_ ''` \ - "currently loaded slot ($loadedslot) not numeric" - return $? # in case we are internal - fi - Log `_ 'STATUS -> currently loaded slot = %s' "$loadedslot"` - LogAppend `_ ' -> currently loaded barcode = "%s"' "$loadedbarcode"` -} - -### -# Get a list of slots between $firstslot and $lastslot, if they are set. -# If they are not set, set them to the first and last slot seen on the -# assumption the entire robot is to be used (???). -### - -slot_list= -get_slot_list() { - test -n "$DEBUG" && set -x - if [ -n "$slot_list" ]; then - return - fi - get_mtx_status - slot_list=`sed -n ' -/^Data Transfer Element:Full (Storage Element \([0-9][0-9]*\) Loaded)/ { - s/.*(Storage Element \([0-9][0-9]*\) Loaded).*/\1/p -} -/^Data Transfer Element '$driveslot':Full (Storage Element \([0-9][0-9]*\) Loaded)/ { - s/.*Storage Element \([0-9][0-9]*\) Loaded.*/\1/p -} -/^Data Transfer Element '$driveslot':Full (Unknown Storage Element Loaded)/ { - : loop - n - /^.*Storage Element \([0-9][0-9]*\):Full/ { - s/.*Storage Element \([0-9][0-9]*\):Full.*/\1/p - b loop - } - /^.*Storage Element \([0-9][0-9]*\):Empty/ { - s/.*Storage Element \([0-9][0-9]*\):Empty/\1/p - } -} -/^.*Storage Element \([0-9][0-9]*\):Full/ { - s/.*Storage Element \([0-9][0-9]*\):Full.*/\1/p -} -/^.*Storage Element \([0-9][0-9]*\) IMPORT\/EXPORT:Full/ { - s/.*Storage Element \([0-9][0-9]*\) IMPORT\/EXPORT:Full.*/\1/p -} -' < $mtx_status 2>&1 | grep -v "^${cleanslot}\$" | sort -n` - slot_list=`echo $slot_list` # remove the newlines - if [ $firstslot -lt 0 -o $lastslot -lt 0 ]; then - last=$lastslot - for slot in $slot_list; do - if [ $firstslot -lt 0 ]; then - Log `_ 'SLOTLIST -> firstslot set to %s' "$slot"` - firstslot=$slot - fi - if [ $lastslot -lt 0 ]; then - last=$slot - fi - done - if [ $lastslot -lt 0 -a $last -ge 0 ]; then - Log `_ 'SLOTLIST -> lastslot set to %s' "$last"` - lastslot=$last - fi - if [ $firstslot -lt 0 ]; then - Exit 2 \ - `_ ''` \ - `_ 'cannot determine first slot'` - return $? # in case we are internal - elif [ $lastslot -lt 0 ]; then - Exit 2 \ - `_ ''` \ - `_ 'cannot determine last slot'` - return $? # in case we are internal - fi - fi - amanda_slot_list= - for slot in $slot_list; do - if [ $slot -ge $firstslot -a $slot -le $lastslot ]; then - amanda_slot_list="$amanda_slot_list $slot" - fi - done - if [ -z "$amanda_slot_list" ]; then - Exit 2 \ - `_ ''` \ - "no slots available" - return $? # in case we are internal - fi - slot_list="$amanda_slot_list" -} - -# Paths -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -# try to hit all the possibilities here -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb:/usr/local/bin -export PATH - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -DBGFILE=`amgetconf$SUF dbopen.$argv0 2>/dev/null` -if [ -z "$DBGFILE" ] -then - DBGFILE=/dev/null # will try this again below -fi - -changerfile=`amgetconf$SUF changerfile 2>/dev/null` -if [ -z "$changerfile" ]; then - Exit 2 \ - `_ ''` \ - "changerfile must be specified in amanda.conf" -fi - -tape=`amgetconf$SUF tapedev 2>/dev/null` -if [ -z "$tape" ]; then - Exit 2 \ - `_ ''` \ - "tapedev may not be empty" -elif [ $tape = "/dev/null" -o `expr "$tape" : 'null:'` -eq 5 ]; then - Exit 2 \ - `_ ''` \ - "tapedev ($tape) may not be the null device" -fi -TAPE=`amgetconf$SUF changerdev 2>/dev/null` -if [ -z "$TAPE" ]; then - Exit 2 \ - `_ ''` \ - "changerdev may not be empty" -elif [ $TAPE = "/dev/null" ]; then - Exit 2 \ - `_ ''` \ - "changerdev ($TAPE) may not be the null device" -fi -export TAPE # for mtx command - -CHANGER=$TAPE -export CHANGER # for mtx command - -#### Set up the various config files. - -conf_match=`expr "$changerfile" : .\*\.conf\$` -if [ $conf_match -ge 6 ]; then - configfile=$changerfile - changerfile=`echo $changerfile | sed 's/.conf$//g'` -else - configfile=$changerfile.conf -fi - -if [ ! -e $configfile ]; then - Exit 2 \ - `_ ''` \ - "configuration file \"$configfile\" doesn't exist" -fi -if [ ! -f $configfile ]; then - Exit 2 \ - `_ ''` \ - "configuration file \"$configfile\" is not a file" -fi - -cleanfile=$changerfile-clean -accessfile=$changerfile-access -slotfile=$changerfile-slot -labelfile=$changerfile-barcodes -[ ! -s $cleanfile ] && echo 0 > $cleanfile -[ ! -s $accessfile ] && echo 0 > $accessfile -[ ! -s $slotfile ] && echo -1 > $slotfile -[ ! -f $labelfile ] && > $labelfile -cleancount=`cat $cleanfile` -accesscount=`cat $accessfile` - -test -z "$MT" && Exit 2 "" "No mt command defined" -test ! -f "$MT" && Exit 2 "" "mt command ($MT) doesn't exist" -test -z "$MTX" && Exit 2 "" "No mtx command defined" -test ! -f "$MTX" && Exit 2 "" "mtx command ($MTX) doesn't exist" - -#### Dig out of the config file what is needed - -varlist= -varlist="$varlist firstslot" -varlist="$varlist lastslot" -varlist="$varlist cleanslot" -varlist="$varlist cleancycle" -varlist="$varlist OFFLINE_BEFORE_UNLOAD" # old name -varlist="$varlist offline_before_unload" -varlist="$varlist unloadpause" -varlist="$varlist AUTOCLEAN" # old name -varlist="$varlist autoclean" -varlist="$varlist autocleancount" -varlist="$varlist havereader" -varlist="$varlist driveslot" -varlist="$varlist poll_drive_ready" -varlist="$varlist initial_poll_delay" -varlist="$varlist max_drive_wait" - -for var in $varlist -do - val="`cat $configfile 2>/dev/null | sed -n ' -# Ignore comment lines (anything starting with a #). -/^[ ]*#/d -# Find the first var=val line in the file, print the value and quit. -/^[ ]*'$var'[ ]*=[ ]*\([^ ][^ ]*\).*/ { - s/^[ ]*'$var'[ ]*=[ ]*\([^ ][^ ]*\).*/\1/p - q -} -'`" - eval $var=\"$val\" -done - -# Deal with driveslot first so we can get DBGFILE set if we are still -# using the old amgetconf. - -if [ -z "$driveslot" ]; then - driveslot=0; -fi - -# Get DBGFILE set if it is not already. - -if [ $DBGFILE = /dev/null ]; then - if [ -d "$DBGDIR" ]; then - DBGFILE=$DBGDIR/changer.debug.drive$driveslot - else - DBGFILE=/dev/null - fi - Log `_ '=== Start %s ===' "\`date\`"` -fi -if [ -z "$driveslot" ]; then - Exit 2 \ - `_ ''` \ - `_ 'cannot determine drive slot from %s' "$tape"` -fi - -stdout=$TMPDIR/$myname.1.$$ -stderr=$TMPDIR/$myname.2.$$ -mtx_status=$TMPDIR/$myname.status.$$ -trap "rm -f $stdout $stderr $mtx_status" 0 # exit cleanup - -Log `_ 'Using config file %s' "$configfile"` - -# Log the argument list. - -Log `_ "Arg info:"` -LogAppend "\$# = $#" -i=0 -LogAppend "\$$i = \"$argv0\"" -for arg in "$@"; do - i=`expr $i + 1` - LogAppend "\$$i = \"$arg\"" -done - -# Set the default config values for those not in the file. Log the -# results and make sure each is valid (numeric). - -firstslot=${firstslot:-'-1'} # default: mtx status -lastslot=${lastslot:-'-1'} # default: mtx status -cleanslot=${cleanslot:-'-1'} # default: -1 -cleancycle=${cleancycle:-'120'} # default: two minutes -if [ -z "$offline_before_unload" -a -n "$OFFLINE_BEFORE_UNLOAD" ]; then - offline_before_unload=$OFFLINE_BEFORE_UNLOAD # (old name) -fi -offline_before_unload=${offline_before_unload:-'0'} # default: 0 -unloadpause=${unloadpause:-'0'} # default: 0 -if [ -z "$autoclean" -a -n "$AUTOCLEAN" ]; then - autoclean=$AUTOCLEAN # (old name) -fi -autoclean=${autoclean:-'0'} # default: 0 -autocleancount=${autocleancount:-'99'} # default: 99 -havereader=${havereader:-'0'} # default: 0 -poll_drive_ready=${poll_drive_ready:-'3'} # default: three seconds -initial_poll_delay=${initial_poll_delay:-'0'} # default: zero zeconds -max_drive_wait=${max_drive_wait:-'120'} # default: two minutes - -get_slot_list - -Log `_ "Config info:"` -for var in $varlist; do - if [ $var = "OFFLINE_BEFORE_UNLOAD" ]; then - continue # old name - elif [ $var = "AUTOCLEAN" ]; then - continue # old name - fi - eval val=\"'$'$var\" - if [ -z "$val" ]; then - Exit 2 \ - `_ ''` \ - `_ '%s missing in %s' "$var" "$configfile"` - fi - if IsNumeric "$val" ; then - : - else - Exit 2 \ - `_ ''` \ - `_ '%s (%s) not numeric in %s' "$var" "$val" "$configfile"` - fi - LogAppend $var = \"$val\" -done - -# Run the rest of the config file sanity checks. - -if [ $firstslot -gt $lastslot ]; then - Exit 2 \ - `_ ''` \ - `_ 'firstslot (%s) greater than lastslot (%s) in %s' "$firstslot" "$lastslot" "$configfile"` -fi -if [ $autoclean -ne 0 -a $cleanslot -lt 0 ]; then - Exit 2 \ - `_ ''` \ - `_ 'autoclean set but cleanslot not valid (%s)' "$cleanslot"` -fi - -# Set up the current slot - -currentslot=`cat $slotfile` -if IsNumeric "$currentslot" ; then - if [ $currentslot -lt $firstslot ]; then - Log `_ 'SETUP -> current slot %s less than %s ... resetting to %s' "$currentslot" "$firstslot" "$firstslot"` - currentslot=$firstslot - elif [ $currentslot -gt $lastslot ]; then - Log `_ 'SETUP -> current slot %s greater than %s ... resetting to %s' "$currentslot" "$lastslot" "$lastslot"` - currentslot=$lastslot - fi -else - Log `_ 'SETUP -> contents of %s (%s) invalid, setting current slot to first slot (%s)' "$slotfile" "$currentslot" "$firstslot"` - currentslot=$firstslot -fi - -found_current=0 -first_slot_in_list=-1 -next_slot_after_current=-1 -for slot in $slot_list; do - if [ $first_slot_in_list -lt 0 ]; then - first_slot_in_list=$slot # in case $firstslot is missing - fi - if [ $slot -eq $currentslot ]; then - found_current=1 - break - elif [ $slot -gt $currentslot ]; then - next_slot_after_current=$slot # $currentslot is missing - break - fi -done -if [ $found_current -eq 0 ]; then - if [ $next_slot_after_current -lt 0 ]; then - new_currentslot=$first_slot_in_list - else - new_currentslot=$next_slot_after_current - fi - Log `_ 'WARNING -> current slot %s not available, setting current slot to next slot (%s)' "$currentslot" "$new_currentslot"` - currentslot=$new_currentslot -fi - -# More routines. - -### -# Eject the current tape and put it away. -### - -eject() { - test -n "$DEBUG" && set -x - Log `_ 'EJECT -> ejecting tape from %s' "$tape"` - get_loaded_info - if [ $loadedslot -gt 0 ]; then - Log `_ 'EJECT -> moving tape from drive %s to storage slot %s' "$driveslot" "$loadedslot"` - if [ $offline_before_unload -ne 0 ]; then - Run $MT $MTF $tape offline > /dev/null 2>&1 - fi - sleep $unloadpause - result=`Run $MTX unload $loadedslot $driveslot 2>&1` - status=$? - Log `_ ' -> status %s, result "%s"' "$status" "$result"` - mtx_status_valid=0 - if [ $status -ne 0 ]; then - answer="$result" - code=2 - else - answer="$tape" - code=0 - fi - else - answer=`_ 'Drive was not loaded'` - code=1 - fi - Exit $code "$loadedslot" "$answer" - return $? # in case we are internal -} - -### -# Reset the robot back to the first slot. -### - -reset() { - test -n "$DEBUG" && set -x - Log `_ 'RESET -> loading tape from slot %s to drive %s (%s)' "$firstslot" "$driveslot" "$tape"` - # Call loadslot without doing it as an internal and let it finish - # things up. - loadslot $firstslot - # NOTREACHED - Exit 2 `_ ''` `_ 'reset: should not get here'` - return $? # in case we are internal -} - -### -# Unload the current tape (if necessary) and load a new one (unless -# "advance"). If no tape is loaded, get the value of "current" from -# $slotfile. -### - -loadslot() { - test -n "$DEBUG" && set -x - if [ $# -lt 1 ]; then - Exit 2 `_ ''` `_ 'Missing -slot argument'` - return $? # in case we are internal - fi - whichslot=$1 - Log `_ 'LOADSLOT -> load drive %s (%s) from slot %s' "$driveslot" "$tape" "$whichslot"` - - numeric=`echo $whichslot | sed 's/[^0-9]//g'` - case $whichslot in - current|prev|next|advance) - find_slot=$currentslot - ;; - first) - find_slot=$firstslot - ;; - last) - find_slot=$lastslot - ;; - $numeric) - find_slot=$numeric - ;; - clean) - find_slot=$cleanslot - ;; - *) - Exit 2 `_ ''` `_ 'Illegal slot: "%s"' "$whichslot"` - return $? # in case we are internal - ;; - esac - - # Find the requested slot in the slot list. By loading the "set" - # command with multiple copies, we guarantee that if the slot is - # found, we can look both forward and backward without running - # off the end. Putting $cleanslot at the end allows us to find - # that slot since it is not in $slot_list. - get_slot_list - set x $slot_list $slot_list $slot_list $cleanslot - shift # get rid of the "x" - prev_slot=$1 - shift - while [ $# -gt 0 ]; do - if [ $1 -eq $find_slot ]; then - break - fi - prev_slot=$1 - shift - done - if [ $# -le 0 ]; then - Exit 2 \ - `_ ''` \ - `_ 'Cannot find slot %s in slot list (%s)' "$find_slot " "$slot_list"` - return $? # in case we are internal - fi - - # Determine the slot to load. - case $whichslot in - next|advance) - shift - loadslot=$1 - ;; - prev) - loadslot=$prev_slot - ;; - *) - loadslot=$find_slot - esac - - # If the desired slot is already loaded, we are done. Only update - # current slot if this is not the cleaning slot. - get_loaded_info - if [ $loadslot = $loadedslot ]; then - if [ $loadslot -ne $cleanslot ]; then - rm -f $slotfile - echo $loadslot > $slotfile - fi - Exit 0 "$loadedslot" "$tape" - return $? # in case we are internal - fi - if [ $loadedslot -eq -2 ]; then - Exit 0 "$loadedslot" "$tape" - return $? # in case we are internal - fi - - # If we are loading the cleaning tape, bump the cleaning count - # and reset the access count. Otherwise, bump the access count - # and see if it is time to do a cleaning. - if [ $loadslot = $cleanslot ]; then - rm -f $cleanfile $accessfile - expr $cleancount + 1 > $cleanfile - echo 0 > $accessfile - else - rm -f $accessfile - expr $accesscount + 1 > $accessfile - if [ $autoclean -ne 0 -a $accesscount -gt $autocleancount ] - then - internal_call=`expr $internal_call + 1` - loadslot clean > /dev/null 2>&1 - status=$? - internal_call=`expr $internal_call - 1` - if [ $status -ne 0 ]; then - Exit $status "$loadslot" "$exit_answer" - return $? # in case we are internal - fi - - # Slot $cleanslot might contain an ordinary tape - # rather than a cleaning tape. A cleaning tape - # *MIGHT* auto-eject; an ordinary tape does not. - # We therefore have to read the status again to - # check what actually happened. - mtx_status_valid=0 - get_loaded_info - fi - fi - - # Unload whatever tape is in the drive. - internal_call=`expr $internal_call + 1` - eject > /dev/null 2>&1 - status=$? - internal_call=`expr $internal_call - 1` - if [ $status -gt 1 ]; then - Exit $status "$exit_slot" "$exit_answer" - return $? # in case we are internal - fi - - # If we were doing an "advance", we are done. - if [ $whichslot = advance ]; then - if [ $loadslot -ne $cleanslot ]; then - rm -f $slotfile - echo $loadslot > $slotfile - fi - Exit 0 "$loadslot" "/dev/null" - return $? # in case we are internal - fi - - # Load the tape, finally! - Log `_ "LOADSLOT -> loading tape from slot %s to drive %s (%s)" "$loadslot" "$driveslot" "$tape"` - result=`Run $MTX load $loadslot $driveslot 2>&1` - status=$? - Log `_ ' -> status %s, result "%s"' "$status" "$result"` - mtx_status_valid=0 - if [ $status -ne 0 ]; then - Exit 2 "$loadslot" "$result" - return $? # in case we are internal - fi - - ### - # Cleaning tapes never go "ready", so instead we just sit here - # for "long enough" (as determined empirically by the user), - # then return success. - ### - if [ $loadslot -eq $cleanslot ]; then - Run sleep $cleancycle - Exit 0 "$loadslot" "$tape" - return $? # in case we are internal - fi - - ### - # Wait for the drive to go online. - ### - waittime=0 - ready=0 - sleep $initial_poll_delay - while [ $waittime -lt $max_drive_wait ]; do - result=`Run $MT $MTF $tape rewind 2>&1` - if [ $? -eq 0 ]; then - ready=1 - break - fi - sleep $poll_drive_ready - waittime=`expr $waittime + $poll_drive_ready` - done - if [ $ready -eq 0 ]; then - Exit 2 "$loadslot" `_ 'Drive not ready after %s seconds, rewind said "%s"' "$max_drive_wait" "$result"` - return $? # in case we are internal - fi - - if [ $loadslot -ne $cleanslot ]; then - rm -f $slotfile - echo $loadslot > $slotfile - fi - Exit 0 "$loadslot" "$tape" - return $? # in case we are internal -} - -### -# Return information about how the changer is configured and the current -# state of the robot. -### - -info() { - test -n "$DEBUG" && set -x - get_loaded_info - get_slot_list - Log `_ 'INFO -> first slot: %s' "$firstslot"` - LogAppend `_ ' -> current slot: %s' "$currentslot"` - LogAppend `_ ' -> loaded slot: %s' "$loadedslot"` - LogAppend `_ ' -> last slot: %s' "$lastslot"` - LogAppend `_ ' -> slot list: %s' "$slot_list"` - LogAppend `_ ' -> can go backwards: 1'` - LogAppend `_ ' -> havereader: %s' "$havereader"` - - ### - # Check if a barcode reader is configured or not. If so, it - # passes the 4th item in the echo back to amtape signifying it - # can search based on barcodes. - ### - reader= - if [ $havereader -eq 1 ]; then - reader=1 - fi - - if [ $currentslot -lt $firstslot -o $currentslot -gt $lastslot ]; then - currentslot=$firstslot # what "current" will get - fi - numslots=`expr $lastslot - $firstslot + 1` - Exit 0 "$currentslot" "$numslots 1 $reader" - return $? # in case we are internal -} - -### -# Read the labelfile and scan for a particular entry. -### - -read_labelfile() { - labelfile_entry_found=0 - labelfile_label= - labelfile_barcode= - - lbl_search=$1 - bc_search=$2 - - line=0 - while read lbl bc junk; do - line=`expr $line + 1` - if [ -z "$lbl" -o -z "$bc" -o -n "$junk" ]; then - Log `_ 'ERROR -> Line %s malformed: %s %s %s' "$line" "$lbl" "$bc" "$junk"` - LogAppend `_ ' -> Remove %s and run "%s %s update"' "$labelfile" "$sbindir/amtape" "$config"` - Exit 2 \ - `_ ''` \ - `_ 'Line %s malformed in %s: %s %s %s' "$line" "$labelfile" "$lbl" "$bc" "$junk"` - return $? # in case we are internal - fi - if [ $lbl = "$lbl_search" -o $bc = "$bc_search" ]; then - if [ $labelfile_entry_found -ne 0 ]; then - Log `_ 'ERROR -> Duplicate entries: %s line %s' "$labelfile" "$line"` - LogAppend `_ ' -> Remove $labelfile and run "$sbindir/amtape $config update"' "$labelfile" "$sbindir/amtape" "$config"` - Exit 2 \ - `_ ''` \ - `_ 'Duplicate entries: %s line %s' "$labelfile" "$line"` - return $? # in case we are internal - fi - labelfile_entry_found=1 - labelfile_label=$lbl - labelfile_barcode=$bc - fi - done -} - -### -# Adds the label and barcode for the currently loaded tape to the -# barcode file. Return an error if the database is messed up. -### - -addlabel() { - test -n "$DEBUG" && set -x - if [ $# -lt 1 ]; then - Exit 2 `_ ''` `_ 'Missing -label argument'` - return $? # in case we are internal - fi - tapelabel=$1 - if [ $havereader -eq 0 ]; then - Exit 2 `_ ''` `_ 'Not configured with barcode reader'` - return $? # in case we are internal - fi - get_loaded_info - if [ $loadedslot -lt 0 ]; then - Exit 1 `_ ''` `_ 'No tape currently loaded'` - return $? # in case we are internal - fi - Log `_ 'LABEL -> Adding label "%s" with barcode "%s" for slot %s into %s' "$tapelabel" "$loadedbarcode" "$loadedslot" "$labelfile"` - read_labelfile "$tapelabel" "$loadedbarcode" < $labelfile - if [ $labelfile_entry_found -ne 0 ]; then - lf_val= - if [ "$labelfile_barcode" != "$loadedbarcode" ]; then - lf_type=label - lf_val=$tapelabel - val_type=barcode - old_val=$labelfile_barcode - new_val=$loadedbarcode - elif [ "$labelfile_label" != "$tapelabel" ]; then - lf_type=barcode - lf_val=$loadedbarcode - val_type=label - old_val=$labelfile_label - new_val=$tapelabel - fi - if [ -n "$lf_val" ]; then - LogAppend `_ 'ERROR -> !!! Label database corrupted !!!'` - LogAppend `_ ' -> "%s" conflicts with new %s "%s" for %s "%s"' "$old_val" "$val_type" "$new_val" "$lf_type" "$lf_val"` - Exit 2 \ - `_ ''` \ - `_ '%s: "%s" conflicts with new %s "%s" for %s "%s"' "$tapelabel" "$old_val" "$val_type" "$new_val" "$lf_type" "$lf_val"` - return $? # in case we are internal - fi - LogAppend `_ " -> already synced"` - else - echo "$tapelabel $loadedbarcode" >> $labelfile - LogAppend `_ ' -> appended %s entry: %s %s' "$labelfile" "$tapelabel" "$loadedbarcode"` - fi - Exit 0 "$loadedslot" "$tape" - return $? # in case we are internal -} - -### -# Look for a label in the barcode file. If found, locate the slot it's -# in by looking for the barcode in the mtx output, then load that tape. -### - -searchtape() { - test -n "$DEBUG" && set -x - if [ $# -lt 1 ]; then - Exit 2 `_ ''` `_ 'Missing -search argument'` - return $? # in case we are internal - fi - tapelabel=$1 - if [ $havereader -eq 0 ]; then - Exit 2 `_ ''` `_ 'Not configured with barcode reader'` - return $? # in case we are internal - fi - Log `_ 'SEARCH -> Hunting for label "%s"' "$tapelabel"` - read_labelfile "$tapelabel" "" < $labelfile - if [ $labelfile_entry_found -eq 0 ]; then - LogAppend `_ ' -> !!! label "%s" not found in %s !!!' "$tapelabel" "$labelfile"` - LogAppend `_ ' -> Remove $labelfile and run "%s %s update"' "$labelfile" "$sbindir/amtape" "$config"` - Exit 2 \ - `_ ''` \ - `_ '%s: label "%s" not found in %s' "$tapelabel" "$tapelabel" "$labelfile"` - return $? # in case we are internal - fi - LogAppend `_ ' -> barcode is "%s"' "$labelfile_barcode"` - get_mtx_status - foundslot=`sed -n ' -/VolumeTag *= *'$labelfile_barcode' *$/ { - s/.*Storage Element \([0-9][0-9]*\).*/\1/p - q -} -' < $mtx_status` - LogAppend `_ ' -> foundslot is %s' "$foundslot"` - if [ -z "$foundslot" ]; then - LogAppend `_ 'ERROR -> !!! Could not find slot for barcode "%s"!!!' "$labelfile_barcode"` - LogAppend `_ ' -> Remove %s and run "%s %s update"' "$labelfile" "$sbindir/amtape" "$config"` - Exit 2 \ - `_ ''` \ - `_ 'barcode "%s" not found in mtx status output' "$labelfile_barcode"` - return $? # in case we are internal - fi - # Call loadslot without doing it as an internal and let it finish - # things up. - loadslot $foundslot - # NOTREACHED - Exit 2 `_ ''` `_ 'searchtape: should not get here'` - return $? # in case we are internal -} - -### -# Program invocation begins here -### - -if [ $# -lt 1 ]; then - Exit 2 `_ ''` `_ 'Usage: %s -command args' "$myname"` -fi -cmd=$1 -shift -case "$cmd" in --slot) - loadslot "$@" - ;; --info) - info "$@" - ;; --reset) - reset "$@" - ;; --eject) - eject "$@" - ;; --label) - addlabel "$@" - ;; --search) - searchtape "$@" - ;; --clean) - loadslot clean - ;; -*) - Exit 2 `_ ''` `_ 'unknown option: %s' "$cmd"` - ;; -esac - -Exit 2 `_ ''` `_ '%s: should not get here' "$myname"` diff --git a/changer-src/scsi-aix.c b/changer-src/scsi-aix.c index 5e0dba8..5e523df 100644 --- a/changer-src/scsi-aix.c +++ b/changer-src/scsi-aix.c @@ -133,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 +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 +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); @@ -368,12 +368,12 @@ int SCSI_Scan(void) 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 +405,6 @@ int ScanBus(int print) return(-1); } -#endif /* * Local variables: * indent-tabs-mode: nil diff --git a/changer-src/scsi-bsd.c b/changer-src/scsi-bsd.c index 0850c9e..bff9495 100644 --- a/changer-src/scsi-bsd.c +++ b/changer-src/scsi-bsd.c @@ -32,26 +32,7 @@ */ -#include - -#ifdef HAVE_BSD_LIKE_SCSI - -/* -#ifdef HAVE_STDIO_H -*/ -#include -/* -#endif -*/ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif +#include "amanda.h" #include #include @@ -231,10 +212,10 @@ int SCSI_ExecuteCommand(int DeviceFD, memcpy(pRequestSense, ds.sense, RequestSenseLength); if (Result < 0) { - dbprintf(("errno : %s\n",strerror(errno))); + dbprintf("errno : %s\n",strerror(errno)); return (SCSI_ERROR); } - dbprintf(("SCSI_ExecuteCommand(BSD) %02X STATUS(%02X) \n", CDB[0], ds.retsts)); + dbprintf("SCSI_ExecuteCommand(BSD) %02X STATUS(%02X) \n", CDB[0], ds.retsts); switch (ds.retsts) { case SCCMD_BUSY: /* BUSY */ @@ -279,7 +260,7 @@ int Tape_Ioctl( int DeviceFD, int command) if (ioctl(pDev[DeviceFD].fd , MTIOCTOP, &mtop) != 0) { - dbprintf(("Tape_Ioctl error ioctl %s\n",strerror(errno))); + dbprintf(_("Tape_Ioctl error ioctl %s\n"),strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } @@ -304,7 +285,6 @@ int ScanBus(int print) return(-1); } -#endif /* * Local variables: * indent-tabs-mode: nil diff --git a/changer-src/scsi-cam.c b/changer-src/scsi-cam.c index 9f0c497..d01d2d4 100644 --- a/changer-src/scsi-cam.c +++ b/changer-src/scsi-cam.c @@ -33,26 +33,7 @@ */ -#include - -#ifdef HAVE_CAM_LIKE_SCSI - -/* -#ifdef HAVE_STDIO_H -*/ -#include -/* -#endif -*/ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif +#include "amanda.h" #ifdef HAVE_CAMLIB_H # include @@ -97,28 +78,28 @@ int parse_btl(char *DeviceName, if (sscanf(p,"%d", path) != 1) { free(DeviceName); ChgExit("SCSI_OpenDevice", - "Path conversion error. Digits expected", FATAL); + _("Path conversion error. Digits expected"), FATAL); } if ((p = strtok(NULL,":")) == NULL) { free(DeviceName); - ChgExit("SCSI_OpenDevice", "target in Device Name not found", FATAL); + ChgExit("SCSI_OpenDevice", _("target in Device Name not found"), FATAL); } if (sscanf(p,"%d", target) != 1) { free(DeviceName); ChgExit("SCSI_OpenDevice", - "Target conversion error. Digits expected", FATAL); + _("Target conversion error. Digits expected"), FATAL); } if ((p = strtok(NULL,":")) == NULL) { free(DeviceName); - ChgExit("SCSI_OpenDevice", "lun in Device Name not found", FATAL); + ChgExit("SCSI_OpenDevice", _("lun in Device Name not found"), FATAL); } if (sscanf(p,"%d", lun) != 1) { free(DeviceName); ChgExit("SCSI_OpenDevice", - "LUN conversion error. Digits expected", FATAL); + _("LUN conversion error. Digits expected"), FATAL); } return 1; @@ -191,7 +172,7 @@ int SCSI_OpenDevice(int ip) return(1); } } else { /* Device open failed */ - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_OpenDevice open failed\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_OpenDevice open failed\n")); return(0); } } @@ -238,7 +219,7 @@ int SCSI_ExecuteCommand(int DeviceFD, extern OpenFiles_T *pDev; union ccb *ccb; int ret; - uint32_t ccb_flags; + guint32 ccb_flags; OpenFiles_T *pwork = NULL; /* Basic sanity checks */ @@ -294,7 +275,7 @@ int SCSI_ExecuteCommand(int DeviceFD, /* cbfncp */ NULL, /* flags */ ccb_flags, /* tag_action */ MSG_SIMPLE_Q_TAG, - /* data_ptr */ (u_int8_t*)DataBuffer, + /* data_ptr */ (guint8*)DataBuffer, /* dxfer_len */ DataBufferLength, /* sense_len */ SSD_FULL_SIZE, /* cdb_len */ CDB_Length, @@ -327,7 +308,7 @@ int SCSI_ExecuteCommand(int DeviceFD, /* ToDo add error handling */ if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - dbprintf(("SCSI_ExecuteCommand return %d\n", (ccb->ccb_h.status & CAM_STATUS_MASK))); + dbprintf(_("SCSI_ExecuteCommand return %d\n"), (ccb->ccb_h.status & CAM_STATUS_MASK)); return(SCSI_ERROR); } @@ -361,7 +342,7 @@ int Tape_Ioctl( int DeviceFD, int command) if (ioctl(pDev[DeviceFD].fd , MTIOCTOP, &mtop) != 0) { - dbprintf(("Tape_Ioctl error ioctl %s\n", strerror(errno))); + dbprintf(_("Tape_Ioctl error ioctl %s\n"), strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } @@ -382,13 +363,13 @@ int Tape_Status( int DeviceFD) if (ioctl(pDev[DeviceFD].fd , MTIOCGET, &mtget) != 0) { - dbprintf(("Tape_Status error ioctl %s\n", strerror(errno))); + dbprintf(_("Tape_Status error ioctl %s\n"), strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } - dbprintf(("ioctl -> mtget.mt_dsreg %lX\n",mtget.mt_dsreg)); - dbprintf(("ioctl -> mtget.mt_erreg %lX\n",mtget.mt_erreg)); + dbprintf("ioctl -> mtget.mt_dsreg %lX\n",mtget.mt_dsreg); + dbprintf("ioctl -> mtget.mt_erreg %lX\n",mtget.mt_erreg); /* * I have no idea what is the meaning of the bits in mt_erreg @@ -426,7 +407,7 @@ int ScanBus(int print) { for (lun = 0; lun < 8; lun++) { - sprintf(pDev[count].dev, "%d:%d:%d", bus, target, lun); + g_sprintf(pDev[count].dev, "%d:%d:%d", bus, target, lun); pDev[count].inqdone = 0; if (OpenDevice(count, pDev[count].dev, "Scan", NULL)) { @@ -438,45 +419,45 @@ int ScanBus(int print) } else { if (print) { - printf("bus:target:lun -> %s == ",pDev[count].dev); + g_printf(_("bus:target:lun -> %s == "),pDev[count].dev); switch (pDev[count].inquiry->type) { case TYPE_DISK: - printf("Disk"); + g_printf(_("Disk")); break; case TYPE_TAPE: - printf("Tape"); + g_printf(_("Tape")); break; case TYPE_PRINTER: - printf("Printer"); + g_printf(_("Printer")); break; case TYPE_PROCESSOR: - printf("Processor"); + g_printf(_("Processor")); break; case TYPE_WORM: - printf("Worm"); + g_printf(_("Worm")); break; case TYPE_CDROM: - printf("Cdrom"); + g_printf(_("Cdrom")); break; case TYPE_SCANNER: - printf("Scanner"); + g_printf(_("Scanner")); break; case TYPE_OPTICAL: - printf("Optical"); + g_printf(_("Optical")); break; case TYPE_CHANGER: - printf("Changer"); + g_printf(_("Changer")); break; case TYPE_COMM: - printf("Comm"); + g_printf(_("Comm")); break; default: - printf("unknown %d",pDev[count].inquiry->type); + g_printf(_("unknown %d"),pDev[count].inquiry->type); break; } - printf("\n"); + g_printf("\n"); } } } @@ -486,7 +467,6 @@ int ScanBus(int print) return 0; } -#endif /* * Local variables: * indent-tabs-mode: nil diff --git a/changer-src/scsi-changer-driver.c b/changer-src/scsi-changer-driver.c index 776e184..93ed793 100644 --- a/changer-src/scsi-changer-driver.c +++ b/changer-src/scsi-changer-driver.c @@ -5,37 +5,9 @@ static char rcsid[] = "$Id: scsi-changer-driver.c,v 1.52 2006/07/21 00:25:50 mar * Copyright (c) Thomas Hepper th@ant.han.de */ -#include +#include "amanda.h" #include "arglist.h" -/* -#ifdef HAVE_STDIO_H -*/ -#include -/* -#endif -*/ -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_ERRNO_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -# -#ifdef STDC_HEADERS -#include -#else -#include -#endif #include "scsi-defs.h" @@ -507,28 +479,34 @@ PrintConf(void) int count; char *cwd; - printf("# Please replace every ??? with the correct parameter. It is not possible\n"); - printf("# to guess everything :-)\n"); - printf("# If the option is not needed, cleanmax for example if you have no cleaning\n"); - printf("# tape remove the line.\n"); - printf("#\n"); - printf("number_configs 1 # Number of configs, you can have more than 1 config\n"); - printf(" # if you have for example more than one drive, or you\n"); - printf(" # to split your lib to use different dump levels\n"); - printf(" #\n"); - printf("emubarcode 1 # If you drive has no barcode reader this will try\n"); - printf(" # keep an inventory of your tapes to find them faster\n"); - printf(" #\n"); - printf("havebarcode 0 # Set this to 1 if you have an library with an installed\n"); - printf(" # barcode reader\n"); - printf(" #\n"); - printf("debuglevel 0:0 # For debuging, see the docs /docs/TAPE-CHANGER\n"); - printf(" #\n"); - printf("eject ??? # set this to 1 if your drive needs an eject before move\n"); - printf(" #\n"); - printf("sleep ??? # How long to wait after an eject command before moving\n"); - printf(" # the tape\n"); - printf(" #\n"); + g_printf(_("# Please replace every ??? with the correct parameter.\n")); + g_printf(_("# It is not possible to guess everything :-)\n")); + g_printf(_("# Remove the line if the option is not needed.")); + g_printf(_("# Example: cleanmax if you have no cleaning tape")); + g_printf(_("#\n")); + g_printf(_( + "number_configs 1 # Number of configs, you can have more than 1 config\n" + " # if you have for example more than one drive, or you\n" + " # to split your lib to use different dump levels\n" + " #\n")); + g_printf(_( + "emubarcode 1 # If you drive has no barcode reader this will try\n" + " # keep an inventory of your tapes to find them faster\n" + " #\n")); + g_printf(_( + "havebarcode 0 # Set this to 1 if you have a library with a\n" + " # barcode reader\n" + " #\n")); + g_printf(_( + "debuglevel 0:0 # For debuging, see the docs /docs/TAPE-CHANGER\n" + " #\n")); + g_printf(_( + "eject ??? # set this to 1 if your drive needs an eject before move\n" + " #\n")); + g_printf(_( + "sleep ??? # How long to wait after an eject command before moving\n" + " # the tape\n" + " #\n")); for (count = 0; count < CHG_MAXDEV ; count++) { @@ -536,7 +514,7 @@ PrintConf(void) { if (pDev[count].inquiry != NULL && pDev[count].inquiry->type == TYPE_CHANGER) { - printf("changerdev %s # This is the device to communicate with the robot\n", pDev[count].dev); + g_printf(_("changerdev %s # This is the device to communicate with the robot\n"), pDev[count].dev); break; } } @@ -551,24 +529,30 @@ PrintConf(void) { pDev[count].functions->function_status(count, 1); } else { - printf("changerdev ??? # Ups nothing found. Please check the docs\n"); + g_printf(_("changerdev ??? # Ups nothing found. Please check the docs\n")); } - printf(" #\n"); - printf(" # Here now comes the config for the first tape\n"); - printf("config 0 # This value is the one which is used in the amanda\n"); - printf(" # config file to tell the chg-scsi programm which tape\n"); - printf(" # and which slots to use\n"); - printf(" #\n"); - printf("cleancart ??? # The slot where the cleaning tape is located\n"); - printf(" # remove it if you have no cleaning tape\n"); - printf(" #\n"); - printf("drivenum 0 # Which tape drive to use if there are more than one drive\n"); - printf(" #\n"); - printf("dev ??? # Which is the raw device to read/write data from the tape\n"); - printf(" # It is important to use the non rewinding tape, like\n"); - printf(" # /dev/nrst0 on linux, /dev/nrsa0 on BSD ....\n"); - printf(" #\n"); + g_printf(_( + " #\n")); + g_printf(_( + " # Here now comes the config for the first tape\n")); + g_printf(_( + "config 0 # This value is the one which is used in the amanda\n" + " # config file to tell the chg-scsi programm which tape\n" + " # and which slots to use\n" + " #\n")); + g_printf(_( + "cleancart ??? # The slot where the cleaning tape is located\n" + " # remove it if you have no cleaning tape\n" + " #\n")); + g_printf(_( + "drivenum 0 # Which tape drive to use if there are more than one drive\n" + " #\n")); + g_printf(_( + "dev ??? # Which is the raw device to read/write data from the tape\n" + " # It is important to use the non rewinding tape, like\n" + " # /dev/nrst0 on linux, /dev/nrsa0 on BSD ....\n" + " #\n")); /* * OK now lets see if we have an direct SCSI channel @@ -581,10 +565,11 @@ PrintConf(void) { if (pDev[count].inquiry != NULL && pDev[count].inquiry->type == TYPE_TAPE) { - printf("scsitapedev %s # This is the device to communicate with the tape\n", pDev[count].dev); - printf(" # to get some device stats, not so importatn, and\n"); - printf(" # if you run in problems delete it complete\n"); - printf(" #\n"); + g_printf(_( + "scsitapedev %s # This is the device to communicate with the tape\n" + " # to get some device stats, not so important, and\n" + " # if you run into problems delete it completely\n" + " #\n"), pDev[count].dev); break; } } @@ -593,27 +578,32 @@ PrintConf(void) if (STE != 0) { - printf("startuse 0 # Which is the first slot to use\n"); - printf(" #\n"); - printf("enduse " SIZE_T_FMT " # Which is the last slot to use\n", STE); + g_printf(_( + "startuse 0 # Which is the first slot to use\n" + " #\n")); + g_printf(_( + "enduse %zu # Which is the last slot to use.\n"), STE); } else { - printf("startuse ??? # Which is the first slot to use\n"); - printf(" #\n"); - printf("enduse ??? # Which is the last slot to use\n"); + g_printf(_( + "startuse ??? # Which is the first slot to use\n" + " #\n")); + g_printf(_( + "enduse ??? # Which is the last slot to use.\n")); } - printf(" # decrement this value by 1 if you have an\n"); - printf(" # cleaning tape in the last slot\n"); - printf(" #\n"); + g_printf(_( + " # Decrement this value by 1 if you have a\n" + " # cleaning tape in the last slot\n" + " #\n")); if ((cwd = getcwd(NULL, 0)) == NULL) { - cwd = ""; + cwd = _(""); } - printf("statfile %s/tape0-slot #\n",cwd); - printf("cleanfile %s/tape0-clean #\n", cwd); - printf("usagecount %s/tape0-totaltime #\n", cwd); - printf("tapestatus %s/tape0-tapestatus #\n", cwd); - printf("labelfile %s/labelfile #\n", cwd); + g_printf(_("statfile %s/tape0-slot #\n"),cwd); + g_printf(_("cleanfile %s/tape0-clean #\n"), cwd); + g_printf(_("usagecount %s/tape0-totaltime #\n"), cwd); + g_printf(_("tapestatus %s/tape0-tapestatus #\n"), cwd); + g_printf(_("labelfile %s/labelfile #\n"), cwd); } @@ -655,13 +645,13 @@ Inventory( (void)start; /* Quiet unused parameter warning */ (void)stop; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE, "##### START Inventory\n"); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE, _("##### START Inventory\n")); pbarcoderes = alloc(SIZEOF(MBC_T)); memset(pbarcoderes, 0 , SIZEOF(MBC_T)); if (inv_done != 0) { - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE, "##### STOP inv_done -> %d Inventory\n",inv_done); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE, _("##### STOP inv_done -> %d Inventory\n"),inv_done); free(pbarcoderes); return; /*NOTREACHED*/ @@ -702,7 +692,7 @@ Inventory( */ if (load(INDEX_CHANGER, drive, x ) != 0) { - DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE, "Load drive(%d) from(%d) failed\n", drive, x); + DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE, _("Load drive(%d) from(%d) failed\n"), drive, x); continue; } @@ -730,7 +720,7 @@ Inventory( MapBarCode(labelfile, pbarcoderes); } } else { - DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE, "Read label failed\n"); + DebugPrint(DEBUG_ERROR,SECTION_MAP_BARCODE, _("Read label failed\n")); } if (eject) @@ -740,7 +730,7 @@ Inventory( (void)unload(INDEX_TAPE, drive, x); } - DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE, "##### STOP Inventory\n"); + DebugPrint(DEBUG_INFO,SECTION_MAP_BARCODE, _("##### STOP Inventory\n")); free(pbarcoderes); } @@ -754,13 +744,13 @@ isempty( int slot) { extern OpenFiles_T *pDev; - DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### START isempty\n"); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("##### START isempty\n")); if (ElementStatusValid == 0) { if ( pDev[fd].functions->function_status(fd, 1) != 0) { - DebugPrint(DEBUG_ERROR,SECTION_TAPE,"##### STOP isempty [-1]\n"); + DebugPrint(DEBUG_ERROR,SECTION_TAPE,_("##### STOP isempty [-1]\n")); return(-1); /*NOTREACHED*/ } @@ -768,11 +758,11 @@ isempty( if (pSTE[slot].status == 'E') { - DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### STOP isempty [1]\n"); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("##### STOP isempty [1]\n")); return(1); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### STOP isempty [0]\n"); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("##### STOP isempty [0]\n")); return(0); } @@ -784,16 +774,16 @@ get_clean_state( /* Return 1 if cleaning is needed */ int ret; - DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### START get_clean_state\n"); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("##### START get_clean_state\n")); if (pDev[INDEX_TAPECTL].SCSI == 0) { - DebugPrint(DEBUG_ERROR,SECTION_TAPE,"##### STOP get_clean_state [-1]\n"); + DebugPrint(DEBUG_ERROR,SECTION_TAPE,_("##### STOP get_clean_state [-1]\n")); return(-1); /*NOTREACHED*/ } ret=pDev[INDEX_TAPECTL].functions->function_clean(tapedev); - DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### STOP get_clean_state [%d]\n", ret); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("##### STOP get_clean_state [%d]\n"), ret); return(ret); } @@ -813,7 +803,7 @@ eject_tape( extern OpenFiles_T *pDev; int ret; - DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### START eject_tape %s\n",tapedev); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("##### START eject_tape %s\n"),tapedev); if (pDev[INDEX_TAPECTL].functions == NULL) return(-1); @@ -845,7 +835,7 @@ eject_tape( { DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### tape_eject eject\n"); ret=pDev[INDEX_TAPECTL].functions->function_eject(tapedev, type); - DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### STOP (SCSI)eject_tape [%d]\n", ret); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("##### STOP (SCSI)eject_tape [%d]\n"), ret); return(ret); /*NOTREACHED*/ } @@ -853,12 +843,12 @@ eject_tape( if (pDev[INDEX_TAPE].avail == 1) { ret=Tape_Ioctl(INDEX_TAPE, IOCTL_EJECT); - DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### STOP (ioctl)eject_tape [%d]\n", ret); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("##### STOP (ioctl)eject_tape [%d]\n"), ret); return(ret); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO,SECTION_TAPE,"##### STOP eject_tape [-1]\n"); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("##### STOP eject_tape [-1]\n")); return(-1); } @@ -874,14 +864,14 @@ find_empty( size_t x; size_t end; - DebugPrint(DEBUG_INFO,SECTION_ELEMENT,"###### START find_empty\n"); + DebugPrint(DEBUG_INFO,SECTION_ELEMENT,_("###### START find_empty\n")); if (ElementStatusValid == 0) { if ( pDev[fd].functions->function_status(fd , 1) != 0) { DebugPrint(DEBUG_ERROR,SECTION_ELEMENT, - "###### END find_empty [-1]\n"); + _("###### END find_empty [-1]\n")); return((ssize_t)-1); /*NOTREACHED*/ } @@ -900,21 +890,21 @@ find_empty( } DebugPrint(DEBUG_INFO, SECTION_ELEMENT, - "start at " SIZE_T_FMT ", end at " SIZE_T_FMT "\n", - (SIZE_T_FMT_TYPE)start, - (SIZE_T_FMT_TYPE)end); + _("start at %zu, end at %zu\n"), + (size_t)start, + (size_t)end); for (x = start; x < end; x++) { if (pSTE[x].status == 'E') { DebugPrint(DEBUG_INFO,SECTION_ELEMENT, - "###### END find_empty [" SIZE_T_FMT "]\n", x); + _("###### END find_empty [%lu]\n"), x); return((ssize_t)x); /*NOTREACHED*/ } } - DebugPrint(DEBUG_ERROR,SECTION_ELEMENT,"###### END find_empty [-1]\n"); + DebugPrint(DEBUG_ERROR,SECTION_ELEMENT,_("###### END find_empty [-1]\n")); return((ssize_t)-1); } @@ -933,26 +923,27 @@ drive_loaded( { extern OpenFiles_T *pDev; - DebugPrint(DEBUG_INFO,SECTION_TAPE,"###### START drive_loaded\n"); - DebugPrint(DEBUG_INFO,SECTION_TAPE,"%-20s : fd %d drivenum %d \n", "drive_loaded", fd, drivenum); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("###### START drive_loaded\n")); + DebugPrint(DEBUG_INFO,SECTION_TAPE, + _(" drive_loaded : fd %d drivenum %d \n"), fd, drivenum); if (ElementStatusValid == 0) { if (pDev[INDEX_CHANGER].functions->function_status(INDEX_CHANGER, 1) != 0) { - DebugPrint(DEBUG_ERROR,SECTION_TAPE,"Fatal error\n"); + DebugPrint(DEBUG_ERROR,SECTION_TAPE,_("Fatal error\n")); return(-1); /*NOTREACHED*/ } } if (pDTE[drivenum].status == 'E') { - DebugPrint(DEBUG_INFO,SECTION_TAPE,"###### STOP drive_loaded (empty)\n"); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("###### STOP drive_loaded (empty)\n")); return(0); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO,SECTION_TAPE,"###### STOP drive_loaded (not empty)\n"); + DebugPrint(DEBUG_INFO,SECTION_TAPE,_("###### STOP drive_loaded (not empty)\n")); return(1); } @@ -974,8 +965,10 @@ unload( extern int do_inventory; MBC_T *pbarcoderes; - DebugPrint(DEBUG_INFO, SECTION_TAPE,"###### START unload\n"); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"%-20s : fd %d, slot %d, drive %d \n", "unload", fd, slot, drive); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("###### START unload\n")); + DebugPrint(DEBUG_INFO, SECTION_TAPE, + _(" unload : fd %d, slot %d, drive %d \n"), + fd, slot, drive); pbarcoderes = alloc(SIZEOF(MBC_T)); memset(pbarcoderes, 0, SIZEOF(MBC_T)); @@ -987,19 +980,17 @@ unload( { if (pDev[INDEX_CHANGER].functions->function_status(INDEX_CHANGER , 1) != 0) { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"Element Status not valid, reset failed\n"); - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"##### STOP unload (-1)\n"); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("Element Status not valid, reset failed\n")); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("##### STOP unload (-1)\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ } } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"%-20s : unload drive %d[%d] slot %d[%d]\n", "unload", - drive, - pDTE[drive].address, - slot, - pSTE[slot].address); + DebugPrint(DEBUG_INFO, SECTION_TAPE, + _(" unload : unload drive %d[%d] slot %d[%d]\n"), + drive, pDTE[drive].address, slot, pSTE[slot].address); /* * Unloading an empty tape unit makes no sense @@ -1007,8 +998,8 @@ unload( */ if (pDTE[drive].status == 'E') { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"unload : Drive %d address %d is empty\n", drive, pDTE[drive].address); - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"##### STOP unload (-1)\n"); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("unload : Drive %d address %d is empty\n"), drive, pDTE[drive].address); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("##### STOP unload (-1)\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ @@ -1020,10 +1011,10 @@ unload( */ if (pSTE[slot].status == 'F') { - DebugPrint(DEBUG_INFO, SECTION_TAPE,"unload : Slot %d address %d is full\n", drive, pSTE[slot].address); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("unload : Slot %d address %d is full\n"), drive, pSTE[slot].address); if ( ElementStatusValid == 0) { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "unload: Element Status not valid, can't find an empty slot\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("unload: Element Status not valid, can't find an empty slot\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ @@ -1032,12 +1023,12 @@ unload( slot = find_empty(fd, 0, 0); if (slot == -1 ) { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "unload: No Empty slot found\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("unload: No Empty slot found\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"unload : found empty one, try to unload to slot %d\n", slot); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("unload : found empty one, try to unload to slot %d\n"), slot); } @@ -1071,7 +1062,7 @@ unload( */ if (pDev[INDEX_CHANGER].functions->function_move(INDEX_CHANGER, pDTE[drive].address, pSTE[slot].address) != 0) { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"##### STOP unload (-1 move failed)\n"); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("##### STOP unload (-1 move failed)\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ @@ -1083,7 +1074,7 @@ unload( */ if (pDev[INDEX_CHANGER].functions->function_status(INDEX_CHANGER , 1) != 0) { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"##### STOP unload (-1 update status failed)\n"); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("##### STOP unload (-1 update status failed)\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ @@ -1124,14 +1115,14 @@ unload( } else { if (slot != pbarcoderes->data.slot) { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"Slot DB out of sync, slot %d != map %d",slot, pbarcoderes->data.slot); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("Slot DB out of sync, slot %d != map %d"),slot, pbarcoderes->data.slot); do_inventory = 1; } } } } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP unload(0)\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP unload(0)\n")); free(pbarcoderes); return(0); } @@ -1159,8 +1150,8 @@ load( extern int do_inventory; MBC_T *pbarcoderes; - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"###### START load\n"); - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"%-20s : fd %d, drive %d, slot %d \n", "load", fd, drive, slot); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("###### START load\n")); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("%-20s : fd %d, drive %d, slot %d \n"), "load", fd, drive, slot); pbarcoderes = alloc(SIZEOF(MBC_T)); memset(pbarcoderes, 0 , SIZEOF(MBC_T)); @@ -1168,8 +1159,8 @@ load( { if (pDev[fd].functions->function_status(fd, 1) != 0) { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"##### STOP load (-1)\n"); - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"##### STOP load (-1 update status failed)\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("##### STOP load (-1)\n")); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("##### STOP load (-1 update status failed)\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ @@ -1184,8 +1175,8 @@ load( */ if ((size_t)slot >= STE) { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"load : slot %d ge STE %d\n",slot, STE); - ChgExit("load", "slot >= STE", FATAL); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("load : slot %d ge STE %d\n"),slot, STE); + ChgExit("load", _("slot >= STE"), FATAL); /*NOTREACHED*/ } @@ -1194,20 +1185,20 @@ load( */ if (drive >= (int)DTE) { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"load : drive %d ge DTE %d\n",drive, DTE); - ChgExit("load", "drive >= DTE", FATAL); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("load : drive %d ge DTE %d\n"),drive, DTE); + ChgExit("load", _("drive >= DTE"), FATAL); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"load : load drive %d[%d] slot %d[%d]\n",drive, + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("load : load drive %d[%d] slot %d[%d]\n"),drive, pDTE[drive].address, slot, pSTE[slot].address); if (pDTE[drive].status == 'F') { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"load : Drive %d address %d is full\n", drive, pDTE[drive].address); - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"##### STOP load (-1 update status failed)\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("load : Drive %d address %d is full\n"), drive, pDTE[drive].address); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("##### STOP load (-1 update status failed)\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ @@ -1215,8 +1206,8 @@ load( if (pSTE[slot].status == 'E') { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"load : Slot %d address %d is empty\n", drive, pSTE[slot].address); - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"##### STOP load (-1 update status failed)\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("load : Slot %d address %d is empty\n"), drive, pSTE[slot].address); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("##### STOP load (-1 update status failed)\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ @@ -1229,7 +1220,7 @@ load( */ if (pDev[fd].functions->function_status(fd, 1) != 0) { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"##### STOP load (-1 update status failed)\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("##### STOP load (-1 update status failed)\n")); free(pbarcoderes); return(-1); /*NOTREACHED*/ @@ -1299,8 +1290,8 @@ load( } else { /* We got something, is it correct ? */ if (slot != pbarcoderes->data.slot && do_inventory == 0) { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"Slot DB out of sync, slot %d != map %d",slot, pbarcoderes->data.slot); - ChgExit("Load", "Label DB out of sync", FATAL); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("Slot DB out of sync, slot %d != map %d"),slot, pbarcoderes->data.slot); + ChgExit("Load", _("Label DB out of sync"), FATAL); /*NOTREACHED*/ } else { /* OK, so increment the load count */ pbarcoderes->action = UPDATE_SLOT; @@ -1313,16 +1304,16 @@ load( if (BarCode(INDEX_CHANGER) == 1 && changer->emubarcode == 1) { - ChgExit("Load", "BarCode == 1 and emubarcode == 1", FATAL); + ChgExit("Load", _("BarCode == 1 and emubarcode == 1"), FATAL); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"##### STOP load (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("##### STOP load (%d)\n"),ret); free(pbarcoderes); return(ret); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"##### STOP load (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("##### STOP load (%d)\n"),ret); free(pbarcoderes); return(ret); } @@ -1338,16 +1329,15 @@ get_slot_count( { extern OpenFiles_T *pDev; - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"###### START get_slot_count\n"); - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"%-20s : fd %d\n", "get_slot_count", fd); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("###### START get_slot_count\n")); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("%-20s : fd %d\n"), "get_slot_count", fd); if (ElementStatusValid == 0) { pDev[fd].functions->function_status(fd, 1); } DebugPrint(DEBUG_INFO, SECTION_ELEMENT, - "##### STOP get_slot_count (" SIZE_T_FMT ")\n", - (SIZE_T_FMT_TYPE)STE); + _("##### STOP get_slot_count (%zu)\n"), STE); return((ssize_t)STE); /* * return the number of slots in the robot @@ -1368,22 +1358,21 @@ get_drive_count( extern OpenFiles_T *pDev; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"###### START get_drive_count\n"); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-20s : fd %d\n", "get_drive_count", fd); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("###### START get_drive_count\n")); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-20s : fd %d\n"), "get_drive_count", fd); if (ElementStatusValid == 0) { if ( pDev[fd].functions->function_status(fd, 1) != 0) { - DebugPrint(DEBUG_ERROR, SECTION_SCSI, "Error getting drive count\n"); - DebugPrint(DEBUG_ERROR, SECTION_SCSI, "##### STOP get_drive_count (-1)\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI, _("Error getting drive count\n")); + DebugPrint(DEBUG_ERROR, SECTION_SCSI, _("##### STOP get_drive_count (-1)\n")); return(-1); /*NOTREACHED*/ } } DebugPrint(DEBUG_INFO, SECTION_SCSI, - "###### STOP get_drive_count (" SIZE_T_FMT " drives)\n", - (SIZE_T_FMT_TYPE)DTE); + _("###### STOP get_drive_count (%zu drives)\n"), DTE); return((ssize_t)DTE); } @@ -1412,8 +1401,8 @@ OpenDevice( if (!DeviceName) return 1; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START OpenDevice\n"); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"OpenDevice : %s\n", DeviceName); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START OpenDevice\n")); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("OpenDevice : %s\n"), DeviceName); pDev[ip].ConfigName = strdup(ConfigName); pDev[ip].dev = strdup(DeviceName); @@ -1428,14 +1417,14 @@ OpenDevice( { pDev[ip].functions = p; strncpy(pDev[ip].ident, ident, 17); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"override using ident = %s, type = %s\n",p->ident, p->type); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP OpenDevice\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("override using ident = %s, type = %s\n"),p->ident, p->type); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP OpenDevice\n")); return(1); /*NOTREACHED*/ } p++; } - ChgExit("OpenDevice", "ident not found", FATAL); + ChgExit("OpenDevice", _("ident not found"), FATAL); /*NOTREACHED*/ } else { while(p->ident != NULL) @@ -1443,8 +1432,8 @@ OpenDevice( if (strcmp(pDev[ip].ident, p->ident) == 0) { pDev[ip].functions = p; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"using ident = %s, type = %s\n",p->ident, p->type); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP OpenDevice\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("using ident = %s, type = %s\n"),p->ident, p->type); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP OpenDevice\n")); return(1); /*NOTREACHED*/ } @@ -1455,25 +1444,25 @@ OpenDevice( /* divide generic in generic_type, where type is the */ /* num returned by the inquiry command */ p = (ChangerCMD_T *)&ChangerIO; - snprintf(&tmpstr[0], SIZEOF(tmpstr), "%s_%s","generic",pDev[0].type); + g_snprintf(&tmpstr[0], SIZEOF(tmpstr), "%s_%s","generic",pDev[0].type); DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### OpenDevice trying GENERIC Device %s\n",tmpstr); while(p->ident != NULL) { if (strcmp(tmpstr, p->ident) == 0) { pDev[ip].functions = p; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"using ident = %s, type = %s\n",p->ident, p->type); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP OpenDevice\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("using ident = %s, type = %s\n"),p->ident, p->type); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP OpenDevice\n")); return(1); /*NOTREACHED*/ } p++; } } else { /* Something failed, lets see what */ - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"##### STOP OpenDevice failed\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("##### STOP OpenDevice failed\n")); } pDev[ip].functions = NULL; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP OpenDevice (nothing found) !!\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP OpenDevice (nothing found) !!\n")); return(0); } @@ -1489,13 +1478,13 @@ BarCode( int ret; extern OpenFiles_T *pDev; - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### START BarCode\n"); - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"%-20s : fd %d\n", "BarCode", fd); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("##### START BarCode\n")); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("%-20s : fd %d\n"), "BarCode", fd); - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"Ident = [%s], function = [%s]\n", pDev[fd].ident, + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("Ident = [%s], function = [%s]\n"), pDev[fd].ident, pDev[fd].functions->ident); ret = pDev[fd].functions->function_barcode(fd); - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### STOP BarCode (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("##### STOP BarCode (%d)\n"),ret); return(ret); } @@ -1518,7 +1507,7 @@ Tape_Ready( time_t cnt = 0; RequestSense_T *pRequestSense; - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### START Tape_Ready\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### START Tape_Ready\n")); /* * Which device should we use to get the @@ -1544,7 +1533,7 @@ Tape_Ready( if (pDev[fd].avail == 1 && pDev[fd].SCSI == 0) { - DebugPrint(DEBUG_INFO, SECTION_TAPE,"Tape_Ready : Can't send SCSI commands, try ioctl\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("Tape_Ready : Can't send SCSI commands, try ioctl\n")); /* * Do we get an non negative result. * If yes this function is available @@ -1558,8 +1547,8 @@ Tape_Ready( { if ( ret & TAPE_ONLINE) { - DebugPrint(DEBUG_INFO, SECTION_TAPE,"Tape_Ready : Ready after %d seconds\n",cnt); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP Tape_Ready\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("Tape_Ready : Ready after %d seconds\n"),cnt); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP Tape_Ready\n")); return(0); /*NOTREACHED*/ } @@ -1568,15 +1557,15 @@ Tape_Ready( ret = Tape_Status(fd); } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"Tape_Ready : not ready, stop after %d seconds\n",cnt); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP Tape_Ready\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("Tape_Ready : not ready, stop after %d seconds\n"),cnt); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP Tape_Ready\n")); return(0); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"Tape_Ready : no ioctl interface, will sleep for %d seconds\n", wait_time); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("Tape_Ready : no ioctl interface, will sleep for %d seconds\n"), wait_time); sleep(wait_time); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP Tape_Ready\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP Tape_Ready\n")); return(0); /*NOTREACHED*/ } @@ -1605,43 +1594,43 @@ Tape_Ready( switch (SenseHandler(fd, 0, pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_NO: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeReady (TestUnitReady) SENSE_NO\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeReady (TestUnitReady) SENSE_NO\n")); done = 1; break; case SENSE_TAPE_NOT_ONLINE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeReady (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeReady (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n")); break; case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeReady (TestUnitReady) SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeReady (TestUnitReady) SENSE_IGNORE\n")); done = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"TapeReady (TestUnitReady) SENSE_ABORT\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("TapeReady (TestUnitReady) SENSE_ABORT\n")); amfree(pRequestSense); return(-1); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeReady (TestUnitReady) SENSE_RETRY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeReady (TestUnitReady) SENSE_RETRY\n")); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeReady (TestUnitReady) default (SENSE)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeReady (TestUnitReady) default (SENSE)\n")); done = 1; break; } break; case SCSI_ERROR: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"TapeReady (TestUnitReady) SCSI_ERROR\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("TapeReady (TestUnitReady) SCSI_ERROR\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ case SCSI_BUSY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeReady (TestUnitReady) SCSI_BUSY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeReady (TestUnitReady) SCSI_BUSY\n")); break; case SCSI_CHECK: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeReady (TestUnitReady) SCSI_CHECK\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeReady (TestUnitReady) SCSI_CHECK\n")); break; default: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"TapeReady (TestUnitReady) unknown (%d)\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("TapeReady (TestUnitReady) unknown (%d)\n"),ret); break; } sleep(1); @@ -1649,8 +1638,8 @@ Tape_Ready( } amfree(pRequestSense); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"Tape_Ready after %d sec\n", cnt); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP Tape_Ready\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("Tape_Ready after %d sec\n"), cnt); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP Tape_Ready\n")); return(0); } @@ -1663,27 +1652,27 @@ DecodeSCSI( SC_COM_T *pSCSICommand; int x; - DebugPrint(DEBUG_INFO, SECTION_SCSI, "##### START DecodeSCSI\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("##### START DecodeSCSI\n")); pSCSICommand = (SC_COM_T *)&SCSICommand; while (pSCSICommand->name != NULL) { if (CDB[0] == pSCSICommand->command) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%s %s", string, pSCSICommand->name); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%s %s"), string, pSCSICommand->name); for (x=0; x < pSCSICommand->length; x++) { DebugPrint(DEBUG_INFO, SECTION_SCSI," %02X", CDB[x]); } DebugPrint(DEBUG_INFO, SECTION_SCSI,"\n"); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP DecodeSCSI\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP DecodeSCSI\n")); return(0); /*NOTREACHED*/ } pSCSICommand++; } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"Not found %X\n", CDB[0]); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP DecodeSCSI\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("Not found %X\n"), CDB[0]); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP DecodeSCSI\n")); return(0); } @@ -1701,7 +1690,7 @@ DecodeModeSense( (void)pstring; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START DecodeModeSense\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START DecodeModeSense\n")); dump_hex(buffer, 255, DEBUG_INFO, SECTION_SCSI); @@ -1711,20 +1700,20 @@ DecodeModeSense( */ buffer = buffer + 4 + offset; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"buffer length = %d\n", length); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("buffer length = %d\n"), length); if (block) /* Do we have an block descriptor page ?*/ { if (out != NULL) - fprintf(out, "DecodeModeSense : Density Code %x\n", (unsigned)buffer[0]); + g_fprintf(out, _("DecodeModeSense : Density Code %x\n"), (unsigned)buffer[0]); buffer++; if (out != NULL) - fprintf(out, "DecodeModeSense : Number of Blocks %d\n", V3(buffer)); + g_fprintf(out, _("DecodeModeSense : Number of Blocks %d\n"), V3(buffer)); buffer = buffer + 4; if (out != NULL) - fprintf(out, "DecodeModeSense : Block Length %d\n", V3(buffer)); + g_fprintf(out, _("DecodeModeSense : Block Length %d\n"), V3(buffer)); buffer = buffer + 3; } @@ -1740,14 +1729,14 @@ DecodeModeSense( prp = (ReadWriteErrorRecoveryPage_T *)buffer; if (out != NULL) { - fprintf(out, "DecodeModeSense : Read/Write Error Recovery Page\n"); - fprintf(out,"\tTransfer Block %d\n", prp->tb); - fprintf(out,"\tEnable Early Recovery %d\n", prp->eer); - fprintf(out,"\tPost Error %d\n", prp->per); - fprintf(out,"\tDisable Transfer on Error %d\n", prp->dte); - fprintf(out,"\tDisable ECC Correction %d\n", prp->dcr); - fprintf(out,"\tRead Retry Count %d\n", prp->ReadRetryCount); - fprintf(out,"\tWrite Retry Count %d\n", prp->WriteRetryCount); + g_fprintf(out, _("DecodeModeSense : Read/Write Error Recovery Page\n")); + g_fprintf(out,_("\tTransfer Block %d\n"), prp->tb); + g_fprintf(out,_("\tEnable Early Recovery %d\n"), prp->eer); + g_fprintf(out,_("\tPost Error %d\n"), prp->per); + g_fprintf(out,_("\tDisable Transfer on Error %d\n"), prp->dte); + g_fprintf(out,_("\tDisable ECC Correction %d\n"), prp->dcr); + g_fprintf(out,_("\tRead Retry Count %d\n"), prp->ReadRetryCount); + g_fprintf(out,_("\tWrite Retry Count %d\n"), prp->WriteRetryCount); } buffer++; break; @@ -1755,18 +1744,18 @@ DecodeModeSense( pdrp = (DisconnectReconnectPage_T *)buffer; if (out != NULL) { - fprintf(out, "DecodeModeSense : Disconnect/Reconnect Page\n"); - fprintf(out,"\tBuffer Full Ratio %d\n", pdrp->BufferFullRatio); - fprintf(out,"\tBuffer Empty Ratio %d\n", pdrp->BufferEmptyRatio); - fprintf(out,"\tBus Inactivity Limit %d\n", + g_fprintf(out, _("DecodeModeSense : Disconnect/Reconnect Page\n")); + g_fprintf(out,_("\tBuffer Full Ratio %d\n"), pdrp->BufferFullRatio); + g_fprintf(out,_("\tBuffer Empty Ratio %d\n"), pdrp->BufferEmptyRatio); + g_fprintf(out,_("\tBus Inactivity Limit %d\n"), V2(pdrp->BusInactivityLimit)); - fprintf(out,"\tDisconnect Time Limit %d\n", + g_fprintf(out,_("\tDisconnect Time Limit %d\n"), V2(pdrp->DisconnectTimeLimit)); - fprintf(out,"\tConnect Time Limit %d\n", + g_fprintf(out,_("\tConnect Time Limit %d\n"), V2(pdrp->ConnectTimeLimit)); - fprintf(out,"\tMaximum Burst Size %d\n", + g_fprintf(out,_("\tMaximum Burst Size %d\n"), V2(pdrp->MaximumBurstSize)); - fprintf(out,"\tDTDC %d\n", pdrp->DTDC); + g_fprintf(out,_("\tDTDC %d\n"), pdrp->DTDC); } buffer++; break; @@ -1774,22 +1763,22 @@ DecodeModeSense( pEAAPage = (EAAPage_T *)buffer; if (out != NULL) { - fprintf(out,"DecodeModeSense : Element Address Assignment Page\n"); - fprintf(out,"\tMedium Transport Element Address %d\n", + g_fprintf(out,_("DecodeModeSense : Element Address Assignment Page\n")); + g_fprintf(out,_("\tMedium Transport Element Address %d\n"), V2(pEAAPage->MediumTransportElementAddress)); - fprintf(out,"\tNumber of Medium Transport Elements %d\n", + g_fprintf(out,_("\tNumber of Medium Transport Elements %d\n"), V2(pEAAPage->NoMediumTransportElements)); - fprintf(out, "\tFirst Storage Element Address %d\n", + g_fprintf(out, _("\tFirst Storage Element Address %d\n"), V2(pEAAPage->FirstStorageElementAddress)); - fprintf(out, "\tNumber of Storage Elements %d\n", + g_fprintf(out, _("\tNumber of Storage Elements %d\n"), V2(pEAAPage->NoStorageElements)); - fprintf(out, "\tFirst Import/Export Element Address %d\n", + g_fprintf(out, _("\tFirst Import/Export Element Address %d\n"), V2(pEAAPage->FirstImportExportElementAddress)); - fprintf(out, "\tNumber of ImportExport Elements %d\n", + g_fprintf(out, _("\tNumber of ImportExport Elements %d\n"), V2(pEAAPage->NoImportExportElements)); - fprintf(out, "\tFirst Data Transfer Element Address %d\n", + g_fprintf(out, _("\tFirst Data Transfer Element Address %d\n"), V2(pEAAPage->FirstDataTransferElementAddress)); - fprintf(out, "\tNumber of Data Transfer Elements %d\n", + g_fprintf(out, _("\tNumber of Data Transfer Elements %d\n"), V2(pEAAPage->NoDataTransferElements)); } buffer++; @@ -1798,43 +1787,43 @@ DecodeModeSense( pDeviceCapabilitiesPage = (DeviceCapabilitiesPage_T *)buffer; if (out != NULL) { - fprintf(out, "DecodeModeSense : MT can store data cartridges %d\n", + g_fprintf(out, _("DecodeModeSense : MT can store data cartridges %d\n"), pDeviceCapabilitiesPage->MT); - fprintf(out, "DecodeModeSense : ST can store data cartridges %d\n", + g_fprintf(out, _("DecodeModeSense : ST can store data cartridges %d\n"), pDeviceCapabilitiesPage->ST); - fprintf(out, "DecodeModeSense : IE can store data cartridges %d\n", + g_fprintf(out, _("DecodeModeSense : IE can store data cartridges %d\n"), pDeviceCapabilitiesPage->IE); - fprintf(out, "DecodeModeSense : DT can store data cartridges %d\n", + g_fprintf(out, _("DecodeModeSense : DT can store data cartridges %d\n"), pDeviceCapabilitiesPage->DT); - fprintf(out, "DecodeModeSense : MT to MT %d\n", + g_fprintf(out, _("DecodeModeSense : MT to MT %d\n"), pDeviceCapabilitiesPage->MT2MT); - fprintf(out, "DecodeModeSense : MT to ST %d\n", + g_fprintf(out, _("DecodeModeSense : MT to ST %d\n"), pDeviceCapabilitiesPage->MT2ST); - fprintf(out, "DecodeModeSense : MT to IE %d\n", + g_fprintf(out, _("DecodeModeSense : MT to IE %d\n"), pDeviceCapabilitiesPage->MT2IE); - fprintf(out, "DecodeModeSense : MT to DT %d\n", + g_fprintf(out, _("DecodeModeSense : MT to DT %d\n"), pDeviceCapabilitiesPage->MT2DT); - fprintf(out, "DecodeModeSense : ST to MT %d\n", + g_fprintf(out, _("DecodeModeSense : ST to MT %d\n"), pDeviceCapabilitiesPage->ST2ST); - fprintf(out, "DecodeModeSense : ST to MT %d\n", + g_fprintf(out, _("DecodeModeSense : ST to MT %d\n"), pDeviceCapabilitiesPage->ST2ST); - fprintf(out, "DecodeModeSense : ST to DT %d\n", + g_fprintf(out, _("DecodeModeSense : ST to DT %d\n"), pDeviceCapabilitiesPage->ST2DT); - fprintf(out, "DecodeModeSense : IE to MT %d\n", + g_fprintf(out, _("DecodeModeSense : IE to MT %d\n"), pDeviceCapabilitiesPage->IE2MT); - fprintf(out, "DecodeModeSense : IE to ST %d\n", + g_fprintf(out, _("DecodeModeSense : IE to ST %d\n"), pDeviceCapabilitiesPage->IE2IE); - fprintf(out, "DecodeModeSense : IE to ST %d\n", + g_fprintf(out, _("DecodeModeSense : IE to ST %d\n"), pDeviceCapabilitiesPage->IE2DT); - fprintf(out, "DecodeModeSense : IE to ST %d\n", + g_fprintf(out, _("DecodeModeSense : IE to ST %d\n"), pDeviceCapabilitiesPage->IE2DT); - fprintf(out, "DecodeModeSense : DT to MT %d\n", + g_fprintf(out, _("DecodeModeSense : DT to MT %d\n"), pDeviceCapabilitiesPage->DT2MT); - fprintf(out, "DecodeModeSense : DT to ST %d\n", + g_fprintf(out, _("DecodeModeSense : DT to ST %d\n"), pDeviceCapabilitiesPage->DT2ST); - fprintf(out, "DecodeModeSense : DT to IE %d\n", + g_fprintf(out, _("DecodeModeSense : DT to IE %d\n"), pDeviceCapabilitiesPage->DT2IE); - fprintf(out, "DecodeModeSense : DT to DT %d\n", + g_fprintf(out, _("DecodeModeSense : DT to DT %d\n"), pDeviceCapabilitiesPage->DT2DT); } buffer++; @@ -1868,67 +1857,67 @@ DecodeSense( return(0); /*NOTREACHED*/ } - fprintf(out,"##### START DecodeSense\n"); - fprintf(out,"%sSense Keys\n", pstring); + g_fprintf(out,_("##### START DecodeSense\n")); + g_fprintf(out,_("%sSense Keys\n"), pstring); if (sense->ErrorCode == 0x70) { - fprintf(out,"\tExtended Sense \n"); + g_fprintf(out,_("\tExtended Sense \n")); } else { - fprintf(out,"\tErrorCode %02x\n", sense->ErrorCode); - fprintf(out,"\tValid %d\n", sense->Valid); + g_fprintf(out,_("\tErrorCode %02x\n"), sense->ErrorCode); + g_fprintf(out,_("\tValid %d\n"), sense->Valid); } - fprintf(out,"\tASC %02X\n", sense->AdditionalSenseCode); - fprintf(out,"\tASCQ %02X\n", sense->AdditionalSenseCodeQualifier); - fprintf(out,"\tSense key %02X\n", sense->SenseKey); + g_fprintf(out,_("\tASC %02X\n"), sense->AdditionalSenseCode); + g_fprintf(out,_("\tASCQ %02X\n"), sense->AdditionalSenseCodeQualifier); + g_fprintf(out,_("\tSense key %02X\n"), sense->SenseKey); switch (sense->SenseKey) { case 0: - fprintf(out,"\t\tNo Sense\n"); + g_fprintf(out,_("\t\tNo Sense\n")); break; case 1: - fprintf(out,"\t\tRecoverd Error\n"); + g_fprintf(out,_("\t\tRecoverd Error\n")); break; case 2: - fprintf(out,"\t\tNot Ready\n"); + g_fprintf(out,_("\t\tNot Ready\n")); break; case 3: - fprintf(out,"\t\tMedium Error\n"); + g_fprintf(out,_("\t\tMedium Error\n")); break; case 4: - fprintf(out,"\t\tHardware Error\n"); + g_fprintf(out,_("\t\tHardware Error\n")); break; case 5: - fprintf(out,"\t\tIllegal Request\n"); + g_fprintf(out,_("\t\tIllegal Request\n")); break; case 6: - fprintf(out,"\t\tUnit Attention\n"); + g_fprintf(out,_("\t\tUnit Attention\n")); break; case 7: - fprintf(out,"\t\tData Protect\n"); + g_fprintf(out,_("\t\tData Protect\n")); break; case 8: - fprintf(out,"\t\tBlank Check\n"); + g_fprintf(out,_("\t\tBlank Check\n")); break; case 9: - fprintf(out,"\t\tVendor uniq\n"); + g_fprintf(out,_("\t\tVendor uniq\n")); break; case 0xa: - fprintf(out,"\t\tCopy Aborted\n"); + g_fprintf(out,_("\t\tCopy Aborted\n")); break; case 0xb: - fprintf(out,"\t\tAborted Command\n"); + g_fprintf(out,_("\t\tAborted Command\n")); break; case 0xc: - fprintf(out,"\t\tEqual\n"); + g_fprintf(out,_("\t\tEqual\n")); break; case 0xd: - fprintf(out,"\t\tVolume Overflow\n"); + g_fprintf(out,_("\t\tVolume Overflow\n")); break; case 0xe: - fprintf(out,"\t\tMiscompare\n"); + g_fprintf(out,_("\t\tMiscompare\n")); break; case 0xf: - fprintf(out,"\t\tReserved\n"); + g_fprintf(out,_("\t\tReserved\n")); break; } return(0); @@ -1942,65 +1931,65 @@ DecodeExtSense( { ExtendedRequestSense_T *p; - fprintf(out,"##### START DecodeExtSense\n"); + g_fprintf(out,_("##### START DecodeExtSense\n")); p = sense; - fprintf(out,"%sExtended Sense\n", pstring); + g_fprintf(out,_("%sExtended Sense\n"), pstring); DecodeSense((RequestSense_T *)p, pstring, out); - fprintf(out,"\tLog Parameter Page Code %02X\n", sense->LogParameterPageCode); - fprintf(out,"\tLog Parameter Code %02X\n", sense->LogParameterCode); - fprintf(out,"\tUnderrun/Overrun Counter %02X\n", sense->UnderrunOverrunCounter); - fprintf(out,"\tRead/Write Error Counter %d\n", V3((char *)sense->ReadWriteDataErrorCounter)); + g_fprintf(out,_("\tLog Parameter Page Code %02X\n"), sense->LogParameterPageCode); + g_fprintf(out,_("\tLog Parameter Code %02X\n"), sense->LogParameterCode); + g_fprintf(out,_("\tUnderrun/Overrun Counter %02X\n"), sense->UnderrunOverrunCounter); + g_fprintf(out,_("\tRead/Write Error Counter %d\n"), V3((char *)sense->ReadWriteDataErrorCounter)); if (sense->AdditionalSenseLength > (u_char)sizeof(RequestSense_T)) { if (sense->PF) - fprintf(out,"\tPower Fail\n"); + g_fprintf(out,_("\tPower Fail\n")); if (sense->BPE) - fprintf(out,"\tSCSI Bus Parity Error\n"); + g_fprintf(out,_("\tSCSI Bus Parity Error\n")); if (sense->FPE) - fprintf(out,"\tFormatted Buffer parity Error\n"); + g_fprintf(out,_("\tFormatted Buffer parity Error\n")); if (sense->ME) - fprintf(out,"\tMedia Error\n"); + g_fprintf(out,_("\tMedia Error\n")); if (sense->ECO) - fprintf(out,"\tError Counter Overflow\n"); + g_fprintf(out,_("\tError Counter Overflow\n")); if (sense->TME) - fprintf(out,"\tTapeMotion Error\n"); + g_fprintf(out,_("\tTapeMotion Error\n")); if (sense->TNP) - fprintf(out,"\tTape Not Present\n"); + g_fprintf(out,_("\tTape Not Present\n")); if (sense->LBOT) - fprintf(out,"\tLogical Beginning of tape\n"); + g_fprintf(out,_("\tLogical Beginning of tape\n")); if (sense->TMD) - fprintf(out,"\tTape Mark Detect Error\n"); + g_fprintf(out,_("\tTape Mark Detect Error\n")); if (sense->WP) - fprintf(out,"\tWrite Protect\n"); + g_fprintf(out,_("\tWrite Protect\n")); if (sense->FMKE) - fprintf(out,"\tFilemark Error\n"); + g_fprintf(out,_("\tFilemark Error\n")); if (sense->URE) - fprintf(out,"\tUnder Run Error\n"); + g_fprintf(out,_("\tUnder Run Error\n")); if (sense->WEI) - fprintf(out,"\tWrite Error 1\n"); + g_fprintf(out,_("\tWrite Error 1\n")); if (sense->SSE) - fprintf(out,"\tServo System Error\n"); + g_fprintf(out,_("\tServo System Error\n")); if (sense->FE) - fprintf(out,"\tFormatter Error\n"); + g_fprintf(out,_("\tFormatter Error\n")); if (sense->UCLN) - fprintf(out,"\tCleaning Cartridge is empty\n"); + g_fprintf(out,_("\tCleaning Cartridge is empty\n")); if (sense->RRR) - fprintf(out,"\tReverse Retries Required\n"); + g_fprintf(out,_("\tReverse Retries Required\n")); if (sense->CLND) - fprintf(out,"\tTape Drive has been cleaned\n"); + g_fprintf(out,_("\tTape Drive has been cleaned\n")); if (sense->CLN) - fprintf(out,"\tTape Drive needs to be cleaned\n"); + g_fprintf(out,_("\tTape Drive needs to be cleaned\n")); if (sense->PEOT) - fprintf(out,"\tPhysical End of Tape\n"); + g_fprintf(out,_("\tPhysical End of Tape\n")); if (sense->WSEB) - fprintf(out,"\tWrite Splice Error\n"); + g_fprintf(out,_("\tWrite Splice Error\n")); if (sense->WSEO) - fprintf(out,"\tWrite Splice Error\n"); - fprintf(out,"\tRemaing 1024 byte tape blocks %d\n", V3((char *)sense->RemainingTape)); - fprintf(out,"\tTracking Retry Counter %02X\n", sense->TrackingRetryCounter); - fprintf(out,"\tRead/Write Retry Counter %02X\n", sense->ReadWriteRetryCounter); - fprintf(out,"\tFault Sympton Code %02X\n", sense->FaultSymptomCode); + g_fprintf(out,_("\tWrite Splice Error\n")); + g_fprintf(out,_("\tRemaing 1024 byte tape blocks %d\n"), V3((char *)sense->RemainingTape)); + g_fprintf(out,_("\tTracking Retry Counter %02X\n"), sense->TrackingRetryCounter); + g_fprintf(out,_("\tRead/Write Retry Counter %02X\n"), sense->ReadWriteRetryCounter); + g_fprintf(out,_("\tFault Sympton Code %02X\n"), sense->FaultSymptomCode); } return(0); } @@ -2009,19 +1998,19 @@ int PrintInquiry( SCSIInquiry_T * SCSIInquiry) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START PrintInquiry\n"); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %x\n", "qualifier", SCSIInquiry->qualifier); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %x\n", "type", SCSIInquiry->type); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %x\n", "data_format", SCSIInquiry->data_format); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %X\n", "ansi_version", SCSIInquiry->ansi_version); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %X\n", "ecma_version", SCSIInquiry->ecma_version); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %X\n", "iso_version", SCSIInquiry->iso_version); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %X\n", "type_modifier", SCSIInquiry->type_modifier); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %x\n", "removable", SCSIInquiry->removable); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %.8s\n", "vendor_info", SCSIInquiry->vendor_info); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %.16s\n", "prod_ident", SCSIInquiry->prod_ident); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %.4s\n", "prod_version", SCSIInquiry->prod_version); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"%-15s %.19s\n", "vendor_specific", SCSIInquiry->vendor_specific); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START PrintInquiry\n")); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %x\n"), "qualifier", SCSIInquiry->qualifier); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %x\n"), "type", SCSIInquiry->type); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %x\n"), "data_format", SCSIInquiry->data_format); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %X\n"), "ansi_version", SCSIInquiry->ansi_version); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %X\n"), "ecma_version", SCSIInquiry->ecma_version); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %X\n"), "iso_version", SCSIInquiry->iso_version); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %X\n"), "type_modifier", SCSIInquiry->type_modifier); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %x\n"), "removable", SCSIInquiry->removable); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %.8s\n"), "vendor_info", SCSIInquiry->vendor_info); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %.16s\n"), "prod_ident", SCSIInquiry->prod_ident); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %.4s\n"), "prod_version", SCSIInquiry->prod_version); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("%-15s %.19s\n"), "vendor_specific", SCSIInquiry->vendor_specific); return(0); } @@ -2029,7 +2018,7 @@ PrintInquiry( int DoNothing0(void) { - dbprintf(("##### START DoNothing\n")); + dbprintf(_("##### START DoNothing\n")); return(0); } @@ -2039,7 +2028,7 @@ DoNothing1( { (void)unused1; /* Quiet unused parameter warning */ - dbprintf(("##### START DoNothing\n")); + dbprintf(_("##### START DoNothing\n")); return(0); } @@ -2051,7 +2040,7 @@ DoNothing2( (void)unused1; /* Quiet unused parameter warning */ (void)unused2; /* Quiet unused parameter warning */ - dbprintf(("##### START DoNothing\n")); + dbprintf(_("##### START DoNothing\n")); return(0); } @@ -2065,21 +2054,21 @@ DoNothing3( (void)unused2; /* Quiet unused parameter warning */ (void)unused3; /* Quiet unused parameter warning */ - dbprintf(("##### START DoNothing\n")); + dbprintf(_("##### START DoNothing\n")); return(0); } int GenericFree(void) { - dbprintf(("##### START GenericFree\n")); + dbprintf(_("##### START GenericFree\n")); return(0); } int GenericSearch(void) { - dbprintf(("##### START GenericSearch\n")); + dbprintf(_("##### START GenericSearch\n")); return(0); } @@ -2091,7 +2080,7 @@ TreeFrogBarCode( ModePageTreeFrogVendorUnique_T *pVendor; - dbprintf(("##### START TreeFrogBarCode\n")); + dbprintf(_("##### START TreeFrogBarCode\n")); if (pModePage == NULL) { pModePage = alloc(0xff); @@ -2099,18 +2088,18 @@ TreeFrogBarCode( if (SCSI_ModeSense(DeviceFD, pModePage, 0xff, 0x0, 0x3f) == 0) { - DecodeModeSense(pModePage, 0, "TreeFrogBarCode :", 0, debug_file); + DecodeModeSense(pModePage, 0, _("TreeFrogBarCode :"), 0, debug_file); if (pVendorUnique == NULL) { - dbprintf(("TreeFrogBarCode : no pVendorUnique\n")); + dbprintf(_("TreeFrogBarCode : no pVendorUnique\n")); return(0); /*NOTREACHED*/ } pVendor = ( ModePageTreeFrogVendorUnique_T *)pVendorUnique; - dbprintf(("TreeFrogBarCode : EBARCO %d\n", pVendor->EBARCO)); - dbprintf(("TreeFrogCheckSum : CHKSUM %d\n", pVendor->CHKSUM)); + dbprintf(_("TreeFrogBarCode : EBARCO %d\n"), pVendor->EBARCO); + dbprintf(_("TreeFrogCheckSum : CHKSUM %d\n"), pVendor->CHKSUM); dump_hex((u_char *)pDev[INDEX_CHANGER].inquiry, INQUIRY_SIZE, DEBUG_INFO, SECTION_ELEMENT); return(pVendor->EBARCO); @@ -2128,14 +2117,14 @@ EXB_BarCode( ModePageEXB120VendorUnique_T *pVendor; ModePageEXB120VendorUnique_T *pVendorWork; - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### START EXB_BarCode\n"); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("##### START EXB_BarCode\n")); if (pModePage == NULL && LibModeSenseValid == 0) { pModePage = alloc(0xff); if (SCSI_ModeSense(DeviceFD, pModePage, 0xff, 0x8, 0x3f) == 0) { - DecodeModeSense(pModePage, 0, "EXB_BarCode :", 0, debug_file); + DecodeModeSense(pModePage, 0, _("EXB_BarCode :"), 0, debug_file); LibModeSenseValid = 1; } else { LibModeSenseValid = -1; @@ -2146,25 +2135,25 @@ EXB_BarCode( { if (pVendorUnique == NULL) { - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"EXB_BarCode : no pVendorUnique\n"); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("EXB_BarCode : no pVendorUnique\n")); return(0); /*NOTREACHED*/ } pVendor = ( ModePageEXB120VendorUnique_T *)pVendorUnique; - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"EXB_BarCode : NBL %d\n", pVendor->NBL); - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"EXB_BarCode : PS %d\n", pVendor->PS); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("EXB_BarCode : NBL %d\n"), pVendor->NBL); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("EXB_BarCode : PS %d\n"), pVendor->PS); if (pVendor->NBL == 1 && pVendor->PS == 1 ) { pVendorWork = alloc((size_t)pVendor->ParameterListLength + 2); - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"EXB_BarCode : setting NBL to 1\n"); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("EXB_BarCode : setting NBL to 1\n")); memcpy(pVendorWork, pVendor, (size_t)pVendor->ParameterListLength + 2); pVendorWork->NBL = 0; pVendorWork->PS = 0; pVendorWork->RSVD0 = 0; if (SCSI_ModeSelect(DeviceFD, (u_char *)pVendorWork, (u_char)(pVendorWork->ParameterListLength + 2), 0, 1, 0) == 0) { - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"EXB_BarCode : SCSI_ModeSelect OK\n"); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("EXB_BarCode : SCSI_ModeSelect OK\n")); /* Hack !!!!!! */ pVendor->NBL = 0; @@ -2173,12 +2162,12 @@ EXB_BarCode( */ GenericResetStatus(DeviceFD); } else { - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"EXB_BarCode : SCSI_ModeSelect failed\n"); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("EXB_BarCode : SCSI_ModeSelect failed\n")); } amfree(pVendorWork); } dump_hex((u_char *)pDev[INDEX_CHANGER].inquiry, INQUIRY_SIZE, DEBUG_INFO, SECTION_BARCODE); - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"EXB_BarCode : vendor_specific[19] %x\n", + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("EXB_BarCode : vendor_specific[19] %x\n"), pDev[INDEX_CHANGER].inquiry->vendor_specific[19]); } return(1); @@ -2190,8 +2179,8 @@ NoBarCode( { (void)DeviceFD; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### START NoBarCode\n"); - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### STOP NoBarCode\n"); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("##### START NoBarCode\n")); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("##### STOP NoBarCode\n")); return(0); } @@ -2201,14 +2190,14 @@ GenericBarCode( { (void)DeviceFD; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### START GenericBarCode\n"); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("##### START GenericBarCode\n")); if ( changer->havebarcode >= 1) { - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### STOP GenericBarCode (havebarcode) => %d\n",changer->havebarcode); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("##### STOP GenericBarCode (havebarcode) => %d\n"),changer->havebarcode); return(1); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_BARCODE,"##### STOP GenericBarCode => 0\n"); + DebugPrint(DEBUG_INFO, SECTION_BARCODE,_("##### STOP GenericBarCode => 0\n")); return(0); } @@ -2223,16 +2212,16 @@ SenseHandler( { extern OpenFiles_T *pDev; int ret = 0; - dbprintf(("##### START SenseHandler\n")); + dbprintf(_("##### START SenseHandler\n")); if (pDev[DeviceFD].inqdone == 1) { - dbprintf(("Ident = [%s], function = [%s]\n", pDev[DeviceFD].ident, - pDev[DeviceFD].functions->ident)); + dbprintf(_("Ident = [%s], function = [%s]\n"), pDev[DeviceFD].ident, + pDev[DeviceFD].functions->ident); ret = pDev[DeviceFD].functions->function_error(DeviceFD, flag, SenseKey, AdditionalSenseCode, AdditionalSenseCodeQualifier, buffer); } else { - dbprintf((" Ups no sense\n")); + dbprintf(_(" Ups no sense\n")); } - dbprintf(("#### STOP SenseHandler\n")); + dbprintf(_("#### STOP SenseHandler\n")); return(ret); } @@ -2256,7 +2245,7 @@ TapeStatus(void) int cnt; RequestSense_T *pRequestSense; - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### START TapeStatus\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### START TapeStatus\n")); /* * If it is an device which understand SCSI commands the @@ -2271,7 +2260,7 @@ TapeStatus(void) for (done = 0, cnt = 0; !done && (cnt < 60); cnt++) { ret = SCSI_TestUnitReady(INDEX_TAPECTL, pRequestSense); - DebugPrint(DEBUG_INFO, SECTION_SCSI, "TapeStatus TestUnitReady ret %d\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("TapeStatus TestUnitReady ret %d\n"),ret); switch (ret) { case SCSI_OK: @@ -2280,49 +2269,49 @@ TapeStatus(void) { case SENSE_IGNORE: case SENSE_NO: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeStatus (TestUnitReady) SENSE_NO\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeStatus (TestUnitReady) SENSE_NO\n")); pDTE[0].status = 'F'; - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### FULL\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### FULL\n")); done = 1; break; case SENSE_TAPE_NOT_ONLINE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeStatus (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeStatus (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n")); pDTE[0].status = 'E'; - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### EMPTY\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### EMPTY\n")); done = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"TapeStatus (TestUnitReady) SENSE_ABORT\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("TapeStatus (TestUnitReady) SENSE_ABORT\n")); done = 1; break; case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeStatus (TestUnitReady) SENSE_RETRY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeStatus (TestUnitReady) SENSE_RETRY\n")); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeStatus (TestUnitReady) default (SENSE)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeStatus (TestUnitReady) default (SENSE)\n")); break; } break; case SCSI_ERROR: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"TapeStatus (TestUnitReady) SCSI_ERROR\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("TapeStatus (TestUnitReady) SCSI_ERROR\n")); done = 1; break; case SCSI_BUSY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeStatus (TestUnitReady) SCSI_BUSY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeStatus (TestUnitReady) SCSI_BUSY\n")); break; case SCSI_CHECK: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"TapeStatus (TestUnitReady) SCSI_CHECK\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("TapeStatus (TestUnitReady) SCSI_CHECK\n")); break; default: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"TapeStatus (TestUnitReady) unknown (%d)\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("TapeStatus (TestUnitReady) unknown (%d)\n"),ret); break; } @@ -2335,12 +2324,12 @@ TapeStatus(void) if ( ret & TAPE_ONLINE) { pDTE[0].status ='F'; - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### FULL\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### FULL\n")); } else { pDTE[0].status = 'E'; - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### EMPTY\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### EMPTY\n")); } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP TapeStatus\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP TapeStatus\n")); } return(0); } @@ -2360,14 +2349,14 @@ DLT4000Eject( (void)Device; /* Quiet unused parameter warning */ - dbprintf(("##### START DLT4000Eject\n")); + dbprintf(_("##### START DLT4000Eject\n")); pRequestSense = alloc(SIZEOF(RequestSense_T)); pExtendedRequestSense = alloc(SIZEOF(ExtendedRequestSense_T)); if ( type > 1) { - dbprintf(("DLT4000Eject : use mtio ioctl for eject on %s\n", pDev[INDEX_TAPE].dev)); + dbprintf(_("DLT4000Eject : use mtio ioctl for eject on %s\n"), pDev[INDEX_TAPE].dev); free(pExtendedRequestSense); free(pRequestSense); return(Tape_Ioctl(INDEX_TAPE, IOCTL_EJECT)); @@ -2378,7 +2367,7 @@ DLT4000Eject( if (pDev[INDEX_TAPECTL].SCSI == 0) { - dbprintf(("DLT4000Eject : Device %s not able to receive SCSI commands\n", pDev[INDEX_TAPE].dev)); + dbprintf(_("DLT4000Eject : Device %s not able to receive SCSI commands\n"), pDev[INDEX_TAPE].dev); free(pExtendedRequestSense); free(pRequestSense); return(Tape_Ioctl(INDEX_TAPE, IOCTL_EJECT)); @@ -2386,17 +2375,17 @@ DLT4000Eject( } - dbprintf(("DLT4000Eject : SCSI eject on %s = %s\n", pDev[INDEX_TAPECTL].dev, pDev[INDEX_TAPECTL].ConfigName)); + dbprintf(_("DLT4000Eject : SCSI eject on %s = %s\n"), pDev[INDEX_TAPECTL].dev, pDev[INDEX_TAPECTL].ConfigName); RequestSense(INDEX_TAPECTL, pExtendedRequestSense, 0); - DecodeExtSense(pExtendedRequestSense, "DLT4000Eject : ", debug_file); + DecodeExtSense(pExtendedRequestSense, _("DLT4000Eject : "), debug_file); /* Unload the tape, 0 == wait for success * 0 == unload */ ret = SCSI_LoadUnload(INDEX_TAPECTL, pRequestSense, 0, 0); RequestSense(INDEX_TAPECTL, pExtendedRequestSense, 0); - DecodeExtSense(pExtendedRequestSense, "DLT4000Eject : ", debug_file); + DecodeExtSense(pExtendedRequestSense, _("DLT4000Eject : "), debug_file); /* < 0 == fatal */ if (ret >= 0) { @@ -2410,7 +2399,7 @@ DLT4000Eject( while (!done && cnt < 300) { ret = SCSI_TestUnitReady(INDEX_TAPECTL, pRequestSense); - DebugPrint(DEBUG_INFO, SECTION_SCSI, "DLT4000Eject TestUnitReady ret %d\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("DLT4000Eject TestUnitReady ret %d\n"),ret); switch (ret) { case SCSI_OK: @@ -2420,46 +2409,46 @@ DLT4000Eject( switch (SenseHandler(INDEX_TAPECTL, 0, pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_NO: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"DLT4000Eject (TestUnitReady) SENSE_NO\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) SENSE_NO\n")); done = 1; break; case SENSE_TAPE_NOT_ONLINE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"DLT4000Eject (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n")); done = 1; break; case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"DLT4000Eject (TestUnitReady) SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) SENSE_IGNORE\n")); done = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"DLT4000Eject (TestUnitReady) SENSE_ABORT\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) SENSE_ABORT\n")); free(pExtendedRequestSense); free(pRequestSense); return(-1); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"DLT4000Eject (TestUnitReady) SENSE_RETRY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) SENSE_RETRY\n")); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"DLT4000Eject (TestUnitReady) default (SENSE)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) default (SENSE)\n")); done = 1; break; } break; case SCSI_ERROR: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"DLT4000Eject (TestUnitReady) SCSI_ERROR\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) SCSI_ERROR\n")); free(pExtendedRequestSense); free(pRequestSense); return(-1); /*NOTREACHED*/ case SCSI_BUSY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"DLT4000Eject (TestUnitReady) SCSI_BUSY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) SCSI_BUSY\n")); break; case SCSI_CHECK: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"DLT4000Eject (TestUnitReady) SCSI_CHECK\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) SCSI_CHECK\n")); break; default: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"DLT4000Eject (TestUnitReady) unknown (%d)\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("DLT4000Eject (TestUnitReady) unknown (%d)\n"),ret); break; } @@ -2467,7 +2456,7 @@ DLT4000Eject( sleep(2); } - dbprintf(("DLT4000Eject : Ready after %d sec, done = %d\n", cnt * 2, done)); + dbprintf(_("DLT4000Eject : Ready after %d sec, done = %d\n"), cnt * 2, done); free(pExtendedRequestSense); free(pRequestSense); @@ -2497,11 +2486,11 @@ GenericEject( (void)Device; /* Quiet unused parameter warning */ (void)type; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO, SECTION_TAPE, "##### START GenericEject\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE, _("##### START GenericEject\n")); pRequestSense = alloc(SIZEOF(RequestSense_T)); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"GenericEject : SCSI eject on %s = %s\n", + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("GenericEject : SCSI eject on %s = %s\n"), pDev[INDEX_TAPECTL].dev, pDev[INDEX_TAPECTL].ConfigName); /* @@ -2528,7 +2517,7 @@ GenericEject( while (!done && cnt < 300) { ret = SCSI_TestUnitReady(INDEX_TAPECTL, pRequestSense); - DebugPrint(DEBUG_INFO, SECTION_SCSI, "GenericEject TestUnitReady ret %d\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("GenericEject TestUnitReady ret %d\n"),ret); switch (ret) { case SCSI_OK: @@ -2536,52 +2525,52 @@ GenericEject( switch (SenseHandler(INDEX_TAPECTL, 0, pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_NO: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericEject (TestUnitReady) SENSE_NO\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericEject (TestUnitReady) SENSE_NO\n")); break; case SENSE_TAPE_NOT_ONLINE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericEject (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericEject (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n")); done = 1; break; case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericEject (TestUnitReady) SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericEject (TestUnitReady) SENSE_IGNORE\n")); break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"GenericEject (TestUnitReady) SENSE_ABORT\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("GenericEject (TestUnitReady) SENSE_ABORT\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericEject (TestUnitReady) SENSE_RETRY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericEject (TestUnitReady) SENSE_RETRY\n")); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericEject (TestUnitReady) default (SENSE)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericEject (TestUnitReady) default (SENSE)\n")); break; } break; case SCSI_ERROR: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"GenericEject (TestUnitReady) SCSI_ERROR\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("GenericEject (TestUnitReady) SCSI_ERROR\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ case SCSI_BUSY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericEject (TestUnitReady) SCSI_BUSY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericEject (TestUnitReady) SCSI_BUSY\n")); break; case SCSI_CHECK: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericEject (TestUnitReady) SCSI_CHECK\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericEject (TestUnitReady) SCSI_CHECK\n")); break; default: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"GenericEject (TestUnitReady) unknown (%d)\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("GenericEject (TestUnitReady) unknown (%d)\n"),ret); break; } cnt++; sleep(2); } } else { - DebugPrint(DEBUG_INFO, SECTION_TAPE,"GenericEject : Device can't understand SCSI try ioctl\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("GenericEject : Device can't understand SCSI try ioctl\n")); Tape_Ioctl(INDEX_TAPECTL, IOCTL_EJECT); } DebugPrint(DEBUG_INFO, SECTION_TAPE, - "GenericEject : Ready after %d sec\n", cnt * 2); + _("GenericEject : Ready after %d sec\n"), cnt * 2); free(pRequestSense); return(0); } @@ -2608,7 +2597,7 @@ GenericRewind( int cnt = 0; int done; - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### START GenericRewind pDEV -> %d\n",DeviceFD); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### START GenericRewind pDEV -> %d\n"),DeviceFD); /* @@ -2627,7 +2616,7 @@ GenericRewind( while (!done) { ret = SCSI_TestUnitReady(DeviceFD, (RequestSense_T *)pRequestSense ); - DebugPrint(DEBUG_INFO, SECTION_TAPE, "GenericRewind (TestUnitReady) ret %d\n",ret); + DebugPrint(DEBUG_INFO, SECTION_TAPE, _("GenericRewind (TestUnitReady) ret %d\n"),ret); switch (ret) { case SCSI_OK: @@ -2637,55 +2626,55 @@ GenericRewind( switch (SenseHandler(DeviceFD, 0, pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_NO: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_NO\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_NO\n")); done = 1; break; case SENSE_TAPE_NOT_ONLINE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_IGNORE\n")); done = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_ABORT\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_ABORT\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_RETRY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_RETRY\n")); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) default (SENSE)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) default (SENSE)\n")); done = 1; break; } /* switch (SenseHandler(DeviceFD, 0, pRequestSense->SenseKey.... */ break; case SCSI_ERROR: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"GenericRewind (TestUnitReady) SCSI_ERROR\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("GenericRewind (TestUnitReady) SCSI_ERROR\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ case SCSI_BUSY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SCSI_BUSY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SCSI_BUSY\n")); break; case SCSI_CHECK: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SCSI_CHECK\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SCSI_CHECK\n")); break; default: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"GenericRewind (TestUnitReady) unknown (%d)\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("GenericRewind (TestUnitReady) unknown (%d)\n"),ret); break; } sleep(1); - DebugPrint(DEBUG_INFO, SECTION_TAPE," Wait .... (%d)\n",cnt); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_(" Wait .... (%d)\n"),cnt); if (cnt > 180) { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"##### STOP GenericRewind (-1)\n"); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("##### STOP GenericRewind (-1)\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ @@ -2709,7 +2698,7 @@ GenericRewind( pRequestSense, SIZEOF(RequestSense_T)); - DecodeSense(pRequestSense, "GenericRewind : ", debug_file); + DecodeSense(pRequestSense, _("GenericRewind : "), debug_file); if (ret > 0) { @@ -2724,7 +2713,7 @@ GenericRewind( } if (ret < 0) { - DebugPrint(DEBUG_INFO, SECTION_TAPE,"GenericRewind : failed %d\n", ret); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("GenericRewind : failed %d\n"), ret); done = 1; } } @@ -2733,7 +2722,7 @@ GenericRewind( while (!done && (cnt < 300)) { ret = SCSI_TestUnitReady(DeviceFD, pRequestSense); - DebugPrint(DEBUG_INFO, SECTION_SCSI, "GenericRewind TestUnitReady ret %d\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("GenericRewind TestUnitReady ret %d\n"),ret); switch (ret) { case SCSI_OK: @@ -2743,45 +2732,45 @@ GenericRewind( switch (SenseHandler(DeviceFD, 0, pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_NO: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_NO\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_NO\n")); done = 1; break; case SENSE_TAPE_NOT_ONLINE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_IGNORE\n")); done = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_ABORT\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_ABORT\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SENSE_RETRY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SENSE_RETRY\n")); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) default (SENSE)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) default (SENSE)\n")); done = 1; break; } break; case SCSI_ERROR: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"GenericRewind (TestUnitReady) SCSI_ERROR\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("GenericRewind (TestUnitReady) SCSI_ERROR\n")); return(-1); /*NOTREACHED*/ case SCSI_BUSY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SCSI_BUSY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SCSI_BUSY\n")); break; case SCSI_CHECK: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"GenericRewind (TestUnitReady) SCSI_CHECK\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("GenericRewind (TestUnitReady) SCSI_CHECK\n")); break; default: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"GenericRewind (TestUnitReady) unknown (%d)\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("GenericRewind (TestUnitReady) unknown (%d)\n"),ret); break; } @@ -2791,26 +2780,26 @@ GenericRewind( amfree(pRequestSense); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"GenericRewind : Ready after %d sec, " - "done = %d\n", cnt * 2, done); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP GenericRewind (0)\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("GenericRewind : Ready after %d sec, " + "done = %d\n"), cnt * 2, done); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP GenericRewind (0)\n")); } else { - DebugPrint(DEBUG_INFO, SECTION_TAPE,"GenericRewind : use ioctl rewind\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("GenericRewind : use ioctl rewind\n")); if (pDev[DeviceFD].devopen == 1) { - DebugPrint(DEBUG_INFO, SECTION_TAPE,"Close Device\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("Close Device\n")); SCSI_CloseDevice(DeviceFD); } /* We don't retry if it fails; that is left to the vtape driver. */ if ((errstr = tape_rewind(pDev[DeviceFD].dev)) == NULL) { - DebugPrint(DEBUG_INFO, SECTION_TAPE,"Rewind OK,\n", cnt); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("Rewind OK,\n"), cnt); } else { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"Rewind failed %s\n",errstr); - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP GenericRewind (-1)\n"); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("Rewind failed %s\n"),errstr); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP GenericRewind (-1)\n")); return(-1); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP GenericRewind (0)\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP GenericRewind (0)\n")); } return(0); @@ -2832,11 +2821,11 @@ GenericClean( (void)Device; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### START GenericClean\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### START GenericClean\n")); if (pDev[INDEX_TAPECTL].SCSI == 0) { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"GenericClean : can't send SCSI commands\n"); - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"##### STOP GenericClean\n"); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("GenericClean : can't send SCSI commands\n")); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("##### STOP GenericClean\n")); return(0); /*NOTREACHED*/ } @@ -2847,16 +2836,16 @@ GenericClean( if ( RequestSense(INDEX_TAPECTL, &ExtRequestSense, 1) == 0) { - DecodeExtSense(&ExtRequestSense, "GenericClean : ", debug_file); + DecodeExtSense(&ExtRequestSense, _("GenericClean : "), debug_file); if(ExtRequestSense.CLN) { ret = 1; } else { ret = 0; } } else { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"Got error from RequestSense\n"); + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("Got error from RequestSense\n")); } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP GenericClean (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP GenericClean (%d)\n"),ret); return(ret); } @@ -2937,7 +2926,7 @@ GenericResetStatus( int ret = 0; int retry = 1; - DebugPrint(DEBUG_INFO, SECTION_ELEMENT, "##### START GenericResetStatus\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT, _("##### START GenericResetStatus\n")); pRequestSense = alloc(SIZEOF(RequestSense_T)); @@ -2958,11 +2947,11 @@ GenericResetStatus( if (ret < 0) { - /* fprintf(stderr, "%s: Request Sense[Inquiry]: %02X", */ + /* g_fprintf(stderr, _("%s: Request Sense[Inquiry]: %02X"), */ /* "chs", ((u_char *) &pRequestSense)[0]); */ /* for (i = 1; i < SIZEOF(RequestSense_T); i++) */ - /* fprintf(stderr, " %02X", ((u_char *) &pRequestSense)[i]); */ - /* fprintf(stderr, "\n"); */ + /* g_fprintf(stderr, " %02X", ((u_char *) &pRequestSense)[i]); */ + /* g_fprintf(stderr, "\n"); */ free(pRequestSense); return(ret); /*NOTREACHED*/ @@ -2983,17 +2972,17 @@ GenericResetStatus( retry++; if (retry < MAX_RETRIES ) { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT, "GenericResetStatus : retry %d\n", retry); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT, _("GenericResetStatus : retry %d\n"), retry); sleep(2); } else { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "GenericResetStatus : return (-1)\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("GenericResetStatus : return (-1)\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ } break; default: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "GenericResetStatus : (default) return (-1)\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("GenericResetStatus : (default) return (-1)\n")); free(pRequestSense); return(-1); /*NOTREACHED*/ @@ -3002,7 +2991,7 @@ GenericResetStatus( if (ret == 0) retry = 0; } - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "##### STOP GenericResetStatus (%d)\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("##### STOP GenericResetStatus (%d)\n"),ret); free(pRequestSense); return(ret); } @@ -3034,9 +3023,9 @@ GenericSenseHandler( int ret; char *info = NULL; - dbprintf(("##### START GenericSenseHandler\n")); + dbprintf(_("##### START GenericSenseHandler\n")); - DecodeSense(pRequestSense, "GenericSenseHandler : ", debug_file); + DecodeSense(pRequestSense, _("GenericSenseHandler : "), debug_file); ret = Sense2Action(pDev[ip].ident, pDev[ip].inquiry->type, @@ -3045,7 +3034,7 @@ GenericSenseHandler( AdditionalSenseCodeQualifier, &info); - dbprintf(("##### STOP GenericSenseHandler\n")); + dbprintf(_("##### STOP GenericSenseHandler: %s\n"), _(info)); return(ret); } @@ -3077,31 +3066,31 @@ SDXMove( int SDX_STE = -1; /* to */ int SDX_DTE = -1; /* AlignElements */ - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### START SDXMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### START SDXMove\n")); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"%-20s : from = %d, to = %d\n", "SDXMove", from, to); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("%-20s : from = %d, to = %d\n"), "SDXMove", from, to); if ((pfrom = LookupElement(from)) == NULL) { - DebugPrint(DEBUG_INFO, SECTION_MOVE,"SDXMove : ElementInfo for %d not found\n", from); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP SDXMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("SDXMove : ElementInfo for %d not found\n"), from); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP SDXMove\n")); return(-1); /*NOTREACHED*/ } if ((pto = LookupElement(to)) == NULL) { - DebugPrint(DEBUG_INFO, SECTION_MOVE,"SDXMove : ElementInfo for %d not found\n", to); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP SDXMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("SDXMove : ElementInfo for %d not found\n"), to); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP SDXMove\n")); return(-1); /*NOTREACHED*/ } if (pfrom->status == 'E') { - DebugPrint(DEBUG_INFO, SECTION_MOVE,"SDXMove : from %d is empty\n", from); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP SDXMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("SDXMove : from %d is empty\n"), from); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP SDXMove\n")); return(-1); /*NOTREACHED*/ } @@ -3113,20 +3102,20 @@ SDXMove( case CHANGER: break; case STORAGE: - DebugPrint(DEBUG_INFO, SECTION_MOVE,"SDXMove : Destination Element %d Type %d is full\n", + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("SDXMove : Destination Element %d Type %d is full\n"), pto->address, pto->type); to = find_empty(DeviceFD, 0, 0); if (to == -1 ) { - DebugPrint(DEBUG_ERROR, SECTION_MOVE,"SDXMove : no empty slot found for unload\n"); + DebugPrint(DEBUG_ERROR, SECTION_MOVE,_("SDXMove : no empty slot found for unload\n")); return(-1); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_MOVE,"SDXMove : Unload to %d\n", to); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("SDXMove : Unload to %d\n"), to); if ((pto = LookupElement(to)) == NULL) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "SDXMove : ElementInfo for %d not found\n", to); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP SDXMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("SDXMove : ElementInfo for %d not found\n"), to); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP SDXMove\n")); return(-1); /*NOTREACHED*/ } @@ -3169,16 +3158,16 @@ SDXMove( if (SDX_DTE >= 0 && SDX_STE >= 0) { ret = SCSI_AlignElements(DeviceFD, SDX_MTE, SDX_DTE, SDX_STE); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### SCSI_AlignElemnts ret = %d\n",ret); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### SCSI_AlignElemnts ret = %d\n"),ret); if (ret != 0 ) { - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP SDXMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP SDXMove\n")); return(-1); /*NOTREACHED*/ } } else { - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### Error setting STE/DTE %d/%d\n", SDX_STE, SDX_DTE); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP SDXMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### Error setting STE/DTE %d/%d\n"), SDX_STE, SDX_DTE); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP SDXMove\n")); return(-1); /*NOTREACHED*/ } @@ -3205,11 +3194,11 @@ SDXMove( { ret = SCSI_Move(DeviceFD, 0, from, to); } else { - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP SDXMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP SDXMove\n")); return(ret); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP SDXMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP SDXMove\n")); return(ret); } @@ -3233,51 +3222,51 @@ GenericMove( ElementInfo_T *pto; int ret = 0; - DebugPrint(DEBUG_INFO, SECTION_MOVE, "##### START GenericMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("##### START GenericMove\n")); - DebugPrint(DEBUG_INFO, SECTION_MOVE, "%-20s : from = %d, to = %d\n", "GenericMove", from, to); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("%-20s : from = %d, to = %d\n"), "GenericMove", from, to); if ((pfrom = LookupElement(from)) == NULL) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "GenericMove : ElementInfo for %d not found\n", from); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP GenericMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("GenericMove : ElementInfo for %d not found\n"), from); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP GenericMove\n")); return(-1); /*NOTREACHED*/ } if ((pto = LookupElement(to)) == NULL) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "GenericMove : ElementInfo for %d not found\n", to); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP GenericMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("GenericMove : ElementInfo for %d not found\n"), to); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP GenericMove\n")); return(-1); /*NOTREACHED*/ } if (pfrom->status == 'E') { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "GenericMove : from %d is empty\n", from); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP GenericMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("GenericMove : from %d is empty\n"), from); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP GenericMove\n")); return(-1); /*NOTREACHED*/ } if (pto->status == 'F') { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "GenericMove : Destination Element %d Type %d is full\n", + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("GenericMove : Destination Element %d Type %d is full\n"), pto->address, pto->type); to = find_empty(DeviceFD, 0, 0); if ( to == -1) { - DebugPrint(DEBUG_ERROR, SECTION_MOVE, "GenericMove : no empty slot found\n"); + DebugPrint(DEBUG_ERROR, SECTION_MOVE, _("GenericMove : no empty slot found\n")); return(-1); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_MOVE, "GenericMove : Unload to %d\n", to); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("GenericMove : Unload to %d\n"), to); if ((pto = LookupElement(to)) == NULL) { - DebugPrint(DEBUG_ERROR, SECTION_MOVE, " Ups should not happen\n"); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP GenericMove\n"); + DebugPrint(DEBUG_ERROR, SECTION_MOVE, _(" Ups should not happen\n")); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP GenericMove\n")); return(-1); /*NOTREACHED*/ } @@ -3288,8 +3277,8 @@ GenericMove( ret = SCSI_Move(DeviceFD, 0, from, to); } - DebugPrint(DEBUG_INFO, SECTION_MOVE, "GenericMove : SCSI_Move return (%d)\n", ret); - DebugPrint(DEBUG_INFO, SECTION_MOVE,"##### STOP GenericMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("GenericMove : SCSI_Move return (%d)\n"), ret); + DebugPrint(DEBUG_INFO, SECTION_MOVE,_("##### STOP GenericMove\n")); return(ret); } @@ -3308,41 +3297,41 @@ CheckMove( { int moveok = 0; - DebugPrint(DEBUG_INFO, SECTION_MOVE, "##### START CheckMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("##### START CheckMove\n")); if (pDeviceCapabilitiesPage != NULL ) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "CheckMove : checking if move from %d to %d is legal\n", from->address, to->address); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("CheckMove : checking if move from %d to %d is legal\n"), from->address, to->address); switch (from->type) { case CHANGER: - DebugPrint(DEBUG_INFO, SECTION_MOVE, "CheckMove : MT2"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("CheckMove : MT2")); switch (to->type) { case CHANGER: if (pDeviceCapabilitiesPage->MT2MT == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "MT\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("MT\n")); moveok = 1; } break; case STORAGE: if (pDeviceCapabilitiesPage->MT2ST == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "ST\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("ST\n")); moveok = 1; } break; case IMPORT: if (pDeviceCapabilitiesPage->MT2IE == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "IE\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("IE\n")); moveok = 1; } break; case TAPETYPE: if (pDeviceCapabilitiesPage->MT2DT == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "DT\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("DT\n")); moveok = 1; } break; @@ -3351,34 +3340,34 @@ CheckMove( } break; case STORAGE: - DebugPrint(DEBUG_INFO, SECTION_MOVE, "CheckMove : ST2"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("CheckMove : ST2")); switch (to->type) { case CHANGER: if (pDeviceCapabilitiesPage->ST2MT == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "MT\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("MT\n")); moveok = 1; } break; case STORAGE: if (pDeviceCapabilitiesPage->ST2ST == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "ST\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("ST\n")); moveok = 1; } break; case IMPORT: if (pDeviceCapabilitiesPage->ST2IE == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "IE\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("IE\n")); moveok = 1; } break; case TAPETYPE: if (pDeviceCapabilitiesPage->ST2DT == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "DT\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("DT\n")); moveok = 1; } break; @@ -3387,34 +3376,34 @@ CheckMove( } break; case IMPORT: - DebugPrint(DEBUG_INFO, SECTION_MOVE, "CheckMove : IE2"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("CheckMove : IE2")); switch (to->type) { case CHANGER: if (pDeviceCapabilitiesPage->IE2MT == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "MT\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("MT\n")); moveok = 1; } break; case STORAGE: if (pDeviceCapabilitiesPage->IE2ST == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "ST\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("ST\n")); moveok = 1; } break; case IMPORT: if (pDeviceCapabilitiesPage->IE2IE == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "IE\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("IE\n")); moveok = 1; } break; case TAPETYPE: if (pDeviceCapabilitiesPage->IE2DT == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "DT\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("DT\n")); moveok = 1; } break; @@ -3423,34 +3412,34 @@ CheckMove( } break; case TAPETYPE: - DebugPrint(DEBUG_INFO, SECTION_MOVE, "CheckMove : DT2"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("CheckMove : DT2")); switch (to->type) { case CHANGER: if (pDeviceCapabilitiesPage->DT2MT == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "MT\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("MT\n")); moveok = 1; } break; case STORAGE: if (pDeviceCapabilitiesPage->DT2ST == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "ST\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("ST\n")); moveok = 1; } break; case IMPORT: if (pDeviceCapabilitiesPage->DT2IE == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "IE\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("IE\n")); moveok = 1; } break; case TAPETYPE: if (pDeviceCapabilitiesPage->DT2DT == 1) { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "DT\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("DT\n")); moveok = 1; } break; @@ -3462,14 +3451,14 @@ CheckMove( break; } } else { - DebugPrint(DEBUG_INFO, SECTION_MOVE, "CheckMove : pDeviceCapabilitiesPage == NULL"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("CheckMove : pDeviceCapabilitiesPage == NULL")); /* - ChgExit("CheckMove", "DeviceCapabilitiesPage == NULL", FATAL); + ChgExit("CheckMove", _("DeviceCapabilitiesPage == NULL"), FATAL); */ moveok=1; } - DebugPrint(DEBUG_INFO, SECTION_MOVE, "###### STOP CheckMove\n"); + DebugPrint(DEBUG_INFO, SECTION_MOVE, _("###### STOP CheckMove\n")); return(moveok); } @@ -3483,13 +3472,13 @@ GetCurrentSlot( { extern OpenFiles_T *pDev; size_t x; - dbprintf(("##### START GetCurrentSlot\n")); + dbprintf(_("##### START GetCurrentSlot\n")); (void)fd; /* Quiet unused parameter warning */ if (pDev[0].SCSI == 0) { - dbprintf(("GetCurrentSlot : can't send SCSI commands\n")); + dbprintf(_("GetCurrentSlot : can't send SCSI commands\n")); return(-1); /*NOTREACHED*/ } @@ -3557,7 +3546,7 @@ GenericElementStatus( (void)InitStatus; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO, SECTION_ELEMENT, "##### START GenericElementStatus\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT, _("##### START GenericElementStatus\n")); if (pEAAPage == NULL) { @@ -3573,9 +3562,9 @@ GenericElementStatus( if (SCSI_ModeSense(DeviceFD, pModePage, 0xff, 0x8, 0x3f) == 0) { LibModeSenseValid = 1; - DecodeModeSense(pModePage, 0, "GenericElementStatus :", 0, debug_file); + DecodeModeSense(pModePage, 0, _("GenericElementStatus :"), 0, debug_file); } else { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"GetElementStatus : failed SCSI_ModeSense\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("GetElementStatus : failed SCSI_ModeSense\n")); LibModeSenseValid = -1; } } @@ -3594,7 +3583,7 @@ GenericElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "GenericElementStatus : Abort on MTE\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("GenericElementStatus : Abort on MTE\n")); return(-1); /*NOTREACHED*/ } @@ -3612,7 +3601,7 @@ GenericElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "GenericElementStatus : Abort on IEE\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("GenericElementStatus : Abort on IEE\n")); return(-1); /*NOTREACHED*/ } @@ -3631,7 +3620,7 @@ GenericElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "GenericElementStatus : Abort on IES\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("GenericElementStatus : Abort on IES\n")); return(-1); /*NOTREACHED*/ } @@ -3649,7 +3638,7 @@ GenericElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "GenericElementStatus : Abort on DTE\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("GenericElementStatus : Abort on DTE\n")); return(-1); /*NOTREACHED*/ } @@ -3666,7 +3655,7 @@ GenericElementStatus( if (GenericResetStatus(DeviceFD) != 0) { ElementStatusValid = 0; - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "GenericElementStatus : Can't init status STEError(%d) MTEError(%d) DTEError(%d) IEEError(%d)\n", STEError, MTEError, DTEError, IEEError); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("GenericElementStatus : Can't init status STEError(%d) MTEError(%d) DTEError(%d) IEEError(%d)\n"), STEError, MTEError, DTEError, IEEError); return(-1); /*NOTREACHED*/ } @@ -3682,7 +3671,7 @@ GenericElementStatus( */ if (pDTE[0].status == 'E') { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT, "GenericElementStatus : try to move tape to tape drive\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT, _("GenericElementStatus : try to move tape to tape drive\n")); pDev[DeviceFD].functions->function_move(DeviceFD, pDTE[0].address, pDTE[0].address); } } @@ -3691,13 +3680,13 @@ GenericElementStatus( if (error != 0) { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "GenericElementStatus : Can't init status (after loop)\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("GenericElementStatus : Can't init status (after loop)\n")); return(-1); /*NOTREACHED*/ } ElementStatusValid = 1; - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "#### STOP GenericElementStatus\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("#### STOP GenericElementStatus\n")); return(0); } @@ -3721,7 +3710,7 @@ DLT448ElementStatus( (void)InitStatus; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO, SECTION_ELEMENT, "##### START DLT448ElementStatus\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT, _("##### START DLT448ElementStatus\n")); if (pEAAPage == NULL) { @@ -3737,9 +3726,9 @@ DLT448ElementStatus( if (SCSI_ModeSense(DeviceFD, pModePage, 0xff, 0x8, 0x3f) == 0) { LibModeSenseValid = 1; - DecodeModeSense(pModePage, 12, "DLT448ElementStatus :", 0, debug_file); + DecodeModeSense(pModePage, 12, _("DLT448ElementStatus :"), 0, debug_file); } else { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"DLT448ElementStatus : failed SCSI_ModeSense\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("DLT448ElementStatus : failed SCSI_ModeSense\n")); LibModeSenseValid = -1; } } @@ -3757,7 +3746,7 @@ DLT448ElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "DLT448ElementStatus : Abort on MTE\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("DLT448ElementStatus : Abort on MTE\n")); return(-1); /*NOTREACHED*/ } @@ -3774,7 +3763,7 @@ DLT448ElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "DLT448ElementStatus : Abort on IEE\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("DLT448ElementStatus : Abort on IEE\n")); return(-1); /*NOTREACHED*/ } @@ -3796,7 +3785,7 @@ DLT448ElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "DLT448ElementStatus : Abort on IES\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("DLT448ElementStatus : Abort on IES\n")); return(-1); /*NOTREACHED*/ } @@ -3814,7 +3803,7 @@ DLT448ElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "DLT448ElementStatus : Abort on DTE\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("DLT448ElementStatus : Abort on DTE\n")); return(-1); /*NOTREACHED*/ } @@ -3831,7 +3820,7 @@ DLT448ElementStatus( if (GenericResetStatus(DeviceFD) != 0) { ElementStatusValid = 0; - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "DLT448ElementStatus : Can't init status\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("DLT448ElementStatus : Can't init status\n")); return(-1); /*NOTREACHED*/ } @@ -3847,7 +3836,7 @@ DLT448ElementStatus( */ if (pDTE[0].status == 'E') { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT, "DLT448ElementStatus : try to move tape to tape drive\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT, _("DLT448ElementStatus : try to move tape to tape drive\n")); pDev[DeviceFD].functions->function_move(DeviceFD, pDTE[0].address, pDTE[0].address); } } @@ -3856,13 +3845,13 @@ DLT448ElementStatus( if (error != 0) { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "DLT448ElementStatus : Can't init status (after loop)\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("DLT448ElementStatus : Can't init status (after loop)\n")); return(-1); /*NOTREACHED*/ } ElementStatusValid = 1; - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "#### STOP DLT448ElementStatus\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("#### STOP DLT448ElementStatus\n")); return(0); } @@ -3883,7 +3872,7 @@ SDXElementStatus( (void)InitStatus; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO, SECTION_ELEMENT, "##### START SDXElementStatus\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT, _("##### START SDXElementStatus\n")); if (pEAAPage == NULL) { @@ -3899,9 +3888,9 @@ SDXElementStatus( if (SCSI_ModeSense(DeviceFD, pModePage, 0xff, 0x8, 0x3f) == 0) { LibModeSenseValid = 1; - DecodeModeSense(pModePage, 0, "SDXElementStatus :", 0, debug_file); + DecodeModeSense(pModePage, 0, _("SDXElementStatus :"), 0, debug_file); } else { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"SDXElementStatus : failed SCSI_ModeSense\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("SDXElementStatus : failed SCSI_ModeSense\n")); LibModeSenseValid = -1; } } @@ -3920,7 +3909,7 @@ SDXElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "SDXElementStatus : Abort on MTE\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("SDXElementStatus : Abort on MTE\n")); return(-1); /*NOTREACHED*/ } @@ -3937,7 +3926,7 @@ SDXElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "SDXElementStatus : Abort on IEE\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("SDXElementStatus : Abort on IEE\n")); return(-1); /*NOTREACHED*/ } @@ -3955,7 +3944,7 @@ SDXElementStatus( error = 1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "SDXElementStatus : Abort on IES\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("SDXElementStatus : Abort on IES\n")); return(-1); /*NOTREACHED*/ } @@ -3974,7 +3963,7 @@ SDXElementStatus( */ break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "SDXElementStatus : Abort on DTE\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("SDXElementStatus : Abort on DTE\n")); return(-1); /*NOTREACHED*/ } @@ -3991,7 +3980,7 @@ SDXElementStatus( if (GenericResetStatus(DeviceFD) != 0) { ElementStatusValid = 0; - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "SDXElementStatus : Can't init status\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("SDXElementStatus : Can't init status\n")); return(-1); /*NOTREACHED*/ } @@ -4002,14 +3991,14 @@ SDXElementStatus( if (error != 0) { - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "SDXElementStatus : Can't init status\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("SDXElementStatus : Can't init status\n")); return(-1); /*NOTREACHED*/ } ElementStatusValid = 1; TapeStatus(); - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, "#### STOP SDXElementStatus\n"); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT, _("#### STOP SDXElementStatus\n")); return(0); } @@ -4045,7 +4034,7 @@ GetElementStatus( size_t length; /* Length of an Element */ size_t NoOfElements; - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"##### START GetElementStatus\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("##### START GetElementStatus\n")); barcode = BarCode(DeviceFD); @@ -4054,7 +4043,7 @@ GetElementStatus( */ if (pEAAPage != NULL) { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Reading Element Status with the info from mode sense\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Reading Element Status with the info from mode sense\n")); /* First the Medim Transport*/ if (V2(pEAAPage->NoMediumTransportElements) > 0) { @@ -4071,7 +4060,7 @@ GetElementStatus( SIZEOF(MediumTransportElementDescriptor_T), &DataBuffer) != 0) { - ChgExit("genericElementStatus","Can't read MTE status", FATAL); + ChgExit("genericElementStatus",_("Can't read MTE status"), FATAL); /*NOTREACHED*/ } // ElementStatusData = (ElementStatusData_T *)DataBuffer; @@ -4081,7 +4070,7 @@ GetElementStatus( offset = offset + SIZEOF(ElementStatusPage_T); length = V2(ElementStatusPage->length); - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"MTE Length %d(%d)\n", length, + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("MTE Length %d(%d)\n"), length, SIZEOF(MediumTransportElementDescriptor_T)); for (x = 0; x < MTE; x++) @@ -4111,14 +4100,14 @@ GetElementStatus( { pMTE[x].ASC = MediumTransportElementDescriptor->asc; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASC MTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASC MTE\n")); } if (length >= 6) { pMTE[x].ASCQ = MediumTransportElementDescriptor->ascq; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASCQ MTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASCQ MTE\n")); } if (length >= 0xa) @@ -4130,7 +4119,7 @@ GetElementStatus( pMTE[x].from = -1; } } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip source MTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip source MTE\n")); } offset = offset + length; } @@ -4156,7 +4145,7 @@ GetElementStatus( SIZEOF(StorageElementDescriptor_T), &DataBuffer) != 0) { - ChgExit("GetElementStatus", "Can't read STE status", FATAL); + ChgExit("GetElementStatus", _("Can't read STE status"), FATAL); /*NOTREACHED*/ } assert(DataBuffer != NULL); @@ -4167,7 +4156,7 @@ GetElementStatus( ElementStatusPage = (ElementStatusPage_T *)&DataBuffer[offset]; offset = offset + SIZEOF(ElementStatusPage_T); length = V2(ElementStatusPage->length); - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"STE Length %d\n",length); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("STE Length %d\n"),length); for (x = 0; x < STE; x++) { @@ -4196,14 +4185,14 @@ GetElementStatus( { pSTE[x].ASC = StorageElementDescriptor->asc; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASC STE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASC STE\n")); } if (length >= 6) { pSTE[x].ASCQ = StorageElementDescriptor->ascq; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASCQ STE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASCQ STE\n")); } if (length >= 0xa) @@ -4215,7 +4204,7 @@ GetElementStatus( pSTE[x].from = -1; } } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip source STE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip source STE\n")); } offset = offset + length; @@ -4242,7 +4231,7 @@ GetElementStatus( SIZEOF(ImportExportElementDescriptor_T), &DataBuffer) != 0) { - ChgExit("GetElementStatus", "Can't read IEE status", FATAL); + ChgExit("GetElementStatus", _("Can't read IEE status"), FATAL); /*NOTREACHED*/ } assert(DataBuffer != NULL); @@ -4253,7 +4242,7 @@ GetElementStatus( ElementStatusPage = (ElementStatusPage_T *)&DataBuffer[offset]; offset = offset + SIZEOF(ElementStatusPage_T); length = V2(ElementStatusPage->length); - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"IEE Length %d\n",length); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("IEE Length %d\n"),length); for (x = 0; x < IEE; x++) { @@ -4280,14 +4269,14 @@ GetElementStatus( { pIEE[x].ASC = ImportExportElementDescriptor->asc; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASC IEE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASC IEE\n")); } if (length >= 6) { pIEE[x].ASCQ = ImportExportElementDescriptor->ascq; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASCQ IEE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASCQ IEE\n")); } if (length >= 0xa) @@ -4299,7 +4288,7 @@ GetElementStatus( pIEE[x].from = -1; } } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip source IEE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip source IEE\n")); } offset = offset + length; @@ -4326,7 +4315,7 @@ GetElementStatus( SIZEOF(DataTransferElementDescriptor_T), &DataBuffer) != 0) { - ChgExit("GenericElementStatus", "Can't read DTE status", FATAL); + ChgExit("GenericElementStatus", _("Can't read DTE status"), FATAL); /*NOTREACHED*/ } assert(DataBuffer != NULL); @@ -4337,7 +4326,7 @@ GetElementStatus( ElementStatusPage = (ElementStatusPage_T *)&DataBuffer[offset]; offset = offset + SIZEOF(ElementStatusPage_T); length = V2(ElementStatusPage->length); - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"DTE Length %d\n",length); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("DTE Length %d\n"),length); for (x = 0; x < DTE; x++) { @@ -4365,14 +4354,14 @@ GetElementStatus( { pDTE[x].ASC = DataTransferElementDescriptor->asc; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASC DTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASC DTE\n")); } if (length >= 6) { pDTE[x].ASCQ = DataTransferElementDescriptor->ascq; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASCQ DTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASCQ DTE\n")); } if (length >= 0xa) @@ -4384,7 +4373,7 @@ GetElementStatus( pDTE[x].from = -1; } } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip source STE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip source STE\n")); } offset = offset + length; @@ -4396,7 +4385,7 @@ GetElementStatus( /* * And now the old way, when we get here the read mode sense page has failed ... */ - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Reading Element Status the old way .... (max 255 elements)\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Reading Element Status the old way .... (max 255 elements)\n")); if (SCSI_ReadElementStatus(DeviceFD, 0, 0, @@ -4406,7 +4395,7 @@ GetElementStatus( (size_t)0x7f, &DataBuffer) != 0) { - ChgExit("GenericElementStatus","Can't get ElementStatus", FATAL); + ChgExit("GenericElementStatus",_("Can't get ElementStatus"), FATAL); /*NOTREACHED*/ } assert(DataBuffer != NULL); @@ -4456,14 +4445,14 @@ GetElementStatus( { pMTE[x].ASC = MediumTransportElementDescriptor->asc; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASC MTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASC MTE\n")); } if (length >= 6) { pMTE[x].ASCQ = MediumTransportElementDescriptor->ascq; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASCQ MTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASCQ MTE\n")); } if (length >= 0xa) @@ -4475,7 +4464,7 @@ GetElementStatus( pMTE[x].from = -1; } } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip source MTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip source MTE\n")); } offset = offset + length; @@ -4513,14 +4502,14 @@ GetElementStatus( { pSTE[x].ASC = StorageElementDescriptor->asc; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASC STE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASC STE\n")); } if (length >= 6) { pSTE[x].ASCQ = StorageElementDescriptor->ascq; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASCQ STE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASCQ STE\n")); } if (length >= 0xa) @@ -4532,7 +4521,7 @@ GetElementStatus( pSTE[x].from = -1; } } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip source STE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip source STE\n")); } offset = offset + length; @@ -4570,14 +4559,14 @@ GetElementStatus( { pIEE[x].ASC = ImportExportElementDescriptor->asc; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASC IEE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASC IEE\n")); } if (length >= 6) { pIEE[x].ASCQ = ImportExportElementDescriptor->ascq; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASCQ IEE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASCQ IEE\n")); } if (length >= 0xa) @@ -4589,7 +4578,7 @@ GetElementStatus( pIEE[x].from = -1; } } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip source IEE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip source IEE\n")); } offset = offset + length; @@ -4627,14 +4616,14 @@ GetElementStatus( { pDTE[x].ASC = DataTransferElementDescriptor->asc; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASC DTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASC DTE\n")); } if (length >= 6) { pDTE[x].ASCQ = DataTransferElementDescriptor->ascq; } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip ASCQ DTE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip ASCQ DTE\n")); } if (length >= 0xa) @@ -4646,7 +4635,7 @@ GetElementStatus( pDTE[x].from = -1; } } else { - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"Skip source STE\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("Skip source STE\n")); } offset = offset + length; @@ -4654,38 +4643,38 @@ GetElementStatus( break; default: offset = offset + length; - DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,"GetElementStatus : UnGknown Type %d\n",ElementStatusPage->type); + DebugPrint(DEBUG_ERROR, SECTION_ELEMENT,_("GetElementStatus : UnGknown Type %d\n"),ElementStatusPage->type); break; } } free(DataBuffer); } - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"\n\n\tMedia Transport Elements (robot arms) :\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("\n\n\tMedia Transport Elements (robot arms) :\n")); for ( x = 0; x < MTE; x++) - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"\t\tElement #%04d %c\n\t\t\tEXCEPT = %02x\n\t\t\tASC = %02X ASCQ = %02X\n\t\t\tType %d From = %04d\n\t\t\tTAG = %s\n", + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("\t\tElement #%04d %c\n\t\t\tEXCEPT = %02x\n\t\t\tASC = %02X ASCQ = %02X\n\t\t\tType %d From = %04d\n\t\t\tTAG = %s\n"), pMTE[x].address, pMTE[x].status, pMTE[x].except, pMTE[x].ASC, pMTE[x].ASCQ, pMTE[x].type, pMTE[x].from, pMTE[x].VolTag); - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"\n\n\tStorage Elements (Media slots) :\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("\n\n\tStorage Elements (Media slots) :\n")); for ( x = 0; x < STE; x++) - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"\t\tElement #%04d %c\n\t\t\tEXCEPT = %02X\n\t\t\tASC = %02X ASCQ = %02X\n\t\t\tType %d From = %04d\n\t\t\tTAG = %s\n", + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("\t\tElement #%04d %c\n\t\t\tEXCEPT = %02X\n\t\t\tASC = %02X ASCQ = %02X\n\t\t\tType %d From = %04d\n\t\t\tTAG = %s\n"), pSTE[x].address, pSTE[x].status, pSTE[x].except, pSTE[x].ASC, pSTE[x].ASCQ, pSTE[x].type, pSTE[x].from, pSTE[x].VolTag); - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"\n\n\tData Transfer Elements (tape drives) :\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("\n\n\tData Transfer Elements (tape drives) :\n")); for ( x = 0; x < DTE; x++) - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"\t\tElement #%04d %c\n\t\t\tEXCEPT = %02X\n\t\t\tASC = %02X ASCQ = %02X\n\t\t\tType %d From = %04d\n\t\t\tTAG = %s\n\t\t\tSCSI ADDRESS = %d\n", + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("\t\tElement #%04d %c\n\t\t\tEXCEPT = %02X\n\t\t\tASC = %02X ASCQ = %02X\n\t\t\tType %d From = %04d\n\t\t\tTAG = %s\n\t\t\tSCSI ADDRESS = %d\n"), pDTE[x].address, pDTE[x].status, pDTE[x].except, pDTE[x].ASC, pDTE[x].ASCQ, pDTE[x].type, pDTE[x].from, pDTE[x].VolTag,pDTE[x].scsi); - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"\n\n\tImport/Export Elements :\n"); + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("\n\n\tImport/Export Elements :\n")); for ( x = 0; x < IEE; x++) - DebugPrint(DEBUG_INFO, SECTION_ELEMENT,"\t\tElement #%04d %c\n\t\t\tEXCEPT = %02X\n\t\t\t\tASC = %02X ASCQ = %02X\n\t\t\tType %d From = %04d\n\t\t\tTAG = %s\n", + DebugPrint(DEBUG_INFO, SECTION_ELEMENT,_("\t\tElement #%04d %c\n\t\t\tEXCEPT = %02X\n\t\t\t\tASC = %02X ASCQ = %02X\n\t\t\tType %d From = %04d\n\t\t\tTAG = %s\n"), pIEE[x].address, pIEE[x].status, pIEE[x].except, pIEE[x].ASC, pIEE[x].ASCQ, pIEE[x].type, pIEE[x].from, pIEE[x].VolTag); @@ -4710,7 +4699,7 @@ RequestSense( CDB_T CDB; int ret; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START RequestSense\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START RequestSense\n")); CDB[0] = SC_COM_REQUEST_SENSE; /* REQUEST SENSE */ CDB[1] = 0; /* Logical Unit Number = 0, Reserved */ @@ -4730,7 +4719,7 @@ RequestSense( if (ret < 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP RequestSense (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP RequestSense (%d)\n"),ret); return(ret); /*NOTREACHED*/ } @@ -4738,7 +4727,7 @@ RequestSense( if ( ret > 0) { DecodeExtSense(ExtendedRequestSense, "RequestSense : ",debug_file); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP RequestSense (%d)\n", ExtendedRequestSense->SenseKey); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP RequestSense (%d)\n"), ExtendedRequestSense->SenseKey); return(ExtendedRequestSense->SenseKey); /*NOTREACHED*/ } @@ -4746,7 +4735,7 @@ RequestSense( dump_hex((u_char *)ExtendedRequestSense , SIZEOF(ExtendedRequestSense_T), DEBUG_INFO, SECTION_SCSI); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP RequestSense (0)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP RequestSense (0)\n")); return(0); } @@ -4762,7 +4751,7 @@ LookupElement( { size_t x; - dbprintf(("##### START LookupElement\n")); + dbprintf(_("##### START LookupElement\n")); if (DTE > 0) { @@ -4770,7 +4759,7 @@ LookupElement( { if (pDTE[x].address == address) { - dbprintf(("##### STOP LookupElement (DTE)\n")); + dbprintf(_("##### STOP LookupElement (DTE)\n")); return(&pDTE[x]); /*NOTREACHED*/ } @@ -4783,7 +4772,7 @@ LookupElement( { if (pMTE[x].address == address) { - dbprintf(("##### STOP LookupElement (MTE)\n")); + dbprintf(_("##### STOP LookupElement (MTE)\n")); return(&pMTE[x]); /*NOTREACHED*/ } @@ -4796,7 +4785,7 @@ LookupElement( { if (pSTE[x].address == address) { - dbprintf(("##### STOP LookupElement (STE)\n")); + dbprintf(_("##### STOP LookupElement (STE)\n")); return(&pSTE[x]); /*NOTREACHED*/ } @@ -4809,7 +4798,7 @@ LookupElement( { if (pIEE[x].address == address) { - dbprintf(("##### STOP LookupElement (IEE)\n")); + dbprintf(_("##### STOP LookupElement (IEE)\n")); return(&pIEE[x]); /*NOTREACHED*/ } @@ -4849,7 +4838,7 @@ LogSense( (void)DeviceFD; /* Quiet unused parameter warning */ - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### START LogSense\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### START LogSense\n")); if ((tapestatfile != NULL) && (pDev[INDEX_TAPECTL].SCSI == 1) && ((StatFile = fopen(tapestatfile,"a")) != NULL)) @@ -4858,7 +4847,7 @@ LogSense( if (GenericRewind(INDEX_TAPECTL) < 0) { - DebugPrint(DEBUG_INFO, SECTION_TAPE,"LogSense : Rewind failed\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("LogSense : Rewind failed\n")); free(pRequestSense); fclose(StatFile); return(0); @@ -4876,9 +4865,9 @@ LogSense( if ((chgscsi_result = (char *)tape_rdlabel(pDev[INDEX_TAPE].dev, &chgscsi_datestamp, &chgscsi_label)) == NULL) { - fprintf(StatFile, "==== %s ==== %s ====\n", chgscsi_datestamp, chgscsi_label); + g_fprintf(StatFile, _("==== %s ==== %s ====\n"), chgscsi_datestamp, chgscsi_label); } else { - fprintf(StatFile, "%s\n", chgscsi_result); + g_fprintf(StatFile, "%s\n", chgscsi_result); } } @@ -4960,14 +4949,14 @@ LogSense( if ((strcmp(pDev[INDEX_TAPECTL].ident, p->ident) == 0 ||strcmp("*", p->ident) == 0) && p->LogPage == logpages[count]) { p->decode(LogParameter, length); found = 1; - fprintf(StatFile, "\n"); + g_fprintf(StatFile, "\n"); break; } p++; } if (!found) { - fprintf(StatFile, "Logpage No %d = %x\n", count ,logpages[count]); + g_fprintf(StatFile, _("Logpage No %d = %x\n"), count ,logpages[count]); while ((u_char *)LogParameter < (buffer + length)) { i = LogParameter->ParameterLength; @@ -4975,30 +4964,30 @@ LogSense( switch (i) { case 1: value = V1((u_char *)LogParameter + SIZEOF(LogParameter_T)); - fprintf(StatFile, "ParameterCode %02X = %u(%d)\n", ParameterCode, value, i); + g_fprintf(StatFile, _("ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; case 2: value = V2((u_char *)LogParameter + SIZEOF(LogParameter_T)); - fprintf(StatFile, "ParameterCode %02X = %u(%d)\n", ParameterCode, value, i); + g_fprintf(StatFile, _("ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; case 3: value = V3((u_char *)LogParameter + SIZEOF(LogParameter_T)); - fprintf(StatFile, "ParameterCode %02X = %u(%d)\n", ParameterCode, value, i); + g_fprintf(StatFile, _("ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; case 4: value = V4((u_char *)LogParameter + SIZEOF(LogParameter_T)); - fprintf(StatFile, "ParameterCode %02X = %u(%d)\n", ParameterCode, value, i); + g_fprintf(StatFile, _("ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; case 5: value = V5((u_char *)LogParameter + SIZEOF(LogParameter_T)); - fprintf(StatFile, "ParameterCode %02X = %u(%d)\n", ParameterCode, value, i); + g_fprintf(StatFile, _("ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; default: - fprintf(StatFile, "ParameterCode %02X size %d\n", ParameterCode, i); + g_fprintf(StatFile, _("ParameterCode %02X size %d\n"), ParameterCode, i); } LogParameter = (LogParameter_T *)((u_char *)LogParameter + SIZEOF(LogParameter_T) + i); } - fprintf(StatFile, "\n"); + g_fprintf(StatFile, "\n"); } } } @@ -5042,7 +5031,7 @@ LogSense( /*@end@*/ fclose(StatFile); } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"##### STOP LogSense\n"); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("##### STOP LogSense\n")); return(0); } @@ -5057,7 +5046,7 @@ WriteErrorCountersPage( unsigned ParameterCode; LogParameter = buffer; - fprintf(StatFile, "\tWrite Error Counters Page\n"); + g_fprintf(StatFile, _("\tWrite Error Counters Page\n")); while ((u_char *)LogParameter < ((u_char *)buffer + length)) { i = LogParameter->ParameterLength; @@ -5067,38 +5056,38 @@ WriteErrorCountersPage( if (Decode(LogParameter, &value) == 0) { switch (ParameterCode) { case 2: - fprintf(StatFile, "%-30s = %u\n", - "Total Rewrites", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Rewrites"), value); break; case 3: - fprintf(StatFile, "%-30s = %u\n", - "Total Errors Corrected", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Errors Corrected"), value); break; case 4: - fprintf(StatFile, "%-30s = %u\n", - "Total Times E. Processed", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Times E. Processed"), value); break; case 5: - fprintf(StatFile, "%-30s = %u\n", - "Total Bytes Processed", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Bytes Processed"), value); break; case 6: - fprintf(StatFile, "%-30s = %u\n", - "Total Unrecoverable Errors", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Unrecoverable Errors"), value); break; default: - fprintf(StatFile, "Unknown ParameterCode %02X = %u(%d)\n", + g_fprintf(StatFile, _("Unknown ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; } } else { - fprintf(StatFile, "Error decoding Result\n"); + g_fprintf(StatFile, _("Error decoding Result\n")); } LogParameter = (LogParameter_T *)((u_char *)LogParameter + SIZEOF(LogParameter_T) + i); } @@ -5115,7 +5104,7 @@ ReadErrorCountersPage( unsigned ParameterCode; LogParameter = buffer; - fprintf(StatFile, "\tRead Error Counters Page\n"); + g_fprintf(StatFile, _("\tRead Error Counters Page\n")); while ((u_char *)LogParameter < ((u_char *)buffer + length)) { i = LogParameter->ParameterLength; @@ -5125,38 +5114,38 @@ ReadErrorCountersPage( if (Decode(LogParameter, &value) == 0) { switch (ParameterCode) { case 2: - fprintf(StatFile, "%-30s = %u\n", - "Total Rereads", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Rereads"), value); break; case 3: - fprintf(StatFile, "%-30s = %u\n", - "Total Errors Corrected", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Errors Corrected"), value); break; case 4: - fprintf(StatFile, "%-30s = %u\n", - "Total Times E. Processed", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Times E. Processed"), value); break; case 5: - fprintf(StatFile, "%-30s = %u\n", - "Total Bytes Processed", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Bytes Processed"), value); break; case 6: - fprintf(StatFile, "%-30s = %u\n", - "Total Unrecoverable Errors", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Unrecoverable Errors"), value); break; default: - fprintf(StatFile, "Unknown ParameterCode %02X = %u(%d)\n", + g_fprintf(StatFile, _("Unknown ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; } } else { - fprintf(StatFile, "Error decoding Result\n"); + g_fprintf(StatFile, _("Error decoding Result\n")); } LogParameter = (LogParameter_T *)((u_char *)LogParameter + SIZEOF(LogParameter_T) + i); } @@ -5173,7 +5162,7 @@ C1553APage30( unsigned ParameterCode; LogParameter = buffer; - fprintf(StatFile, "\tData compression transfer Page\n"); + g_fprintf(StatFile, _("\tData compression transfer Page\n")); while ((u_char *)LogParameter < ((u_char *)buffer + length)) { i = LogParameter->ParameterLength; @@ -5183,7 +5172,7 @@ C1553APage30( if (Decode(LogParameter, &value) == 0) { switch (ParameterCode) { default: - fprintf(StatFile, "Unknown ParameterCode %02X = %u(%d)\n", + g_fprintf(StatFile, _("Unknown ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; @@ -5204,7 +5193,7 @@ C1553APage37( unsigned ParameterCode; LogParameter = buffer; - fprintf(StatFile, "\tDrive Counters Page\n"); + g_fprintf(StatFile, _("\tDrive Counters Page\n")); while ((u_char *)LogParameter < ((unsigned char *)buffer + length)) { i = LogParameter->ParameterLength; @@ -5214,22 +5203,22 @@ C1553APage37( if (Decode(LogParameter, &value) == 0) { switch (ParameterCode) { case 1: - fprintf(StatFile, "%-30s = %u\n", - "Total loads", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total loads"), value); break; case 2: - fprintf(StatFile, "%-30s = %u\n", - "Total write drive errors", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total write drive errors"), value); break; case 3: - fprintf(StatFile, "%-30s = %u\n", - "Total read drive errors", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total read drive errors"), value); break; default: - fprintf(StatFile, "Unknown ParameterCode %02X = %u(%d)\n", + g_fprintf(StatFile, _("Unknown ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; @@ -5250,7 +5239,7 @@ EXB85058HEPage39( unsigned ParameterCode; LogParameter = buffer; - fprintf(StatFile, "\tData Compression Page\n"); + g_fprintf(StatFile, _("\tData Compression Page\n")); while ((u_char *)LogParameter < ((unsigned char *)buffer + length)) { i = LogParameter->ParameterLength; @@ -5260,17 +5249,17 @@ EXB85058HEPage39( if (Decode(LogParameter, &value) == 0) { switch (ParameterCode) { case 5: - fprintf(StatFile, "%-30s = %u\n", - "KB to Compressor", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("KB to Compressor"), value); break; case 7: - fprintf(StatFile, "%-30s = %u\n", - "KB to tape", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("KB to tape"), value); break; default: - fprintf(StatFile, "Unknown ParameterCode %02X = %u(%d)\n", + g_fprintf(StatFile, _("Unknown ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; @@ -5291,7 +5280,7 @@ EXB85058HEPage3c( unsigned ParameterCode; LogParameter = buffer; - fprintf(StatFile, "\tDrive Usage Information Page\n"); + g_fprintf(StatFile, _("\tDrive Usage Information Page\n")); while ((u_char *)LogParameter < ((unsigned char *)buffer + length)) { i = LogParameter->ParameterLength; @@ -5307,21 +5296,21 @@ EXB85058HEPage3c( case 5: break; case 6: - fprintf(StatFile, "%-30s = %u\n", - "Total Load Count", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Total Load Count"), value); break; case 7: - fprintf(StatFile, "%-30s = %u\n", - "MinutesSince Last Clean", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("MinutesSince Last Clean"), value); break; case 8: case 9: break; case 0xa: - fprintf(StatFile, "%-30s = %u\n", - "Cleaning Count", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Cleaning Count"), value); break; case 0xb: @@ -5332,8 +5321,8 @@ EXB85058HEPage3c( case 0x10: break; case 0x11: - fprintf(StatFile, "%-30s = %u\n", - "Time to clean", + g_fprintf(StatFile, _("%-30s = %u\n"), + _("Time to clean"), value); break; case 0x12: @@ -5341,7 +5330,7 @@ EXB85058HEPage3c( case 0x14: break; default: - fprintf(StatFile, "Unknown ParameterCode %02X = %u(%d)\n", + g_fprintf(StatFile, _("Unknown ParameterCode %02X = %u(%d)\n"), ParameterCode, value, i); break; @@ -5357,8 +5346,8 @@ Decode( unsigned * value) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START Decode\n"); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"Decode Parameter with length %d\n", LogParameter->ParameterLength); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START Decode\n")); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("Decode Parameter with length %d\n"), LogParameter->ParameterLength); *value = 0; switch (LogParameter->ParameterLength) { @@ -5381,14 +5370,14 @@ Decode( *value = V6((u_char *)LogParameter + SIZEOF(LogParameter_T)); break; default: - fprintf(StatFile, "Can't decode ParameterCode %02X size %d\n", + g_fprintf(StatFile, _("Can't decode ParameterCode %02X size %d\n"), V2(LogParameter->ParameterCode), LogParameter->ParameterLength); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP Decode (1)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP Decode (1)\n")); return(1); /*NOTREACHED*/ } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"Result = %d\n", *value); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP Decode(0)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("Result = %d\n"), *value); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP Decode(0)\n")); return(0); } @@ -5399,14 +5388,14 @@ DumpDev( { if (p != NULL) { - printf("%s Devicefd %d\n", device, p->fd); - printf("%s Can SCSI %d\n", device, p->SCSI); - printf("%s Device %s\n", device, (p->dev != NULL)? p->dev:"No set"); - printf("%s ConfigName %s\n", device, (p->ConfigName != NULL) ? p->ConfigName:"Not ser"); + g_printf(_("%s Devicefd %d\n"), device, p->fd); + g_printf(_("%s Can SCSI %d\n"), device, p->SCSI); + g_printf(_("%s Device %s\n"), device, (p->dev != NULL)? p->dev:_("No set")); + g_printf(_("%s ConfigName %s\n"), device, (p->ConfigName != NULL) ? p->ConfigName:_("Not ser")); } else { - printf("%s Null Pointer ....\n", device); + g_printf(_("%s Null Pointer ....\n"), device); } - printf("\n"); + g_printf(_("\n")); } void @@ -5468,7 +5457,7 @@ ChangerStatus( if ((out = fdopen(1 , "w")) == NULL) { - printf("Error fdopen stdout\n"); + g_printf(_("Error fdopen stdout\n")); free(pbarcoderes); return; /*NOTREACHED*/ @@ -5478,7 +5467,7 @@ ChangerStatus( { while(p->ident != NULL) { - printf ("Ident = %s, type = %s\n",p->ident, p->type); + g_printf (_("Ident = %s, type = %s\n"),p->ident, p->type); p++; } DumpSense(); @@ -5490,7 +5479,7 @@ ChangerStatus( { if (pDev[INDEX_CHANGER].functions->function_status(pDev[INDEX_CHANGER].fd, 1) != 0) { - printf("Can not initialize changer status\n"); + g_printf(_("Can not initialize changer status\n")); free(pbarcoderes); fclose(out); return; @@ -5500,18 +5489,18 @@ ChangerStatus( /* 0123456789012345678901234567890123456789012 */ if (HasBarCode) { - printf("Address Type Status From Barcode Label\n"); + g_printf(_("Address Type Status From Barcode Label\n")); } else { - printf("Address Type Status From\n"); + g_printf(_("Address Type Status From\n")); } - printf("-------------------------------------------\n"); + g_printf(_("-------------------------------------------\n")); for ( x = 0; x < MTE; x++) if (HasBarCode) { - printf("%07d MTE %s %04d %s ",pMTE[x].address, - (pMTE[x].full ? "Full " :"Empty"), + g_printf(_("%07d MTE %s %04d %s "),pMTE[x].address, + (pMTE[x].full ? _("Full ") :_("Empty")), pMTE[x].from, pMTE[x].VolTag); if (pMTE[x].full == 1) @@ -5522,16 +5511,16 @@ ChangerStatus( if (MapBarCode(labelfile, pbarcoderes) == 0 ) { - printf("No mapping\n"); + g_printf(_("No mapping\n")); } else { - printf("%s \n",pbarcoderes->data.voltag); + g_printf(_("%s \n"),pbarcoderes->data.voltag); } } else { - printf("\n"); + g_printf("\n"); } } else { - printf("%07d MTE %s %04d \n",pMTE[x].address, - (pMTE[x].full ? "Full " :"Empty"), + g_printf(_("%07d MTE %s %04d \n"),pMTE[x].address, + (pMTE[x].full ? _("Full ") :_("Empty")), pMTE[x].from); } @@ -5539,8 +5528,8 @@ ChangerStatus( for ( x = 0; x < STE; x++) if (HasBarCode) { - printf("%07d STE %s %04d %s ",pSTE[x].address, - (pSTE[x].full ? "Full ":"Empty"), + g_printf(_("%07d STE %s %04d %s "),pSTE[x].address, + (pSTE[x].full ? _("Full "):_("Empty")), pSTE[x].from, pSTE[x].VolTag); if (pSTE[x].full == 1) @@ -5551,16 +5540,16 @@ ChangerStatus( if (MapBarCode(labelfile, pbarcoderes) == 0 ) { - printf("No mapping\n"); + g_printf(_("No mapping\n")); } else { - printf("%s \n",pbarcoderes->data.voltag); + g_printf(_("%s \n"),pbarcoderes->data.voltag); } } else { - printf("\n"); + g_printf("\n"); } } else { - printf("%07d STE %s %04d %s\n",pSTE[x].address, - (pSTE[x].full ? "Full ":"Empty"), + g_printf(_("%07d STE %s %04d %s\n"),pSTE[x].address, + (pSTE[x].full ? _("Full"):_("Empty")), pSTE[x].from, pSTE[x].VolTag); } @@ -5568,8 +5557,8 @@ ChangerStatus( for ( x = 0; x < DTE; x++) if (HasBarCode) { - printf("%07d DTE %s %04d %s ",pDTE[x].address, - (pDTE[x].full ? "Full " : "Empty"), + g_printf(_("%07d DTE %s %04d %s "),pDTE[x].address, + (pDTE[x].full ? _("Full") : _("Empty")), pDTE[x].from, pDTE[x].VolTag); if (pDTE[x].full == 1) @@ -5580,25 +5569,25 @@ ChangerStatus( if (MapBarCode(labelfile, pbarcoderes) == 0 ) { - printf("No mapping\n"); + g_printf(_("No mapping\n")); } else { - printf("%s \n",pbarcoderes->data.voltag); + g_printf("%s \n",pbarcoderes->data.voltag); } } else { - printf("\n"); + g_printf("\n"); } } else { - printf("%07d DTE %s %04d %s\n",pDTE[x].address, - (pDTE[x].full ? "Full " : "Empty"), + g_printf(_("%07d DTE %s %04d %s\n"),pDTE[x].address, + (pDTE[x].full ?_( "Full ") : _("Empty")), pDTE[x].from, pDTE[x].VolTag); } for ( x = 0; x < IEE; x++) if (HasBarCode) { - printf("%07d IEE %s %04d %s ",pIEE[x].address, - (pIEE[x].full ? "Full " : "Empty"), + g_printf(_("%07d IEE %s %04d %s "),pIEE[x].address, + (pIEE[x].full ? _("Full ") : _("Empty")), pIEE[x].from, pIEE[x].VolTag); if (pIEE[x].full == 1) @@ -5609,17 +5598,17 @@ ChangerStatus( if (MapBarCode(labelfile, pbarcoderes) == 0 ) { - printf("No mapping\n"); + g_printf(_("No mapping\n")); } else { - printf("%s \n",pbarcoderes->data.voltag); + g_printf(_("%s \n"),pbarcoderes->data.voltag); } } else { - printf("\n"); + g_printf("\n"); } } else { - printf("%07d IEE %s %04d %s\n",pIEE[x].address, - (pIEE[x].full ? "Full " : "Empty"), + g_printf(_("%07d IEE %s %04d %s\n"),pIEE[x].address, + (pIEE[x].full ? _("Full ") : _("Empty")), pIEE[x].from, pIEE[x].VolTag); } @@ -5629,23 +5618,23 @@ ChangerStatus( { if (pDev[INDEX_CHANGER].SCSI == 1) { - printf("\nSense Status from robot:\n"); + g_printf(_("\nSense Status from robot:\n")); RequestSense(INDEX_CHANGER , &ExtRequestSense, 0); DecodeExtSense(&ExtRequestSense, "", out); } if (pDev[INDEX_TAPE].SCSI == 1) { - printf("\n"); - printf("Sense Status from tape (tapectl):\n"); + g_printf("\n"); + g_printf(_("Sense Status from tape (tapectl):\n")); RequestSense(INDEX_TAPE, &ExtRequestSense, 0); DecodeExtSense(&ExtRequestSense, "", out); } if (pDev[INDEX_TAPECTL].SCSI == 1) { - printf("\n"); - printf("Sense Status from tape (tapectl):\n"); + g_printf("\n"); + g_printf(_("Sense Status from tape (tapectl):\n")); RequestSense(INDEX_TAPECTL, &ExtRequestSense, 0); DecodeExtSense(&ExtRequestSense, "", out); } @@ -5653,7 +5642,7 @@ ChangerStatus( if (strcmp("ModeSenseRobot", option) == 0 || strcmp("all", option) == 0) { - printf("\n"); + g_printf("\n"); if (SCSI_ModeSense(INDEX_CHANGER, pModePage, 0xff, 0x08, 0x3f) == 0) { DecodeModeSense(pModePage, 0, "Changer :" , 0, out); @@ -5664,7 +5653,7 @@ ChangerStatus( { if (pDev[INDEX_TAPECTL].SCSI == 1) { - printf("\n"); + g_printf("\n"); if (SCSI_ModeSense(INDEX_TAPECTL, pModePage, 0xff, 0x0, 0x3f) == 0) { DecodeModeSense(pModePage, 0, "Tape :" , 1, out); @@ -5674,16 +5663,16 @@ ChangerStatus( if (strcmp("fd", option) == 0 || strcmp("all", option) == 0) { - printf("changer_dev %s\n",changer_dev); - printf("changer_file %s\n", changer_file); - printf("tape_device %s\n\n", tape_device); + g_printf("changer_dev %s\n",changer_dev); + g_printf("changer_file %s\n", changer_file); + g_printf("tape_device %s\n\n", tape_device); DumpDev(&pDev[INDEX_TAPE], "pTapeDev"); DumpDev(&pDev[INDEX_TAPECTL], "pTapeDevCtl"); DumpDev(&pDev[INDEX_CHANGER], "pChangerDev"); } if (GenericClean("") == 1) - printf("Tape needs cleaning\n"); + g_printf(_("Tape needs cleaning\n")); free(pbarcoderes); fclose(out); @@ -5704,7 +5693,7 @@ dump_hex( DebugPrint(level, section,"%02X ", (u_char)p[row_count]); if (((row_count + 1) % 16) == 0) { - dbprintf((" ")); + dbprintf(" "); for (x = 16; x > 0; x--) { if (isalnum((u_char)p[row_count - x + 1 ])) @@ -5738,8 +5727,8 @@ ChgExit( { (void)level; /* Quiet unused parameter warning */ - dbprintf(("ChgExit in %s, reason %s\n", where, reason)); - fprintf(stderr,"%s\n",reason); + dbprintf(_("ChgExit in %s, reason %s\n"), where, reason); + g_fprintf(stderr,"%s\n",reason); exit(2); } @@ -5776,11 +5765,11 @@ SCSI_Run( pRqS = (RequestSense_T *)pRequestSense; - DebugPrint(DEBUG_INFO, SECTION_SCSI, "SCSI_Run TestUnitReady\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("SCSI_Run TestUnitReady\n")); while (!ok && maxtries < MAXTRIES) { ret = SCSI_TestUnitReady(DeviceFD, (RequestSense_T *)pRequestSense ); - DebugPrint(DEBUG_INFO, SECTION_SCSI, "SCSI_Run TestUnitReady ret %d\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("SCSI_Run TestUnitReady ret %d\n"),ret); switch (ret) { case SCSI_OK: @@ -5790,42 +5779,42 @@ SCSI_Run( switch (SenseHandler(DeviceFD, 0, pRqS->SenseKey, pRqS->AdditionalSenseCode, pRqS->AdditionalSenseCodeQualifier, pRqS)) { case SENSE_NO: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run (TestUnitReady) SENSE_NO\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run (TestUnitReady) SENSE_NO\n")); ok=1; break; case SENSE_TAPE_NOT_ONLINE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run (TestUnitReady) SENSE_TAPE_NOT_ONLINE\n")); ok=1; break; case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run (TestUnitReady) SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run (TestUnitReady) SENSE_IGNORE\n")); ok=1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_Run (TestUnitReady) SENSE_ABORT\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_Run (TestUnitReady) SENSE_ABORT\n")); return(-1); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run (TestUnitReady) SENSE_RETRY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run (TestUnitReady) SENSE_RETRY\n")); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run (TestUnitReady) default (SENSE)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run (TestUnitReady) default (SENSE)\n")); ok=1; break; } break; case SCSI_ERROR: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_Run (TestUnitReady) SCSI_ERROR\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_Run (TestUnitReady) SCSI_ERROR\n")); return(-1); /*NOTREACHED*/ case SCSI_BUSY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run (TestUnitReady) SCSI_BUSY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run (TestUnitReady) SCSI_BUSY\n")); break; case SCSI_CHECK: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run (TestUnitReady) SCSI_CHECK\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run (TestUnitReady) SCSI_CHECK\n")); break; default: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_Run (TestUnitReady) unknown (%d)\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_Run (TestUnitReady) unknown (%d)\n"),ret); break; } if (!ok) @@ -5835,11 +5824,11 @@ SCSI_Run( } } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run TestUnitReady after %d sec:\n",maxtries); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run TestUnitReady after %d sec:\n"),maxtries); if (ok != 1) { - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_Run Exit %d\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_Run Exit %d\n"),ret); return(-1); /*NOTREACHED*/ } @@ -5857,7 +5846,7 @@ SCSI_Run( pRequestSense, RequestSenseLength); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run Exit %d\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run Exit %d\n"),ret); switch (ret) { case SCSI_OK: @@ -5867,42 +5856,42 @@ SCSI_Run( switch (SenseHandler(DeviceFD, 0, pRqS->SenseKey, pRqS->AdditionalSenseCode, pRqS->AdditionalSenseCodeQualifier, pRqS)) { case SENSE_NO: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run SENSE_NO\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run SENSE_NO\n")); ok=1; break; case SENSE_TAPE_NOT_ONLINE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run SENSE_TAPE_NOT_ONLINE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run SENSE_TAPE_NOT_ONLINE\n")); ok=1; break; case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run SENSE_IGNORE\n")); ok=1; break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_Run SENSE_ABORT\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_Run SENSE_ABORT\n")); return(-1); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run SENSE_RETRY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run SENSE_RETRY\n")); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run default (SENSE)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run default (SENSE)\n")); ok=1; break; } break; case SCSI_ERROR: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_Run SCSI_ERROR\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_Run SCSI_ERROR\n")); return(-1); /*NOTREACHED*/ case SCSI_BUSY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run SCSI_BUSY\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run SCSI_BUSY\n")); break; case SCSI_CHECK: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Run (TestUnitReady) SCSI_CHECK\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Run (TestUnitReady) SCSI_CHECK\n")); break; default: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_Run (TestUnitReady) unknown (%d)\n",ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_Run (TestUnitReady) unknown (%d)\n"),ret); break; } maxtries++; @@ -5934,7 +5923,7 @@ SCSI_AlignElements( int ret; int i; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START SCSI_AlignElements\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START SCSI_AlignElements\n")); pRequestSense = alloc(SIZEOF(RequestSense_T)); @@ -5953,12 +5942,12 @@ SCSI_AlignElements( ret = SCSI_Run(DeviceFD, Input, CDB, 12, NULL, 0, pRequestSense, SIZEOF(RequestSense_T)); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_AlignElements : SCSI_Run = %d\n", ret); - DecodeSense(pRequestSense, "SCSI_AlignElements :",debug_file); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_AlignElements : SCSI_Run = %d\n"), ret); + DecodeSense(pRequestSense, _("SCSI_AlignElements :"),debug_file); if (ret < 0) { - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"%s: Request Sense[Inquiry]: %02X", + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("%s: Request Sense[Inquiry]: %02X"), "chs", ((u_char *) &pRequestSense)[0]); for (i = 1; i < (int)sizeof(RequestSense_T); i++) DebugPrint(DEBUG_ERROR, SECTION_SCSI," %02X", ((u_char *) &pRequestSense)[i]); @@ -5971,35 +5960,35 @@ SCSI_AlignElements( switch(SenseHandler(DeviceFD, 0 , pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_AlignElements : SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_AlignElements : SENSE_IGNORE\n")); return(0); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_AlignElements : SENSE_RETRY no %d\n", retry); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_AlignElements : SENSE_RETRY no %d\n"), retry); break; case SENSE_ABORT: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_AlignElements : SENSE_ABORT\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_AlignElements : SENSE_ABORT\n")); return(-1); /*NOTREACHED*/ case SENSE_TAPE_NOT_UNLOADED: - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_AlignElements : Tape still loaded, eject failed\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_AlignElements : Tape still loaded, eject failed\n")); return(-1); /*NOTREACHED*/ default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_AlignElements : end %d\n", pRequestSense->SenseKey); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_AlignElements : end %d\n"), pRequestSense->SenseKey); return(pRequestSense->SenseKey); /*NOTREACHED*/ } } if (ret == 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_AlignElements : end %d\n", ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_AlignElements : end %d\n"), ret); return(ret); /*NOTREACHED*/ } } - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_AlignElements :" - "Retries exceeded = %d\n", retry); + DebugPrint(DEBUG_ERROR, SECTION_SCSI, + _("SCSI_AlignElements: Retries exceeded = %d\n"), retry); return(-1); } @@ -6017,7 +6006,7 @@ SCSI_Move( int ret = -1; int i; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START SCSI_Move\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START SCSI_Move\n")); pRequestSense = alloc(SIZEOF(RequestSense_T)); @@ -6037,12 +6026,12 @@ SCSI_Move( ret = SCSI_Run(DeviceFD, Input, CDB, 12, NULL, 0, pRequestSense, SIZEOF(RequestSense_T)); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Move : SCSI_Run = %d\n", ret); - DecodeSense(pRequestSense, "SCSI_Move :",debug_file); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Move : SCSI_Run = %d\n"), ret); + DecodeSense(pRequestSense, _("SCSI_Move :"),debug_file); if (ret < 0) { - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"%s: Request Sense[Inquiry]: %02X", + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("%s: Request Sense[Inquiry]: %02X"), "chs", ((u_char *) &pRequestSense)[0]); for (i = 1; i < (int)sizeof(RequestSense_T); i++) DebugPrint(DEBUG_ERROR, SECTION_SCSI," %02X", ((u_char *) &pRequestSense)[i]); @@ -6055,28 +6044,28 @@ SCSI_Move( switch(SenseHandler(DeviceFD, 0 , pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_IGNORE: - dbprintf(("SCSI_Move : SENSE_IGNORE\n")); + dbprintf(_("SCSI_Move : SENSE_IGNORE\n")); return(0); /*NOTREACHED*/ case SENSE_RETRY: - dbprintf(("SCSI_Move : SENSE_RETRY no %d\n", retry)); + dbprintf(_("SCSI_Move : SENSE_RETRY no %d\n"), retry); break; case SENSE_ABORT: - dbprintf(("SCSI_Move : SENSE_ABORT\n")); + dbprintf(_("SCSI_Move : SENSE_ABORT\n")); return(-1); /*NOTREACHED*/ case SENSE_TAPE_NOT_UNLOADED: - dbprintf(("SCSI_Move : Tape still loaded, eject failed\n")); + dbprintf(_("SCSI_Move : Tape still loaded, eject failed\n")); return(-1); /*NOTREACHED*/ default: - dbprintf(("SCSI_Move : end %d\n", pRequestSense->SenseKey)); + dbprintf(_("SCSI_Move : end %d\n"), pRequestSense->SenseKey); return(pRequestSense->SenseKey); /*NOTREACHED*/ } } } - dbprintf(("SCSI_Move : end %d\n", ret)); + dbprintf(_("SCSI_Move : end %d\n"), ret); return(ret); } @@ -6090,7 +6079,7 @@ SCSI_LoadUnload( CDB_T CDB; int ret; - dbprintf(("##### START SCSI_LoadUnload\n")); + dbprintf(_("##### START SCSI_LoadUnload\n")); CDB[0] = SC_COM_UNLOAD; CDB[1] = byte1; @@ -6107,12 +6096,12 @@ SCSI_LoadUnload( if (ret < 0) { - dbprintf(("SCSI_Unload : failed %d\n", ret)); + dbprintf(_("SCSI_Unload : failed %d\n"), ret); return(-1); /*NOTREACHED*/ } - dbprintf(("##### STOP SCSI_LoadUnload\n")); + dbprintf(_("##### STOP SCSI_LoadUnload\n")); return(ret); } @@ -6124,7 +6113,7 @@ SCSI_TestUnitReady( CDB_T CDB; int ret; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START SCSI_TestUnitReady\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START SCSI_TestUnitReady\n")); CDB[0] = SC_COM_TEST_UNIT_READY; CDB[1] = 0; @@ -6143,7 +6132,7 @@ SCSI_TestUnitReady( */ if (ret > 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"###### STOP SCSI_TestUnitReady (1)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("###### STOP SCSI_TestUnitReady (1)\n")); return(ret); /*NOTREACHED*/ } @@ -6154,7 +6143,7 @@ SCSI_TestUnitReady( */ if (pRequestSense->ErrorCode == 0 && pRequestSense->SenseKey == 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"###### STOP SCSI_TestUnitReady (1)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("###### STOP SCSI_TestUnitReady (1)\n")); return(0); /*NOTREACHED*/ } @@ -6163,12 +6152,12 @@ SCSI_TestUnitReady( * Some sense is set */ if (pRequestSense->ErrorCode != 0){ - DebugPrint(DEBUG_INFO, SECTION_SCSI,"###### STOP SCSI_TestUnitReady ErrorCode set\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("###### STOP SCSI_TestUnitReady ErrorCode set\n")); } if (pRequestSense->SenseKey != 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"###### STOP SCSI_TestUnitReady Sense Key set\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("###### STOP SCSI_TestUnitReady Sense Key set\n")); } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"###### STOP SCSI_TestUnitReady (0)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("###### STOP SCSI_TestUnitReady (0)\n")); return(SCSI_SENSE); } @@ -6188,9 +6177,9 @@ SCSI_ModeSelect( int retry; u_char *sendbuf; - dbprintf(("##### START SCSI_ModeSelect\n")); + dbprintf(_("##### START SCSI_ModeSelect\n")); - dbprintf(("SCSI_ModeSelect start length = %u:\n", (unsigned)length)); + dbprintf(_("SCSI_ModeSelect start length = %u:\n"), (unsigned)length); pRequestSense = alloc(SIZEOF(RequestSense_T)); sendbuf = alloc((size_t)length + 4); memset(sendbuf, 0 , (size_t)length + 4); @@ -6215,7 +6204,7 @@ SCSI_ModeSelect( SIZEOF(RequestSense_T)); if (ret < 0) { - dbprintf(("SCSI_ModeSelect : ret %d\n", ret)); + dbprintf(_("SCSI_ModeSelect : ret %d\n"), ret); goto done; /*NOTREACHED*/ } @@ -6228,12 +6217,12 @@ SCSI_ModeSelect( pRequestSense)) { case SENSE_IGNORE: - dbprintf(("SCSI_ModeSelect : SENSE_IGNORE\n")); + dbprintf(_("SCSI_ModeSelect : SENSE_IGNORE\n")); goto done; /*NOTREACHED*/ case SENSE_RETRY: - dbprintf(("SCSI_ModeSelect : SENSE_RETRY no %d\n", retry)); + dbprintf(_("SCSI_ModeSelect : SENSE_RETRY no %d\n"), retry); break; default: @@ -6243,7 +6232,7 @@ SCSI_ModeSelect( } } end: - dbprintf(("SCSI_ModeSelect end: %d\n", ret)); + dbprintf(_("SCSI_ModeSelect end: %d\n"), ret); done: free(pRequestSense); @@ -6266,9 +6255,9 @@ SCSI_ModeSense( int ret = 1; int retry = 1; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START SCSI_ModeSense\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START SCSI_ModeSense\n")); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense start length = %d:\n", size); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense start length = %d:\n"), size); pRequestSense = alloc(SIZEOF(RequestSense_T)); while (ret && retry < MAX_RETRIES) @@ -6298,14 +6287,14 @@ SCSI_ModeSense( switch(SenseHandler(DeviceFD, 0, pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense : SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense : SENSE_IGNORE\n")); return(0); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense : SENSE_RETRY no %d\n", retry); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense : SENSE_RETRY no %d\n"), retry); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense : end %d\n", pRequestSense->SenseKey); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense : end %d\n"), pRequestSense->SenseKey); return(pRequestSense->SenseKey); /*NOTREACHED*/ } @@ -6313,7 +6302,7 @@ SCSI_ModeSense( retry++; } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense end: %d\n", ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense end: %d\n"), ret); return(ret); } @@ -6331,9 +6320,9 @@ SCSI_Inquiry( assert(size <= UCHAR_MAX); - DebugPrint(DEBUG_INFO, SECTION_SCSI, "##### START SCSI_Inquiry\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("##### START SCSI_Inquiry\n")); - DebugPrint(DEBUG_INFO, SECTION_SCSI, "SCSI_Inquiry start length = %d:\n", size); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("SCSI_Inquiry start length = %d:\n"), size); pRequestSense = alloc((size_t)size); @@ -6354,12 +6343,12 @@ SCSI_Inquiry( SIZEOF(RequestSense_T)); if (ret < 0) { - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"%s: Request Sense[Inquiry]: %02X", + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("%s: Request Sense[Inquiry]: %02X"), "chs", ((u_char *) pRequestSense)[0]); for (i = 1; i < (int)sizeof(RequestSense_T); i++) DebugPrint(DEBUG_ERROR, SECTION_SCSI," %02X", ((u_char *) pRequestSense)[i]); DebugPrint(DEBUG_ERROR, SECTION_SCSI, "\n"); - DebugPrint(DEBUG_ERROR, SECTION_SCSI, "Inquiry end: %d\n", ret); + DebugPrint(DEBUG_ERROR, SECTION_SCSI, _("Inquiry end: %d\n"), ret); return(ret); /*NOTRACHED*/ } @@ -6368,14 +6357,14 @@ SCSI_Inquiry( switch(SenseHandler(DeviceFD, 0, pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Inquiry : SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Inquiry : SENSE_IGNORE\n")); return(0); /*NOTREACHED*/ case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI, "SCSI_Inquiry : SENSE_RETRY no %d\n", retry); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("SCSI_Inquiry : SENSE_RETRY no %d\n"), retry); break; default: - DebugPrint(DEBUG_ERROR, SECTION_SCSI, "SCSI_Inquiry : end %d\n", pRequestSense->SenseKey); + DebugPrint(DEBUG_ERROR, SECTION_SCSI, _("SCSI_Inquiry : end %d\n"), pRequestSense->SenseKey); return(pRequestSense->SenseKey); /*NOTREACHED*/ } @@ -6384,13 +6373,13 @@ SCSI_Inquiry( if (ret == 0) { dump_hex((u_char *)buffer, size, DEBUG_INFO, SECTION_SCSI); - DebugPrint(DEBUG_INFO, SECTION_SCSI, "SCSI_Inquiry : end %d\n", ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI, _("SCSI_Inquiry : end %d\n"), ret); return(ret); /*NOTRACHED*/ } } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_Inquiry end: %d\n", ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_Inquiry end: %d\n"), ret); return(ret); } @@ -6423,7 +6412,7 @@ SCSI_ReadElementStatus( int retry = 1; int ret = -1; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START SCSI_ReadElementStatus\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START SCSI_ReadElementStatus\n")); pRequestSense = alloc(SIZEOF(RequestSense_T)); @@ -6432,7 +6421,7 @@ SCSI_ReadElementStatus( */ if (NoOfElements == 0) { - ChgExit("SCSI_ReadElementStatus","No of Elements passed are le 0",FATAL); + ChgExit("SCSI_ReadElementStatus",_("No of Elements passed are le 0"),FATAL); /*NOTREACHED*/ } @@ -6465,11 +6454,11 @@ SCSI_ReadElementStatus( *data, 8, pRequestSense, SIZEOF(RequestSense_T)); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ReadElementStatus : (1) SCSI_Run %d\n", ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ReadElementStatus : (1) SCSI_Run %d\n"), ret); if (ret < 0) { DecodeSense(pRequestSense, "SCSI_ReadElementStatus :",debug_file); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_ReadElementStatus (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_ReadElementStatus (%d)\n"),ret); return(ret); /*NOTRACHED*/ } @@ -6478,15 +6467,15 @@ SCSI_ReadElementStatus( switch(SenseHandler(DeviceFD, 0, pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense : SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense : SENSE_IGNORE\n")); retry = 0; break; case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense : SENSE_RETRY no %d\n", retry); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense : SENSE_RETRY no %d\n"), retry); sleep(2); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense : end %d\n", pRequestSense->SenseKey); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense : end %d\n"), pRequestSense->SenseKey); return(pRequestSense->SenseKey); /*NOTREACHED*/ } @@ -6499,7 +6488,7 @@ SCSI_ReadElementStatus( } if (retry > 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_ReadElementStatus (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_ReadElementStatus (%d)\n"),ret); return(ret); /*NOTRACHED*/ } @@ -6507,7 +6496,7 @@ SCSI_ReadElementStatus( ElementStatusData = (ElementStatusData_T *)*data; DataBufferLength = V3(ElementStatusData->count); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ReadElementStatus: DataBufferLength %X, ret %d\n",DataBufferLength, ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ReadElementStatus: DataBufferLength %X, ret %d\n"),DataBufferLength, ret); dump_hex(*data, 8, DEBUG_INFO, SECTION_ELEMENT); } else { /* DescriptorSize != 0 */ @@ -6537,11 +6526,11 @@ SCSI_ReadElementStatus( pRequestSense, SIZEOF(RequestSense_T)); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ReadElementStatus : (2) SCSI_Run %d\n", ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ReadElementStatus : (2) SCSI_Run %d\n"), ret); if (ret < 0) { - DecodeSense(pRequestSense, "SCSI_ReadElementStatus :",debug_file); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_ReadElementStatus (%d)\n",ret); + DecodeSense(pRequestSense, _("SCSI_ReadElementStatus :"),debug_file); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_ReadElementStatus (%d)\n"),ret); return(ret); /*NOTRACHED*/ } @@ -6550,15 +6539,15 @@ SCSI_ReadElementStatus( switch(SenseHandler(DeviceFD, 0, pRequestSense->SenseKey, pRequestSense->AdditionalSenseCode, pRequestSense->AdditionalSenseCodeQualifier, pRequestSense)) { case SENSE_IGNORE: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense : SENSE_IGNORE\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense : SENSE_IGNORE\n")); retry = 0; break; case SENSE_RETRY: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense : SENSE_RETRY no %d\n", retry); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense : SENSE_RETRY no %d\n"), retry); sleep(2); break; default: - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_ModeSense : end %d\n", pRequestSense->SenseKey); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_ModeSense : end %d\n"), pRequestSense->SenseKey); return(pRequestSense->SenseKey); /*NOTREACHED*/ } @@ -6572,13 +6561,13 @@ SCSI_ReadElementStatus( if (retry > 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_ReadElementStatus (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_ReadElementStatus (%d)\n"),ret); return(ret); /*NOTRACHED*/ } dump_hex(*data, DataBufferLength, DEBUG_INFO, SECTION_SCSI); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_ReadElementStatus (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_ReadElementStatus (%d)\n"),ret); return(ret); } @@ -6593,8 +6582,8 @@ printf_arglist_function2(void DebugPrint, int, level, int, section, char *, fmt) if (changer->debuglevel) { if (sscanf(changer->debuglevel,"%d:%d", &dlevel, &dsection) != 2) { - dbprintf(("Parse error: line is '%s' expected [0-9]*:[0-9]*\n", - changer->debuglevel)); + dbprintf(_("Parse error: line is '%s' expected [0-9]*:[0-9]*\n"), + changer->debuglevel); dlevel=1; dsection=1; } @@ -6604,16 +6593,16 @@ printf_arglist_function2(void DebugPrint, int, level, int, section, char *, fmt) } arglist_start(argp, fmt); - vsnprintf(buf, SIZEOF(buf), fmt, argp); + g_vsnprintf(buf, SIZEOF(buf), fmt, argp); if (dlevel >= level) { if (section == dsection || dsection == 0) { if (index(buf, '\n') != NULL && strlen(buf) > 1) { - dbprintf(("%ld:%s", (long)ti, buf)); + dbprintf(_("%ld:%s"), (long)ti, buf); } else { - dbprintf(("%s", buf)); + dbprintf("%s", buf); } } } diff --git a/changer-src/scsi-chio.c b/changer-src/scsi-chio.c index 87c6157..d597b5e 100644 --- a/changer-src/scsi-chio.c +++ b/changer-src/scsi-chio.c @@ -7,7 +7,8 @@ * 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" @@ -27,11 +28,15 @@ * and possibly change all the ioctl() calls in this program. */ -#if defined(HAVE_CHIO_H) -# include -#else /* HAVE_SYS_CHIO_H must be defined */ -# include -#endif +#if defined(HAVE_LINUX_CHIO_H) +# include +#else +# if defined(HAVE_CHIO_H) +# include +# else /* HAVE_SYS_CHIO_H must be defined */ +# include +# endif /* HAVE_CHIO_H */ +#endif /* HAVE_LINUX_CHIO_H */ char *modname = "@(#)" __FILE__ ": SCSI support library for the chio(2) interface @(#)"; @@ -41,8 +46,22 @@ char *modname = "@(#)" __FILE__ */ 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 +83,8 @@ int GetCurrentSlot(int fd, int drive) int slot; int i, rc; + (void)drive; + get_changer_info(fd); ces.ces_type = CHET_ST; @@ -71,35 +92,40 @@ int GetCurrentSlot(int fd, int drive) 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; @@ -109,11 +135,11 @@ struct mtop mt_com; 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 +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 +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; @@ -160,8 +188,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; } @@ -188,8 +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 +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; @@ -218,8 +244,7 @@ int rc; 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 +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; @@ -244,8 +269,7 @@ int rc; 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 +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 +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; } @@ -280,7 +302,8 @@ int rc; } /* 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; @@ -294,25 +317,60 @@ int Tape_Ready ( char *tapedev , int wait) 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 --git a/changer-src/scsi-hpux.c b/changer-src/scsi-hpux.c index 56179b1..1d379a8 100644 --- a/changer-src/scsi-hpux.c +++ b/changer-src/scsi-hpux.c @@ -38,7 +38,6 @@ #include "amanda.h" -#if defined(HAVE_HPUX_SCSI_CHIO) # include # include /* for eject_tape ioctls */ @@ -157,7 +156,7 @@ int rc; rc = ioctl(fd, SIOC_ELEMENT_STATUS, &es); if (rc) { - fprintf(stderr, "%s: element status query failed: 0x%x %s\n", + g_fprintf(stderr, _("%s: element status query failed: 0x%x %s\n"), get_pname(), rc, strerror(errno)); return(-1); } @@ -183,7 +182,7 @@ int i, rc; && !rc && es.full); if (rc) { - fprintf(stderr,"%s: element status query failed: 0x%x %s\n", + g_fprintf(stderr,_("%s: element status query failed: 0x%x %s\n"), get_pname(), rc, strerror(errno)); return -1; } @@ -204,7 +203,7 @@ int i,rc; rc = ioctl(fd, SIOC_ELEMENT_STATUS, &es); if (rc) { - fprintf(stderr,"%s: drive status quer failed: 0x%x %s\n", + g_fprintf(stderr,_("%s: drive status quer failed: 0x%x %s\n"), get_pname(), rc, strerror(errno)); return(-1); } @@ -234,7 +233,7 @@ int rc; rc = ioctl(fd, SIOC_MOVE_MEDIUM, &move); if (rc){ - fprintf(stderr,"%s: move medium command failed: 0x%x %s\n", + g_fprintf(stderr,_("%s: move medium command failed: 0x%x %s\n"), get_pname(), rc, strerror(errno)); return(-2); } @@ -264,7 +263,7 @@ int rc; rc = ioctl(fd, SIOC_MOVE_MEDIUM,&move); if (rc){ - fprintf(stderr,"%s: drive load failed (MOVE): 0x%x %s\n", + g_fprintf(stderr,_("%s: drive load failed (MOVE): 0x%x %s\n"), get_pname(), rc, strerror(errno)); return(-2); } @@ -277,7 +276,7 @@ int rc; rc = get_changer_info(fd); if (rc) { - fprintf(stderr, "%s: storage size query failed: 0x%x %s\n", get_pname(), + g_fprintf(stderr, _("%s: storage size query failed: 0x%x %s\n"), get_pname(), rc, strerror(errno)); return -1; } @@ -292,7 +291,7 @@ int get_drive_count(int fd) rc = get_changer_info(fd); if (rc) { - fprintf(stderr, "%s: drive count query failed: 0x%x %s\n", get_pname(), + g_fprintf(stderr, _("%s: drive count query failed: 0x%x %s\n"), get_pname(), rc, strerror(errno)); return -1; } @@ -326,7 +325,7 @@ int OpenDevice(char * tapedev) int DeviceFD; DeviceFD = open(tapedev, O_RDWR); - dbprintf(("%s: OpenDevice(%s) returns %d\n", get_pname(), tapedev, DeviceFD)); + dbprintf(_("OpenDevice(%s) returns %d\n"), tapedev, DeviceFD); return(DeviceFD); } @@ -335,8 +334,6 @@ int CloseDevice(char *device, int DeviceFD) int ret; ret = close(DeviceFD); - dbprintf(("%s: CloseDevice(%s) returns %d\n", get_pname(), device, ret)); + dbprintf(_("CloseDevice(%s) returns %d\n"), device, ret); return(ret); } - -#endif diff --git a/changer-src/scsi-hpux_new.c b/changer-src/scsi-hpux_new.c index e96ed47..288bff2 100644 --- a/changer-src/scsi-hpux_new.c +++ b/changer-src/scsi-hpux_new.c @@ -32,23 +32,7 @@ */ -#include - -#ifdef HAVE_HPUX_LIKE_SCSI - -# ifdef HAVE_FCNTL_H -#include -#endif -/* -#ifdef HAVE_STDIO_H -*/ -#include -/* -#endif -*/ -#ifdef HAVE_SYS_IOCTL_H -#include -#endif +#include "amanda.h" #include #include @@ -190,9 +174,9 @@ int SCSI_ExecuteCommand(int DeviceFD, { if (SCSI_OpenDevice(DeviceFD) == 0) { - dbprintf(("SCSI_ExecuteCommand could not open %s: %s\n", + dbprintf(_("SCSI_ExecuteCommand could not open %s: %s\n"), pDev[DeviceFD].dev, - strerror(errno))); + strerror(errno)); sleep(1); /* Give device a little time befor retry */ continue; } @@ -251,7 +235,7 @@ int Tape_Ioctl( int DeviceFD, int command) if (ioctl(pDev[DeviceFD].fd , MTIOCTOP, &mtop) != 0) { - dbprintf(("Tape_Ioctl error ioctl %s\n", strerror(errno))); + dbprintf(_("Tape_Ioctl error ioctl %s\n"), strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } @@ -274,12 +258,12 @@ int Tape_Status( int DeviceFD) if (ioctl(pDev[DeviceFD].fd, MTIOCGET, &mtget) != 0) { - dbprintf(("Tape_Status error ioctl %s\n", strerror(errno))); + dbprintf(_("Tape_Status error ioctl %s\n"), strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } - dbprintf(("ioctl -> mtget.mt_gstat %X\n",mtget.mt_gstat)); + dbprintf(_("ioctl -> mtget.mt_gstat %X\n"),mtget.mt_gstat); if (GMT_ONLINE(mtget.mt_gstat)) { ret = TAPE_ONLINE; @@ -311,7 +295,6 @@ int ScanBus(int print) */ return(-1); } -#endif /* * Local variables: * indent-tabs-mode: nil diff --git a/changer-src/scsi-irix.c b/changer-src/scsi-irix.c index f018ceb..412a648 100644 --- a/changer-src/scsi-irix.c +++ b/changer-src/scsi-irix.c @@ -32,26 +32,7 @@ */ -#include - -#ifdef HAVE_IRIX_LIKE_SCSI - -/* -#ifdef HAVE_STDIO_H -*/ -#include -/* -#endif -*/ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif +#include "amanda.h" #include #include @@ -211,9 +192,9 @@ int SCSI_ExecuteCommand(int DeviceFD, { if (SCSI_OpenDevice(DeviceFD) == 0) { - dbprintf(("SCSI_ExecuteCommand could not open %s: %s\n", + dbprintf(_("SCSI_ExecuteCommand could not open %s: %s\n"), pDev[DeviceFD].dev, - strerror(errno))); + strerror(errno)); sleep(1); /* Give device a little time befor retry */ continue; } @@ -228,7 +209,7 @@ int SCSI_ExecuteCommand(int DeviceFD, return (SCSI_ERROR); } DecodeSCSI(CDB, "SCSI_ExecuteCommand : "); - dbprintf(("\t\t\tSTATUS(%02X) RET(%02X)\n", STATUS(&ds), RET(&ds))); + dbprintf(_("\t\t\tSTATUS(%02X) RET(%02X)\n"), STATUS(&ds), RET(&ds)); switch (STATUS(&ds)) { case ST_BUSY: /* BUSY */ @@ -303,7 +284,7 @@ int Tape_Status( int DeviceFD) if (ioctl(pDev[DeviceFD].fd , MTIOCGET, &mtget) != 0) { - dbprintf(("Tape_Status error ioctl %s\n",strerror(errno))); + dbprintf(_("Tape_Status error ioctl %s\n"),strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } @@ -344,7 +325,7 @@ int ScanBus(int print) if ((dir = opendir("/dev/scsi")) == NULL) { - dbprintf(("Can not read /dev/scsi: %s", strerror(errno))); + dbprintf(_("Can not read /dev/scsi: %s"), strerror(errno)); return 0; } @@ -354,7 +335,7 @@ int ScanBus(int print) { pDev[count].dev = malloc(10); pDev[count].inqdone = 0; - sprintf(pDev[count].dev,"/dev/scsi/%s", dirent->d_name); + g_sprintf(pDev[count].dev,"/dev/scsi/%s", dirent->d_name); if (OpenDevice(count,pDev[count].dev, "Scan", NULL )) { SCSI_CloseDevice(count); @@ -362,48 +343,48 @@ int ScanBus(int print) if (print) { - printf("name /dev/scsi/%s ", dirent->d_name); + g_printf(_("name /dev/scsi/%s "), dirent->d_name); switch (pDev[count].inquiry->type) { case TYPE_DISK: - printf("Disk"); + g_printf(_("Disk")); break; case TYPE_TAPE: - printf("Tape"); + g_printf(_("Tape")); break; case TYPE_PRINTER: - printf("Printer"); + g_printf(_("Printer")); break; case TYPE_PROCESSOR: - printf("Processor"); + g_printf(_("Processor")); break; case TYPE_WORM: - printf("Worm"); + g_printf(_("Worm")); break; case TYPE_CDROM: - printf("Cdrom"); + g_printf(_("Cdrom")); break; case TYPE_SCANNER: - printf("Scanner"); + g_printf(_("Scanner")); break; case TYPE_OPTICAL: - printf("Optical"); + g_printf(_("Optical")); break; case TYPE_CHANGER: - printf("Changer"); + g_printf(_("Changer")); break; case TYPE_COMM: - printf("Comm"); + g_printf(_("Comm")); break; default: - printf("unknown %d",pDev[count].inquiry->type); + g_printf(_("unknown %d"),pDev[count].inquiry->type); break; } - printf("\n"); + g_printf("\n"); } count++; - printf("Count %d\n",count); + g_printf(_("Count %d\n"),count); } else { free(pDev[count].dev); pDev[count].dev=NULL; @@ -413,7 +394,6 @@ int ScanBus(int print) return 0; } -#endif /* * Local variables: * indent-tabs-mode: nil diff --git a/changer-src/scsi-linux.c b/changer-src/scsi-linux.c index d0dcaeb..396e897 100644 --- a/changer-src/scsi-linux.c +++ b/changer-src/scsi-linux.c @@ -32,40 +32,7 @@ */ -#include - -#ifdef HAVE_DMALLOC_H -#include -#endif - -#ifdef HAVE_LINUX_LIKE_SCSI - -/* -#ifdef HAVE_STDIO_H -*/ -#include -/* -#endif -*/ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_DIRENT_H -#include -#endif - -#include - -#ifdef HAVE_SCSI_SCSI_IOCTL_H -#include -#endif +#include "amanda.h" #ifdef HAVE_SCSI_SG_H #include @@ -121,21 +88,21 @@ int SCSI_OpenDevice(int ip) char *buffer = NULL ; /* Will contain the device name after checking */ int openmode = O_RDONLY; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### START SCSI_OpenDevice\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### START SCSI_OpenDevice\n")); if (pDev[ip].inqdone == 0) { pDev[ip].inqdone = 1; if (strncmp("/dev/sg", pDev[ip].dev, 7) != 0) /* Check if no sg device for an link .... */ { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_OpenDevice : checking if %s is a sg device\n", pDev[ip].dev); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_OpenDevice : checking if %s is a sg device\n"), pDev[ip].dev); if (lstat(pDev[ip].dev, &pstat) != -1) { if (S_ISLNK(pstat.st_mode) == 1) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_OpenDevice : is a link, checking destination\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_OpenDevice : is a link, checking destination\n")); if ((buffer = (char *)malloc(513)) == NULL) { - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"SCSI_OpenDevice : malloc failed\n"); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("SCSI_OpenDevice : malloc failed\n")); return(0); } memset(buffer, 0, 513); @@ -151,16 +118,16 @@ int SCSI_OpenDevice(int ip) { if (strncmp("/dev/sg", buffer, 7) == 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_OpenDevice : link points to %s\n", buffer) ; + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_OpenDevice : link points to %s\n"), buffer) ; pDev[ip].flags = 1; } } } else {/* S_ISLNK(pstat.st_mode) == 1 */ - DebugPrint(DEBUG_INFO, SECTION_SCSI,"No link %s\n", pDev[ip].dev) ; + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("No link %s\n"), pDev[ip].dev) ; buffer = stralloc(pDev[ip].dev); } } else {/* lstat(DeviceName, &pstat) != -1 */ - DebugPrint(DEBUG_ERROR, SECTION_SCSI,"can't stat device %s\n", pDev[ip].dev); + DebugPrint(DEBUG_ERROR, SECTION_SCSI,_("can't stat device %s\n"), pDev[ip].dev); return(0); } } else { @@ -173,19 +140,19 @@ int SCSI_OpenDevice(int ip) openmode = O_RDWR; } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"Try to open %s\n", buffer); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("Try to open %s\n"), buffer); if ((DeviceFD = open(buffer, openmode)) >= 0) { pDev[ip].avail = 1; pDev[ip].devopen = 1; pDev[ip].fd = DeviceFD; } else { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_OpenDevice open failed\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_OpenDevice open failed\n")); amfree(buffer); return(0); } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"done\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("done\n")); if ( pDev[ip].flags == 1) { pDev[ip].SCSI = 1; @@ -194,14 +161,14 @@ int SCSI_OpenDevice(int ip) pDev[ip].dev = buffer; if (pDev[ip].SCSI == 1) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_OpenDevice : use SG interface\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_OpenDevice : use SG interface\n")); if ((timeout = ioctl(pDev[ip].fd, SG_GET_TIMEOUT)) > 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_OpenDevice : current timeout %d\n", timeout); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_OpenDevice : current timeout %d\n"), timeout); timeout = 60000; if (ioctl(pDev[ip].fd, SG_SET_TIMEOUT, &timeout) == 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_OpenDevice : timeout set to %d\n", timeout); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_OpenDevice : timeout set to %d\n"), timeout); } } pDev[ip].inquiry = (SCSIInquiry_T *)malloc(INQUIRY_SIZE); @@ -228,12 +195,12 @@ int SCSI_OpenDevice(int ip) } PrintInquiry(pDev[ip].inquiry); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_OpenDevice (1)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_OpenDevice (1)\n")); return(1); } else { close(DeviceFD); amfree(pDev[ip].inquiry); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_OpenDevice (0)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_OpenDevice (0)\n")); return(0); } } else { @@ -242,15 +209,15 @@ int SCSI_OpenDevice(int ip) close(DeviceFD); amfree(pDev[ip].inquiry); pDev[ip].inquiry = NULL; - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_OpenDevice (1)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_OpenDevice (1)\n")); return(1); } } else /* if (pDev[ip].SCSI == 1) */ { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"Device not capable for SCSI commands\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("Device not capable for SCSI commands\n")); pDev[ip].SCSI = 0; pDev[ip].devopen = 0; close(DeviceFD); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_OpenDevice (1)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_OpenDevice (1)\n")); return(1); } } else { /* if (pDev[ip].inqdone == 0) */ @@ -268,22 +235,22 @@ int SCSI_OpenDevice(int ip) { if ((timeout = ioctl(pDev[ip].fd, SG_GET_TIMEOUT)) > 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_OpenDevice : current timeout %d\n", timeout); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_OpenDevice : current timeout %d\n"), timeout); timeout = 60000; if (ioctl(pDev[ip].fd, SG_SET_TIMEOUT, &timeout) == 0) { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"SCSI_OpenDevice : timeout set to %d\n", timeout); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("SCSI_OpenDevice : timeout set to %d\n"), timeout); } } } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_OpenDevice (1)\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_OpenDevice (1)\n")); return(1); } else { - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_OpenDevice open failed\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_OpenDevice open failed\n")); return(0); } } - DebugPrint(DEBUG_INFO, SECTION_SCSI,"##### STOP SCSI_OpenDevice should not happen !!\n"); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("##### STOP SCSI_OpenDevice should not happen !!\n")); return(0); } @@ -327,7 +294,7 @@ int SCSI_ExecuteCommand(int DeviceFD, buffer = (char *)malloc(SCSI_OFF + CDB_Length + DataBufferLength); if (buffer == NULL) { - dbprintf(("SCSI_ExecuteCommand memory allocation failure.\n")); + dbprintf(_("SCSI_ExecuteCommand memory allocation failure.\n")); SCSI_CloseDevice(DeviceFD); return(-1); } @@ -361,7 +328,7 @@ int SCSI_ExecuteCommand(int DeviceFD, (status != (ssize_t)(SCSI_OFF + CDB_Length + osize)) || (psg_header->result != 0)) { - dbprintf(("SCSI_ExecuteCommand error send \n")); + dbprintf(_("SCSI_ExecuteCommand error send \n")); SCSI_CloseDevice(DeviceFD); amfree(buffer); return(SCSI_ERROR); @@ -376,8 +343,8 @@ int SCSI_ExecuteCommand(int DeviceFD, (status != (ssize_t)(SCSI_OFF + DataBufferLength)) || (psg_header->result != 0)) { - dbprintf(("SCSI_ExecuteCommand error read \n")); - dbprintf(("Status " SSIZE_T_FMT " (" SSIZE_T_FMT ") %2X\n", status, SCSI_OFF + DataBufferLength,psg_header->result )); + dbprintf(_("SCSI_ExecuteCommand error read \n")); + dbprintf(_("Status %zd (%zd) %2X\n"), status, SCSI_OFF + DataBufferLength,psg_header->result ); SCSI_CloseDevice(DeviceFD); amfree(buffer); return(SCSI_ERROR); @@ -420,7 +387,7 @@ int SCSI_OpenDevice(int ip) pDev[ip].fd = DeviceFD; pDev[ip].SCSI = 0; pDev[ip].inquiry = (SCSIInquiry_T *)malloc(INQUIRY_SIZE); - dbprintf(("SCSI_OpenDevice : use ioctl interface\n")); + dbprintf(_("SCSI_OpenDevice : use ioctl interface\n")); if (SCSI_Inquiry(ip, pDev[ip].inquiry, (u_char)INQUIRY_SIZE) == 0) { if (pDev[ip].inquiry->type == TYPE_TAPE || pDev[ip].inquiry->type == TYPE_CHANGER) @@ -549,7 +516,7 @@ int Tape_Ioctl( int DeviceFD, int command) if (ioctl(pDev[DeviceFD].fd , MTIOCTOP, &mtop) != 0) { - dbprintf(("Tape_Ioctl error ioctl %s\n",strerror(errno))); + dbprintf(_("Tape_Ioctl error ioctl %s\n"),strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } @@ -572,13 +539,13 @@ int Tape_Status( int DeviceFD) if (ioctl(pDev[DeviceFD].fd , MTIOCGET, &mtget) != 0) { - DebugPrint(DEBUG_ERROR, SECTION_TAPE,"Tape_Status error ioctl %s\n", + DebugPrint(DEBUG_ERROR, SECTION_TAPE,_("Tape_Status error ioctl %s\n"), strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } - DebugPrint(DEBUG_INFO, SECTION_TAPE,"ioctl -> mtget.mt_gstat %lX\n",mtget.mt_gstat); + DebugPrint(DEBUG_INFO, SECTION_TAPE,_("ioctl -> mtget.mt_gstat %lX\n"),mtget.mt_gstat); if (GMT_ONLINE(mtget.mt_gstat)) { ret = TAPE_ONLINE; @@ -621,7 +588,7 @@ int ScanBus(int print) if ((dir = opendir("/dev/")) == NULL) { - dbprintf(("/dev/ error: %s", strerror(errno))); + dbprintf(_("/dev/ error: %s"), strerror(errno)); return 0; } @@ -631,7 +598,7 @@ int ScanBus(int print) { pDev[count].dev = malloc(10); pDev[count].inqdone = 0; - snprintf(pDev[count].dev, SIZEOF(pDev[count].dev), + g_snprintf(pDev[count].dev, SIZEOF(pDev[count].dev), "/dev/%s", dirent->d_name); if (OpenDevice(count,pDev[count].dev, "Scan", NULL )) { @@ -640,48 +607,48 @@ int ScanBus(int print) if (print) { - printf("name /dev/%s ", dirent->d_name); + g_printf(_("name /dev/%s "), dirent->d_name); switch (pDev[count].inquiry->type) { case TYPE_DISK: - printf("Disk"); + g_printf(_("Disk")); break; case TYPE_TAPE: - printf("Tape"); + g_printf(_("Tape")); break; case TYPE_PRINTER: - printf("Printer"); + g_printf(_("Printer")); break; case TYPE_PROCESSOR: - printf("Processor"); + g_printf(_("Processor")); break; case TYPE_WORM: - printf("Worm"); + g_printf(_("Worm")); break; case TYPE_CDROM: - printf("Cdrom"); + g_printf(_("Cdrom")); break; case TYPE_SCANNER: - printf("Scanner"); + g_printf(_("Scanner")); break; case TYPE_OPTICAL: - printf("Optical"); + g_printf(_("Optical")); break; case TYPE_CHANGER: - printf("Changer"); + g_printf(_("Changer")); break; case TYPE_COMM: - printf("Comm"); + g_printf(_("Comm")); break; default: - printf("unknown %d",pDev[count].inquiry->type); + g_printf(_("unknown %d"),pDev[count].inquiry->type); break; } - printf("\n"); + g_printf("\n"); } count++; - printf("Count %d\n",count); + g_printf(_("Count %d\n"),count); } else { amfree(pDev[count].dev); pDev[count].dev=NULL; @@ -690,7 +657,6 @@ int ScanBus(int print) } return 0; } -#endif /* * Local variables: * indent-tabs-mode: nil diff --git a/changer-src/scsi-proto.c b/changer-src/scsi-proto.c index 8f6fd77..4c53d17 100644 --- a/changer-src/scsi-proto.c +++ b/changer-src/scsi-proto.c @@ -15,8 +15,6 @@ #include "amanda.h" #include "libscsi.h" -#if defined(PROTO_H) - char *modname = "@(#)" __FILE__ ": SCSI support library for the proto scsi interface @(#)"; @@ -124,5 +122,3 @@ int get_drive_count(int fd) */ return number_of_data-transfer_devices; } - -#endif diff --git a/changer-src/scsi-solaris.c b/changer-src/scsi-solaris.c index 891420a..33cf875 100644 --- a/changer-src/scsi-solaris.c +++ b/changer-src/scsi-solaris.c @@ -32,25 +32,7 @@ */ -#include - -#ifdef HAVE_SOLARIS_LIKE_SCSI -/* -#ifdef HAVE_STDIO_H -*/ -#include -/* -#endif -*/ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif +#include "amanda.h" #include @@ -116,7 +98,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 { @@ -155,7 +137,6 @@ int SCSI_ExecuteCommand(int DeviceFD, extern FILE * debug_file; int ret = 0; int retries = 1; - extern int errno; struct uscsi_cmd Command; static int depth = 0; @@ -230,8 +211,8 @@ int SCSI_ExecuteCommand(int DeviceFD, ret = Command.uscsi_status; break; } - dbprintf(("ioctl on %d failed, errno %s, ret %d\n", - pDev[DeviceFD].fd, strerror(errno), ret)); + dbprintf(_("ioctl on %d failed, errno %s, ret %d\n"), + pDev[DeviceFD].fd, strerror(errno), ret); #if 0 RequestSense(DeviceFD, &pExtendedRequestSense, 0); #endif @@ -241,7 +222,7 @@ int SCSI_ExecuteCommand(int DeviceFD, --depth; SCSI_CloseDevice(DeviceFD); - DebugPrint(DEBUG_INFO, SECTION_SCSI,"ioctl ret (%d)\n",ret); + DebugPrint(DEBUG_INFO, SECTION_SCSI,_("ioctl ret (%d)\n"),ret); return(SCSI_OK); } @@ -271,7 +252,7 @@ int Tape_Ioctl( int DeviceFD, int command) if (ioctl(pDev[DeviceFD].fd , MTIOCTOP, &mtop) != 0) { - dbprintf(("Tape_Ioctl error ioctl %s\n", strerror(errno))); + dbprintf(_("Tape_Ioctl error ioctl %s\n"), strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } @@ -293,7 +274,7 @@ int Tape_Status( int DeviceFD) if (ioctl(pDev[DeviceFD].fd , MTIOCGET, &mtget) != 0) { - dbprintf(("Tape_Status error ioctl %s\n", strerror(errno))); + dbprintf(_("Tape_Status error ioctl %s\n"), strerror(errno)); SCSI_CloseDevice(DeviceFD); return(-1); } @@ -304,8 +285,8 @@ int Tape_Status( int DeviceFD) * 0x2 is no tape online */ - DebugPrint(DEBUG_INFO, SECTION_TAPE, "ioctl result for mt_dsreg (%d)\n", mtget.mt_dsreg); - DebugPrint(DEBUG_INFO, SECTION_TAPE, "ioctl result for mt_erreg (%d)\n", mtget.mt_erreg); + DebugPrint(DEBUG_INFO, SECTION_TAPE, _("ioctl result for mt_dsreg (%d)\n"), mtget.mt_dsreg); + DebugPrint(DEBUG_INFO, SECTION_TAPE, _("ioctl result for mt_erreg (%d)\n"), mtget.mt_erreg); if (mtget.mt_erreg == 0) { @@ -328,7 +309,6 @@ int ScanBus(int print) return(-1); } -#endif /* * Local variables: * indent-tabs-mode: nil diff --git a/changer-src/sense.c b/changer-src/sense.c index e1e9966..cca3904 100644 --- a/changer-src/sense.c +++ b/changer-src/sense.c @@ -1,12 +1,4 @@ -#include - -#ifdef HAVE_STDIO_H -#include -#endif - -#ifdef HAVE_STRING_H -#include -#endif +#include "amanda.h" #include "scsi-defs.h" /* @@ -27,301 +19,301 @@ /* * Generic one, this is used if not information is found based on the ident of the device */ - { "generic", "", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense"}, - { "generic", "", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, + { "generic", "", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense")}, + { "generic", "", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, - { "generic", "", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, "Recovered Error"}, - { "generic", "", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_RECOVERED_ERROR"}, + { "generic", "", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, T_("Recovered Error")}, + { "generic", "", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_RECOVERED_ERROR")}, - { "generic", "", TYPE_TAPE , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, "Not Ready"}, - { "generic", "", TYPE_TAPE , SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, "The drive is not ready, but it is in the process of becoming ready"}, - { "generic", "", TYPE_TAPE , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "generic", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "generic", "", TYPE_TAPE , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, T_("Not Ready")}, + { "generic", "", TYPE_TAPE , SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, T_("The drive is not ready, but it is in the process of becoming ready")}, + { "generic", "", TYPE_TAPE , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "generic", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "generic", "", TYPE_TAPE , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, "Medium Error"}, - { "generic", "", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_MEDIUM_ERROR"}, + { "generic", "", TYPE_TAPE , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Medium Error")}, + { "generic", "", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_MEDIUM_ERROR")}, - { "generic", "", TYPE_TAPE , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, "Hardware Error"}, - { "generic", "", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, + { "generic", "", TYPE_TAPE , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Hardware Error")}, + { "generic", "", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, - { "generic", "", TYPE_TAPE , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "generic", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "generic", "", TYPE_TAPE , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "generic", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "generic", "", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "generic", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_UNIT_ATTENTION"}, + { "generic", "", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "generic", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_UNIT_ATTENTION")}, - { "generic", "", TYPE_TAPE , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "generic", "", TYPE_TAPE , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, - { "generic", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense"}, - { "generic", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, + { "generic", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense")}, + { "generic", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, - { "generic", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, "Recovered Error"}, - { "generic", "", TYPE_CHANGER, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_RECOVERED_ERROR"}, + { "generic", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, T_("Recovered Error")}, + { "generic", "", TYPE_CHANGER, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_RECOVERED_ERROR")}, - { "generic", "", TYPE_CHANGER , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, "Not Ready"}, - { "generic", "", TYPE_CHANGER , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "generic", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "generic", "", TYPE_CHANGER , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, T_("Not Ready")}, + { "generic", "", TYPE_CHANGER , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "generic", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "generic", "", TYPE_CHANGER , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, "Medium Error"}, - { "generic", "", TYPE_CHANGER, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_MEDIUM_ERROR"}, + { "generic", "", TYPE_CHANGER , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Medium Error")}, + { "generic", "", TYPE_CHANGER, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_MEDIUM_ERROR")}, - { "generic", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, "Hardware Error"}, - { "generic", "", TYPE_CHANGER, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, + { "generic", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Hardware Error")}, + { "generic", "", TYPE_CHANGER, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, - { "generic", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "generic", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "generic", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "generic", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "generic", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "generic", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_UNIT_ATTENTION"}, + { "generic", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "generic", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_UNIT_ATTENTION")}, - { "generic", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, + { "generic", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, - { "generic", "", TYPE_CHANGER , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "generic", "", TYPE_CHANGER , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * * ADIC DAT Autochanger * */ - { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense"}, - { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, + { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense")}, + { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, - { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, "Recovered Error"}, - { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_RECOVERED_ERROR"}, + { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, T_("Recovered Error")}, + { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_RECOVERED_ERROR")}, - { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, "Not Ready"}, - { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, T_("Not Ready")}, + { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, "Medium Error"}, - { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_MEDIUM_ERROR"}, + { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Medium Error")}, + { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_MEDIUM_ERROR")}, - { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, "Hardware Error"}, - { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, + { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Hardware Error")}, + { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, - { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x28, 0x01, SENSE_IES, "Door opend"}, - { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_UNIT_ATTENTION"}, + { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "DAT AutoChanger", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x28, 0x01, SENSE_IES, T_("Door opend")}, + { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_UNIT_ATTENTION")}, - { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, + { "DAT AutoChanger", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, - { "DAT AutoChanger", "", TYPE_CHANGER , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "DAT AutoChanger", "", TYPE_CHANGER , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * * L500 (for the L500 ATL library) * */ - { "L500", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense"}, - { "L500", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, + { "L500", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense")}, + { "L500", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, - { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, "Recovered Error"}, - { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0a, 0x0, SENSE_IGNORE, "Error Log overflow"}, - { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x44, 0xc1, SENSE_IGNORE, "EEPROM Copy 1 bad"}, - { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x44, 0xc2, SENSE_IGNORE, "EEPROM Copy 2 bad"}, - { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x47, 0x0, SENSE_IGNORE, "SCSI parity error"}, - { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x48, 0x0, SENSE_IGNORE, "SCSI IDE message received"}, - { "L500", "", TYPE_CHANGER, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_RECOVERED_ERROR"}, + { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, T_("Recovered Error")}, + { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0a, 0x0, SENSE_IGNORE, T_("Error Log overflow")}, + { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x44, 0xc1, SENSE_IGNORE, T_("EEPROM Copy 1 bad")}, + { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x44, 0xc2, SENSE_IGNORE, T_("EEPROM Copy 2 bad")}, + { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x47, 0x0, SENSE_IGNORE, T_("SCSI parity error")}, + { "L500", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x48, 0x0, SENSE_IGNORE, T_("SCSI IDE message received")}, + { "L500", "", TYPE_CHANGER, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_RECOVERED_ERROR")}, - { "L500", "", TYPE_CHANGER , SENSE_NOT_READY, 0x0, 0x0, SENSE_ABORT, "Scsi port not initialized"}, - { "L500", "", TYPE_CHANGER , SENSE_NOT_READY, 0x04, 0x01, SENSE_RETRY, "Becoming ready, scanning magazines, etc"}, - { "L500", "", TYPE_CHANGER , SENSE_NOT_READY, 0x04, 0x03, SENSE_ABORT, "Unit not ready: manual intervention required: Door Open"}, + { "L500", "", TYPE_CHANGER , SENSE_NOT_READY, 0x0, 0x0, SENSE_ABORT, T_("Scsi port not initialized")}, + { "L500", "", TYPE_CHANGER , SENSE_NOT_READY, 0x04, 0x01, SENSE_RETRY, T_("Becoming ready, scanning magazines, etc")}, + { "L500", "", TYPE_CHANGER , SENSE_NOT_READY, 0x04, 0x03, SENSE_ABORT, T_("Unit not ready: manual intervention required: Door Open")}, /* needed? */ - { "L500", "", TYPE_CHANGER , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "L500", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "L500", "", TYPE_CHANGER , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "L500", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, /* Not used by L500 - { "L500", "", TYPE_CHANGER , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, "Medium Error"}, - { "L500", "", TYPE_CHANGER, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_MEDIUM_ERROR"}, + { "L500", "", TYPE_CHANGER , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Medium Error")}, + { "L500", "", TYPE_CHANGER, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_MEDIUM_ERROR")}, */ - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, "Hardware Error"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x3a, 0x80, SENSE_ABORT, "Media not present"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x40, 0x84, SENSE_ABORT, "POST soft failure"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0x80, SENSE_ABORT, "Loader Communications timeout"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0x81, SENSE_ABORT, "Loader communications UART error or buffer overflow"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0x86, SENSE_ABORT, "bad status returned from loader"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0xc3, SENSE_ABORT, "EEPROM both copies bad"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0xff, SENSE_ABORT, "Unexpected status from test"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x70, SENSE_ABORT, "Cartridge has no home"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x71, SENSE_ABORT, "Loader mechanism problem"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x72, SENSE_ABORT, "Tape drive handle problem"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x73, SENSE_IGNORE, "No cartridge in drive during unload"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x74, SENSE_ABORT, "Loader mechanism problem, after retries"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x75, SENSE_ABORT, "Timeout moving cartridge from drive"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x76, SENSE_ABORT, "Timeout unloading cartridge into slot"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x77, SENSE_ABORT, "Couldn't unlock door after retries"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x78, SENSE_ABORT, "Error during SCAN MAGAZINE"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x79, SENSE_ABORT, "Couldn't lock door after retries"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x80, SENSE_ABORT, "Unexpected door open"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x81, SENSE_ABORT, "Didn't find all expected slots during elevator movement"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x82, SENSE_ABORT, "Cartridge alreay in drive during LOAD CARTRIDGE"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x83, SENSE_ABORT, "Slot empty during LOAD CARTRIDGE"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x84, SENSE_ABORT, "Cleaning Tape expired"}, - { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x85, SENSE_ABORT, "Cleaning Failed"}, - { "L500", "", TYPE_CHANGER, SENSE_HARDWARE_ERROR, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, - - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x1a, 0x0, SENSE_ABORT, "Parameter length error"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x20, 0x0, SENSE_ABORT, "SCSI invalid opcode"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x21, 0x01, SENSE_ABORT, "Invalid element address"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x00, SENSE_ABORT, "Invalid CDB"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x81, SENSE_ABORT, "Invalid mode on WRITE BUFFER"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x82, SENSE_ABORT, "Invalid drive specified"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x83, SENSE_ABORT, "SEND DIAG Invalid test number"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x86, SENSE_ABORT, "Invalid offset on WRITE BUFFER"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x87, SENSE_ABORT, "Invalid size on WRITE BUFFER"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x89, SENSE_ABORT, "Image data too large on WRITE BUFFER"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x8b, SENSE_ABORT, "Invalid image for CUP"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x8c, SENSE_ABORT, "Non-immediate command during CUP"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x8e, SENSE_ABORT, "Invalid personality for CUP"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x8f, SENSE_ABORT, "Bad controller image EDC"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x25, 0x0, SENSE_ABORT, "Invalid LUN"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x26, 0x0, SENSE_ABORT, "Parameter list error: invalid field"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x26, 0x01, SENSE_ABORT, "Parameter list error: parameter not supported"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x39, 0x0, SENSE_ABORT, "Saving parameters not supported"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3a, 0x81, SENSE_ABORT, "Cleaning Slot empty"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3a, 0x82, SENSE_ABORT, "Cleaning slot doesn't have a cleaning slot"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3b, 0x0d, SENSE_ABORT, "Destination element full"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3b, 0x0e, SENSE_ABORT, "Source slot or drive empty"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3d, 0x0, SENSE_ABORT, "SCSI invalid ID message"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x53, 0x0, SENSE_ABORT, "Media Load/Eject failure"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x53, 0x01, SENSE_ABORT, "Cartridge failed to unload"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0xf1, 0x0, SENSE_ABORT, "Command unspecified"}, - { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0xf1, 0x02, SENSE_ABORT, "Unrecognized loader command"}, - { "L500", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, - - { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x28, 0x0, SENSE_RETRY, "Not ready to Ready transition"}, - { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x29, 0x0, SENSE_RETRY, "Reset occured"}, - { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x2a, 0x01, SENSE_ABORT, "Mode parameters changed"}, - { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x3f, 0x01, SENSE_ABORT, "Microcode has changed"}, - { "L500", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_UNIT_ATTENTION"}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Hardware Error")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x3a, 0x80, SENSE_ABORT, T_("Media not present")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x40, 0x84, SENSE_ABORT, T_("POST soft failure")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0x80, SENSE_ABORT, T_("Loader Communications timeout")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0x81, SENSE_ABORT, T_("Loader communications UART error or buffer overflow")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0x86, SENSE_ABORT, T_("bad status returned from loader")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0xc3, SENSE_ABORT, T_("EEPROM both copies bad")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x44, 0xff, SENSE_ABORT, T_("Unexpected status from test")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x70, SENSE_ABORT, T_("Cartridge has no home")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x71, SENSE_ABORT, T_("Loader mechanism problem")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x72, SENSE_ABORT, T_("Tape drive handle problem")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x73, SENSE_IGNORE, T_("No cartridge in drive during unload")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x74, SENSE_ABORT, T_("Loader mechanism problem, after retries")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x75, SENSE_ABORT, T_("Timeout moving cartridge from drive")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x76, SENSE_ABORT, T_("Timeout unloading cartridge into slot")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x77, SENSE_ABORT, T_("Couldn't unlock door after retries")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x78, SENSE_ABORT, T_("Error during SCAN MAGAZINE")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x79, SENSE_ABORT, T_("Couldn't lock door after retries")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x80, SENSE_ABORT, T_("Unexpected door open")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x81, SENSE_ABORT, T_("Didn't find all expected slots during elevator movement")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x82, SENSE_ABORT, T_("Cartridge alreay in drive during LOAD CARTRIDGE")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x83, SENSE_ABORT, T_("Slot empty during LOAD CARTRIDGE")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x84, SENSE_ABORT, T_("Cleaning Tape expired")}, + { "L500", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x80, 0x85, SENSE_ABORT, T_("Cleaning Failed")}, + { "L500", "", TYPE_CHANGER, SENSE_HARDWARE_ERROR, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, + + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x1a, 0x0, SENSE_ABORT, T_("Parameter length error")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x20, 0x0, SENSE_ABORT, T_("SCSI invalid opcode")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x21, 0x01, SENSE_ABORT, T_("Invalid element address")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x00, SENSE_ABORT, T_("Invalid CDB")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x81, SENSE_ABORT, T_("Invalid mode on WRITE BUFFER")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x82, SENSE_ABORT, T_("Invalid drive specified")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x83, SENSE_ABORT, T_("SEND DIAG Invalid test number")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x86, SENSE_ABORT, T_("Invalid offset on WRITE BUFFER")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x87, SENSE_ABORT, T_("Invalid size on WRITE BUFFER")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x89, SENSE_ABORT, T_("Image data too large on WRITE BUFFER")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x8b, SENSE_ABORT, T_("Invalid image for CUP")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x8c, SENSE_ABORT, T_("Non-immediate command during CUP")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x8e, SENSE_ABORT, T_("Invalid personality for CUP")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x24, 0x8f, SENSE_ABORT, T_("Bad controller image EDC")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x25, 0x0, SENSE_ABORT, T_("Invalid LUN")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x26, 0x0, SENSE_ABORT, T_("Parameter list error: invalid field")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x26, 0x01, SENSE_ABORT, T_("Parameter list error: parameter not supported")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x39, 0x0, SENSE_ABORT, T_("Saving parameters not supported")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3a, 0x81, SENSE_ABORT, T_("Cleaning Slot empty")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3a, 0x82, SENSE_ABORT, T_("Cleaning slot doesn't have a cleaning slot")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3b, 0x0d, SENSE_ABORT, T_("Destination element full")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3b, 0x0e, SENSE_ABORT, T_("Source slot or drive empty")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x3d, 0x0, SENSE_ABORT, T_("SCSI invalid ID message")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x53, 0x0, SENSE_ABORT, T_("Media Load/Eject failure")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x53, 0x01, SENSE_ABORT, T_("Cartridge failed to unload")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0xf1, 0x0, SENSE_ABORT, T_("Command unspecified")}, + { "L500", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0xf1, 0x02, SENSE_ABORT, T_("Unrecognized loader command")}, + { "L500", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, + + { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x28, 0x0, SENSE_RETRY, T_("Not ready to Ready transition")}, + { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x29, 0x0, SENSE_RETRY, T_("Reset occured")}, + { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x2a, 0x01, SENSE_ABORT, T_("Mode parameters changed")}, + { "L500", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x3f, 0x01, SENSE_ABORT, T_("Microcode has changed")}, + { "L500", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_UNIT_ATTENTION")}, /* Not used by L500 - { "L500", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, + { "L500", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, */ - { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x43, 0x0, SENSE_ABORT, "SCSI message error"}, - { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x47, 0x0, SENSE_ABORT, "SCSI parity error"}, - { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x48, 0x0, SENSE_ABORT, "SCSI IDE message received"}, - { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x49, 0x0, SENSE_ABORT, "SCSI invalid message"}, - { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x4e, 0x0, SENSE_ABORT, "SCSI overlapped commands"}, + { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x43, 0x0, SENSE_ABORT, T_("SCSI message error")}, + { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x47, 0x0, SENSE_ABORT, T_("SCSI parity error")}, + { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x48, 0x0, SENSE_ABORT, T_("SCSI IDE message received")}, + { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x49, 0x0, SENSE_ABORT, T_("SCSI invalid message")}, + { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, 0x4e, 0x0, SENSE_ABORT, T_("SCSI overlapped commands")}, - { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ABORTED_COMMAND"}, - { "L500", "", TYPE_CHANGER , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "L500", "", TYPE_CHANGER, SENSE_ABORTED_COMMAND, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ABORTED_COMMAND")}, + { "L500", "", TYPE_CHANGER , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * HP C1553A Tape */ - { "C1553A", "", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense"}, - { "C1553A", "", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, + { "C1553A", "", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense")}, + { "C1553A", "", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, - { "C1553A", "", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, "Recovered Error"}, - { "C1553A", "", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_RECOVERED_ERROR"}, + { "C1553A", "", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, T_("Recovered Error")}, + { "C1553A", "", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_RECOVERED_ERROR")}, - { "C1553A", "", TYPE_TAPE , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, "Not Ready"}, - { "C1553A", "", TYPE_TAPE , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "C1553A", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "C1553A", "", TYPE_TAPE , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, T_("Not Ready")}, + { "C1553A", "", TYPE_TAPE , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "C1553A", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "C1553A", "", TYPE_TAPE , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, "Medium Error"}, - { "C1553A", "", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_MEDIUM_ERROR"}, + { "C1553A", "", TYPE_TAPE , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Medium Error")}, + { "C1553A", "", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_MEDIUM_ERROR")}, - { "C1553A", "", TYPE_TAPE , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, "Hardware Error"}, - { "C1553A", "", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, + { "C1553A", "", TYPE_TAPE , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Hardware Error")}, + { "C1553A", "", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, - { "C1553A", "", TYPE_TAPE , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "C1553A", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "C1553A", "", TYPE_TAPE , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "C1553A", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "C1553A", "", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "C1553A", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, + { "C1553A", "", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "C1553A", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, - { "C1553A", "", TYPE_TAPE , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "C1553A", "", TYPE_TAPE , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, - { "C1553A", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense"}, - { "C1553A", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, + { "C1553A", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense")}, + { "C1553A", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, - { "C1553A", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, "Recovered Error"}, - { "C1553A", "", TYPE_CHANGER, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_RECOVERED_ERROR"}, + { "C1553A", "", TYPE_CHANGER , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, T_("Recovered Error")}, + { "C1553A", "", TYPE_CHANGER, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_RECOVERED_ERROR")}, - { "C1553A", "", TYPE_CHANGER , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, "Not Ready"}, - { "C1553A", "", TYPE_CHANGER , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "C1553A", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "C1553A", "", TYPE_CHANGER , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, T_("Not Ready")}, + { "C1553A", "", TYPE_CHANGER , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "C1553A", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "C1553A", "", TYPE_CHANGER , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, "Medium Error"}, - { "C1553A", "", TYPE_CHANGER, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_MEDIUM_ERROR"}, + { "C1553A", "", TYPE_CHANGER , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Medium Error")}, + { "C1553A", "", TYPE_CHANGER, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_MEDIUM_ERROR")}, - { "C1553A", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, "Hardware Error"}, - { "C1553A", "", TYPE_CHANGER, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, + { "C1553A", "", TYPE_CHANGER , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Hardware Error")}, + { "C1553A", "", TYPE_CHANGER, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, - { "C1553A", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "C1553A", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "C1553A", "", TYPE_CHANGER , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "C1553A", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "C1553A", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "C1553A", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, + { "C1553A", "", TYPE_CHANGER , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "C1553A", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, - { "C1553A", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, + { "C1553A", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, - { "C1553A", "", TYPE_CHANGER , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "C1553A", "", TYPE_CHANGER , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * HP C1537A Tape */ - { "C1537A", "", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense"}, - { "C1537A", "", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, + { "C1537A", "", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense")}, + { "C1537A", "", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, - { "C1537A", "", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, "Recovered Error"}, - { "C1537A", "", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_RECOVERED_ERROR"}, + { "C1537A", "", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, T_("Recovered Error")}, + { "C1537A", "", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_RECOVERED_ERROR")}, - { "C1537A", "", TYPE_TAPE , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, "Not Ready"}, - { "C1537A", "", TYPE_TAPE , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "C1537A", "", TYPE_TAPE , SENSE_NOT_READY, 0x04, 0x0, SENSE_RETRY, "tape is being ejected"}, - { "C1537A", "", TYPE_TAPE , SENSE_NOT_READY, 0x04, 0x01, SENSE_RETRY, "tape is being loaded"}, - { "C1537A", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "C1537A", "", TYPE_TAPE , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, T_("Not Ready")}, + { "C1537A", "", TYPE_TAPE , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "C1537A", "", TYPE_TAPE , SENSE_NOT_READY, 0x04, 0x0, SENSE_RETRY, T_("tape is being ejected")}, + { "C1537A", "", TYPE_TAPE , SENSE_NOT_READY, 0x04, 0x01, SENSE_RETRY, T_("tape is being loaded")}, + { "C1537A", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "C1537A", "", TYPE_TAPE , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, "Medium Error"}, - { "C1537A", "", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_MEDIUM_ERROR"}, + { "C1537A", "", TYPE_TAPE , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Medium Error")}, + { "C1537A", "", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_MEDIUM_ERROR")}, - { "C1537A", "", TYPE_TAPE , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, "Hardware Error"}, - { "C1537A", "", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, + { "C1537A", "", TYPE_TAPE , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Hardware Error")}, + { "C1537A", "", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, - { "C1537A", "", TYPE_TAPE , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "C1537A", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "C1537A", "", TYPE_TAPE , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "C1537A", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "C1537A", "", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "C1537A", "", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x28, 0x0, SENSE_RETRY, "Not Ready to Ready Transition"}, - { "C1537A", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_UNIT_ATTENTION"}, + { "C1537A", "", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "C1537A", "", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x28, 0x0, SENSE_RETRY, T_("Not Ready to Ready Transition")}, + { "C1537A", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_UNIT_ATTENTION")}, - { "C1537A", "", TYPE_TAPE, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, + { "C1537A", "", TYPE_TAPE, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, - { "C1537A", "", TYPE_TAPE , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "C1537A", "", TYPE_TAPE , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * Tandberg TapeLibrary 1420 */ - { "TDS 1420", "", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, + { "TDS 1420", "", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, - { "TDS 1420", "", TYPE_TAPE, SENSE_IES, 0x83, 0x0, SENSE_IES, "IES"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_IES, 0x83, 0x1, SENSE_IES, "IES"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_IES, 0x83, 0x4, SENSE_IGNORE, "IES"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, "Recovered Error"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_RECOVERED_ERROR"}, + { "TDS 1420", "", TYPE_TAPE, SENSE_IES, 0x83, 0x0, SENSE_IES, T_("IES")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_IES, 0x83, 0x1, SENSE_IES, T_("IES")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_IES, 0x83, 0x4, SENSE_IGNORE, T_("IES")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, T_("Recovered Error")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_RECOVERED_ERROR")}, - { "TDS 1420", "", TYPE_TAPE, SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, "Not Ready"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "TDS 1420", "", TYPE_TAPE, SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, T_("Not Ready")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "TDS 1420", "", TYPE_TAPE, SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, "Medium Error"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_MEDIUM_ERROR"}, + { "TDS 1420", "", TYPE_TAPE, SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Medium Error")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_MEDIUM_ERROR")}, - { "TDS 1420", "", TYPE_TAPE, SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, "Hardware Error"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, + { "TDS 1420", "", TYPE_TAPE, SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Hardware Error")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, - { "TDS 1420", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "TDS 1420", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "TDS 1420", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "TDS 1420", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "TDS 1420", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, + { "TDS 1420", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, { "TDS 1420", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, - { "TDS 1420", "", TYPE_TAPE, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "TDS 1420", "", TYPE_TAPE, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * Tandberg SLR100 Tape Drive @@ -420,307 +412,307 @@ /* * DLT 8000 Tape */ - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x0, 0x01, SENSE_NO, "Unexpected FM encountered"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x0, 0x02, SENSE_NO, "EOM encountered"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x0, 0x04, SENSE_NO, "BOM encountered"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x5d, 0x00, SENSE_NO, "Failure prediction threshold exceeded"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x27, 0x82, SENSE_NO, "Data safety write protect"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, - - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, "Recovered Error"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x17, SENSE_IGNORE, "Cleaning requested"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0a, 0x00, SENSE_IGNORE, "Error log overflow"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0a, 0x80, SENSE_IGNORE, "Error log generated"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x37, 0x0, SENSE_IGNORE, "Rounded parameter"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x38, 0x08, SENSE_IGNORE, "repositioning error"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x44, 0xc1, SENSE_IGNORE, "EEPROM copy1 area bad"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x44, 0xc2, SENSE_IGNORE, "EEPROM copy2 area bad"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x47, 0x00, SENSE_IGNORE, "SCSI parity error"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x48, 0x00, SENSE_IGNORE, "IDE Message received"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x51, 0x00, SENSE_IGNORE, "Erase Failure"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x53, 0x01, SENSE_IGNORE, "Unload Tape failure"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x5b, 0x01, SENSE_IGNORE, "Threshold met"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x5b, 0x02, SENSE_IGNORE, "Log counter at maximum"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x80, 0x02, SENSE_IGNORE, "Cleaning requested"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x80, 0x03, SENSE_IGNORE, "Softe error exceeds threshold"}, -/* { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x47, 0x0, SENSE_IGNORE, "Scsi Parity Error"}, */ - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_RECOVERED_ERROR"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, "Not Ready (this shouldn't happen should it?)"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, "The drive is not ready, but it is in the process of becoming ready"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x30,0x02, SENSE_ABORT, "Incompatible tape format"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x30,0x03, SENSE_ABORT, "Cleaning Cartridge in drive"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x5a,0x01, SENSE_ABORT, "Asynchronous eject occurred"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, - - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, "Medium Error"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_MEDIUM_ERROR"}, - - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, "Hardware Error"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, - - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, - - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x28, 0x0, SENSE_RETRY, "Not ready to ready transition"}, - { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_UNIT_ATTENTION"}, - - { "DLT8000", "QUANTUM", TYPE_TAPE , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x0, 0x01, SENSE_NO, T_("Unexpected FM encountered")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x0, 0x02, SENSE_NO, T_("EOM encountered")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x0, 0x04, SENSE_NO, T_("BOM encountered")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x5d, 0x00, SENSE_NO, T_("Failure prediction threshold exceeded")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL, 0x27, 0x82, SENSE_NO, T_("Data safety write protect")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, + + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x0, SENSE_IGNORE, T_("Recovered Error")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0, 0x17, SENSE_IGNORE, T_("Cleaning requested")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0a, 0x00, SENSE_IGNORE, T_("Error log overflow")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x0a, 0x80, SENSE_IGNORE, T_("Error log generated")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x37, 0x0, SENSE_IGNORE, T_("Rounded parameter")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x38, 0x08, SENSE_IGNORE, T_("repositioning error")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x44, 0xc1, SENSE_IGNORE, T_("EEPROM copy1 area bad")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x44, 0xc2, SENSE_IGNORE, T_("EEPROM copy2 area bad")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x47, 0x00, SENSE_IGNORE, T_("SCSI parity error")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x48, 0x00, SENSE_IGNORE, T_("IDE Message received")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x51, 0x00, SENSE_IGNORE, T_("Erase Failure")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x53, 0x01, SENSE_IGNORE, T_("Unload Tape failure")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x5b, 0x01, SENSE_IGNORE, T_("Threshold met")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x5b, 0x02, SENSE_IGNORE, T_("Log counter at maximum")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x80, 0x02, SENSE_IGNORE, T_("Cleaning requested")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x80, 0x03, SENSE_IGNORE, T_("Soft error exceeds threshold")}, +/* { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_RECOVERED_ERROR, 0x47, 0x0, SENSE_IGNORE, T_("Scsi Parity Error")}, */ + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_RECOVERED_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_RECOVERED_ERROR")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x0, 0x0, SENSE_IGNORE, T_("Not Ready (this shouldn't happen should it?)")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, T_("The drive is not ready, but it is in the process of becoming ready")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x30,0x02, SENSE_ABORT, T_("Incompatible tape format")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x30,0x03, SENSE_ABORT, T_("Cleaning Cartridge in drive")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_NOT_READY, 0x5a,0x01, SENSE_ABORT, T_("Asynchronous eject occurred")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, + + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_MEDIUM_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Medium Error")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_MEDIUM_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_MEDIUM_ERROR")}, + + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_HARDWARE_ERROR, 0x0, 0x0, SENSE_ABORT, T_("Hardware Error")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_HARDWARE_ERROR , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, + + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, + + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "DLT8000", "QUANTUM", TYPE_TAPE , SENSE_UNIT_ATTENTION, 0x28, 0x0, SENSE_RETRY, T_("Not ready to ready transition")}, + { "DLT8000", "QUANTUM", TYPE_TAPE, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_UNIT_ATTENTION")}, + + { "DLT8000", "QUANTUM", TYPE_TAPE , UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * DLT 7000 Tape */ - { "DLT7000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, "Logical Unit not ready, no additional sense"}, - { "DLT7000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x2, SENSE_TAPE_NOT_ONLINE, "Logical Unit not ready, in progress becoming ready"}, - { "DLT7000", "", TYPE_TAPE, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, "The tape drive is being cleaned"}, - { "DLT7000", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "DLT7000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, T_("Logical Unit not ready, no additional sense")}, + { "DLT7000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x2, SENSE_TAPE_NOT_ONLINE, T_("Logical Unit not ready, in progress becoming ready")}, + { "DLT7000", "", TYPE_TAPE, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, T_("The tape drive is being cleaned")}, + { "DLT7000", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "DLT7000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "DLT7000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, + { "DLT7000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "DLT7000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, - { "DLT7000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "DLT7000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "DLT7000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "DLT7000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "DLT7000", "", TYPE_TAPE, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "DLT7000", "", TYPE_TAPE, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * DLT 4000 Tape */ - { "DLT4000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, "Logical Unit not ready, no additional sense"}, - { "DLT4000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x2, SENSE_TAPE_NOT_ONLINE, "Logical Unit not ready, in progress becoming ready"}, - { "DLT4000", "", TYPE_TAPE, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, "The tape drive is being cleaned"}, - { "DLT4000", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "DLT4000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, T_("Logical Unit not ready, no additional sense")}, + { "DLT4000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x2, SENSE_TAPE_NOT_ONLINE, T_("Logical Unit not ready, in progress becoming ready")}, + { "DLT4000", "", TYPE_TAPE, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, T_("The tape drive is being cleaned")}, + { "DLT4000", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "DLT4000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "DLT4000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, + { "DLT4000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "DLT4000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, - { "DLT4000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "DLT4000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "DLT4000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "DLT4000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "DLT4000", "", TYPE_TAPE, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "DLT4000", "", TYPE_TAPE, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * AIT VLS DLT Library */ - { "VLS_DLT", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, "Logical Unit not ready, no additional sense"}, - { "VLS_DLT", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x2, SENSE_TAPE_NOT_ONLINE, "Logical Unit not ready, in progress becoming ready"}, - { "VLS_DLT", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, "The tape drive is being cleaned"}, - { "VLS_DLT", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "VLS_DLT", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, T_("Logical Unit not ready, no additional sense")}, + { "VLS_DLT", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x2, SENSE_TAPE_NOT_ONLINE, T_("Logical Unit not ready, in progress becoming ready")}, + { "VLS_DLT", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, T_("The tape drive is being cleaned")}, + { "VLS_DLT", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "VLS_DLT", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "VLS_DLT", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, + { "VLS_DLT", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "VLS_DLT", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, - { "VLS_DLT", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "VLS_DLT", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "VLS_DLT", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "VLS_DLT", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "VLS_DLT", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, + { "VLS_DLT", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, - { "VLS_DLT", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "VLS_DLT", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * AIT VLS SDX Library */ - { "VLS_SDX", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, "Logical Unit not ready, no additional sense"}, - { "VLS_SDX", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x2, SENSE_TAPE_NOT_ONLINE, "Logical Unit not ready, in progress becoming ready"}, - { "VLS_SDX", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, "The tape drive is being cleaned"}, - { "VLS_SDX", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, + { "VLS_SDX", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, T_("Logical Unit not ready, no additional sense")}, + { "VLS_SDX", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x2, SENSE_TAPE_NOT_ONLINE, T_("Logical Unit not ready, in progress becoming ready")}, + { "VLS_SDX", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, T_("The tape drive is being cleaned")}, + { "VLS_SDX", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, - { "VLS_SDX", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "VLS_SDX", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, + { "VLS_SDX", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "VLS_SDX", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, - { "VLS_SDX", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "VLS_SDX", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, + { "VLS_SDX", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "VLS_SDX", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, - { "VLS_SDX", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, + { "VLS_SDX", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, - { "VLS_SDX", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "VLS_SDX", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * Exabyte 85058 Tape */ - { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, "Logical Unit not ready, no additional sense"}, - { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, "Logical Unit not ready, in progress becoming ready"}, - { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, "The tape drive is being cleaned"}, - { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, - - { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, - - { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, - { "EXB-85058HE-0000", "", TYPE_TAPE, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found"}, + { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, T_("Logical Unit not ready, no additional sense")}, + { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, T_("Logical Unit not ready, in progress becoming ready")}, + { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, T_("The tape drive is being cleaned")}, + { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, + + { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, + + { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "EXB-85058HE-0000", "", TYPE_TAPE, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, + { "EXB-85058HE-0000", "", TYPE_TAPE, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found")}, /* * Exabyte 10e Library (Robot) */ - { "EXB-10e", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_RETRY, "Retry, no sense"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NULL, 0x90, 0x2, SENSE_ABORT, "Illegal Request"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NULL , 0x90, 0x3, SENSE_IES, "IES"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, - - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, "Logical Unit not ready, no additional sense"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, "Logical Unit not ready, in progress becoming ready"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, "Library door is open"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, "The data cartridge magazine is missing"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x89, SENSE_ABORT, "The library is in CHS Monitor mode"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8C, SENSE_RETRY, "The library is performing a power-on self test"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8D, SENSE_ABORT, "The library is in LCD mode"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8E, SENSE_ABORT, "The library is in Sequential mode"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, "The tape drive is being cleaned"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, - - { "EXB-10e", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, - - { "EXB-10e", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x91, 0x0, SENSE_CHM_FULL, "CHM full during reset"}, - { "EXB-10e", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_ILLEGAL_REQUEST"}, - - { "EXB-10e", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, - - { "EXB-10e", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found for EXB-10e"}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_RETRY, T_("Retry, no sense")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NULL, 0x90, 0x2, SENSE_ABORT, T_("Illegal Request")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NULL , 0x90, 0x3, SENSE_IES, T_("IES")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, + + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, T_("Logical Unit not ready, no additional sense")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, T_("Logical Unit not ready, in progress becoming ready")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, T_("Library door is open")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, T_("The data cartridge magazine is missing")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x89, SENSE_ABORT, T_("The library is in CHS Monitor mode")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8C, SENSE_RETRY, T_("The library is performing a power-on self test")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8D, SENSE_ABORT, T_("The library is in LCD mode")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8E, SENSE_ABORT, T_("The library is in Sequential mode")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, T_("The tape drive is being cleaned")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, + + { "EXB-10e", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, + + { "EXB-10e", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x91, 0x0, SENSE_CHM_FULL, T_("CHM full during reset")}, + { "EXB-10e", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_ILLEGAL_REQUEST")}, + + { "EXB-10e", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, + + { "EXB-10e", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found for EXB-10e")}, /* * Exabyte 210 Library (Robot) */ - { "EXB-210", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_RETRY, "Retry, no sense"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NULL, 0x90, 0x2, SENSE_ABORT, "Illegal Request"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NULL , 0x90, 0x3, SENSE_IES, "IES"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, - - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, "Logical Unit not ready, no additional sense"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, "Logical Unit not ready, in progress becoming ready"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, "Library door is open"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, "The data cartridge magazine is missing"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x89, SENSE_ABORT, "The library is in CHS Monitor mode"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8C, SENSE_RETRY, "The library is performing a power-on self test"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8D, SENSE_ABORT, "The library is in LCD mode"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8E, SENSE_ABORT, "The library is in Sequential mode"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, "The tape drive is being cleaned"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, - - { "EXB-210", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, - - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x91, 0x0, SENSE_CHM_FULL, "CHM full during reset"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x21, 0x01, SENSE_ABORT, "Invalid element address"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x24, 0x00, SENSE_ABORT, "Invalid Invert Field"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0x0d, SENSE_ABORT, "Destination element occupied"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0x0e, SENSE_ABORT, "Source Element empty"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0x87, SENSE_ABORT, "Cartridge stuck in tape"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0x90, SENSE_ABORT, "Source cart is loaded inside the tape drive and not accessible"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x03, SENSE_ABORT, "Source magazine not installed"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x04, SENSE_ABORT, "Destination magazine no installed"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x05, SENSE_ABORT, "Source tape drive not installed"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x06, SENSE_ABORT, "Destination tape drive not installed"}, - - { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_ILLEGAL_REQUEST"}, - - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x0, SENSE_IES, "Label questionable"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x1, SENSE_IGNORE, "Cannot read bar code label"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x2, SENSE_ABORT, "Cartzridge magazine not present"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x3, SENSE_IES, "Label and full status questionable"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x4, SENSE_ABORT, "Tape drive not installed"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x7, SENSE_IES, "Full status questionable"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x8, SENSE_IGNORE, "Bar code label upside down"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x9, SENSE_IGNORE, "No bar code label"}, - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0xa, SENSE_IGNORE, ""}, - { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, - - { "EXB-210", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found for EXB-10e"}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_RETRY, T_("Retry, no sense")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NULL, 0x90, 0x2, SENSE_ABORT, T_("Illegal Request")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NULL , 0x90, 0x3, SENSE_IES, T_("IES")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, + + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, T_("Logical Unit not ready, no additional sense")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, T_("Logical Unit not ready, in progress becoming ready")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, T_("Library door is open")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, T_("The data cartridge magazine is missing")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x89, SENSE_ABORT, T_("The library is in CHS Monitor mode")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8C, SENSE_RETRY, T_("The library is performing a power-on self test")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8D, SENSE_ABORT, T_("The library is in LCD mode")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8E, SENSE_ABORT, T_("The library is in Sequential mode")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, T_("The tape drive is being cleaned")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, + + { "EXB-210", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, + + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x91, 0x0, SENSE_CHM_FULL, T_("CHM full during reset")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x21, 0x01, SENSE_ABORT, T_("Invalid element address")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x24, 0x00, SENSE_ABORT, T_("Invalid Invert Field")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0x0d, SENSE_ABORT, T_("Destination element occupied")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0x0e, SENSE_ABORT, T_("Source Element empty")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0x87, SENSE_ABORT, T_("Cartridge stuck in tape")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0x90, SENSE_ABORT, T_("Source cart is loaded inside the tape drive and not accessible")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x03, SENSE_ABORT, T_("Source magazine not installed")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x04, SENSE_ABORT, T_("Destination magazine no installed")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x05, SENSE_ABORT, T_("Source tape drive not installed")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x06, SENSE_ABORT, T_("Destination tape drive not installed")}, + + { "EXB-210", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_ILLEGAL_REQUEST")}, + + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x0, SENSE_IES, T_("Label questionable")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x1, SENSE_IGNORE, T_("Cannot read bar code label")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x2, SENSE_ABORT, T_("Cartzridge magazine not present")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x3, SENSE_IES, T_("Label and full status questionable")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x4, SENSE_ABORT, T_("Tape drive not installed")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x7, SENSE_IES, T_("Full status questionable")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x8, SENSE_IGNORE, T_("Bar code label upside down")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0x9, SENSE_IGNORE, T_("No bar code label")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, 0x83, 0xa, SENSE_IGNORE, T_("Ignore")}, + { "EXB-210", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, + + { "EXB-210", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found for EXB-10e")}, /* * Exabyte 230D Library (Robot) */ - { "EXB-230D", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_RETRY, "Retry, no sense"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NULL, 0x90, 0x2, SENSE_ABORT, "Illegal Request"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NULL , 0x90, 0x3, SENSE_IES, "IES"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NULL"}, - - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, "Logical Unit not ready, no additional sense"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, "Logical Unit not ready, in progress becoming ready"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, "Library door is open"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, "The data cartridge magazine is missing"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x89, SENSE_ABORT, "The library is in CHS Monitor mode"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8C, SENSE_RETRY, "The library is performing a power-on self test"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8D, SENSE_ABORT, "The library is in LCD mode"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8E, SENSE_ABORT, "The library is in Sequential mode"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, "The tape drive is being cleaned"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, "No Tape online"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, - - { "EXB-230D", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, "Unit Attention"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_UNIT_ATTENTION"}, - - { "EXB-230D", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, "Illegal Request"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x91, 0x0, SENSE_CHM_FULL, "CHM full during reset"}, - { "EXB-230D", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_ILLEGAL_REQUEST"}, - - { "EXB-230D", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, - - { "EXB-230D", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing Found for EXB-10e"}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_RETRY, T_("Retry, no sense")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NULL, 0x90, 0x2, SENSE_ABORT, T_("Illegal Request")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NULL , 0x90, 0x3, SENSE_IES, T_("IES")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NULL , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NULL")}, + + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, T_("Logical Unit not ready, no additional sense")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, T_("Logical Unit not ready, in progress becoming ready")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, T_("Library door is open")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x85, SENSE_ABORT, T_("The data cartridge magazine is missing")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x89, SENSE_ABORT, T_("The library is in CHS Monitor mode")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8C, SENSE_RETRY, T_("The library is performing a power-on self test")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8D, SENSE_ABORT, T_("The library is in LCD mode")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x8E, SENSE_ABORT, T_("The library is in Sequential mode")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x30, 0x3, SENSE_RETRY, T_("The tape drive is being cleaned")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY, 0x3A, 0x0, SENSE_TAPE_NOT_ONLINE, T_("No Tape online")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_NOT_READY , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, + + { "EXB-230D", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x0, 0x0, SENSE_RETRY, T_("Unit Attention")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_UNIT_ATTENTION , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_UNIT_ATTENTION")}, + + { "EXB-230D", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x0, 0x0, SENSE_ABORT, T_("Illegal Request")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x91, 0x0, SENSE_CHM_FULL, T_("CHM full during reset")}, + { "EXB-230D", "", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST , UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_ILLEGAL_REQUEST")}, + + { "EXB-230D", "", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, + + { "EXB-230D", "", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing Found for EXB-10e")}, /* * Spectra TreeFrog library */ - { "215", "SPECTRA", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, "No Sense, Unit Ready"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_NULL, UCHAR_MAX, UCHAR_MAX, SENSE_NO, "No Sense, Unit Ready"}, - - { "215", "SPECTRA", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, "Unit Not Ready"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, "Unit is Becoming Ready"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x83, SENSE_ABORT, "Door is open, Robot is Disabled"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_NOT_READY, UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, "Default for SENSE_NOT_READY"}, - - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x4C, 0x0, SENSE_ABORT, "Unit Failed Initialization"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x84, 0x4, SENSE_ABORT, "DRAM Memory Failure"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x84, 0x4, SENSE_ABORT, "Two ore More SCSI ID's in the library are tehe same"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x81, 0x4, SENSE_ABORT, "Tape may be broken;of tape is a cleaning tape;or Drive B is broken"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x87, 0x0, SENSE_ABORT, "Bad FPROM or invalid device in socket"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x87, 0x1, SENSE_ABORT, "FPROM Erase Operation Failed"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x87, 0x2, SENSE_ABORT, "FFPROM Write Operation Failed"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x1, SENSE_ABORT, "Robot not Initialized"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x99, SENSE_ABORT, "Generic Robotics Error"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x2, SENSE_ABORT, "Long Axis Robotics Error"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x3, SENSE_ABORT, "Short Axis Robotics Error"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x4, SENSE_ABORT, "Ambient Light Detected"}, - { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_HARDWARE_ERROR"}, - - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x1A, 0x0, SENSE_ABORT, "Parameter List Length Error"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x20, 0x0, SENSE_ABORT, "Invalid Command Code"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x21, 0x01, SENSE_ABORT, "Invalid Element Address"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x24, 0x0, SENSE_ABORT, "Invalid Field in CDB"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x25, 0x0, SENSE_ABORT, "LUN Not Supported"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x26, 0x0, SENSE_ABORT, "Invalid Parameter Field"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0xd, SENSE_ABORT, "Medium Destination is full"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0xe, SENSE_ABORT, "Medium Source Element is Full"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3d, 0x80, SENSE_ABORT, "Disconnects Must be Allowed"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x18, SENSE_ABORT, "Conflict, Element is Reserved"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x81, 0x2, SENSE_ABORT, "Library is Full of Tapes"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x81, 0x3, SENSE_ABORT, "Grip Arm not Empty"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, UCHAR_MAX , UCHAR_MAX, SENSE_ABORT, "Default for SENSE_ILLEGAL_REQUEST"}, - - {"215", "SPECTRA", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x28, 0x0, SENSE_IES, "Inventory possible Altered"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x29, 0x0, SENSE_RETRY, "A Reset Has Occured"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x24, 0x1, SENSE_IGNORE, "Mode Parameter Have CHanged"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_UNIT_ATTENTION"}, - - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x83, 0x00, SENSE_ABORT, "Barcode Label is Unread"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x83, 0x01, SENSE_ABORT, "Problem Reading Barcode"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x83, 0x11, SENSE_ABORT, "Tape in Drive & Unmounted"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x00, SENSE_ABORT, "Unsupported SCSI Command"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x01, SENSE_ABORT, "No Response from SCSI Target"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x02, SENSE_ABORT, "Check Condition form Target"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x03, SENSE_ABORT, "SCSI ID Same as Library's ID"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x08, SENSE_ABORT, "Busy Condition from Target"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x18, SENSE_ABORT, "SCSI Reservation Conflict"}, - {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, "Default for SENSE_VENDOR_SPECIFIC"}, - - { "215", "SPECTRA", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, "Default for SENSE_CHG_ELEMENT_STATUS"}, - - { "215", "SPECTRA", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, "Nothing found for Spectra/215"}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_NULL, 0x0, 0x0, SENSE_NO, T_("No Sense, Unit Ready")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_NULL, UCHAR_MAX, UCHAR_MAX, SENSE_NO, T_("No Sense, Unit Ready")}, + + { "215", "SPECTRA", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x0, SENSE_RETRY, T_("Unit Not Ready")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x1, SENSE_RETRY, T_("Unit is Becoming Ready")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_NOT_READY, 0x4, 0x83, SENSE_ABORT, T_("Door is open, Robot is Disabled")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_NOT_READY, UCHAR_MAX, UCHAR_MAX, SENSE_RETRY, T_("Default for SENSE_NOT_READY")}, + + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x4C, 0x0, SENSE_ABORT, T_("Unit Failed Initialization")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x84, 0x4, SENSE_ABORT, T_("DRAM Memory Failure")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x84, 0x4, SENSE_ABORT, T_("Two ore More SCSI ID's in the library are tehe same")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x81, 0x4, SENSE_ABORT, T_("Tape may be broken;of tape is a cleaning tape;or Drive B is broken")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x87, 0x0, SENSE_ABORT, T_("Bad FPROM or invalid device in socket")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x87, 0x1, SENSE_ABORT, T_("FPROM Erase Operation Failed")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x87, 0x2, SENSE_ABORT, T_("FFPROM Write Operation Failed")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x1, SENSE_ABORT, T_("Robot not Initialized")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x99, SENSE_ABORT, T_("Generic Robotics Error")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x2, SENSE_ABORT, T_("Long Axis Robotics Error")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x3, SENSE_ABORT, T_("Short Axis Robotics Error")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, 0x85, 0x4, SENSE_ABORT, T_("Ambient Light Detected")}, + { "215", "SPECTRA", TYPE_CHANGER, SENSE_HARDWARE_ERROR, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_HARDWARE_ERROR")}, + + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x1A, 0x0, SENSE_ABORT, T_("Parameter List Length Error")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x20, 0x0, SENSE_ABORT, T_("Invalid Command Code")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x21, 0x01, SENSE_ABORT, T_("Invalid Element Address")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x24, 0x0, SENSE_ABORT, T_("Invalid Field in CDB")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x25, 0x0, SENSE_ABORT, T_("LUN Not Supported")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x26, 0x0, SENSE_ABORT, T_("Invalid Parameter Field")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0xd, SENSE_ABORT, T_("Medium Destination is full")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3b, 0xe, SENSE_ABORT, T_("Medium Source Element is Full")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x3d, 0x80, SENSE_ABORT, T_("Disconnects Must be Allowed")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x80, 0x18, SENSE_ABORT, T_("Conflict, Element is Reserved")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x81, 0x2, SENSE_ABORT, T_("Library is Full of Tapes")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, 0x81, 0x3, SENSE_ABORT, T_("Grip Arm not Empty")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_ILLEGAL_REQUEST, UCHAR_MAX , UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_ILLEGAL_REQUEST")}, + + {"215", "SPECTRA", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x28, 0x0, SENSE_IES, T_("Inventory possible Altered")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x29, 0x0, SENSE_RETRY, T_("A Reset Has Occured")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_UNIT_ATTENTION, 0x24, 0x1, SENSE_IGNORE, T_("Mode Parameter Have CHanged")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_UNIT_ATTENTION, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_UNIT_ATTENTION")}, + + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x83, 0x00, SENSE_ABORT, T_("Barcode Label is Unread")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x83, 0x01, SENSE_ABORT, T_("Problem Reading Barcode")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x83, 0x11, SENSE_ABORT, T_("Tape in Drive & Unmounted")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x00, SENSE_ABORT, T_("Unsupported SCSI Command")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x01, SENSE_ABORT, T_("No Response from SCSI Target")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x02, SENSE_ABORT, T_("Check Condition form Target")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x03, SENSE_ABORT, T_("SCSI ID Same as Library's ID")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x08, SENSE_ABORT, T_("Busy Condition from Target")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, 0x84, 0x18, SENSE_ABORT, T_("SCSI Reservation Conflict")}, + {"215", "SPECTRA", TYPE_CHANGER, SENSE_VENDOR_SPECIFIC, UCHAR_MAX, UCHAR_MAX, SENSE_ABORT, T_("Default for SENSE_VENDOR_SPECIFIC")}, + + { "215", "SPECTRA", TYPE_CHANGER, SENSE_CHG_ELEMENT_STATUS, UCHAR_MAX, UCHAR_MAX, SENSE_IGNORE, T_("Default for SENSE_CHG_ELEMENT_STATUS")}, + + { "215", "SPECTRA", TYPE_CHANGER, UCHAR_MAX, 0x0, 0x0, SENSE_ABORT, T_("Nothing found for Spectra/215")}, { NULL, "", 0x0, UCHAR_MAX, 0x0, 0x0, 0x0, ""}, @@ -736,14 +728,14 @@ DumpSense(void) { if (pwork->sense == UCHAR_MAX) { - printf("\n"); + g_printf("\n"); } else { - printf("%s %s %02X %02X %02X %d %s\n",pwork->ident, pwork->vendor, + g_printf(_("%s %s %02X %02X %02X %d %s\n"),pwork->ident, pwork->vendor, pwork->sense, pwork->asc, pwork->ascq, pwork->ret, - pwork->text); + _(pwork->text)); } pwork++; } @@ -783,12 +775,12 @@ Sense2Action( SenseType_T *generic = NULL; int in = 0; - dbprintf(("Sense2Action START : type(%d), ignsense(%d), sense(%02X), asc(%02X), ascq(%02X)\n", + dbprintf(_("Sense2Action START : type(%d), ignsense(%d), sense(%02X), asc(%02X), ascq(%02X)\n"), type, ignsense, sense, asc, - ascq)); + ascq); while (pwork->ident != NULL) { @@ -803,7 +795,7 @@ Sense2Action( } else { if (in == 1) { - dbprintf(("Sense2Action : no match\n")); + dbprintf(_("Sense2Action : no match\n")); break; } pwork++; @@ -816,9 +808,9 @@ Sense2Action( if (pwork->sense == UCHAR_MAX) { *text = stralloc(pwork->text); - dbprintf(("Sense2Action END : no match for %s %s\n", + dbprintf(_("Sense2Action END : no match for %s %s\n"), pwork->ident, - pwork->vendor)); + pwork->vendor); return(pwork->ret); } @@ -827,11 +819,11 @@ Sense2Action( if (pwork->asc == asc && pwork->ascq == ascq) { *text = stralloc(pwork->text); - dbprintf(("Sense2Action END(IGN) : match for %s %s return -> %d/%s\n", + dbprintf(_("Sense2Action END(IGN) : match for %s %s return -> %d/%s\n"), pwork->ident, pwork->vendor, pwork->ret, - *text)); + _(*text)); return(pwork->ret); } pwork++; @@ -844,11 +836,11 @@ Sense2Action( if (pwork->asc == asc && pwork->ascq == ascq) { *text = (char *)stralloc(pwork->text); - dbprintf(("Sense2Action END : match for %s %s return -> %d/%s\n", + dbprintf(_("Sense2Action END : match for %s %s return -> %d/%s\n"), pwork->ident, pwork->vendor, pwork->ret, - *text)); + _(*text)); return(pwork->ret); } @@ -858,11 +850,11 @@ Sense2Action( if ( pwork->asc == UCHAR_MAX && pwork->ascq == UCHAR_MAX) { *text = (char *)stralloc(pwork->text); - dbprintf(("Sense2Action END : no match for %s %s return -> %d/%s\n", + dbprintf(_("Sense2Action END : no match for %s %s return -> %d/%s\n"), pwork->ident, pwork->vendor, pwork->ret, - *text)); + _(*text)); return(pwork->ret); } } @@ -873,7 +865,7 @@ Sense2Action( /* * Ok no match found, so lets return the values from the generic table */ - dbprintf(("Sense2Action generic start :\n")); + dbprintf(_("Sense2Action generic start :\n")); while (generic != NULL) { if (generic->ident == NULL) break; @@ -881,11 +873,11 @@ Sense2Action( if (generic->sense == UCHAR_MAX) { *text = (char *)stralloc(generic->text); - dbprintf(("Sense2Action generic END : match for %s %s return -> %d/%s\n", + dbprintf(_("Sense2Action generic END : match for %s %s return -> %d/%s\n"), generic->ident, generic->vendor, generic->ret, - *text)); + _(*text)); return(generic->ret); } @@ -894,11 +886,11 @@ Sense2Action( if (generic->asc == asc && generic->ascq == ascq) { *text = (char *)stralloc(generic->text); - dbprintf(("Sense2Action generic END(IGN) : match for %s %s return -> %d/%s\n", + dbprintf(_("Sense2Action generic END(IGN) : match for %s %s return -> %d/%s\n"), generic->ident, generic->vendor, generic->ret, - *text)); + _(*text)); return(generic->ret); } generic++; @@ -911,11 +903,11 @@ Sense2Action( if (generic->asc == asc && generic->ascq == ascq) { *text = (char *)stralloc(generic->text); - dbprintf(("Sense2Action generic END : match for %s %s return -> %d/%s\n", + dbprintf(_("Sense2Action generic END : match for %s %s return -> %d/%s\n"), generic->ident, generic->vendor, generic->ret, - *text)); + _(*text)); return(generic->ret); } @@ -925,11 +917,11 @@ Sense2Action( if ( generic->asc == UCHAR_MAX && generic->ascq == UCHAR_MAX) { *text = (char *)stralloc(generic->text); - dbprintf(("Sense2Action generic END : no match for %s %s return -> %d/%s\n", + dbprintf(_("Sense2Action generic END : no match for %s %s return -> %d/%s\n"), generic->ident, generic->vendor, generic->ret, - *text)); + _(*text)); return(generic->ret); } generic++; @@ -938,7 +930,7 @@ Sense2Action( generic++; } - dbprintf(("Sense2Action END:\n")); + dbprintf(_("Sense2Action END:\n")); *text = (char *)stralloc("No match found"); return(SENSE_ABORT); } diff --git a/client-src/Makefile.am b/client-src/Makefile.am index 2aa6d47..e21b7bb 100644 --- a/client-src/Makefile.am +++ b/client-src/Makefile.am @@ -1,35 +1,39 @@ # Makefile for Amanda client programs. +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_builddir)/common-src \ -I$(top_srcdir)/common-src \ -I$(top_srcdir)/amandad-src \ -I$(top_srcdir)/gnulib -LINT=@AMLINT@ -LINTFLAGS=@AMLINTFLAGS@ +AM_CFLAGS = $(AMANDA_WARNING_CFLAGS) +AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS) -lib_LTLIBRARIES = libamclient.la -LIB_EXTENSION = la +LINT=$(AMLINT) +LINTFLAGS=$(AMLINTFLAGS) -libexec_PROGRAMS = noop calcsize killpgrp rundump runtar selfcheck sendbackup sendsize versionsuffix +amlib_LTLIBRARIES = libamclient.la -sbin_SCRIPTS = @CLIENT_SCRIPTS_OPT@ +amlibexec_PROGRAMS = noop calcsize killpgrp rundump runtar selfcheck sendbackup sendsize versionsuffix -libexec_SCRIPTS = patch-system +amlibexec_SCRIPTS = patch-system -if WANT_SAMBA -samba_sources = findpass.c -endif - -if WANT_RUNTIME_PSEUDO_RELOC -AM_LDFLAGS = -Wl,-enable-runtime-pseudo-reloc -endif +CHECK_PERL = $(sbin_SCRIPTS) +SCRIPTS_PERL = $(CHECK_PERL) +SCRIPTS_SHELL = $(amlibexec_SCRIPTS) libamclient_la_SOURCES= amandates.c getfsent.c \ - unctime.c client_util.c \ - $(samba_sources) + unctime.c client_util.c +if WANT_SAMBA +libamclient_la_SOURCES += findpass.c +endif libamclient_la_LDFLAGS = -release $(VERSION) +libamclient_la_LIBADD = ../common-src/libamanda.la ### # Because libamanda includes routines (e.g. regex) provided by some system @@ -38,35 +42,19 @@ libamclient_la_LDFLAGS = -release $(VERSION) # 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) - -SUFFIXES = .sh .pl - -.pl: - cat $< > $@ - chmod a+x $@ - -test -z "$(PERL)" || $(PERL) -c $@ - -.sh: - cat $< > $@ - chmod a+x $@ +LDADD = ../common-src/libamanda.la \ + libamclient.la \ + ../amandad-src/libamandad.la \ + ../common-src/libamanda.la \ + ../gnulib/libgnu.la # these are used for testing only: TEST_PROGS = getfsent EXTRA_PROGRAMS = $(TEST_PROGS) -CLEANFILES = *.test.c patch-system +CLEANFILES += *.test.c -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 @@ -74,45 +62,25 @@ sendbackup_SOURCES = sendbackup.c sendbackup.h \ noinst_HEADERS = amandates.h getfsent.h \ findpass.h client_util.h +INSTALLPERMS_exec = chown=amanda \ + dest=$(amlibexecdir) $(amlibexec_PROGRAMS) + +INSTALLPERMS_data = chown=amanda \ + dest=$(sbindir) $(sbin_SCRIPTS) \ + dest=$(amlibexecdir) $(amlibexec_SCRIPTS) -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 if WANT_SETUID_CLIENT - @list="calcsize killpgrp rundump runtar"; \ - for p in $$list; do \ - if echo "$(libexec_PROGRAMS)" | grep $$p >/dev/null 2>&1; then \ - pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ - echo chown root $$pa; \ - chown root $$pa; \ - echo chmod u+s,o-rwx $$pa; \ - chmod u+s,o-rwx $$pa; \ - else true; \ - fi; \ - done +INSTALLPERMS_exec += dest=$(amlibexecdir) chown=root chmod=u+s,o-rwx \ + calcsize killpgrp rundump runtar endif 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 --git a/client-src/Makefile.in b/client-src/Makefile.in index b797c1b..9a1d003 100644 --- a/client-src/Makefile.in +++ b/client-src/Makefile.in @@ -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. @@ -16,18 +16,137 @@ # 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 @@ 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 @@ -223,9 +402,9 @@ 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@ @@ -240,7 +419,13 @@ 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 +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,52 +462,162 @@ 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@ @@ -331,7 +625,8 @@ 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 +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 +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 +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 +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 @@ -489,32 +844,34 @@ libamclient_la_LDFLAGS = -release $(VERSION) # 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 +900,111 @@ $(top_srcdir)/configure: $(am__configure_deps) 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 +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 +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 +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; \ @@ -801,14 +1132,20 @@ distdir: $(DISTFILES) || 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 +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 +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 +1197,26 @@ info: info-am 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 +1237,166 @@ ps: ps-am 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 --git a/client-src/amandates.c b/client-src/amandates.c index 23e1c7d..12da1f5 100644 --- a/client-src/amandates.c +++ b/client-src/amandates.c @@ -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*/ } @@ -137,7 +137,7 @@ start_amandates( } if(ferror(amdf)) { - error("reading %s: %s", amandates_file, strerror(errno)); + error(_("reading %s: %s"), amandates_file, strerror(errno)); /*NOTREACHED*/ } @@ -157,7 +157,7 @@ finish_amandates(void) if(updated) { if(readonly) { - error("updated amandates after opening readonly"); + error(_("updated amandates after opening readonly")); /*NOTREACHED*/ } @@ -166,7 +166,7 @@ finish_amandates(void) 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); } @@ -174,11 +174,11 @@ finish_amandates(void) } 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 @@ 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 @@ 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; } diff --git a/client-src/amhpfixdevs.sh b/client-src/amhpfixdevs.sh deleted file mode 100644 index 172c503..0000000 --- a/client-src/amhpfixdevs.sh +++ /dev/null @@ -1,66 +0,0 @@ - -eval '(exit $?0)' && eval 'exec perl -x -S $0 ${1+"$@"}' - & eval 'exec perl -x -S $0 $argv:q' - if 0; - -#!perl - -# Check whether we're on a HP-UX system. -$uname=`uname`; -chomp $uname; -if ( $uname ne "HP-UX" ) { - print "Sorry, this script only works for HP-UX systems!\n"; - exit 1; -} - -# Check whether the user is root. -$id=`id -un`; -chomp $id; -if ( $id ne "root" ) { - print "Sorry, this script needs to be run by the superuser!\n"; - exit 1; -} - -# Determine all volume groups and the logical volumes in these volume groups. -print "\n\nScanning volume groups...\n"; -open(LV, "vgdisplay -v 2>/dev/null |") or - die "$0: unable to open vgdisplay pipe: $!\n"; -while ( ) { - if ( m!^(VG Name\s+/dev/)(.*)! ) { - print "\n" if $v; - $v = $2; - print "The volume group $v contains the following logical volumes:\n"; - } - elsif ( m!(\s+LV Name\s+/dev/$v/)(.*)! ) { - print "\t$2\n"; - $vg{$v} .= "$2 "; - } -} -close LV or - warn "$0: error in closing vgdisplay pipe: $!\n"; - -# Now fix the device entries for all logical volumes. -print "\n\nFixing device entries...\n"; -foreach $v ( keys(%vg) ) { - foreach $w ( split(/[\s]+/, $vg{$v} ) ) { - # First the link for the block device. - if ( ! -e "/dev/dsk/${v}_$w" ) { - print "Creating link for /dev/dsk/${v}_$w..."; - if ( ! symlink("/dev/$v/$w", "/dev/dsk/${v}_$w") ) { - print "FAILED\n"; - next; - } - print "done\n"; - } - - # Now the link for the raw devive. - if ( ! -e "/dev/rdsk/${v}_$w" ) { - print "Creating link for /dev/rdsk/${v}_$w..."; - if ( ! symlink("/dev/$v/r$w", "/dev/rdsk/${v}_$w") ) { - print "FAILED\n"; - next; - } - print "done\n"; - } - } -} diff --git a/client-src/amsinixfixdevs.sh b/client-src/amsinixfixdevs.sh deleted file mode 100644 index b4c5a47..0000000 --- a/client-src/amsinixfixdevs.sh +++ /dev/null @@ -1,96 +0,0 @@ - -eval '(exit $?0)' && eval 'exec perl -x -S $0 ${1+"$@"}' - & eval 'exec perl -x -S $0 $argv:q' - if 0; - -#!perl - -# Check whether we're on a SINIX system. -$uname=`uname`; -chomp $uname; -if ( $uname !~ /SINIX/ ) { - die("Sorry, this script only works for SINIX systems!\n"); -} - -# Check whether the user is root. -$id=`id -un`; -chomp $id; -if ( $id ne "root" ) { - die("Sorry, this script needs to be run by the superuser!\n"); -} - -# Determine all filesystems currently mounted. -print "\nDetermining all filesystems currently mounted...\n"; -open(VD, "/usr/bin/mount -p 2>/dev/null |") or - die("$0: unable to open mount pipe: $!\n"); -while ( ) { - if ( m!^(/dev/\S*)\s+-\s+(\S+)\s+(vxfs|ufs)\s+! ) { - $v = $1; - print "Found filesystem $v\n"; - $vd{$v}++; - } -} -close VD or - warn "$0: error in closing mount pipe: $!\n"; - -# Determine all virtual disks. -undef($v); -print "\nDetermining all virtual disks...\n"; -open(VD, "/sbin/dkconfig -lA 2>/dev/null |") or - die("$0: unable to open dkconfig pipe: $!\n"); -while ( ) { - if ( m!^(/dev/\S*):\s+\d+\s+blocks! ) { - $v = $1; - print "Found virtual disk $v\n"; - $vd{$v}++; - } -} -close VD or - warn "$0: error in closing dkconfig pipe: $!\n"; - -# Check whether our target directories are present. -foreach $d ( "/dev/dsk", "/dev/rdsk" ) { - if ( ! -x $d ) { - if ( ! mkdir($d, 0755) ) { - die("Failed to create directory $d!\n"); - } - } -} - -# Now fix the device entries for all virtual disks. -print "\nFixing device entries...\n"; -foreach $v ( keys(%vd) ) { - # determine the basename of the device - ( $name ) = $v =~ m!^/dev/(.+)$!; - if ( $name =~ m!/! ) { - ( $p, $dev_orig ) = $name =~ m!(.*/)(.*)!; - } - else { - $p = ""; - $dev_orig = $name; - } - - # replace all slashes with _'s - $dev_new = $name; - $dev_new =~ s!/!_!g; - - # First the link for the block device. - if ( ! -e "/dev/dsk/$dev_new" ) { - print "Creating link for /dev/dsk/$dev_new..."; - if ( ! symlink($v, "/dev/dsk/$dev_new") ) { - print "FAILED\n"; - next; - } - print "done\n"; - } - - # Now the link for the raw devive. - if ( ! -e "/dev/rdsk/$dev_new" ) { - print "Creating link for /dev/rdsk/$dev_new..."; - if ( ! symlink("/dev/${p}r$dev_orig", "/dev/rdsk/$dev_new") ) { - print "FAILED\n"; - next; - } - print "done\n"; - } -} diff --git a/client-src/calcsize.c b/client-src/calcsize.c index 7d8ad04..1336d8d 100644 --- a/client-src/calcsize.c +++ b/client-src/calcsize.c @@ -32,7 +32,7 @@ * argv[1] is the config name or NOCONFIG */ #include "amanda.h" -#include "statfs.h" +#include "fsusage.h" #include "version.h" #include "sl.h" #include "util.h" @@ -128,6 +128,15 @@ main( char *d; int l, w; + /* + * 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("calcsize"); @@ -138,29 +147,34 @@ main( signal(SIGPIPE, SIG_IGN); if (argc < 2) { - fprintf(stderr,"Usage: %s file[s]\n",argv[0]); + g_fprintf(stderr,_("Usage: %s file[s]\n"),argv[0]); return 1; } for(i=1; id_name); if(lstat(newname, &finfo) == -1) { - fprintf(stderr, "%s/%s: %s\n", + g_fprintf(stderr, "%s/%s: %s\n", dirname, f->d_name, strerror(errno)); continue; } @@ -479,6 +490,10 @@ traverse_dirs( perror(dirname); #endif } + + /* drop root privs -- we're done with the permission-sensitive calls */ + set_root_privs(0); + amfree(newbase); amfree(newname); amfree(aparent); @@ -555,20 +570,20 @@ final_size_dump( int level, char * topdir) { - generic_fs_stats_t stats; + struct fs_usage fsusage; off_t mapsize; char *s; /* calculate the map sizes */ s = stralloc2(topdir, "/."); - if(get_fs_stats(s, &stats) == -1) { + if(get_fs_usage(s, NULL, &fsusage) == -1) { error("statfs %s: %s", s, strerror(errno)); /*NOTREACHED*/ } amfree(s); - mapsize = (stats.files + (off_t)7) / (off_t)8; /* in bytes */ + mapsize = (fsusage.fsu_files + (off_t)7) / (off_t)8; /* in bytes */ mapsize = (mapsize + (off_t)1023) / (off_t)1024; /* in kbytes */ /* the dump contains three maps plus the files */ diff --git a/client-src/client_util.c b/client-src/client_util.c index bba8b18..7765532 100644 --- a/client-src/client_util.c +++ b/client-src/client_util.c @@ -33,6 +33,7 @@ #include "client_util.h" #include "getfsent.h" #include "util.h" +#include "timestamp.h" #include "pipespawn.h" #define MAXMAXDUMPS 16 @@ -72,11 +73,11 @@ get_name( char *filename; char *ts; - ts = construct_timestamp(&t); + ts = get_timestamp_from_time(t); if(n == 0) number[0] = '\0'; else - snprintf(number, SIZEOF(number), "%03d", n - 1); + g_snprintf(number, SIZEOF(number), "%03d", n - 1); filename = vstralloc(get_pname(), ".", diskname, ".", ts, number, ".", exin, NULL); @@ -110,7 +111,7 @@ build_name( dbgdir = stralloc2(AMANDA_TMPDIR, "/"); if((d = opendir(AMANDA_TMPDIR)) == NULL) { - error("open debug directory \"%s\": %s", + error(_("open debug directory \"%s\": %s"), AMANDA_TMPDIR, strerror(errno)); /*NOTREACHED*/ } @@ -154,10 +155,9 @@ build_name( filename = get_name(diskname, exin, curtime, 0); afilename = newvstralloc(afilename, dbgdir, filename, NULL); quoted = quote_string(afilename); - dbprintf(("%s: Cannot create %s (%s)\n", - debug_prefix_time(NULL), quoted, strerror(errno))); + dbprintf(_("Cannot create %s (%s)\n"), quoted, strerror(errno)); if(verbose) { - printf("ERROR [cannot create %s (%s)]\n", + g_printf(_("ERROR [cannot create %s (%s)]\n"), quoted, strerror(errno)); } amfree(quoted); @@ -193,7 +193,7 @@ add_exclude( file[strlen(file) - 1] = '\0'; file++; } - fprintf(file_exclude, "%s\n", file); + g_fprintf(file_exclude, "%s\n", file); amfree(quoted); return 1; } @@ -219,10 +219,9 @@ add_include( } if (strncmp(ainc, "./", 2) != 0) { quoted = quote_string(ainc); - dbprintf(("%s: include must start with './' (%s)\n", - debug_prefix_time(NULL), quoted)); + dbprintf(_("include must start with './' (%s)\n"), quoted); if(verbose) { - printf("ERROR [include must start with './' (%s)]\n", quoted); + g_printf(_("ERROR [include must start with './' (%s)]\n"), quoted); } amfree(quoted); } @@ -235,7 +234,7 @@ add_include( file[strlen(file) - 1] = '\0'; file++; } - fprintf(file_include, "%s\n", file); + g_fprintf(file_include, "%s\n", file); amfree(quoted); nb_exp++; } @@ -247,10 +246,9 @@ add_include( regex = glob_to_regex(incname); if((d = opendir(device)) == NULL) { quoted = quote_string(device); - dbprintf(("%s: Can't open disk %s\n", - debug_prefix_time(NULL), quoted)); + dbprintf(_("Can't open disk %s\n"), quoted); if(verbose) { - printf("ERROR [Can't open disk %s]\n", quoted); + g_printf(_("ERROR [Can't open disk %s]\n"), quoted); } amfree(quoted); } @@ -266,7 +264,7 @@ add_include( file[strlen(file) - 1] = '\0'; file++; } - fprintf(file_include, "%s\n", file); + g_fprintf(file_include, "%s\n", file); amfree(quoted); amfree(incname); nb_exp++; @@ -329,12 +327,11 @@ build_exclude( } else { quoted = quote_string(exclname); - dbprintf(("%s: Can't open exclude file %s (%s)\n", - debug_prefix_time(NULL), - quoted, strerror(errno))); + dbprintf(_("Can't open exclude file %s (%s)\n"), + quoted, strerror(errno)); if(verbose && (options->exclude_optional == 0 || errno != ENOENT)) { - printf("ERROR [Can't open exclude file %s (%s)]\n", + g_printf(_("ERROR [Can't open exclude file %s (%s)]\n"), quoted, strerror(errno)); } amfree(quoted); @@ -346,11 +343,10 @@ build_exclude( } else { quoted = quote_string(filename); - dbprintf(("%s: Can't create exclude file %s (%s)\n", - debug_prefix_time(NULL), - quoted, strerror(errno))); + dbprintf(_("Can't create exclude file %s (%s)\n"), + quoted, strerror(errno)); if(verbose) { - printf("ERROR [Can't create exclude file %s (%s)]\n", + g_printf(_("ERROR [Can't create exclude file %s (%s)]\n"), quoted, strerror(errno)); } amfree(quoted); @@ -412,11 +408,11 @@ build_include( } else { quoted = quote_string(inclname); - dbprintf(("%s: Can't open include file %s (%s)\n", - debug_prefix_time(NULL), quoted, strerror(errno))); + dbprintf(_("Can't open include file %s (%s)\n"), + quoted, strerror(errno)); if(verbose && (options->include_optional == 0 || errno != ENOENT)) { - printf("ERROR [Can't open include file %s (%s)]\n", + g_printf(_("ERROR [Can't open include file %s (%s)]\n"), quoted, strerror(errno)); } amfree(quoted); @@ -428,10 +424,10 @@ build_include( } else { quoted = quote_string(filename); - dbprintf(("%s: Can't create include file %s (%s)\n", - debug_prefix_time(NULL), quoted, strerror(errno))); + dbprintf(_("Can't create include file %s (%s)\n"), + quoted, strerror(errno)); if(verbose) { - printf("ERROR [Can't create include file %s (%s)]\n", + g_printf(_("ERROR [Can't create include file %s (%s)]\n"), quoted, strerror(errno)); } amfree(quoted); @@ -440,9 +436,9 @@ build_include( if(nb_exp == 0) { quoted = quote_string(disk); - dbprintf(("%s: No include for %s\n", debug_prefix_time(NULL), quoted)); + dbprintf(_("No include for %s\n"), quoted); if(verbose && options->include_optional == 0) { - printf("ERROR [No include for %s]\n", quoted); + g_printf(_("ERROR [No include for %s]\n"), quoted); } amfree(quoted); } @@ -460,6 +456,7 @@ init_options( options->srvcompprog = NULL; options->clntcompprog = NULL; options->encrypt = ENCRYPT_NONE; + options->kencrypt = 0; options->srv_encrypt = NULL; options->clnt_encrypt = NULL; options->srv_decrypt_opt = NULL; @@ -505,10 +502,9 @@ parse_options( && BSTRNCMP(tok,"auth=") == 0) { if(options->auth != NULL) { quoted = quote_string(tok + 5); - dbprintf(("%s: multiple auth option %s\n", - debug_prefix_time(NULL), quoted)); + dbprintf(_("multiple auth option %s\n"), quoted); if(verbose) { - printf("ERROR [multiple auth option %s]\n", quoted); + g_printf(_("ERROR [multiple auth option %s]\n"), quoted); } amfree(quoted); } @@ -517,10 +513,9 @@ parse_options( else if(am_has_feature(fs, fe_options_bsd_auth) && BSTRNCMP(tok, "bsd-auth") == 0) { if(options->auth != NULL) { - dbprintf(("%s: multiple auth option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple auth option\n")); if(verbose) { - printf("ERROR [multiple auth option]\n"); + g_printf(_("ERROR [multiple auth option]\n")); } } options->auth = stralloc("bsd"); @@ -528,60 +523,54 @@ parse_options( else if(am_has_feature(fs, fe_options_krb4_auth) && BSTRNCMP(tok, "krb4-auth") == 0) { if(options->auth != NULL) { - dbprintf(("%s: multiple auth option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple auth option\n")); if(verbose) { - printf("ERROR [multiple auth option]\n"); + g_printf(_("ERROR [multiple auth option]\n")); } } options->auth = stralloc("krb4"); } else if(BSTRNCMP(tok, "compress-fast") == 0) { if(options->compress != COMP_NONE) { - dbprintf(("%s: multiple compress option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple compress option\n")); if(verbose) { - printf("ERROR [multiple compress option]\n"); + g_printf(_("ERROR [multiple compress option]\n")); } } options->compress = COMP_FAST; } else if(BSTRNCMP(tok, "compress-best") == 0) { if(options->compress != COMP_NONE) { - dbprintf(("%s: multiple compress option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple compress option\n")); if(verbose) { - printf("ERROR [multiple compress option]\n"); + g_printf(_("ERROR [multiple compress option]\n")); } } options->compress = COMP_BEST; } else if(BSTRNCMP(tok, "srvcomp-fast") == 0) { if(options->compress != COMP_NONE) { - dbprintf(("%s: multiple compress option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple compress option\n")); if(verbose) { - printf("ERROR [multiple compress option]\n"); + g_printf(_("ERROR [multiple compress option]\n")); } } options->compress = COMP_SERVER_FAST; } else if(BSTRNCMP(tok, "srvcomp-best") == 0) { if(options->compress != COMP_NONE) { - dbprintf(("%s: multiple compress option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple compress option\n")); if(verbose) { - printf("ERROR [multiple compress option]\n"); + g_printf(_("ERROR [multiple compress option]\n")); } } options->compress = COMP_SERVER_BEST; } else if(BSTRNCMP(tok, "srvcomp-cust=") == 0) { if(options->compress != COMP_NONE) { - dbprintf(("%s: multiple compress option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple compress option\n")); if(verbose) { - printf("ERROR [multiple compress option]\n"); + g_printf(_("ERROR [multiple compress option]\n")); } } options->srvcompprog = stralloc(tok + SIZEOF("srvcomp-cust=") -1); @@ -589,10 +578,9 @@ parse_options( } else if(BSTRNCMP(tok, "comp-cust=") == 0) { if(options->compress != COMP_NONE) { - dbprintf(("%s: multiple compress option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple compress option\n")); if(verbose) { - printf("ERROR [multiple compress option]\n"); + g_printf(_("ERROR [multiple compress option]\n")); } } options->clntcompprog = stralloc(tok + SIZEOF("comp-cust=") -1); @@ -601,10 +589,9 @@ parse_options( } else if(BSTRNCMP(tok, "encrypt-serv-cust=") == 0) { if(options->encrypt != ENCRYPT_NONE) { - dbprintf(("%s: multiple encrypt option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple encrypt option\n")); if(verbose) { - printf("ERROR [multiple encrypt option]\n"); + g_printf(_("ERROR [multiple encrypt option]\n")); } } options->srv_encrypt = stralloc(tok + SIZEOF("encrypt-serv-cust=") -1); @@ -612,10 +599,9 @@ parse_options( } else if(BSTRNCMP(tok, "encrypt-cust=") == 0) { if(options->encrypt != ENCRYPT_NONE) { - dbprintf(("%s: multiple encrypt option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple encrypt option\n")); if(verbose) { - printf("ERROR [multiple encrypt option]\n"); + g_printf(_("ERROR [multiple encrypt option]\n")); } } options->clnt_encrypt= stralloc(tok + SIZEOF("encrypt-cust=") -1); @@ -629,40 +615,36 @@ parse_options( } else if(BSTRNCMP(tok, "no-record") == 0) { if(options->no_record != 0) { - dbprintf(("%s: multiple no-record option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple no-record option\n")); if(verbose) { - printf("ERROR [multiple no-record option]\n"); + g_printf(_("ERROR [multiple no-record option]\n")); } } options->no_record = 1; } else if(BSTRNCMP(tok, "index") == 0) { if(options->createindex != 0) { - dbprintf(("%s: multiple index option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple index option\n")); if(verbose) { - printf("ERROR [multiple index option]\n"); + g_printf(_("ERROR [multiple index option]\n")); } } options->createindex = 1; } else if(BSTRNCMP(tok, "exclude-optional") == 0) { if(options->exclude_optional != 0) { - dbprintf(("%s: multiple exclude-optional option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple exclude-optional option\n")); if(verbose) { - printf("ERROR [multiple exclude-optional option]\n"); + g_printf(_("ERROR [multiple exclude-optional option]\n")); } } options->exclude_optional = 1; } else if(strcmp(tok, "include-optional") == 0) { if(options->include_optional != 0) { - dbprintf(("%s: multiple include-optional option\n", - debug_prefix_time(NULL))); + dbprintf(_("multiple include-optional option\n")); if(verbose) { - printf("ERROR [multiple include-optional option]\n"); + g_printf(_("ERROR [multiple include-optional option]\n")); } } options->include_optional = 1; @@ -687,12 +669,14 @@ parse_options( options->include_list = append_sl(options->include_list, inc); amfree(inc); } + else if(BSTRNCMP(tok,"kencrypt") == 0) { + options->kencrypt = 1; + } else if(strcmp(tok,"|") != 0) { quoted = quote_string(tok); - dbprintf(("%s: unknown option %s\n", - debug_prefix_time(NULL), quoted)); + dbprintf(_("unknown option %s\n"), quoted); if(verbose) { - printf("ERROR [unknown option: %s]\n", quoted); + g_printf(_("ERROR [unknown option: %s]\n"), quoted); } amfree(quoted); } @@ -713,7 +697,7 @@ output_tool_property( if (!is_empty_sl(options->exclude_file)) { for(sle = options->exclude_file->first ; sle != NULL; sle=sle->next) { q = quote_string(sle->name); - fprintf(tool, "EXCLUDE-FILE %s\n", q); + g_fprintf(tool, "EXCLUDE-FILE %s\n", q); amfree(q); } } @@ -721,7 +705,7 @@ output_tool_property( if (!is_empty_sl(options->exclude_list)) { for(sle = options->exclude_list->first ; sle != NULL; sle=sle->next) { q = quote_string(sle->name); - fprintf(tool, "EXCLUDE-LIST %s\n", q); + g_fprintf(tool, "EXCLUDE-LIST %s\n", q); amfree(q); } } @@ -729,7 +713,7 @@ output_tool_property( if (!is_empty_sl(options->include_file)) { for(sle = options->include_file->first ; sle != NULL; sle=sle->next) { q = quote_string(sle->name); - fprintf(tool, "INCLUDE-FILE %s\n", q); + g_fprintf(tool, "INCLUDE-FILE %s\n", q); amfree(q); } } @@ -737,7 +721,7 @@ output_tool_property( if (!is_empty_sl(options->include_list)) { for(sle = options->include_list->first ; sle != NULL; sle=sle->next) { q = quote_string(sle->name); - fprintf(tool, "INCLUDE-LIST %s\n", q); + g_fprintf(tool, "INCLUDE-LIST %s\n", q); amfree(q); } } @@ -745,17 +729,17 @@ output_tool_property( if (!is_empty_sl(options->exclude_file) || !is_empty_sl(options->exclude_list)) { if (options->exclude_optional) - fprintf(tool, "EXCLUDE-OPTIONAL YES\n"); + g_fprintf(tool, "EXCLUDE-OPTIONAL YES\n"); else - fprintf(tool, "EXCLUDE-OPTIONAL NO\n"); + g_fprintf(tool, "EXCLUDE-OPTIONAL NO\n"); } if (!is_empty_sl(options->include_file) || !is_empty_sl(options->include_list)) { if (options->include_optional) - fprintf(tool, "INCLUDE-OPTIONAL YES\n"); + g_fprintf(tool, "INCLUDE-OPTIONAL YES\n"); else - fprintf(tool, "INCLUDE-OPTIONAL NO\n"); + g_fprintf(tool, "INCLUDE-OPTIONAL NO\n"); } } @@ -808,7 +792,7 @@ backup_support_option( memset(bsu, '\0', SIZEOF(*bsu)); streamout = fdopen(supportout, "r"); while((line = agets(streamout)) != NULL) { - dbprintf(("support line: %s\n", line)); + dbprintf(_("support line: %s\n"), line); if (strncmp(line,"CONFIG ", 7) == 0) { if (strcmp(line+7, "YES") == 0) bsu->config = 1; @@ -851,7 +835,7 @@ backup_support_option( } else if (strncmp(line,"MAX-LEVEL ", 10) == 0) { bsu->max_level = atoi(line+10); } else { - dbprintf(("Invalid support line: %s\n", line)); + dbprintf(_("Invalid support line: %s\n"), line); } amfree(line); } diff --git a/client-src/client_util.h b/client-src/client_util.h index e3f4d7a..b5ed362 100644 --- a/client-src/client_util.h +++ b/client-src/client_util.h @@ -57,6 +57,7 @@ typedef struct option_s { sl_t *include_list; int exclude_optional; int include_optional; + int kencrypt; } option_t; typedef struct backup_support_option_s { diff --git a/client-src/getfsent.c b/client-src/getfsent.c index 03e68d8..496c4e1 100644 --- a/client-src/getfsent.c +++ b/client-src/getfsent.c @@ -30,6 +30,7 @@ */ #include "amanda.h" +#include "util.h" #ifdef TEST # include @@ -85,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 @@ 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 @@ 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 @@ print_entry( generic_fsent_t * fsent) { #define nchk(s) ((s)? (s) : "") - 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 @@ 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); @@ -662,98 +669,92 @@ main( 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 --git a/client-src/killpgrp.c b/client-src/killpgrp.c index e2b983d..3749e32 100644 --- a/client-src/killpgrp.c +++ b/client-src/killpgrp.c @@ -35,6 +35,7 @@ */ #include "amanda.h" #include "version.h" +#include "util.h" #ifdef HAVE_GETPGRP #ifdef GETPGRP_VOID @@ -51,13 +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(); @@ -65,42 +77,33 @@ int main( 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 */ @@ -112,15 +115,16 @@ int main( 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 +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 +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 --git a/client-src/noop.c b/client-src/noop.c index a0c4105..fb3acbd 100644 --- a/client-src/noop.c +++ b/client-src/noop.c @@ -52,10 +52,22 @@ main( (void)argc; /* Quiet unused parameter warning */ (void)argv; /* Quiet unused parameter warning */ + /* + * 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"); + /* Don't die when child closes pipe */ signal(SIGPIPE, SIG_IGN); safe_fd(-1, 0); + + check_running_as(RUNNING_AS_CLIENT_LOGIN); + do { /* soak up any stdin */ n = read(0, &ch, 1); @@ -70,7 +82,7 @@ main( am_release_feature_set(our_features); our_features = NULL; if (fullwrite(1, options, strlen(options)) < 0) { - error("error sending noop response: %s", strerror(errno)); + error(_("error sending noop response: %s"), strerror(errno)); /*NOTREACHED*/ } amfree(options); diff --git a/client-src/patch-system.sh.in b/client-src/patch-system.sh.in deleted file mode 100644 index f96f72e..0000000 --- a/client-src/patch-system.sh.in +++ /dev/null @@ -1,144 +0,0 @@ -#! @SHELL@ -# -# patch inetd.conf and services -# originally by Axel Zinser (fifi@hiss.han.de) -# - -prefix="@prefix@" -exec_prefix="@exec_prefix@" -libexecdir="@libexecdir@" - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -SERVICE_SUFFIX="@SERVICE_SUFFIX@" - -USER="@CLIENT_LOGIN@" - -INETDCONF=/etc/inetd.conf -[ ! -f $INETDCONF ] && INETDCONF=/usr/etc/inetd.conf - -SERVICES=/etc/services -[ ! -f $SERVICES ] && SERVICES=/usr/etc/services - -ENABLE_AMANDAD=true - -case `uname -n` in -"@DEFAULT_SERVER@" | "@DEFAULT_SERVER@".*) - ENABLE_INDEX=true - ENABLE_TAPE=true - ;; -*) - ENABLE_INDEX=false - ENABLE_TAPE=false - ;; -esac - -CLIENT_PORT=10080 -KCLIENT_PORT=10081 -INDEX_PORT=10082 -TAPE_PORT=10083 - -while [ $# != 0 ]; do - case "$1" in - --service-suffix=*) - SERVICE_SUFFIX=`echo $1 | sed -e 's/[^=]*=//'`;; - --version-suffix=*) - SUF=`echo $1 | sed -e 's/[^=]*=//'`;; - --inetd=*) - INETDCONF=`echo $1 | sed -e 's/[^=]*=//' -e 's%^$%/dev/null%'`;; - --services=*) - SERVICES=`echo $1 | sed -e 's/[^=]*=//' -e 's%^$%/dev/null%'`;; - --libexecdir=?*) - libexecdir=`echo $1 | sed -e 's/[^=]*=//'`;; - --user=?*) - USER=`echo $1 | sed -e 's/[^=]*=//'`;; - --enable-client) - ENABLE_AMANDAD=true;; - --disable-client) - ENABLE_AMANDAD=false;; - --enable-index) - ENABLE_INDEX=true;; - --disable-index) - ENABLE_INDEX=false;; - --enable-tape) - ENABLE_TAPE=true;; - --disable-tape) - ENABLE_TAPE=false;; - --client-port=?*) - CLIENT_PORT=`echo $1 | sed -e 's/[^=]*=//'`;; - --kclient-port=?*) - KCLIENT_PORT=`echo $1 | sed -e 's/[^=]*=//'`;; - --index-port=?*) - INDEX_PORT=`echo $1 | sed -e 's/[^=]*=//'`;; - --tape-port=?*) - TAPE_PORT=`echo $1 | sed -e 's/[^=]*=//'`;; - --usage | --help | -h) - echo "call this script with zero or more of the following arguments:" - echo "--version-suffix=: append to program names [$SUF]" - echo "--service-suffix=: append to service names [$SERVICE_SUFFIX]" - echo "--libexecdir=: where daemons should be looked for [$libexecdir]" - echo "--inetd=: full pathname of inetd.conf [$INETDCONF]" - echo "--services=: full pathname of services [$SERVICES]" - echo " an empty pathname or /dev/null causes that file to be skipped" - echo "--user=: run deamons as this user [$USER]" - echo "--enable/disable-client: enable/disable amandad [`$ENABLE_AMANDAD && echo enabled || echo disabled`]" - echo "--enable/disable-index: enable/disable index server [`$ENABLE_INDEX && echo enabled || echo disabled`]" - echo "--enable/disable-tape: enable/disable tape server [`$ENABLE_TAPE && echo enabled || echo disabled`]" - echo "--client-port=: amandad port number [$CLIENT_PORT]" - echo "--kclient-port=: kamandad port number [$KCLIENT_PORT]" - echo "--index-port=: index server port number [$INDEX_PORT]" - echo "--tape-port=: tape server port number [$TAPE_PORT]" - exec true;; - *) - echo "$0: invalid argument $1. run with -h for usage" >&2 - exec false;; - esac - shift -done - -if [ "$SERVICES" = /dev/null ]; then : -elif [ -f "$SERVICES" ]; then - TEMP="$SERVICES.new" - { - egrep < "$SERVICES" -v "^(amanda|kamanda|amandaidx|amidxtape)${SERVICE_SUFFIX}[ ]" - echo "amanda${SERVICE_SUFFIX} ${CLIENT_PORT}/udp" - echo "amanda${SERVICE_SUFFIX} ${CLIENT_PORT}/tcp" - echo "kamanda${SERVICE_SUFFIX} ${KCLIENT_PORT}/udp" - echo "amandaidx${SERVICE_SUFFIX} ${INDEX_PORT}/tcp" - echo "amidxtape${SERVICE_SUFFIX} ${TAPE_PORT}/tcp" - } > "$TEMP" - if diff "$SERVICES" "$TEMP" >/dev/null 2>/dev/null; then - echo "$SERVICES is up to date" - else - cp "$TEMP" "$SERVICES" || echo "cannot patch $SERVICES" - fi - rm -f "$TEMP" -else - echo "$SERVICES not found!" -fi -if [ "$INETDCONF" = /dev/null ]; then : -elif [ -f "$INETDCONF" ]; then - $ENABLE_AMANDAD && test ! -f $libexecdir/amandad$SUF && echo "warning: $libexecdir/amandad$SUF does not exist" >&2 - $ENABLE_INDEX && test ! -f $libexecdir/amindexd$SUF && echo "warning: $libexecdir/amindexd$SUF does not exist" >&2 - $ENABLE_TAPE && test ! -f $libexecdir/amidxtaped$SUF && echo "warning: $libexecdir/amidxtaped$SUF does not exist" >&2 - TEMP="$INETDCONF.new" - { - egrep < "$INETDCONF" -v "^(amanda|amandaidx|amidxtape)${SERVICE_SUFFIX}[ ]" - $ENABLE_AMANDAD && echo "amanda${SERVICE_SUFFIX} dgram udp wait $USER $libexecdir/amandad$SUF amandad$SUF" - $ENABLE_INDEX && echo "amandaidx${SERVICE_SUFFIX} stream tcp nowait $USER $libexecdir/amindexd$SUF amindexd$SUF" - $ENABLE_TAPE && echo "amidxtape${SERVICE_SUFFIX} stream tcp nowait $USER $libexecdir/amidxtaped$SUF amidxtaped$SUF" - } > "$TEMP" - if diff "$INETDCONF" "$TEMP" >/dev/null 2>/dev/null; then - echo "$INETDCONF is up to date" - else - cp "$TEMP" "$INETDCONF" || echo "cannot patch $INETDCONF" - fi - rm -f "$TEMP" -else - echo "$INETDCONF not found!" -fi diff --git a/client-src/rundump.c b/client-src/rundump.c index 5a9e50f..d6772fa 100644 --- a/client-src/rundump.c +++ b/client-src/rundump.c @@ -33,6 +33,7 @@ * argv[2] will be argv[0] of the DUMP program * ... */ +#include "util.h" #include "amanda.h" #include "version.h" @@ -44,10 +45,10 @@ int main(int argc, char **argv); #endif #if !defined(USE_RUNDUMP) -# define ERRMSG "rundump not enabled on this system.\n" +# define ERRMSG _("rundump not enabled on this system.\n") #else # if !defined(DUMP) && !defined(VXDUMP) && !defined(VDUMP) && !defined(XFSDUMP) -# define ERRMSG "DUMP not available on this system.\n" +# define ERRMSG _("DUMP not available on this system.\n") # else # undef ERRMSG # endif @@ -62,8 +63,18 @@ main( char *dump_program; int i; char *e; + char *cmdline; #endif /* ERRMSG */ + /* + * 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(); @@ -74,47 +85,36 @@ main( dbopen(DBG_SUBDIR_CLIENT); if (argc < 3) { - error("%s: Need at least 3 arguments\n", debug_prefix_time(NULL)); + error(_("Need at least 3 arguments\n")); /*NOTREACHED*/ } - dbprintf(("%s: version %s\n", debug_prefix_time(NULL), version())); + dbprintf(_("version %s\n"), version()); #ifdef ERRMSG /* { */ - fprintf(stderr, ERRMSG); - dbprintf(("%s: %s", argv[0], ERRMSG)); + g_fprintf(stderr, ERRMSG); + dbprintf("%s: %s", argv[0], ERRMSG); dbclose(); return 1; #else /* } { */ - if(client_uid == (uid_t) -1) { - error("error [cannot find user %s in passwd file]\n", CLIENT_LOGIN); - /*NOTREACHED*/ - } - -#ifdef FORCE_USERID - if (getuid() != client_uid) { - error("error [must be invoked by %s]\n", 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]\n"); - /*NOTREACHED*/ - } -#endif /* FORCE_USERID */ - -#if !defined (DONT_SUID_ROOT) - setuid(0); +#else + check_running_as(RUNNING_AS_CLIENT_LOGIN); #endif /* skip argv[0] */ argc--; argv++; - dbprintf(("config: %s\n", argv[0])); + dbprintf(_("config: %s\n"), argv[0]); if (strcmp(argv[0], "NOCONFIG") != 0) dbrename(argv[0], DBG_SUBDIR_CLIENT); argc--; @@ -158,18 +158,24 @@ main( # endif #endif - dbprintf(("running: %s: ",dump_program)); - for (i=0; argv[i]; i++) - dbprintf(("%s ", argv[i])); - dbprintf(("\n")); + cmdline = stralloc(dump_program); + for (i = 1; argv[i]; i++) { + char *quoted; + + quoted = quote_string(argv[i]); + cmdline = vstrextend(&cmdline, " ", quoted, NULL); + amfree(quoted); + } + dbprintf(_("running: %s\n"), cmdline); + amfree(cmdline); execve(dump_program, argv, safe_env()); e = strerror(errno); - dbprintf(("failed (%s)\n", e)); + dbprintf(_("failed (%s)\n"), e); dbclose(); - fprintf(stderr, "rundump: could not exec %s: %s\n", dump_program, e); + g_fprintf(stderr, _("rundump: could not exec %s: %s\n"), dump_program, e); return 1; #endif /* } */ } diff --git a/client-src/runtar.c b/client-src/runtar.c index f088ea1..144d6bf 100644 --- a/client-src/runtar.c +++ b/client-src/runtar.c @@ -48,8 +48,18 @@ main( int i; char *e; char *dbf; + char *cmdline; #endif + /* + * 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(); @@ -60,22 +70,21 @@ main( dbopen(DBG_SUBDIR_CLIENT); if (argc < 3) { - error("%s: Need at least 3 arguments\n", debug_prefix_time(NULL)); + error(_("Need at least 3 arguments\n")); /*NOTREACHED*/ } - dbprintf(("%s: version %s\n", debug_prefix_time(NULL), version())); + dbprintf(_("version %s\n"), version()); if (strcmp(argv[3], "--create") != 0) { - error("%s: Can only be used to create tar archives\n", - debug_prefix_time(NULL)); + error(_("Can only be used to create tar archives\n")); /*NOTREACHED*/ } #ifndef GNUTAR - fprintf(stderr,"gnutar not available on this system.\n"); - dbprintf(("%s: gnutar not available on this system.\n", argv[0])); + g_fprintf(stderr,_("gnutar not available on this system.\n")); + dbprintf(_("%s: gnutar not available on this system.\n"), argv[0]); dbclose(); return 1; @@ -90,60 +99,55 @@ main( if ((version_file = popen(GNUTAR " --version 2>&1", "r")) != NULL) { if (fgets(version_buf, (int)sizeof(version_buf), version_file) != NULL) { - dbprintf((GNUTAR " version: %s\n", version_buf)); + dbprintf(_(GNUTAR " version: %s\n"), version_buf); } else { if (ferror(version_file)) { - dbprintf((GNUTAR " version: Read failure: %s\n", strerror(errno))); + dbprintf(_(GNUTAR " version: Read failure: %s\n"), strerror(errno)); } else { - dbprintf((GNUTAR " version: Read failure; EOF\n")); + dbprintf(_(GNUTAR " version: Read failure; EOF\n")); } } } else { - dbprintf((GNUTAR " version: unavailable: %s\n", strerror(errno))); + dbprintf(_(GNUTAR " version: unavailable: %s\n"), strerror(errno)); } } while(0); - if(client_uid == (uid_t) -1) { - error("error [cannot find user %s in passwd file]\n", CLIENT_LOGIN); - /*NOTREACHED*/ - } - -#ifdef FORCE_USERID - if (getuid() != client_uid) { - error("error [must be invoked by %s]\n", CLIENT_LOGIN); + if(get_client_uid() == (uid_t) -1) { + error(_("error [cannot find user %s in passwd file]\n"), CLIENT_LOGIN); /*NOTREACHED*/ } - if (geteuid() != 0) { - error("error [must be setuid root]\n"); +#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*/ } -#endif - -#if !defined (DONT_SUID_ROOT) - setuid(0); +#else + check_running_as(RUNNING_AS_CLIENT_LOGIN); #endif /* skip argv[0] */ argc--; argv++; - dbprintf(("config: %s\n", argv[0])); + dbprintf(_("config: %s\n"), argv[0]); if (strcmp(argv[0], "NOCONFIG") != 0) dbrename(argv[0], DBG_SUBDIR_CLIENT); argc--; argv++; - - dbprintf(("running: %s: ",GNUTAR)); - for (i=0; argv[i]; i++) { + cmdline = stralloc(GNUTAR); + for (i = 1; argv[i]; i++) { char *quoted; quoted = quote_string(argv[i]); - dbprintf(("'%s' ", quoted)); + cmdline = vstrextend(&cmdline, " ", quoted, NULL); amfree(quoted); } - dbprintf(("\n")); + dbprintf(_("running: %s\n"), cmdline); + amfree(cmdline); + dbf = dbfn(); if (dbf) { dbf = stralloc(dbf); @@ -155,10 +159,10 @@ main( e = strerror(errno); dbreopen(dbf, "more"); amfree(dbf); - dbprintf(("execve of %s failed (%s)\n", GNUTAR, e)); + dbprintf(_("execve of %s failed (%s)\n"), GNUTAR, e); dbclose(); - fprintf(stderr, "runtar: could not exec %s: %s\n", GNUTAR, e); + g_fprintf(stderr, _("runtar: could not exec %s: %s\n"), GNUTAR, e); return 1; #endif } diff --git a/client-src/selfcheck.c b/client-src/selfcheck.c index 90eb69c..aad6872 100644 --- a/client-src/selfcheck.c +++ b/client-src/selfcheck.c @@ -31,7 +31,7 @@ */ #include "amanda.h" -#include "statfs.h" +#include "fsusage.h" #include "version.h" #include "getfsent.h" #include "amandates.h" @@ -103,16 +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(); @@ -128,19 +132,15 @@ main( 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); @@ -161,27 +161,22 @@ main( 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; @@ -298,8 +293,14 @@ main( 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(); @@ -307,31 +308,16 @@ main( 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 +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; } @@ -376,18 +362,18 @@ check_options( 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; } @@ -414,16 +400,16 @@ check_options( 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; @@ -488,8 +474,17 @@ check_options( } 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 +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; @@ -544,9 +540,8 @@ check_disk( 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; @@ -555,35 +550,33 @@ check_disk( 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; } @@ -613,11 +606,8 @@ check_disk( /*@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; } @@ -627,8 +617,8 @@ check_disk( 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 = ""; @@ -646,38 +636,31 @@ check_disk( 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; } @@ -686,10 +669,9 @@ check_disk( 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 /* { */ @@ -722,14 +704,14 @@ check_disk( 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 */ @@ -767,8 +749,9 @@ check_disk( 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 */ @@ -777,7 +760,7 @@ check_disk( 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); @@ -785,17 +768,13 @@ check_disk( 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; } @@ -810,7 +789,7 @@ check_disk( } 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) { @@ -822,8 +801,8 @@ check_disk( 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 +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 +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); @@ -884,7 +862,7 @@ check_overall(void) 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); @@ -894,7 +872,7 @@ check_overall(void) #ifdef DUMP check_file(DUMP, X_OK); #else - printf("ERROR [DUMP program not available]\n"); + g_printf(_("ERROR [DUMP program not available]\n")); #endif } @@ -902,7 +880,7 @@ check_overall(void) #ifdef RESTORE check_file(RESTORE, X_OK); #else - printf("ERROR [RESTORE program not available]\n"); + g_printf(_("ERROR [RESTORE program not available]\n")); #endif } @@ -910,7 +888,7 @@ check_overall(void) #ifdef VDUMP check_file(VDUMP, X_OK); #else - printf("ERROR [VDUMP program not available]\n"); + g_printf(_("ERROR [VDUMP program not available]\n")); #endif } @@ -918,7 +896,7 @@ check_overall(void) #ifdef VRESTORE check_file(VRESTORE, X_OK); #else - printf("ERROR [VRESTORE program not available]\n"); + g_printf(_("ERROR [VRESTORE program not available]\n")); #endif } @@ -926,7 +904,7 @@ check_overall(void) #ifdef XFSDUMP check_file(XFSDUMP, F_OK); #else - printf("ERROR [XFSDUMP program not available]\n"); + g_printf(_("ERROR [XFSDUMP program not available]\n")); #endif } @@ -934,7 +912,7 @@ check_overall(void) #ifdef XFSRESTORE check_file(XFSRESTORE, X_OK); #else - printf("ERROR [XFSRESTORE program not available]\n"); + g_printf(_("ERROR [XFSRESTORE program not available]\n")); #endif } @@ -942,7 +920,7 @@ check_overall(void) #ifdef VXDUMP check_file(VXDUMP, X_OK); #else - printf("ERROR [VXDUMP program not available]\n"); + g_printf(_("ERROR [VXDUMP program not available]\n")); #endif } @@ -950,7 +928,7 @@ check_overall(void) #ifdef VXRESTORE check_file(VXRESTORE, X_OK); #else - printf("ERROR [VXRESTORE program not available]\n"); + g_printf(_("ERROR [VXRESTORE program not available]\n")); #endif } @@ -958,7 +936,7 @@ check_overall(void) #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); @@ -976,7 +954,7 @@ check_overall(void) if( need_calcsize ) { char *cmd; - cmd = vstralloc(libexecdir, "/", "calcsize", versionsuffix(), NULL); + cmd = vstralloc(amlibexecdir, "/", "calcsize", versionsuffix(), NULL); check_file(cmd, X_OK); @@ -987,23 +965,23 @@ check_overall(void) #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)); } } @@ -1012,8 +990,8 @@ check_overall(void) 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 @@ -1023,7 +1001,7 @@ check_overall(void) } 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 } @@ -1042,7 +1020,7 @@ check_overall(void) 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 +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 +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 +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 +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 +1136,20 @@ static void 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 diff --git a/client-src/sendbackup-dump.c b/client-src/sendbackup-dump.c index cb87624..1ec5a7f 100644 --- a/client-src/sendbackup-dump.c +++ b/client-src/sendbackup-dump.c @@ -150,13 +150,12 @@ start_backup( (void)dumpdate; /* Quiet unused parameter warning */ - snprintf(level_str, SIZEOF(level_str), "%d", level); + g_snprintf(level_str, SIZEOF(level_str), "%d", level); 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); amfree(qdisk); @@ -165,8 +164,7 @@ start_backup( 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; @@ -187,23 +185,22 @@ start_backup( comppid = pipespawn(COMPRESS_PATH, STDIN_PIPE, &dumpout, &compout, &mesgf, COMPRESS_PATH, compopt, NULL); - dbprintf(("%s: pid %ld: %s", - debug_prefix_time("-dump"), (long)comppid, COMPRESS_PATH)); + dbprintf(_("dump: pid %ld: %s"), (long)comppid, COMPRESS_PATH); if(compopt != skip_argument) { - dbprintf((" %s", compopt)); + dbprintf(" %s", compopt); } - dbprintf(("\n")); + 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)); + dbprintf(_("gnutar-cust: pid %ld: %s"), + (long)comppid, options->clntcompprog); if(compopt != skip_argument) { - dbprintf((" %s", compopt)); + dbprintf(" %s", compopt); } - dbprintf(("\n")); + dbprintf("\n"); } else { dumpout = compout; comppid = -1; @@ -213,11 +210,10 @@ start_backup( device = amname_to_devname(amdevice); fstype = amname_to_fstype(amdevice); - dbprintf(("%s: dumping device '%s' with '%s'\n", - debug_prefix_time(NULL), device, fstype)); + dbprintf(_("dumping device '%s' with '%s'\n"), device, fstype); #if defined(USE_RUNDUMP) || !defined(DUMP) - cmd = vstralloc(libexecdir, "/", "rundump", versionsuffix(), NULL); + cmd = vstralloc(amlibexecdir, "/", "rundump", versionsuffix(), NULL); cmdX = cmd; if (g_options->config) config = g_options->config; @@ -238,7 +234,7 @@ start_backup( if (1) #endif /* } */ { - char *progname = cmd = newvstralloc(cmd, libexecdir, "/", "rundump", + char *progname = cmd = newvstralloc(cmd, amlibexecdir, "/", "rundump", versionsuffix(), NULL); cmdX = cmd; if (g_options->config) @@ -283,7 +279,7 @@ start_backup( #endif { #ifdef USE_RUNDUMP - char *progname = cmd = newvstralloc(cmd, libexecdir, "/", "rundump", + char *progname = cmd = newvstralloc(cmd, amlibexecdir, "/", "rundump", versionsuffix(), NULL); cmdX = cmd; if (g_options->config) @@ -334,7 +330,7 @@ start_backup( if (1) #endif { - char *progname = cmd = newvstralloc(cmd, libexecdir, "/", "rundump", + char *progname = cmd = newvstralloc(cmd, amlibexecdir, "/", "rundump", versionsuffix(), NULL); cmdX = cmd; if (g_options->config) diff --git a/client-src/sendbackup-gnutar.c b/client-src/sendbackup-gnutar.c index d9c5e20..7e1a2a8 100644 --- a/client-src/sendbackup-gnutar.c +++ b/client-src/sendbackup-gnutar.c @@ -141,6 +141,7 @@ start_backup( int mesgf, int indexf) { + char tmppath[PATH_MAX]; int dumpin, dumpout, compout; char *cmd = NULL; char *indexcmd = NULL; @@ -153,7 +154,8 @@ start_backup( 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; @@ -164,10 +166,9 @@ start_backup( 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 */ @@ -175,8 +176,7 @@ start_backup( 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; @@ -194,23 +194,24 @@ start_backup( 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; @@ -228,27 +229,18 @@ start_backup( 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); @@ -261,7 +253,7 @@ start_backup( 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 { @@ -271,12 +263,11 @@ start_backup( 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); @@ -287,42 +278,43 @@ start_backup( * 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); } @@ -331,7 +323,7 @@ start_backup( 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*/ } @@ -347,13 +339,13 @@ start_backup( 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); @@ -391,7 +383,7 @@ start_backup( 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)) { @@ -399,7 +391,7 @@ start_backup( 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) { @@ -409,7 +401,7 @@ start_backup( } 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); @@ -422,7 +414,7 @@ start_backup( } 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'; @@ -436,7 +428,7 @@ start_backup( } 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*/ } @@ -454,11 +446,11 @@ start_backup( 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); @@ -502,7 +494,7 @@ start_backup( 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); @@ -534,7 +526,7 @@ start_backup( 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); @@ -544,12 +536,17 @@ start_backup( 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"; @@ -591,10 +588,7 @@ start_backup( 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 @@ 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); @@ -632,7 +626,7 @@ end_backup( } 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 --git a/client-src/sendbackup.c b/client-src/sendbackup.c index 9cfa397..2e91c9b 100644 --- a/client-src/sendbackup.c +++ b/client-src/sendbackup.c @@ -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) @@ -196,13 +196,20 @@ main( 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(); @@ -215,8 +222,6 @@ main( /* 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--; @@ -228,7 +233,7 @@ main( 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]); @@ -237,12 +242,9 @@ main( 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) { /* @@ -251,7 +253,7 @@ main( * 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); } @@ -267,7 +269,7 @@ main( 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) { @@ -279,31 +281,27 @@ main( } 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; @@ -324,7 +322,7 @@ main( 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 */ } @@ -339,7 +337,7 @@ main( skip_whitespace(s, ch); /* find the device or level */ if (ch == '\0') { - err_extra = "bad level"; + err_extra = _("bad level"); goto err; } @@ -360,14 +358,14 @@ main( } /* 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); @@ -378,38 +376,43 @@ main( 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 */ @@ -421,8 +424,8 @@ main( } } 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]; @@ -440,38 +443,41 @@ main( 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; @@ -495,7 +501,7 @@ main( 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); @@ -504,24 +510,27 @@ main( 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; @@ -547,7 +556,7 @@ main( 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) { @@ -558,9 +567,9 @@ main( argvchild[i++] = "--record"; } argvchild[i] = NULL; - dbprintf(("%s: running \"%s", get_pname(), cmd)); - for(j=1;jstart_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); @@ -625,28 +634,17 @@ main( 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 +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); @@ -703,7 +699,7 @@ check_status( * 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; @@ -754,16 +750,14 @@ check_status( 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; @@ -779,11 +773,11 @@ check_status( 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 @@ -791,13 +785,13 @@ info_tapeheader(void) #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 +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 @@ -835,28 +829,28 @@ backup_api_info_tapeheader( #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 +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 */ @@ -892,17 +885,17 @@ pipefork( 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 +924,7 @@ parse_backup_messages( } if(errno) { - error("error [read mesg pipe: %s]", strerror(errno)); + error(_("error [read mesg pipe: %s]"), strerror(errno)); /*NOTREACHED*/ } @@ -946,13 +939,13 @@ parse_backup_messages( } } 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); @@ -961,13 +954,13 @@ parse_backup_messages( } } 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); @@ -977,17 +970,17 @@ parse_backup_messages( } 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 +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 +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 +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]); @@ -1157,19 +1147,18 @@ start_index( 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; @@ -1181,7 +1170,7 @@ start_index( } 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*/ } @@ -1197,8 +1186,8 @@ start_index( * 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; @@ -1211,7 +1200,7 @@ start_index( 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; @@ -1224,10 +1213,11 @@ start_index( /* 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 --git a/client-src/sendsize.c b/client-src/sendsize.c index aec977e..8c64f63 100644 --- a/client-src/sendsize.c +++ b/client-src/sendsize.c @@ -45,31 +45,31 @@ #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 @@ 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(); @@ -172,19 +176,14 @@ main( 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 */ @@ -199,29 +198,25 @@ main( 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; @@ -240,7 +235,7 @@ main( 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; @@ -251,7 +246,7 @@ main( 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; @@ -284,7 +279,7 @@ main( 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 */ } @@ -301,7 +296,7 @@ main( 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])) { @@ -319,18 +314,18 @@ main( /* 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; @@ -343,7 +338,7 @@ main( 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); @@ -382,8 +377,7 @@ main( 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); @@ -411,7 +405,8 @@ main( 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); @@ -431,31 +426,24 @@ main( 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. */ @@ -465,8 +453,7 @@ main( } } 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; @@ -521,11 +508,10 @@ main( } 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 */ @@ -542,29 +528,18 @@ main( 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 +649,8 @@ void 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); @@ -699,16 +673,14 @@ calc_estimates( #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 +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 +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; @@ -789,8 +761,9 @@ generic_calc_estimates( 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; @@ -803,7 +776,8 @@ generic_calc_estimates( 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) @@ -833,30 +807,32 @@ generic_calc_estimates( } start_time = curclock(); - dbprintf(("%s: running cmd: %s", debug_prefix_time(NULL), my_argv[0])); - for(i=0; iest[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; } @@ -865,61 +841,59 @@ generic_calc_estimates( 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 +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 +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 +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); } @@ -1051,10 +1025,10 @@ gnutar_calc_estimates( 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 +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]; @@ -1142,29 +1116,25 @@ getsize_dump( 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); @@ -1175,9 +1145,9 @@ getsize_dump( } 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); @@ -1195,8 +1165,8 @@ getsize_dump( #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 /* } */ @@ -1216,8 +1186,8 @@ getsize_dump( 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 /* } */ @@ -1234,8 +1204,8 @@ getsize_dump( 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 /* } */ @@ -1256,8 +1226,8 @@ getsize_dump( # 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 @@ -1279,24 +1249,23 @@ getsize_dump( # 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; } @@ -1304,9 +1273,9 @@ getsize_dump( 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); @@ -1322,21 +1291,19 @@ getsize_dump( 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); @@ -1348,10 +1315,11 @@ getsize_dump( 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); } @@ -1368,6 +1336,7 @@ getsize_dump( aclose(killctl[0]); if (killctl[1] != -1) aclose(killctl[1]); + safe_fd(-1, 0); #ifdef XFSDUMP #ifdef DUMP @@ -1436,7 +1405,7 @@ getsize_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*/ } @@ -1450,14 +1419,14 @@ getsize_dump( 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); @@ -1467,43 +1436,40 @@ getsize_dump( 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); @@ -1516,11 +1482,9 @@ getsize_dump( * 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) { @@ -1529,11 +1493,9 @@ getsize_dump( 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); @@ -1541,25 +1503,23 @@ getsize_dump( 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 +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)) { @@ -1620,7 +1580,7 @@ getsize_smbtar( 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) { @@ -1631,7 +1591,7 @@ getsize_smbtar( } 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); @@ -1644,7 +1604,7 @@ getsize_smbtar( } 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'; @@ -1658,7 +1618,7 @@ getsize_smbtar( } 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) { @@ -1671,7 +1631,7 @@ getsize_smbtar( 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*/ } @@ -1725,7 +1685,7 @@ getsize_smbtar( 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); @@ -1737,14 +1697,14 @@ getsize_smbtar( 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); @@ -1754,58 +1714,54 @@ getsize_smbtar( 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 +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; @@ -1871,25 +1828,17 @@ getsize_gnutar( 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); @@ -1902,7 +1851,7 @@ getsize_gnutar( 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 { @@ -1910,9 +1859,9 @@ getsize_gnutar( } 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; } @@ -1924,38 +1873,38 @@ getsize_gnutar( * 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; } @@ -1964,14 +1913,14 @@ getsize_gnutar( } 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; @@ -1987,7 +1936,8 @@ getsize_gnutar( 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"; @@ -2026,9 +1976,9 @@ getsize_gnutar( 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; } @@ -2036,14 +1986,14 @@ getsize_gnutar( 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); @@ -2054,7 +2004,7 @@ getsize_gnutar( amfree(line); } if (line != NULL) { - dbprintf(("%s: %s\n", debug_prefix_time(NULL), line)); + dbprintf("%s\n", line); break; } break; @@ -2062,49 +2012,44 @@ getsize_gnutar( } 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 +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; @@ -2161,7 +2107,7 @@ getsize_backup_api( (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); @@ -2193,36 +2139,36 @@ getsize_backup_api( } 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; } @@ -2240,9 +2186,10 @@ getsize_backup_api( 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); @@ -2262,17 +2209,17 @@ getsize_backup_api( 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) { @@ -2286,55 +2233,49 @@ getsize_backup_api( 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 +2321,7 @@ off_t handle_dumpline( char * str) { - regex_t *rp; + regex_scale_t *rp; double size; /* check for size match */ diff --git a/client-src/unctime.c b/client-src/unctime.c index 3e99a98..1c16eaa 100644 --- a/client-src/unctime.c +++ b/client-src/unctime.c @@ -77,14 +77,12 @@ unctime( return mktime(&then); } -static char months[] = - "JanFebMarAprMayJunJulAugSepOctNovDec"; - static int lookup( char * str) { register char *cp, *cp2; + char *months = _("JanFebMarAprMayJunJulAugSepOctNovDec"); for (cp = months, cp2 = str; *cp != '\0'; cp += 3) if (strncmp(cp, cp2, 3) == 0) diff --git a/client-src/versionsuffix.c b/client-src/versionsuffix.c index 91d0700..d9e2ecb 100644 --- a/client-src/versionsuffix.c +++ b/client-src/versionsuffix.c @@ -30,18 +30,31 @@ */ #include "amanda.h" #include "version.h" +#include "util.h" int main(int argc, char **argv); -int main(int argc, char **argv) +int +main( + int argc, + char ** argv) { - safe_fd(-1, 0); - (void)argc; /* Quiet unused parameter warning */ (void)argv; /* Quiet unused parameter warning */ + /* + * 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("versionsuffix"); - printf("%s\n", versionsuffix()); + g_printf("%s\n", versionsuffix()); return 0; } diff --git a/common-src/Makefile.am b/common-src/Makefile.am index 672eb19..488b276 100644 --- a/common-src/Makefile.am +++ b/common-src/Makefile.am @@ -1,47 +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 @@ 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 \ @@ -61,9 +112,10 @@ noinst_HEADERS = \ security.h \ security-util.h \ sl.h \ - statfs.h \ + sockaddr-util.h \ stream.h \ tapelist.h \ + timestamp.h \ token.h \ util.h \ version.h @@ -74,45 +126,52 @@ noinst_HEADERS = \ 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 +181,65 @@ 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) +# 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 --git a/common-src/Makefile.in b/common-src/Makefile.in index e22c64b..af31e0a 100644 --- a/common-src/Makefile.in +++ b/common-src/Makefile.in @@ -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. @@ -16,16 +16,138 @@ # 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 @@ 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,62 +301,98 @@ 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 @@ -159,9 +403,9 @@ 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@ @@ -176,7 +420,13 @@ 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 +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,52 +463,162 @@ 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@ @@ -267,7 +626,8 @@ 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 +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 +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 +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 +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 \ @@ -457,62 +863,101 @@ noinst_HEADERS = \ 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 +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 +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@ @@ -625,11 +1122,11 @@ distclean-compile: @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@ @@ -637,22 +1134,22 @@ distclean-compile: @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 +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 +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; \ @@ -742,14 +1324,21 @@ distdir: $(DISTFILES) || 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 +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 +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 +1390,27 @@ info: info-am 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 +1431,177 @@ ps: ps-am 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 --git a/common-src/alloc.c b/common-src/alloc.c index 50cfc08..4089c00 100644 --- a/common-src/alloc.c +++ b/common-src/alloc.c @@ -24,7 +24,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: alloc.c,v 1.37 2006/07/05 10:41:32 martinea Exp $ + * $Id: alloc.c 5280 2007-02-13 15:58:56Z martineau $ * * Memory allocators with error handling. If the allocation fails, * errordump() is called, relieving the caller from checking the return @@ -34,165 +34,29 @@ #include "arglist.h" #include "queue.h" -#define MIN_ALLOC 64 -static char *internal_vstralloc(const char *, va_list); +#define MIN_ALLOC 64 -/* - *===================================================================== - * debug_caller_loc -- keep track of all allocation callers - * - * const char *debug_caller_loc(const char *file, int line) - * - * entry: file = source file - * line = source line - * exit: a string like "genversion.c@999" - * - * The debug malloc library has a concept of a call stack that can be used - * to fine tune what was running when a particular allocation was done. - * We use it to tell who called our various allocation wrappers since - * it wouldn't do much good to tell us a problem happened because of - * the malloc call in alloc (they are all from there at some point). - * - * But the library expects the string passed to malloc_enter/malloc_leave - * to be static, so we build a linked list of each one we get (there are - * not really that many during a given execution). When we get a repeat - * we return the previously allocated string. For a bit of performance, - * we keep the list in least recently used order, which helps because - * the calls to us come in pairs (one for malloc_enter and one right - * after for malloc_leave). - *===================================================================== - */ - -const char * -debug_caller_loc( - const char *file, - int line) -{ - /*@keep@*/ - struct loc_str { - char *str; - LIST_ENTRY(loc_str) le; - } *ls; - static LIST_HEAD(, loc_str) root = LIST_HEAD_INITIALIZER(root); - static char loc[256]; /* big enough for filename@lineno */ - const char *p; - - if ((p = strrchr(file, '/')) != NULL) - file = p + 1; /* just the last path element */ - - snprintf(loc, SIZEOF(loc), "%s@%d", file, line); - - for (ls = LIST_FIRST(&root); ls != NULL; ls = LIST_NEXT(ls, le)) { - if (strcmp(loc, ls->str) == 0) { - if (ls != LIST_FIRST(&root)) { - /* - * This is a repeat and was not at the head of the list. - * Unlink it and move it to the front. - */ - LIST_REMOVE(ls, le); - LIST_INSERT_HEAD(&root, ls, le); - } - return (ls->str); - } - } - - /* - * This is a new entry. Put it at the head of the list. - */ - ls = malloc(SIZEOF(*ls)); - if (ls == NULL) - return ("??"); /* not much better than abort */ - ls->str = malloc(strlen(loc) + 1); - if (ls->str == NULL) { - free(ls); - return ("??"); /* not much better than abort */ - } - strcpy(ls->str, loc); - malloc_mark(ls); - malloc_mark(ls->str); - LIST_INSERT_HEAD(&root, ls, le); - return (ls->str); -} - -/* - *===================================================================== - * Save the current source line for vstralloc/newvstralloc. - * - * int debug_alloc_push (char *s, int l) - * - * entry: s = source file - * l = source line - * exit: always zero - * - * See the comments in amanda.h about what this is used for. - *===================================================================== - */ - -#define DEBUG_ALLOC_SAVE_MAX 10 - -static struct { - char *file; - int line; -} debug_alloc_loc_info[DEBUG_ALLOC_SAVE_MAX]; -static int debug_alloc_ptr = 0; - -static char *saved_file; -static int saved_line; - -int -debug_alloc_push( - char *s, - int l) -{ - debug_alloc_loc_info[debug_alloc_ptr].file = s; - debug_alloc_loc_info[debug_alloc_ptr].line = l; - debug_alloc_ptr = (debug_alloc_ptr + 1) % DEBUG_ALLOC_SAVE_MAX; - return 0; -} - -/* - *===================================================================== - * Pop the current source line information for vstralloc/newvstralloc. - * - * int debug_alloc_pop (void) - * - * entry: none - * exit: none - * - * See the comments in amanda.h about what this is used for. - *===================================================================== - */ - -void -debug_alloc_pop(void) -{ - debug_alloc_ptr = - (debug_alloc_ptr + DEBUG_ALLOC_SAVE_MAX - 1) % DEBUG_ALLOC_SAVE_MAX; - saved_file = debug_alloc_loc_info[debug_alloc_ptr].file; - saved_line = debug_alloc_loc_info[debug_alloc_ptr].line; -} +static char *internal_vstralloc(const char *, int, const char *, va_list); /* * alloc - a wrapper for malloc. */ void * debug_alloc( - const char *s, - int l, - size_t size) + const char *file, + int line, + size_t size) { void *addr; - malloc_enter(debug_caller_loc(s, l)); addr = (void *)malloc(max(size, 1)); if (addr == NULL) { - errordump("%s@%d: memory allocation failed (" SIZE_T_FMT " bytes requested)", - s ? s : "(unknown)", - s ? l : -1, - (SIZE_T_FMT_TYPE)size); + errordump(_("%s@%d: memory allocation failed (%zu bytes requested)"), + file ? file : _("(unknown)"), + file ? line : -1, + size); /*NOTREACHED*/ } - malloc_leave(debug_caller_loc(s, l)); return addr; } @@ -202,17 +66,15 @@ debug_alloc( */ void * debug_newalloc( - const char *s, - int l, - void *old, - size_t size) + const char *file, + int line, + void * old, + size_t size) { char *addr; - malloc_enter(debug_caller_loc(s, l)); - addr = debug_alloc(s, l, size); + addr = debug_alloc(file, line, size); amfree(old); - malloc_leave(debug_caller_loc(s, l)); return addr; } @@ -223,41 +85,17 @@ debug_newalloc( */ char * debug_stralloc( - const char *s, - int l, + const char *file, + int line, const char *str) { char *addr; - malloc_enter(debug_caller_loc(s, l)); - addr = debug_alloc(s, l, strlen(str) + 1); + addr = debug_alloc(file, line, strlen(str) + 1); strcpy(addr, str); - malloc_leave(debug_caller_loc(s, l)); return (addr); } -/* vstrextend -- Extends the existing string by appending the other - * arguments. */ -/*@ignore@*/ -arglist_function( - char *vstrextend, - char **, oldstr) -{ - char *keep = *oldstr; - va_list ap; - - arglist_start(ap, oldstr); - - if (*oldstr == NULL) - *oldstr = ""; - *oldstr = internal_vstralloc(*oldstr, ap); - amfree(keep); - - arglist_end(ap); - return *oldstr; -} -/*@end@*/ - /* * internal_vstralloc - copies up to MAX_STR_ARGS strings into newly * allocated memory. @@ -270,6 +108,8 @@ arglist_function( static char * internal_vstralloc( + const char *file, + int line, const char *str, va_list argp) { @@ -282,7 +122,7 @@ internal_vstralloc( size_t l; if (str == NULL) { - errordump("internal_vstralloc: str is NULL"); + errordump(_("internal_vstralloc: str is NULL")); /*NOTREACHED*/ } @@ -297,9 +137,9 @@ internal_vstralloc( continue; /* minor optimisation */ } if (a >= MAX_VSTRALLOC_ARGS) { - errordump("%s@%d: more than %d args to vstralloc", - saved_file ? saved_file : "(unknown)", - saved_file ? saved_line : -1, + errordump(_("%s@%d: more than %d args to vstralloc"), + file ? file : _("(unknown)"), + file ? line : -1, MAX_VSTRALLOC_ARGS); /*NOTREACHED*/ } @@ -309,7 +149,7 @@ internal_vstralloc( a++; } - result = debug_alloc(saved_file, saved_line, total_len+1); + result = debug_alloc(file, line, total_len+1); next = result; for (b = 0; b < a; b++) { @@ -325,19 +165,19 @@ internal_vstralloc( /* * vstralloc - copies multiple strings into newly allocated memory. */ -arglist_function( - char *debug_vstralloc, - const char *, str) +char * +debug_vstralloc( + const char *file, + int line, + const char *str, + ...) { va_list argp; char *result; - debug_alloc_pop(); - malloc_enter(debug_caller_loc(saved_file, saved_line)); arglist_start(argp, str); - result = internal_vstralloc(str, argp); + result = internal_vstralloc(file, line, str, argp); arglist_end(argp); - malloc_leave(debug_caller_loc(saved_file, saved_line)); return result; } @@ -347,17 +187,15 @@ arglist_function( */ char * debug_newstralloc( - const char *s, - int l, - char *oldstr, + const char *file, + int line, + char * oldstr, const char *newstr) { char *addr; - malloc_enter(debug_caller_loc(s, l)); - addr = debug_stralloc(s, l, newstr); + addr = debug_stralloc(file, line, newstr); amfree(oldstr); - malloc_leave(debug_caller_loc(s, l)); return (addr); } @@ -365,21 +203,21 @@ debug_newstralloc( /* * newvstralloc - free existing string and then vstralloc a new one. */ -arglist_function1( - char *debug_newvstralloc, - char *, oldstr, - const char *, newstr) +char * +debug_newvstralloc( + const char *file, + int line, + char * oldstr, + const char *newstr, + ...) { va_list argp; char *result; - debug_alloc_pop(); - malloc_enter(debug_caller_loc(saved_file, saved_line)); arglist_start(argp, newstr); - result = internal_vstralloc(newstr, argp); + result = internal_vstralloc(file, line, newstr, argp); arglist_end(argp); amfree(oldstr); - malloc_leave(debug_caller_loc(saved_file, saved_line)); return result; } @@ -389,37 +227,96 @@ arglist_function1( */ char * debug_vstrallocf( + const char *file, + int line, const char *fmt, ...) { - char * result; - size_t size; - va_list argp; + char * result; + size_t size; + va_list argp; - debug_alloc_pop(); - malloc_enter(debug_caller_loc(saved_file, saved_line)); - result = debug_alloc(saved_file, saved_line, MIN_ALLOC); + result = debug_alloc(file, line, MIN_ALLOC); if (result != NULL) { arglist_start(argp, fmt); - size = vsnprintf(result, MIN_ALLOC, fmt, argp); + size = g_vsnprintf(result, MIN_ALLOC, fmt, argp); arglist_end(argp); if (size >= (size_t)MIN_ALLOC) { amfree(result); - result = debug_alloc(saved_file, saved_line, size + 1); + result = debug_alloc(file, line, size + 1); arglist_start(argp, fmt); - (void)vsnprintf(result, size + 1, fmt, argp); + (void)g_vsnprintf(result, size + 1, fmt, argp); arglist_end(argp); } } - malloc_leave(debug_caller_loc(saved_file, saved_line)); return result; } + +/* + * newvstrallocf - free existing string and then vstrallocf a new one. + */ +char * +debug_newvstrallocf( + const char *file, + int line, + char * oldstr, + const char *fmt, + ...) +{ + size_t size; + char * result; + va_list argp; + + result = debug_alloc(file, line, MIN_ALLOC); + if (result != NULL) { + + arglist_start(argp, fmt); + size = g_vsnprintf(result, MIN_ALLOC, fmt, argp); + arglist_end(argp); + + if (size >= MIN_ALLOC) { + amfree(result); + result = debug_alloc(file, line, size + 1); + + arglist_start(argp, fmt); + (void)g_vsnprintf(result, size + 1, fmt, argp); + arglist_end(argp); + } + } + amfree(oldstr); + return result; +} + +/* vstrextend -- Extends the existing string by appending the other + * arguments. */ +char * +debug_vstrextend( + const char *file, + int line, + char ** oldstr, + ...) +{ + char *keep = *oldstr; + va_list ap; + + arglist_start(ap, oldstr); + + if (*oldstr == NULL) + *oldstr = ""; + *oldstr = internal_vstralloc(file, line, *oldstr, ap); + amfree(keep); + + arglist_end(ap); + return *oldstr; +} + + extern char **environ; /* * safe_env - build a "safe" environment list. @@ -512,13 +409,13 @@ safe_env(void) int debug_amtable_alloc( - const char *s, - int l, - void **table, - size_t *current, - size_t elsize, - size_t count, - int bump, + const char *file, + int line, + void ** table, + size_t * current, + size_t elsize, + size_t count, + int bump, void (*init_func)(void *)) { void *table_new; @@ -527,7 +424,7 @@ debug_amtable_alloc( if (count >= *current) { table_count_new = ((count + bump) / bump) * bump; - table_new = debug_alloc(s, l, table_count_new * elsize); + table_new = debug_alloc(file, line, table_count_new * elsize); if (0 != *table) { memcpy(table_new, *table, *current * elsize); free(*table); @@ -557,8 +454,8 @@ debug_amtable_alloc( void amtable_free( - void **table, - size_t *current) + void ** table, + size_t * current) { amfree(*table); *current = 0; diff --git a/common-src/amanda.h b/common-src/amanda.h index 2858516..d03d8bc 100644 --- a/common-src/amanda.h +++ b/common-src/amanda.h @@ -31,8 +31,14 @@ #ifndef AMANDA_H #define AMANDA_H +#include +#include + +#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 @@ # include #endif +/* gnulib creates this header locally if the system doesn't provide it */ +#include + /* * 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 @@ -84,6 +93,32 @@ # endif #endif +#ifdef ENABLE_NLS +# include +# include +# 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 #endif @@ -250,9 +285,12 @@ struct iovec { # include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif + #include #include -#include #include #include #include @@ -268,9 +306,8 @@ struct iovec { #include #endif -#ifndef HAVE_SOCKADDR_STORAGE -# define sockaddr_storage sockaddr_in -# define ss_family sin_family +#ifdef WORKING_IPV6 +#define INET6 #endif #ifndef INET_ADDRSTRLEN @@ -566,83 +603,58 @@ extern char *debug_prefix_time(char *); #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 +676,8 @@ extern int debug_amtable_alloc(const char *file, (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 +692,6 @@ int match_disk(const char *glob, const char *disk); 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. @@ -712,52 +716,6 @@ void areads_relbuf(int fd); (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. */ @@ -856,15 +814,15 @@ void areads_relbuf(int fd); #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 { \ @@ -878,7 +836,7 @@ void areads_relbuf(int fd); #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) == '"')) { \ @@ -908,7 +866,7 @@ void areads_relbuf(int fd); #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; \ @@ -924,7 +882,7 @@ void areads_relbuf(int fd); #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; \ @@ -950,20 +908,9 @@ void areads_relbuf(int fd); ((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 @@ -972,7 +919,7 @@ extern int check_security(struct sockaddr_storage *, char *, unsigned long, char /* 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 +935,7 @@ extern void bcopy(const void *s1, void *s2, size_t n); #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 +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 +998,17 @@ extern int getopt(int argc, char * const *argv, const char *optstring); /* 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 +1096,7 @@ extern void *realloc(void *ptr, size_t size); /* 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 +1191,7 @@ extern int shmget(key_t key, size_t size, int shmflg); #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 +1229,7 @@ extern int strncasecmp(const char *s1, const char *s2, int n); #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 +1262,9 @@ extern int vfprintf(FILE *stream, const char *format, va_list ap); 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 +1308,11 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); #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 @@ -1414,8 +1320,6 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); #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 @@ -1424,8 +1328,6 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); # 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 @@ -1436,15 +1338,11 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); #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 @@ -1452,30 +1350,21 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); #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 @@ -1492,7 +1381,6 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); # else # define AM64_MIN (off_t)(-9223372036854775807LL -1LL) # endif -# define AM64_FMT OFF_T_FMT #else #if SIZEOF_LONG == 8 # ifdef LONG_MAX @@ -1505,7 +1393,6 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); # else # define AM64_MIN (off_t)(-9223372036854775807L -1L) # endif -# define AM64_FMT "%ld" #else #if SIZEOF_LONG_LONG == 8 # ifdef LONG_LONG_MAX @@ -1518,7 +1405,6 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); # else # define AM64_MIN (off_t)(-9223372036854775807LL -1LL) # endif -# define AM64_FMT LL_FMT #else #if SIZEOF_INTMAX_T == 8 # ifdef INTMAX_MAX @@ -1531,7 +1417,6 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); # 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) @@ -1543,55 +1428,24 @@ extern ssize_t writev(int fd, const struct iovec *iov, int iovcnt); # 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 -# ifdef HAVE_READLINE_HISTORY_H -# include -# endif -# else -# ifdef HAVE_READLINE_H -# include -# ifdef HAVE_HISTORY_H -# include -# 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 --git a/common-src/amfeatures.c b/common-src/amfeatures.c index 8775912..675a647 100644 --- a/common-src/amfeatures.c +++ b/common-src/amfeatures.c @@ -363,11 +363,11 @@ am_feature_to_string( size_t i; if (f == NULL) { - result = stralloc("UNKNOWNFEATURE"); + result = stralloc(_("UNKNOWNFEATURE")); } else { result = alloc((f->size * 2) + 1); for (i = 0; i < f->size; i++) { - snprintf(result + (i * 2), 2 + 1, "%02x", f->bytes[i]); + g_snprintf(result + (i * 2), 2 + 1, "%02x", f->bytes[i]); } result[i * 2] = '\0'; } @@ -439,7 +439,7 @@ am_string_to_feature( int main( int argc, - char **argv) + char ** argv) { am_feature_t *f; am_feature_t *f1; @@ -448,20 +448,29 @@ main( int i; int 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"); + f = am_init_feature_set(); if (f == NULL) { - fprintf(stderr, "cannot initialize feature set\n"); + g_fprintf(stderr, _("cannot initialize feature set\n")); return 1; } s = am_feature_to_string(f); - printf("base features=%s\n", s); + g_printf(_("base features=%s\n"), s); f1 = am_string_to_feature(s); s1 = am_feature_to_string(f1); if (strcmp(s, s1) != 0) { - fprintf(stderr, "base feature -> string -> feature set mismatch\n"); - fprintf(stderr, "conv features=%s\n", s); + g_fprintf(stderr, _("base feature -> string -> feature set mismatch\n")); + g_fprintf(stderr, _("conv features=%s\n"), s); } amfree(s1); @@ -471,29 +480,29 @@ main( if (argv[i][0] == '+') { n = atoi(&argv[i][1]); if (am_add_feature(f, (am_feature_e)n)) { - printf("added feature number %d\n", n); + g_printf(_("added feature number %d\n"), n); } else { - printf("could not add feature number %d\n", n); + g_printf(_("could not add feature number %d\n"), n); } } else if (argv[i][0] == '-') { n = atoi(&argv[i][1]); if (am_remove_feature(f, (am_feature_e)n)) { - printf("removed feature number %d\n", n); + g_printf(_("removed feature number %d\n"), n); } else { - printf("could not remove feature number %d\n", n); + g_printf(_("could not remove feature number %d\n"), n); } } else { n = atoi(argv[i]); if (am_has_feature(f, (am_feature_e)n)) { - printf("feature %d is set\n", n); + g_printf(_("feature %d is set\n"), n); } else { - printf("feature %d is not set\n", n); + g_printf(_("feature %d is not set\n"), n); } } } s = am_feature_to_string(f); - printf(" new features=%s\n", s); + g_printf(_(" new features=%s\n"), s); amfree(s); return 0; diff --git a/common-src/amflock.c b/common-src/amflock.c index cc1cd4e..2b012e3 100644 --- a/common-src/amflock.c +++ b/common-src/amflock.c @@ -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 @@ -41,281 +41,64 @@ ** blocking file locks as used by Amanda. ** USE_LNLOCK - Home brew exclusive, blocking file lock. ** - 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 -# 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 + */ /* 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 @@ -328,161 +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 --git a/common-src/arglist.h b/common-src/arglist.h index e18b4a7..a3d572d 100644 --- a/common-src/arglist.h +++ b/common-src/arglist.h @@ -38,13 +38,13 @@ #define printf_arglist_function(fdecl, \ hook_type, hook_name) \ - __attribute__ ((format (printf, 1, 0))) \ + G_GNUC_PRINTF(1,0) \ fdecl(hook_type hook_name, ...) #define printf_arglist_function1(fdecl, \ arg1_type, arg1_name, \ hook_type, hook_name) \ - __attribute__ ((format (printf, 2, 0))) \ + G_GNUC_PRINTF(2,0) \ fdecl(arg1_type arg1_name, \ hook_type hook_name, ...) @@ -52,7 +52,7 @@ arg1_type, arg1_name, \ arg2_type, arg2_name, \ hook_type, hook_name) \ - __attribute__ ((format (printf, 3, 0))) \ + G_GNUC_PRINTF(3,0) \ fdecl(arg1_type arg1_name, \ arg2_type arg2_name, \ hook_type hook_name, ...) @@ -62,8 +62,8 @@ arg2_type, arg2_name, \ arg3_type, arg3_name, \ hook_type, hook_name) \ - __attribute__ ((format (printf, 4, 0))) \ - fdecl(arg1_type arg1_name, \ + G_GNUC_PRINTF(4,0) \ + fdecl(arg1_type arg1_name, \ arg2_type arg2_name, \ arg3_type arg3_name, \ hook_type hook_name, ...) diff --git a/common-src/bsd-security.c b/common-src/bsd-security.c index 18102ba..4be7948 100644 --- a/common-src/bsd-security.c +++ b/common-src/bsd-security.c @@ -37,6 +37,7 @@ #include "packet.h" #include "security.h" #include "security-util.h" +#include "sockaddr-util.h" #include "stream.h" #include "version.h" @@ -44,22 +45,17 @@ #undef DUMPER_SOCKET_BUFFERING #endif -#ifdef BSD_SECURITY /* { */ - -/* - * Change the following from #undef to #define to cause detailed logging - * of the security steps, e.g. into /tmp/amanda/amandad*debug. - */ -#undef SHOW_SECURITY_DETAIL - /* * Interface functions */ static void bsd_connect(const char *, char *(*)(char *, void *), void (*)(void *, security_handle_t *, security_status_t), void *, void *); -static void bsd_accept(const struct security_driver *, int, int, - void (*)(security_handle_t *, pkt_t *)); +static void bsd_accept(const struct security_driver *, + char *(*)(char *, void *), + int, int, + void (*)(security_handle_t *, pkt_t *), + void *); static void bsd_close(void *); static void * bsd_stream_server(void *); static int bsd_stream_accept(void *); @@ -131,12 +127,12 @@ bsd_connect( struct servent *se; in_port_t port = 0; struct timeval sequence_time; - amanda_timezone dontcare; int sequence; char *handle; int result; - struct addrinfo hints; - struct addrinfo *res = NULL; + struct addrinfo *res, *res_addr; + char *canonname; + int result_bind; assert(hostname != NULL); @@ -147,117 +143,142 @@ bsd_connect( bh->proto_handle=NULL; security_handleinit(&bh->sech, &bsd_security_driver); - /* - * Only init the socket once - */ -#ifdef WORKING_IPV6 - hints.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ALL; - hints.ai_family = AF_INET6; -#else - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_INET; -#endif - hints.ai_socktype = SOCK_DGRAM; - hints.ai_protocol = IPPROTO_UDP; - hints.ai_addrlen = 0; - hints.ai_addr = NULL; - hints.ai_canonname = NULL; - hints.ai_next = NULL; - result = getaddrinfo(hostname, NULL, &hints, &res); -#ifdef WORKING_IPV6 - if (result != 0) { - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_UNSPEC; - result = getaddrinfo(hostname, NULL, &hints, &res); - } -#endif + result = resolve_hostname(hostname, SOCK_DGRAM, &res, &canonname); if(result != 0) { - dbprintf(("getaddrinfo(%s): %s\n", hostname, gai_strerror(result))); - security_seterror(&bh->sech, "getaddrinfo(%s): %s\n", hostname, + dbprintf(_("resolve_hostname(%s): %s\n"), hostname, gai_strerror(result)); + security_seterror(&bh->sech, _("resolve_hostname(%s): %s\n"), hostname, gai_strerror(result)); (*fn)(arg, &bh->sech, S_ERROR); return; } - if (res->ai_canonname == NULL) { - dbprintf(("getaddrinfo(%s) did not return a canonical name\n", hostname)); + if (canonname == NULL) { + dbprintf(_("resolve_hostname(%s) did not return a canonical name\n"), hostname); security_seterror(&bh->sech, - _("getaddrinfo(%s) did not return a canonical name\n"), hostname); + _("resolve_hostname(%s) did not return a canonical name\n"), hostname); (*fn)(arg, &bh->sech, S_ERROR); return; } + if (res == NULL) { + dbprintf(_("resolve_hostname(%s): no results\n"), hostname); + security_seterror(&bh->sech, + _("resolve_hostname(%s): no results\n"), hostname); + (*fn)(arg, &bh->sech, S_ERROR); + amfree(canonname); + return; + } + for (res_addr = res; res_addr != NULL; res_addr = res_addr->ai_next) { #ifdef WORKING_IPV6 - if (res->ai_addr->sa_family == AF_INET6 && not_init6 == 1) { - uid_t euid; - dgram_zero(&netfd6.dgram); - - euid = geteuid(); - seteuid((uid_t)0); - dgram_bind(&netfd6.dgram, res->ai_addr->sa_family, &port); - seteuid(euid); - netfd6.handle = NULL; - netfd6.pkt.body = NULL; - netfd6.recv_security_ok = &bsd_recv_security_ok; - netfd6.prefix_packet = &bsd_prefix_packet; + /* IPv6 socket already bound */ + if (res_addr->ai_addr->sa_family == AF_INET6 && not_init6 == 0) { + break; + } /* - * We must have a reserved port. Bomb if we didn't get one. + * Only init the IPv6 socket once */ - if (port >= IPPORT_RESERVED) { - security_seterror(&bh->sech, - "unable to bind to a reserved port (got port %u)", - (unsigned int)port); - (*fn)(arg, &bh->sech, S_ERROR); - return; + if (res_addr->ai_addr->sa_family == AF_INET6 && not_init6 == 1) { + uid_t euid; + dgram_zero(&netfd6.dgram); + + euid = geteuid(); + set_root_privs(1); + result_bind = dgram_bind(&netfd6.dgram, + res_addr->ai_addr->sa_family, &port); + set_root_privs(0); + if (result_bind != 0) { + continue; + } + netfd6.handle = NULL; + netfd6.pkt.body = NULL; + netfd6.recv_security_ok = &bsd_recv_security_ok; + netfd6.prefix_packet = &bsd_prefix_packet; + /* + * We must have a reserved port. Bomb if we didn't get one. + */ + if (port >= IPPORT_RESERVED) { + security_seterror(&bh->sech, + _("unable to bind to a reserved port (got port %u)"), + (unsigned int)port); + (*fn)(arg, &bh->sech, S_ERROR); + freeaddrinfo(res); + amfree(canonname); + return; + } + not_init6 = 0; + bh->udp = &netfd6; + break; } - not_init6 = 0; - bh->udp = &netfd6; - } #endif - if (res->ai_addr->sa_family == AF_INET && not_init4 == 1) { - uid_t euid; - dgram_zero(&netfd4.dgram); - - euid = geteuid(); - seteuid((uid_t)0); - dgram_bind(&netfd4.dgram, res->ai_addr->sa_family, &port); - seteuid(euid); - netfd4.handle = NULL; - netfd4.pkt.body = NULL; - netfd4.recv_security_ok = &bsd_recv_security_ok; - netfd4.prefix_packet = &bsd_prefix_packet; + /* IPv4 socket already bound */ + if (res_addr->ai_addr->sa_family == AF_INET && not_init4 == 0) { + break; + } + /* - * We must have a reserved port. Bomb if we didn't get one. + * Only init the IPv4 socket once */ - if (port >= IPPORT_RESERVED) { - security_seterror(&bh->sech, - "unable to bind to a reserved port (got port %u)", - (unsigned int)port); - (*fn)(arg, &bh->sech, S_ERROR); - return; + if (res_addr->ai_addr->sa_family == AF_INET && not_init4 == 1) { + uid_t euid; + dgram_zero(&netfd4.dgram); + + euid = geteuid(); + set_root_privs(1); + result_bind = dgram_bind(&netfd4.dgram, + res_addr->ai_addr->sa_family, &port); + set_root_privs(0); + if (result_bind != 0) { + continue; + } + netfd4.handle = NULL; + netfd4.pkt.body = NULL; + netfd4.recv_security_ok = &bsd_recv_security_ok; + netfd4.prefix_packet = &bsd_prefix_packet; + /* + * We must have a reserved port. Bomb if we didn't get one. + */ + if (port >= IPPORT_RESERVED) { + security_seterror(&bh->sech, + "unable to bind to a reserved port (got port %u)", + (unsigned int)port); + (*fn)(arg, &bh->sech, S_ERROR); + freeaddrinfo(res); + amfree(canonname); + return; + } + not_init4 = 0; + bh->udp = &netfd4; + break; } - not_init4 = 0; - bh->udp = &netfd4; + } + + if (res_addr == NULL) { + dbprintf(_("Can't bind a socket to connect to %s\n"), hostname); + security_seterror(&bh->sech, + _("Can't bind a socket to connect to %s\n"), hostname); + (*fn)(arg, &bh->sech, S_ERROR); + amfree(canonname); + return; } #ifdef WORKING_IPV6 - if (res->ai_addr->sa_family == AF_INET6) + if (res_addr->ai_addr->sa_family == AF_INET6) bh->udp = &netfd6; else #endif bh->udp = &netfd4; - auth_debug(1, ("Resolved hostname=%s\n", res->ai_canonname)); + auth_debug(1, _("Resolved hostname=%s\n"), canonname); if ((se = getservbyname(AMANDA_SERVICE_NAME, "udp")) == NULL) port = AMANDA_SERVICE_DEFAULT; else port = (in_port_t)ntohs(se->s_port); - amanda_gettimeofday(&sequence_time, &dontcare); + amanda_gettimeofday(&sequence_time); sequence = (int)sequence_time.tv_sec ^ (int)sequence_time.tv_usec; handle=alloc(15); - snprintf(handle, 14, "000-%08x", (unsigned)newhandle++); - if (udp_inithandle(bh->udp, bh, res->ai_canonname, - (struct sockaddr_storage *)res->ai_addr, port, handle, sequence) < 0) { + g_snprintf(handle, 14, "000-%08x", (unsigned)newhandle++); + if (udp_inithandle(bh->udp, bh, canonname, + (sockaddr_union *)res_addr->ai_addr, port, handle, sequence) < 0) { (*fn)(arg, &bh->sech, S_ERROR); amfree(bh->hostname); amfree(bh); @@ -266,6 +287,7 @@ bsd_connect( (*fn)(arg, &bh->sech, S_OK); } amfree(handle); + amfree(canonname); freeaddrinfo(res); } @@ -276,9 +298,11 @@ bsd_connect( static void bsd_accept( const struct security_driver * driver, + char *(*conf_fn)(char *, void *), int in, int out, - void (*fn)(security_handle_t *, pkt_t *)) + void (*fn)(security_handle_t *, pkt_t *), + void *datap) { assert(in >= 0 && out >= 0); @@ -286,6 +310,8 @@ bsd_accept( (void)out; /* Quiet unused parameter warning */ (void)driver; /* Quiet unused parameter warning */ + (void)conf_fn; + (void)datap; /* * We assume in and out point to the same socket, and just use @@ -320,8 +346,7 @@ bsd_close( return; } - auth_debug(1, ("%s: bsd: close handle '%s'\n", - debug_prefix_time(NULL), bh->proto_handle)); + auth_debug(1, _("bsd: close handle '%s'\n"), bh->proto_handle); udp_recvpkt_cancel(bh); if(bh->next) { @@ -363,11 +388,12 @@ bsd_stream_server( bs = alloc(SIZEOF(*bs)); security_streaminit(&bs->secstr, &bsd_security_driver); - bs->socket = stream_server(&bs->port, (size_t)STREAM_BUFSIZE, - (size_t)STREAM_BUFSIZE, 0); + bs->socket = stream_server(SU_GET_FAMILY(&bh->udp->peer), &bs->port, + (size_t)STREAM_BUFSIZE, (size_t)STREAM_BUFSIZE, + 0); if (bs->socket < 0) { security_seterror(&bh->sech, - "can't create server stream: %s", strerror(errno)); + _("can't create server stream: %s"), strerror(errno)); amfree(bs); return (NULL); } @@ -393,7 +419,7 @@ bsd_stream_accept( bs->fd = stream_accept(bs->socket, 30, STREAM_BUFSIZE, STREAM_BUFSIZE); if (bs->fd < 0) { security_stream_seterror(&bs->secstr, - "can't accept new stream connection: %s", strerror(errno)); + _("can't accept new stream connection: %s"), strerror(errno)); return (-1); } return (0); @@ -421,7 +447,7 @@ bsd_stream_client( STREAM_BUFSIZE, STREAM_BUFSIZE, &bs->port, 0); if (bs->fd < 0) { security_seterror(&bh->sech, - "can't connect stream to %s port %d: %s", bh->hostname, + _("can't connect stream to %s port %d: %s"), bh->hostname, id, strerror(errno)); amfree(bs); return (NULL); @@ -540,8 +566,7 @@ stream_read_sync_callback( assert(bs != NULL); - auth_debug(1, ("%s: bsd: stream_read_callback_sync: fd %d\n", - debug_prefix_time(NULL), bs->fd)); + auth_debug(1, _("bsd: stream_read_callback_sync: fd %d\n"), bs->fd); /* * Remove the event first, in case they reschedule it in the callback. @@ -597,5 +622,3 @@ stream_read_callback( (*bs->fn)(bs->arg, bs->databuf, n); } - -#endif /* BSD_SECURITY */ /* } */ diff --git a/common-src/bsdtcp-security.c b/common-src/bsdtcp-security.c index 485186f..50985d9 100644 --- a/common-src/bsdtcp-security.c +++ b/common-src/bsdtcp-security.c @@ -40,11 +40,10 @@ #include "queue.h" #include "security.h" #include "security-util.h" +#include "sockaddr-util.h" #include "stream.h" #include "version.h" -#ifdef BSDTCP_SECURITY - /* * Number of seconds bsdtcp has to start up */ @@ -53,8 +52,11 @@ /* * Interface functions */ -static void bsdtcp_accept(const struct security_driver *, int, int, - void (*)(security_handle_t *, pkt_t *)); +static void bsdtcp_accept(const struct security_driver *, + char *(*)(char *, void *), + int, int, + void (*)(security_handle_t *, pkt_t *), + void *); static void bsdtcp_connect(const char *, char *(*)(char *, void *), void (*)(void *, security_handle_t *, security_status_t), void *, void *); @@ -107,16 +109,14 @@ bsdtcp_connect( { struct sec_handle *rh; int result; - struct addrinfo hints; - struct addrinfo *res = NULL; + char *canonname; assert(fn != NULL); assert(hostname != NULL); (void)conf_fn; /* Quiet unused parameter warning */ (void)datap; /* Quiet unused parameter warning */ - auth_debug(1, ("%s: bsdtcp: bsdtcp_connect: %s\n", debug_prefix_time(NULL), - hostname)); + auth_debug(1, _("bsdtcp: bsdtcp_connect: %s\n"), hostname); rh = alloc(sizeof(*rh)); security_handleinit(&rh->sech, &bsdtcp_security_driver); @@ -125,43 +125,24 @@ bsdtcp_connect( rh->ev_timeout = NULL; rh->rc = NULL; -#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 = SOCK_DGRAM; - hints.ai_protocol = IPPROTO_UDP; - hints.ai_addrlen = 0; - hints.ai_addr = NULL; - hints.ai_canonname = NULL; - hints.ai_next = NULL; - result = getaddrinfo(hostname, NULL, &hints, &res); -#ifdef WORKING_IPV6 - if (result != 0) { - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_UNSPEC; - result = getaddrinfo(hostname, NULL, &hints, &res); - } -#endif + result = resolve_hostname(hostname, 0, NULL, &canonname); if(result != 0) { - dbprintf(("getaddrinfo(%s): %s\n", hostname, gai_strerror(result))); - security_seterror(&rh->sech, "getaddrinfo(%s): %s\n", hostname, + dbprintf(_("resolve_hostname(%s): %s\n"), hostname, gai_strerror(result)); + security_seterror(&rh->sech, _("resolve_hostname(%s): %s\n"), hostname, gai_strerror(result)); (*fn)(arg, &rh->sech, S_ERROR); return; } - if (res->ai_canonname == NULL) { - dbprintf(("getaddrinfo(%s) did not return a canonical name\n", hostname)); + if (canonname == NULL) { + dbprintf(_("resolve_hostname(%s) did not return a canonical name\n"), hostname); security_seterror(&rh->sech, - _("getaddrinfo(%s) did not return a canonical name\n"), hostname); + _("resolve_hostname(%s) did not return a canonical name\n"), hostname); (*fn)(arg, &rh->sech, S_ERROR); return; } - rh->hostname = stralloc(res->ai_canonname); /* will be replaced */ + rh->hostname = canonname; /* will be replaced */ + canonname = NULL; /* steal reference */ rh->rs = tcpma_stream_client(rh, newhandle++); rh->rc->recv_security_ok = &bsd_recv_security_ok; rh->rc->prefix_packet = &bsd_prefix_packet; @@ -198,12 +179,10 @@ bsdtcp_connect( rh->ev_timeout = event_register(CONNECT_TIMEOUT, EV_TIME, sec_connect_timeout, rh); - freeaddrinfo(res); return; error: (*fn)(arg, &rh->sech, S_ERROR); - freeaddrinfo(res); } /* @@ -212,12 +191,14 @@ error: static void bsdtcp_accept( const struct security_driver *driver, + char * (*conf_fn)(char *, void *), int in, int out, - void (*fn)(security_handle_t *, pkt_t *)) + void (*fn)(security_handle_t *, pkt_t *), + void *datap) { - struct sockaddr_storage sin; - socklen_t len; + sockaddr_union sin; + socklen_t_equiv len; struct tcp_conn *rc; char hostname[NI_MAXHOST]; int result; @@ -225,14 +206,13 @@ bsdtcp_accept( len = sizeof(sin); if (getpeername(in, (struct sockaddr *)&sin, &len) < 0) { - dbprintf(("%s: getpeername returned: %s\n", debug_prefix_time(NULL), - strerror(errno))); + dbprintf(_("getpeername returned: %s\n"), strerror(errno)); return; } if ((result = getnameinfo((struct sockaddr *)&sin, len, hostname, NI_MAXHOST, NULL, 0, 0) != 0)) { - dbprintf(("%s: getnameinfo failed: %s\n", - debug_prefix_time(NULL), gai_strerror(result))); + dbprintf(_("getnameinfo failed: %s\n"), + gai_strerror(result)); return; } if (check_name_give_sockaddr(hostname, @@ -244,11 +224,13 @@ bsdtcp_accept( rc = sec_tcp_conn_get(hostname, 0); rc->recv_security_ok = &bsd_recv_security_ok; rc->prefix_packet = &bsd_prefix_packet; - memcpy(&rc->peer, &sin, sizeof(rc->peer)); + copy_sockaddr(&rc->peer, &sin); rc->read = in; rc->write = out; rc->accept_fn = fn; rc->driver = driver; + rc->conf_fn = conf_fn; + rc->datap = datap; sec_tcp_conn_read(rc); } @@ -263,15 +245,13 @@ runbsdtcp( struct servent * sp; int server_socket; in_port_t my_port; - uid_t euid; struct tcp_conn * rc = rh->rc; if ((sp = getservbyname(AMANDA_SERVICE_NAME, "tcp")) == NULL) { - error("%s/tcp unknown protocol", "amanda"); + error(_("%s/tcp unknown protocol"), "amanda"); } - euid = geteuid(); - seteuid(0); + set_root_privs(1); server_socket = stream_client_privileged(rc->hostname, (in_port_t)(ntohs((in_port_t)sp->s_port)), @@ -279,6 +259,7 @@ runbsdtcp( STREAM_BUFSIZE, &my_port, 0); + set_root_privs(0); if(server_socket < 0) { security_seterror(&rh->sech, @@ -286,15 +267,12 @@ runbsdtcp( return -1; } - seteuid(euid); if(my_port >= IPPORT_RESERVED) { security_seterror(&rh->sech, - "did not get a reserved port: %d", my_port); + _("did not get a reserved port: %d"), my_port); } rc->read = rc->write = server_socket; return 0; } - -#endif /* BSDTCP_SECURITY */ diff --git a/common-src/bsdudp-security.c b/common-src/bsdudp-security.c index 9a3949d..d424320 100644 --- a/common-src/bsdudp-security.c +++ b/common-src/bsdudp-security.c @@ -40,25 +40,21 @@ #include "stream.h" #include "version.h" -#ifdef BSDUDP_SECURITY - #ifndef SO_RCVBUF #undef DUMPER_SOCKET_BUFFERING #endif -/* - * Change the following from #undef to #define to cause detailed logging - * of the security steps, e.g. into /tmp/amanda/amandad*debug. - */ -#undef SHOW_SECURITY_DETAIL - /* * Interface functions */ static void bsdudp_connect(const char *, char *(*)(char *, void *), void (*)(void *, security_handle_t *, security_status_t), void *, void *); -static void bsdudp_accept(const struct security_driver *, int, int, void (*)(security_handle_t *, pkt_t *)); +static void bsdudp_accept(const struct security_driver *, + char *(*)(char *, void *), + int, int, + void (*)(security_handle_t *, pkt_t *), + void *); static void bsdudp_close(void *); /* @@ -114,12 +110,12 @@ bsdudp_connect( struct servent *se; in_port_t port; struct timeval sequence_time; - amanda_timezone dontcare; int sequence; char *handle; int result; - struct addrinfo hints; - struct addrinfo *res = NULL; + char *canonname; + struct addrinfo *res = NULL, *res_addr; + int result_bind; (void)conf_fn; /* Quiet unused parameter warning */ (void)datap; /* Quiet unused parameter warning */ @@ -130,117 +126,142 @@ bsdudp_connect( bh->rc = NULL; security_handleinit(&bh->sech, &bsdudp_security_driver); -#ifdef WORKING_IPV6 - hints.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ALL; - hints.ai_family = AF_INET6; -#else - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_INET; -#endif - hints.ai_socktype = SOCK_DGRAM; - hints.ai_protocol = IPPROTO_UDP; - hints.ai_addrlen = 0; - hints.ai_addr = NULL; - hints.ai_canonname = NULL; - hints.ai_next = NULL; - result = getaddrinfo(hostname, NULL, &hints, &res); -#ifdef WORKING_IPV6 - if (result != 0) { - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_UNSPEC; - result = getaddrinfo(hostname, NULL, &hints, &res); - } -#endif + result = resolve_hostname(hostname, SOCK_DGRAM, &res, &canonname); if(result != 0) { - dbprintf(("getaddrinfo: %s\n", gai_strerror(result))); - security_seterror(&bh->sech, "getaddrinfo(%s): %s\n", hostname, + dbprintf(_("resolve_hostname(%s): %s\n"), hostname, gai_strerror(result)); + security_seterror(&bh->sech, _("resolve_hostname(%s): %s\n"), hostname, gai_strerror(result)); (*fn)(arg, &bh->sech, S_ERROR); - return; + return; } - if (res->ai_canonname == NULL) { - dbprintf(("getaddrinfo(%s) did not return a canonical name\n", hostname)); + if (canonname == NULL) { + dbprintf(_("resolve_hostname(%s) did not return a canonical name\n"), hostname); security_seterror(&bh->sech, - _("getaddrinfo(%s) did not return a canonical name\n"), hostname); + _("resolve_hostname(%s) did not return a canonical name\n"), hostname); (*fn)(arg, &bh->sech, S_ERROR); return; } + if (res == NULL) { + dbprintf(_("resolve_hostname(%s): no results\n"), hostname); + security_seterror(&bh->sech, + _("resolve_hostname(%s): no results\n"), hostname); + (*fn)(arg, &bh->sech, S_ERROR); + amfree(canonname); + return; + } - /* - * Only init the socket once - */ + for (res_addr = res; res_addr != NULL; res_addr = res_addr->ai_next) { #ifdef WORKING_IPV6 - if (res->ai_addr->sa_family == AF_INET6 && not_init6 == 1) { - uid_t euid; - dgram_zero(&netfd6.dgram); - - euid = geteuid(); - seteuid(0); - dgram_bind(&netfd6.dgram, res->ai_addr->sa_family, &port); - seteuid(euid); - netfd6.handle = NULL; - netfd6.pkt.body = NULL; - netfd6.recv_security_ok = &bsd_recv_security_ok; - netfd6.prefix_packet = &bsd_prefix_packet; + /* IPv6 socket already bound */ + if (res_addr->ai_addr->sa_family == AF_INET6 && not_init6 == 0) { + break; + } /* - * We must have a reserved port. Bomb if we didn't get one. + * Only init the IPv6 socket once */ - if (port >= IPPORT_RESERVED) { - security_seterror(&bh->sech, - "unable to bind to a reserved port (got port %u)", - (unsigned int)port); - (*fn)(arg, &bh->sech, S_ERROR); - return; + if (res_addr->ai_addr->sa_family == AF_INET6 && not_init6 == 1) { + uid_t euid; + dgram_zero(&netfd6.dgram); + + euid = geteuid(); + set_root_privs(1); + result_bind = dgram_bind(&netfd6.dgram, + res_addr->ai_addr->sa_family, &port); + set_root_privs(0); + if (result_bind != 0) { + continue; + } + netfd6.handle = NULL; + netfd6.pkt.body = NULL; + netfd6.recv_security_ok = &bsd_recv_security_ok; + netfd6.prefix_packet = &bsd_prefix_packet; + /* + * We must have a reserved port. Bomb if we didn't get one. + */ + if (port >= IPPORT_RESERVED) { + security_seterror(&bh->sech, + _("unable to bind to a reserved port (got port %u)"), + (unsigned int)port); + (*fn)(arg, &bh->sech, S_ERROR); + freeaddrinfo(res); + amfree(canonname); + return; + } + not_init6 = 0; + bh->udp = &netfd6; + break; } - not_init6 = 0; - bh->udp = &netfd6; - } #endif - if (res->ai_addr->sa_family == AF_INET && not_init4 == 1) { - uid_t euid; - dgram_zero(&netfd4.dgram); + /* IPv4 socket already bound */ + if (res_addr->ai_addr->sa_family == AF_INET && not_init4 == 0) { + break; + } - euid = geteuid(); - seteuid((uid_t)0); - dgram_bind(&netfd4.dgram, res->ai_addr->sa_family, &port); - seteuid(euid); - netfd4.handle = NULL; - netfd4.pkt.body = NULL; - netfd4.recv_security_ok = &bsd_recv_security_ok; - netfd4.prefix_packet = &bsd_prefix_packet; /* - * We must have a reserved port. Bomb if we didn't get one. + * Only init the IPv4 socket once */ - if (port >= IPPORT_RESERVED) { - security_seterror(&bh->sech, - "unable to bind to a reserved port (got port %u)", - (unsigned int)port); - (*fn)(arg, &bh->sech, S_ERROR); - return; + if (res_addr->ai_addr->sa_family == AF_INET && not_init4 == 1) { + uid_t euid; + dgram_zero(&netfd4.dgram); + + euid = geteuid(); + set_root_privs(1); + result_bind = dgram_bind(&netfd4.dgram, + res_addr->ai_addr->sa_family, &port); + set_root_privs(0); + if (result_bind != 0) { + continue; + } + netfd4.handle = NULL; + netfd4.pkt.body = NULL; + netfd4.recv_security_ok = &bsd_recv_security_ok; + netfd4.prefix_packet = &bsd_prefix_packet; + /* + * We must have a reserved port. Bomb if we didn't get one. + */ + if (port >= IPPORT_RESERVED) { + security_seterror(&bh->sech, + "unable to bind to a reserved port (got port %u)", + (unsigned int)port); + (*fn)(arg, &bh->sech, S_ERROR); + freeaddrinfo(res); + amfree(canonname); + return; + } + not_init4 = 0; + bh->udp = &netfd4; + break; } - not_init4 = 0; - bh->udp = &netfd4; + } + + if (res_addr == NULL) { + dbprintf(_("Can't bind a socket to connect to %s\n"), hostname); + security_seterror(&bh->sech, + _("Can't bind a socket to connect to %s\n"), hostname); + (*fn)(arg, &bh->sech, S_ERROR); + amfree(canonname); + return; } #ifdef WORKING_IPV6 - if (res->ai_addr->sa_family == AF_INET6) + if (res_addr->ai_addr->sa_family == AF_INET6) bh->udp = &netfd6; else #endif bh->udp = &netfd4; - auth_debug(1, ("Resolved hostname=%s\n", res->ai_canonname)); + auth_debug(1, _("Resolved hostname=%s\n"), canonname); if ((se = getservbyname(AMANDA_SERVICE_NAME, "udp")) == NULL) port = AMANDA_SERVICE_DEFAULT; else port = (in_port_t)ntohs(se->s_port); - amanda_gettimeofday(&sequence_time, &dontcare); + amanda_gettimeofday(&sequence_time); sequence = (int)sequence_time.tv_sec ^ (int)sequence_time.tv_usec; handle=alloc(15); - snprintf(handle,14,"000-%08x", newhandle++); - if (udp_inithandle(bh->udp, bh, res->ai_canonname, - (struct sockaddr_storage *)res->ai_addr, port, + g_snprintf(handle,14,"000-%08x", newhandle++); + if (udp_inithandle(bh->udp, bh, canonname, + (sockaddr_union *)res_addr->ai_addr, port, handle, sequence) < 0) { (*fn)(arg, &bh->sech, S_ERROR); amfree(bh->hostname); @@ -249,8 +270,9 @@ bsdudp_connect( (*fn)(arg, &bh->sech, S_OK); } amfree(handle); + amfree(canonname); - freeaddrinfo(res); + if (res) freeaddrinfo(res); } /* @@ -259,12 +281,16 @@ bsdudp_connect( static void bsdudp_accept( const struct security_driver *driver, + char * (*conf_fn)(char *, void *), int in, int out, - void (*fn)(security_handle_t *, pkt_t *)) + void (*fn)(security_handle_t *, pkt_t *), + void *datap) { (void)driver; /* Quiet unused parameter warning */ (void)out; /* Quiet unused parameter warning */ + (void)conf_fn; + (void)datap; assert(in >= 0 && out >= 0); assert(fn != NULL); @@ -303,8 +329,7 @@ bsdudp_close( return; } - auth_debug(1, ("%s: bsdudp: close handle '%s'\n", - debug_prefix_time(NULL), bh->proto_handle)); + auth_debug(1, _("bsdudp: close handle '%s'\n"), bh->proto_handle); udp_recvpkt_cancel(bh); if(bh->next) { @@ -331,5 +356,3 @@ bsdudp_close( amfree(bh); } -#endif /* BSDUDP_SECURITY */ /* } */ - diff --git a/common-src/clock.c b/common-src/clock.c index ff41fa6..5362ac8 100644 --- a/common-src/clock.c +++ b/common-src/clock.c @@ -34,9 +34,6 @@ #include "clock.h" /* local functions */ -static struct timeval timesub(struct timeval end, struct timeval start); -static struct timeval timeadd(struct timeval a, struct timeval b); - times_t times_zero; times_t start_time; static int clock_running = 0; @@ -50,25 +47,18 @@ clock_is_running(void) void startclock(void) { - amanda_timezone dontcare; - clock_running = 1; - amanda_gettimeofday(&start_time.r, &dontcare); + + g_get_current_time(&start_time); } times_t stopclock(void) { - times_t diff; - struct timeval end_time; - amanda_timezone dontcare; + GTimeVal diff; + + diff = curclock(); - if(!clock_running) { - fprintf(stderr,"stopclock botch\n"); - exit(1); - } - amanda_gettimeofday(&end_time, &dontcare); - diff.r = timesub(end_time,start_time.r); clock_running = 0; return diff; } @@ -76,56 +66,15 @@ stopclock(void) times_t curclock(void) { - times_t diff; - struct timeval end_time; - amanda_timezone dontcare; + GTimeVal end_time; if(!clock_running) { - fprintf(stderr,"curclock botch\n"); + g_fprintf(stderr,_("curclock botch\n")); exit(1); } - amanda_gettimeofday(&end_time, &dontcare); - diff.r = timesub(end_time,start_time.r); - return diff; -} -times_t -timesadd( - times_t a, - times_t b) -{ - times_t sum; - - sum.r = timeadd(a.r,b.r); - return sum; -} - -times_t -timessub( - times_t a, - times_t b) -{ - times_t dif; - - dif.r = timesub(a.r,b.r); - return dif; -} - -char * -times_str( - times_t t) -{ - static char str[10][NUM_STR_SIZE+10]; - static size_t n = 0; - char *s; - - /* tv_sec/tv_usec are longs on some systems */ - snprintf(str[n], SIZEOF(str[n]), "rtime %lu.%03lu", - (unsigned long)t.r.tv_sec, - (unsigned long)t.r.tv_usec / 1000); - s = str[n++]; - n %= am_countof(str); - return s; + g_get_current_time(&end_time); + return timesub(end_time,start_time); } char * @@ -137,20 +86,16 @@ walltime_str( char *s; /* tv_sec/tv_usec are longs on some systems */ - snprintf(str[n], SIZEOF(str[n]), "%lu.%03lu", - (unsigned long)t.r.tv_sec, - (unsigned long)t.r.tv_usec/1000); + g_snprintf(str[n], SIZEOF(str[n]), "%lu.%03lu", + (unsigned long)t.tv_sec, + (unsigned long)t.tv_usec/1000); s = str[n++]; n %= am_countof(str); return s; } -static struct timeval -timesub( - struct timeval end, - struct timeval start) -{ - struct timeval diff; +GTimeVal timesub(GTimeVal end, GTimeVal start) { + GTimeVal diff; if(end.tv_usec < start.tv_usec) { /* borrow 1 sec */ if (end.tv_sec > 0) @@ -167,12 +112,8 @@ timesub( return diff; } -static struct timeval -timeadd( - struct timeval a, - struct timeval b) -{ - struct timeval sum; +GTimeVal timeadd(GTimeVal a, GTimeVal b) { + GTimeVal sum; sum.tv_sec = a.tv_sec + b.tv_sec; sum.tv_usec = a.tv_usec + b.tv_usec; @@ -183,3 +124,15 @@ timeadd( } return sum; } + +double g_timeval_to_double(GTimeVal v) { + return v.tv_sec + ((double)v.tv_usec) / G_USEC_PER_SEC; +} + +void amanda_gettimeofday(struct timeval * timeval_time) { + GTimeVal gtimeval_time; + + g_get_current_time(>imeval_time); + timeval_time->tv_sec = gtimeval_time.tv_sec; + timeval_time->tv_usec = gtimeval_time.tv_usec; +} diff --git a/common-src/clock.h b/common-src/clock.h index 391b383..0f7ce1e 100644 --- a/common-src/clock.h +++ b/common-src/clock.h @@ -34,31 +34,27 @@ #include "amanda.h" -typedef struct times_s { - struct timeval r; - -#ifdef INSTRUMENTATION - struct timeval u,s; -#endif -} times_t; +typedef GTimeVal times_t; extern times_t times_zero, start_time; -#ifdef HAVE_TWO_ARG_GETTIMEOFDAY -# define amanda_timezone struct timezone -# define amanda_gettimeofday(x, y) gettimeofday((x), (y)) -#else -# define amanda_timezone int -# define amanda_gettimeofday(x, y) gettimeofday((x)) -#endif - +/* NOT THREAD SAFE */ void startclock(void); times_t stopclock(void); times_t curclock(void); -times_t timesadd(times_t a, times_t b); -times_t timessub(times_t a, times_t b); -char * times_str(times_t t); char * walltime_str(times_t t); int clock_is_running(void); +/* Thread safe */ +times_t timeadd(times_t a, times_t b); +#define timesadd(x, y) timeadd(x, y) + +times_t timesub(times_t a, times_t b); +#define timessub(x, y) timesub(x, y) + +double g_timeval_to_double(GTimeVal v); + +void amanda_gettimeofday(struct timeval * timeval_time); + + #endif /* CLOCK_H */ diff --git a/common-src/conffile.c b/common-src/conffile.c index 986d9b4..18afa9e 100644 --- a/common-src/conffile.c +++ b/common-src/conffile.c @@ -36,218 +36,547 @@ #include "conffile.h" #include "clock.h" -#ifdef HAVE_LIMITS_H -#include -#endif - -#ifndef AMANDATES_FILE -#define AMANDATES_FILE "/etc/amandates" -#endif +/* + * Lexical analysis + */ -#ifndef INT_MAX -#define INT_MAX 2147483647 -#endif +/* This module implements its own quixotic lexer and parser, present for historical + * reasons. If this were written from scratch, it would use flex/bison. */ -/* this corresponds to the normal output of amanda, but may - * be adapted to any spacing as you like. +/* An enumeration of the various tokens that might appear in a configuration file. + * + * - CONF_UNKNOWN has special meaning as an unrecognized token. + * - CONF_ANY can be used to request any token, rather than requiring a specific + * token. */ -ColumnInfo ColumnData[] = { - { "HostName", 0, 12, 12, 0, "%-*.*s", "HOSTNAME" }, - { "Disk", 1, 11, 11, 0, "%-*.*s", "DISK" }, - { "Level", 1, 1, 1, 0, "%*.*d", "L" }, - { "OrigKB", 1, 7, 0, 0, "%*.*lf", "ORIG-KB" }, - { "OutKB", 1, 7, 0, 0, "%*.*lf", "OUT-KB" }, - { "Compress", 1, 6, 1, 0, "%*.*lf", "COMP%" }, - { "DumpTime", 1, 7, 7, 0, "%*.*s", "MMM:SS" }, - { "DumpRate", 1, 6, 1, 0, "%*.*lf", "KB/s" }, - { "TapeTime", 1, 6, 6, 0, "%*.*s", "MMM:SS" }, - { "TapeRate", 1, 6, 1, 0, "%*.*lf", "KB/s" }, - { NULL, 0, 0, 0, 0, NULL, NULL } -}; +typedef enum { + CONF_UNKNOWN, CONF_ANY, CONF_COMMA, + CONF_LBRACE, CONF_RBRACE, CONF_NL, + CONF_END, CONF_IDENT, CONF_INT, + CONF_AM64, CONF_BOOL, CONF_REAL, + CONF_STRING, CONF_TIME, CONF_SIZE, + + /* config parameters */ + CONF_INCLUDEFILE, CONF_ORG, CONF_MAILTO, + CONF_DUMPUSER, CONF_TAPECYCLE, CONF_TAPEDEV, + CONF_CHANGERDEV, CONF_CHANGERFILE, CONF_LABELSTR, + CONF_BUMPPERCENT, CONF_BUMPSIZE, CONF_BUMPDAYS, + CONF_BUMPMULT, CONF_ETIMEOUT, CONF_DTIMEOUT, + CONF_CTIMEOUT, CONF_TAPEBUFS, CONF_TAPELIST, + CONF_DEVICE_OUTPUT_BUFFER_SIZE, + CONF_DISKFILE, CONF_INFOFILE, CONF_LOGDIR, + CONF_LOGFILE, CONF_DISKDIR, CONF_DISKSIZE, + CONF_INDEXDIR, CONF_NETUSAGE, CONF_INPARALLEL, + CONF_DUMPORDER, CONF_TIMEOUT, CONF_TPCHANGER, + CONF_RUNTAPES, CONF_DEFINE, CONF_DUMPTYPE, + CONF_TAPETYPE, CONF_INTERFACE, CONF_PRINTER, + CONF_AUTOFLUSH, CONF_RESERVE, CONF_MAXDUMPSIZE, + CONF_COLUMNSPEC, CONF_AMRECOVER_DO_FSF, CONF_AMRECOVER_CHECK_LABEL, + CONF_AMRECOVER_CHANGER, CONF_LABEL_NEW_TAPES, CONF_USETIMESTAMPS, + + CONF_TAPERALGO, CONF_FIRST, CONF_FIRSTFIT, + CONF_LARGEST, CONF_LARGESTFIT, CONF_SMALLEST, + CONF_LAST, CONF_DISPLAYUNIT, CONF_RESERVED_UDP_PORT, + CONF_RESERVED_TCP_PORT, CONF_UNRESERVED_TCP_PORT, + CONF_TAPERFLUSH, + CONF_FLUSH_THRESHOLD_DUMPED, + CONF_FLUSH_THRESHOLD_SCHEDULED, + CONF_DEVICE_PROPERTY, + + /* kerberos 5 */ + CONF_KRB5KEYTAB, CONF_KRB5PRINCIPAL, + + /* holding disk */ + CONF_COMMENT, CONF_DIRECTORY, CONF_USE, + CONF_CHUNKSIZE, + + /* dump type */ + /*COMMENT,*/ CONF_PROGRAM, CONF_DUMPCYCLE, + CONF_RUNSPERCYCLE, CONF_MAXCYCLE, CONF_MAXDUMPS, + CONF_OPTIONS, CONF_PRIORITY, CONF_FREQUENCY, + CONF_INDEX, CONF_MAXPROMOTEDAY, CONF_STARTTIME, + CONF_COMPRESS, CONF_ENCRYPT, CONF_AUTH, + CONF_STRATEGY, CONF_ESTIMATE, CONF_SKIP_INCR, + CONF_SKIP_FULL, CONF_RECORD, CONF_HOLDING, + CONF_EXCLUDE, CONF_INCLUDE, CONF_KENCRYPT, + CONF_IGNORE, CONF_COMPRATE, CONF_TAPE_SPLITSIZE, + CONF_SPLIT_DISKBUFFER, CONF_FALLBACK_SPLITSIZE,CONF_SRVCOMPPROG, + CONF_CLNTCOMPPROG, CONF_SRV_ENCRYPT, CONF_CLNT_ENCRYPT, + CONF_SRV_DECRYPT_OPT, CONF_CLNT_DECRYPT_OPT, CONF_AMANDAD_PATH, + CONF_CLIENT_USERNAME, + + /* tape type */ + /*COMMENT,*/ CONF_BLOCKSIZE, CONF_FILE_PAD, + CONF_LBL_TEMPL, CONF_FILEMARK, CONF_LENGTH, + CONF_SPEED, CONF_READBLOCKSIZE, + + /* client conf */ + CONF_CONF, CONF_INDEX_SERVER, CONF_TAPE_SERVER, + CONF_SSH_KEYS, CONF_GNUTAR_LIST_DIR, CONF_AMANDATES, + + /* protocol config */ + CONF_REP_TRIES, CONF_CONNECT_TRIES, CONF_REQ_TRIES, + + /* debug config */ + CONF_DEBUG_AMANDAD, CONF_DEBUG_AMIDXTAPED, CONF_DEBUG_AMINDEXD, + CONF_DEBUG_AMRECOVER, CONF_DEBUG_AUTH, CONF_DEBUG_EVENT, + CONF_DEBUG_HOLDING, CONF_DEBUG_PROTOCOL, CONF_DEBUG_PLANNER, + CONF_DEBUG_DRIVER, CONF_DEBUG_DUMPER, CONF_DEBUG_CHUNKER, + CONF_DEBUG_TAPER, CONF_DEBUG_SELFCHECK, CONF_DEBUG_SENDSIZE, + CONF_DEBUG_SENDBACKUP, + + /* network interface */ + /* COMMENT, */ /* USE, */ + + /* dump options (obsolete) */ + CONF_EXCLUDE_FILE, CONF_EXCLUDE_LIST, + + /* compress, estimate, encryption */ + CONF_NONE, CONF_FAST, CONF_BEST, + CONF_SERVER, CONF_CLIENT, CONF_CALCSIZE, + CONF_CUSTOM, + + /* holdingdisk */ + CONF_NEVER, CONF_AUTO, CONF_REQUIRED, + + /* priority */ + CONF_LOW, CONF_MEDIUM, CONF_HIGH, + + /* dump strategy */ + CONF_SKIP, CONF_STANDARD, CONF_NOFULL, + CONF_NOINC, CONF_HANOI, CONF_INCRONLY, + + /* exclude list */ + CONF_LIST, CONF_EFILE, CONF_APPEND, + CONF_OPTIONAL, + + /* numbers */ + CONF_AMINFINITY, CONF_MULT1, CONF_MULT7, + CONF_MULT1K, CONF_MULT1M, CONF_MULT1G, + + /* boolean */ + CONF_ATRUE, CONF_AFALSE +} tok_t; + +/* A keyword table entry, mapping the given keyword to the given token. + * Note that punctuation, integers, and quoted strings are handled + * internally to the lexer, so they do not appear here. */ +typedef struct { + char *keyword; + tok_t token; +} keytab_t; + +/* The current keyword table, used by all token-related functions */ +static keytab_t *keytable = NULL; -char *config_name = NULL; -char *config_dir = NULL; +/* Has a token been "ungotten", and if so, what was it? */ +static int token_pushed; +static tok_t pushed_tok; -int debug_amandad = 0; -int debug_amidxtaped = 0; -int debug_amindexd = 0; -int debug_amrecover = 0; -int debug_auth = 0; -int debug_event = 0; -int debug_holding = 0; -int debug_protocol = 0; -int debug_planner = 0; -int debug_driver = 0; -int debug_dumper = 0; -int debug_chunker = 0; -int debug_taper = 0; -int debug_selfcheck = 0; -int debug_sendsize = 0; -int debug_sendbackup = 0; +/* The current token and its value. Note that, unlike most other val_t*, + * tokenval's v.s points to statically allocated memory which cannot be + * free()'d. */ +static tok_t tok; +static val_t tokenval; -/* visible holding disk variables */ +/* The current input information: file, filename, line, and character + * (which points somewhere within current_line) */ +static FILE *current_file = NULL; +static char *current_filename = NULL; +static char *current_line = NULL; +static char *current_char = NULL; +static int current_line_num = 0; /* (technically, managed by the parser) */ -holdingdisk_t *holdingdisks; -int num_holdingdisks; +/* A static buffer for storing tokens while they are being scanned. */ +static char tkbuf[4096]; -long int unit_divisor = 1; +/* Look up the name of the given token in the current keytable */ +static char *get_token_name(tok_t); -/* configuration parameters */ +/* Look up a token in keytable, given a string, returning CONF_UNKNOWN + * for unrecognized strings. Search is case-insensitive. */ +static tok_t lookup_keyword(char *str); -val_t conf_data[CNF_CNF]; -int conffile_init = 0; +/* Get the next token. If exp is anything but CONF_ANY, and the next token + * does not match, then a parse error is flagged. This function reads from the + * current_* static variables, recognizes keywords against the keytable static + * variable, and places its result in tok and tokenval. */ +static void get_conftoken(tok_t exp); -command_option_t *program_options = NULL; -int program_options_size = 0; +/* "Unget" the current token; this supports a 1-token lookahead. */ +static void unget_conftoken(void); -/* other internal variables */ -static holdingdisk_t hdcur; +/* Tokenizer character-by-character access. */ +static int conftoken_getc(void); +static int conftoken_ungetc(int c); -static tapetype_t tpcur; +/* + * Parser + */ -static dumptype_t dpcur; +/* A parser table entry. Read as " introduces parameter , + * the data for which will be read by and validated by + * (if not NULL). is only used in formatting + * config overwrites. */ +typedef struct conf_var_s { + tok_t token; + conftype_t type; + void (*read_function) (struct conf_var_s *, val_t*); + int parm; + void (*validate_function) (struct conf_var_s *, val_t *); +} conf_var_t; + +/* If allow_overwrites is true, the a parameter which has already been + * seen will simply overwrite the old value, rather than triggering an + * error. Note that this does not apply to all parameters, e.g., + * device_property */ +static int allow_overwrites; -static interface_t ifcur; +/* subsection structs + * + * The 'seen' fields in these structs are useless outside this module; + * they are only used to generate error messages for multiply defined + * subsections. + */ +struct tapetype_s { + struct tapetype_s *next; + int seen; + char *name; -static dumptype_t *dumplist = NULL; -static tapetype_t *tapelist = NULL; -static interface_t *interface_list = NULL; + val_t value[TAPETYPE_TAPETYPE]; +}; -static int allow_overwrites; -static int token_pushed; -static tok_t tok, pushed_tok; -static val_t tokenval; +struct dumptype_s { + struct dumptype_s *next; + int seen; + char *name; -static int conf_line_num; -static int got_parserror; -static FILE *conf_conf = (FILE *)NULL; -static char *conf_confname = NULL; -static char *conf_line = NULL; -static char *conf_char = NULL; -static keytab_t *keytable = NULL; + val_t value[DUMPTYPE_DUMPTYPE]; +}; -/* predeclare local functions */ +struct interface_s { + struct interface_s *next; + int seen; + char *name; -char *get_token_name(tok_t); + val_t value[INTER_INTER]; +}; +struct holdingdisk_s { + struct holdingdisk_s *next; + int seen; + char *name; -static void validate_positive0 (t_conf_var *, val_t *); -static void validate_positive1 (t_conf_var *, val_t *); -static void validate_runspercycle (t_conf_var *, val_t *); -static void validate_bumppercent (t_conf_var *, val_t *); -static void validate_bumpmult (t_conf_var *, val_t *); -static void validate_inparallel (t_conf_var *, val_t *); -static void validate_displayunit (t_conf_var *, val_t *); -static void validate_reserve (t_conf_var *, val_t *); -static void validate_use (t_conf_var *, val_t *); -static void validate_chunksize (t_conf_var *, val_t *); -static void validate_blocksize (t_conf_var *, val_t *); -static void validate_debug (t_conf_var *, val_t *); -static void validate_reserved_port_range (t_conf_var *, val_t *); -static void validate_unreserved_port_range(t_conf_var *, val_t *); + val_t value[HOLDING_HOLDING]; +}; -/*static t_conf_var *get_np(t_conf_var *get_var, int parm);*/ -static int get_int(void); -/*static long get_long(void);*/ -static time_t get_time(void); -static ssize_t get_size(void); -static off_t get_am64_t(void); -static int get_bool(void); -static void ckseen(int *seen); -static void conf_parserror(const char *format, ...) - __attribute__ ((format (printf, 1, 2))); -static tok_t lookup_keyword(char *str); - -static void read_string(t_conf_var *, val_t *); -static void read_ident(t_conf_var *, val_t *); -static void read_int(t_conf_var *, val_t *); -/*static void read_long(t_conf_var *, val_t *);*/ -static void read_size(t_conf_var *, val_t *); -static void read_am64(t_conf_var *, val_t *); -static void read_bool(t_conf_var *, val_t *); -static void read_real(t_conf_var *, val_t *); -static void read_time(t_conf_var *, val_t *); -static void read_intrange(t_conf_var *, val_t *); -static void conf_init_string(val_t *, char *); -static void conf_init_ident(val_t *, char *); -static void conf_init_int(val_t *, int); -static void conf_init_bool(val_t *, int); -static void conf_init_strategy(val_t *, int); -static void conf_init_estimate(val_t *, int); -static void conf_init_taperalgo(val_t *, int); -static void conf_init_priority(val_t *, int); -static void conf_init_strategy(val_t *, int); -static void conf_init_compress(val_t *, comp_t); -static void conf_init_encrypt(val_t *, encrypt_t); -static void conf_init_holding(val_t *, dump_holdingdisk_t); -/*static void conf_init_long(val_t *, long);*/ -static void conf_init_size(val_t *, ssize_t); -static void conf_init_am64(val_t *, off_t); -static void conf_init_real(val_t *, double); -static void conf_init_rate(val_t *, double, double); -static void conf_init_intrange(val_t *, int, int); -static void conf_init_time(val_t *, time_t); -/*static void conf_init_sl(val_t *, sl_t *);*/ -static void conf_init_exinclude(val_t *); -static void conf_set_string(val_t *, char *); -/*static void conf_set_int(val_t *, int);*/ -static void conf_set_bool(val_t *, int); -static void conf_set_compress(val_t *, comp_t); -/*static void conf_set_encrypt(val_t *, encrypt_t);*/ -static void conf_set_holding(val_t *, dump_holdingdisk_t); -static void conf_set_strategy(val_t *, int); +/* The current parser table */ +static conf_var_t *parsetable = NULL; -static void init_defaults(void); -static void read_conffile_recursively(char *filename); -static void read_client_conffile_recursively(char *filename); +/* Read and parse a configuration file, recursively reading any included + * files. This function sets the keytable and parsetable appropriately + * according to is_client. + * + * @param filename: configuration file to read + * @param is_client: true if this is a client + * @returns: false if an error occurred + */ +static gboolean read_conffile(char *filename, + gboolean is_client); + +/* Read and process a line of input from the current file, using the + * current keytable and parsetable. For blocks, this recursively + * reads the entire block. + * + * @param is_client: true if this is a client + * @returns: true on success, false on EOF or error + */ +static gboolean read_confline(gboolean is_client); -static int read_confline(void); -static int read_client_confline(void); +/* Handle an invalid token, by issuing a warning or an error, depending + * on how long the token has been deprecated. + * + * @param token: the identifier + */ +static void handle_invalid_keyword(const char * token); -static void read_block(command_option_t *command_options, t_conf_var *read_var, - keytab_t *keytab, val_t *valarray, char *prefix, +/* Read a brace-delimited block using the given parse table. This + * function is used to read brace-delimited subsections in the config + * files and also (via read_dumptype) to read dumptypes from + * the disklist. + * + * This function implements "inheritance" as follows: if a bare + * identifier occurs within the braces, it calls copy_function (if + * not NULL), which looks up an existing subsection using the + * identifier from tokenval and copies any values not already seen + * into valarray. + * + * @param read_var: the parse table to use + * @param valarray: the (pre-initialized) val_t array to fill in + * @param errormsg: error message to display for unrecognized keywords + * @param read_brace: if true, read the opening brace + * @param copy_function: function to copy configuration from + * another subsection into this one. + */ +static void read_block(conf_var_t *read_var, val_t *valarray, char *errormsg, int read_brace, void (*copy_function)(void)); -static void copy_val_t(val_t *, val_t *); -static void free_val_t(val_t *); -static char *conf_print(val_t *, int, char *); -static void conf_print_exinclude(val_t *, int, int, char *prefix, char **buf, int *free_space); - +/* For each subsection type, we have a global and four functions: + * - foocur is a temporary struct used to assemble new subsections + * - get_foo is called after reading "DEFINE FOO", and + * is responsible for reading the entire block, using + * read_block() + * - init_foo_defaults initializes a new subsection struct + * to its default values + * - save_foo copies foocur to a newly allocated struct and + * inserts that into the relevant list. + * - copy_foo implements inheritance as described in read_block() + */ +static holdingdisk_t hdcur; static void get_holdingdisk(void); static void init_holdingdisk_defaults(void); static void save_holdingdisk(void); +/* (holdingdisks don't support inheritance) */ + +static dumptype_t dpcur; static void get_dumptype(void); static void init_dumptype_defaults(void); static void save_dumptype(void); static void copy_dumptype(void); + +static tapetype_t tpcur; static void get_tapetype(void); static void init_tapetype_defaults(void); static void save_tapetype(void); static void copy_tapetype(void); + +static interface_t ifcur; static void get_interface(void); static void init_interface_defaults(void); static void save_interface(void); static void copy_interface(void); -static void get_comprate(t_conf_var *, val_t *); -static void get_compress(t_conf_var *, val_t *); -static void get_encrypt (t_conf_var *, val_t *); -static void get_holding (t_conf_var *, val_t *); -static void get_priority(t_conf_var *, val_t *); -static void get_strategy(t_conf_var *, val_t *); -static void get_estimate(t_conf_var *, val_t *); -static void get_exclude (t_conf_var *, val_t *); -/*static void get_include(t_conf_var *, val_t *);*/ -static void get_taperalgo(t_conf_var *, val_t *); -static int conftoken_getc(void); -static int conftoken_ungetc(int c); -static void unget_conftoken(void); -static void get_conftoken(tok_t exp); +/* read_functions -- these fit into the read_function slot in a parser + * table entry, and are responsible for calling getconf_token as necessary + * to consume their arguments, and setting their second argument with the + * result. The first argument is a copy of the parser table entry, if + * needed. */ +static void read_int(conf_var_t *, val_t *); +static void read_am64(conf_var_t *, val_t *); +static void read_real(conf_var_t *, val_t *); +static void read_str(conf_var_t *, val_t *); +static void read_ident(conf_var_t *, val_t *); +static void read_time(conf_var_t *, val_t *); +static void read_size(conf_var_t *, val_t *); +static void read_bool(conf_var_t *, val_t *); +static void read_compress(conf_var_t *, val_t *); +static void read_encrypt(conf_var_t *, val_t *); +static void read_holding(conf_var_t *, val_t *); +static void read_estimate(conf_var_t *, val_t *); +static void read_strategy(conf_var_t *, val_t *); +static void read_taperalgo(conf_var_t *, val_t *); +static void read_priority(conf_var_t *, val_t *); +static void read_rate(conf_var_t *, val_t *); +static void read_exinclude(conf_var_t *, val_t *); +static void read_intrange(conf_var_t *, val_t *); +static void read_property(conf_var_t *, val_t *); + +/* Functions to get various types of values. These are called by + * read_functions to take care of any variations in the way that these + * values can be written: integers can have units, boolean values can be + * specified with a number of names, etc. They form utility functions + * for the read_functions, below. */ +static time_t get_time(void); +static int get_int(void); +static ssize_t get_size(void); +static off_t get_am64_t(void); +static int get_bool(void); + +/* Check the given 'seen', flagging an error if this value has already + * been seen and allow_overwrites is false. Also marks the value as + * seen on the current line. + * + * @param seen: (in/out) seen value to adjust + */ +static void ckseen(int *seen); + +/* validate_functions -- these fit into the validate_function solt in + * a parser table entry. They call conf_parserror if the value in their + * second argument is invalid. */ +static void validate_nonnegative(conf_var_t *, val_t *); +static void validate_positive(conf_var_t *, val_t *); +static void validate_runspercycle(conf_var_t *, val_t *); +static void validate_bumppercent(conf_var_t *, val_t *); +static void validate_bumpmult(conf_var_t *, val_t *); +static void validate_inparallel(conf_var_t *, val_t *); +static void validate_displayunit(conf_var_t *, val_t *); +static void validate_reserve(conf_var_t *, val_t *); +static void validate_use(conf_var_t *, val_t *); +static void validate_chunksize(conf_var_t *, val_t *); +static void validate_blocksize(conf_var_t *, val_t *); +static void validate_debug(conf_var_t *, val_t *); +static void validate_port_range(val_t *, int, int); +static void validate_reserved_port_range(conf_var_t *, val_t *); +static void validate_unreserved_port_range(conf_var_t *, val_t *); + +/* + * Initialization + */ + +/* Name of the current configuration (part of API) */ +char *config_name = NULL; + +/* Current configuration directory (part of API) */ +char *config_dir = NULL; + +/* Current toplevel configuration file (part of API) */ +char *config_filename = NULL; + +/* Has the config been initialized? */ +static gboolean config_initialized = FALSE; + +/* Are we running a client? (true if last init was + * with CONFIG_INIT_CLIENT) */ +static gboolean config_client = FALSE; + +/* What config overwrites are applied? */ +static config_overwrites_t *applied_config_overwrites = NULL; + +/* All global parameters */ +static val_t conf_data[CNF_CNF]; + +/* Linked list of holding disks */ +static holdingdisk_t *holdinglist = NULL; +static dumptype_t *dumplist = NULL; +static tapetype_t *tapelist = NULL; +static interface_t *interface_list = NULL; + +/* storage for derived values */ +static long int unit_divisor = 1; + +int debug_amandad = 0; +int debug_amidxtaped = 0; +int debug_amindexd = 0; +int debug_amrecover = 0; +int debug_auth = 0; +int debug_event = 0; +int debug_holding = 0; +int debug_protocol = 0; +int debug_planner = 0; +int debug_driver = 0; +int debug_dumper = 0; +int debug_chunker = 0; +int debug_taper = 0; +int debug_selfcheck = 0; +int debug_sendsize = 0; +int debug_sendbackup = 0; -keytab_t *my_keytab = NULL; -t_conf_var *my_var = NULL; +/* Reset all configuration values to their defaults (which, in many + * cases, come from --with-foo options at build time) */ +static void init_defaults(void); + +/* Update all dervied values based on the current configuration. This + * function can be called multiple times, once after each adjustment + * to the current configuration. + * + * @param is_client: are we running a client? + */ +static void update_derived_values(gboolean is_client); + +/* per-type conf_init functions, used as utilities for init_defaults + * and for each subsection's init_foo_defaults. + * + * These set the value's type and seen flags, as well as copying + * the relevant value into the 'v' field. + */ +static void conf_init_int(val_t *val, int i); +static void conf_init_am64(val_t *val, off_t l); +static void conf_init_real(val_t *val, float r); +static void conf_init_str(val_t *val, char *s); +static void conf_init_ident(val_t *val, char *s); +static void conf_init_time(val_t *val, time_t t); +static void conf_init_size(val_t *val, ssize_t sz); +static void conf_init_bool(val_t *val, int i); +static void conf_init_compress(val_t *val, comp_t i); +static void conf_init_encrypt(val_t *val, encrypt_t i); +static void conf_init_holding(val_t *val, dump_holdingdisk_t i); +static void conf_init_estimate(val_t *val, estimate_t i); +static void conf_init_strategy(val_t *val, strategy_t); +static void conf_init_taperalgo(val_t *val, taperalgo_t i); +static void conf_init_priority(val_t *val, int i); +static void conf_init_rate(val_t *val, float r1, float r2); +static void conf_init_exinclude(val_t *val); /* to empty list */ +static void conf_init_intrange(val_t *val, int i1, int i2); +static void conf_init_proplist(val_t *val); /* to empty list */ + +/* + * Command-line Handling + */ + +typedef struct config_overwrite_s { + char *key; + char *value; +} config_overwrite_t; + +struct config_overwrites_s { + int n_allocated; + int n_used; + config_overwrite_t *ovr; +}; + +/* + * val_t Management + */ + +static void copy_val_t(val_t *, val_t *); +static void free_val_t(val_t *); + +/* + * Utilities + */ + + +/* Utility functions/structs for val_t_display_strs */ +static char *exinclude_display_str(val_t *val, int file); +static void proplist_display_str_foreach_fn(gpointer key_p, gpointer value_p, gpointer user_data_p); +static void val_t_print_token(FILE *output, char *prefix, char *format, keytab_t *kt, val_t *val); + +/* Given a key name as used in config overwrites, return a pointer to the corresponding + * conf_var_t in the current parsetable, and the val_t representing that value. This + * function will access subsections if key has the form TYPE:SUBSEC:KEYWORD. Returns + * false if the value does not exist. + * + * Assumes keytable and parsetable are set correctly, which is generally OK after + * config_init has been called. + * + * @param key: the key to look up + * @param parm: (result) the parse table entry + * @param val: (result) the parameter value + * @returns: true on success + */ +static int parm_key_info(char *key, conf_var_t **parm, val_t **val); + +/* + * Error handling + */ + +/* Have we seen a parse error yet? Parsing continues after an error, so this + * flag is checked after the parse is complete. + */ +static gboolean got_parserror; + +static void conf_parserror(const char *format, ...) + __attribute__ ((format (printf, 1, 2))); + +static void conf_parswarn(const char *format, ...) + __attribute__ ((format (printf, 1, 2))); + +/* + * Tables + */ +/* First, the keyword tables for client and server */ keytab_t client_keytab[] = { { "CONF", CONF_CONF }, { "INDEX_SERVER", CONF_INDEX_SERVER }, @@ -281,46 +610,12 @@ keytab_t client_keytab[] = { { "DEBUG_SELFCHECK", CONF_DEBUG_SELFCHECK }, { "DEBUG_SENDSIZE", CONF_DEBUG_SENDSIZE }, { "DEBUG_SENDBACKUP", CONF_DEBUG_SENDBACKUP }, + { "RESERVED-UDP-PORT", CONF_RESERVED_UDP_PORT }, + { "RESERVED-TCP-PORT", CONF_RESERVED_TCP_PORT }, { "UNRESERVED-TCP-PORT", CONF_UNRESERVED_TCP_PORT }, { NULL, CONF_UNKNOWN }, }; -t_conf_var client_var [] = { - { CONF_CONF , CONFTYPE_STRING , read_string , CNF_CONF , NULL }, - { CONF_INDEX_SERVER , CONFTYPE_STRING , read_string , CNF_INDEX_SERVER , NULL }, - { CONF_TAPE_SERVER , CONFTYPE_STRING , read_string , CNF_TAPE_SERVER , NULL }, - { CONF_TAPEDEV , CONFTYPE_STRING , read_string , CNF_TAPEDEV , NULL }, - { CONF_AUTH , CONFTYPE_STRING , read_string , CNF_AUTH , NULL }, - { CONF_SSH_KEYS , CONFTYPE_STRING , read_string , CNF_SSH_KEYS , NULL }, - { CONF_AMANDAD_PATH , CONFTYPE_STRING , read_string , CNF_AMANDAD_PATH , NULL }, - { CONF_CLIENT_USERNAME , CONFTYPE_STRING , read_string , CNF_CLIENT_USERNAME , NULL }, - { CONF_GNUTAR_LIST_DIR , CONFTYPE_STRING , read_string , CNF_GNUTAR_LIST_DIR , NULL }, - { CONF_AMANDATES , CONFTYPE_STRING , read_string , CNF_AMANDATES , NULL }, - { CONF_KRB5KEYTAB , CONFTYPE_STRING , read_string , CNF_KRB5KEYTAB , NULL }, - { CONF_KRB5PRINCIPAL , CONFTYPE_STRING , read_string , CNF_KRB5PRINCIPAL , NULL }, - { CONF_CONNECT_TRIES , CONFTYPE_INT , read_int , CNF_CONNECT_TRIES , validate_positive1 }, - { CONF_REP_TRIES , CONFTYPE_INT , read_int , CNF_REP_TRIES , validate_positive1 }, - { CONF_REQ_TRIES , CONFTYPE_INT , read_int , CNF_REQ_TRIES , validate_positive1 }, - { CONF_DEBUG_AMANDAD , CONFTYPE_INT , read_int , CNF_DEBUG_AMANDAD , validate_debug }, - { CONF_DEBUG_AMIDXTAPED , CONFTYPE_INT , read_int , CNF_DEBUG_AMIDXTAPED , validate_debug }, - { CONF_DEBUG_AMINDEXD , CONFTYPE_INT , read_int , CNF_DEBUG_AMINDEXD , validate_debug }, - { CONF_DEBUG_AMRECOVER , CONFTYPE_INT , read_int , CNF_DEBUG_AMRECOVER , validate_debug }, - { CONF_DEBUG_AUTH , CONFTYPE_INT , read_int , CNF_DEBUG_AUTH , validate_debug }, - { CONF_DEBUG_EVENT , CONFTYPE_INT , read_int , CNF_DEBUG_EVENT , validate_debug }, - { CONF_DEBUG_HOLDING , CONFTYPE_INT , read_int , CNF_DEBUG_HOLDING , validate_debug }, - { CONF_DEBUG_PROTOCOL , CONFTYPE_INT , read_int , CNF_DEBUG_PROTOCOL , validate_debug }, - { CONF_DEBUG_PLANNER , CONFTYPE_INT , read_int , CNF_DEBUG_PLANNER , validate_debug }, - { CONF_DEBUG_DRIVER , CONFTYPE_INT , read_int , CNF_DEBUG_DRIVER , validate_debug }, - { CONF_DEBUG_DUMPER , CONFTYPE_INT , read_int , CNF_DEBUG_DUMPER , validate_debug }, - { CONF_DEBUG_CHUNKER , CONFTYPE_INT , read_int , CNF_DEBUG_CHUNKER , validate_debug }, - { CONF_DEBUG_TAPER , CONFTYPE_INT , read_int , CNF_DEBUG_TAPER , validate_debug }, - { CONF_DEBUG_SELFCHECK , CONFTYPE_INT , read_int , CNF_DEBUG_SELFCHECK , validate_debug }, - { CONF_DEBUG_SENDSIZE , CONFTYPE_INT , read_int , CNF_DEBUG_SENDSIZE , validate_debug }, - { CONF_DEBUG_SENDBACKUP , CONFTYPE_INT , read_int , CNF_DEBUG_SENDBACKUP , validate_debug }, - { CONF_UNRESERVED_TCP_PORT, CONFTYPE_INTRANGE, read_intrange, CNF_UNRESERVED_TCP_PORT, validate_unreserved_port_range }, - { CONF_UNKNOWN , CONFTYPE_INT , NULL , CNF_CNF , NULL } -}; - keytab_t server_keytab[] = { { "AMANDAD_PATH", CONF_AMANDAD_PATH }, { "AMRECOVER_CHANGER", CONF_AMRECOVER_CHANGER }, @@ -337,8 +632,8 @@ keytab_t server_keytab[] = { { "BUMPPERCENT", CONF_BUMPPERCENT }, { "BUMPSIZE", CONF_BUMPSIZE }, { "CALCSIZE", CONF_CALCSIZE }, - { "CHANGERDEV", CONF_CHNGRDEV }, - { "CHANGERFILE", CONF_CHNGRFILE }, + { "CHANGERDEV", CONF_CHANGERDEV }, + { "CHANGERFILE", CONF_CHANGERFILE }, { "CHUNKSIZE", CONF_CHUNKSIZE }, { "CLIENT", CONF_CLIENT }, { "CLIENT_CUSTOM_COMPRESS", CONF_CLNTCOMPPROG }, @@ -369,6 +664,7 @@ keytab_t server_keytab[] = { { "DEBUG_SENDSIZE" , CONF_DEBUG_SENDSIZE }, { "DEBUG_SENDBACKUP" , CONF_DEBUG_SENDBACKUP }, { "DEFINE", CONF_DEFINE }, + { "DEVICE_PROPERTY", CONF_DEVICE_PROPERTY }, { "DIRECTORY", CONF_DIRECTORY }, { "DISKFILE", CONF_DISKFILE }, { "DISPLAYUNIT", CONF_DISPLAYUNIT }, @@ -421,7 +717,7 @@ keytab_t server_keytab[] = { { "MAXDUMPSIZE", CONF_MAXDUMPSIZE }, { "MAXPROMOTEDAY", CONF_MAXPROMOTEDAY }, { "MEDIUM", CONF_MEDIUM }, - { "NETUSAGE", CONF_NETUSAGE }, /* XXX - historical */ + { "NETUSAGE", CONF_NETUSAGE }, { "NEVER", CONF_NEVER }, { "NOFULL", CONF_NOFULL }, { "NOINC", CONF_NOINC }, @@ -431,7 +727,6 @@ keytab_t server_keytab[] = { { "PRINTER", CONF_PRINTER }, { "PRIORITY", CONF_PRIORITY }, { "PROGRAM", CONF_PROGRAM }, - { "RAWTAPEDEV", CONF_RAWTAPEDEV }, { "RECORD", CONF_RECORD }, { "REP_TRIES", CONF_REP_TRIES }, { "REQ_TRIES", CONF_REQ_TRIES }, @@ -456,10 +751,14 @@ keytab_t server_keytab[] = { { "STARTTIME", CONF_STARTTIME }, { "STRATEGY", CONF_STRATEGY }, { "TAPEBUFS", CONF_TAPEBUFS }, + { "DEVICE_OUTPUT_BUFFER_SIZE", CONF_DEVICE_OUTPUT_BUFFER_SIZE }, { "TAPECYCLE", CONF_TAPECYCLE }, { "TAPEDEV", CONF_TAPEDEV }, { "TAPELIST", CONF_TAPELIST }, { "TAPERALGO", CONF_TAPERALGO }, + { "FLUSH-THRESHOLD-DUMPED", CONF_FLUSH_THRESHOLD_DUMPED }, + { "FLUSH-THRESHOLD-SCHEDULED", CONF_FLUSH_THRESHOLD_SCHEDULED }, + { "TAPERFLUSH", CONF_TAPERFLUSH }, { "TAPETYPE", CONF_TAPETYPE }, { "TAPE_SPLITSIZE", CONF_TAPE_SPLITSIZE }, { "TPCHANGER", CONF_TPCHANGER }, @@ -470,1097 +769,689 @@ keytab_t server_keytab[] = { { NULL, CONF_UNKNOWN } }; -t_conf_var server_var [] = { - { CONF_ORG , CONFTYPE_STRING , read_string , CNF_ORG , NULL }, - { CONF_MAILTO , CONFTYPE_STRING , read_string , CNF_MAILTO , NULL }, - { CONF_DUMPUSER , CONFTYPE_STRING , read_string , CNF_DUMPUSER , NULL }, - { CONF_PRINTER , CONFTYPE_STRING , read_string , CNF_PRINTER , NULL }, - { CONF_TAPEDEV , CONFTYPE_STRING , read_string , CNF_TAPEDEV , NULL }, - { CONF_TPCHANGER , CONFTYPE_STRING , read_string , CNF_TPCHANGER , NULL }, - { CONF_CHNGRDEV , CONFTYPE_STRING , read_string , CNF_CHNGRDEV , NULL }, - { CONF_CHNGRFILE , CONFTYPE_STRING , read_string , CNF_CHNGRFILE , NULL }, - { CONF_LABELSTR , CONFTYPE_STRING , read_string , CNF_LABELSTR , NULL }, - { CONF_TAPELIST , CONFTYPE_STRING , read_string , CNF_TAPELIST , NULL }, - { CONF_DISKFILE , CONFTYPE_STRING , read_string , CNF_DISKFILE , NULL }, - { CONF_INFOFILE , CONFTYPE_STRING , read_string , CNF_INFOFILE , NULL }, - { CONF_LOGDIR , CONFTYPE_STRING , read_string , CNF_LOGDIR , NULL }, - { CONF_INDEXDIR , CONFTYPE_STRING , read_string , CNF_INDEXDIR , NULL }, - { CONF_TAPETYPE , CONFTYPE_IDENT , read_ident , CNF_TAPETYPE , NULL }, - { CONF_DUMPCYCLE , CONFTYPE_INT , read_int , CNF_DUMPCYCLE , validate_positive0 }, - { CONF_RUNSPERCYCLE , CONFTYPE_INT , read_int , CNF_RUNSPERCYCLE , validate_runspercycle }, - { CONF_RUNTAPES , CONFTYPE_INT , read_int , CNF_RUNTAPES , validate_positive0 }, - { CONF_TAPECYCLE , CONFTYPE_INT , read_int , CNF_TAPECYCLE , validate_positive1 }, - { CONF_BUMPDAYS , CONFTYPE_INT , read_int , CNF_BUMPDAYS , validate_positive1 }, - { CONF_BUMPSIZE , CONFTYPE_AM64 , read_am64 , CNF_BUMPSIZE , validate_positive1 }, - { CONF_BUMPPERCENT , CONFTYPE_INT , read_int , CNF_BUMPPERCENT , validate_bumppercent }, - { CONF_BUMPMULT , CONFTYPE_REAL , read_real , CNF_BUMPMULT , validate_bumpmult }, - { CONF_NETUSAGE , CONFTYPE_INT , read_int , CNF_NETUSAGE , validate_positive1 }, - { CONF_INPARALLEL , CONFTYPE_INT , read_int , CNF_INPARALLEL , validate_inparallel }, - { CONF_DUMPORDER , CONFTYPE_STRING , read_string , CNF_DUMPORDER , NULL }, - { CONF_MAXDUMPS , CONFTYPE_INT , read_int , CNF_MAXDUMPS , validate_positive1 }, - { CONF_ETIMEOUT , CONFTYPE_INT , read_int , CNF_ETIMEOUT , NULL }, - { CONF_DTIMEOUT , CONFTYPE_INT , read_int , CNF_DTIMEOUT , validate_positive1 }, - { CONF_CTIMEOUT , CONFTYPE_INT , read_int , CNF_CTIMEOUT , validate_positive1 }, - { CONF_TAPEBUFS , CONFTYPE_INT , read_int , CNF_TAPEBUFS , validate_positive1 }, - { CONF_RAWTAPEDEV , CONFTYPE_STRING , read_string , CNF_RAWTAPEDEV , NULL }, - { CONF_COLUMNSPEC , CONFTYPE_STRING , read_string , CNF_COLUMNSPEC , NULL }, - { CONF_TAPERALGO , CONFTYPE_TAPERALGO, get_taperalgo, CNF_TAPERALGO , NULL }, - { CONF_DISPLAYUNIT , CONFTYPE_STRING , read_string , CNF_DISPLAYUNIT , validate_displayunit }, - { CONF_AUTOFLUSH , CONFTYPE_BOOL , read_bool , CNF_AUTOFLUSH , NULL }, - { CONF_RESERVE , CONFTYPE_INT , read_int , CNF_RESERVE , validate_reserve }, - { CONF_MAXDUMPSIZE , CONFTYPE_AM64 , read_am64 , CNF_MAXDUMPSIZE , NULL }, - { CONF_KRB5KEYTAB , CONFTYPE_STRING , read_string , CNF_KRB5KEYTAB , NULL }, - { CONF_KRB5PRINCIPAL , CONFTYPE_STRING , read_string , CNF_KRB5PRINCIPAL , NULL }, - { CONF_LABEL_NEW_TAPES , CONFTYPE_STRING , read_string , CNF_LABEL_NEW_TAPES , NULL }, - { CONF_USETIMESTAMPS , CONFTYPE_BOOL , read_bool , CNF_USETIMESTAMPS , NULL }, - { CONF_AMRECOVER_DO_FSF , CONFTYPE_BOOL , read_bool , CNF_AMRECOVER_DO_FSF , NULL }, - { CONF_AMRECOVER_CHANGER , CONFTYPE_STRING , read_string , CNF_AMRECOVER_CHANGER , NULL }, - { CONF_AMRECOVER_CHECK_LABEL, CONFTYPE_BOOL , read_bool , CNF_AMRECOVER_CHECK_LABEL, NULL }, - { CONF_CONNECT_TRIES , CONFTYPE_INT , read_int , CNF_CONNECT_TRIES , validate_positive1 }, - { CONF_REP_TRIES , CONFTYPE_INT , read_int , CNF_REP_TRIES , validate_positive1 }, - { CONF_REQ_TRIES , CONFTYPE_INT , read_int , CNF_REQ_TRIES , validate_positive1 }, - { CONF_DEBUG_AMANDAD , CONFTYPE_INT , read_int , CNF_DEBUG_AMANDAD , validate_debug }, - { CONF_DEBUG_AMIDXTAPED , CONFTYPE_INT , read_int , CNF_DEBUG_AMIDXTAPED , validate_debug }, - { CONF_DEBUG_AMINDEXD , CONFTYPE_INT , read_int , CNF_DEBUG_AMINDEXD , validate_debug }, - { CONF_DEBUG_AMRECOVER , CONFTYPE_INT , read_int , CNF_DEBUG_AMRECOVER , validate_debug }, - { CONF_DEBUG_AUTH , CONFTYPE_INT , read_int , CNF_DEBUG_AUTH , validate_debug }, - { CONF_DEBUG_EVENT , CONFTYPE_INT , read_int , CNF_DEBUG_EVENT , validate_debug }, - { CONF_DEBUG_HOLDING , CONFTYPE_INT , read_int , CNF_DEBUG_HOLDING , validate_debug }, - { CONF_DEBUG_PROTOCOL , CONFTYPE_INT , read_int , CNF_DEBUG_PROTOCOL , validate_debug }, - { CONF_DEBUG_PLANNER , CONFTYPE_INT , read_int , CNF_DEBUG_PLANNER , validate_debug }, - { CONF_DEBUG_DRIVER , CONFTYPE_INT , read_int , CNF_DEBUG_DRIVER , validate_debug }, - { CONF_DEBUG_DUMPER , CONFTYPE_INT , read_int , CNF_DEBUG_DUMPER , validate_debug }, - { CONF_DEBUG_CHUNKER , CONFTYPE_INT , read_int , CNF_DEBUG_CHUNKER , validate_debug }, - { CONF_DEBUG_TAPER , CONFTYPE_INT , read_int , CNF_DEBUG_TAPER , validate_debug }, - { CONF_DEBUG_SELFCHECK , CONFTYPE_INT , read_int , CNF_DEBUG_SELFCHECK , validate_debug }, - { CONF_DEBUG_SENDSIZE , CONFTYPE_INT , read_int , CNF_DEBUG_SENDSIZE , validate_debug }, - { CONF_DEBUG_SENDBACKUP , CONFTYPE_INT , read_int , CNF_DEBUG_SENDBACKUP , validate_debug }, - { CONF_RESERVED_UDP_PORT , CONFTYPE_INTRANGE , read_intrange, CNF_RESERVED_UDP_PORT , validate_reserved_port_range }, - { CONF_RESERVED_TCP_PORT , CONFTYPE_INTRANGE , read_intrange, CNF_RESERVED_TCP_PORT , validate_reserved_port_range }, - { CONF_UNRESERVED_TCP_PORT , CONFTYPE_INTRANGE , read_intrange, CNF_UNRESERVED_TCP_PORT , validate_unreserved_port_range }, - { CONF_UNKNOWN , CONFTYPE_INT , NULL , CNF_CNF , NULL } -}; - -t_conf_var tapetype_var [] = { - { CONF_COMMENT , CONFTYPE_STRING, read_string, TAPETYPE_COMMENT , NULL }, - { CONF_LBL_TEMPL , CONFTYPE_STRING, read_string, TAPETYPE_LBL_TEMPL , NULL }, - { CONF_BLOCKSIZE , CONFTYPE_SIZE , read_size , TAPETYPE_BLOCKSIZE , validate_blocksize }, - { CONF_READBLOCKSIZE, CONFTYPE_SIZE , read_size , TAPETYPE_READBLOCKSIZE, validate_blocksize }, - { CONF_LENGTH , CONFTYPE_AM64 , read_am64 , TAPETYPE_LENGTH , validate_positive0 }, - { CONF_FILEMARK , CONFTYPE_AM64 , read_am64 , TAPETYPE_FILEMARK , NULL }, - { CONF_SPEED , CONFTYPE_INT , read_int , TAPETYPE_SPEED , validate_positive0 }, - { CONF_FILE_PAD , CONFTYPE_BOOL , read_bool , TAPETYPE_FILE_PAD , NULL }, - { CONF_UNKNOWN , CONFTYPE_INT , NULL , TAPETYPE_TAPETYPE , NULL } -}; - -t_conf_var dumptype_var [] = { - { CONF_COMMENT , CONFTYPE_STRING , read_string , DUMPTYPE_COMMENT , NULL }, - { CONF_AUTH , CONFTYPE_STRING , read_string , DUMPTYPE_SECURITY_DRIVER , NULL }, - { CONF_BUMPDAYS , CONFTYPE_INT , read_int , DUMPTYPE_BUMPDAYS , NULL }, - { CONF_BUMPMULT , CONFTYPE_REAL , read_real , DUMPTYPE_BUMPMULT , NULL }, - { CONF_BUMPSIZE , CONFTYPE_AM64 , read_am64 , DUMPTYPE_BUMPSIZE , NULL }, - { CONF_BUMPPERCENT , CONFTYPE_INT , read_int , DUMPTYPE_BUMPPERCENT , NULL }, - { CONF_COMPRATE , CONFTYPE_REAL , get_comprate, DUMPTYPE_COMPRATE , NULL }, - { CONF_COMPRESS , CONFTYPE_INT , get_compress, DUMPTYPE_COMPRESS , NULL }, - { CONF_ENCRYPT , CONFTYPE_INT , get_encrypt , DUMPTYPE_ENCRYPT , NULL }, - { CONF_DUMPCYCLE , CONFTYPE_INT , read_int , DUMPTYPE_DUMPCYCLE , validate_positive0 }, - { CONF_EXCLUDE , CONFTYPE_EXINCLUDE, get_exclude , DUMPTYPE_EXCLUDE , NULL }, - { CONF_INCLUDE , CONFTYPE_EXINCLUDE, get_exclude , DUMPTYPE_INCLUDE , NULL }, - { CONF_IGNORE , CONFTYPE_BOOL , read_bool , DUMPTYPE_IGNORE , NULL }, - { CONF_HOLDING , CONFTYPE_HOLDING , get_holding , DUMPTYPE_HOLDINGDISK , NULL }, - { CONF_INDEX , CONFTYPE_BOOL , read_bool , DUMPTYPE_INDEX , NULL }, - { CONF_KENCRYPT , CONFTYPE_BOOL , read_bool , DUMPTYPE_KENCRYPT , NULL }, - { CONF_MAXDUMPS , CONFTYPE_INT , read_int , DUMPTYPE_MAXDUMPS , validate_positive1 }, - { CONF_MAXPROMOTEDAY , CONFTYPE_INT , read_int , DUMPTYPE_MAXPROMOTEDAY , validate_positive0 }, - { CONF_PRIORITY , CONFTYPE_PRIORITY , get_priority, DUMPTYPE_PRIORITY , NULL }, - { CONF_PROGRAM , CONFTYPE_STRING , read_string , DUMPTYPE_PROGRAM , NULL }, - { CONF_RECORD , CONFTYPE_BOOL , read_bool , DUMPTYPE_RECORD , NULL }, - { CONF_SKIP_FULL , CONFTYPE_BOOL , read_bool , DUMPTYPE_SKIP_FULL , NULL }, - { CONF_SKIP_INCR , CONFTYPE_BOOL , read_bool , DUMPTYPE_SKIP_INCR , NULL }, - { CONF_STARTTIME , CONFTYPE_TIME , read_time , DUMPTYPE_STARTTIME , NULL }, - { CONF_STRATEGY , CONFTYPE_INT , get_strategy, DUMPTYPE_STRATEGY , NULL }, - { CONF_TAPE_SPLITSIZE , CONFTYPE_AM64 , read_am64 , DUMPTYPE_TAPE_SPLITSIZE , validate_positive0 }, - { CONF_SPLIT_DISKBUFFER , CONFTYPE_STRING , read_string , DUMPTYPE_SPLIT_DISKBUFFER , NULL }, - { CONF_ESTIMATE , CONFTYPE_INT , get_estimate, DUMPTYPE_ESTIMATE , NULL }, - { CONF_SRV_ENCRYPT , CONFTYPE_STRING , read_string , DUMPTYPE_SRV_ENCRYPT , NULL }, - { CONF_CLNT_ENCRYPT , CONFTYPE_STRING , read_string , DUMPTYPE_CLNT_ENCRYPT , NULL }, - { CONF_AMANDAD_PATH , CONFTYPE_STRING , read_string , DUMPTYPE_AMANDAD_PATH , NULL }, - { CONF_CLIENT_USERNAME , CONFTYPE_STRING , read_string , DUMPTYPE_CLIENT_USERNAME , NULL }, - { CONF_SSH_KEYS , CONFTYPE_STRING , read_string , DUMPTYPE_SSH_KEYS , NULL }, - { CONF_SRVCOMPPROG , CONFTYPE_STRING , read_string , DUMPTYPE_SRVCOMPPROG , NULL }, - { CONF_CLNTCOMPPROG , CONFTYPE_STRING , read_string , DUMPTYPE_CLNTCOMPPROG , NULL }, - { CONF_FALLBACK_SPLITSIZE, CONFTYPE_AM64 , read_am64 , DUMPTYPE_FALLBACK_SPLITSIZE, NULL }, - { CONF_SRV_DECRYPT_OPT , CONFTYPE_STRING , read_string , DUMPTYPE_SRV_DECRYPT_OPT , NULL }, - { CONF_CLNT_DECRYPT_OPT , CONFTYPE_STRING , read_string , DUMPTYPE_CLNT_DECRYPT_OPT , NULL }, - { CONF_UNKNOWN , CONFTYPE_INT , NULL , DUMPTYPE_DUMPTYPE , NULL } +/* A keyword table for recognizing unit suffixes. No distinction is made for kinds + * of suffixes: 1024 weeks = 7 k. */ +keytab_t numb_keytable[] = { + { "B", CONF_MULT1 }, + { "BPS", CONF_MULT1 }, + { "BYTE", CONF_MULT1 }, + { "BYTES", CONF_MULT1 }, + { "DAY", CONF_MULT1 }, + { "DAYS", CONF_MULT1 }, + { "INF", CONF_AMINFINITY }, + { "K", CONF_MULT1K }, + { "KB", CONF_MULT1K }, + { "KBPS", CONF_MULT1K }, + { "KBYTE", CONF_MULT1K }, + { "KBYTES", CONF_MULT1K }, + { "KILOBYTE", CONF_MULT1K }, + { "KILOBYTES", CONF_MULT1K }, + { "KPS", CONF_MULT1K }, + { "M", CONF_MULT1M }, + { "MB", CONF_MULT1M }, + { "MBPS", CONF_MULT1M }, + { "MBYTE", CONF_MULT1M }, + { "MBYTES", CONF_MULT1M }, + { "MEG", CONF_MULT1M }, + { "MEGABYTE", CONF_MULT1M }, + { "MEGABYTES", CONF_MULT1M }, + { "G", CONF_MULT1G }, + { "GB", CONF_MULT1G }, + { "GBPS", CONF_MULT1G }, + { "GBYTE", CONF_MULT1G }, + { "GBYTES", CONF_MULT1G }, + { "GIG", CONF_MULT1G }, + { "GIGABYTE", CONF_MULT1G }, + { "GIGABYTES", CONF_MULT1G }, + { "MPS", CONF_MULT1M }, + { "TAPE", CONF_MULT1 }, + { "TAPES", CONF_MULT1 }, + { "WEEK", CONF_MULT7 }, + { "WEEKS", CONF_MULT7 }, + { NULL, CONF_IDENT } }; -t_conf_var holding_var [] = { - { CONF_DIRECTORY, CONFTYPE_STRING, read_string, HOLDING_DISKDIR , NULL }, - { CONF_COMMENT , CONFTYPE_STRING, read_string, HOLDING_COMMENT , NULL }, - { CONF_USE , CONFTYPE_AM64 , read_am64 , HOLDING_DISKSIZE , validate_use }, - { CONF_CHUNKSIZE, CONFTYPE_AM64 , read_am64 , HOLDING_CHUNKSIZE, validate_chunksize }, - { CONF_UNKNOWN , CONFTYPE_INT , NULL , HOLDING_HOLDING , NULL } +/* Boolean keywords -- all the ways to say "true" and "false" in amanda.conf */ +keytab_t bool_keytable[] = { + { "Y", CONF_ATRUE }, + { "YES", CONF_ATRUE }, + { "T", CONF_ATRUE }, + { "TRUE", CONF_ATRUE }, + { "ON", CONF_ATRUE }, + { "N", CONF_AFALSE }, + { "NO", CONF_AFALSE }, + { "F", CONF_AFALSE }, + { "FALSE", CONF_AFALSE }, + { "OFF", CONF_AFALSE }, + { NULL, CONF_IDENT } }; -/* -** ------------------------ -** External entry points -** ------------------------ -*/ - -int -read_conffile( - char *filename) -{ - interface_t *ip; - - my_keytab = server_keytab; - my_var = server_var; - init_defaults(); +/* Now, the parser tables for client and server global parameters, and for + * each of the server subsections */ +conf_var_t client_var [] = { + { CONF_CONF , CONFTYPE_STR , read_str , CNF_CONF , NULL }, + { CONF_INDEX_SERVER , CONFTYPE_STR , read_str , CNF_INDEX_SERVER , NULL }, + { CONF_TAPE_SERVER , CONFTYPE_STR , read_str , CNF_TAPE_SERVER , NULL }, + { CONF_TAPEDEV , CONFTYPE_STR , read_str , CNF_TAPEDEV , NULL }, + { CONF_AUTH , CONFTYPE_STR , read_str , CNF_AUTH , NULL }, + { CONF_SSH_KEYS , CONFTYPE_STR , read_str , CNF_SSH_KEYS , NULL }, + { CONF_AMANDAD_PATH , CONFTYPE_STR , read_str , CNF_AMANDAD_PATH , NULL }, + { CONF_CLIENT_USERNAME , CONFTYPE_STR , read_str , CNF_CLIENT_USERNAME , NULL }, + { CONF_GNUTAR_LIST_DIR , CONFTYPE_STR , read_str , CNF_GNUTAR_LIST_DIR , NULL }, + { CONF_AMANDATES , CONFTYPE_STR , read_str , CNF_AMANDATES , NULL }, + { CONF_KRB5KEYTAB , CONFTYPE_STR , read_str , CNF_KRB5KEYTAB , NULL }, + { CONF_KRB5PRINCIPAL , CONFTYPE_STR , read_str , CNF_KRB5PRINCIPAL , NULL }, + { CONF_CONNECT_TRIES , CONFTYPE_INT , read_int , CNF_CONNECT_TRIES , validate_positive }, + { CONF_REP_TRIES , CONFTYPE_INT , read_int , CNF_REP_TRIES , validate_positive }, + { CONF_REQ_TRIES , CONFTYPE_INT , read_int , CNF_REQ_TRIES , validate_positive }, + { CONF_DEBUG_AMANDAD , CONFTYPE_INT , read_int , CNF_DEBUG_AMANDAD , validate_debug }, + { CONF_DEBUG_AMIDXTAPED , CONFTYPE_INT , read_int , CNF_DEBUG_AMIDXTAPED , validate_debug }, + { CONF_DEBUG_AMINDEXD , CONFTYPE_INT , read_int , CNF_DEBUG_AMINDEXD , validate_debug }, + { CONF_DEBUG_AMRECOVER , CONFTYPE_INT , read_int , CNF_DEBUG_AMRECOVER , validate_debug }, + { CONF_DEBUG_AUTH , CONFTYPE_INT , read_int , CNF_DEBUG_AUTH , validate_debug }, + { CONF_DEBUG_EVENT , CONFTYPE_INT , read_int , CNF_DEBUG_EVENT , validate_debug }, + { CONF_DEBUG_HOLDING , CONFTYPE_INT , read_int , CNF_DEBUG_HOLDING , validate_debug }, + { CONF_DEBUG_PROTOCOL , CONFTYPE_INT , read_int , CNF_DEBUG_PROTOCOL , validate_debug }, + { CONF_DEBUG_PLANNER , CONFTYPE_INT , read_int , CNF_DEBUG_PLANNER , validate_debug }, + { CONF_DEBUG_DRIVER , CONFTYPE_INT , read_int , CNF_DEBUG_DRIVER , validate_debug }, + { CONF_DEBUG_DUMPER , CONFTYPE_INT , read_int , CNF_DEBUG_DUMPER , validate_debug }, + { CONF_DEBUG_CHUNKER , CONFTYPE_INT , read_int , CNF_DEBUG_CHUNKER , validate_debug }, + { CONF_DEBUG_TAPER , CONFTYPE_INT , read_int , CNF_DEBUG_TAPER , validate_debug }, + { CONF_DEBUG_SELFCHECK , CONFTYPE_INT , read_int , CNF_DEBUG_SELFCHECK , validate_debug }, + { CONF_DEBUG_SENDSIZE , CONFTYPE_INT , read_int , CNF_DEBUG_SENDSIZE , validate_debug }, + { CONF_DEBUG_SENDBACKUP , CONFTYPE_INT , read_int , CNF_DEBUG_SENDBACKUP , validate_debug }, + { CONF_RESERVED_UDP_PORT , CONFTYPE_INTRANGE, read_intrange, CNF_RESERVED_UDP_PORT , validate_reserved_port_range }, + { CONF_RESERVED_TCP_PORT , CONFTYPE_INTRANGE, read_intrange, CNF_RESERVED_TCP_PORT , validate_reserved_port_range }, + { CONF_UNRESERVED_TCP_PORT, CONFTYPE_INTRANGE, read_intrange, CNF_UNRESERVED_TCP_PORT, validate_unreserved_port_range }, + { CONF_UNKNOWN , CONFTYPE_INT , NULL , CNF_CNF , NULL } +}; - /* We assume that conf_confname & conf are initialized to NULL above */ - read_conffile_recursively(filename); +conf_var_t server_var [] = { + { CONF_ORG , CONFTYPE_STR , read_str , CNF_ORG , NULL }, + { CONF_MAILTO , CONFTYPE_STR , read_str , CNF_MAILTO , NULL }, + { CONF_DUMPUSER , CONFTYPE_STR , read_str , CNF_DUMPUSER , NULL }, + { CONF_PRINTER , CONFTYPE_STR , read_str , CNF_PRINTER , NULL }, + { CONF_TAPEDEV , CONFTYPE_STR , read_str , CNF_TAPEDEV , NULL }, + { CONF_DEVICE_PROPERTY , CONFTYPE_PROPLIST , read_property , CNF_DEVICE_PROPERTY , NULL }, + { CONF_TPCHANGER , CONFTYPE_STR , read_str , CNF_TPCHANGER , NULL }, + { CONF_CHANGERDEV , CONFTYPE_STR , read_str , CNF_CHANGERDEV , NULL }, + { CONF_CHANGERFILE , CONFTYPE_STR , read_str , CNF_CHANGERFILE , NULL }, + { CONF_LABELSTR , CONFTYPE_STR , read_str , CNF_LABELSTR , NULL }, + { CONF_TAPELIST , CONFTYPE_STR , read_str , CNF_TAPELIST , NULL }, + { CONF_DISKFILE , CONFTYPE_STR , read_str , CNF_DISKFILE , NULL }, + { CONF_INFOFILE , CONFTYPE_STR , read_str , CNF_INFOFILE , NULL }, + { CONF_LOGDIR , CONFTYPE_STR , read_str , CNF_LOGDIR , NULL }, + { CONF_INDEXDIR , CONFTYPE_STR , read_str , CNF_INDEXDIR , NULL }, + { CONF_TAPETYPE , CONFTYPE_IDENT , read_ident , CNF_TAPETYPE , NULL }, + { CONF_DUMPCYCLE , CONFTYPE_INT , read_int , CNF_DUMPCYCLE , validate_nonnegative }, + { CONF_RUNSPERCYCLE , CONFTYPE_INT , read_int , CNF_RUNSPERCYCLE , validate_runspercycle }, + { CONF_RUNTAPES , CONFTYPE_INT , read_int , CNF_RUNTAPES , validate_nonnegative }, + { CONF_TAPECYCLE , CONFTYPE_INT , read_int , CNF_TAPECYCLE , validate_positive }, + { CONF_BUMPDAYS , CONFTYPE_INT , read_int , CNF_BUMPDAYS , validate_positive }, + { CONF_BUMPSIZE , CONFTYPE_AM64 , read_am64 , CNF_BUMPSIZE , validate_positive }, + { CONF_BUMPPERCENT , CONFTYPE_INT , read_int , CNF_BUMPPERCENT , validate_bumppercent }, + { CONF_BUMPMULT , CONFTYPE_REAL , read_real , CNF_BUMPMULT , validate_bumpmult }, + { CONF_NETUSAGE , CONFTYPE_INT , read_int , CNF_NETUSAGE , validate_positive }, + { CONF_INPARALLEL , CONFTYPE_INT , read_int , CNF_INPARALLEL , validate_inparallel }, + { CONF_DUMPORDER , CONFTYPE_STR , read_str , CNF_DUMPORDER , NULL }, + { CONF_MAXDUMPS , CONFTYPE_INT , read_int , CNF_MAXDUMPS , validate_positive }, + { CONF_ETIMEOUT , CONFTYPE_INT , read_int , CNF_ETIMEOUT , NULL }, + { CONF_DTIMEOUT , CONFTYPE_INT , read_int , CNF_DTIMEOUT , validate_positive }, + { CONF_CTIMEOUT , CONFTYPE_INT , read_int , CNF_CTIMEOUT , validate_positive }, + { CONF_TAPEBUFS , CONFTYPE_INT , read_int , CNF_TAPEBUFS , validate_positive }, + { CONF_DEVICE_OUTPUT_BUFFER_SIZE, CONFTYPE_SIZE , read_size , CNF_DEVICE_OUTPUT_BUFFER_SIZE, validate_positive }, + { CONF_COLUMNSPEC , CONFTYPE_STR , read_str , CNF_COLUMNSPEC , NULL }, + { CONF_TAPERALGO , CONFTYPE_TAPERALGO, read_taperalgo , CNF_TAPERALGO , NULL }, + { CONF_FLUSH_THRESHOLD_DUMPED, CONFTYPE_INT , read_int , CNF_FLUSH_THRESHOLD_DUMPED, validate_nonnegative }, + { CONF_FLUSH_THRESHOLD_SCHEDULED, CONFTYPE_INT , read_int , CNF_FLUSH_THRESHOLD_SCHEDULED, validate_nonnegative }, + { CONF_TAPERFLUSH , CONFTYPE_INT , read_int , CNF_TAPERFLUSH , validate_nonnegative }, + { CONF_DISPLAYUNIT , CONFTYPE_STR , read_str , CNF_DISPLAYUNIT , validate_displayunit }, + { CONF_AUTOFLUSH , CONFTYPE_BOOLEAN , read_bool , CNF_AUTOFLUSH , NULL }, + { CONF_RESERVE , CONFTYPE_INT , read_int , CNF_RESERVE , validate_reserve }, + { CONF_MAXDUMPSIZE , CONFTYPE_AM64 , read_am64 , CNF_MAXDUMPSIZE , NULL }, + { CONF_KRB5KEYTAB , CONFTYPE_STR , read_str , CNF_KRB5KEYTAB , NULL }, + { CONF_KRB5PRINCIPAL , CONFTYPE_STR , read_str , CNF_KRB5PRINCIPAL , NULL }, + { CONF_LABEL_NEW_TAPES , CONFTYPE_STR , read_str , CNF_LABEL_NEW_TAPES , NULL }, + { CONF_USETIMESTAMPS , CONFTYPE_BOOLEAN , read_bool , CNF_USETIMESTAMPS , NULL }, + { CONF_AMRECOVER_DO_FSF , CONFTYPE_BOOLEAN , read_bool , CNF_AMRECOVER_DO_FSF , NULL }, + { CONF_AMRECOVER_CHANGER , CONFTYPE_STR , read_str , CNF_AMRECOVER_CHANGER , NULL }, + { CONF_AMRECOVER_CHECK_LABEL, CONFTYPE_BOOLEAN , read_bool , CNF_AMRECOVER_CHECK_LABEL, NULL }, + { CONF_CONNECT_TRIES , CONFTYPE_INT , read_int , CNF_CONNECT_TRIES , validate_positive }, + { CONF_REP_TRIES , CONFTYPE_INT , read_int , CNF_REP_TRIES , validate_positive }, + { CONF_REQ_TRIES , CONFTYPE_INT , read_int , CNF_REQ_TRIES , validate_positive }, + { CONF_DEBUG_AMANDAD , CONFTYPE_INT , read_int , CNF_DEBUG_AMANDAD , validate_debug }, + { CONF_DEBUG_AMIDXTAPED , CONFTYPE_INT , read_int , CNF_DEBUG_AMIDXTAPED , validate_debug }, + { CONF_DEBUG_AMINDEXD , CONFTYPE_INT , read_int , CNF_DEBUG_AMINDEXD , validate_debug }, + { CONF_DEBUG_AMRECOVER , CONFTYPE_INT , read_int , CNF_DEBUG_AMRECOVER , validate_debug }, + { CONF_DEBUG_AUTH , CONFTYPE_INT , read_int , CNF_DEBUG_AUTH , validate_debug }, + { CONF_DEBUG_EVENT , CONFTYPE_INT , read_int , CNF_DEBUG_EVENT , validate_debug }, + { CONF_DEBUG_HOLDING , CONFTYPE_INT , read_int , CNF_DEBUG_HOLDING , validate_debug }, + { CONF_DEBUG_PROTOCOL , CONFTYPE_INT , read_int , CNF_DEBUG_PROTOCOL , validate_debug }, + { CONF_DEBUG_PLANNER , CONFTYPE_INT , read_int , CNF_DEBUG_PLANNER , validate_debug }, + { CONF_DEBUG_DRIVER , CONFTYPE_INT , read_int , CNF_DEBUG_DRIVER , validate_debug }, + { CONF_DEBUG_DUMPER , CONFTYPE_INT , read_int , CNF_DEBUG_DUMPER , validate_debug }, + { CONF_DEBUG_CHUNKER , CONFTYPE_INT , read_int , CNF_DEBUG_CHUNKER , validate_debug }, + { CONF_DEBUG_TAPER , CONFTYPE_INT , read_int , CNF_DEBUG_TAPER , validate_debug }, + { CONF_DEBUG_SELFCHECK , CONFTYPE_INT , read_int , CNF_DEBUG_SELFCHECK , validate_debug }, + { CONF_DEBUG_SENDSIZE , CONFTYPE_INT , read_int , CNF_DEBUG_SENDSIZE , validate_debug }, + { CONF_DEBUG_SENDBACKUP , CONFTYPE_INT , read_int , CNF_DEBUG_SENDBACKUP , validate_debug }, + { CONF_RESERVED_UDP_PORT , CONFTYPE_INTRANGE , read_intrange , CNF_RESERVED_UDP_PORT , validate_reserved_port_range }, + { CONF_RESERVED_TCP_PORT , CONFTYPE_INTRANGE , read_intrange , CNF_RESERVED_TCP_PORT , validate_reserved_port_range }, + { CONF_UNRESERVED_TCP_PORT , CONFTYPE_INTRANGE , read_intrange , CNF_UNRESERVED_TCP_PORT , validate_unreserved_port_range }, + { CONF_UNKNOWN , CONFTYPE_INT , NULL , CNF_CNF , NULL } +}; - /* overwrite with command line option */ - command_overwrite(program_options, my_var, my_keytab, conf_data, - ""); +conf_var_t tapetype_var [] = { + { CONF_COMMENT , CONFTYPE_STR , read_str , TAPETYPE_COMMENT , NULL }, + { CONF_LBL_TEMPL , CONFTYPE_STR , read_str , TAPETYPE_LBL_TEMPL , NULL }, + { CONF_BLOCKSIZE , CONFTYPE_SIZE , read_size , TAPETYPE_BLOCKSIZE , validate_blocksize }, + { CONF_READBLOCKSIZE , CONFTYPE_SIZE , read_size , TAPETYPE_READBLOCKSIZE, validate_blocksize }, + { CONF_LENGTH , CONFTYPE_AM64 , read_am64 , TAPETYPE_LENGTH , validate_nonnegative }, + { CONF_FILEMARK , CONFTYPE_AM64 , read_am64 , TAPETYPE_FILEMARK , NULL }, + { CONF_SPEED , CONFTYPE_INT , read_int , TAPETYPE_SPEED , validate_nonnegative }, + { CONF_FILE_PAD , CONFTYPE_BOOLEAN , read_bool , TAPETYPE_FILE_PAD , NULL }, + { CONF_UNKNOWN , CONFTYPE_INT , NULL , TAPETYPE_TAPETYPE , NULL } +}; - if(got_parserror != -1 ) { - if(lookup_tapetype(conf_data[CNF_TAPETYPE].v.s) == NULL) { - char *save_confname = conf_confname; +conf_var_t dumptype_var [] = { + { CONF_COMMENT , CONFTYPE_STR , read_str , DUMPTYPE_COMMENT , NULL }, + { CONF_AUTH , CONFTYPE_STR , read_str , DUMPTYPE_SECURITY_DRIVER , NULL }, + { CONF_BUMPDAYS , CONFTYPE_INT , read_int , DUMPTYPE_BUMPDAYS , NULL }, + { CONF_BUMPMULT , CONFTYPE_REAL , read_real , DUMPTYPE_BUMPMULT , NULL }, + { CONF_BUMPSIZE , CONFTYPE_AM64 , read_am64 , DUMPTYPE_BUMPSIZE , NULL }, + { CONF_BUMPPERCENT , CONFTYPE_INT , read_int , DUMPTYPE_BUMPPERCENT , NULL }, + { CONF_COMPRATE , CONFTYPE_REAL , read_rate , DUMPTYPE_COMPRATE , NULL }, + { CONF_COMPRESS , CONFTYPE_INT , read_compress , DUMPTYPE_COMPRESS , NULL }, + { CONF_ENCRYPT , CONFTYPE_INT , read_encrypt , DUMPTYPE_ENCRYPT , NULL }, + { CONF_DUMPCYCLE , CONFTYPE_INT , read_int , DUMPTYPE_DUMPCYCLE , validate_nonnegative }, + { CONF_EXCLUDE , CONFTYPE_EXINCLUDE, read_exinclude, DUMPTYPE_EXCLUDE , NULL }, + { CONF_INCLUDE , CONFTYPE_EXINCLUDE, read_exinclude, DUMPTYPE_INCLUDE , NULL }, + { CONF_IGNORE , CONFTYPE_BOOLEAN , read_bool , DUMPTYPE_IGNORE , NULL }, + { CONF_HOLDING , CONFTYPE_HOLDING , read_holding , DUMPTYPE_HOLDINGDISK , NULL }, + { CONF_INDEX , CONFTYPE_BOOLEAN , read_bool , DUMPTYPE_INDEX , NULL }, + { CONF_KENCRYPT , CONFTYPE_BOOLEAN , read_bool , DUMPTYPE_KENCRYPT , NULL }, + { CONF_MAXDUMPS , CONFTYPE_INT , read_int , DUMPTYPE_MAXDUMPS , validate_positive }, + { CONF_MAXPROMOTEDAY , CONFTYPE_INT , read_int , DUMPTYPE_MAXPROMOTEDAY , validate_nonnegative }, + { CONF_PRIORITY , CONFTYPE_PRIORITY , read_priority , DUMPTYPE_PRIORITY , NULL }, + { CONF_PROGRAM , CONFTYPE_STR , read_str , DUMPTYPE_PROGRAM , NULL }, + { CONF_RECORD , CONFTYPE_BOOLEAN , read_bool , DUMPTYPE_RECORD , NULL }, + { CONF_SKIP_FULL , CONFTYPE_BOOLEAN , read_bool , DUMPTYPE_SKIP_FULL , NULL }, + { CONF_SKIP_INCR , CONFTYPE_BOOLEAN , read_bool , DUMPTYPE_SKIP_INCR , NULL }, + { CONF_STARTTIME , CONFTYPE_TIME , read_time , DUMPTYPE_STARTTIME , NULL }, + { CONF_STRATEGY , CONFTYPE_INT , read_strategy , DUMPTYPE_STRATEGY , NULL }, + { CONF_TAPE_SPLITSIZE , CONFTYPE_AM64 , read_am64 , DUMPTYPE_TAPE_SPLITSIZE , validate_nonnegative }, + { CONF_SPLIT_DISKBUFFER , CONFTYPE_STR , read_str , DUMPTYPE_SPLIT_DISKBUFFER , NULL }, + { CONF_ESTIMATE , CONFTYPE_INT , read_estimate , DUMPTYPE_ESTIMATE , NULL }, + { CONF_SRV_ENCRYPT , CONFTYPE_STR , read_str , DUMPTYPE_SRV_ENCRYPT , NULL }, + { CONF_CLNT_ENCRYPT , CONFTYPE_STR , read_str , DUMPTYPE_CLNT_ENCRYPT , NULL }, + { CONF_AMANDAD_PATH , CONFTYPE_STR , read_str , DUMPTYPE_AMANDAD_PATH , NULL }, + { CONF_CLIENT_USERNAME , CONFTYPE_STR , read_str , DUMPTYPE_CLIENT_USERNAME , NULL }, + { CONF_SSH_KEYS , CONFTYPE_STR , read_str , DUMPTYPE_SSH_KEYS , NULL }, + { CONF_SRVCOMPPROG , CONFTYPE_STR , read_str , DUMPTYPE_SRVCOMPPROG , NULL }, + { CONF_CLNTCOMPPROG , CONFTYPE_STR , read_str , DUMPTYPE_CLNTCOMPPROG , NULL }, + { CONF_FALLBACK_SPLITSIZE, CONFTYPE_AM64 , read_am64 , DUMPTYPE_FALLBACK_SPLITSIZE, NULL }, + { CONF_SRV_DECRYPT_OPT , CONFTYPE_STR , read_str , DUMPTYPE_SRV_DECRYPT_OPT , NULL }, + { CONF_CLNT_DECRYPT_OPT , CONFTYPE_STR , read_str , DUMPTYPE_CLNT_DECRYPT_OPT , NULL }, + { CONF_UNKNOWN , CONFTYPE_INT , NULL , DUMPTYPE_DUMPTYPE , NULL } +}; - conf_confname = filename; - if(!conf_data[CNF_TAPETYPE].seen) - conf_parserror("default tapetype %s not defined", conf_data[CNF_TAPETYPE].v.s); - else { - conf_line_num = conf_data[CNF_TAPETYPE].seen; - conf_parserror("tapetype %s not defined", conf_data[CNF_TAPETYPE].v.s); - } - conf_confname = save_confname; - } - } +conf_var_t holding_var [] = { + { CONF_DIRECTORY, CONFTYPE_STR , read_str , HOLDING_DISKDIR , NULL }, + { CONF_COMMENT , CONFTYPE_STR , read_str , HOLDING_COMMENT , NULL }, + { CONF_USE , CONFTYPE_AM64 , read_am64 , HOLDING_DISKSIZE , validate_use }, + { CONF_CHUNKSIZE, CONFTYPE_AM64 , read_am64 , HOLDING_CHUNKSIZE, validate_chunksize }, + { CONF_UNKNOWN , CONFTYPE_INT , NULL , HOLDING_HOLDING , NULL } +}; - ip = alloc(SIZEOF(interface_t)); - ip->name = stralloc("default"); - ip->seen = conf_data[CNF_NETUSAGE].seen; - conf_init_string(&ip->value[INTER_COMMENT], "implicit from NETUSAGE"); - conf_init_int(&ip->value[INTER_MAXUSAGE], conf_data[CNF_NETUSAGE].v.i); - ip->curusage = 0; - ip->next = interface_list; - interface_list = ip; +conf_var_t interface_var [] = { + { CONF_COMMENT, CONFTYPE_STR , read_str , INTER_COMMENT , NULL }, + { CONF_USE , CONFTYPE_INT , read_int , INTER_MAXUSAGE, validate_positive }, + { CONF_UNKNOWN, CONFTYPE_INT , NULL , INTER_INTER , NULL } +}; - debug_amandad = getconf_int(CNF_DEBUG_AMANDAD); - debug_amidxtaped = getconf_int(CNF_DEBUG_AMIDXTAPED); - debug_amindexd = getconf_int(CNF_DEBUG_AMINDEXD); - debug_amrecover = getconf_int(CNF_DEBUG_AMRECOVER); - debug_auth = getconf_int(CNF_DEBUG_AUTH); - debug_event = getconf_int(CNF_DEBUG_EVENT); - debug_holding = getconf_int(CNF_DEBUG_HOLDING); - debug_protocol = getconf_int(CNF_DEBUG_PROTOCOL); - debug_planner = getconf_int(CNF_DEBUG_PLANNER); - debug_driver = getconf_int(CNF_DEBUG_DRIVER); - debug_dumper = getconf_int(CNF_DEBUG_DUMPER); - debug_chunker = getconf_int(CNF_DEBUG_CHUNKER); - debug_taper = getconf_int(CNF_DEBUG_TAPER); - debug_selfcheck = getconf_int(CNF_DEBUG_SELFCHECK); - debug_sendsize = getconf_int(CNF_DEBUG_SENDSIZE); - debug_sendbackup = getconf_int(CNF_DEBUG_SENDBACKUP); - return got_parserror; -} +/* + * Lexical Analysis Implementation + */ -static void -validate_positive0( - struct s_conf_var *np, - val_t *val) +static char * +get_token_name( + tok_t token) { - switch(val->type) { - case CONFTYPE_INT: - if(val->v.i < 0) - conf_parserror("%s must be positive", get_token_name(np->token)); - break; - case CONFTYPE_LONG: - if(val->v.l < 0) - conf_parserror("%s must be positive", get_token_name(np->token)); - break; - case CONFTYPE_AM64: - if(val->v.am64 < 0) - conf_parserror("%s must be positive", get_token_name(np->token)); - break; - default: - conf_parserror("validate_positive0 invalid type %d\n", val->type); - } -} + keytab_t *kt; -static void -validate_positive1( - struct s_conf_var *np, - val_t *val) -{ - switch(val->type) { - case CONFTYPE_INT: - if(val->v.i < 1) - conf_parserror("%s must be positive", get_token_name(np->token)); - break; - case CONFTYPE_LONG: - if(val->v.l < 1) - conf_parserror("%s must be positive", get_token_name(np->token)); - break; - case CONFTYPE_AM64: - if(val->v.am64 < 1) - conf_parserror("%s must be positive", get_token_name(np->token)); - break; - case CONFTYPE_TIME: - if(val->v.t < 1) - conf_parserror("%s must be positive", get_token_name(np->token)); - break; - default: - conf_parserror("validate_positive1 invalid type %d\n", val->type); + if (keytable == NULL) { + error(_("keytable == NULL")); + /*NOTREACHED*/ } -} -static void -validate_runspercycle( - struct s_conf_var *np, - val_t *val) -{ - np = np; - if(val->v.i < -1) - conf_parserror("runspercycle must be >= -1"); -} - -static void -validate_bumppercent( - struct s_conf_var *np, - val_t *val) -{ - np = np; - if(val->v.i < 0 || val->v.i > 100) - conf_parserror("bumppercent must be between 0 and 100"); -} + for(kt = keytable; kt->token != CONF_UNKNOWN; kt++) + if(kt->token == token) break; -static void -validate_inparallel( - struct s_conf_var *np, - val_t *val) -{ - np = np; - if(val->v.i < 1 || val->v.i >MAX_DUMPERS) - conf_parserror("inparallel must be between 1 and MAX_DUMPERS (%d)", - MAX_DUMPERS); + if(kt->token == CONF_UNKNOWN) + return(""); + return(kt->keyword); } -static void -validate_bumpmult( - struct s_conf_var *np, - val_t *val) +static tok_t +lookup_keyword( + char * str) { - np = np; - if(val->v.r < 0.999) { - conf_parserror("bumpmult must be positive"); - } -} + keytab_t *kwp; -static void -validate_displayunit( - struct s_conf_var *np, - val_t *val) -{ - np = np; - if(strcmp(val->v.s, "k") == 0 || - strcmp(val->v.s, "K") == 0) { - val->v.s[0] = (char)toupper(val->v.s[0]); - unit_divisor=1; - } - else if(strcmp(val->v.s, "m") == 0 || - strcmp(val->v.s, "M") == 0) { - val->v.s[0] = (char)toupper(val->v.s[0]); - unit_divisor=1024; - } - else if(strcmp(val->v.s, "g") == 0 || - strcmp(val->v.s, "G") == 0) { - val->v.s[0] = (char)toupper(val->v.s[0]); - unit_divisor=1024*1024; - } - else if(strcmp(val->v.s, "t") == 0 || - strcmp(val->v.s, "T") == 0) { - val->v.s[0] = (char)toupper(val->v.s[0]); - unit_divisor=1024*1024*1024; - } - else { - conf_parserror("displayunit must be k,m,g or t."); + for(kwp = keytable; kwp->keyword != NULL; kwp++) { + if (strcasecmp(kwp->keyword, str) == 0) break; } + return kwp->token; } static void -validate_reserve( - struct s_conf_var *np, - val_t *val) -{ - np = np; - if(val->v.i < 0 || val->v.i > 100) - conf_parserror("reserve must be between 0 and 100"); -} - -static void -validate_use( - struct s_conf_var *np, - val_t *val) -{ - np = np; - val->v.am64 = am_floor(val->v.am64, DISK_BLOCK_KB); -} - -static void -validate_chunksize( - struct s_conf_var *np, - val_t *val) +get_conftoken( + tok_t exp) { - np = np; - if(val->v.am64 == 0) { - val->v.am64 = ((AM64_MAX / 1024) - (2 * DISK_BLOCK_KB)); - } - else if(val->v.am64 < 0) { - conf_parserror("Negative chunksize (" OFF_T_FMT - ") is no longer supported", val->v.am64); - } - val->v.am64 = am_floor(val->v.am64, (off_t)DISK_BLOCK_KB); - if (val->v.am64 < 2*DISK_BLOCK_KB) { - conf_parserror("chunksize must be at least %dkb", 2*DISK_BLOCK_KB); - } -} + int ch, d; + off_t am64; + char *buf; + char *tmps; + int token_overflow; + int inquote = 0; + int escape = 0; + int sign; -static void -validate_blocksize( - struct s_conf_var *np, - val_t *val) -{ - np = np; - if(val->v.l < DISK_BLOCK_KB) { - conf_parserror("Tape blocksize must be at least %d KBytes", - DISK_BLOCK_KB); - } else if(val->v.l > MAX_TAPE_BLOCK_KB) { - conf_parserror("Tape blocksize must not be larger than %d KBytes", - MAX_TAPE_BLOCK_KB); - } -} + if (token_pushed) { + token_pushed = 0; + tok = pushed_tok; -static void -validate_debug( - struct s_conf_var *np, - val_t *val) -{ - np = np; - if(val->v.i < 0 || val->v.i > 9) { - conf_parserror("Debug must be between 0 and 9"); - } -} + /* + ** If it looked like a keyword before then look it + ** up again in the current keyword table. + */ + switch(tok) { + case CONF_AM64: case CONF_SIZE: + case CONF_INT: case CONF_REAL: case CONF_STRING: + case CONF_LBRACE: case CONF_RBRACE: case CONF_COMMA: + case CONF_NL: case CONF_END: case CONF_UNKNOWN: + case CONF_TIME: + break; /* not a keyword */ -static void -validate_reserved_port_range( - struct s_conf_var *np, - val_t *val) -{ - np = np; - if(val->v.intrange[0] < 1 || val->v.intrange[0] > IPPORT_RESERVED-1) { - conf_parserror("portrange must be between 1 and %d", IPPORT_RESERVED-1); - } else if(val->v.intrange[1] < 1 || val->v.intrange[1] > IPPORT_RESERVED-1) { - conf_parserror("portrange must be between 1 and IPPORT_RESERVED-1"); + default: + if (exp == CONF_IDENT) + tok = CONF_IDENT; + else + tok = lookup_keyword(tokenval.v.s); + break; + } } -} + else { + ch = conftoken_getc(); -static void -validate_unreserved_port_range( - struct s_conf_var *np, - val_t *val) -{ - np = np; - if(val->v.intrange[0] < IPPORT_RESERVED+1 || val->v.intrange[0] > 65536) { - conf_parserror("portrange must be between %d and 65536", IPPORT_RESERVED+1); - } else if(val->v.intrange[1] < IPPORT_RESERVED+1 || val->v.intrange[1] > 65536) { - conf_parserror("portrange must be between %d and 65536", IPPORT_RESERVED+1); - } -} + while(ch != EOF && ch != '\n' && isspace(ch)) + ch = conftoken_getc(); + if (ch == '#') { /* comment - eat everything but eol/eof */ + while((ch = conftoken_getc()) != EOF && ch != '\n') { + (void)ch; /* Quiet empty loop complaints */ + } + } -char * -getconf_byname( - char *str) -{ - static char *tmpstr; - t_conf_var *np; - keytab_t *kt; - char *s; - char ch; - char *first_delim; - char *second_delim; - tapetype_t *tp; - dumptype_t *dp; - interface_t *ip; - holdingdisk_t *hp; + if (isalpha(ch)) { /* identifier */ + buf = tkbuf; + token_overflow = 0; + do { + if (buf < tkbuf+sizeof(tkbuf)-1) { + *buf++ = (char)ch; + } else { + *buf = '\0'; + if (!token_overflow) { + conf_parserror(_("token too long: %.20s..."), tkbuf); + } + token_overflow = 1; + } + ch = conftoken_getc(); + } while(isalnum(ch) || ch == '_' || ch == '-'); - tmpstr = stralloc(str); - s = tmpstr; - while((ch = *s++) != '\0') { - if(islower((int)ch)) - s[-1] = (char)toupper(ch); - } + if (ch != EOF && conftoken_ungetc(ch) == EOF) { + if (ferror(current_file)) { + conf_parserror(_("Pushback of '%c' failed: %s"), + ch, strerror(ferror(current_file))); + } else { + conf_parserror(_("Pushback of '%c' failed: EOF"), ch); + } + } + *buf = '\0'; - first_delim = strchr(tmpstr, ':'); - if (first_delim) { - *first_delim = '\0'; - first_delim++; - second_delim = strchr(first_delim,':'); - if(!second_delim) { - amfree(tmpstr); - return(NULL); - } - *second_delim = '\0'; - second_delim++; + tokenval.v.s = tkbuf; - for(kt = my_keytab; kt->token != CONF_UNKNOWN; kt++) { - if(kt->keyword && strcmp(kt->keyword, second_delim) == 0) - break; + if (token_overflow) tok = CONF_UNKNOWN; + else if (exp == CONF_IDENT) tok = CONF_IDENT; + else tok = lookup_keyword(tokenval.v.s); } + else if (isdigit(ch)) { /* integer */ + sign = 1; - if(kt->token == CONF_UNKNOWN) - return NULL; +negative_number: /* look for goto negative_number below sign is set there */ + am64 = 0; + do { + am64 = am64 * 10 + (ch - '0'); + ch = conftoken_getc(); + } while (isdigit(ch)); - if (strcmp(tmpstr, "TAPETYPE") == 0) { - tp = lookup_tapetype(first_delim); - if (!tp) { - amfree(tmpstr); - return(NULL); - } - for(np = tapetype_var; np->token != CONF_UNKNOWN; np++) { - if(np->token == kt->token) - break; - } - if (np->token == CONF_UNKNOWN) return NULL; - tmpstr = stralloc(conf_print(&tp->value[np->parm], 0, "")); - } else if (strcmp(tmpstr, "DUMPTYPE") == 0) { - dp = lookup_dumptype(first_delim); - if (!dp) { - amfree(tmpstr); - return(NULL); - } - for(np = dumptype_var; np->token != CONF_UNKNOWN; np++) { - if(np->token == kt->token) - break; + if (ch != '.') { + if (exp == CONF_INT) { + tok = CONF_INT; + tokenval.v.i = sign * (int)am64; + } else if (exp != CONF_REAL) { + tok = CONF_AM64; + tokenval.v.am64 = (off_t)sign * am64; + } else { + /* automatically convert to real when expected */ + tokenval.v.r = (double)sign * (double)am64; + tok = CONF_REAL; + } + } else { + /* got a real number, not an int */ + tokenval.v.r = sign * (double) am64; + am64 = 0; + d = 1; + ch = conftoken_getc(); + while (isdigit(ch)) { + am64 = am64 * 10 + (ch - '0'); + d = d * 10; + ch = conftoken_getc(); + } + tokenval.v.r += sign * ((double)am64) / d; + tok = CONF_REAL; } - if (np->token == CONF_UNKNOWN) return NULL; - tmpstr = stralloc(conf_print(&dp->value[np->parm], 0, "")); - } else if (strcmp(tmpstr, "HOLDINGDISK") == 0) { - hp = lookup_holdingdisk(first_delim); - if (!hp) { - amfree(tmpstr); - return(NULL); + + if (ch != EOF && conftoken_ungetc(ch) == EOF) { + if (ferror(current_file)) { + conf_parserror(_("Pushback of '%c' failed: %s"), + ch, strerror(ferror(current_file))); + } else { + conf_parserror(_("Pushback of '%c' failed: EOF"), ch); + } } - for(np = holding_var; np->token != CONF_UNKNOWN; np++) { - if(np->token == kt->token) - break; + } else switch(ch) { + case '"': /* string */ + buf = tkbuf; + token_overflow = 0; + inquote = 1; + *buf++ = (char)ch; + while (inquote && ((ch = conftoken_getc()) != EOF)) { + if (ch == '\n') { + if (!escape) + break; + escape = 0; + buf--; /* Consume escape in buffer */ + } else if (ch == '\\') { + escape = 1; + } else { + if (ch == '"') { + if (!escape) + inquote = 0; + } + escape = 0; + } + + if(buf >= &tkbuf[sizeof(tkbuf) - 1]) { + if (!token_overflow) { + conf_parserror(_("string too long: %.20s..."), tkbuf); + } + token_overflow = 1; + break; + } + *buf++ = (char)ch; } - if (np->token == CONF_UNKNOWN) return NULL; - tmpstr = stralloc(conf_print(&hp->value[np->parm], 0, "")); - } else if (strcmp(tmpstr, "INTERFACE") == 0) { - ip = lookup_interface(first_delim); - if (!ip) { - amfree(tmpstr); - return(NULL); + *buf = '\0'; + + /* + * A little manuver to leave a fully unquoted, unallocated string + * in tokenval.v.s + */ + tmps = unquote_string(tkbuf); + strncpy(tkbuf, tmps, sizeof(tkbuf)); + amfree(tmps); + tokenval.v.s = tkbuf; + + tok = (token_overflow) ? CONF_UNKNOWN : + (exp == CONF_IDENT) ? CONF_IDENT : CONF_STRING; + break; + + case '-': + ch = conftoken_getc(); + if (isdigit(ch)) { + sign = -1; + goto negative_number; } - for(np = holding_var; np->token != CONF_UNKNOWN; np++) { - if(np->token == kt->token) - break; + else { + if (ch != EOF && conftoken_ungetc(ch) == EOF) { + if (ferror(current_file)) { + conf_parserror(_("Pushback of '%c' failed: %s"), + ch, strerror(ferror(current_file))); + } else { + conf_parserror(_("Pushback of '%c' failed: EOF"), ch); + } + } + tok = CONF_UNKNOWN; } - if (np->token == CONF_UNKNOWN) return NULL; - tmpstr = stralloc(conf_print(&ip->value[np->parm], 0, "")); - } else { - amfree(tmpstr); - return(NULL); - } - } else { - for(kt = my_keytab; kt->token != CONF_UNKNOWN; kt++) { - if(kt->keyword && strcmp(kt->keyword, tmpstr) == 0) - break; - } + break; - if(kt->token == CONF_UNKNOWN) - return NULL; + case ',': + tok = CONF_COMMA; + break; - for(np = my_var; np->token != CONF_UNKNOWN; np++) { - if(np->token == kt->token) - break; - } + case '{': + tok = CONF_LBRACE; + break; + + case '}': + tok = CONF_RBRACE; + break; + + case '\n': + tok = CONF_NL; + break; - if(np->token == CONF_UNKNOWN) return NULL; + case EOF: + tok = CONF_END; + break; - tmpstr = stralloc(conf_print(&conf_data[np->parm], 0, "")); + default: + tok = CONF_UNKNOWN; + break; + } } - return tmpstr; -} + if (exp != CONF_ANY && tok != exp) { + char *str; + keytab_t *kwp; + switch(exp) { + case CONF_LBRACE: + str = "\"{\""; + break; -char * -getconf_list( - char *listname) -{ - char *result = NULL; - tapetype_t *tp; - dumptype_t *dp; - interface_t *ip; - holdingdisk_t *hp; + case CONF_RBRACE: + str = "\"}\""; + break; - if (strcasecmp(listname,"tapetype") == 0) { - result = stralloc(""); - for(tp = tapelist; tp != NULL; tp=tp->next) { - result = vstrextend(&result, tp->name, "\n", NULL); - } - } else if (strcasecmp(listname,"dumptype") == 0) { - result = stralloc(""); - for(dp = dumplist; dp != NULL; dp=dp->next) { - result = vstrextend(&result, dp->name, "\n", NULL); - } - } else if (strcasecmp(listname,"holdingdisk") == 0) { - result = stralloc(""); - for(hp = holdingdisks; hp != NULL; hp=hp->next) { - result = vstrextend(&result, hp->name, "\n", NULL); - } - } else if (strcasecmp(listname,"interface") == 0) { - result = stralloc(""); - for(ip = interface_list; ip != NULL; ip=ip->next) { - result = vstrextend(&result, ip->name, "\n", NULL); - } - } - return result; -} + case CONF_COMMA: + str = "\",\""; + break; + case CONF_NL: + str = _("end of line"); + break; -int -getconf_seen( - confparm_t parm) -{ - return(conf_data[parm].seen); -} + case CONF_END: + str = _("end of file"); + break; -int -getconf_boolean( - confparm_t parm) -{ - if (conf_data[parm].type != CONFTYPE_BOOL) { - error("getconf_boolean: parm is not a CONFTYPE_BOOL"); - /*NOTREACHED*/ - } - return(conf_data[parm].v.i != 0); -} + case CONF_INT: + str = _("an integer"); + break; -int -getconf_int( - confparm_t parm) -{ - if (conf_data[parm].type != CONFTYPE_INT) { - error("getconf_int: parm is not a CONFTYPE_INT"); - /*NOTREACHED*/ - } - return(conf_data[parm].v.i); -} + case CONF_REAL: + str = _("a real number"); + break; -long -getconf_long( - confparm_t parm) -{ - if (conf_data[parm].type != CONFTYPE_LONG) { - error("getconf_long: parm is not a CONFTYPE_LONG"); - /*NOTREACHED*/ - } - return(conf_data[parm].v.l); -} + case CONF_STRING: + str = _("a quoted string"); + break; -time_t -getconf_time( - confparm_t parm) -{ - if (conf_data[parm].type != CONFTYPE_TIME) { - error("getconf_time: parm is not a CONFTYPE_TIME"); - /*NOTREACHED*/ - } - return(conf_data[parm].v.t); -} + case CONF_IDENT: + str = _("an identifier"); + break; -ssize_t -getconf_size( - confparm_t parm) -{ - if (conf_data[parm].type != CONFTYPE_SIZE) { - error("getconf_size: parm is not a CONFTYPE_SIZE"); - /*NOTREACHED*/ + default: + for(kwp = keytable; kwp->keyword != NULL; kwp++) { + if (exp == kwp->token) + break; + } + if (kwp->keyword == NULL) + str = _("token not"); + else + str = kwp->keyword; + break; + } + conf_parserror(_("%s is expected"), str); + tok = exp; + if (tok == CONF_INT) + tokenval.v.i = 0; + else + tokenval.v.s = ""; } - return(conf_data[parm].v.size); } -off_t -getconf_am64( - confparm_t parm) +static void +unget_conftoken(void) { - if (conf_data[parm].type != CONFTYPE_AM64) { - error("getconf_am64: parm is not a CONFTYPE_AM64"); - /*NOTREACHED*/ - } - return(conf_data[parm].v.am64); + assert(!token_pushed); + token_pushed = 1; + pushed_tok = tok; + tok = CONF_UNKNOWN; } -double -getconf_real( - confparm_t parm) +static int +conftoken_getc(void) { - if (conf_data[parm].type != CONFTYPE_REAL) { - error("getconf_real: parm is not a CONFTYPE_REAL"); - /*NOTREACHED*/ - } - return(conf_data[parm].v.r); + if(current_line == NULL) + return getc(current_file); + if(*current_char == '\0') + return -1; + return(*current_char++); } -char * -getconf_str( - confparm_t parm) +static int +conftoken_ungetc( + int c) { - if (conf_data[parm].type != CONFTYPE_STRING && - conf_data[parm].type != CONFTYPE_IDENT) { - error("getconf_str: parm is not a CONFTYPE_STRING|CONFTYPE_IDENT: %d", parm); - /*NOTREACHED*/ + if(current_line == NULL) + return ungetc(c, current_file); + else if(current_char > current_line) { + if(c == -1) + return c; + current_char--; + if(*current_char != c) { + error(_("*current_char != c : %c %c"), *current_char, c); + /* NOTREACHED */ + } + } else { + error(_("current_char == current_line")); + /* NOTREACHED */ } - return(conf_data[parm].v.s); + return c; } -int -getconf_taperalgo( - confparm_t parm) -{ - if (conf_data[parm].type != CONFTYPE_TAPERALGO) { - error("getconf_taperalgo: parm is not a CONFTYPE_TAPERALGO"); - /*NOTREACHED*/ - } - return(conf_data[parm].v.i); -} +/* + * Parser Implementation + */ -int* -getconf_intrange( - confparm_t parm) +static gboolean +read_conffile( + char *filename, + gboolean is_client) { - if (conf_data[parm].type != CONFTYPE_INTRANGE) { - error("getconf_intrange: parm is not a CONFTYPE_INTRANGE"); - /*NOTREACHED*/ + /* Save global locations. */ + FILE *save_file = current_file; + char *save_filename = current_filename; + int save_line_num = current_line_num; + int rc; + + if (is_client) { + keytable = client_keytab; + parsetable = client_var; + } else { + keytable = server_keytab; + parsetable = server_var; + } + current_filename = config_dir_relative(filename); + + if ((current_file = fopen(current_filename, "r")) == NULL) { + /* client conf files are optional, and this fprintf ends up sending this message back + * to the server without proper auth encapsulation, leading to "invalid size: could not + * open .." This is fixed in TRUNK by completely rewriting this module's error-handling + * code. */ + if (!is_client) { + g_fprintf(stderr, _("could not open conf file \"%s\": %s\n"), current_filename, + strerror(errno)); + } + got_parserror = TRUE; + goto finish; } - return(conf_data[parm].v.intrange); -} -holdingdisk_t * -getconf_holdingdisks( - void) -{ - return holdingdisks; -} - -dumptype_t * -lookup_dumptype( - char *str) -{ - dumptype_t *p; - - for(p = dumplist; p != NULL; p = p->next) { - if(strcasecmp(p->name, str) == 0) return p; - } - return NULL; -} - -tapetype_t * -lookup_tapetype( - char *str) -{ - tapetype_t *p; - - for(p = tapelist; p != NULL; p = p->next) { - if(strcasecmp(p->name, str) == 0) return p; - } - return NULL; -} - -holdingdisk_t * -lookup_holdingdisk( - char *str) -{ - holdingdisk_t *p; - - for(p = holdingdisks; p != NULL; p = p->next) { - if(strcasecmp(p->name, str) == 0) return p; - } - return NULL; -} - -interface_t * -lookup_interface( - char *str) -{ -#ifndef __lint - interface_t *p; -#endif - - if (str == NULL) - return interface_list; - -#ifndef __lint - for (p = interface_list; p != NULL; p = p->next) { - if (strcasecmp(p->name, str) == 0) - return p; - } -#endif - return NULL; -} - - -/* -** ------------------------ -** Internal routines -** ------------------------ -*/ - - -static void -init_defaults( - void) -{ - char *s; - - /* defaults for exported variables */ - -#ifdef DEFAULT_CONFIG - s = DEFAULT_CONFIG; -#else - s = "YOUR ORG"; -#endif -#ifdef DEFAULT_CONFIG - s = DEFAULT_CONFIG; -#else - s = ""; -#endif - conf_init_string(&conf_data[CNF_CONF], s); -#ifdef DEFAULT_SERVER - s = DEFAULT_SERVER; -#else - s = ""; -#endif - conf_init_string(&conf_data[CNF_INDEX_SERVER], s); - - -#ifdef DEFAULT_TAPE_SERVER - s = DEFAULT_TAPE_SERVER; -#else -#ifdef DEFAULT_SERVER - s = DEFAULT_SERVER; -#else - s = ""; -#endif -#endif - conf_init_string(&conf_data[CNF_TAPE_SERVER], s); - conf_init_string(&conf_data[CNF_AUTH], "bsd"); - conf_init_string(&conf_data[CNF_SSH_KEYS], ""); - conf_init_string(&conf_data[CNF_AMANDAD_PATH], ""); - conf_init_string(&conf_data[CNF_CLIENT_USERNAME], ""); -#ifdef GNUTAR_LISTED_INCREMENTAL_DIR - conf_init_string(&conf_data[CNF_GNUTAR_LIST_DIR], - GNUTAR_LISTED_INCREMENTAL_DIR); -#else - conf_init_string(&conf_data[CNF_GNUTAR_LIST_DIR], NULL); -#endif - conf_init_string(&conf_data[CNF_AMANDATES], AMANDATES_FILE); - conf_init_string(&conf_data[CNF_KRB5KEYTAB], "/.amanda-v5-keytab"); - conf_init_string(&conf_data[CNF_KRB5PRINCIPAL], "service/amanda"); - - conf_init_string(&conf_data[CNF_ORG], s); - conf_init_string(&conf_data[CNF_MAILTO], "operators"); - conf_init_string(&conf_data[CNF_DUMPUSER], CLIENT_LOGIN); -#ifdef DEFAULT_TAPE_DEVICE - s = DEFAULT_TAPE_DEVICE; -#else - s = NULL; -#endif - conf_init_string(&conf_data[CNF_TAPEDEV], s); -#ifdef DEFAULT_CHANGER_DEVICE - s = DEFAULT_CHANGER_DEVICE; -#else - s = "/dev/null"; -#endif - conf_init_string(&conf_data[CNF_CHNGRDEV], s); - conf_init_string(&conf_data[CNF_CHNGRFILE], "/usr/adm/amanda/changer-status"); -#ifdef DEFAULT_RAW_TAPE_DEVICE - s = DEFAULT_RAW_TAPE_DEVICE; -#else - s = "/dev/rawft0"; -#endif - conf_init_string (&conf_data[CNF_LABELSTR] , ".*"); - conf_init_string (&conf_data[CNF_TAPELIST] , "tapelist"); - conf_init_string (&conf_data[CNF_DISKFILE] , "disklist"); - conf_init_string (&conf_data[CNF_INFOFILE] , "/usr/adm/amanda/curinfo"); - conf_init_string (&conf_data[CNF_LOGDIR] , "/usr/adm/amanda"); - conf_init_string (&conf_data[CNF_INDEXDIR] , "/usr/adm/amanda/index"); - conf_init_ident (&conf_data[CNF_TAPETYPE] , "EXABYTE"); - conf_init_int (&conf_data[CNF_DUMPCYCLE] , 10); - conf_init_int (&conf_data[CNF_RUNSPERCYCLE] , 0); - conf_init_int (&conf_data[CNF_TAPECYCLE] , 15); - conf_init_int (&conf_data[CNF_NETUSAGE] , 300); - conf_init_int (&conf_data[CNF_INPARALLEL] , 10); - conf_init_string (&conf_data[CNF_DUMPORDER] , "ttt"); - conf_init_int (&conf_data[CNF_BUMPPERCENT] , 0); - conf_init_am64 (&conf_data[CNF_BUMPSIZE] , (off_t)10*1024); - conf_init_real (&conf_data[CNF_BUMPMULT] , 1.5); - conf_init_int (&conf_data[CNF_BUMPDAYS] , 2); - conf_init_string (&conf_data[CNF_TPCHANGER] , ""); - conf_init_int (&conf_data[CNF_RUNTAPES] , 1); - conf_init_int (&conf_data[CNF_MAXDUMPS] , 1); - conf_init_int (&conf_data[CNF_ETIMEOUT] , 300); - conf_init_int (&conf_data[CNF_DTIMEOUT] , 1800); - conf_init_int (&conf_data[CNF_CTIMEOUT] , 30); - conf_init_int (&conf_data[CNF_TAPEBUFS] , 20); - conf_init_string (&conf_data[CNF_RAWTAPEDEV] , s); - conf_init_string (&conf_data[CNF_PRINTER] , ""); - conf_init_bool (&conf_data[CNF_AUTOFLUSH] , 0); - conf_init_int (&conf_data[CNF_RESERVE] , 100); - conf_init_am64 (&conf_data[CNF_MAXDUMPSIZE] , (off_t)-1); - conf_init_string (&conf_data[CNF_COLUMNSPEC] , ""); - conf_init_bool (&conf_data[CNF_AMRECOVER_DO_FSF] , 1); - conf_init_string (&conf_data[CNF_AMRECOVER_CHANGER] , ""); - conf_init_bool (&conf_data[CNF_AMRECOVER_CHECK_LABEL], 1); - conf_init_taperalgo(&conf_data[CNF_TAPERALGO] , 0); - conf_init_string (&conf_data[CNF_DISPLAYUNIT] , "k"); - conf_init_string (&conf_data[CNF_KRB5KEYTAB] , "/.amanda-v5-keytab"); - conf_init_string (&conf_data[CNF_KRB5PRINCIPAL] , "service/amanda"); - conf_init_string (&conf_data[CNF_LABEL_NEW_TAPES] , ""); - conf_init_bool (&conf_data[CNF_USETIMESTAMPS] , 0); - conf_init_int (&conf_data[CNF_CONNECT_TRIES] , 3); - conf_init_int (&conf_data[CNF_REP_TRIES] , 5); - conf_init_int (&conf_data[CNF_REQ_TRIES] , 3); - conf_init_int (&conf_data[CNF_DEBUG_AMANDAD] , 0); - conf_init_int (&conf_data[CNF_DEBUG_AMIDXTAPED] , 0); - conf_init_int (&conf_data[CNF_DEBUG_AMINDEXD] , 0); - conf_init_int (&conf_data[CNF_DEBUG_AMRECOVER] , 0); - conf_init_int (&conf_data[CNF_DEBUG_AUTH] , 0); - conf_init_int (&conf_data[CNF_DEBUG_EVENT] , 0); - conf_init_int (&conf_data[CNF_DEBUG_HOLDING] , 0); - conf_init_int (&conf_data[CNF_DEBUG_PROTOCOL] , 0); - conf_init_int (&conf_data[CNF_DEBUG_PLANNER] , 0); - conf_init_int (&conf_data[CNF_DEBUG_DRIVER] , 0); - conf_init_int (&conf_data[CNF_DEBUG_DUMPER] , 0); - conf_init_int (&conf_data[CNF_DEBUG_CHUNKER] , 0); - conf_init_int (&conf_data[CNF_DEBUG_TAPER] , 0); - conf_init_int (&conf_data[CNF_DEBUG_SELFCHECK] , 0); - conf_init_int (&conf_data[CNF_DEBUG_SENDSIZE] , 0); - conf_init_int (&conf_data[CNF_DEBUG_SENDBACKUP] , 0); -#ifdef UDPPORTRANGE - conf_init_intrange (&conf_data[CNF_RESERVED_UDP_PORT] , UDPPORTRANGE); -#else - conf_init_intrange (&conf_data[CNF_RESERVED_UDP_PORT] , 512, 1023); -#endif -#ifdef LOW_TCPPORTRANGE - conf_init_intrange (&conf_data[CNF_RESERVED_TCP_PORT] , LOW_TCPPORTRANGE); -#else - conf_init_intrange (&conf_data[CNF_RESERVED_TCP_PORT] , 512, 1023); -#endif -#ifdef TCPPORTRANGE - conf_init_intrange (&conf_data[CNF_UNRESERVED_TCP_PORT] , TCPPORTRANGE); -#else - conf_init_intrange (&conf_data[CNF_UNRESERVED_TCP_PORT] , 0, 0); -#endif - - /* defaults for internal variables */ - - conf_line_num = got_parserror = 0; - allow_overwrites = 0; - token_pushed = 0; - - while(holdingdisks != NULL) { - holdingdisk_t *hp; - - hp = holdingdisks; - holdingdisks = holdingdisks->next; - amfree(hp); - } - num_holdingdisks = 0; - - /* free any previously declared dump, tape and interface types */ - - while(dumplist != NULL) { - dumptype_t *dp; - - dp = dumplist; - dumplist = dumplist->next; - amfree(dp); - } - while(tapelist != NULL) { - tapetype_t *tp; - - tp = tapelist; - tapelist = tapelist->next; - amfree(tp); - } - while(interface_list != NULL) { - interface_t *ip; - - ip = interface_list; - interface_list = interface_list->next; - amfree(ip); - } - - /* create some predefined dumptypes for backwards compatability */ - init_dumptype_defaults(); - dpcur.name = stralloc("NO-COMPRESS"); - dpcur.seen = -1; - conf_set_compress(&dpcur.value[DUMPTYPE_COMPRESS], COMP_NONE); - save_dumptype(); - - init_dumptype_defaults(); - dpcur.name = stralloc("COMPRESS-FAST"); - dpcur.seen = -1; - conf_set_compress(&dpcur.value[DUMPTYPE_COMPRESS], COMP_FAST); - save_dumptype(); - - init_dumptype_defaults(); - dpcur.name = stralloc("COMPRESS-BEST"); - dpcur.seen = -1; - conf_set_compress(&dpcur.value[DUMPTYPE_COMPRESS], COMP_BEST); - save_dumptype(); - - init_dumptype_defaults(); - dpcur.name = stralloc("COMPRESS-CUST"); - dpcur.seen = -1; - conf_set_compress(&dpcur.value[DUMPTYPE_COMPRESS], COMP_CUST); - save_dumptype(); - - init_dumptype_defaults(); - dpcur.name = stralloc("SRVCOMPRESS"); - dpcur.seen = -1; - conf_set_compress(&dpcur.value[DUMPTYPE_COMPRESS], COMP_SERVER_FAST); - save_dumptype(); - - init_dumptype_defaults(); - dpcur.name = stralloc("BSD-AUTH"); - dpcur.seen = -1; - conf_set_string(&dpcur.value[DUMPTYPE_SECURITY_DRIVER], "BSD"); - save_dumptype(); - - init_dumptype_defaults(); - dpcur.name = stralloc("KRB4-AUTH"); - dpcur.seen = -1; - conf_set_string(&dpcur.value[DUMPTYPE_SECURITY_DRIVER], "KRB4"); - save_dumptype(); - - init_dumptype_defaults(); - dpcur.name = stralloc("NO-RECORD"); - dpcur.seen = -1; - conf_set_bool(&dpcur.value[DUMPTYPE_RECORD], 0); - save_dumptype(); - - init_dumptype_defaults(); - dpcur.name = stralloc("NO-HOLD"); - dpcur.seen = -1; - conf_set_holding(&dpcur.value[DUMPTYPE_HOLDINGDISK], HOLD_NEVER); - save_dumptype(); - - init_dumptype_defaults(); - dpcur.name = stralloc("NO-FULL"); - dpcur.seen = -1; - conf_set_strategy(&dpcur.value[DUMPTYPE_STRATEGY], DS_NOFULL); - save_dumptype(); - conffile_init = 1; -} - -static void -read_conffile_recursively( - char *filename) -{ - /* Save globals used in read_confline(), elsewhere. */ - int save_line_num = conf_line_num; - FILE *save_conf = conf_conf; - char *save_confname = conf_confname; - int rc; - - if (*filename == '/' || config_dir == NULL) { - conf_confname = stralloc(filename); - } else { - conf_confname = stralloc2(config_dir, filename); - } - - if((conf_conf = fopen(conf_confname, "r")) == NULL) { - fprintf(stderr, "could not open conf file \"%s\": %s\n", conf_confname, - strerror(errno)); - amfree(conf_confname); - got_parserror = -1; - return; - } + current_line_num = 0; - conf_line_num = 0; - - /* read_confline() can invoke us recursively via "includefile" */ do { - rc = read_confline(); + /* read_confline() can invoke us recursively via "includefile" */ + rc = read_confline(is_client); } while (rc != 0); - afclose(conf_conf); - - amfree(conf_confname); - /* Restore servers */ - conf_line_num = save_line_num; - conf_conf = save_conf; - conf_confname = save_confname; -} + afclose(current_file); +finish: + amfree(current_filename); -/* ------------------------ */ + /* Restore servers */ + current_line_num = save_line_num; + current_file = save_file; + current_filename = save_filename; + return !got_parserror; +} -static int +static gboolean read_confline( - void) + gboolean is_client) { - t_conf_var *np; + conf_var_t *np; - keytable = server_keytab; - - conf_line_num += 1; + current_line_num += 1; get_conftoken(CONF_ANY); switch(tok) { case CONF_INCLUDEFILE: - { - char *fn; - char *cname; - - get_conftoken(CONF_STRING); - fn = tokenval.v.s; - if (*fn == '/' || config_dir == NULL) { - cname = stralloc(fn); - } else { - cname = stralloc2(config_dir, fn); - } - if ( cname != NULL && (access(cname, R_OK) == 0)) { - read_conffile_recursively(cname); - amfree(cname); - } else { - conf_parserror("cannot open %s: %s\n", fn, strerror(errno)); - } - amfree(cname); - - } + get_conftoken(CONF_STRING); + if (!read_conffile(tokenval.v.s, is_client)) + return 0; break; case CONF_HOLDING: - get_holdingdisk(); + if (is_client) { + handle_invalid_keyword(tokenval.v.s); + } else { + get_holdingdisk(); + } break; case CONF_DEFINE: - get_conftoken(CONF_ANY); - if(tok == CONF_DUMPTYPE) get_dumptype(); - else if(tok == CONF_TAPETYPE) get_tapetype(); - else if(tok == CONF_INTERFACE) get_interface(); - else conf_parserror("DUMPTYPE, INTERFACE or TAPETYPE expected"); + if (is_client) { + handle_invalid_keyword(tokenval.v.s); + } else { + get_conftoken(CONF_ANY); + if(tok == CONF_DUMPTYPE) get_dumptype(); + else if(tok == CONF_TAPETYPE) get_tapetype(); + else if(tok == CONF_INTERFACE) get_interface(); + else conf_parserror(_("DUMPTYPE, INTERFACE or TAPETYPE expected")); + } break; case CONF_NL: /* empty line */ @@ -1569,17 +1460,19 @@ read_confline( case CONF_END: /* end of file */ return 0; + /* if it's not a known punctuation mark, then check the parse table and use the + * read_function we find there. */ default: { - for(np = server_var; np->token != CONF_UNKNOWN; np++) + for(np = parsetable; np->token != CONF_UNKNOWN; np++) if(np->token == tok) break; if(np->token == CONF_UNKNOWN) { - conf_parserror("configuration keyword expected"); + handle_invalid_keyword(tokenval.v.s); } else { np->read_function(np, &conf_data[np->parm]); - if(np->validate) - np->validate(np, &conf_data[np->parm]); + if(np->validate_function) + np->validate_function(np, &conf_data[np->parm]); } } } @@ -1589,28 +1482,133 @@ read_confline( } static void -get_holdingdisk( - void) -{ - char *prefix; - int save_overwrites; +handle_invalid_keyword( + const char * token) +{ + /* Procedure for deprecated keywords: + * 1) At time of deprecation, add to warning_deprecated below. + * Note the date of deprecation. + * 2) After two years, move the keyword to error_deprecated below. + * Note the date of the move. + * 3) After two more years, drop the token entirely. */ + + static const char * warning_deprecated[] = { + "rawtapedev", /* 2007-01-23 */ + "tapebufs", /* 2007-10-15 */ + "netusage", /* historical since 1997-08-11, deprecated 2007-10-23 */ + NULL + }; + static const char * error_deprecated[] = { + NULL + }; + const char ** s; + + for (s = warning_deprecated; *s != NULL; s ++) { + if (strcmp(*s, token) == 0) { + conf_parswarn(_("warning: Keyword %s is deprecated."), + token); + break; + } + } + if (*s == NULL) { + for (s = error_deprecated; *s != NULL; s ++) { + if (strcmp(*s, token) == 0) { + conf_parserror(_("error: Keyword %s is deprecated."), + token); + return; + } + } + } + if (*s == NULL) { + conf_parserror(_("configuration keyword expected")); + } - save_overwrites = allow_overwrites; - allow_overwrites = 1; + for (;;) { + char c = conftoken_getc(); + if (c == '\n' || c == -1) { + conftoken_ungetc(c); + return; + } + } - init_holdingdisk_defaults(); + g_assert_not_reached(); +} + +static void +read_block( + conf_var_t *read_var, + val_t *valarray, + char *errormsg, + int read_brace, + void (*copy_function)(void)) +{ + conf_var_t *np; + int done; + + if(read_brace) { + get_conftoken(CONF_LBRACE); + get_conftoken(CONF_NL); + } + + done = 0; + do { + current_line_num += 1; + get_conftoken(CONF_ANY); + switch(tok) { + case CONF_RBRACE: + done = 1; + break; + case CONF_NL: /* empty line */ + break; + case CONF_END: /* end of file */ + done = 1; + break; + + /* inherit from a "parent" */ + case CONF_IDENT: + case CONF_STRING: + if(copy_function) + copy_function(); + else + conf_parserror(_("ident not expected")); + break; + default: + { + for(np = read_var; np->token != CONF_UNKNOWN; np++) + if(np->token == tok) break; + + if(np->token == CONF_UNKNOWN) + conf_parserror("%s", errormsg); + else { + np->read_function(np, &valarray[np->parm]); + if(np->validate_function) + np->validate_function(np, &valarray[np->parm]); + } + } + } + if(tok != CONF_NL && tok != CONF_END && tok != CONF_RBRACE) + get_conftoken(CONF_NL); + } while(!done); +} + +static void +get_holdingdisk( + void) +{ + int save_overwrites; + + save_overwrites = allow_overwrites; + allow_overwrites = 1; + + init_holdingdisk_defaults(); get_conftoken(CONF_IDENT); hdcur.name = stralloc(tokenval.v.s); - hdcur.seen = conf_line_num; + hdcur.seen = current_line_num; - prefix = vstralloc( "HOLDINGDISK:", hdcur.name, ":", NULL); - read_block(program_options, holding_var, server_keytab, hdcur.value, prefix, - "holding disk parameter expected", 1, NULL); - amfree(prefix); + read_block(holding_var, hdcur.value, + _("holding disk parameter expected"), 1, NULL); get_conftoken(CONF_NL); - - hdcur.disksize = holdingdisk_get_disksize(&hdcur); save_holdingdisk(); allow_overwrites = save_overwrites; @@ -1620,14 +1618,11 @@ static void init_holdingdisk_defaults( void) { - conf_init_string(&hdcur.value[HOLDING_COMMENT] , ""); - conf_init_string(&hdcur.value[HOLDING_DISKDIR] , ""); + conf_init_str(&hdcur.value[HOLDING_COMMENT] , ""); + conf_init_str(&hdcur.value[HOLDING_DISKDIR] , ""); conf_init_am64(&hdcur.value[HOLDING_DISKSIZE] , (off_t)0); /* 1 Gb = 1M counted in 1Kb blocks */ conf_init_am64(&hdcur.value[HOLDING_CHUNKSIZE], (off_t)1024*1024); - - hdcur.up = (void *)0; - hdcur.disksize = 0LL; } static void @@ -1638,13 +1633,14 @@ save_holdingdisk( hp = alloc(sizeof(holdingdisk_t)); *hp = hdcur; - hp->next = holdingdisks; - holdingdisks = hp; - - num_holdingdisks++; + hp->next = holdinglist; + holdinglist = hp; } +/* WARNING: + * This function is called both from this module and from diskfile.c. Modify + * with caution. */ dumptype_t * read_dumptype( char *name, @@ -1655,20 +1651,19 @@ read_dumptype( int save_overwrites; FILE *saved_conf = NULL; char *saved_fname = NULL; - char *prefix; if (from) { - saved_conf = conf_conf; - conf_conf = from; + saved_conf = current_file; + current_file = from; } if (fname) { - saved_fname = conf_confname; - conf_confname = fname; + saved_fname = current_filename; + current_filename = fname; } if (linenum) - conf_line_num = *linenum; + current_line_num = *linenum; save_overwrites = allow_overwrites; allow_overwrites = 1; @@ -1680,14 +1675,13 @@ read_dumptype( get_conftoken(CONF_IDENT); dpcur.name = stralloc(tokenval.v.s); } - dpcur.seen = conf_line_num; - - prefix = vstralloc( "DUMPTYPE:", dpcur.name, ":", NULL); - read_block(program_options, dumptype_var, server_keytab, dpcur.value, - prefix, "dumptype parameter expected", - (name == NULL), *copy_dumptype); - amfree(prefix); - if(!name) + dpcur.seen = current_line_num; + + read_block(dumptype_var, dpcur.value, + _("dumptype parameter expected"), + (name == NULL), copy_dumptype); + + if(!name) /* !name => reading disklist, not conffile */ get_conftoken(CONF_NL); /* XXX - there was a stupidity check in here for skip-incr and @@ -1698,13 +1692,13 @@ read_dumptype( allow_overwrites = save_overwrites; if (linenum) - *linenum = conf_line_num; + *linenum = current_line_num; if (fname) - conf_confname = saved_fname; + current_filename = saved_fname; if (from) - conf_conf = saved_conf; + current_file = saved_conf; return lookup_dumptype(dpcur.name); } @@ -1719,16 +1713,16 @@ static void init_dumptype_defaults(void) { dpcur.name = NULL; - conf_init_string (&dpcur.value[DUMPTYPE_COMMENT] , ""); - conf_init_string (&dpcur.value[DUMPTYPE_PROGRAM] , "DUMP"); - conf_init_string (&dpcur.value[DUMPTYPE_SRVCOMPPROG] , ""); - conf_init_string (&dpcur.value[DUMPTYPE_CLNTCOMPPROG] , ""); - conf_init_string (&dpcur.value[DUMPTYPE_SRV_ENCRYPT] , ""); - conf_init_string (&dpcur.value[DUMPTYPE_CLNT_ENCRYPT] , ""); - conf_init_string (&dpcur.value[DUMPTYPE_AMANDAD_PATH] , "X"); - conf_init_string (&dpcur.value[DUMPTYPE_CLIENT_USERNAME] , "X"); - conf_init_string (&dpcur.value[DUMPTYPE_SSH_KEYS] , "X"); - conf_init_string (&dpcur.value[DUMPTYPE_SECURITY_DRIVER] , "BSD"); + conf_init_str (&dpcur.value[DUMPTYPE_COMMENT] , ""); + conf_init_str (&dpcur.value[DUMPTYPE_PROGRAM] , "DUMP"); + conf_init_str (&dpcur.value[DUMPTYPE_SRVCOMPPROG] , ""); + conf_init_str (&dpcur.value[DUMPTYPE_CLNTCOMPPROG] , ""); + conf_init_str (&dpcur.value[DUMPTYPE_SRV_ENCRYPT] , ""); + conf_init_str (&dpcur.value[DUMPTYPE_CLNT_ENCRYPT] , ""); + conf_init_str (&dpcur.value[DUMPTYPE_AMANDAD_PATH] , "X"); + conf_init_str (&dpcur.value[DUMPTYPE_CLIENT_USERNAME] , "X"); + conf_init_str (&dpcur.value[DUMPTYPE_SSH_KEYS] , "X"); + conf_init_str (&dpcur.value[DUMPTYPE_SECURITY_DRIVER] , "BSD"); conf_init_exinclude(&dpcur.value[DUMPTYPE_EXCLUDE]); conf_init_exinclude(&dpcur.value[DUMPTYPE_INCLUDE]); conf_init_priority (&dpcur.value[DUMPTYPE_PRIORITY] , 1); @@ -1744,12 +1738,12 @@ init_dumptype_defaults(void) conf_init_estimate (&dpcur.value[DUMPTYPE_ESTIMATE] , ES_CLIENT); conf_init_compress (&dpcur.value[DUMPTYPE_COMPRESS] , COMP_FAST); conf_init_encrypt (&dpcur.value[DUMPTYPE_ENCRYPT] , ENCRYPT_NONE); - conf_init_string (&dpcur.value[DUMPTYPE_SRV_DECRYPT_OPT] , "-d"); - conf_init_string (&dpcur.value[DUMPTYPE_CLNT_DECRYPT_OPT] , "-d"); + conf_init_str (&dpcur.value[DUMPTYPE_SRV_DECRYPT_OPT] , "-d"); + conf_init_str (&dpcur.value[DUMPTYPE_CLNT_DECRYPT_OPT] , "-d"); conf_init_rate (&dpcur.value[DUMPTYPE_COMPRATE] , 0.50, 0.50); conf_init_am64 (&dpcur.value[DUMPTYPE_TAPE_SPLITSIZE] , (off_t)0); conf_init_am64 (&dpcur.value[DUMPTYPE_FALLBACK_SPLITSIZE], (off_t)10 * 1024); - conf_init_string (&dpcur.value[DUMPTYPE_SPLIT_DISKBUFFER] , NULL); + conf_init_str (&dpcur.value[DUMPTYPE_SPLIT_DISKBUFFER] , NULL); conf_init_bool (&dpcur.value[DUMPTYPE_RECORD] , 1); conf_init_bool (&dpcur.value[DUMPTYPE_SKIP_INCR] , 0); conf_init_bool (&dpcur.value[DUMPTYPE_SKIP_FULL] , 0); @@ -1767,7 +1761,7 @@ save_dumptype(void) dp = lookup_dumptype(dpcur.name); if(dp != (dumptype_t *)0) { - conf_parserror("dumptype %s already defined on line %d", dp->name, dp->seen); + conf_parserror(_("dumptype %s already defined on line %d"), dp->name, dp->seen); return; } @@ -1795,7 +1789,7 @@ copy_dumptype(void) dt = lookup_dumptype(tokenval.v.s); if(dt == NULL) { - conf_parserror("dumptype parameter expected"); + conf_parserror(_("dumptype parameter expected")); return; } @@ -1811,7 +1805,6 @@ static void get_tapetype(void) { int save_overwrites; - char *prefix; save_overwrites = allow_overwrites; allow_overwrites = 1; @@ -1820,14 +1813,17 @@ get_tapetype(void) get_conftoken(CONF_IDENT); tpcur.name = stralloc(tokenval.v.s); - tpcur.seen = conf_line_num; + tpcur.seen = current_line_num; - prefix = vstralloc( "TAPETYPE:", tpcur.name, ":", NULL); - read_block(program_options, tapetype_var, server_keytab, tpcur.value, - prefix, "tapetype parameter expected", 1, ©_tapetype); - amfree(prefix); + read_block(tapetype_var, tpcur.value, + _("tapetype parameter expected"), 1, copy_tapetype); get_conftoken(CONF_NL); + if (tapetype_get_readblocksize(&tpcur) < + tapetype_get_blocksize(&tpcur)) { + conf_init_size(&tpcur.value[TAPETYPE_READBLOCKSIZE], + tapetype_get_blocksize(&tpcur)); + } save_tapetype(); allow_overwrites = save_overwrites; @@ -1836,12 +1832,12 @@ get_tapetype(void) static void init_tapetype_defaults(void) { - conf_init_string(&tpcur.value[TAPETYPE_COMMENT] , ""); - conf_init_string(&tpcur.value[TAPETYPE_LBL_TEMPL] , ""); + conf_init_str(&tpcur.value[TAPETYPE_COMMENT] , ""); + conf_init_str(&tpcur.value[TAPETYPE_LBL_TEMPL] , ""); conf_init_size (&tpcur.value[TAPETYPE_BLOCKSIZE] , DISK_BLOCK_KB); conf_init_size (&tpcur.value[TAPETYPE_READBLOCKSIZE], MAX_TAPE_BLOCK_KB); - conf_init_am64 (&tpcur.value[TAPETYPE_LENGTH] , (off_t)2000); - conf_init_am64 (&tpcur.value[TAPETYPE_FILEMARK] , (off_t)1); + conf_init_am64 (&tpcur.value[TAPETYPE_LENGTH] , ((off_t)2000 * 1024)); + conf_init_am64 (&tpcur.value[TAPETYPE_FILEMARK] , (off_t)1000); conf_init_int (&tpcur.value[TAPETYPE_SPEED] , 200); conf_init_bool (&tpcur.value[TAPETYPE_FILE_PAD] , 1); } @@ -1855,7 +1851,7 @@ save_tapetype(void) if(tp != (tapetype_t *)0) { amfree(tpcur.name); - conf_parserror("tapetype %s already defined on line %d", tp->name, tp->seen); + conf_parserror(_("tapetype %s already defined on line %d"), tp->name, tp->seen); return; } @@ -1882,7 +1878,7 @@ copy_tapetype(void) tp = lookup_tapetype(tokenval.v.s); if(tp == NULL) { - conf_parserror("tape type parameter expected"); + conf_parserror(_("tape type parameter expected")); return; } @@ -1894,17 +1890,10 @@ copy_tapetype(void) } } -t_conf_var interface_var [] = { - { CONF_COMMENT, CONFTYPE_STRING, read_string, INTER_COMMENT , NULL }, - { CONF_USE , CONFTYPE_INT , read_int , INTER_MAXUSAGE, validate_positive1 }, - { CONF_UNKNOWN, CONFTYPE_INT , NULL , INTER_INTER , NULL } -}; - static void get_interface(void) { int save_overwrites; - char *prefix; save_overwrites = allow_overwrites; allow_overwrites = 1; @@ -1913,12 +1902,10 @@ get_interface(void) get_conftoken(CONF_IDENT); ifcur.name = stralloc(tokenval.v.s); - ifcur.seen = conf_line_num; + ifcur.seen = current_line_num; - prefix = vstralloc( "INTERFACE:", ifcur.name, ":", NULL); - read_block(program_options, interface_var, server_keytab, ifcur.value, - prefix, "interface parameter expected", 1, ©_interface); - amfree(prefix); + read_block(interface_var, ifcur.value, + _("interface parameter expected"), 1, copy_interface); get_conftoken(CONF_NL); save_interface(); @@ -1931,10 +1918,8 @@ get_interface(void) static void init_interface_defaults(void) { - conf_init_string(&ifcur.value[INTER_COMMENT] , ""); - conf_init_int (&ifcur.value[INTER_MAXUSAGE], 300); - - ifcur.curusage = 0; + conf_init_str(&ifcur.value[INTER_COMMENT] , ""); + conf_init_int (&ifcur.value[INTER_MAXUSAGE], 8000); } static void @@ -1945,7 +1930,7 @@ save_interface(void) ip = lookup_interface(ifcur.name); if(ip != (interface_t *)0) { - conf_parserror("interface %s already defined on line %d", ip->name, + conf_parserror(_("interface %s already defined on line %d"), ip->name, ip->seen); return; } @@ -1967,20 +1952,13 @@ save_interface(void) static void copy_interface(void) { -/* - int i; - t_xxx *np; - keytab_t *kt; - - val_t val; -*/ interface_t *ip; int i; ip = lookup_interface(tokenval.v.s); if(ip == NULL) { - conf_parserror("interface parameter expected"); + conf_parserror(_("interface parameter expected")); return; } @@ -1992,82 +1970,92 @@ copy_interface(void) } } +/* Read functions */ + static void -get_comprate( - t_conf_var *np, +read_int( + conf_var_t *np G_GNUC_UNUSED, val_t *val) { - np = np; - get_conftoken(CONF_REAL); - val->v.rate[0] = tokenval.v.r; - val->v.rate[1] = tokenval.v.r; - val->seen = tokenval.seen; - if(tokenval.v.r < 0) { - conf_parserror("full compression rate must be >= 0"); - } - - get_conftoken(CONF_ANY); - switch(tok) { - case CONF_NL: - return; - - case CONF_END: - return; - - case CONF_COMMA: - break; + ckseen(&val->seen); + val_t__int(val) = get_int(); +} - default: - unget_conftoken(); - } +static void +read_am64( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) +{ + ckseen(&val->seen); + val_t__am64(val) = get_am64_t(); +} +static void +read_real( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) +{ + ckseen(&val->seen); get_conftoken(CONF_REAL); - val->v.rate[1] = tokenval.v.r; - if(tokenval.v.r < 0) { - conf_parserror("incremental compression rate must be >= 0"); - } + val_t__real(val) = tokenval.v.r; } static void -read_intrange( - t_conf_var *np, +read_str( + conf_var_t *np G_GNUC_UNUSED, val_t *val) { - np = np; - get_conftoken(CONF_INT); - val->v.intrange[0] = tokenval.v.i; - val->v.intrange[1] = tokenval.v.i; - val->seen = tokenval.seen; - - get_conftoken(CONF_ANY); - switch(tok) { - case CONF_NL: - return; + ckseen(&val->seen); + get_conftoken(CONF_STRING); + val->v.s = newstralloc(val->v.s, tokenval.v.s); +} - case CONF_END: - return; +static void +read_ident( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) +{ + ckseen(&val->seen); + get_conftoken(CONF_IDENT); + val->v.s = newstralloc(val->v.s, tokenval.v.s); +} - case CONF_COMMA: - break; +static void +read_time( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) +{ + ckseen(&val->seen); + val_t__time(val) = get_time(); +} - default: - unget_conftoken(); - } +static void +read_size( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) +{ + ckseen(&val->seen); + val_t__size(val) = get_size(); +} - get_conftoken(CONF_INT); - val->v.intrange[1] = tokenval.v.i; +static void +read_bool( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) +{ + ckseen(&val->seen); + val_t__boolean(val) = get_bool(); } static void -get_compress( - t_conf_var *np, +read_compress( + conf_var_t *np G_GNUC_UNUSED, val_t *val) { int serv, clie, none, fast, best, custom; int done; comp_t comp; - np = np; ckseen(&val->seen); serv = clie = none = fast = best = custom = 0; @@ -2110,21 +2098,20 @@ get_compress( } if((int)comp == -1) { - conf_parserror("NONE, CLIENT FAST, CLIENT BEST, CLIENT CUSTOM, SERVER FAST, SERVER BEST or SERVER CUSTOM expected"); + conf_parserror(_("NONE, CLIENT FAST, CLIENT BEST, CLIENT CUSTOM, SERVER FAST, SERVER BEST or SERVER CUSTOM expected")); comp = COMP_NONE; } - val->v.i = (int)comp; + val_t__compress(val) = (int)comp; } static void -get_encrypt( - t_conf_var *np, +read_encrypt( + conf_var_t *np G_GNUC_UNUSED, val_t *val) { encrypt_t encrypt; - np = np; ckseen(&val->seen); get_conftoken(CONF_ANY); @@ -2142,22 +2129,21 @@ get_encrypt( break; default: - conf_parserror("NONE, CLIENT or SERVER expected"); + conf_parserror(_("NONE, CLIENT or SERVER expected")); encrypt = ENCRYPT_NONE; break; } - val->v.i = (int)encrypt; + val_t__encrypt(val) = (int)encrypt; } static void -get_holding( - t_conf_var *np, +read_holding( + conf_var_t *np G_GNUC_UNUSED, val_t *val) { dump_holdingdisk_t holding; - np = np; ckseen(&val->seen); get_conftoken(CONF_ANY); @@ -2182,65 +2168,47 @@ get_holding( else if (holding == 1 || holding == 2) holding = HOLD_AUTO; else - conf_parserror("NEVER, AUTO or REQUIRED expected"); + conf_parserror(_("NEVER, AUTO or REQUIRED expected")); break; } - val->v.i = (int)holding; -} - -static void -get_taperalgo( - t_conf_var *np, - val_t *val) -{ - np = np; - ckseen(&val->seen); - - get_conftoken(CONF_ANY); - switch(tok) { - case CONF_FIRST: val->v.i = ALGO_FIRST; break; - case CONF_FIRSTFIT: val->v.i = ALGO_FIRSTFIT; break; - case CONF_LARGEST: val->v.i = ALGO_LARGEST; break; - case CONF_LARGESTFIT: val->v.i = ALGO_LARGESTFIT; break; - case CONF_SMALLEST: val->v.i = ALGO_SMALLEST; break; - case CONF_LAST: val->v.i = ALGO_LAST; break; - default: - conf_parserror("FIRST, FIRSTFIT, LARGEST, LARGESTFIT, SMALLEST or LAST expected"); - } + val_t__holding(val) = (int)holding; } static void -get_priority( - t_conf_var *np, +read_estimate( + conf_var_t *np G_GNUC_UNUSED, val_t *val) { - int pri; + int estime; - np = np; ckseen(&val->seen); get_conftoken(CONF_ANY); switch(tok) { - case CONF_LOW: pri = 0; break; - case CONF_MEDIUM: pri = 1; break; - case CONF_HIGH: pri = 2; break; - case CONF_INT: pri = tokenval.v.i; break; + case CONF_CLIENT: + estime = ES_CLIENT; + break; + case CONF_SERVER: + estime = ES_SERVER; + break; + case CONF_CALCSIZE: + estime = ES_CALCSIZE; + break; default: - conf_parserror("LOW, MEDIUM, HIGH or integer expected"); - pri = 0; + conf_parserror(_("CLIENT, SERVER or CALCSIZE expected")); + estime = ES_CLIENT; } - val->v.i = pri; + val_t__estimate(val) = estime; } static void -get_strategy( - t_conf_var *np, +read_strategy( + conf_var_t *np G_GNUC_UNUSED, val_t *val) { int strat; - np = np; ckseen(&val->seen); get_conftoken(CONF_ANY); @@ -2264,60 +2232,108 @@ get_strategy( strat = DS_INCRONLY; break; default: - conf_parserror("STANDARD or NOFULL expected"); + conf_parserror(_("dump strategy expected")); strat = DS_STANDARD; } - val->v.i = strat; + val_t__strategy(val) = strat; } static void -get_estimate( - t_conf_var *np, +read_taperalgo( + conf_var_t *np G_GNUC_UNUSED, val_t *val) { - int estime; + ckseen(&val->seen); + + get_conftoken(CONF_ANY); + switch(tok) { + case CONF_FIRST: val_t__taperalgo(val) = ALGO_FIRST; break; + case CONF_FIRSTFIT: val_t__taperalgo(val) = ALGO_FIRSTFIT; break; + case CONF_LARGEST: val_t__taperalgo(val) = ALGO_LARGEST; break; + case CONF_LARGESTFIT: val_t__taperalgo(val) = ALGO_LARGESTFIT; break; + case CONF_SMALLEST: val_t__taperalgo(val) = ALGO_SMALLEST; break; + case CONF_LAST: val_t__taperalgo(val) = ALGO_LAST; break; + default: + conf_parserror(_("FIRST, FIRSTFIT, LARGEST, LARGESTFIT, SMALLEST or LAST expected")); + } +} + +static void +read_priority( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) +{ + int pri; - np = np; ckseen(&val->seen); get_conftoken(CONF_ANY); switch(tok) { - case CONF_CLIENT: - estime = ES_CLIENT; - break; - case CONF_SERVER: - estime = ES_SERVER; - break; - case CONF_CALCSIZE: - estime = ES_CALCSIZE; + case CONF_LOW: pri = 0; break; + case CONF_MEDIUM: pri = 1; break; + case CONF_HIGH: pri = 2; break; + case CONF_INT: pri = tokenval.v.i; break; + default: + conf_parserror(_("LOW, MEDIUM, HIGH or integer expected")); + pri = 0; + } + val_t__priority(val) = pri; +} + +static void +read_rate( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) +{ + get_conftoken(CONF_REAL); + val_t__rate(val)[0] = tokenval.v.r; + val_t__rate(val)[1] = tokenval.v.r; + val->seen = tokenval.seen; + if(tokenval.v.r < 0) { + conf_parserror(_("full compression rate must be >= 0")); + } + + get_conftoken(CONF_ANY); + switch(tok) { + case CONF_NL: + return; + + case CONF_END: + return; + + case CONF_COMMA: break; + default: - conf_parserror("CLIENT, SERVER or CALCSIZE expected"); - estime = ES_CLIENT; + unget_conftoken(); + } + + get_conftoken(CONF_REAL); + val_t__rate(val)[1] = tokenval.v.r; + if(tokenval.v.r < 0) { + conf_parserror(_("incremental compression rate must be >= 0")); } - val->v.i = estime; } static void -get_exclude( - t_conf_var *np, +read_exinclude( + conf_var_t *np G_GNUC_UNUSED, val_t *val) { int file, got_one = 0; sl_t *exclude; int optional = 0; - np = np; get_conftoken(CONF_ANY); if(tok == CONF_LIST) { file = 0; get_conftoken(CONF_ANY); - exclude = val->v.exinclude.sl_list; + exclude = val_t__exinclude(val).sl_list; } else { file = 1; if(tok == CONF_EFILE) get_conftoken(CONF_ANY); - exclude = val->v.exinclude.sl_file; + exclude = val_t__exinclude(val).sl_file; } ckseen(&val->seen); @@ -2344,1765 +2360,1865 @@ get_exclude( if(got_one == 0) { free_sl(exclude); exclude = NULL; } if (file == 0) - val->v.exinclude.sl_list = exclude; + val_t__exinclude(val).sl_list = exclude; else - val->v.exinclude.sl_file = exclude; - val->v.exinclude.optional = optional; + val_t__exinclude(val).sl_file = exclude; + val_t__exinclude(val).optional = optional; } -/* -static void get_include(np, val) - t_conf_var *np; - val_t *val; +static void +read_intrange( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) { - int list, got_one = 0; - sl_t *include; - int optional = 0; - int append = 0; + get_conftoken(CONF_INT); + val_t__intrange(val)[0] = tokenval.v.i; + val_t__intrange(val)[1] = tokenval.v.i; + val->seen = tokenval.seen; get_conftoken(CONF_ANY); - if(tok == CONF_LIST) { - list = 1; - include = dpcur.value[DUMPTYPE_INCLUDE_LIST].v.sl; - ckseen(&dpcur.value[DUMPTYPE_INCLUDE_LIST].seen); - get_conftoken(CONF_ANY); - } - else { - list = 0; - include = dpcur.value[DUMPTYPE_INCLUDE_FILE].v.sl; - ckseen(&dpcur.value[DUMPTYPE_INCLUDE_FILE].seen); - if(tok == CONF_EFILE) get_conftoken(CONF_ANY); - } + switch(tok) { + case CONF_NL: + return; - if(tok == CONF_OPTIONAL) { - get_conftoken(CONF_ANY); - optional = 1; - } - - if(tok == CONF_APPEND) { - get_conftoken(CONF_ANY); - append = 1; - } - else { - free_sl(include); - include = NULL; - append = 0; - } - - while(tok == CONF_STRING) { - include = append_sl(include, tokenval.v.s); - got_one = 1; - get_conftoken(CONF_ANY); - } - unget_conftoken(); + case CONF_END: + return; - if(got_one == 0) { free_sl(include); include = NULL; } + case CONF_COMMA: + break; - if(list == 0) - dpcur.value[DUMPTYPE_INCLUDE_FILE].v.sl = include; - else { - dpcur.value[DUMPTYPE_INCLUDE_LIST].v.sl = include; - if(!append || optional) - dpcur.value[DUMPTYPE_INCLUDE_OPTIONAL].v.i = optional; + default: + unget_conftoken(); } -} -*/ - -/* ------------------------ */ -int -ColumnDataCount(void ) -{ - return (int)(SIZEOF(ColumnData) / SIZEOF(ColumnData[0])); + get_conftoken(CONF_INT); + val_t__intrange(val)[1] = tokenval.v.i; } -/* conversion from string to table index - */ -int -StringToColumn( - char *s) +static void +read_property( + conf_var_t *np G_GNUC_UNUSED, + val_t *val) { - int cn; + char *key, *value; + get_conftoken(CONF_STRING); + key = strdup(tokenval.v.s); + get_conftoken(CONF_STRING); + value = strdup(tokenval.v.s); - for (cn=0; ColumnData[cn].Name != NULL; cn++) { - if (strcasecmp(s, ColumnData[cn].Name) == 0) { - break; - } - } - return cn; + g_hash_table_insert(val_t__proplist(val), key, value); } -char -LastChar( - char *s) -{ - return s[strlen(s)-1]; -} +/* get_* functions */ -int -SetColumDataFromString( - ColumnInfo* ci, - char *s, - char **errstr) +static time_t +get_time(void) { -#ifdef TEST - char *myname= "SetColumDataFromString"; -#endif - ci = ci; - - /* Convert from a Columspec string to our internal format - * of columspec. The purpose is to provide this string - * as configuration paramter in the amanda.conf file or - * (maybe) as environment variable. - * - * This text should go as comment into the sample amanda.conf - * - * The format for such a ColumnSpec string s is a ',' seperated - * list of triples. Each triple consists of - * -the name of the column (as in ColumnData.Name) - * -prefix before the column - * -the width of the column - * if set to -1 it will be recalculated - * to the maximum length of a line to print. - * Example: - * "Disk=1:17,HostName=1:10,OutKB=1:7" - * or - * "Disk=1:-1,HostName=1:10,OutKB=1:7" - * - * You need only specify those colums that should be changed from - * the default. If nothing is specified in the configfile, the - * above compiled in values will be in effect, resulting in an - * output as it was all the time. - * ElB, 1999-02-24. - */ - - while (s && *s) { - int Space, Width; - int cn; - char *eon= strchr(s, '='); + time_t hhmm; - if (eon == NULL) { - *errstr = stralloc2("invalid columnspec: ", s); -#ifdef TEST - fprintf(stderr, "%s: %s\n", myname, *errstr); + get_conftoken(CONF_ANY); + switch(tok) { + case CONF_INT: +#if SIZEOF_TIME_T < SIZEOF_INT + if ((off_t)tokenval.v.i >= (off_t)TIME_MAX) + conf_parserror(_("value too large")); #endif - return -1; - } - *eon= '\0'; - cn=StringToColumn(s); - if (ColumnData[cn].Name == NULL) { - *errstr = stralloc2("invalid column name: ", s); -#ifdef TEST - fprintf(stderr, "%s: %s\n", myname, *errstr); + hhmm = (time_t)tokenval.v.i; + break; + + case CONF_SIZE: +#if SIZEOF_TIME_T < SIZEOF_SSIZE_T + if ((off_t)tokenval.v.size >= (off_t)TIME_MAX) + conf_parserror(_("value too large")); #endif - return -1; - } - if (sscanf(eon+1, "%d:%d", &Space, &Width) != 2) { - *errstr = stralloc2("invalid format: ", eon + 1); -#ifdef TEST - fprintf(stderr, "%s: %s\n", myname, *errstr); + hhmm = (time_t)tokenval.v.size; + break; + + case CONF_AM64: +#if SIZEOF_TIME_T < SIZEOF_LONG_LONG + if ((off_t)tokenval.v.am64 >= (off_t)TIME_MAX) + conf_parserror(_("value too large")); #endif - return -1; - } - ColumnData[cn].Width= Width; - ColumnData[cn].PrefixSpace = Space; - if (LastChar(ColumnData[cn].Format) == 's') { - if (Width < 0) - ColumnData[cn].MaxWidth= 1; - else - if (Width > ColumnData[cn].Precision) - ColumnData[cn].Precision= Width; - } - else if (Width < ColumnData[cn].Precision) - ColumnData[cn].Precision = Width; - s= strchr(eon+1, ','); - if (s != NULL) - s++; - } - return 0; -} + hhmm = (time_t)tokenval.v.am64; + break; + case CONF_AMINFINITY: + hhmm = TIME_MAX; + break; -long int -getconf_unit_divisor(void) -{ - return unit_divisor; + default: + conf_parserror(_("a time is expected")); + hhmm = 0; + break; + } + return hhmm; } -/* ------------------------ */ - - -void -dump_configuration( - char *filename) +static int +get_int(void) { - tapetype_t *tp; - dumptype_t *dp; - interface_t *ip; - holdingdisk_t *hp; - int i; - t_conf_var *np; - keytab_t *kt; - char *prefix; - char kt_prefix[100]; - - printf("AMANDA CONFIGURATION FROM FILE \"%s\":\n\n", filename); - - for(np=server_var; np->token != CONF_UNKNOWN; np++) { - for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) - if (np->token == kt->token) break; - - if(kt->token == CONF_UNKNOWN) - error("server bad token"); - - if (kt->token != CONF_IDENT) - snprintf(kt_prefix, 100, "%-21s ", kt->keyword); - printf("%s\n", - conf_print(&conf_data[np->parm], 1, kt_prefix)); - } + int val; + keytab_t *save_kt; - for(hp = holdingdisks; hp != NULL; hp = hp->next) { - printf("\nHOLDINGDISK %s {\n", hp->name); - for(i=0; i < HOLDING_HOLDING; i++) { - for(np=holding_var; np->token != CONF_UNKNOWN; np++) { - if(np->parm == i) - break; - } - if(np->token == CONF_UNKNOWN) - error("holding bad value"); + save_kt = keytable; + keytable = numb_keytable; - for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) { - if(kt->token == np->token) - break; - } - if(kt->token == CONF_UNKNOWN) - error("holding bad token"); + get_conftoken(CONF_ANY); + switch(tok) { + case CONF_INT: + val = tokenval.v.i; + break; - snprintf(kt_prefix, 100, " %-9s ", kt->keyword); - printf("%s\n", conf_print(&hp->value[i], 1, kt_prefix)); - } - printf("}\n"); - } + case CONF_SIZE: +#if SIZEOF_INT < SIZEOF_SSIZE_T + if ((off_t)tokenval.v.size > (off_t)INT_MAX) + conf_parserror(_("value too large")); + if ((off_t)tokenval.v.size < (off_t)INT_MIN) + conf_parserror(_("value too small")); +#endif + val = (int)tokenval.v.size; + break; - for(tp = tapelist; tp != NULL; tp = tp->next) { - printf("\nDEFINE TAPETYPE %s {\n", tp->name); - for(i=0; i < TAPETYPE_TAPETYPE; i++) { - for(np=tapetype_var; np->token != CONF_UNKNOWN; np++) - if(np->parm == i) break; - if(np->token == CONF_UNKNOWN) - error("tapetype bad value"); + case CONF_AM64: +#if SIZEOF_INT < SIZEOF_LONG_LONG + if (tokenval.v.am64 > (off_t)INT_MAX) + conf_parserror(_("value too large")); + if (tokenval.v.am64 < (off_t)INT_MIN) + conf_parserror(_("value too small")); +#endif + val = (int)tokenval.v.am64; + break; - for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) - if(kt->token == np->token) break; - if(kt->token == CONF_UNKNOWN) - error("tapetype bad token"); + case CONF_AMINFINITY: + val = INT_MAX; + break; - snprintf(kt_prefix, 100, " %-9s ", kt->keyword); - printf("%s\n", conf_print(&tp->value[i], 1, kt_prefix)); - } - printf("}\n"); + default: + conf_parserror(_("an integer is expected")); + val = 0; + break; } - for(dp = dumplist; dp != NULL; dp = dp->next) { - if (strncmp(dp->name, "custom(", 7) != 0) { - if(dp->seen == -1) - prefix = "#"; - else - prefix = ""; - printf("\n%sDEFINE DUMPTYPE %s {\n", prefix, dp->name); - for(i=0; i < DUMPTYPE_DUMPTYPE; i++) { - for(np=dumptype_var; np->token != CONF_UNKNOWN; np++) - if(np->parm == i) break; - if(np->token == CONF_UNKNOWN) - error("dumptype bad value"); - - for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) - if(kt->token == np->token) break; - if(kt->token == CONF_UNKNOWN) - error("dumptype bad token"); + /* get multiplier, if any */ + get_conftoken(CONF_ANY); + switch(tok) { + case CONF_NL: /* multiply by one */ + case CONF_END: + case CONF_MULT1: + case CONF_MULT1K: + break; - snprintf(kt_prefix, 100, "%s %-19s ", prefix,kt->keyword); - printf("%s\n", conf_print(&dp->value[i], 1, kt_prefix)); - } - printf("%s}\n", prefix); - } - } + case CONF_MULT7: + if (val > (INT_MAX / 7)) + conf_parserror(_("value too large")); + if (val < (INT_MIN / 7)) + conf_parserror(_("value too small")); + val *= 7; + break; - for(ip = interface_list; ip != NULL; ip = ip->next) { - if(strcmp(ip->name,"default") == 0) - prefix = "#"; - else - prefix = ""; - printf("\n%sDEFINE INTERFACE %s {\n", prefix, ip->name); - for(i=0; i < INTER_INTER; i++) { - for(np=interface_var; np->token != CONF_UNKNOWN; np++) - if(np->parm == i) break; - if(np->token == CONF_UNKNOWN) - error("interface bad value"); + case CONF_MULT1M: + if (val > (INT_MAX / 1024)) + conf_parserror(_("value too large")); + if (val < (INT_MIN / 1024)) + conf_parserror(_("value too small")); + val *= 1024; + break; - for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) - if(kt->token == np->token) break; - if(kt->token == CONF_UNKNOWN) - error("interface bad token"); + case CONF_MULT1G: + if (val > (INT_MAX / (1024 * 1024))) + conf_parserror(_("value too large")); + if (val < (INT_MIN / (1024 * 1024))) + conf_parserror(_("value too small")); + val *= 1024 * 1024; + break; - snprintf(kt_prefix, 100, "%s %-19s ", prefix, kt->keyword); - printf("%s\n", conf_print(&ip->value[i], 1, kt_prefix)); - } - printf("%s}\n",prefix); + default: /* it was not a multiplier */ + unget_conftoken(); + break; } + keytable = save_kt; + return val; } -char * -generic_get_security_conf( - char *string, - void *arg) +static ssize_t +get_size(void) { - arg = arg; - if(!string || !*string) - return(NULL); + ssize_t val; + keytab_t *save_kt; - if(strcmp(string, "krb5principal")==0) { - return(getconf_str(CNF_KRB5PRINCIPAL)); - } else if(strcmp(string, "krb5keytab")==0) { - return(getconf_str(CNF_KRB5KEYTAB)); - } - return(NULL); -} + save_kt = keytable; + keytable = numb_keytable; -char * -get_token_name( - tok_t token) -{ - keytab_t *kt; + get_conftoken(CONF_ANY); - if (my_keytab == NULL) { - error("my_keytab == NULL"); - /*NOTREACHED*/ - } + switch(tok) { + case CONF_SIZE: + val = tokenval.v.size; + break; - for(kt = my_keytab; kt->token != CONF_UNKNOWN; kt++) - if(kt->token == token) break; + case CONF_INT: +#if SIZEOF_SIZE_T < SIZEOF_INT + if ((off_t)tokenval.v.i > (off_t)SSIZE_MAX) + conf_parserror(_("value too large")); + if ((off_t)tokenval.v.i < (off_t)SSIZE_MIN) + conf_parserror(_("value too small")); +#endif + val = (ssize_t)tokenval.v.i; + break; - if(kt->token == CONF_UNKNOWN) - return(""); - return(kt->keyword); -} - -void -parse_conf( - int parse_argc, - char **parse_argv, - int *new_argc, - char ***new_argv) -{ - int i; - char **my_argv; - char *myarg, *value; - command_option_t *program_option; - - program_options = alloc((size_t)(parse_argc+1) * SIZEOF(*program_options)); - program_options_size = parse_argc+1; - program_option = program_options; - program_option->name = NULL; - - my_argv = alloc((size_t)parse_argc * SIZEOF(char *)); - *new_argv = my_argv; - *new_argc = 0; - i=0; - while(i 2) - myarg = &parse_argv[i][2]; - else { - i++; - if(i >= parse_argc) - error("expect something after -o"); - myarg = parse_argv[i]; - } - value = index(myarg,'='); - if (value == NULL) { - conf_parserror("Must specify a value for %s.\n", myarg); - } else { - *value = '\0'; - value++; - program_option->used = 0; - program_option->name = stralloc(myarg); - program_option->value = stralloc(value); - program_option++; - program_option->name = NULL; - } - } - else { - my_argv[*new_argc] = stralloc(parse_argv[i]); - *new_argc += 1; - } - i++; - } -} - -char ** -get_config_options( - int first) -{ - char **config_options; - char **config_option; - command_option_t *command_options; - - config_options = alloc((first+program_options_size+1)*SIZEOF(char *)); - for(command_options = program_options, - config_option = config_options + first; - command_options->name != NULL; command_options++) { - *config_option = vstralloc("-o", command_options->name, "=", - command_options->value, NULL); - config_option++; - } - *config_option = NULL; - return(config_options); -} + case CONF_AM64: +#if SIZEOF_SIZE_T < SIZEOF_LONG_LONG + if (tokenval.v.am64 > (off_t)SSIZE_MAX) + conf_parserror(_("value too large")); + if (tokenval.v.am64 < (off_t)SSIZE_MIN) + conf_parserror(_("value too small")); +#endif + val = (ssize_t)tokenval.v.am64; + break; -void -report_bad_conf_arg(void) -{ - command_option_t *command_option; + case CONF_AMINFINITY: + val = (ssize_t)SSIZE_MAX; + break; - for(command_option = program_options; command_option->name != NULL; - command_option++) { - if(command_option->used == 0) { - fprintf(stderr,"argument -o%s=%s not used\n", - command_option->name, command_option->value); - } + default: + conf_parserror(_("an integer is expected")); + val = 0; + break; } -} -void -free_server_config(void) -{ - holdingdisk_t *hp, *hpnext; - dumptype_t *dp, *dpnext; - tapetype_t *tp, *tpnext; - interface_t *ip, *ipnext; - command_option_t *server_option; - int i; + /* get multiplier, if any */ + get_conftoken(CONF_ANY); - for(hp=holdingdisks; hp != NULL; hp = hpnext) { - amfree(hp->name); - for(i=0; ivalue[i]); - } - hpnext = hp->next; - amfree(hp); - } + switch(tok) { + case CONF_NL: /* multiply by one */ + case CONF_MULT1: + case CONF_MULT1K: + break; - for(dp=dumplist; dp != NULL; dp = dpnext) { - amfree(dp->name); - for(i=0; ivalue[i]); - } - dpnext = dp->next; - amfree(dp); - } + case CONF_MULT7: + if (val > (ssize_t)(SSIZE_MAX / 7)) + conf_parserror(_("value too large")); + if (val < (ssize_t)(SSIZE_MIN / 7)) + conf_parserror(_("value too small")); + val *= (ssize_t)7; + break; - for(tp=tapelist; tp != NULL; tp = tpnext) { - amfree(tp->name); - for(i=0; ivalue[i]); - } - tpnext = tp->next; - amfree(tp); - } + case CONF_MULT1M: + if (val > (ssize_t)(SSIZE_MAX / (ssize_t)1024)) + conf_parserror(_("value too large")); + if (val < (ssize_t)(SSIZE_MIN / (ssize_t)1024)) + conf_parserror(_("value too small")); + val *= (ssize_t)1024; + break; - for(ip=interface_list; ip != NULL; ip = ipnext) { - amfree(ip->name); - for(i=0; ivalue[i]); - } - ipnext = ip->next; - amfree(ip); - } + case CONF_MULT1G: + if (val > (ssize_t)(SSIZE_MAX / (1024 * 1024))) + conf_parserror(_("value too large")); + if (val < (ssize_t)(SSIZE_MIN / (1024 * 1024))) + conf_parserror(_("value too small")); + val *= (ssize_t)(1024 * 1024); + break; - if(program_options) { - for(server_option = program_options; server_option->name != NULL; - server_option++) { - amfree(server_option->name); - amfree(server_option->value); - } - amfree(program_options); + default: /* it was not a multiplier */ + unget_conftoken(); + break; } - for(i=0; i AM64_MAX/7 || val < AM64_MIN/7) + conf_parserror(_("value too large")); + val *= 7; + break; -static void -read_client_conffile_recursively( - char * filename) -{ - /* Save globals used in read_client_confline(), elsewhere. */ - int save_line_num = conf_line_num; - FILE *save_conf = conf_conf; - char *save_confname = conf_confname; - int rc; + case CONF_MULT1M: + if (val > AM64_MAX/1024 || val < AM64_MIN/1024) + conf_parserror(_("value too large")); + val *= 1024; + break; - if (*filename == '/' || cln_config_dir == NULL) { - conf_confname = stralloc(filename); - } else { - conf_confname = stralloc2(cln_config_dir, filename); - } + case CONF_MULT1G: + if (val > AM64_MAX/(1024*1024) || val < AM64_MIN/(1024*1024)) + conf_parserror(_("value too large")); + val *= 1024*1024; + break; - if((conf_conf = fopen(conf_confname, "r")) == NULL) { - dbprintf(("Could not open conf file \"%s\": %s\n", conf_confname, - strerror(errno))); - amfree(conf_confname); - got_parserror = -1; - return; + default: /* it was not a multiplier */ + unget_conftoken(); + break; } - dbprintf(("Reading conf file \"%s\".\n", conf_confname)); - - conf_line_num = 0; - /* read_client_confline() can invoke us recursively via "includefile" */ - do { - rc = read_client_confline(); - } while (rc != 0); - afclose(conf_conf); - - amfree(conf_confname); + keytable = save_kt; - /* Restore globals */ - conf_line_num = save_line_num; - conf_conf = save_conf; - conf_confname = save_confname; + return val; } - -/* ------------------------ */ - - static int -read_client_confline(void) +get_bool(void) { - t_conf_var *np; + int val; + keytab_t *save_kt; - keytable = client_keytab; + save_kt = keytable; + keytable = bool_keytable; - conf_line_num += 1; get_conftoken(CONF_ANY); + switch(tok) { - case CONF_INCLUDEFILE: - { - char *fn; + case CONF_INT: + if (tokenval.v.i != 0) + val = 1; + else + val = 0; + break; - get_conftoken(CONF_STRING); - fn = tokenval.v.s; - read_client_conffile_recursively(fn); - } + case CONF_SIZE: + if (tokenval.v.size != (size_t)0) + val = 1; + else + val = 0; break; - case CONF_NL: /* empty line */ + case CONF_AM64: + if (tokenval.v.am64 != (off_t)0) + val = 1; + else + val = 0; break; - case CONF_END: /* end of file */ - return 0; + case CONF_ATRUE: + val = 1; + break; - default: - { - for(np = client_var; np->token != CONF_UNKNOWN; np++) - if(np->token == tok) break; + case CONF_AFALSE: + val = 0; + break; - if(np->token == CONF_UNKNOWN) { - conf_parserror("configuration keyword expected"); - } else { - np->read_function(np, &conf_data[np->parm]); - if(np->validate) - np->validate(np, &conf_data[np->parm]); - } - } + case CONF_NL: + unget_conftoken(); + val = 2; /* no argument - most likely TRUE */ + break; + default: + unget_conftoken(); + val = 3; /* a bad argument - most likely TRUE */ + conf_parserror(_("YES, NO, TRUE, FALSE, ON, OFF expected")); + break; } - if(tok != CONF_NL) - get_conftoken(CONF_NL); - return 1; + + keytable = save_kt; + return val; } - -char * -generic_client_get_security_conf( - char * string, - void * arg) +void +ckseen( + int *seen) { - (void)arg; /* Quiet unused parameter warning */ - - if(!string || !*string) - return(NULL); - - if(strcmp(string, "conf")==0) { - return(getconf_str(CNF_CONF)); - } else if(strcmp(string, "index_server")==0) { - return(getconf_str(CNF_INDEX_SERVER)); - } else if(strcmp(string, "tape_server")==0) { - return(getconf_str(CNF_TAPE_SERVER)); - } else if(strcmp(string, "tapedev")==0) { - return(getconf_str(CNF_TAPEDEV)); - } else if(strcmp(string, "auth")==0) { - return(getconf_str(CNF_AUTH)); - } else if(strcmp(string, "ssh_keys")==0) { - return(getconf_str(CNF_SSH_KEYS)); - } else if(strcmp(string, "amandad_path")==0) { - return(getconf_str(CNF_AMANDAD_PATH)); - } else if(strcmp(string, "client_username")==0) { - return(getconf_str(CNF_CLIENT_USERNAME)); - } else if(strcmp(string, "gnutar_list_dir")==0) { - return(getconf_str(CNF_GNUTAR_LIST_DIR)); - } else if(strcmp(string, "amandates")==0) { - return(getconf_str(CNF_AMANDATES)); - } else if(strcmp(string, "krb5principal")==0) { - return(getconf_str(CNF_KRB5PRINCIPAL)); - } else if(strcmp(string, "krb5keytab")==0) { - return(getconf_str(CNF_KRB5KEYTAB)); - } - return(NULL); + if (*seen && !allow_overwrites && current_line_num != -2) { + conf_parserror(_("duplicate parameter, prev def on line %d"), *seen); + } + *seen = current_line_num; } +/* Validation functions */ -/* return 0 on success */ -/* return -1 if it is already there */ -/* return -2 if other failure */ -int -add_client_conf( - confparm_t parm, - char *value) +static void +validate_nonnegative( + struct conf_var_s *np, + val_t *val) { - t_conf_var *np; - keytab_t *kt; - command_option_t *command_option; - int nb_option; + switch(val->type) { + case CONFTYPE_INT: + if(val_t__int(val) < 0) + conf_parserror(_("%s must be nonnegative"), get_token_name(np->token)); + break; + case CONFTYPE_AM64: + if(val_t__am64(val) < 0) + conf_parserror(_("%s must be nonnegative"), get_token_name(np->token)); + break; + case CONFTYPE_SIZE: + if(val_t__size(val) < 0) + conf_parserror(_("%s must be positive"), get_token_name(np->token)); + break; + default: + conf_parserror(_("validate_nonnegative invalid type %d\n"), val->type); + } +} - for(np = client_var; np->token != CONF_UNKNOWN; np++) - if(np->parm == (int)parm) break; +static void +validate_positive( + struct conf_var_s *np, + val_t *val) +{ + switch(val->type) { + case CONFTYPE_INT: + if(val_t__int(val) < 1) + conf_parserror(_("%s must be positive"), get_token_name(np->token)); + break; + case CONFTYPE_AM64: + if(val_t__am64(val) < 1) + conf_parserror(_("%s must be positive"), get_token_name(np->token)); + break; + case CONFTYPE_TIME: + if(val_t__time(val) < 1) + conf_parserror(_("%s must be positive"), get_token_name(np->token)); + break; + case CONFTYPE_SIZE: + if(val_t__size(val) < 1) + conf_parserror(_("%s must be positive"), get_token_name(np->token)); + break; + default: + conf_parserror(_("validate_positive invalid type %d\n"), val->type); + } +} - if(np->token == CONF_UNKNOWN) return -2; +static void +validate_runspercycle( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) +{ + if(val_t__int(val) < -1) + conf_parserror(_("runspercycle must be >= -1")); +} - for(kt = client_keytab; kt->token != CONF_UNKNOWN; kt++) - if(kt->token == np->token) break; +static void +validate_bumppercent( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) +{ + if(val_t__int(val) < 0 || val_t__int(val) > 100) + conf_parserror(_("bumppercent must be between 0 and 100")); +} - if(kt->token == CONF_UNKNOWN) return -2; +static void +validate_inparallel( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) +{ + if(val_t__int(val) < 1 || val_t__int(val) >MAX_DUMPERS) + conf_parserror(_("inparallel must be between 1 and MAX_DUMPERS (%d)"), + MAX_DUMPERS); +} - /* Try to find it */ - nb_option = 0; - for(command_option = program_options; command_option->name != NULL; - command_option++) { - nb_option++; +static void +validate_bumpmult( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) +{ + if(val_t__real(val) < 0.999) { + conf_parserror(_("bumpmult must one or more")); } +} - /* Increase size of program_options if needed */ - if(nb_option >= program_options_size-1) { - program_options_size *= 2; - program_options = realloc(program_options, - program_options_size * SIZEOF(*program_options)); - if (program_options == NULL) { - error("Can't realloc program_options: %s\n", strerror(errno)); - /*NOTREACHED*/ - } - for(command_option = program_options; command_option->name != NULL; - command_option++) { +static void +validate_displayunit( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val G_GNUC_UNUSED) +{ + char *s = val_t__str(val); + if (strlen(s) == 1) { + switch (s[0]) { + case 'K': + case 'M': + case 'G': + case 'T': + return; /* all good */ + + /* lower-case values should get folded to upper case */ + case 'k': + case 'm': + case 'g': + case 't': + s[0] = toupper(s[0]); + return; + + default: /* bad */ + break; } } + conf_parserror(_("displayunit must be k,m,g or t.")); +} - /* add it */ - command_option->used = 0; - command_option->name = stralloc(kt->keyword); - command_option->value = stralloc(value); - command_option++; - command_option->name = NULL; - return 0; +static void +validate_reserve( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) +{ + if(val_t__int(val) < 0 || val_t__int(val) > 100) + conf_parserror(_("reserve must be between 0 and 100")); } -/* -static t_conf_var * -get_np( - t_conf_var *get_var, - int parm) +static void +validate_use( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) { - t_conf_var *np; + val_t__am64(val) = am_floor(val_t__am64(val), DISK_BLOCK_KB); +} - for(np = get_var; np->token != CONF_UNKNOWN; np++) { - if(np->parm == parm) - break; +static void +validate_chunksize( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) +{ + /* NOTE: this function modifies the target value (rounding) */ + if(val_t__am64(val) == 0) { + val_t__am64(val) = ((AM64_MAX / 1024) - (2 * DISK_BLOCK_KB)); } - - if(np->token == CONF_UNKNOWN) { - error("error [unknown get_np parm: %d]", parm); - NOTREACHED + else if(val_t__am64(val) < 0) { + conf_parserror(_("Negative chunksize (%lld) is no longer supported"), (long long)val_t__am64(val)); + } + val_t__am64(val) = am_floor(val_t__am64(val), (off_t)DISK_BLOCK_KB); + if (val_t__am64(val) < 2*DISK_BLOCK_KB) { + conf_parserror("chunksize must be at least %dkb", 2*DISK_BLOCK_KB); } - return np; } -*/ -static time_t -get_time(void) +static void +validate_blocksize( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) { - time_t hhmm; - - get_conftoken(CONF_ANY); - switch(tok) { - case CONF_INT: -#if SIZEOF_TIME_T < SIZEOF_INT - if ((off_t)tokenval.v.i >= (off_t)TIME_MAX) - conf_parserror("value too large"); -#endif - hhmm = (time_t)tokenval.v.i; - break; - - case CONF_LONG: -#if SIZEOF_TIME_T < SIZEOF_LONG - if ((off_t)tokenval.v.l >= (off_t)TIME_MAX) - conf_parserror("value too large"); -#endif - hhmm = (time_t)tokenval.v.l; - break; - - case CONF_SIZE: -#if SIZEOF_TIME_T < SIZEOF_SSIZE_T - if ((off_t)tokenval.v.size >= (off_t)TIME_MAX) - conf_parserror("value too large"); -#endif - hhmm = (time_t)tokenval.v.size; - break; + if(val_t__size(val) < DISK_BLOCK_KB) { + conf_parserror(_("Tape blocksize must be at least %d KBytes"), + DISK_BLOCK_KB); + } +} - case CONF_AM64: -#if SIZEOF_TIME_T < SIZEOF_LONG_LONG - if ((off_t)tokenval.v.am64 >= (off_t)TIME_MAX) - conf_parserror("value too large"); -#endif - hhmm = (time_t)tokenval.v.am64; - break; +static void +validate_debug( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) +{ + if(val_t__int(val) < 0 || val_t__int(val) > 9) { + conf_parserror(_("Debug must be between 0 and 9")); + } +} - case CONF_AMINFINITY: - hhmm = TIME_MAX; - break; +static void +validate_port_range( + val_t *val, + int smallest, + int largest) +{ + int i; + /* check both values are in range */ + for (i = 0; i < 2; i++) { + if(val_t__intrange(val)[0] < smallest || val_t__intrange(val)[0] > largest) { + conf_parserror(_("portrange must be in the range %d to %d, inclusive"), smallest, largest); + } + } - default: - conf_parserror("a time is expected"); - hhmm = 0; - break; + /* and check they're in the right order and not equal */ + if (val_t__intrange(val)[0] > val_t__intrange(val)[1]) { + conf_parserror(_("portranges must be in order from low to high")); } - return hhmm; } -keytab_t numb_keytable[] = { - { "B", CONF_MULT1 }, - { "BPS", CONF_MULT1 }, - { "BYTE", CONF_MULT1 }, - { "BYTES", CONF_MULT1 }, - { "DAY", CONF_MULT1 }, - { "DAYS", CONF_MULT1 }, - { "INF", CONF_AMINFINITY }, - { "K", CONF_MULT1K }, - { "KB", CONF_MULT1K }, - { "KBPS", CONF_MULT1K }, - { "KBYTE", CONF_MULT1K }, - { "KBYTES", CONF_MULT1K }, - { "KILOBYTE", CONF_MULT1K }, - { "KILOBYTES", CONF_MULT1K }, - { "KPS", CONF_MULT1K }, - { "M", CONF_MULT1M }, - { "MB", CONF_MULT1M }, - { "MBPS", CONF_MULT1M }, - { "MBYTE", CONF_MULT1M }, - { "MBYTES", CONF_MULT1M }, - { "MEG", CONF_MULT1M }, - { "MEGABYTE", CONF_MULT1M }, - { "MEGABYTES", CONF_MULT1M }, - { "G", CONF_MULT1G }, - { "GB", CONF_MULT1G }, - { "GBPS", CONF_MULT1G }, - { "GBYTE", CONF_MULT1G }, - { "GBYTES", CONF_MULT1G }, - { "GIG", CONF_MULT1G }, - { "GIGABYTE", CONF_MULT1G }, - { "GIGABYTES", CONF_MULT1G }, - { "MPS", CONF_MULT1M }, - { "TAPE", CONF_MULT1 }, - { "TAPES", CONF_MULT1 }, - { "WEEK", CONF_MULT7 }, - { "WEEKS", CONF_MULT7 }, - { NULL, CONF_IDENT } -}; +static void +validate_reserved_port_range( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) +{ + validate_port_range(val, 1, IPPORT_RESERVED-1); +} -static int -get_int(void) +static void +validate_unreserved_port_range( + struct conf_var_s *np G_GNUC_UNUSED, + val_t *val) { - int val; - keytab_t *save_kt; + validate_port_range(val, IPPORT_RESERVED, 65535); +} - save_kt = keytable; - keytable = numb_keytable; +/* + * Initialization Implementation + */ - get_conftoken(CONF_ANY); - switch(tok) { - case CONF_INT: - val = tokenval.v.i; - break; +gboolean +config_init( + config_init_flags flags, + char *arg_config_name) +{ + if (!(flags & CONFIG_INIT_OVERLAY)) { + /* Clear out anything that's already in there */ + config_uninit(); - case CONF_LONG: -#if SIZEOF_INT < SIZEOF_LONG - if ((off_t)tokenval.v.l > (off_t)INT_MAX) - conf_parserror("value too large"); - if ((off_t)tokenval.v.l < (off_t)INT_MIN) - conf_parserror("value too small"); -#endif - val = (int)tokenval.v.l; - break; + /* and set everything to default values */ + init_defaults(); - case CONF_SIZE: -#if SIZEOF_INT < SIZEOF_SSIZE_T - if ((off_t)tokenval.v.size > (off_t)INT_MAX) - conf_parserror("value too large"); - if ((off_t)tokenval.v.size < (off_t)INT_MIN) - conf_parserror("value too small"); -#endif - val = (int)tokenval.v.size; - break; + allow_overwrites = FALSE; + } else { + if (!config_initialized) { + error(_("Attempt to overlay configuration with no existing configuration")); + /* NOTREACHED */ + } - case CONF_AM64: -#if SIZEOF_INT < SIZEOF_LONG_LONG - if (tokenval.v.am64 > (off_t)INT_MAX) - conf_parserror("value too large"); - if (tokenval.v.am64 < (off_t)INT_MIN) - conf_parserror("value too small"); -#endif - val = (int)tokenval.v.am64; - break; + allow_overwrites = TRUE; + } - case CONF_AMINFINITY: - val = INT_MAX; - break; + /* store away our client-ness for later reference */ + config_client = flags & CONFIG_INIT_CLIENT; - default: - conf_parserror("an integer is expected"); - val = 0; - break; - } + if ((flags & CONFIG_INIT_EXPLICIT_NAME) && arg_config_name) { + config_name = newstralloc(config_name, arg_config_name); + config_dir = newvstralloc(config_dir, CONFIG_DIR, "/", arg_config_name, NULL); + } else if (flags & CONFIG_INIT_USE_CWD) { + char * cwd; + + cwd = get_original_cwd(); + if (!cwd) { + /* (this isn't a config error, so it's always fatal) */ + error(_("Cannot determine current working directory")); + /* NOTREACHED */ + } - /* get multiplier, if any */ - get_conftoken(CONF_ANY); - switch(tok) { - case CONF_NL: /* multiply by one */ - case CONF_END: - case CONF_MULT1: - case CONF_MULT1K: - break; - - case CONF_MULT7: - if (val > (INT_MAX / 7)) - conf_parserror("value too large"); - if (val < (INT_MIN / 7)) - conf_parserror("value too small"); - val *= 7; - break; + config_dir = stralloc2(cwd, "/"); + if ((config_name = strrchr(cwd, '/')) != NULL) { + config_name = stralloc(config_name + 1); + } - case CONF_MULT1M: - if (val > (INT_MAX / 1024)) - conf_parserror("value too large"); - if (val < (INT_MIN / 1024)) - conf_parserror("value too small"); - val *= 1024; - break; + amfree(cwd); + } else if (flags & CONFIG_INIT_CLIENT) { + amfree(config_name); + config_dir = newstralloc(config_dir, CONFIG_DIR); + } else { + /* ok, then, we won't read anything (for e.g., amrestore) */ + amfree(config_name); + amfree(config_dir); + } - case CONF_MULT1G: - if (val > (INT_MAX / (1024 * 1024))) - conf_parserror("value too large"); - if (val < (INT_MIN / (1024 * 1024))) - conf_parserror("value too small"); - val *= 1024 * 1024; - break; + /* If we have a config_dir, we can try reading something */ + if (config_dir) { + if (flags & CONFIG_INIT_CLIENT) { + config_filename = newvstralloc(config_filename, config_dir, "/amanda-client.conf", NULL); + } else { + config_filename = newvstralloc(config_filename, config_dir, "/amanda.conf", NULL); + } - default: /* it was not a multiplier */ - unget_conftoken(); - break; + /* try to read the file, and handle parse errors */ + if (!read_conffile(config_filename, flags & CONFIG_INIT_CLIENT)) { + if (flags & CONFIG_INIT_FATAL) { + error(_("errors processing config file \"%s\""), config_filename); + /* NOTREACHED */ + } else { + g_warning(_("errors processing config file \"%s\" (non-fatal)"), config_filename); + return FALSE; + } + } + } else { + amfree(config_filename); } - keytable = save_kt; - return val; + update_derived_values(flags & CONFIG_INIT_CLIENT); + + return TRUE; } -/* -static long -get_long(void) +void +config_uninit(void) { - long val; - keytab_t *save_kt; - - save_kt = keytable; - keytable = numb_keytable; - - get_conftoken(CONF_ANY); - - switch(tok) { - case CONF_LONG: - val = tokenval.v.l; - break; - - case CONF_INT: -#if SIZEOF_LONG < SIZEOF_INT - if ((off_t)tokenval.v.i > (off_t)LONG_MAX) - conf_parserror("value too large"); - if ((off_t)tokenval.v.i < (off_t)LONG_MIN) - conf_parserror("value too small"); -#endif - val = (long)tokenval.v.i; - break; - - case CONF_SIZE: -#if SIZEOF_LONG < SIZEOF_SSIZE_T - if ((off_t)tokenval.v.size > (off_t)LONG_MAX) - conf_parserror("value too large"); - if ((off_t)tokenval.v.size < (off_t)LONG_MIN) - conf_parserror("value too small"); -#endif - val = (long)tokenval.v.size; - break; + holdingdisk_t *hp, *hpnext; + dumptype_t *dp, *dpnext; + tapetype_t *tp, *tpnext; + interface_t *ip, *ipnext; + int i; - case CONF_AM64: -#if SIZEOF_LONG < SIZEOF_LONG_LONG - if (tokenval.v.am64 > (off_t)LONG_MAX) - conf_parserror("value too large"); - if (tokenval.v.am64 < (off_t)LONG_MIN) - conf_parserror("value too small"); -#endif - val = (long)tokenval.v.am64; - break; + if (!config_initialized) return; - case CONF_AMINFINITY: - val = (long)LONG_MAX; - break; + for(hp=holdinglist; hp != NULL; hp = hpnext) { + amfree(hp->name); + for(i=0; ivalue[i]); + } + hpnext = hp->next; + amfree(hp); + } + holdinglist = NULL; - default: - conf_parserror("an integer is expected"); - val = 0; - break; + for(dp=dumplist; dp != NULL; dp = dpnext) { + amfree(dp->name); + for(i=0; ivalue[i]); + } + dpnext = dp->next; + amfree(dp); } + dumplist = NULL; - get_conftoken(CONF_ANY); + for(tp=tapelist; tp != NULL; tp = tpnext) { + amfree(tp->name); + for(i=0; ivalue[i]); + } + tpnext = tp->next; + amfree(tp); + } + tapelist = NULL; - switch(tok) { - case CONF_NL: - case CONF_MULT1: - case CONF_MULT1K: - break; + for(ip=interface_list; ip != NULL; ip = ipnext) { + amfree(ip->name); + for(i=0; ivalue[i]); + } + ipnext = ip->next; + amfree(ip); + } + interface_list = NULL; - case CONF_MULT7: - if (val > (LONG_MAX / 7L)) - conf_parserror("value too large"); - if (val < (LONG_MIN / 7L)) - conf_parserror("value too small"); - val *= 7L; - break; + for(i=0; i (LONG_MAX / 1024L)) - conf_parserror("value too large"); - if (val < (LONG_MIN / 1024L)) - conf_parserror("value too small"); - val *= 1024L; - break; + if (applied_config_overwrites) { + free_config_overwrites(applied_config_overwrites); + applied_config_overwrites = NULL; + } - case CONF_MULT1G: - if (val > (LONG_MAX / (1024L * 1024L))) - conf_parserror("value too large"); - if (val < (LONG_MIN / (1024L * 1024L))) - conf_parserror("value too small"); - val *= 1024L * 1024L; - break; + amfree(config_name); + amfree(config_dir); - default: - unget_conftoken(); - break; - } + config_client = FALSE; - keytable = save_kt; - return val; + config_initialized = FALSE; } -*/ -static ssize_t -get_size(void) +static void +init_defaults( + void) { - ssize_t val; - keytab_t *save_kt; - - save_kt = keytable; - keytable = numb_keytable; - - get_conftoken(CONF_ANY); - - switch(tok) { - case CONF_SIZE: - val = tokenval.v.size; - break; + assert(!config_initialized); - case CONF_INT: -#if SIZEOF_SIZE_T < SIZEOF_INT - if ((off_t)tokenval.v.i > (off_t)SSIZE_MAX) - conf_parserror("value too large"); - if ((off_t)tokenval.v.i < (off_t)SSIZE_MIN) - conf_parserror("value too small"); + /* defaults for exported variables */ + conf_init_str(&conf_data[CNF_ORG], DEFAULT_CONFIG); + conf_init_str(&conf_data[CNF_CONF], DEFAULT_CONFIG); + conf_init_str(&conf_data[CNF_INDEX_SERVER], DEFAULT_SERVER); + conf_init_str(&conf_data[CNF_TAPE_SERVER], DEFAULT_TAPE_SERVER); + conf_init_str(&conf_data[CNF_AUTH], "bsd"); + conf_init_str(&conf_data[CNF_SSH_KEYS], ""); + conf_init_str(&conf_data[CNF_AMANDAD_PATH], ""); + conf_init_str(&conf_data[CNF_CLIENT_USERNAME], ""); + conf_init_str(&conf_data[CNF_GNUTAR_LIST_DIR], GNUTAR_LISTED_INCREMENTAL_DIR); + conf_init_str(&conf_data[CNF_AMANDATES], DEFAULT_AMANDATES_FILE); + conf_init_str(&conf_data[CNF_MAILTO], "operators"); + conf_init_str(&conf_data[CNF_DUMPUSER], CLIENT_LOGIN); + conf_init_str(&conf_data[CNF_TAPEDEV], DEFAULT_TAPE_DEVICE); + conf_init_proplist(&conf_data[CNF_DEVICE_PROPERTY]); + conf_init_str(&conf_data[CNF_CHANGERDEV], DEFAULT_CHANGER_DEVICE); + conf_init_str(&conf_data[CNF_CHANGERFILE], "/usr/adm/amanda/changer-status"); + conf_init_str (&conf_data[CNF_LABELSTR] , ".*"); + conf_init_str (&conf_data[CNF_TAPELIST] , "tapelist"); + conf_init_str (&conf_data[CNF_DISKFILE] , "disklist"); + conf_init_str (&conf_data[CNF_INFOFILE] , "/usr/adm/amanda/curinfo"); + conf_init_str (&conf_data[CNF_LOGDIR] , "/usr/adm/amanda"); + conf_init_str (&conf_data[CNF_INDEXDIR] , "/usr/adm/amanda/index"); + conf_init_ident (&conf_data[CNF_TAPETYPE] , "EXABYTE"); + conf_init_int (&conf_data[CNF_DUMPCYCLE] , 10); + conf_init_int (&conf_data[CNF_RUNSPERCYCLE] , 0); + conf_init_int (&conf_data[CNF_TAPECYCLE] , 15); + conf_init_int (&conf_data[CNF_NETUSAGE] , 8000); + conf_init_int (&conf_data[CNF_INPARALLEL] , 10); + conf_init_str (&conf_data[CNF_DUMPORDER] , "ttt"); + conf_init_int (&conf_data[CNF_BUMPPERCENT] , 0); + conf_init_am64 (&conf_data[CNF_BUMPSIZE] , (off_t)10*1024); + conf_init_real (&conf_data[CNF_BUMPMULT] , 1.5); + conf_init_int (&conf_data[CNF_BUMPDAYS] , 2); + conf_init_str (&conf_data[CNF_TPCHANGER] , ""); + conf_init_int (&conf_data[CNF_RUNTAPES] , 1); + conf_init_int (&conf_data[CNF_MAXDUMPS] , 1); + conf_init_int (&conf_data[CNF_ETIMEOUT] , 300); + conf_init_int (&conf_data[CNF_DTIMEOUT] , 1800); + conf_init_int (&conf_data[CNF_CTIMEOUT] , 30); + conf_init_int (&conf_data[CNF_TAPEBUFS] , 20); + conf_init_size (&conf_data[CNF_DEVICE_OUTPUT_BUFFER_SIZE], 40*32768); + conf_init_str (&conf_data[CNF_PRINTER] , ""); + conf_init_bool (&conf_data[CNF_AUTOFLUSH] , 0); + conf_init_int (&conf_data[CNF_RESERVE] , 100); + conf_init_am64 (&conf_data[CNF_MAXDUMPSIZE] , (off_t)-1); + conf_init_str (&conf_data[CNF_COLUMNSPEC] , ""); + conf_init_bool (&conf_data[CNF_AMRECOVER_DO_FSF] , 1); + conf_init_str (&conf_data[CNF_AMRECOVER_CHANGER] , ""); + conf_init_bool (&conf_data[CNF_AMRECOVER_CHECK_LABEL], 1); + conf_init_taperalgo(&conf_data[CNF_TAPERALGO] , 0); + conf_init_int (&conf_data[CNF_FLUSH_THRESHOLD_DUMPED] , 0); + conf_init_int (&conf_data[CNF_FLUSH_THRESHOLD_SCHEDULED], 0); + conf_init_int (&conf_data[CNF_TAPERFLUSH] , 0); + conf_init_str (&conf_data[CNF_DISPLAYUNIT] , "k"); + conf_init_str (&conf_data[CNF_KRB5KEYTAB] , "/.amanda-v5-keytab"); + conf_init_str (&conf_data[CNF_KRB5PRINCIPAL] , "service/amanda"); + conf_init_str (&conf_data[CNF_LABEL_NEW_TAPES] , ""); + conf_init_bool (&conf_data[CNF_USETIMESTAMPS] , 1); + conf_init_int (&conf_data[CNF_CONNECT_TRIES] , 3); + conf_init_int (&conf_data[CNF_REP_TRIES] , 5); + conf_init_int (&conf_data[CNF_REQ_TRIES] , 3); + conf_init_int (&conf_data[CNF_DEBUG_AMANDAD] , 0); + conf_init_int (&conf_data[CNF_DEBUG_AMIDXTAPED] , 0); + conf_init_int (&conf_data[CNF_DEBUG_AMINDEXD] , 0); + conf_init_int (&conf_data[CNF_DEBUG_AMRECOVER] , 0); + conf_init_int (&conf_data[CNF_DEBUG_AUTH] , 0); + conf_init_int (&conf_data[CNF_DEBUG_EVENT] , 0); + conf_init_int (&conf_data[CNF_DEBUG_HOLDING] , 0); + conf_init_int (&conf_data[CNF_DEBUG_PROTOCOL] , 0); + conf_init_int (&conf_data[CNF_DEBUG_PLANNER] , 0); + conf_init_int (&conf_data[CNF_DEBUG_DRIVER] , 0); + conf_init_int (&conf_data[CNF_DEBUG_DUMPER] , 0); + conf_init_int (&conf_data[CNF_DEBUG_CHUNKER] , 0); + conf_init_int (&conf_data[CNF_DEBUG_TAPER] , 0); + conf_init_int (&conf_data[CNF_DEBUG_SELFCHECK] , 0); + conf_init_int (&conf_data[CNF_DEBUG_SENDSIZE] , 0); + conf_init_int (&conf_data[CNF_DEBUG_SENDBACKUP] , 0); +#ifdef UDPPORTRANGE + conf_init_intrange (&conf_data[CNF_RESERVED_UDP_PORT] , UDPPORTRANGE); +#else + conf_init_intrange (&conf_data[CNF_RESERVED_UDP_PORT] , 512, IPPORT_RESERVED-1); #endif - val = (ssize_t)tokenval.v.i; - break; - - case CONF_LONG: -#if SIZEOF_SIZE_T < SIZEOF_LONG - if ((off_t)tokenval.v.l > (off_t)SSIZE_MAX) - conf_parserror("value too large"); - if ((off_t)tokenval.v.l < (off_t)SSIZE_MIN) - conf_parserror("value too small"); +#ifdef LOW_TCPPORTRANGE + conf_init_intrange (&conf_data[CNF_RESERVED_TCP_PORT] , LOW_TCPPORTRANGE); +#else + conf_init_intrange (&conf_data[CNF_RESERVED_TCP_PORT] , 512, IPPORT_RESERVED-1); #endif - val = (ssize_t)tokenval.v.l; - break; - - case CONF_AM64: -#if SIZEOF_SIZE_T < SIZEOF_LONG_LONG - if (tokenval.v.am64 > (off_t)SSIZE_MAX) - conf_parserror("value too large"); - if (tokenval.v.am64 < (off_t)SSIZE_MIN) - conf_parserror("value too small"); +#ifdef TCPPORTRANGE + conf_init_intrange (&conf_data[CNF_UNRESERVED_TCP_PORT] , TCPPORTRANGE); +#else + conf_init_intrange (&conf_data[CNF_UNRESERVED_TCP_PORT] , IPPORT_RESERVED, 65535); #endif - val = (ssize_t)tokenval.v.am64; - break; - case CONF_AMINFINITY: - val = (ssize_t)SSIZE_MAX; - break; + /* reset internal variables */ + got_parserror = FALSE; + allow_overwrites = 0; + token_pushed = 0; - default: - conf_parserror("an integer is expected"); - val = 0; - break; - } + /* create some predefined dumptypes for backwards compatability */ + init_dumptype_defaults(); + dpcur.name = stralloc("NO-COMPRESS"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_COMPRESS]); + val_t__compress(&dpcur.value[DUMPTYPE_COMPRESS]) = COMP_NONE; + val_t__seen(&dpcur.value[DUMPTYPE_COMPRESS]) = -1; + save_dumptype(); - /* get multiplier, if any */ - get_conftoken(CONF_ANY); + init_dumptype_defaults(); + dpcur.name = stralloc("COMPRESS-FAST"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_COMPRESS]); + val_t__compress(&dpcur.value[DUMPTYPE_COMPRESS]) = COMP_FAST; + val_t__seen(&dpcur.value[DUMPTYPE_COMPRESS]) = -1; + save_dumptype(); - switch(tok) { - case CONF_NL: /* multiply by one */ - case CONF_MULT1: - case CONF_MULT1K: - break; + init_dumptype_defaults(); + dpcur.name = stralloc("COMPRESS-BEST"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_COMPRESS]); + val_t__compress(&dpcur.value[DUMPTYPE_COMPRESS]) = COMP_BEST; + val_t__seen(&dpcur.value[DUMPTYPE_COMPRESS]) = -1; + save_dumptype(); - case CONF_MULT7: - if (val > (ssize_t)(SSIZE_MAX / 7)) - conf_parserror("value too large"); - if (val < (ssize_t)(SSIZE_MIN / 7)) - conf_parserror("value too small"); - val *= (ssize_t)7; - break; + init_dumptype_defaults(); + dpcur.name = stralloc("COMPRESS-CUST"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_COMPRESS]); + val_t__compress(&dpcur.value[DUMPTYPE_COMPRESS]) = COMP_CUST; + val_t__seen(&dpcur.value[DUMPTYPE_COMPRESS]) = -1; + save_dumptype(); - case CONF_MULT1M: - if (val > (ssize_t)(SSIZE_MAX / (ssize_t)1024)) - conf_parserror("value too large"); - if (val < (ssize_t)(SSIZE_MIN / (ssize_t)1024)) - conf_parserror("value too small"); - val *= (ssize_t)1024; - break; + init_dumptype_defaults(); + dpcur.name = stralloc("SRVCOMPRESS"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_COMPRESS]); + val_t__compress(&dpcur.value[DUMPTYPE_COMPRESS]) = COMP_SERVER_FAST; + val_t__seen(&dpcur.value[DUMPTYPE_COMPRESS]) = -1; + save_dumptype(); - case CONF_MULT1G: - if (val > (ssize_t)(SSIZE_MAX / (1024 * 1024))) - conf_parserror("value too large"); - if (val < (ssize_t)(SSIZE_MIN / (1024 * 1024))) - conf_parserror("value too small"); - val *= (ssize_t)(1024 * 1024); - break; - - default: /* it was not a multiplier */ - unget_conftoken(); - break; - } - - keytable = save_kt; - return val; -} - -static off_t -get_am64_t(void) -{ - off_t val; - keytab_t *save_kt; - - save_kt = keytable; - keytable = numb_keytable; - - get_conftoken(CONF_ANY); - - switch(tok) { - case CONF_INT: - val = (off_t)tokenval.v.i; - break; - - case CONF_LONG: - val = (off_t)tokenval.v.l; - break; - - case CONF_SIZE: - val = (off_t)tokenval.v.size; - break; + init_dumptype_defaults(); + dpcur.name = stralloc("BSD-AUTH"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_SECURITY_DRIVER]); + val_t__str(&dpcur.value[DUMPTYPE_SECURITY_DRIVER]) = stralloc("BSD"); + val_t__seen(&dpcur.value[DUMPTYPE_SECURITY_DRIVER]) = -1; + save_dumptype(); - case CONF_AM64: - val = tokenval.v.am64; - break; + init_dumptype_defaults(); + dpcur.name = stralloc("KRB4-AUTH"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_SECURITY_DRIVER]); + val_t__str(&dpcur.value[DUMPTYPE_SECURITY_DRIVER]) = stralloc("KRB4"); + val_t__seen(&dpcur.value[DUMPTYPE_SECURITY_DRIVER]) = -1; + save_dumptype(); - case CONF_AMINFINITY: - val = AM64_MAX; - break; + init_dumptype_defaults(); + dpcur.name = stralloc("NO-RECORD"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_RECORD]); + val_t__int(&dpcur.value[DUMPTYPE_RECORD]) = 0; + val_t__seen(&dpcur.value[DUMPTYPE_RECORD]) = -1; + save_dumptype(); - default: - conf_parserror("an integer is expected"); - val = 0; - break; - } + init_dumptype_defaults(); + dpcur.name = stralloc("NO-HOLD"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_HOLDINGDISK]); + val_t__holding(&dpcur.value[DUMPTYPE_HOLDINGDISK]) = HOLD_NEVER; + val_t__seen(&dpcur.value[DUMPTYPE_HOLDINGDISK]) = -1; + save_dumptype(); - /* get multiplier, if any */ - get_conftoken(CONF_ANY); + init_dumptype_defaults(); + dpcur.name = stralloc("NO-FULL"); + dpcur.seen = -1; + free_val_t(&dpcur.value[DUMPTYPE_STRATEGY]); + val_t__strategy(&dpcur.value[DUMPTYPE_STRATEGY]) = DS_NOFULL; + val_t__seen(&dpcur.value[DUMPTYPE_STRATEGY]) = -1; + save_dumptype(); - switch(tok) { - case CONF_NL: /* multiply by one */ - case CONF_MULT1: - case CONF_MULT1K: - break; + /* And we're initialized! */ + config_initialized = 1; +} - case CONF_MULT7: - if (val > AM64_MAX/7 || val < AM64_MIN/7) - conf_parserror("value too large"); - val *= 7; - break; +char ** +get_config_options( + int first) +{ + char **config_options; + char **config_option; + int n_applied_config_overwrites = 0; + int i; - case CONF_MULT1M: - if (val > AM64_MAX/1024 || val < AM64_MIN/1024) - conf_parserror("value too large"); - val *= 1024; - break; + if (applied_config_overwrites) + n_applied_config_overwrites = applied_config_overwrites->n_used; - case CONF_MULT1G: - if (val > AM64_MAX/(1024*1024) || val < AM64_MIN/(1024*1024)) - conf_parserror("value too large"); - val *= 1024*1024; - break; + config_options = alloc((first+n_applied_config_overwrites+1)*SIZEOF(char *)); + config_option = config_options + first; - default: /* it was not a multiplier */ - unget_conftoken(); - break; + for (i = 0; i < n_applied_config_overwrites; i++) { + char *key = applied_config_overwrites->ovr[i].key; + char *value = applied_config_overwrites->ovr[i].value; + *config_option = vstralloc("-o", key, "=", value, NULL); + config_option++; } - keytable = save_kt; + *config_option = NULL; /* add terminating sentinel */ - return val; + return config_options; } -keytab_t bool_keytable[] = { - { "Y", CONF_ATRUE }, - { "YES", CONF_ATRUE }, - { "T", CONF_ATRUE }, - { "TRUE", CONF_ATRUE }, - { "ON", CONF_ATRUE }, - { "N", CONF_AFALSE }, - { "NO", CONF_AFALSE }, - { "F", CONF_AFALSE }, - { "FALSE", CONF_AFALSE }, - { "OFF", CONF_AFALSE }, - { NULL, CONF_IDENT } -}; - -static int -get_bool(void) +static void +update_derived_values( + gboolean is_client) { - int val; - keytab_t *save_kt; - - save_kt = keytable; - keytable = bool_keytable; - - get_conftoken(CONF_ANY); - - switch(tok) { - case CONF_INT: - if (tokenval.v.i != 0) - val = 1; - else - val = 0; - break; + interface_t *ip; - case CONF_LONG: - if (tokenval.v.l != 0L) - val = 1; - else - val = 0; - break; + if (!is_client) { + /* Add a 'default' interface if one doesn't already exist */ + if (!(ip = lookup_interface("default"))) { + init_interface_defaults(); + ifcur.name = stralloc("default"); + ifcur.seen = getconf_seen(CNF_NETUSAGE); + save_interface(); - case CONF_SIZE: - if (tokenval.v.size != (size_t)0) - val = 1; - else - val = 0; - break; + ip = lookup_interface("default"); + } - case CONF_AM64: - if (tokenval.v.am64 != (off_t)0) - val = 1; - else - val = 0; - break; + /* .. and set its maxusage from 'netusage' */ + if (!interface_seen(ip, INTER_MAXUSAGE)) { + val_t *v; - case CONF_ATRUE: - val = 1; - break; + v = interface_getconf(ip, INTER_COMMENT); + free_val_t(v); + val_t__str(v) = stralloc(_("implicit from NETUSAGE")); + val_t__seen(v) = getconf_seen(CNF_NETUSAGE); - case CONF_AFALSE: - val = 0; - break; + v = interface_getconf(ip, INTER_MAXUSAGE); + free_val_t(v); + val_t__int(v) = getconf_int(CNF_NETUSAGE); + val_t__seen(v) = getconf_seen(CNF_NETUSAGE); + } - case CONF_NL: - unget_conftoken(); - val = 2; /* no argument - most likely TRUE */ - break; - default: - unget_conftoken(); - val = 3; /* a bad argument - most likely TRUE */ - conf_parserror("YES, NO, TRUE, FALSE, ON, OFF expected"); - break; + /* Check the tapetype is defined */ + if (lookup_tapetype(getconf_str(CNF_TAPETYPE)) == NULL) { + /* Create a default tapetype */ + if (!getconf_seen(CNF_TAPETYPE) && + strcmp(getconf_str(CNF_TAPETYPE), "EXABYTE") == 0 && + !lookup_tapetype("EXABYTE")) { + init_tapetype_defaults(); + tpcur.name = stralloc("EXABYTE"); + tpcur.seen = -1; + save_tapetype(); + } else { + conf_parserror(_("tapetype %s is not defined"), + getconf_str(CNF_TAPETYPE)); + } + } } - keytable = save_kt; - return val; -} + /* fill in the debug_* values */ + debug_amandad = getconf_int(CNF_DEBUG_AMANDAD); + debug_amidxtaped = getconf_int(CNF_DEBUG_AMIDXTAPED); + debug_amindexd = getconf_int(CNF_DEBUG_AMINDEXD); + debug_amrecover = getconf_int(CNF_DEBUG_AMRECOVER); + debug_auth = getconf_int(CNF_DEBUG_AUTH); + debug_event = getconf_int(CNF_DEBUG_EVENT); + debug_holding = getconf_int(CNF_DEBUG_HOLDING); + debug_protocol = getconf_int(CNF_DEBUG_PROTOCOL); + debug_planner = getconf_int(CNF_DEBUG_PLANNER); + debug_driver = getconf_int(CNF_DEBUG_DRIVER); + debug_dumper = getconf_int(CNF_DEBUG_DUMPER); + debug_chunker = getconf_int(CNF_DEBUG_CHUNKER); + debug_taper = getconf_int(CNF_DEBUG_TAPER); + debug_selfcheck = getconf_int(CNF_DEBUG_SELFCHECK); + debug_sendsize = getconf_int(CNF_DEBUG_SENDSIZE); + debug_sendbackup = getconf_int(CNF_DEBUG_SENDBACKUP); -void -ckseen( - int *seen) -{ - if (*seen && !allow_overwrites && conf_line_num != -2) { - conf_parserror("duplicate parameter, prev def on line %d", *seen); - } - *seen = conf_line_num; -} + /* And finally, display unit */ + switch (getconf_str(CNF_DISPLAYUNIT)[0]) { + case 'k': + case 'K': + unit_divisor = 1; + break; -printf_arglist_function(void conf_parserror, const char *, format) -{ - va_list argp; + case 'm': + case 'M': + unit_divisor = 1024; + break; - /* print error message */ + case 'g': + case 'G': + unit_divisor = 1024*1024; + break; - if(conf_line) - fprintf(stderr, "argument \"%s\": ", conf_line); - else - fprintf(stderr, "\"%s\", line %d: ", conf_confname, conf_line_num); - arglist_start(argp, format); - vfprintf(stderr, format, argp); - arglist_end(argp); - fputc('\n', stderr); + case 't': + case 'T': + unit_divisor = 1024*1024*1024; + break; - got_parserror = 1; + default: + error(_("Invalid displayunit missed by validate_displayunit")); + /* NOTREACHED */ + } } -tok_t -lookup_keyword( - char * str) +static void +conf_init_int( + val_t *val, + int i) { - keytab_t *kwp; - - /* switch to binary search if performance warrants */ - - for(kwp = keytable; kwp->keyword != NULL; kwp++) { - if (strcasecmp(kwp->keyword, str) == 0) break; - } - return kwp->token; + val->seen = 0; + val->type = CONFTYPE_INT; + val_t__int(val) = i; } -char tkbuf[4096]; - -/* push the last token back (can only unget ANY tokens) */ static void -unget_conftoken(void) +conf_init_am64( + val_t *val, + off_t l) { - token_pushed = 1; - pushed_tok = tok; - tok = CONF_UNKNOWN; - return; + val->seen = 0; + val->type = CONFTYPE_AM64; + val_t__am64(val) = l; } -static int -conftoken_getc(void) +static void +conf_init_real( + val_t *val, + float r) { - if(conf_line == NULL) - return getc(conf_conf); - if(*conf_char == '\0') - return -1; - return(*conf_char++); + val->seen = 0; + val->type = CONFTYPE_REAL; + val_t__real(val) = r; } -static int -conftoken_ungetc( - int c) +static void +conf_init_str( + val_t *val, + char *s) { - if(conf_line == NULL) - return ungetc(c, conf_conf); - else if(conf_char > conf_line) { - if(c == -1) - return c; - conf_char--; - if(*conf_char != c) { - error("*conf_char != c : %c %c", *conf_char, c); - /* NOTREACHED */ - } - } else { - error("conf_char == conf_line"); - /* NOTREACHED */ - } - return c; + val->seen = 0; + val->type = CONFTYPE_STR; + if(s) + val->v.s = stralloc(s); + else + val->v.s = NULL; } static void -get_conftoken( - tok_t exp) -{ - int ch, d; - off_t am64; - char *buf; - char *tmps; - int token_overflow; - int inquote = 0; - int escape = 0; - int sign; +conf_init_ident( + val_t *val, + char *s) +{ + val->seen = 0; + val->type = CONFTYPE_IDENT; + if(s) + val->v.s = stralloc(s); + else + val->v.s = NULL; +} - if (token_pushed) { - token_pushed = 0; - tok = pushed_tok; +static void +conf_init_time( + val_t *val, + time_t t) +{ + val->seen = 0; + val->type = CONFTYPE_TIME; + val_t__time(val) = t; +} - /* - ** If it looked like a key word before then look it - ** up again in the current keyword table. - */ - switch(tok) { - case CONF_LONG: case CONF_AM64: case CONF_SIZE: - case CONF_INT: case CONF_REAL: case CONF_STRING: - case CONF_LBRACE: case CONF_RBRACE: case CONF_COMMA: - case CONF_NL: case CONF_END: case CONF_UNKNOWN: - case CONF_TIME: - break; +static void +conf_init_size( + val_t *val, + ssize_t sz) +{ + val->seen = 0; + val->type = CONFTYPE_SIZE; + val_t__size(val) = sz; +} - default: - if (exp == CONF_IDENT) - tok = CONF_IDENT; - else - tok = lookup_keyword(tokenval.v.s); - break; +static void +conf_init_bool( + val_t *val, + int i) +{ + val->seen = 0; + val->type = CONFTYPE_BOOLEAN; + val_t__boolean(val) = i; +} + +static void +conf_init_compress( + val_t *val, + comp_t i) +{ + val->seen = 0; + val->type = CONFTYPE_COMPRESS; + val_t__compress(val) = (int)i; +} + +static void +conf_init_encrypt( + val_t *val, + encrypt_t i) +{ + val->seen = 0; + val->type = CONFTYPE_ENCRYPT; + val_t__encrypt(val) = (int)i; +} + +static void +conf_init_holding( + val_t *val, + dump_holdingdisk_t i) +{ + val->seen = 0; + val->type = CONFTYPE_HOLDING; + val_t__holding(val) = (int)i; +} + +static void +conf_init_estimate( + val_t *val, + estimate_t i) +{ + val->seen = 0; + val->type = CONFTYPE_ESTIMATE; + val_t__estimate(val) = i; +} + +static void +conf_init_strategy( + val_t *val, + strategy_t i) +{ + val->seen = 0; + val->type = CONFTYPE_STRATEGY; + val_t__strategy(val) = i; +} + +static void +conf_init_taperalgo( + val_t *val, + taperalgo_t i) +{ + val->seen = 0; + val->type = CONFTYPE_TAPERALGO; + val_t__taperalgo(val) = i; +} + +static void +conf_init_priority( + val_t *val, + int i) +{ + val->seen = 0; + val->type = CONFTYPE_PRIORITY; + val_t__priority(val) = i; +} + +static void +conf_init_rate( + val_t *val, + float r1, + float r2) +{ + val->seen = 0; + val->type = CONFTYPE_RATE; + val_t__rate(val)[0] = r1; + val_t__rate(val)[1] = r2; +} + +static void +conf_init_exinclude( + val_t *val) +{ + val->seen = 0; + val->type = CONFTYPE_EXINCLUDE; + val_t__exinclude(val).optional = 0; + val_t__exinclude(val).sl_list = NULL; + val_t__exinclude(val).sl_file = NULL; +} + +static void +conf_init_intrange( + val_t *val, + int i1, + int i2) +{ + val->seen = 0; + val->type = CONFTYPE_INTRANGE; + val_t__intrange(val)[0] = i1; + val_t__intrange(val)[1] = i2; +} + +static void +conf_init_proplist( + val_t *val) +{ + val->seen = 0; + val->type = CONFTYPE_PROPLIST; + val_t__proplist(val) = + g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); +} + +/* + * Config access implementation + */ + +val_t * +getconf(confparm_key key) +{ + assert(key < CNF_CNF); + return &conf_data[key]; +} + +GSList * +getconf_list( + char *listname) +{ + tapetype_t *tp; + dumptype_t *dp; + interface_t *ip; + holdingdisk_t *hp; + GSList *rv = NULL; + + if (strcasecmp(listname,"tapetype") == 0) { + for(tp = tapelist; tp != NULL; tp=tp->next) { + rv = g_slist_append(rv, tp->name); + } + } else if (strcasecmp(listname,"dumptype") == 0) { + for(dp = dumplist; dp != NULL; dp=dp->next) { + rv = g_slist_append(rv, dp->name); + } + } else if (strcasecmp(listname,"holdingdisk") == 0) { + for(hp = holdinglist; hp != NULL; hp=hp->next) { + rv = g_slist_append(rv, hp->name); + } + } else if (strcasecmp(listname,"interface") == 0) { + for(ip = interface_list; ip != NULL; ip=ip->next) { + rv = g_slist_append(rv, ip->name); } } - else { - ch = conftoken_getc(); + return rv; +} - while(ch != EOF && ch != '\n' && isspace(ch)) - ch = conftoken_getc(); - if (ch == '#') { /* comment - eat everything but eol/eof */ - while((ch = conftoken_getc()) != EOF && ch != '\n') { - (void)ch; /* Quiet empty loop complaints */ - } +val_t * +getconf_byname( + char *key) +{ + val_t *rv = NULL; + + if (!parm_key_info(key, NULL, &rv)) + return NULL; + + return rv; +} + +tapetype_t * +lookup_tapetype( + char *str) +{ + tapetype_t *p; + + for(p = tapelist; p != NULL; p = p->next) { + if(strcasecmp(p->name, str) == 0) return p; + } + return NULL; +} + +val_t * +tapetype_getconf( + tapetype_t *ttyp, + tapetype_key key) +{ + assert(ttyp != NULL); + assert(key < TAPETYPE_TAPETYPE); + return &ttyp->value[key]; +} + +char * +tapetype_name( + tapetype_t *ttyp) +{ + assert(ttyp != NULL); + return ttyp->name; +} + +dumptype_t * +lookup_dumptype( + char *str) +{ + dumptype_t *p; + + for(p = dumplist; p != NULL; p = p->next) { + if(strcasecmp(p->name, str) == 0) return p; + } + return NULL; +} + +val_t * +dumptype_getconf( + dumptype_t *dtyp, + dumptype_key key) +{ + assert(dtyp != NULL); + assert(key < DUMPTYPE_DUMPTYPE); + return &dtyp->value[key]; +} + +char * +dumptype_name( + dumptype_t *dtyp) +{ + assert(dtyp != NULL); + return dtyp->name; +} + +interface_t * +lookup_interface( + char *str) +{ + interface_t *p; + + for(p = interface_list; p != NULL; p = p->next) { + if(strcasecmp(p->name, str) == 0) return p; + } + return NULL; +} + +val_t * +interface_getconf( + interface_t *iface, + interface_key key) +{ + assert(iface != NULL); + assert(key < INTER_INTER); + return &iface->value[key]; +} + +char * +interface_name( + interface_t *iface) +{ + assert(iface != NULL); + return iface->name; +} + +holdingdisk_t * +lookup_holdingdisk( + char *str) +{ + holdingdisk_t *p; + + for(p = holdinglist; p != NULL; p = p->next) { + if(strcasecmp(p->name, str) == 0) return p; + } + return NULL; +} + +holdingdisk_t * +getconf_holdingdisks( + void) +{ + return holdinglist; +} + +holdingdisk_t * +holdingdisk_next( + holdingdisk_t *hdisk) +{ + if (hdisk) return hdisk->next; + return NULL; +} + +val_t * +holdingdisk_getconf( + holdingdisk_t *hdisk, + holdingdisk_key key) +{ + assert(hdisk != NULL); + assert(key < HOLDING_HOLDING); + return &hdisk->value[key]; +} + +char * +holdingdisk_name( + holdingdisk_t *hdisk) +{ + assert(hdisk != NULL); + return hdisk->name; +} + +long int +getconf_unit_divisor(void) +{ + return unit_divisor; +} + +/* + * Command-line Handling Implementation + */ + +config_overwrites_t * +new_config_overwrites( + int size_estimate) +{ + config_overwrites_t *co; + + co = alloc(sizeof(*co)); + co->ovr = alloc(sizeof(*co->ovr) * size_estimate); + co->n_allocated = size_estimate; + co->n_used = 0; + + return co; +} + +void +free_config_overwrites( + config_overwrites_t *co) +{ + int i; + + if (!co) return; + for (i = 0; i < co->n_used; i++) { + amfree(co->ovr[i].key); + amfree(co->ovr[i].value); + } + amfree(co->ovr); + amfree(co); +} + +void add_config_overwrite( + config_overwrites_t *co, + char *key, + char *value) +{ + /* reallocate if necessary */ + if (co->n_used == co->n_allocated) { + co->n_allocated *= 2; + co->ovr = realloc(co->ovr, co->n_allocated * sizeof(*co->ovr)); + if (!co->ovr) { + error(_("Cannot realloc; out of memory")); + /* NOTREACHED */ } + } - if (isalpha(ch)) { /* identifier */ - buf = tkbuf; - token_overflow = 0; - do { - if (buf < tkbuf+sizeof(tkbuf)-1) { - *buf++ = (char)ch; - } else { - *buf = '\0'; - if (!token_overflow) { - conf_parserror("token too long: %.20s...", tkbuf); - } - token_overflow = 1; - } - ch = conftoken_getc(); - } while(isalnum(ch) || ch == '_' || ch == '-'); + co->ovr[co->n_used].key = stralloc(key); + co->ovr[co->n_used].value = stralloc(value); + co->n_used++; +} - if (ch != EOF && conftoken_ungetc(ch) == EOF) { - if (ferror(conf_conf)) { - conf_parserror("Pushback of '%c' failed: %s", - ch, strerror(ferror(conf_conf))); - } else { - conf_parserror("Pushback of '%c' failed: EOF", ch); - } - } - *buf = '\0'; +void +add_config_overwrite_opt( + config_overwrites_t *co, + char *optarg) +{ + char *value; + assert(optarg != NULL); - tokenval.v.s = tkbuf; + value = index(optarg, '='); + if (value == NULL) { + error(_("Must specify a value for %s."), optarg); + /* NOTREACHED */ + } - if (token_overflow) tok = CONF_UNKNOWN; - else if (exp == CONF_IDENT) tok = CONF_IDENT; - else tok = lookup_keyword(tokenval.v.s); - } - else if (isdigit(ch)) { /* integer */ - sign = 1; + *value = '\0'; + add_config_overwrite(co, optarg, value+1); + *value = '='; +} -negative_number: /* look for goto negative_number below sign is set there */ - am64 = 0; - do { - am64 = am64 * 10 + (ch - '0'); - ch = conftoken_getc(); - } while (isdigit(ch)); +config_overwrites_t * +extract_commandline_config_overwrites( + int *argc, + char ***argv) +{ + int i, j, moveup; + config_overwrites_t *co = new_config_overwrites(*argc/2); - if (ch != '.') { - if (exp == CONF_INT) { - tok = CONF_INT; - tokenval.v.i = sign * (int)am64; - } else if (exp == CONF_LONG) { - tok = CONF_LONG; - tokenval.v.l = (long)sign * (long)am64; - } else if (exp != CONF_REAL) { - tok = CONF_AM64; - tokenval.v.am64 = (off_t)sign * am64; - } else { - /* automatically convert to real when expected */ - tokenval.v.r = (double)sign * (double)am64; - tok = CONF_REAL; - } - } else { - /* got a real number, not an int */ - tokenval.v.r = sign * (double) am64; - am64 = 0; - d = 1; - ch = conftoken_getc(); - while (isdigit(ch)) { - am64 = am64 * 10 + (ch - '0'); - d = d * 10; - ch = conftoken_getc(); - } - tokenval.v.r += sign * ((double)am64) / d; - tok = CONF_REAL; + i = 0; + while (i<*argc) { + if(strncmp((*argv)[i],"-o",2) == 0) { + if(strlen((*argv)[i]) > 2) { + add_config_overwrite_opt(co, (*argv)[i]+2); + moveup = 1; } - - if (ch != EOF && conftoken_ungetc(ch) == EOF) { - if (ferror(conf_conf)) { - conf_parserror("Pushback of '%c' failed: %s", - ch, strerror(ferror(conf_conf))); - } else { - conf_parserror("Pushback of '%c' failed: EOF", ch); - } + else { + if (i+1 >= *argc) error(_("expect something after -o")); + add_config_overwrite_opt(co, (*argv)[i+1]); + moveup = 2; } - } else switch(ch) { - case '"': /* string */ - buf = tkbuf; - token_overflow = 0; - inquote = 1; - *buf++ = (char)ch; - while (inquote && ((ch = conftoken_getc()) != EOF)) { - if (ch == '\n') { - if (!escape) - break; - escape = 0; - buf--; /* Consume escape in buffer */ - } else if (ch == '\\') { - escape = 1; - } else { - if (ch == '"') { - if (!escape) - inquote = 0; - } - escape = 0; - } - if(buf >= &tkbuf[sizeof(tkbuf) - 1]) { - if (!token_overflow) { - conf_parserror("string too long: %.20s...", tkbuf); - } - token_overflow = 1; - break; - } - *buf++ = (char)ch; + /* move up remaining argment array */ + for (j = i; j+moveup<*argc; j++) { + (*argv)[j] = (*argv)[j+moveup]; } - *buf = '\0'; + *argc -= moveup; + } else { + i++; + } + } - /* - * A little manuver to leave a fully unquoted, unallocated string - * in tokenval.v.s - */ - tmps = unquote_string(tkbuf); - strncpy(tkbuf, tmps, sizeof(tkbuf)); - amfree(tmps); - tokenval.v.s = tkbuf; + return co; +} - tok = (token_overflow) ? CONF_UNKNOWN : - (exp == CONF_IDENT) ? CONF_IDENT : CONF_STRING; - break; +void +apply_config_overwrites( + config_overwrites_t *co) +{ + int i; - case '-': - ch = conftoken_getc(); - if (isdigit(ch)) { - sign = -1; - goto negative_number; - } - else { - if (ch != EOF && conftoken_ungetc(ch) == EOF) { - if (ferror(conf_conf)) { - conf_parserror("Pushback of '%c' failed: %s", - ch, strerror(ferror(conf_conf))); - } else { - conf_parserror("Pushback of '%c' failed: EOF", ch); - } - } - tok = CONF_UNKNOWN; - } - break; + if(!co) return; + assert(keytable != NULL); + assert(parsetable != NULL); - case ',': - tok = CONF_COMMA; - break; + for (i = 0; i < co->n_used; i++) { + char *key = co->ovr[i].key; + char *value = co->ovr[i].value; + val_t *key_val; + conf_var_t *key_parm; - case '{': - tok = CONF_LBRACE; - break; + if (!parm_key_info(key, &key_parm, &key_val)) { + error(_("unknown parameter '%s'"), key); + } - case '}': - tok = CONF_RBRACE; - break; + /* now set up a fake line and use the relevant read_function to + * parse it. This is sneaky! */ - case '\n': - tok = CONF_NL; - break; + if (key_parm->type == CONFTYPE_STR) { + current_line = vstralloc("\"", value, "\"", NULL); + } else { + current_line = stralloc(value); + } - case EOF: - tok = CONF_END; - break; + current_char = current_line; + token_pushed = 0; + current_line_num = -2; + allow_overwrites = 1; + got_parserror = 0; - default: - tok = CONF_UNKNOWN; - break; + key_parm->read_function(key_parm, key_val); + if ((key_parm)->validate_function) + key_parm->validate_function(key_parm, key_val); + + amfree(current_line); + current_char = NULL; + + if (got_parserror) { + error(_("parse error in configuration overwrites")); + /* NOTREACHED */ } } - if (exp != CONF_ANY && tok != exp) { - char *str; - keytab_t *kwp; + /* merge these overwrites with previous overwrites, if necessary */ + if (applied_config_overwrites) { + for (i = 0; i < co->n_used; i++) { + char *key = co->ovr[i].key; + char *value = co->ovr[i].value; - switch(exp) { - case CONF_LBRACE: - str = "\"{\""; - break; + add_config_overwrite(applied_config_overwrites, key, value); + } + free_config_overwrites(co); + } else { + applied_config_overwrites = co; + } - case CONF_RBRACE: - str = "\"}\""; - break; + update_derived_values(config_client); +} - case CONF_COMMA: - str = "\",\""; - break; +/* + * val_t Management Implementation + */ - case CONF_NL: - str = "end of line"; - break; +int +val_t_to_int( + val_t *val) +{ + if (val->type != CONFTYPE_INT) { + error(_("val_t_to_int: val.type is not CONFTYPE_INT")); + /*NOTREACHED*/ + } + return val_t__int(val); +} - case CONF_END: - str = "end of file"; - break; +off_t +val_t_to_am64( + val_t *val) +{ + if (val->type != CONFTYPE_AM64) { + error(_("val_t_to_am64: val.type is not CONFTYPE_AM64")); + /*NOTREACHED*/ + } + return val_t__am64(val); +} - case CONF_INT: - str = "an integer"; - break; +float +val_t_to_real( + val_t *val) +{ + if (val->type != CONFTYPE_REAL) { + error(_("val_t_to_real: val.type is not CONFTYPE_REAL")); + /*NOTREACHED*/ + } + return val_t__real(val); +} - case CONF_REAL: - str = "a real number"; - break; +char * +val_t_to_str( + val_t *val) +{ + /* support CONFTYPE_IDENT, too */ + if (val->type != CONFTYPE_STR && val->type != CONFTYPE_IDENT) { + error(_("val_t_to_str: val.type is not CONFTYPE_STR nor CONFTYPE_IDENT")); + /*NOTREACHED*/ + } + return val_t__str(val); +} - case CONF_STRING: - str = "a quoted string"; - break; +char * +val_t_to_ident( + val_t *val) +{ + /* support CONFTYPE_STR, too */ + if (val->type != CONFTYPE_STR && val->type != CONFTYPE_IDENT) { + error(_("val_t_to_ident: val.type is not CONFTYPE_IDENT nor CONFTYPE_STR")); + /*NOTREACHED*/ + } + return val_t__str(val); +} - case CONF_IDENT: - str = "an identifier"; - break; +time_t +val_t_to_time( + val_t *val) +{ + if (val->type != CONFTYPE_TIME) { + error(_("val_t_to_time: val.type is not CONFTYPE_TIME")); + /*NOTREACHED*/ + } + return val_t__time(val); +} - default: - for(kwp = keytable; kwp->keyword != NULL; kwp++) { - if (exp == kwp->token) - break; - } - if (kwp->keyword == NULL) - str = "token not"; - else - str = kwp->keyword; - break; - } - conf_parserror("%s is expected", str); - tok = exp; - if (tok == CONF_INT) - tokenval.v.i = 0; - else - tokenval.v.s = ""; +ssize_t +val_t_to_size( + val_t *val) +{ + if (val->type != CONFTYPE_SIZE) { + error(_("val_t_to_size: val.type is not CONFTYPE_SIZE")); + /*NOTREACHED*/ + } + return val_t__size(val); +} + +int +val_t_to_boolean( + val_t *val) +{ + if (val->type != CONFTYPE_BOOLEAN) { + error(_("val_t_to_bool: val.type is not CONFTYPE_BOOLEAN")); + /*NOTREACHED*/ } + return val_t__boolean(val); } +comp_t +val_t_to_compress( + val_t *val) +{ + if (val->type != CONFTYPE_COMPRESS) { + error(_("val_t_to_compress: val.type is not CONFTYPE_COMPRESS")); + /*NOTREACHED*/ + } + return val_t__compress(val); +} -static void -read_string( - t_conf_var *np, +encrypt_t +val_t_to_encrypt( val_t *val) { - np = np; - ckseen(&val->seen); - get_conftoken(CONF_STRING); - val->v.s = newstralloc(val->v.s, tokenval.v.s); + if (val->type != CONFTYPE_ENCRYPT) { + error(_("val_t_to_encrypt: val.type is not CONFTYPE_ENCRYPT")); + /*NOTREACHED*/ + } + return val_t__encrypt(val); } -static void -read_ident( - t_conf_var *np, +dump_holdingdisk_t +val_t_to_holding( val_t *val) { - np = np; - ckseen(&val->seen); - get_conftoken(CONF_IDENT); - val->v.s = newstralloc(val->v.s, tokenval.v.s); + if (val->type != CONFTYPE_HOLDING) { + error(_("val_t_to_hold: val.type is not CONFTYPE_HOLDING")); + /*NOTREACHED*/ + } + return val_t__holding(val); } -static void -read_int( - t_conf_var *np, +estimate_t +val_t_to_estimate( val_t *val) { - np = np; - ckseen(&val->seen); - val->v.i = get_int(); + if (val->type != CONFTYPE_ESTIMATE) { + error(_("val_t_to_extimate: val.type is not CONFTYPE_ESTIMATE")); + /*NOTREACHED*/ + } + return val_t__estimate(val); } -/* -static void -read_long( - t_conf_var *np, +strategy_t +val_t_to_strategy( val_t *val) { - np = np; - ckseen(&val->seen); - val->v.l = get_long(); + if (val->type != CONFTYPE_STRATEGY) { + error(_("val_t_to_strategy: val.type is not CONFTYPE_STRATEGY")); + /*NOTREACHED*/ + } + return val_t__strategy(val); } -*/ -static void -read_size( - t_conf_var *np, +taperalgo_t +val_t_to_taperalgo( val_t *val) { - np = np; - ckseen(&val->seen); - val->v.size = get_size(); + if (val->type != CONFTYPE_TAPERALGO) { + error(_("val_t_to_taperalgo: val.type is not CONFTYPE_TAPERALGO")); + /*NOTREACHED*/ + } + return val_t__taperalgo(val); } -static void -read_am64( - t_conf_var *np, +int +val_t_to_priority( val_t *val) { - np = np; - ckseen(&val->seen); - val->v.am64 = get_am64_t(); + if (val->type != CONFTYPE_PRIORITY) { + error(_("val_t_to_priority: val.type is not CONFTYPE_PRIORITY")); + /*NOTREACHED*/ + } + return val_t__priority(val); } -static void -read_bool( - t_conf_var *np, +float * +val_t_to_rate( val_t *val) { - np = np; - ckseen(&val->seen); - val->v.i = get_bool(); + if (val->type != CONFTYPE_RATE) { + error(_("val_t_to_rate: val.type is not CONFTYPE_RATE")); + /*NOTREACHED*/ + } + return val_t__rate(val); } -static void -read_real( - t_conf_var *np, +exinclude_t +val_t_to_exinclude( val_t *val) { - np = np; - ckseen(&val->seen); - get_conftoken(CONF_REAL); - val->v.r = tokenval.v.r; + if (val->type != CONFTYPE_EXINCLUDE) { + error(_("val_t_to_exinclude: val.type is not CONFTYPE_EXINCLUDE")); + /*NOTREACHED*/ + } + return val_t__exinclude(val); } -static void -read_time( - t_conf_var *np, + +int * +val_t_to_intrange( val_t *val) { - np = np; - ckseen(&val->seen); - val->v.t = get_time(); + if (val->type != CONFTYPE_INTRANGE) { + error(_("val_t_to_intrange: val.type is not CONFTYPE_INTRANGE")); + /*NOTREACHED*/ + } + return val_t__intrange(val); +} + +proplist_t +val_t_to_proplist( + val_t *val) +{ + if (val->type != CONFTYPE_PROPLIST) { + error(_("val_t_to_proplist: val.type is not CONFTYPE_PROPLIST")); + /*NOTREACHED*/ + } + return val_t__proplist(val); } static void @@ -4115,7 +4231,7 @@ copy_val_t( valdst->seen = valsrc->seen; switch(valsrc->type) { case CONFTYPE_INT: - case CONFTYPE_BOOL: + case CONFTYPE_BOOLEAN: case CONFTYPE_COMPRESS: case CONFTYPE_ENCRYPT: case CONFTYPE_HOLDING: @@ -4126,10 +4242,6 @@ copy_val_t( valdst->v.i = valsrc->v.i; break; - case CONFTYPE_LONG: - valdst->v.l = valsrc->v.l; - break; - case CONFTYPE_SIZE: valdst->v.size = valsrc->v.size; break; @@ -4147,1022 +4259,796 @@ copy_val_t( valdst->v.rate[1] = valsrc->v.rate[1]; break; - case CONFTYPE_IDENT: - case CONFTYPE_STRING: - valdst->v.s = stralloc(valsrc->v.s); - break; - - case CONFTYPE_TIME: - valdst->v.t = valsrc->v.t; - break; - - case CONFTYPE_SL: - valdst->v.sl = duplicate_sl(valsrc->v.sl); - break; - - case CONFTYPE_EXINCLUDE: - valdst->v.exinclude.optional = valsrc->v.exinclude.optional; - valdst->v.exinclude.sl_list = duplicate_sl(valsrc->v.exinclude.sl_list); - valdst->v.exinclude.sl_file = duplicate_sl(valsrc->v.exinclude.sl_file); - break; - - case CONFTYPE_INTRANGE: - valdst->v.intrange[0] = valsrc->v.intrange[0]; - valdst->v.intrange[1] = valsrc->v.intrange[1]; - break; - - } - } -} - -static void -free_val_t( - val_t *val) -{ - switch(val->type) { - case CONFTYPE_INT: - case CONFTYPE_BOOL: - case CONFTYPE_COMPRESS: - case CONFTYPE_ENCRYPT: - case CONFTYPE_HOLDING: - case CONFTYPE_ESTIMATE: - case CONFTYPE_STRATEGY: - case CONFTYPE_SIZE: - case CONFTYPE_TAPERALGO: - case CONFTYPE_PRIORITY: - case CONFTYPE_LONG: - case CONFTYPE_AM64: - case CONFTYPE_REAL: - case CONFTYPE_RATE: - case CONFTYPE_INTRANGE: - break; - - case CONFTYPE_IDENT: - case CONFTYPE_STRING: - amfree(val->v.s); - break; - - case CONFTYPE_TIME: - break; - - case CONFTYPE_SL: - free_sl(val->v.sl); - break; - - case CONFTYPE_EXINCLUDE: - free_sl(val->v.exinclude.sl_list); - free_sl(val->v.exinclude.sl_file); - break; - } - val->seen = 0; -} - -char * -taperalgo2str( - int taperalgo) -{ - if(taperalgo == ALGO_FIRST) return "FIRST"; - if(taperalgo == ALGO_FIRSTFIT) return "FIRSTFIT"; - if(taperalgo == ALGO_LARGEST) return "LARGEST"; - if(taperalgo == ALGO_LARGESTFIT) return "LARGESTFIT"; - if(taperalgo == ALGO_SMALLEST) return "SMALLEST"; - if(taperalgo == ALGO_LAST) return "LAST"; - return "UNKNOWN"; -} - -static char buffer_conf_print[2049]; - -static char * -conf_print( - val_t *val, - int str_need_quote, - char *prefix) -{ - char *buf; - int free_space; - - buffer_conf_print[0] = '\0'; - snprintf(buffer_conf_print, SIZEOF(buffer_conf_print), prefix); - free_space = SIZEOF(buffer_conf_print) - strlen(buffer_conf_print); - buf = buffer_conf_print + strlen(buffer_conf_print); - switch(val->type) { - case CONFTYPE_INT: - snprintf(buf, free_space, "%d", val->v.i); - break; - - case CONFTYPE_LONG: - snprintf(buf, free_space, "%ld", val->v.l); - break; - - case CONFTYPE_SIZE: - snprintf(buf, free_space, SSIZE_T_FMT, (SSIZE_T_FMT_TYPE)val->v.size); - break; - - case CONFTYPE_AM64: - snprintf(buf, free_space, OFF_T_FMT, (OFF_T_FMT_TYPE)val->v.am64); - break; - - case CONFTYPE_REAL: - snprintf(buf, free_space, "%0.5f" , val->v.r); - break; - - case CONFTYPE_RATE: - snprintf(buf, free_space, "%0.5f %0.5f", - val->v.rate[0], val->v.rate[1]); - break; - - case CONFTYPE_INTRANGE: - snprintf(buf, free_space, "%d,%d", - val->v.intrange[0], val->v.intrange[1]); - break; - - case CONFTYPE_IDENT: - if(val->v.s) { - strncpy(buf, val->v.s, free_space); - } - break; - - case CONFTYPE_STRING: - if(str_need_quote) { - *buf++ = '"'; - free_space++; - if(val->v.s) { - strncpy(buf, val->v.s, free_space); - buffer_conf_print[SIZEOF(buffer_conf_print) - 2] = '\0'; - buffer_conf_print[strlen(buffer_conf_print)] = '"'; - buffer_conf_print[strlen(buffer_conf_print) + 1] = '\0'; - } else { - *buf++ = '"'; - *buf++ = '\0'; - free_space -= 2; - } - } else { - if(val->v.s) { - strncpy(buf, val->v.s, free_space); - } - } - break; - - case CONFTYPE_TIME: - snprintf(buf, free_space, "%2d%02d", - (int)val->v.t/100, (int)val->v.t % 100); - break; - - case CONFTYPE_SL: - break; - - case CONFTYPE_EXINCLUDE: - buf = buffer_conf_print; - free_space = SIZEOF(buffer_conf_print); - - conf_print_exinclude(val, 1, 0, prefix, &buf ,&free_space); - *buf++ = '\n'; - free_space -= 1; - - conf_print_exinclude(val, 1, 1, prefix, &buf, &free_space); - break; - - case CONFTYPE_BOOL: - if(val->v.i) - strncpy(buf, "yes", free_space); - else - strncpy(buf, "no", free_space); - break; - - case CONFTYPE_STRATEGY: - switch(val->v.i) { - case DS_SKIP: - strncpy(buf, "SKIP", free_space); - break; - - case DS_STANDARD: - strncpy(buf, "STANDARD", free_space); - break; - - case DS_NOFULL: - strncpy(buf, "NOFULL", free_space); - break; - - case DS_NOINC: - strncpy(buf, "NOINC", free_space); - break; - - case DS_HANOI: - strncpy(buf, "HANOI", free_space); - break; - - case DS_INCRONLY: - strncpy(buf, "INCRONLY", free_space); - break; - } - break; - - case CONFTYPE_COMPRESS: - switch(val->v.i) { - case COMP_NONE: - strncpy(buf, "NONE", free_space); - break; - - case COMP_FAST: - strncpy(buf, "CLIENT FAST", free_space); - break; - - case COMP_BEST: - strncpy(buf, "CLIENT BEST", free_space); - break; - - case COMP_CUST: - strncpy(buf, "CLIENT CUSTOM", free_space); - break; - - case COMP_SERVER_FAST: - strncpy(buf, "SERVER FAST", free_space); - break; - - case COMP_SERVER_BEST: - strncpy(buf, "SERVER FAST", free_space); - break; - - case COMP_SERVER_CUST: - strncpy(buf, "SERVER CUSTOM", free_space); - break; - } - break; - - case CONFTYPE_ESTIMATE: - switch(val->v.i) { - case ES_CLIENT: - strncpy(buf, "CLIENT", free_space); - break; - - case ES_SERVER: - strncpy(buf, "SERVER", free_space); - break; - - case ES_CALCSIZE: - strncpy(buf, "CALCSIZE", free_space); + case CONFTYPE_IDENT: + case CONFTYPE_STR: + valdst->v.s = stralloc(valsrc->v.s); break; - } - break; - case CONFTYPE_ENCRYPT: - switch(val->v.i) { - case ENCRYPT_NONE: - strncpy(buf, "NONE", free_space); + case CONFTYPE_TIME: + valdst->v.t = valsrc->v.t; break; - case ENCRYPT_CUST: - strncpy(buf, "CLIENT", free_space); + case CONFTYPE_EXINCLUDE: + valdst->v.exinclude.optional = valsrc->v.exinclude.optional; + valdst->v.exinclude.sl_list = duplicate_sl(valsrc->v.exinclude.sl_list); + valdst->v.exinclude.sl_file = duplicate_sl(valsrc->v.exinclude.sl_file); break; - case ENCRYPT_SERV_CUST: - strncpy(buf, "SERVER", free_space); + case CONFTYPE_INTRANGE: + valdst->v.intrange[0] = valsrc->v.intrange[0]; + valdst->v.intrange[1] = valsrc->v.intrange[1]; break; + + case CONFTYPE_PROPLIST: + g_assert_not_reached(); + break; } - break; + } +} - case CONFTYPE_HOLDING: - switch(val->v.i) { - case HOLD_NEVER: - strncpy(buf, "NEVER", free_space); +static void +free_val_t( + val_t *val) +{ + switch(val->type) { + case CONFTYPE_INT: + case CONFTYPE_BOOLEAN: + case CONFTYPE_COMPRESS: + case CONFTYPE_ENCRYPT: + case CONFTYPE_HOLDING: + case CONFTYPE_ESTIMATE: + case CONFTYPE_STRATEGY: + case CONFTYPE_SIZE: + case CONFTYPE_TAPERALGO: + case CONFTYPE_PRIORITY: + case CONFTYPE_AM64: + case CONFTYPE_REAL: + case CONFTYPE_RATE: + case CONFTYPE_INTRANGE: break; - case HOLD_AUTO: - strncpy(buf, "AUTO", free_space); + case CONFTYPE_IDENT: + case CONFTYPE_STR: + amfree(val->v.s); break; - case HOLD_REQUIRED: - strncpy(buf, "REQUIRED", free_space); + case CONFTYPE_TIME: break; - } - break; - - case CONFTYPE_TAPERALGO: - strncpy(buf, taperalgo2str(val->v.i), free_space); - break; - case CONFTYPE_PRIORITY: - switch(val->v.i) { - case 0: - strncpy(buf, "LOW", free_space); + case CONFTYPE_EXINCLUDE: + free_sl(val_t__exinclude(val).sl_list); + free_sl(val_t__exinclude(val).sl_file); break; - case 1: - strncpy(buf, "MEDIUM", free_space); - break; + case CONFTYPE_PROPLIST: + g_hash_table_destroy(val_t__proplist(val)); + break; + } + val->seen = 0; +} - case 2: - strncpy(buf, "HIGH", free_space); - break; +/* + * Utilities Implementation + */ + +char * +generic_get_security_conf( + char *string, + void *arg) +{ + arg = arg; + if(!string || !*string) + return(NULL); + + if(strcmp(string, "krb5principal")==0) { + return(getconf_str(CNF_KRB5PRINCIPAL)); + } else if(strcmp(string, "krb5keytab")==0) { + return(getconf_str(CNF_KRB5KEYTAB)); } - break; - } - buffer_conf_print[SIZEOF(buffer_conf_print) - 1] = '\0'; - return buffer_conf_print; + return(NULL); } -void conf_print_exinclude( - val_t *val, - int str_need_quote, - int file, - char *prefix, - char **buf, - int *free_space) +char * +generic_client_get_security_conf( + char * string, + void * arg) { - sl_t *sl; - sle_t *excl; + (void)arg; /* Quiet unused parameter warning */ - (void)str_need_quote; + if(!string || !*string) + return(NULL); - snprintf(*buf, *free_space, prefix); - *free_space -= strlen(prefix); - *buf += strlen(prefix); + if(strcmp(string, "conf")==0) { + return(getconf_str(CNF_CONF)); + } else if(strcmp(string, "index_server")==0) { + return(getconf_str(CNF_INDEX_SERVER)); + } else if(strcmp(string, "tape_server")==0) { + return(getconf_str(CNF_TAPE_SERVER)); + } else if(strcmp(string, "tapedev")==0) { + return(getconf_str(CNF_TAPEDEV)); + } else if(strcmp(string, "auth")==0) { + return(getconf_str(CNF_AUTH)); + } else if(strcmp(string, "ssh_keys")==0) { + return(getconf_str(CNF_SSH_KEYS)); + } else if(strcmp(string, "amandad_path")==0) { + return(getconf_str(CNF_AMANDAD_PATH)); + } else if(strcmp(string, "client_username")==0) { + return(getconf_str(CNF_CLIENT_USERNAME)); + } else if(strcmp(string, "gnutar_list_dir")==0) { + return(getconf_str(CNF_GNUTAR_LIST_DIR)); + } else if(strcmp(string, "amandates")==0) { + return(getconf_str(CNF_AMANDATES)); + } else if(strcmp(string, "krb5principal")==0) { + return(getconf_str(CNF_KRB5PRINCIPAL)); + } else if(strcmp(string, "krb5keytab")==0) { + return(getconf_str(CNF_KRB5KEYTAB)); + } + return(NULL); +} - if (val->type != CONFTYPE_EXINCLUDE) { - strcpy(*buf, - "ERROR: conf_print_exinclude called for type != CONFTYPE_EXINCLUDE"); - return; - } +void +dump_configuration(void) +{ + tapetype_t *tp; + dumptype_t *dp; + interface_t *ip; + holdingdisk_t *hp; + int i; + conf_var_t *np; + keytab_t *kt; + char *prefix; - if (file == 0) { - sl = val->v.exinclude.sl_list; - strncpy(*buf, "LIST ", *free_space); - *buf += 5; - *free_space -= 5; - } else { - sl = val->v.exinclude.sl_file; - strncpy(*buf, "FILE ", *free_space); - *buf += 5; - *free_space -= 5; + if (config_client) { + error(_("Don't know how to dump client configurations.")); + /* NOTREACHED */ } - if (val->v.exinclude.optional == 1) { - strncpy(*buf, "OPTIONAL ", *free_space); - *buf += 9; - *free_space -= 9; + g_printf(_("# AMANDA CONFIGURATION FROM FILE \"%s\":\n\n"), config_filename); + + for(np=server_var; np->token != CONF_UNKNOWN; np++) { + for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) + if (np->token == kt->token) break; + + if(kt->token == CONF_UNKNOWN) + error(_("server bad token")); + + val_t_print_token(stdout, NULL, "%-21s ", kt, &conf_data[np->parm]); } - if (sl != NULL) { - for(excl = sl->first; excl != NULL; excl = excl->next) { - if (3 + (int)strlen(excl->name) < *free_space) { - *(*buf)++ = ' '; - *(*buf)++ = '"'; - strcpy(*buf, excl->name); - *buf += strlen(excl->name); - *(*buf)++ = '"'; - *free_space -= 3 + strlen(excl->name); + for(hp = holdinglist; hp != NULL; hp = hp->next) { + g_printf("\nHOLDINGDISK %s {\n", hp->name); + for(i=0; i < HOLDING_HOLDING; i++) { + for(np=holding_var; np->token != CONF_UNKNOWN; np++) { + if(np->parm == i) + break; + } + if(np->token == CONF_UNKNOWN) + error(_("holding bad value")); + + for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) { + if(kt->token == np->token) + break; } + if(kt->token == CONF_UNKNOWN) + error(_("holding bad token")); + + val_t_print_token(stdout, NULL, " %-9s ", kt, &hp->value[i]); } + g_printf("}\n"); } - return; -} + for(tp = tapelist; tp != NULL; tp = tp->next) { + if(tp->seen == -1) + prefix = "#"; + else + prefix = ""; + g_printf("\n%sDEFINE TAPETYPE %s {\n", prefix, tp->name); + for(i=0; i < TAPETYPE_TAPETYPE; i++) { + for(np=tapetype_var; np->token != CONF_UNKNOWN; np++) + if(np->parm == i) break; + if(np->token == CONF_UNKNOWN) + error(_("tapetype bad value")); -static void -conf_init_string( - val_t *val, - char *s) -{ - val->seen = 0; - val->type = CONFTYPE_STRING; - if(s) - val->v.s = stralloc(s); - else - val->v.s = NULL; -} + for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) + if(kt->token == np->token) break; + if(kt->token == CONF_UNKNOWN) + error(_("tapetype bad token")); -static void -conf_init_ident( - val_t *val, - char *s) -{ - val->seen = 0; - val->type = CONFTYPE_IDENT; - if(s) - val->v.s = stralloc(s); - else - val->v.s = NULL; -} + val_t_print_token(stdout, prefix, " %-9s ", kt, &tp->value[i]); + } + g_printf("%s}\n", prefix); + } -static void -conf_init_int( - val_t *val, - int i) -{ - val->seen = 0; - val->type = CONFTYPE_INT; - val->v.i = i; -} + for(dp = dumplist; dp != NULL; dp = dp->next) { + if (strncmp_const(dp->name, "custom(") != 0) { /* don't dump disklist-derived dumptypes */ + if(dp->seen == -1) + prefix = "#"; + else + prefix = ""; + g_printf("\n%sDEFINE DUMPTYPE %s {\n", prefix, dp->name); + for(i=0; i < DUMPTYPE_DUMPTYPE; i++) { + for(np=dumptype_var; np->token != CONF_UNKNOWN; np++) + if(np->parm == i) break; + if(np->token == CONF_UNKNOWN) + error(_("dumptype bad value")); -static void -conf_init_bool( - val_t *val, - int i) -{ - val->seen = 0; - val->type = CONFTYPE_BOOL; - val->v.i = i; -} + for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) + if(kt->token == np->token) break; + if(kt->token == CONF_UNKNOWN) + error(_("dumptype bad token")); -static void -conf_init_strategy( - val_t *val, - int i) -{ - val->seen = 0; - val->type = CONFTYPE_STRATEGY; - val->v.i = i; -} + val_t_print_token(stdout, prefix, " %-19s ", kt, &dp->value[i]); + } + g_printf("%s}\n", prefix); + } + } -static void -conf_init_estimate( - val_t *val, - int i) -{ - val->seen = 0; - val->type = CONFTYPE_ESTIMATE; - val->v.i = i; -} + for(ip = interface_list; ip != NULL; ip = ip->next) { + if(strcmp(ip->name,"default") == 0) + prefix = "#"; + else + prefix = ""; + g_printf("\n%sDEFINE INTERFACE %s {\n", prefix, ip->name); + for(i=0; i < INTER_INTER; i++) { + for(np=interface_var; np->token != CONF_UNKNOWN; np++) + if(np->parm == i) break; + if(np->token == CONF_UNKNOWN) + error(_("interface bad value")); -static void -conf_init_taperalgo( - val_t *val, - int i) -{ - val->seen = 0; - val->type = CONFTYPE_TAPERALGO; - val->v.i = i; -} + for(kt = server_keytab; kt->token != CONF_UNKNOWN; kt++) + if(kt->token == np->token) break; + if(kt->token == CONF_UNKNOWN) + error(_("interface bad token")); -static void -conf_init_priority( - val_t *val, - int i) -{ - val->seen = 0; - val->type = CONFTYPE_PRIORITY; - val->v.i = i; -} + val_t_print_token(stdout, prefix, " %-19s ", kt, &ip->value[i]); + } + g_printf("%s}\n",prefix); + } -static void -conf_init_compress( - val_t *val, - comp_t i) -{ - val->seen = 0; - val->type = CONFTYPE_COMPRESS; - val->v.i = (int)i; } static void -conf_init_encrypt( - val_t *val, - encrypt_t i) +val_t_print_token( + FILE *output, + char *prefix, + char *format, + keytab_t *kt, + val_t *val) { - val->seen = 0; - val->type = CONFTYPE_ENCRYPT; - val->v.i = (int)i; -} + char **dispstrs, **dispstr; + dispstrs = val_t_display_strs(val, 1); -static void -conf_init_holding( - val_t *val, - dump_holdingdisk_t i) -{ - val->seen = 0; - val->type = CONFTYPE_HOLDING; - val->v.i = (int)i; -} + /* For most configuration types, this outputs + * PREFIX KEYWORD DISPSTR + * for each of the display strings. For identifiers, however, it + * simply prints the first line of the display string. + */ -/* -static void -conf_init_long( - val_t *val, - long l) -{ - val->seen = 0; - val->type = CONFTYPE_LONG; - val->v.l = l; -} -*/ + /* Print the keyword for anything that is not itself an identifier */ + if (kt->token != CONF_IDENT) { + for(dispstr=dispstrs; *dispstr!=NULL; dispstr++) { + if (prefix) + g_fprintf(output, "%s", prefix); + g_fprintf(output, format, kt->keyword); + g_fprintf(output, "%s\n", *dispstr); + } + } else { + /* for identifiers, assume there's at most one display string */ + assert(g_strv_length(dispstrs) <= 1); + if (*dispstrs) { + g_fprintf(output, "%s\n", *dispstrs); + } + } -static void -conf_init_size( - val_t *val, - ssize_t sz) -{ - val->seen = 0; - val->type = CONFTYPE_SIZE; - val->v.size = sz; + g_strfreev(dispstrs); } -static void -conf_init_am64( +char ** +val_t_display_strs( val_t *val, - off_t l) + int str_need_quote) { - val->seen = 0; - val->type = CONFTYPE_AM64; - val->v.am64 = l; -} + char **buf; + buf = malloc(3*SIZEOF(char *)); + buf[0] = NULL; + buf[1] = NULL; + buf[2] = NULL; -static void -conf_init_real( - val_t *val, - double r) -{ - val->seen = 0; - val->type = CONFTYPE_REAL; - val->v.r = r; -} + switch(val->type) { + case CONFTYPE_INT: + buf[0] = vstrallocf("%d", val_t__int(val)); + break; -static void -conf_init_rate( - val_t *val, - double r1, - double r2) -{ - val->seen = 0; - val->type = CONFTYPE_RATE; - val->v.rate[0] = r1; - val->v.rate[1] = r2; -} + case CONFTYPE_SIZE: + buf[0] = vstrallocf("%zd", (ssize_t)val_t__size(val)); + break; -static void -conf_init_intrange( - val_t *val, - int i1, - int i2) -{ - val->seen = 0; - val->type = CONFTYPE_INTRANGE; - val->v.intrange[0] = i1; - val->v.intrange[1] = i2; -} + case CONFTYPE_AM64: + buf[0] = vstrallocf("%lld", (long long)val_t__am64(val)); + break; -static void -conf_init_time( - val_t *val, - time_t t) -{ - val->seen = 0; - val->type = CONFTYPE_TIME; - val->v.t = t; -} + case CONFTYPE_REAL: + buf[0] = vstrallocf("%0.5f", val_t__real(val)); + break; -/* -static void -conf_init_sl( - val_t *val, - sl_t *sl) -{ - val->seen = 0; - val->type = CONFTYPE_AM64; - val->v.sl = sl; -} -*/ + case CONFTYPE_RATE: + buf[0] = vstrallocf("%0.5f %0.5f", val_t__rate(val)[0], val_t__rate(val)[1]); + break; -static void -conf_init_exinclude( - val_t *val) -{ - val->seen = 0; - val->type = CONFTYPE_EXINCLUDE; - val->v.exinclude.optional = 0; - val->v.exinclude.sl_list = NULL; - val->v.exinclude.sl_file = NULL; -} + case CONFTYPE_INTRANGE: + buf[0] = vstrallocf("%d,%d", val_t__intrange(val)[0], val_t__intrange(val)[1]); + break; -static void -conf_set_string( - val_t *val, - char *s) -{ - val->seen = -1; - val->type = CONFTYPE_STRING; - amfree(val->v.s); - val->v.s = stralloc(s); -} + case CONFTYPE_IDENT: + if(val->v.s) { + buf[0] = stralloc(val->v.s); + } else { + buf[0] = stralloc(""); + } + break; -/* -static void -conf_set_int( - val_t *val, - int i) -{ - val->seen = -1; - val->type = CONFTYPE_INT; - val->v.i = i; -} -*/ + case CONFTYPE_STR: + if(str_need_quote) { + if(val->v.s) { + buf[0] = vstrallocf("\"%s\"", val->v.s); + } else { + buf[0] = stralloc("\"\""); + } + } else { + if(val->v.s) { + buf[0] = stralloc(val->v.s); + } else { + buf[0] = stralloc(""); + } + } + break; -static void -conf_set_bool( - val_t *val, - int i) -{ - val->seen = -1; - val->type = CONFTYPE_BOOL; - val->v.i = i; -} + case CONFTYPE_TIME: + buf[0] = vstrallocf("%2d%02d", + (int)val_t__time(val)/100, (int)val_t__time(val) % 100); + break; -static void -conf_set_compress( - val_t *val, - comp_t i) -{ - val->seen = -1; - val->type = CONFTYPE_COMPRESS; - val->v.i = (int)i; -} + case CONFTYPE_EXINCLUDE: { + buf[0] = exinclude_display_str(val, 0); + buf[1] = exinclude_display_str(val, 1); + break; + } -/* -static void -conf_set_encrypt( - val_t *val, - encrypt_t i) -{ - val->seen = -1; - val->type = CONFTYPE_COMPRESS; - val->v.i = (int)i; -} -*/ + case CONFTYPE_BOOLEAN: + if(val_t__boolean(val)) + buf[0] = stralloc("yes"); + else + buf[0] = stralloc("no"); + break; -static void -conf_set_holding( - val_t *val, - dump_holdingdisk_t i) -{ - val->seen = -1; - val->type = CONFTYPE_HOLDING; - val->v.i = (int)i; -} + case CONFTYPE_STRATEGY: + switch(val_t__strategy(val)) { + case DS_SKIP: + buf[0] = vstrallocf("SKIP"); + break; -static void -conf_set_strategy( - val_t *val, - int i) -{ - val->seen = -1; - val->type = CONFTYPE_STRATEGY; - val->v.i = i; -} + case DS_STANDARD: + buf[0] = vstrallocf("STANDARD"); + break; + + case DS_NOFULL: + buf[0] = vstrallocf("NOFULL"); + break; + + case DS_NOINC: + buf[0] = vstrallocf("NOINC"); + break; + + case DS_HANOI: + buf[0] = vstrallocf("HANOI"); + break; + + case DS_INCRONLY: + buf[0] = vstrallocf("INCRONLY"); + break; + } + break; + + case CONFTYPE_COMPRESS: + switch(val_t__compress(val)) { + case COMP_NONE: + buf[0] = vstrallocf("NONE"); + break; + + case COMP_FAST: + buf[0] = vstrallocf("CLIENT FAST"); + break; + + case COMP_BEST: + buf[0] = vstrallocf("CLIENT BEST"); + break; + + case COMP_CUST: + buf[0] = vstrallocf("CLIENT CUSTOM"); + break; + + case COMP_SERVER_FAST: + buf[0] = vstrallocf("SERVER FAST"); + break; + + case COMP_SERVER_BEST: + buf[0] = vstrallocf("SERVER BEST"); + break; + + case COMP_SERVER_CUST: + buf[0] = vstrallocf("SERVER CUSTOM"); + break; + } + break; + + case CONFTYPE_ESTIMATE: + switch(val_t__estimate(val)) { + case ES_CLIENT: + buf[0] = vstrallocf("CLIENT"); + break; + + case ES_SERVER: + buf[0] = vstrallocf("SERVER"); + break; + + case ES_CALCSIZE: + buf[0] = vstrallocf("CALCSIZE"); + break; + } + break; + + case CONFTYPE_ENCRYPT: + switch(val_t__encrypt(val)) { + case ENCRYPT_NONE: + buf[0] = vstrallocf("NONE"); + break; + + case ENCRYPT_CUST: + buf[0] = vstrallocf("CLIENT"); + break; + + case ENCRYPT_SERV_CUST: + buf[0] = vstrallocf("SERVER"); + break; + } + break; + + case CONFTYPE_HOLDING: + switch(val_t__holding(val)) { + case HOLD_NEVER: + buf[0] = vstrallocf("NEVER"); + break; + + case HOLD_AUTO: + buf[0] = vstrallocf("AUTO"); + break; + + case HOLD_REQUIRED: + buf[0] = vstrallocf("REQUIRED"); + break; + } + break; + case CONFTYPE_TAPERALGO: + buf[0] = vstrallocf("%s", taperalgo2str(val_t__taperalgo(val))); + break; -int -get_conftype_int( - val_t *val) -{ - if (val->type != CONFTYPE_INT) { - error("get_conftype_int: val.type is not CONFTYPE_INT"); - /*NOTREACHED*/ - } - return val->v.i; -} + case CONFTYPE_PRIORITY: + switch(val_t__priority(val)) { + case 0: + buf[0] = vstrallocf("LOW"); + break; -long -get_conftype_long( - val_t *val) -{ - if (val->type != CONFTYPE_LONG) { - error("get_conftype_long: val.type is not CONFTYPE_LONG"); - /*NOTREACHED*/ - } - return val->v.l; -} + case 1: + buf[0] = vstrallocf("MEDIUM"); + break; -off_t -get_conftype_am64( - val_t *val) -{ - if (val->type != CONFTYPE_AM64) { - error("get_conftype_am64: val.type is not CONFTYPE_AM64"); - /*NOTREACHED*/ - } - return val->v.am64; -} + case 2: + buf[0] = vstrallocf("HIGH"); + break; + } + break; -double -get_conftype_real( - val_t *val) -{ - if (val->type != CONFTYPE_REAL) { - error("get_conftype_real: val.type is not CONFTYPE_REAL"); - /*NOTREACHED*/ - } - return val->v.r; -} + case CONFTYPE_PROPLIST: { + int nb_property; + char **mybuf; -char * -get_conftype_string( - val_t *val) -{ - if (val->type != CONFTYPE_STRING) { - error("get_conftype_string: val.type is not CONFTYPE_STRING"); - /*NOTREACHED*/ + nb_property = g_hash_table_size(val_t__proplist(val)); + amfree(buf); + buf = malloc((nb_property+1)*SIZEOF(char*)); + buf[nb_property] = NULL; + mybuf = buf; + g_hash_table_foreach(val_t__proplist(val), proplist_display_str_foreach_fn, &mybuf); + break; } - return val->v.s; -} - -char * -get_conftype_ident( - val_t *val) -{ - if (val->type != CONFTYPE_IDENT) { - error("get_conftype_ident: val.type is not CONFTYPE_IDENT"); - /*NOTREACHED*/ } - return val->v.s; + return buf; } -time_t -get_conftype_time( - val_t *val) +static void +proplist_display_str_foreach_fn( + gpointer key_p, + gpointer value_p, + gpointer user_data_p) { - if (val->type != CONFTYPE_TIME) { - error("get_conftype_time: val.type is not CONFTYPE_TIME"); - /*NOTREACHED*/ - } - return val->v.t; -} + char *property_s = key_p; + char *value_s = value_p; + char ***msg = (char ***)user_data_p; -ssize_t -get_conftype_size( - val_t *val) -{ - if (val->type != CONFTYPE_SIZE) { - error("get_conftype_size: val.type is not CONFTYPE_SIZE"); - /*NOTREACHED*/ - } - return val->v.size; + **msg = vstralloc("\"", property_s, "\" \"", value_s, "\"", NULL); + (*msg)++; } -sl_t * -get_conftype_sl( - val_t *val) +static char * +exinclude_display_str( + val_t *val, + int file) { - if (val->type != CONFTYPE_SL) { - error("get_conftype_size: val.type is not CONFTYPE_SL"); - /*NOTREACHED*/ - } - return val->v.sl; -} + sl_t *sl; + sle_t *excl; + char *rval; -int -get_conftype_bool( - val_t *val) -{ - if (val->type != CONFTYPE_BOOL) { - error("get_conftype_bool: val.type is not CONFTYPE_BOOL"); - /*NOTREACHED*/ - } - return val->v.i; -} + assert(val->type == CONFTYPE_EXINCLUDE); -int -get_conftype_hold( - val_t *val) -{ - if (val->type != CONFTYPE_HOLDING) { - error("get_conftype_hold: val.type is not CONFTYPE_HOLDING"); - /*NOTREACHED*/ - } - return val->v.i; -} + rval = stralloc(""); -int -get_conftype_compress( - val_t *val) -{ - if (val->type != CONFTYPE_COMPRESS) { - error("get_conftype_compress: val.type is not CONFTYPE_COMPRESS"); - /*NOTREACHED*/ + if (file == 0) { + sl = val_t__exinclude(val).sl_list; + strappend(rval, "LIST"); + } else { + sl = val_t__exinclude(val).sl_file; + strappend(rval, "FILE"); } - return val->v.i; -} -int -get_conftype_encrypt( - val_t *val) -{ - if (val->type != CONFTYPE_ENCRYPT) { - error("get_conftype_encrypt: val.type is not CONFTYPE_ENCRYPT"); - /*NOTREACHED*/ + if (val_t__exinclude(val).optional == 1) { + strappend(rval, " OPTIONAL"); } - return val->v.i; -} -int -get_conftype_estimate( - val_t *val) -{ - if (val->type != CONFTYPE_ESTIMATE) { - error("get_conftype_extimate: val.type is not CONFTYPE_ESTIMATE"); - /*NOTREACHED*/ + if (sl != NULL) { + for(excl = sl->first; excl != NULL; excl = excl->next) { + vstrextend(&rval, " \"", excl->name, "\"", NULL); + } } - return val->v.i; -} -int -get_conftype_strategy( - val_t *val) -{ - if (val->type != CONFTYPE_STRATEGY) { - error("get_conftype_strategy: val.type is not CONFTYPE_STRATEGY"); - /*NOTREACHED*/ - } - return val->v.i; + return rval; } -int -get_conftype_taperalgo( - val_t *val) +char * +taperalgo2str( + taperalgo_t taperalgo) { - if (val->type != CONFTYPE_TAPERALGO) { - error("get_conftype_taperalgo: val.type is not CONFTYPE_TAPERALGO"); - /*NOTREACHED*/ - } - return val->v.i; + if(taperalgo == ALGO_FIRST) return "FIRST"; + if(taperalgo == ALGO_FIRSTFIT) return "FIRSTFIT"; + if(taperalgo == ALGO_LARGEST) return "LARGEST"; + if(taperalgo == ALGO_LARGESTFIT) return "LARGESTFIT"; + if(taperalgo == ALGO_SMALLEST) return "SMALLEST"; + if(taperalgo == ALGO_LAST) return "LAST"; + return "UNKNOWN"; } -int -get_conftype_priority( - val_t *val) +char * +config_dir_relative( + char *filename) { - if (val->type != CONFTYPE_PRIORITY) { - error("get_conftype_priority: val.type is not CONFTYPE_PRIORITY"); - /*NOTREACHED*/ + if (*filename == '/' || config_dir == NULL) { + return stralloc(filename); + } else { + if (config_dir[strlen(config_dir)-1] == '/') { + return vstralloc(config_dir, filename, NULL); + } else { + return vstralloc(config_dir, "/", filename, NULL); + } } - return val->v.i; } -exinclude_t -get_conftype_exinclude( - val_t *val) +static int +parm_key_info( + char *key, + conf_var_t **parm, + val_t **val) { - if (val->type != CONFTYPE_EXINCLUDE) { - error("get_conftype_exinclude: val.type is not CONFTYPE_EXINCLUDE"); - /*NOTREACHED*/ - } - return val->v.exinclude; -} + conf_var_t *np; + keytab_t *kt; + char *s; + char ch; + char *subsec_type; + char *subsec_name; + char *subsec_key; + tapetype_t *tp; + dumptype_t *dp; + interface_t *ip; + holdingdisk_t *hp; + int success = FALSE; + /* WARNING: assumes globals keytable and parsetable are set correctly. */ + assert(keytable != NULL); + assert(parsetable != NULL); -static void -read_block( - command_option_t *command_options, - t_conf_var *read_var, - keytab_t *keytab, - val_t *valarray, - char *prefix, - char *errormsg, - int read_brace, - void (*copy_function)(void)) -{ - t_conf_var *np; - int saved_conf_line_num; - int done; + /* make a copy we can stomp on */ + key = stralloc(key); - if(read_brace) { - get_conftoken(CONF_LBRACE); - get_conftoken(CONF_NL); + /* uppercase the key */ + s = key; + for (s = key; (ch = *s) != 0; s++) { + if(islower((int)ch)) + *s = (char)toupper(ch); } - done = 0; - do { - conf_line_num += 1; - get_conftoken(CONF_ANY); - switch(tok) { - case CONF_RBRACE: - done = 1; - break; - case CONF_NL: /* empty line */ - break; - case CONF_END: /* end of file */ - done = 1; - break; - case CONF_IDENT: - case CONF_STRING: - if(copy_function) - copy_function(); - else - conf_parserror("ident not expected"); - break; - default: - { - for(np = read_var; np->token != CONF_UNKNOWN; np++) - if(np->token == tok) break; + subsec_name = strchr(key, ':'); + if (subsec_name) { + subsec_type = key; - if(np->token == CONF_UNKNOWN) - conf_parserror(errormsg); - else { - np->read_function(np, &valarray[np->parm]); - if(np->validate) - np->validate(np, &valarray[np->parm]); - } - } - } - if(tok != CONF_NL && tok != CONF_END && tok != CONF_RBRACE) - get_conftoken(CONF_NL); - } while(!done); + *subsec_name = '\0'; + subsec_name++; - /* overwrite with command line option */ - saved_conf_line_num = conf_line_num; - command_overwrite(command_options, read_var, keytab, valarray, prefix); - conf_line_num = saved_conf_line_num; -} + subsec_key = strchr(subsec_name,':'); + if(!subsec_key) goto out; /* failure */ -void -command_overwrite( - command_option_t *command_options, - t_conf_var *overwrite_var, - keytab_t *keytab, - val_t *valarray, - char *prefix) -{ - t_conf_var *np; - keytab_t *kt; - char *myprefix; - command_option_t *command_option; - int duplicate; + *subsec_key = '\0'; + subsec_key++; + + /* If the keyword doesn't exist, there's no need to look up the + * subsection -- we know it's invalid */ + for(kt = keytable; kt->token != CONF_UNKNOWN; kt++) { + if(kt->keyword && strcmp(kt->keyword, subsec_key) == 0) + break; + } + if(kt->token == CONF_UNKNOWN) goto out; - if(!command_options) return; + /* Otherwise, figure out which kind of subsection we're dealing with, + * and parse against that. */ + if (strcmp(subsec_type, "TAPETYPE") == 0) { + tp = lookup_tapetype(subsec_name); + if (!tp) goto out; + for(np = tapetype_var; np->token != CONF_UNKNOWN; np++) { + if(np->token == kt->token) + break; + } + if (np->token == CONF_UNKNOWN) goto out; + + if (val) *val = &tp->value[np->parm]; + if (parm) *parm = np; + success = TRUE; + } else if (strcmp(subsec_type, "DUMPTYPE") == 0) { + dp = lookup_dumptype(subsec_name); + if (!dp) goto out; + for(np = dumptype_var; np->token != CONF_UNKNOWN; np++) { + if(np->token == kt->token) + break; + } + if (np->token == CONF_UNKNOWN) goto out; + + if (val) *val = &dp->value[np->parm]; + if (parm) *parm = np; + success = TRUE; + } else if (strcmp(subsec_type, "HOLDINGDISK") == 0) { + hp = lookup_holdingdisk(subsec_name); + if (!hp) goto out; + for(np = holding_var; np->token != CONF_UNKNOWN; np++) { + if(np->token == kt->token) + break; + } + if (np->token == CONF_UNKNOWN) goto out; + + if (val) *val = &hp->value[np->parm]; + if (parm) *parm = np; + success = TRUE; + } else if (strcmp(subsec_type, "INTERFACE") == 0) { + ip = lookup_interface(subsec_name); + if (!ip) goto out; + for(np = interface_var; np->token != CONF_UNKNOWN; np++) { + if(np->token == kt->token) + break; + } + if (np->token == CONF_UNKNOWN) goto out; - for(np = overwrite_var; np->token != CONF_UNKNOWN; np++) { - for(kt = keytab; kt->token != CONF_UNKNOWN; kt++) - if(kt->token == np->token) break; + if (val) *val = &ip->value[np->parm]; + if (parm) *parm = np; + success = TRUE; + } - if(kt->token == CONF_UNKNOWN) { - error("command_overwrite: invalid token"); - /* NOTREACHED */ + /* No delimiters -- we're referencing a global config parameter */ + } else { + /* look up the keyword */ + for(kt = keytable; kt->token != CONF_UNKNOWN; kt++) { + if(kt->keyword && strcmp(kt->keyword, key) == 0) + break; } + if(kt->token == CONF_UNKNOWN) goto out; - for(command_option = command_options; command_option->name != NULL; - command_option++) { - myprefix = stralloc2(prefix, kt->keyword); - if(strcasecmp(myprefix, command_option->name) == 0) { - duplicate = 0; - if (command_option->used == 0 && - valarray[np->parm].seen == -2) { - duplicate = 1; - } - command_option->used = 1; - valarray[np->parm].seen = -2; - if(np->type == CONFTYPE_STRING && - command_option->value[0] != '"') { - conf_line = vstralloc("\"", command_option->value, "\"", - NULL); - } - else { - conf_line = stralloc(command_option->value); - } - conf_char = conf_line; - token_pushed = 0; - conf_line_num = -2; - np->read_function(np, &valarray[np->parm]); - amfree(conf_line); - conf_line = conf_char = NULL; - - if (np->validate) - np->validate(np, &valarray[np->parm]); - if (duplicate == 1) { - fprintf(stderr,"Duplicate %s option, using %s\n", - command_option->name, command_option->value); - } - } - amfree(myprefix); + /* and then look that up in the parse table */ + for(np = parsetable; np->token != CONF_UNKNOWN; np++) { + if(np->token == kt->token) + break; } + if(np->token == CONF_UNKNOWN) goto out; + + if (val) *val = &conf_data[np->parm]; + if (parm) *parm = np; + success = TRUE; } + +out: + amfree(key); + return success; } -void -free_new_argv( - int new_argc, - char **new_argv) +gint64 +find_multiplier( + char * casestr) { - int i; - for(i=0; ikeyword != NULL; + table_entry ++) { + if (strcmp(casestr, table_entry->keyword) == 0) { + g_free(str); + switch (table_entry->token) { + case CONF_MULT1K: + return 1024; + case CONF_MULT1M: + return 1024*1024; + case CONF_MULT1G: + return 1024*1024*1024; + case CONF_MULT7: + return 7; + case CONF_AMINFINITY: + return G_MAXINT64; + case CONF_MULT1: + case CONF_IDENT: + return 1; + default: + /* Should not happen. */ + return 0; + } + } + } + + /* None found; this is an error. */ + g_free(str); + return 0; } -ssize_t -getconf_readblocksize(void) -{ - tapetype_t *tape; - char *conf_tapetype; +/* + * Error Handling Implementaiton + */ + +static void print_parse_problem(const char * format, va_list argp) { + const char *xlated_fmt = gettext(format); - if (conffile_init == 1) { - conf_tapetype = getconf_str(CNF_TAPETYPE); + if(current_line) + g_fprintf(stderr, _("argument \"%s\": "), current_line); + else if (current_filename && current_line_num > 0) + g_fprintf(stderr, "\"%s\", line %d: ", current_filename, current_line_num); + else + g_fprintf(stderr, _("parse error: ")); + + g_vfprintf(stderr, xlated_fmt, argp); + fputc('\n', stderr); +} - if (!conf_tapetype || strlen(conf_tapetype) == 0) - return MAX_TAPE_BLOCK_KB; +printf_arglist_function(void conf_parserror, const char *, format) +{ + va_list argp; + + arglist_start(argp, format); + print_parse_problem(format, argp); + arglist_end(argp); - tape = lookup_tapetype(conf_tapetype); - if (!tape) - return MAX_TAPE_BLOCK_KB; - return tapetype_get_readblocksize(tape); - } + got_parserror = TRUE; +} - return MAX_TAPE_BLOCK_KB; +printf_arglist_function(void conf_parswarn, const char *, format) { + va_list argp; + + arglist_start(argp, format); + print_parse_problem(format, argp); + arglist_end(argp); } diff --git a/common-src/conffile.h b/common-src/conffile.h index 787f514..8873cec 100644 --- a/common-src/conffile.h +++ b/common-src/conffile.h @@ -21,8 +21,8 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: James da Silva, Systems Design and Analysis Group - * Computer Science Department - * University of Maryland at College Park + * Computer Science Department + * University of Maryland at College Park */ /* * $Id: conffile.h,v 1.72 2006/07/26 15:17:37 martinea Exp $ @@ -33,11 +33,231 @@ #define CONFFILE_H #include "amanda.h" -#include "conffile.h" #include "util.h" -#define CONFFILE_NAME "amanda.conf" +/* Getting Configuration Values + * ============================ + * + * Amanda configurations consist of a number of "global" parameters, as well as named + * subsections of four types: dumptypes, interfaces, holdingdisks, and tapetypes. The + * global parameters are fetched with the getconf_CONFTYPE functions, keyed by a + * confparam_t constant (with prefix CNF_). The subsection parameters are fetched with + * SUBSEC_get_PARAM() macros, e.g., tapetype_get_blocksize(ttyp), where the argument + * comes from lookup_SUBSEC(), in this case lookup_tapetype(name). + * + * Types + * ===== + * + * This module juggles two kinds of types: C types and conftypes. Conftypes include + * everything from integers through property lists, and are specific to the needs of + * the configuration system. Each conftype has a corresponding C type, which is of course + * necessary to actually use the data. + * + * The val_t__CONFTYPE macros represent the canonical correspondance of conftypes to C + * types, but in general the relationship is obvious: ints, strings, reals, and so forth + * are represented directly. Enumerated conftypes are represented by the corresponding + * C enum type. The 'rate' conftype is represented as a 2-element array of doubles, and + * the 'intrange' conftype is represented as a 2-element array of ints. exincludes are + * a exinclude_t *, and a proplist is represented as a GHashTable *. + * + * Memory + * ====== + * Note that, unless specified, all memory in this module is managed by the module + * itself; return strings should not be freed by the caller. + */ + +/* + * Generic values + * + * This module uses a generic val_t type to hold values of various types -- it's basically + * a union with type information and a 'seen' flag. In a way, it's a very simple equivalent + * to Glib's GValue. It's worth considering rewriting this with GValue, but for the moment, + * this works and it's here. + */ + +/* holdingdisk types */ +typedef enum { + HOLD_NEVER, /* Always direct to tape */ + HOLD_AUTO, /* If possible */ + HOLD_REQUIRED /* Always to holding disk */ +} dump_holdingdisk_t; + +/* Compression types */ +typedef enum { + COMP_NONE, /* No compression */ + COMP_FAST, /* Fast compression on client */ + COMP_BEST, /* Best compression on client */ + COMP_CUST, /* Custom compression on client */ + COMP_SERVER_FAST, /* Fast compression on server */ + COMP_SERVER_BEST, /* Best compression on server */ + COMP_SERVER_CUST /* Custom compression on server */ +} comp_t; + +/* Encryption types */ +typedef enum { + ENCRYPT_NONE, /* No encryption */ + ENCRYPT_CUST, /* Custom encryption on client */ + ENCRYPT_SERV_CUST /* Custom encryption on server */ +} encrypt_t; + +/* Estimate strategies */ +typedef enum { + ES_CLIENT, /* client estimate */ + ES_SERVER, /* server estimate */ + ES_CALCSIZE, /* calcsize estimate */ + ES_ES /* sentinel */ +} estimate_t; + +/* Dump strategies */ +typedef enum { + DS_SKIP, /* Don't do any dumps at all */ + DS_STANDARD, /* Standard (0 1 1 1 1 2 2 2 ...) */ + DS_NOFULL, /* No full's (1 1 1 ...) */ + DS_NOINC, /* No inc's (0 0 0 ...) */ + DS_4, /* ? (0 1 2 3 4 5 6 7 8 9 10 11 ...) */ + DS_5, /* ? (0 1 1 1 1 1 1 1 1 1 1 1 ...) */ + DS_HANOI, /* Tower of Hanoi (? ? ? ? ? ...) */ + DS_INCRONLY, /* Forced fulls (0 1 1 2 2 FORCE0 1 1 ...) */ + DS_DS /* sentinel */ +} strategy_t; + +typedef enum { + ALGO_FIRST, + ALGO_FIRSTFIT, + ALGO_LARGEST, + ALGO_LARGESTFIT, + ALGO_SMALLEST, + ALGO_LAST, + ALGO_ALGO /* sentinel */ +} taperalgo_t; + +typedef struct exinclude_s { + sl_t *sl_list; + sl_t *sl_file; + int optional; +} exinclude_t; +typedef GHashTable* proplist_t; + +/* Names for the type of value in a val_t. Mostly for internal use, but useful + * for wrapping val_t's, too. */ +typedef enum { + CONFTYPE_INT, + CONFTYPE_AM64, + CONFTYPE_REAL, + CONFTYPE_STR, + CONFTYPE_IDENT, + CONFTYPE_TIME, + CONFTYPE_SIZE, + CONFTYPE_BOOLEAN, + CONFTYPE_COMPRESS, + CONFTYPE_ENCRYPT, + CONFTYPE_HOLDING, + CONFTYPE_ESTIMATE, + CONFTYPE_STRATEGY, + CONFTYPE_TAPERALGO, + CONFTYPE_PRIORITY, + CONFTYPE_RATE, + CONFTYPE_INTRANGE, + CONFTYPE_EXINCLUDE, + CONFTYPE_PROPLIST +} conftype_t; + +/* This should be considered an opaque type for any other modules. The complete + * struct is included here to allow quick access via macros. Access it *only* through + * those macros. */ +typedef struct val_s { + union { + int i; + off_t am64; + double r; + char *s; + ssize_t size; + time_t t; + float rate[2]; + exinclude_t exinclude; + int intrange[2]; + proplist_t proplist; + } v; + int seen; + conftype_t type; +} val_t; + +/* Functions to typecheck and extract a particular type of + * value from a val_t. All call error() if the type is incorrect, + * as this is a programming error. */ +int val_t_to_int (val_t *); +off_t val_t_to_am64 (val_t *); +float val_t_to_real (val_t *); +char *val_t_to_str (val_t *); /* (also converts CONFTYPE_IDENT) */ +char *val_t_to_ident (val_t *); /* (also converts CONFTYPE_STR) */ +time_t val_t_to_time (val_t *); +ssize_t val_t_to_size (val_t *); +int val_t_to_boolean (val_t *); +comp_t val_t_to_compress (val_t *); +encrypt_t val_t_to_encrypt (val_t *); +dump_holdingdisk_t val_t_to_holding (val_t *); +estimate_t val_t_to_estimate (val_t *); +strategy_t val_t_to_strategy (val_t *); +taperalgo_t val_t_to_taperalgo(val_t *); +int val_t_to_priority (val_t *); +float *val_t_to_rate (val_t *); /* array of two floats */ +exinclude_t val_t_to_exinclude(val_t *); +int *val_t_to_intrange (val_t *); /* array of two ints */ +proplist_t val_t_to_proplist (val_t *); + +/* Has the given val_t been seen in a configuration file or config overwrite? + * + * @param val: val_t* to examine + * @returns: boolean + */ +#define val_t_seen(val) ((val)->seen) + +/* What is the underlying type of this val_t? + * + * @param val: val_t* to examine + * @returns: conftype_t + */ +#define val_t_type(val) ((val)->type) + +/* Macros to convert val_t's to a particular type without the benefit of + * a typecheck. Use these only if you really know what you're doing! + * + * Implementation note: these macros encode the relationship of conftypes + * (in the macro name) to the corresponding union field. The macros work + * as lvalues, too. + */ +#define val_t__seen(val) ((val)->seen) +#define val_t__int(val) ((val)->v.i) +#define val_t__am64(val) ((val)->v.am64) +#define val_t__real(val) ((val)->v.r) +#define val_t__str(val) ((val)->v.s) +#define val_t__ident(val) ((val)->v.s) +#define val_t__time(val) ((val)->v.t) +#define val_t__size(val) ((val)->v.size) +#define val_t__boolean(val) ((val)->v.i) +#define val_t__compress(val) ((val)->v.i) +#define val_t__encrypt(val) ((val)->v.i) +#define val_t__holding(val) ((val)->v.i) +#define val_t__estimate(val) ((val)->v.i) +#define val_t__strategy(val) ((val)->v.i) +#define val_t__taperalgo(val) ((val)->v.i) +#define val_t__priority(val) ((val)->v.i) +#define val_t__rate(val) ((val)->v.rate) +#define val_t__exinclude(val) ((val)->v.exinclude) +#define val_t__intrange(val) ((val)->v.intrange) +#define val_t__proplist(val) ((val)->v.proplist) +/* + * Parameters + * + * Programs get val_t's by giving the index of the parameters they're interested in. + * For global parameters, these start with CNF; for subsections, they start with the + * name of the subsection. + */ + +/* + * Global parameter access + */ typedef enum { CNF_ORG, CNF_CONF, @@ -52,8 +272,9 @@ typedef enum { CNF_MAILTO, CNF_DUMPUSER, CNF_TAPEDEV, - CNF_CHNGRDEV, - CNF_CHNGRFILE, + CNF_DEVICE_PROPERTY, + CNF_CHANGERDEV, + CNF_CHANGERFILE, CNF_LABELSTR, CNF_TAPELIST, CNF_DISKFILE, @@ -78,7 +299,7 @@ typedef enum { CNF_DTIMEOUT, CNF_CTIMEOUT, CNF_TAPEBUFS, - CNF_RAWTAPEDEV, + CNF_DEVICE_OUTPUT_BUFFER_SIZE, CNF_PRINTER, CNF_AUTOFLUSH, CNF_RESERVE, @@ -88,6 +309,9 @@ typedef enum { CNF_AMRECOVER_CHECK_LABEL, CNF_AMRECOVER_CHANGER, CNF_TAPERALGO, + CNF_FLUSH_THRESHOLD_DUMPED, + CNF_FLUSH_THRESHOLD_SCHEDULED, + CNF_TAPERFLUSH, CNF_DISPLAYUNIT, CNF_KRB5KEYTAB, CNF_KRB5PRINCIPAL, @@ -115,211 +339,106 @@ typedef enum { CNF_RESERVED_UDP_PORT, CNF_RESERVED_TCP_PORT, CNF_UNRESERVED_TCP_PORT, - CNF_CNF -} confparm_t; + CNF_CNF /* sentinel */ +} confparm_key; -typedef enum { - CONF_UNKNOWN, CONF_ANY, CONF_COMMA, - CONF_LBRACE, CONF_RBRACE, CONF_NL, - CONF_END, CONF_IDENT, CONF_INT, - CONF_LONG, CONF_AM64, CONF_BOOL, - CONF_REAL, CONF_STRING, CONF_TIME, - CONF_SIZE, - - /* config parameters */ - CONF_INCLUDEFILE, CONF_ORG, CONF_MAILTO, - CONF_DUMPUSER, CONF_TAPECYCLE, CONF_TAPEDEV, - CONF_CHNGRDEV, CONF_CHNGRFILE, CONF_LABELSTR, - CONF_BUMPPERCENT, CONF_BUMPSIZE, CONF_BUMPDAYS, - CONF_BUMPMULT, CONF_ETIMEOUT, CONF_DTIMEOUT, - CONF_CTIMEOUT, CONF_TAPEBUFS, CONF_TAPELIST, - CONF_DISKFILE, CONF_INFOFILE, CONF_LOGDIR, - CONF_LOGFILE, CONF_DISKDIR, CONF_DISKSIZE, - CONF_INDEXDIR, CONF_NETUSAGE, CONF_INPARALLEL, - CONF_DUMPORDER, CONF_TIMEOUT, CONF_TPCHANGER, - CONF_RUNTAPES, CONF_DEFINE, CONF_DUMPTYPE, - CONF_TAPETYPE, CONF_INTERFACE, CONF_PRINTER, - CONF_AUTOFLUSH, CONF_RESERVE, CONF_MAXDUMPSIZE, - CONF_COLUMNSPEC, CONF_AMRECOVER_DO_FSF, CONF_AMRECOVER_CHECK_LABEL, - CONF_AMRECOVER_CHANGER, CONF_LABEL_NEW_TAPES, CONF_USETIMESTAMPS, - - CONF_TAPERALGO, CONF_FIRST, CONF_FIRSTFIT, - CONF_LARGEST, CONF_LARGESTFIT, CONF_SMALLEST, - CONF_LAST, CONF_DISPLAYUNIT, CONF_RESERVED_UDP_PORT, - CONF_RESERVED_TCP_PORT, CONF_UNRESERVED_TCP_PORT, - - /* kerberos 5 */ - CONF_KRB5KEYTAB, CONF_KRB5PRINCIPAL, - - /* holding disk */ - CONF_COMMENT, CONF_DIRECTORY, CONF_USE, - CONF_CHUNKSIZE, - - /* dump type */ - /*COMMENT,*/ CONF_PROGRAM, CONF_DUMPCYCLE, - CONF_RUNSPERCYCLE, CONF_MAXCYCLE, CONF_MAXDUMPS, - CONF_OPTIONS, CONF_PRIORITY, CONF_FREQUENCY, - CONF_INDEX, CONF_MAXPROMOTEDAY, CONF_STARTTIME, - CONF_COMPRESS, CONF_ENCRYPT, CONF_AUTH, - CONF_STRATEGY, CONF_ESTIMATE, CONF_SKIP_INCR, - CONF_SKIP_FULL, CONF_RECORD, CONF_HOLDING, - CONF_EXCLUDE, CONF_INCLUDE, CONF_KENCRYPT, - CONF_IGNORE, CONF_COMPRATE, CONF_TAPE_SPLITSIZE, - CONF_SPLIT_DISKBUFFER, CONF_FALLBACK_SPLITSIZE,CONF_SRVCOMPPROG, - CONF_CLNTCOMPPROG, CONF_SRV_ENCRYPT, CONF_CLNT_ENCRYPT, - CONF_SRV_DECRYPT_OPT, CONF_CLNT_DECRYPT_OPT, CONF_AMANDAD_PATH, - CONF_CLIENT_USERNAME, - - /* tape type */ - /*COMMENT,*/ CONF_BLOCKSIZE, CONF_FILE_PAD, - CONF_LBL_TEMPL, CONF_FILEMARK, CONF_LENGTH, - CONF_SPEED, CONF_READBLOCKSIZE, - - /* client conf */ - CONF_CONF, CONF_INDEX_SERVER, CONF_TAPE_SERVER, - CONF_SSH_KEYS, CONF_GNUTAR_LIST_DIR, CONF_AMANDATES, - - /* protocol config */ - CONF_REP_TRIES, CONF_CONNECT_TRIES, CONF_REQ_TRIES, - - /* debug config */ - CONF_DEBUG_AMANDAD, CONF_DEBUG_AMIDXTAPED, CONF_DEBUG_AMINDEXD, - CONF_DEBUG_AMRECOVER, CONF_DEBUG_AUTH, CONF_DEBUG_EVENT, - CONF_DEBUG_HOLDING, CONF_DEBUG_PROTOCOL, CONF_DEBUG_PLANNER, - CONF_DEBUG_DRIVER, CONF_DEBUG_DUMPER, CONF_DEBUG_CHUNKER, - CONF_DEBUG_TAPER, CONF_DEBUG_SELFCHECK, CONF_DEBUG_SENDSIZE, - CONF_DEBUG_SENDBACKUP, - - /* network interface */ - /* COMMENT, */ /* USE, */ - - /* dump options (obsolete) */ - CONF_EXCLUDE_FILE, CONF_EXCLUDE_LIST, - - /* compress, estimate, encryption */ - CONF_NONE, CONF_FAST, CONF_BEST, - CONF_SERVER, CONF_CLIENT, CONF_CALCSIZE, - CONF_CUSTOM, - - /* holdingdisk */ - CONF_NEVER, CONF_AUTO, CONF_REQUIRED, - - /* priority */ - CONF_LOW, CONF_MEDIUM, CONF_HIGH, - - /* dump strategy */ - CONF_SKIP, CONF_STANDARD, CONF_NOFULL, - CONF_NOINC, CONF_HANOI, CONF_INCRONLY, - - /* exclude list */ - CONF_LIST, CONF_EFILE, CONF_APPEND, - CONF_OPTIONAL, - - /* numbers */ - CONF_AMINFINITY, CONF_MULT1, CONF_MULT7, - CONF_MULT1K, CONF_MULT1M, CONF_MULT1G, - - /* boolean */ - CONF_ATRUE, CONF_AFALSE, - - CONF_RAWTAPEDEV -} tok_t; - -/* internal types and variables */ - -/* */ -typedef enum { - CONFTYPE_INT, - CONFTYPE_LONG, - CONFTYPE_AM64, - CONFTYPE_REAL, - CONFTYPE_STRING, - CONFTYPE_IDENT, - CONFTYPE_TIME, /* hhmm */ - CONFTYPE_SIZE, - CONFTYPE_SL, - CONFTYPE_BOOL, - CONFTYPE_COMPRESS, - CONFTYPE_ENCRYPT, - CONFTYPE_HOLDING, - CONFTYPE_ESTIMATE, - CONFTYPE_STRATEGY, - CONFTYPE_TAPERALGO, - CONFTYPE_PRIORITY, - CONFTYPE_RATE, - CONFTYPE_INTRANGE, - CONFTYPE_EXINCLUDE -} conftype_t; +/* Given a confparm_key, return a pointer to the corresponding val_t. + * + * @param key: confparm_key + * @returns: pointer to value + */ +val_t *getconf(confparm_key key); -/* Compression types */ -typedef enum { - COMP_NONE, /* No compression */ - COMP_FAST, /* Fast compression on client */ - COMP_BEST, /* Best compression on client */ - COMP_CUST, /* Custom compression on client */ - COMP_SERVER_FAST, /* Fast compression on server */ - COMP_SERVER_BEST, /* Best compression on server */ - COMP_SERVER_CUST /* Custom compression on server */ -} comp_t; +/* (convenience macro) has this global parameter been seen? + * + * @param key: confparm_key + * @returns: boolean + */ +#define getconf_seen(key) (val_t_seen(getconf((key)))) -/* Encryption types */ -typedef enum { - ENCRYPT_NONE, /* No encryption */ - ENCRYPT_CUST, /* Custom encryption on client */ - ENCRYPT_SERV_CUST /* Custom encryption on server */ -} encrypt_t; +/* (convenience macros) + * Fetch a gloabl parameter of a specific type. Note that these + * convenience macros have a different form from those for the + * subsections: here you specify a type and a key, while for the + * subsections you specify only a key. The difference is historical. + * + * @param key: confparm_key + * @returns: various + */ +#define getconf_int(key) (val_t_to_int(getconf((key)))) +#define getconf_am64(key) (val_t_to_am64(getconf((key)))) +#define getconf_real(key) (val_t_to_real(getconf((key)))) +#define getconf_str(key) (val_t_to_str(getconf((key)))) +#define getconf_ident(key) (val_t_to_ident(getconf((key)))) +#define getconf_time(key) (val_t_to_time(getconf((key)))) +#define getconf_size(key) (val_t_to_size(getconf((key)))) +#define getconf_boolean(key) (val_t_to_boolean(getconf((key)))) +#define getconf_compress(key) (val_t_to_compress(getconf((key)))) +#define getconf_encrypt(key) (val_t_to_encrypt(getconf((key)))) +#define getconf_holding(key) (val_t_to_holding(getconf((key)))) +#define getconf_estimate(key) (val_t_to_estimate(getconf((key)))) +#define getconf_strategy(key) (val_t_to_strategy(getconf((key)))) +#define getconf_taperalgo(key) (val_t_to_taperalgo(getconf((key)))) +#define getconf_priority(key) (val_t_to_priority(getconf((key)))) +#define getconf_rate(key) (val_t_to_rate(getconf((key)))) +#define getconf_exinclude(key) (val_t_to_exinclude(getconf((key)))) +#define getconf_intrange(key) (val_t_to_intrange(getconf((key)))) +#define getconf_proplist(key) (val_t_to_proplist(getconf((key)))) + +/* Get a list of names for subsections of the given type + * + * @param listname: the desired type of subsection + * @returns: list of subsection names; caller is responsible for freeing + * this list, but not the strings it points to, using g_slist_free(). + */ +GSList *getconf_list(char *listname); -/* holdingdisk types */ -typedef enum { - HOLD_NEVER, /* Always direct to tape */ - HOLD_AUTO, /* If possible */ - HOLD_REQUIRED /* Always to holding disk */ -} dump_holdingdisk_t; +/* Get a configuration value by name, supporting the TYPE:SUBSEC:KEYWORD. + * Returns NULL if the configuration value doesnt exist. + */ +val_t *getconf_byname(char *key); -typedef struct { /* token table entry */ - char *keyword; - tok_t token; -} keytab_t; +/* + * Derived values + * + * Values which aren't directly specified by the configuration, but which + * are derived from it. + */ -typedef struct { - char *name; - char *value; - int used; -} command_option_t; +/* Return a divisor which will convert a value in units of kilo-whatevers + * to the user's selected display unit. + * + * @returns: long integer divisor + */ +long int getconf_unit_divisor(void); -typedef struct exinclude_s { - sl_t *sl_list; - sl_t *sl_file; - int optional; -} exinclude_t; +/* If any of these globals are true, the corresponding component will + * send verbose debugging output to the debug file. The options are + * set during config_init, but can be modified at will after that if + * desired. */ -typedef struct val_s { - union { - int i; - long l; - off_t am64; - double r; - char *s; - sl_t *sl; - ssize_t size; - time_t t; - float rate[2]; - exinclude_t exinclude; - int intrange[2]; - } v; - int seen; - conftype_t type; -} val_t; +extern int debug_amandad; +extern int debug_amidxtaped; +extern int debug_amindexd; +extern int debug_amrecover; +extern int debug_auth; +extern int debug_event; +extern int debug_holding; +extern int debug_protocol; +extern int debug_planner; +extern int debug_driver; +extern int debug_dumper; +extern int debug_chunker; +extern int debug_taper; +extern int debug_selfcheck; +extern int debug_sendsize; +extern int debug_sendbackup; -typedef struct s_conf_var { - tok_t token; - conftype_t type; - void (*read_function) (struct s_conf_var *, val_t*); - int parm; - void (*validate) (struct s_conf_var *, val_t *); -} t_conf_var; +/* + * Tapetype parameter access + */ -typedef enum tapetype_e { +typedef enum { TAPETYPE_COMMENT, TAPETYPE_LBL_TEMPL, TAPETYPE_BLOCKSIZE, @@ -328,52 +447,63 @@ typedef enum tapetype_e { TAPETYPE_FILEMARK, TAPETYPE_SPEED, TAPETYPE_FILE_PAD, - TAPETYPE_TAPETYPE -} tapetype_ee; + TAPETYPE_TAPETYPE /* sentinel */ +} tapetype_key; -typedef struct tapetype_s { - struct tapetype_s *next; - int seen; - char *name; - - val_t value[TAPETYPE_TAPETYPE]; -} tapetype_t; - -#define tapetype_get(tapetype, field) (tapetype->field) -#define tapetype_get_name(tapetype) tapetype->name -#define tapetype_get_seen(tapetype) tapetype->seen -#define tapetype_get_comment(tapetype) get_conftype_string(&tapetype->value[TAPETYPE_COMMENT]) -#define tapetype_get_lbl_templ(tapetype) get_conftype_string(&tapetype->value[TAPETYPE_LBL_TEMPL]) -#define tapetype_get_blocksize(tapetype) get_conftype_size (&tapetype->value[TAPETYPE_BLOCKSIZE]) -#define tapetype_get_readblocksize(tapetype) get_conftype_size (&tapetype->value[TAPETYPE_READBLOCKSIZE]) -#define tapetype_get_length(tapetype) get_conftype_am64 (&tapetype->value[TAPETYPE_LENGTH]) -#define tapetype_get_filemark(tapetype) get_conftype_am64 (&tapetype->value[TAPETYPE_FILEMARK]) -#define tapetype_get_speed(tapetype) get_conftype_int (&tapetype->value[TAPETYPE_SPEED]) -#define tapetype_get_file_pad(tapetype) get_conftype_bool (&tapetype->value[TAPETYPE_FILE_PAD]) +/* opaque object */ +typedef struct tapetype_s tapetype_t; -/* Dump strategies */ -#define DS_SKIP 0 /* Don't do any dumps at all */ -#define DS_STANDARD 1 /* Standard (0 1 1 1 1 2 2 2 ...) */ -#define DS_NOFULL 2 /* No full's (1 1 1 ...) */ -#define DS_NOINC 3 /* No inc's (0 0 0 ...) */ -#define DS_4 4 /* ? (0 1 2 3 4 5 6 7 8 9 10 11 ...) */ -#define DS_5 5 /* ? (0 1 1 1 1 1 1 1 1 1 1 1 ...) */ -#define DS_HANOI 6 /* Tower of Hanoi (? ? ? ? ? ...) */ -#define DS_INCRONLY 7 /* Forced fulls (0 1 1 2 2 FORCE0 1 1 ...) */ +/* Given the name of the tapetype, return a tapetype object. Returns NULL + * if no matching tapetype exists. Note that the match is case-insensitive. + * + * @param identifier: name of the desired tapetype + * @returns: object or NULL + */ +tapetype_t *lookup_tapetype(char *identifier); -/* Estimate strategies */ -#define ES_CLIENT 0 /* client estimate */ -#define ES_SERVER 1 /* server estimate */ -#define ES_CALCSIZE 2 /* calcsize estimate */ - -#define ALGO_FIRST 0 -#define ALGO_FIRSTFIT 1 -#define ALGO_LARGEST 2 -#define ALGO_LARGESTFIT 3 -#define ALGO_SMALLEST 4 -#define ALGO_LAST 5 - -typedef enum dumptype_e { +/* Given a tapetype and a key, return a pointer to the corresponding val_t. + * + * @param ttyp: the tapetype to examine + * @param key: tapetype_key (one of the TAPETYPE_* constants) + * @returns: pointer to value + */ +val_t *tapetype_getconf(tapetype_t *ttyp, tapetype_key key); + +/* Get the name of this tapetype. + * + * @param ttyp: the tapetype to examine + * @returns: name of the tapetype + */ +char *tapetype_name(tapetype_t *ttyp); + +/* (convenience macro) has this parameter been seen in this tapetype? This + * applies to the specific parameter *within* the tapetype. + * + * @param key: tapetype_key + * @returns: boolean + */ +#define tapetype_seen(ttyp, key) (val_t_seen(tapetype_getconf((ttyp), (key)))) + +/* (convenience macros) + * fetch a particular parameter; caller must know the correct type. + * + * @param ttyp: the tapetype to examine + * @returns: various + */ +#define tapetype_get_comment(ttyp) (val_t_to_str(tapetype_getconf((ttyp), TAPETYPE_COMMENT))) +#define tapetype_get_lbl_templ(ttyp) (val_t_to_str(tapetype_getconf((ttyp), TAPETYPE_LBL_TEMPL))) +#define tapetype_get_blocksize(ttyp) (val_t_to_size(tapetype_getconf((ttyp), TAPETYPE_BLOCKSIZE))) +#define tapetype_get_readblocksize(ttyp) (val_t_to_size(tapetype_getconf((ttyp), TAPETYPE_READBLOCKSIZE))) +#define tapetype_get_length(ttyp) (val_t_to_am64(tapetype_getconf((ttyp), TAPETYPE_LENGTH))) +#define tapetype_get_filemark(ttyp) (val_t_to_am64(tapetype_getconf((ttyp), TAPETYPE_FILEMARK))) +#define tapetype_get_speed(ttyp) (val_t_to_int(tapetype_getconf((ttyp), TAPETYPE_SPEED))) +#define tapetype_get_file_pad(ttyp) (val_t_to_boolean(tapetype_getconf((ttyp), TAPETYPE_FILE_PAD))) + +/* + * Dumptype parameter access + */ + +typedef enum { DUMPTYPE_COMMENT, DUMPTYPE_PROGRAM, DUMPTYPE_SRVCOMPPROG, @@ -412,226 +542,445 @@ typedef enum dumptype_e { DUMPTYPE_KENCRYPT, DUMPTYPE_IGNORE, DUMPTYPE_INDEX, - DUMPTYPE_DUMPTYPE -} dumptype_ee; + DUMPTYPE_DUMPTYPE /* sentinel */ +} dumptype_key; -typedef struct dumptype_s { - struct dumptype_s *next; - int seen; - char *name; - - val_t value[DUMPTYPE_DUMPTYPE]; -} dumptype_t; - -#define dumptype_get_name(dumptype) dumptype->name -#define dumptype_get_seen(dumptype) dumptype->seen -#define dumptype_get_comment(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_COMMENT]) -#define dumptype_get_program(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_PROGRAM]) -#define dumptype_get_srvcompprog(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_SRVCOMPPROG]) -#define dumptype_get_clntcompprog(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_CLNTCOMPPROG]) -#define dumptype_get_srv_encrypt(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_SRV_ENCRYPT]) -#define dumptype_get_clnt_encrypt(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_CLNT_ENCRYPT]) -#define dumptype_get_amandad_path(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_AMANDAD_PATH]) -#define dumptype_get_client_username(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_CLIENT_USERNAME]) -#define dumptype_get_ssh_keys(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_SSH_KEYS]) -#define dumptype_get_security_driver(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_SECURITY_DRIVER]) -#define dumptype_get_exclude(dumptype) get_conftype_exinclude(&dumptype->value[DUMPTYPE_EXCLUDE]) -#define dumptype_get_include(dumptype) get_conftype_exinclude(&dumptype->value[DUMPTYPE_INCLUDE]) -#define dumptype_get_priority(dumptype) get_conftype_priority (&dumptype->value[DUMPTYPE_PRIORITY]) -#define dumptype_get_dumpcycle(dumptype) get_conftype_int (&dumptype->value[DUMPTYPE_DUMPCYCLE]) -#define dumptype_get_maxcycle(dumptype) get_conftype_int (&dumptype->value[DUMPTYPE_MAXCYCLE]) -#define dumptype_get_frequency(dumptype) get_conftype_int (&dumptype->value[DUMPTYPE_FREQUENCY]) -#define dumptype_get_maxdumps(dumptype) get_conftype_int (&dumptype->value[DUMPTYPE_MAXDUMPS]) -#define dumptype_get_maxpromoteday(dumptype) get_conftype_int (&dumptype->value[DUMPTYPE_MAXPROMOTEDAY]) -#define dumptype_get_bumppercent(dumptype) get_conftype_int (&dumptype->value[DUMPTYPE_BUMPPERCENT]) -#define dumptype_get_bumpsize(dumptype) get_conftype_am64 (&dumptype->value[DUMPTYPE_BUMPSIZE]) -#define dumptype_get_bumpdays(dumptype) get_conftype_int (&dumptype->value[DUMPTYPE_BUMPDAYS]) -#define dumptype_get_bumpmult(dumptype) get_conftype_real (&dumptype->value[DUMPTYPE_BUMPMULT]) -#define dumptype_get_starttime(dumptype) get_conftype_time (&dumptype->value[DUMPTYPE_STARTTIME]) -#define dumptype_get_strategy(dumptype) get_conftype_strategy (&dumptype->value[DUMPTYPE_STRATEGY]) -#define dumptype_get_estimate(dumptype) get_conftype_estimate (&dumptype->value[DUMPTYPE_ESTIMATE]) -#define dumptype_get_compress(dumptype) get_conftype_compress (&dumptype->value[DUMPTYPE_COMPRESS]) -#define dumptype_get_encrypt(dumptype) get_conftype_encrypt (&dumptype->value[DUMPTYPE_ENCRYPT]) -#define dumptype_get_srv_decrypt_opt(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_SRV_DECRYPT_OPT]) -#define dumptype_get_clnt_decrypt_opt(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_CLNT_DECRYPT_OPT]) -#define dumptype_get_comprate(dumptype) dumptype->value[DUMPTYPE_COMPRATE].v.rate -#define dumptype_get_tape_splitsize(dumptype) get_conftype_am64 (&dumptype->value[DUMPTYPE_TAPE_SPLITSIZE]) -#define dumptype_get_fallback_splitsize(dumptype) get_conftype_am64 (&dumptype->value[DUMPTYPE_FALLBACK_SPLITSIZE]) -#define dumptype_get_split_diskbuffer(dumptype) get_conftype_string (&dumptype->value[DUMPTYPE_SPLIT_DISKBUFFER]) -#define dumptype_get_record(dumptype) get_conftype_bool (&dumptype->value[DUMPTYPE_RECORD]) -#define dumptype_get_skip_incr(dumptype) get_conftype_bool (&dumptype->value[DUMPTYPE_SKIP_INCR]) -#define dumptype_get_skip_full(dumptype) get_conftype_bool (&dumptype->value[DUMPTYPE_SKIP_FULL]) -#define dumptype_get_to_holdingdisk(dumptype) get_conftype_hold (&dumptype->value[DUMPTYPE_HOLDINGDISK]) -#define dumptype_get_kencrypt(dumptype) get_conftype_bool (&dumptype->value[DUMPTYPE_KENCRYPT]) -#define dumptype_get_ignore(dumptype) get_conftype_bool (&dumptype->value[DUMPTYPE_IGNORE]) -#define dumptype_get_index(dumptype) get_conftype_bool (&dumptype->value[DUMPTYPE_INDEX]) - -/* A network interface */ -typedef enum interface_e { +/* opaque object */ +typedef struct dumptype_s dumptype_t; + +/* Given the name of the dumptype, return a dumptype object. Returns NULL + * if no matching dumptype exists. Note that the match is case-insensitive. + * + * @param identifier: name of the desired dumptype + * @returns: object or NULL + */ +dumptype_t *lookup_dumptype(char *identifier); + +/* Given a dumptype and a key, return a pointer to the corresponding val_t. + * + * @param dtyp: the dumptype to examine + * @param key: dumptype_key (one of the TAPETYPE_* constants) + * @returns: pointer to value + */ +val_t *dumptype_getconf(dumptype_t *dtyp, dumptype_key key); + +/* Get the name of this dumptype. + * + * @param dtyp: the dumptype to examine + * @returns: name of the dumptype + */ +char *dumptype_name(dumptype_t *dtyp); + +/* (convenience macro) has this parameter been seen in this dumptype? This + * applies to the specific parameter *within* the dumptype. + * + * @param key: dumptype_key + * @returns: boolean + */ +#define dumptype_seen(dtyp, key) (val_t_seen(dumptype_getconf((dtyp), (key)))) + +/* (convenience macros) + * fetch a particular parameter; caller must know the correct type. + * + * @param dtyp: the dumptype to examine + * @returns: various + */ +#define dumptype_get_comment(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_COMMENT))) +#define dumptype_get_program(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_PROGRAM))) +#define dumptype_get_srvcompprog(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SRVCOMPPROG))) +#define dumptype_get_clntcompprog(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_CLNTCOMPPROG))) +#define dumptype_get_srv_encrypt(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SRV_ENCRYPT))) +#define dumptype_get_clnt_encrypt(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_CLNT_ENCRYPT))) +#define dumptype_get_amandad_path(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_AMANDAD_PATH))) +#define dumptype_get_client_username(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_CLIENT_USERNAME))) +#define dumptype_get_ssh_keys(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SSH_KEYS))) +#define dumptype_get_security_driver(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SECURITY_DRIVER))) +#define dumptype_get_exclude(dtyp) (val_t_to_exinclude(dumptype_getconf((dtyp), DUMPTYPE_EXCLUDE))) +#define dumptype_get_include(dtyp) (val_t_to_exinclude(dumptype_getconf((dtyp), DUMPTYPE_INCLUDE))) +#define dumptype_get_priority(dtyp) (val_t_to_priority(dumptype_getconf((dtyp), DUMPTYPE_PRIORITY))) +#define dumptype_get_dumpcycle(dtyp) (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_DUMPCYCLE))) +#define dumptype_get_maxcycle(dtyp) (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_MAXCYCLE))) +#define dumptype_get_frequency(dtyp) (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_FREQUENCY))) +#define dumptype_get_maxdumps(dtyp) (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_MAXDUMPS))) +#define dumptype_get_maxpromoteday(dtyp) (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_MAXPROMOTEDAY))) +#define dumptype_get_bumppercent(dtyp) (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_BUMPPERCENT))) +#define dumptype_get_bumpsize(dtyp) (val_t_to_am64(dumptype_getconf((dtyp), DUMPTYPE_BUMPSIZE))) +#define dumptype_get_bumpdays(dtyp) (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_BUMPDAYS))) +#define dumptype_get_bumpmult(dtyp) (val_t_to_real(dumptype_getconf((dtyp), DUMPTYPE_BUMPMULT))) +#define dumptype_get_starttime(dtyp) (val_t_to_time(dumptype_getconf((dtyp), DUMPTYPE_STARTTIME))) +#define dumptype_get_strategy(dtyp) (val_t_to_strategy(dumptype_getconf((dtyp), DUMPTYPE_STRATEGY))) +#define dumptype_get_estimate(dtyp) (val_t_to_estimate(dumptype_getconf((dtyp), DUMPTYPE_ESTIMATE))) +#define dumptype_get_compress(dtyp) (val_t_to_compress(dumptype_getconf((dtyp), DUMPTYPE_COMPRESS))) +#define dumptype_get_encrypt(dtyp) (val_t_to_encrypt(dumptype_getconf((dtyp), DUMPTYPE_ENCRYPT))) +#define dumptype_get_srv_decrypt_opt(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SRV_DECRYPT_OPT))) +#define dumptype_get_clnt_decrypt_opt(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_CLNT_DECRYPT_OPT))) +#define dumptype_get_comprate(dtyp) (val_t_to_rate(dumptype_getconf((dtyp), DUMPTYPE_COMPRATE))) +#define dumptype_get_tape_splitsize(dtyp) (val_t_to_am64(dumptype_getconf((dtyp), DUMPTYPE_TAPE_SPLITSIZE))) +#define dumptype_get_fallback_splitsize(dtyp) (val_t_to_am64(dumptype_getconf((dtyp), DUMPTYPE_FALLBACK_SPLITSIZE))) +#define dumptype_get_split_diskbuffer(dtyp) (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SPLIT_DISKBUFFER))) +#define dumptype_get_record(dtyp) (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_RECORD))) +#define dumptype_get_skip_incr(dtyp) (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_SKIP_INCR))) +#define dumptype_get_skip_full(dtyp) (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_SKIP_FULL))) +#define dumptype_get_to_holdingdisk(dtyp) (val_t_to_holding(dumptype_getconf((dtyp), DUMPTYPE_HOLDINGDISK))) +#define dumptype_get_kencrypt(dtyp) (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_KENCRYPT))) +#define dumptype_get_ignore(dtyp) (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_IGNORE))) +#define dumptype_get_index(dtyp) (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_INDEX))) + +/* + * Interface parameter access + */ + +typedef enum { INTER_COMMENT, INTER_MAXUSAGE, - INTER_INTER -} interface_ee; + INTER_INTER /* sentinel */ +} interface_key; +/* opaque object */ +typedef struct interface_s interface_t; -typedef struct interface_s { - struct interface_s *next; - int seen; - char *name; +/* Given the name of the interface, return a interface object. Returns NULL + * if no matching interface exists. Note that the match is case-insensitive. + * + * @param identifier: name of the desired interface + * @returns: object or NULL + */ +interface_t *lookup_interface(char *identifier); - val_t value[INTER_INTER]; +/* Given a interface and a key, return a pointer to the corresponding val_t. + * + * @param iface: the interface to examine + * @param key: interface_key (one of the TAPETYPE_* constants) + * @returns: pointer to value + */ +val_t *interface_getconf(interface_t *iface, interface_key key); - unsigned long curusage; /* current usage */ -} interface_t; +/* Get the name of this interface. + * + * @param iface: the interface to examine + * @returns: name of the interface + */ +char *interface_name(interface_t *iface); -#define interface_get_name(interface) interface->name -#define interface_get_seen(interface) interface->seen -#define interface_get_comment(interface) get_conftype_string(&interface->value[INTER_COMMENT]) -#define interface_get_maxusage(interface) get_conftype_int (&interface->value[INTER_MAXUSAGE]) +/* (convenience macro) has this parameter been seen in this interface? This + * applies to the specific parameter *within* the interface. + * + * @param key: interface_key + * @returns: boolean + */ +#define interface_seen(iface, key) (val_t_seen(interface_getconf((iface), (key)))) -/* A holding disk */ -typedef enum holdingdisk_e { +/* (convenience macros) + * fetch a particular parameter; caller must know the correct type. + * + * @param iface: the interface to examine + * @returns: various + */ +#define interface_get_comment(iface) (val_t_to_str(interface_getconf((iface), INTER_COMMENT))) +#define interface_get_maxusage(iface) (val_t_to_int(interface_getconf((iface), INTER_MAXUSAGE))) + +/* + * Holdingdisk parameter access + */ + +typedef enum { HOLDING_COMMENT, HOLDING_DISKDIR, HOLDING_DISKSIZE, HOLDING_CHUNKSIZE, - HOLDING_HOLDING -} holdingdisk_ee; + HOLDING_HOLDING /* sentinel */ +} holdingdisk_key; -typedef struct holdingdisk_s { - struct holdingdisk_s *next; - int seen; - char *name; - - val_t value[HOLDING_HOLDING]; - - void *up; /* generic user pointer */ - off_t disksize; -} holdingdisk_t; - -#define holdingdisk_get_name(holdingdisk) (holdingdisk)->name -#define holdingdisk_get_seen(holdingdisk) (holdingdisk)->seen -#define holdingdisk_get_comment(holdingdisk) get_conftype_string(&(holdingdisk)->value[HOLDING_COMMENT]) -#define holdingdisk_get_diskdir(holdingdisk) get_conftype_string(&(holdingdisk)->value[HOLDING_DISKDIR]) -#define holdingdisk_get_disksize(holdingdisk) get_conftype_am64 (&(holdingdisk)->value[HOLDING_DISKSIZE]) -#define holdingdisk_get_chunksize(holdingdisk) get_conftype_am64 (&(holdingdisk)->value[HOLDING_CHUNKSIZE]) - -/* for each column we define some values on how to - * format this column element - */ -typedef struct { - char *Name; /* column name */ - int PrefixSpace; /* the blank space to print before this - * column. It is used to get the space - * between the colums - */ - int Width; /* the width of the column itself */ - int Precision; /* the precision if its a float */ - int MaxWidth; /* if set, Width will be recalculated - * to the space needed */ - char *Format; /* the printf format string for this - * column element - */ - char *Title; /* the title to use for this column */ -} ColumnInfo; - - -/* predeclare local functions */ - -int get_conftype_int (val_t *); -long get_conftype_long (val_t *); -off_t get_conftype_am64 (val_t *); -double get_conftype_real (val_t *); -char *get_conftype_string (val_t *); -char *get_conftype_ident (val_t *); -time_t get_conftype_time (val_t *); -ssize_t get_conftype_size (val_t *); -sl_t *get_conftype_sl (val_t *); -int get_conftype_bool (val_t *); -int get_conftype_hold (val_t *); -int get_conftype_compress (val_t *); -int get_conftype_encrypt (val_t *); -int get_conftype_estimate (val_t *); -int get_conftype_strategy (val_t *); -int get_conftype_taperalgo(val_t *); -int get_conftype_priority (val_t *); -float *get_conftype_rate (val_t *); -exinclude_t get_conftype_exinclude(val_t *); -int *get_conftype_intrange (val_t *); - -void command_overwrite(command_option_t *command_options, t_conf_var *overwrite_var, - keytab_t *keytab, val_t *valarray, char *prefix); - -void free_new_argv(int new_argc, char **new_argv); -/* this corresponds to the normal output of amanda, but may - * be adapted to any spacing as you like. - */ -extern ColumnInfo ColumnData[]; +/* opaque object */ +typedef struct holdingdisk_s holdingdisk_t; -extern char *config_name; -extern char *config_dir; +/* Given the name of the holdingdisk, return a holdingdisk object. Returns NULL + * if no matching holdingdisk exists. Note that the match is case-insensitive. + * + * @param identifier: name of the desired holdingdisk + * @returns: object or NULL + */ +holdingdisk_t *lookup_holdingdisk(char *identifier); -extern int debug_amandad; -extern int debug_amidxtaped; -extern int debug_amindexd; -extern int debug_amrecover; -extern int debug_auth; -extern int debug_event; -extern int debug_holding; -extern int debug_protocol; -extern int debug_planner; -extern int debug_driver; -extern int debug_dumper; -extern int debug_chunker; -extern int debug_taper; -extern int debug_selfcheck; -extern int debug_sendsize; -extern int debug_sendbackup; +/* Return the whole linked list of holdingdisks. Use holdingdisk_next + * to traverse the list. + * + * @returns: first holding disk + */ +holdingdisk_t *getconf_holdingdisks(void); + +/* Return the next holdingdisk in the list. + * + * @param hdisk: holding disk + * @returns: NULL if hdisk is the last disk, otherwise the next holding + * disk + */ +holdingdisk_t *holdingdisk_next(holdingdisk_t *hdisk); + +/* Given a holdingdisk and a key, return a pointer to the corresponding val_t. + * + * @param hdisk: the holdingdisk to examine + * @param key: holdingdisk_key (one of the TAPETYPE_* constants) + * @returns: pointer to value + */ +val_t *holdingdisk_getconf(holdingdisk_t *hdisk, holdingdisk_key key); + +/* Get the name of this holdingdisk. + * + * @param hdisk: the holdingdisk to examine + * @returns: name of the holdingdisk + */ +char *holdingdisk_name(holdingdisk_t *hdisk); + +/* (convenience macro) has this parameter been seen in this holdingdisk? This + * applies to the specific parameter *within* the holdingdisk. + * + * @param key: holdingdisk_key + * @returns: boolean + */ +#define holdingdisk_seen(hdisk, key) (val_t_seen(holdingdisk_getconf((hdisk), (key)))) + +/* (convenience macros) + * fetch a particular parameter; caller must know the correct type. + * + * @param hdisk: the holdingdisk to examine + * @returns: various + */ +#define holdingdisk_get_comment(hdisk) (val_t_to_str(holdingdisk_getconf((hdisk), HOLDING_COMMENT))) +#define holdingdisk_get_diskdir(hdisk) (val_t_to_str(holdingdisk_getconf((hdisk), HOLDING_DISKDIR))) +#define holdingdisk_get_disksize(hdisk) (val_t_to_am64(holdingdisk_getconf((hdisk), HOLDING_DISKSIZE))) +#define holdingdisk_get_chunksize(hdisk) (val_t_to_am64(holdingdisk_getconf((hdisk), HOLDING_CHUNKSIZE))) -extern holdingdisk_t *holdingdisks; -extern int num_holdingdisks; +/* + * Command-line handling + */ -void parse_conf(int parse_argc, char **parse_argv, int *new_argc, - char ***new_argv); -char **get_config_options(int); -void report_bad_conf_arg(void); -void free_server_config(void); +/* opaque type */ +typedef struct config_overwrites_s config_overwrites_t; -int read_conffile(char *filename); +/* Create a new, empty config_overwrites object. + * + * @param size_estimate: a guess at the number of overwrites; argc/2 is a + * good estimate. + * @returns: new object + */ +config_overwrites_t *new_config_overwrites(int size_estimate); -#define CLIENTCONFFILE_NAME "client.conf" +/* Free a config_overwrites object. This usually won't be needed, as + * apply_config_overwrites takes ownership of the overwrites for you. + * + * @param co: config_overwrites object + */ +void free_config_overwrites(config_overwrites_t *co); -int add_client_conf(confparm_t parm, char *value); -int read_clientconf(char *filename); +/* Add an overwrite to a config_overwrites object. + * + * @param co: the config_overwrites object + * @param key: the configuration parameter's key, possibly with the format + * SUBTYPE:NAME:KEYWORD + * @param value: the value for the parameter, as would be seen in amanda.conf + */ +void add_config_overwrite(config_overwrites_t *co, + char *key, + char *value); + +/* Add an overwrite option from the command line to a config_overwrites + * object. Calls error() with any errors + * + * @param co: the config_overwrites object + * @param optarg: the value of the command-line option + */ +void add_config_overwrite_opt(config_overwrites_t *co, + char *optarg); + +/* Given a command line, represented as argc/argv, extract any -o options + * as config overwrites. This function modifies argc and argv in place. + * + * This is the deprecated way to extract config overwrites, for applications + * which do not use getopt. The preferred method is to use getopt and + * call add_config_overwrite_opt for any -o options. + * + * @param argc: (in/out) command-line length + * @param argv: (in/out) command-line strings + * @returns: newly allocated config_overwrites object + */ +config_overwrites_t * +extract_commandline_config_overwrites(int *argc, + char ***argv); + +/* Apply configuration overwrites to the current configuration and take + * ownership of the config_overwrites object. + * + * If any parameters are not matched in the current symbol table, or + * correspond to named subsections which do not exist, this function calls + * error() and does not return. + * + * @param co: the config_overwrites object + */ +void apply_config_overwrites(config_overwrites_t *co); + +/* + * Initialization + */ + +/* Constants for config_init */ +typedef enum { + /* Use arg_config_name, if not NULL */ + CONFIG_INIT_EXPLICIT_NAME = 1 << 0, + + /* Use the current working directory if an explicit name is not available */ + CONFIG_INIT_USE_CWD = 1 << 1, + + /* This is a client application (server is default) */ + CONFIG_INIT_CLIENT = 1 << 2, + + /* New configuration should "overlay" existing configuration; this + * is used by clients to load multiple amanda-client.conf files. */ + CONFIG_INIT_OVERLAY = 1 << 3, + + /* If the file doesn't exist, halt with an error. */ + CONFIG_INIT_FATAL = 1 << 4, +} config_init_flags; + +/* Initialize this application's configuration, with the specific actions + * based on 'flags': + * - if CONFIG_INIT_OVERLAY is not set, configuration values are reset + * to their defaults + * - if CONFIG_INIT_EXPLICIT_NAME and arg_config_name is not NULL, + * use CONFIG_DIR/arg_config_name as config_dir arg_config_name as + * config_name. + * - otherwise, if CONFIG_USE_CWD is set, use the directory in which + * the application was started as config_dir, and its filename as + * config_name. + * - otherwise, for the client only, se config_dir to CONFIG_DIR and + * config_name to NULL. + * - depending on CONFIG_INIT_CLIENT, read amanda.conf or amanda-client.conf + * - in the event of an error, call error() if CONFIG_INIT_FATAL, otherwise + * record a message in the debug log and return false. + * + * @param flags: flags indicating desired behavior, as above + * @param arg_config_name: config name to use (from e.g., argv[1]) + * @returns: true on success, false on failure, unless CONFIG_INIT_FATAL + */ +gboolean config_init(config_init_flags flags, + char *arg_config_name); + +/* Free all memory allocated for the configuration. This effectively + * reverses the effects of config_init(). + */ +void config_uninit(void); + +/* Encode any applied config_overwrites into a strv format suitale for + * executing another Amanda tool. + * + * The * result is dynamically allocated and NULL terminated. There is no + * provision to free the result, as this function is always called just + * before execve(..). + * + * First gives the number of array elements to leave for the caller to + * fill in. The usual calling pattern is this: + * command_line = get_config_options(3); + * command_line[0] = "appname"; + * command_line[1] = config_name; + * command_line[2] = "--foo"; + * execve(command_line[0], command_line, safe_env()); + * + * @param first: number of unused elements to leave at the beginning of + * the array. + * @returns: NULL-terminated string array suitable for execve + */ +char **get_config_options(int first); + +/* The name of the configuration under which this application is running. + * This variable is initialized by config_init, and should be treated as + * read-only. + */ +extern char *config_name; + +/* The directory containing the configuration for this application. This + * variable is initialized by config_init, and should be treated as read-only. + */ +extern char *config_dir; + +/* The most recently read top-level configuration file. This variable is + * initialized by config_init, and should be treated as read-only. + */ +extern char *config_filename; + +/* + * Utilities + */ + +/* Security plugins get their configuration information through a callback + * with the signature: + * char *callback(char *key, void *userpointer); + * where key is the name of the desired parameter, which may not match the + * name used in this module. See the implementations of these functions + * to learn which keys they support, or to add new keys. + */ char *generic_client_get_security_conf(char *, void *); +char *generic_get_security_conf(char *, void *); -int getconf_seen(confparm_t parameter); -int getconf_boolean(confparm_t parameter); -int getconf_int(confparm_t parameter); -long getconf_long(confparm_t parameter); -ssize_t getconf_size(confparm_t parameter); -time_t getconf_time(confparm_t parameter); -off_t getconf_am64(confparm_t parameter); -double getconf_real(confparm_t parameter); -char *getconf_str(confparm_t parameter); -int getconf_taperalgo(confparm_t parameter); -int *getconf_intrange(confparm_t parameter); -char *getconf_byname(char *confname); -char *getconf_list(char *listname); -dumptype_t *lookup_dumptype(char *identifier); +/* Dump the current configuration information to stdout, in a format + * that can be re-read by this module. The results will include any + * command-line overwrites. + * + * This function only dumps the server configuration, and will fail on + * clients. + */ +void dump_configuration(void); + +/* Return a sequence of strings giving the printable representation + * of the given val_t. If str_needs_quotes is true and each string is + * prefixed by the relevant configuration keyword, these strings will + * be parseable by this module, and will reproduce exactly the same + * configuration value. See the implementation of dump_configuration + * for details. + * + * If str_needs_quotes is provided, a CONFTYPE_STR value will be returned with + * quotes. + * + * The result is a NULL-terminated strv, which can be freed with g_strfreev or + * joined with g_strjoinv. Caller is responsible for freeing the memory. + * + * @param val: the value to analyze + * @param str_needs_quotes: add quotes to CONFTYPE_STR values? + * @returns: NULL-terminated string vector + */ +char **val_t_display_strs(val_t *val, int str_needs_quotes); + +/* Read a dumptype; this is used by this module as well as by diskfile.c to + * read the disklist. The two are carefully balanced in their parsing process. + * + * Nobody else should use this function. Seriously. + */ dumptype_t *read_dumptype(char *name, FILE *from, char *fname, int *linenum); -tapetype_t *lookup_tapetype(char *identifier); -holdingdisk_t *lookup_holdingdisk(char *identifier); -interface_t *lookup_interface(char *identifier); -holdingdisk_t *getconf_holdingdisks(void); -long int getconf_unit_divisor(void); -void dump_configuration(char *filename); -int ColumnDataCount(void); -int StringToColumn(char *s); -char LastChar(char *s); -int SetColumDataFromString(ColumnInfo* ci, char *s, char **errstr); -ssize_t getconf_readblocksize(void); - -/* this is in securityconf.h */ -char *generic_get_security_conf(char *, void *); + +/* Extend a relative filename with the current config_dir; if filename is already + * absolute, this is equivalent to stralloc. + * + * @param filename: filename to extend + * @returns: newly allocated filename + */ +char *config_dir_relative(char *filename); + +/* Convert from a symbol back to a name for logging and for dumping + * config values + * + * @param taperalgo: the constant value + * @returns: statically allocated string + */ +char *taperalgo2str(taperalgo_t taperalgo); + +/* Looks for a unit value like b, byte, bytes, bps, etc. Technically + * the return value should never be < 1, but we return a signed value + * to help mitigate bad C promotion semantics. Returns 0 on error. + * + * This is here in this module because it uses the numb_keytable. + * + * @param casestr: the unit string + * @returns: the corresponding multiplier (e.g., 'M' => 1024*1024) + */ +gint64 find_multiplier(char * casestr); + #endif /* ! CONFFILE_H */ diff --git a/common-src/debug.c b/common-src/debug.c index 86c3be1..ed036e4 100644 --- a/common-src/debug.c +++ b/common-src/debug.c @@ -27,69 +27,65 @@ /* * $Id: debug.c,v 1.40 2006/07/26 11:49:32 martinea Exp $ * - * debug log subroutines + * Logging support */ #include "amanda.h" #include "util.h" #include "arglist.h" #include "clock.h" +#include "timestamp.h" +#include "conffile.h" -#ifndef AMANDA_DBGDIR -# define AMANDA_DBGDIR AMANDA_TMPDIR +#ifdef HAVE_GLIBC_BACKTRACE +#include #endif -#ifdef DEBUG_CODE +/* Minimum file descriptor on which to keep the debug file. This is intended + * to keep the descriptor "out of the way" of other processing. It's not clear + * that this is required any longer, but it doesn't hurt anything. + */ +#define MIN_DB_FD 10 -int debug = 1; +/* information on the current debug file */ +static int db_fd = 2; /* file descriptor (default stderr) */ +static FILE *db_file = NULL; /* stdio stream */ +static char *db_name = NULL; /* unqualified filename */ +static char *db_filename = NULL; /* fully qualified pathname */ -#define MIN_DB_FD 10 +/* directory containing debug file, including trailing slash */ +static char *dbgdir = NULL; + +/* time debug log was opened (timestamp of the file) */ +static time_t open_time; -static int db_fd = 2; /* default is stderr */ -static FILE *db_file = NULL; /* stderr may not be a constant */ -static char *db_name = NULL; /* filename */ -static char *db_filename = NULL; /* /path/to/filename */ +/* pointer to logfile.c's 'logerror()', if we're linked + * with it */ +static void (*logerror_fn)(char *) = NULL; -static pid_t debug_prefix_pid = 0; +/* storage for global variables */ +erroutput_type_t erroutput_type = ERR_INTERACTIVE; +int error_exit_status = 1; + +/* static function prototypes */ static char *get_debug_name(time_t t, int n); static void debug_setup_1(char *config, char *subdir); -static void debug_setup_2(char *s, int fd, char *notation); -static times_t debug_start_time; -static int debug_clock_is_running = 0; - -/* - * Format and write a debug message to the process debug file. - */ -printf_arglist_function(void debug_printf, const char *, format) -{ - va_list argp; +static void debug_setup_2(char *s, int fd, char *annotation); +static char *msg_timestamp(void); - /* - * It is common in the code to call dbprintf to write out - * syserrno(errno) and then turn around and try to do something else - * with errno (e.g. printf() or log()), so we make sure errno goes - * back out with the same value it came in with. - */ - if (debug != 0) { - int save_errno; - - save_errno = errno; - if(db_file == NULL && db_fd == 2) { - db_file = stderr; - } - if(db_file != NULL) { - arglist_start(argp, format); - vfprintf(db_file, format, argp); - fflush(db_file); - arglist_end(argp); - } - errno = save_errno; - } -} +static void debug_logging_handler(const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); +static void debug_setup_logging(void); /* * Generate a debug file name. The name is based on the program name, * followed by a timestamp, an optional sequence number, and ".debug". + * + * @param t: timestamp + * @param n: sequence number between 1 and 1000; if zero, no sequence number + * is included. */ static char * get_debug_name( @@ -103,24 +99,116 @@ get_debug_name( if(n < 0 || n > 1000) { return NULL; } - ts = construct_timestamp(&t); + ts = get_timestamp_from_time(t); if(n == 0) { number[0] = '\0'; } else { - snprintf(number, SIZEOF(number), "%03d", n - 1); + g_snprintf(number, SIZEOF(number), "%03d", n - 1); } result = vstralloc(get_pname(), ".", ts, number, ".debug", NULL); amfree(ts); return result; } -static char *dbgdir = NULL; -static time_t curtime; +/* A GLogFunc to handle g_log calls. This function assumes that user_data + * is either NULL or a pointer to one of the debug_* configuration variables + * in conffile.c, indicating whether logging for this log domain is enabled. + * + * @param log_domain: the log domain, or NULL for general logging + * @param log_level: level, fatality, and recursion flags + * @param message: the message to log + * @param user_pointer: unused + */ +static void +debug_logging_handler(const gchar *log_domain G_GNUC_UNUSED, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data G_GNUC_UNUSED) +{ + char *maxlevel = NULL; + + /* convert the highest level to a string and dbprintf it */ + if (log_level & G_LOG_LEVEL_ERROR) + maxlevel = _("error (fatal): "); + else if (log_level & G_LOG_LEVEL_CRITICAL) + maxlevel = _("critical (fatal): "); + else if (log_level & G_LOG_LEVEL_WARNING) + maxlevel = _("warning: "); + else if (log_level & G_LOG_LEVEL_MESSAGE) + maxlevel = _("message: "); + else if (log_level & G_LOG_LEVEL_INFO) + maxlevel = _("info: "); + else + maxlevel = ""; /* no level displayed for debugging */ + debug_printf("%s%s\n", maxlevel, message); + + /* error and critical levels have special handling */ + if (log_level & (G_LOG_LEVEL_ERROR|G_LOG_LEVEL_CRITICAL)) { + if (erroutput_type & ERR_AMANDALOG && logerror_fn != NULL) + (*logerror_fn)((char *)message); /* discard 'const' */ + + if (erroutput_type & ERR_SYSLOG) { +#ifdef LOG_AUTH + openlog(get_pname(), LOG_PID, LOG_AUTH); +#else + openlog(get_pname(), LOG_PID, 0); +#endif + syslog(LOG_NOTICE, "%s", message); + closelog(); + } + + if (erroutput_type & ERR_INTERACTIVE) { + g_fprintf(stderr, "%s: %s\n", get_pname(), message); + fflush(stderr); + } + +#ifdef HAVE_GLIBC_BACKTRACE + /* try logging a traceback to the debug log */ + if (db_fd != -1) { + void *stack[32]; + int naddrs; + naddrs = backtrace(stack, sizeof(stack)/sizeof(*stack)); + backtrace_symbols_fd(stack, naddrs, db_fd); + } +#endif + + /* we're done */ + if (log_level & G_LOG_LEVEL_CRITICAL) + exit(error_exit_status); + else + abort(); + g_assert_not_reached(); + } +} + +/* Install our handler into the glib log handling system. + */ +static void +debug_setup_logging(void) +{ + /* g_error and g_critical should be fatal, although the log handler + * takes care of this anyway */ + g_log_set_always_fatal(G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); + + /* set up handler (g_log_set_default_handler is new in glib-2.6, and + * hence not useable here) */ + g_log_set_handler(NULL, G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, + debug_logging_handler, NULL); +} + +/* Set the global dbgdir according to 'config' and 'subdir', and clean + * old debug files out of that directory + * + * The global open_time is set to the current time, and used to delete + * old files. + * + * @param config: configuration or NULL + * @param subdir: subdirectory (server, client, etc.) or NULL + */ static void debug_setup_1(char *config, char *subdir) { - struct passwd *pwent; char *pname; size_t pname_len; char *e = NULL; @@ -137,11 +225,6 @@ debug_setup_1(char *config, char *subdir) int i; memset(&sbuf, 0, SIZEOF(sbuf)); - if(client_uid == (uid_t) -1 && (pwent = getpwnam(CLIENT_LOGIN)) != NULL) { - client_uid = pwent->pw_uid; - client_gid = pwent->pw_gid; - endpwent(); - } pname = get_pname(); pname_len = strlen(pname); @@ -161,10 +244,10 @@ debug_setup_1(char *config, char *subdir) dbgdir = vstralloc(AMANDA_DBGDIR, "/", subdir, "/", NULL); else dbgdir = stralloc2(AMANDA_DBGDIR, "/"); - if(mkpdir(dbgdir, 02700, client_uid, client_gid) == -1) { - error("create debug directory \"%s\": %s", + if(mkpdir(dbgdir, 0700, get_client_uid(), get_client_gid()) == -1) { + error(_("create debug directory \"%s\": %s"), dbgdir, strerror(errno)); - /*NOTREACHED*/ + /*NOTREACHED*/ } amfree(sane_config); @@ -175,12 +258,12 @@ debug_setup_1(char *config, char *subdir) * not be a conflict between an old and new name. */ if((d = opendir(dbgdir)) == NULL) { - error("open debug directory \"%s\": %s", + error(_("open debug directory \"%s\": %s"), dbgdir, strerror(errno)); - /*NOTREACHED*/ + /*NOTREACHED*/ } - time(&curtime); - test_name = get_debug_name(curtime - (AMANDA_DEBUG_DAYS * 24 * 60 * 60), 0); + time(&open_time); + test_name = get_debug_name(open_time - (AMANDA_DEBUG_DAYS * 24 * 60 * 60), 0); test_name_len = strlen(test_name); while((entry = readdir(d)) != NULL) { if(is_dot_or_dotdot(entry->d_name)) { @@ -224,7 +307,7 @@ debug_setup_1(char *config, char *subdir) dbfilename = get_debug_name((time_t)sbuf.st_mtime, ++i); } if(dbfilename == NULL) { - error("cannot rename old debug file \"%s\"", entry->d_name); + error(_("cannot rename old debug file \"%s\""), entry->d_name); /*NOTREACHED*/ } } @@ -236,23 +319,44 @@ debug_setup_1(char *config, char *subdir) closedir(d); } +/* Given an already-opened debug file, set the file's ownership + * appropriately, move its file descriptor above MIN_DB_FD, and + * add an initial log entry to the file. + * + * This function records the file's identity in the globals + * db_filename, db_fd, and db_file. It does *not* set db_name. + * db_file is not set if fd is -1 + * + * This function uses the global 'open_time', which is set by + * debug_setup_1. + * + * @param s: the filename of the debug file; string should be malloc'd, + * and should *not* be freed by the caller. + * @param fd: the descriptor connected to the debug file, or -1 if + * no decriptor moving should take place. + * @param annotation: an extra string to include in the initial + * log entry. + */ static void debug_setup_2( char * s, int fd, - char * notation) + char * annotation) { - int saved_debug; - int i, rc; + int i; int fd_close[MIN_DB_FD+1]; amfree(db_filename); db_filename = s; s = NULL; - if ((rc = chown(db_filename, client_uid, client_gid)) < 0) { - dbprintf(("chown(%s, %d, %d) failed. <%s>", - db_filename, client_uid, client_gid, strerror(errno))); - (void)rc; + + /* If we're root, change the ownership of the debug files. If we're not root, + * this would either be redundant or an error. */ + if (geteuid() == 0) { + if (chown(db_filename, get_client_uid(), get_client_gid()) < 0) { + dbprintf(_("chown(%s, %d, %d) failed: %s"), + db_filename, (int)get_client_uid(), (int)get_client_gid(), strerror(errno)); + } } amfree(dbgdir); /* @@ -271,20 +375,47 @@ debug_setup_2( db_file = fdopen(db_fd, "a"); } - if (notation) { + if (annotation) { /* * Make the first debug log file entry. */ - saved_debug = debug; debug = 1; - debug_printf("%s: debug %d pid %ld ruid %ld euid %ld: %s at %s", - get_pname(), saved_debug, (long)getpid(), + debug_printf(_("pid %ld ruid %ld euid %ld: %s at %s"), + (long)getpid(), (long)getuid(), (long)geteuid(), - notation, - ctime(&curtime)); - debug = saved_debug; + annotation, + ctime(&open_time)); } } +/* Get current GMT time and return a message timestamp. + * Used for g_printf calls to logs and such. The return value + * is to a static buffer, so it should be used immediately. + * + * @returns: timestamp + */ +static char * +msg_timestamp(void) +{ + static char timestamp[128]; + struct timeval tv; + + gettimeofday(&tv, NULL); + g_snprintf(timestamp, SIZEOF(timestamp), "%lld.%06ld", + (long long)tv.tv_sec, (long)tv.tv_usec); + + return timestamp; +} + +/* + * ---- public functions + */ + +void +set_logerror(void (*f)(char *)) +{ + logerror_fn = f; +} + void debug_open(char *subdir) { @@ -292,40 +423,40 @@ debug_open(char *subdir) int i; char *s = NULL; mode_t mask; - amanda_timezone dontcare; - amanda_gettimeofday(&debug_start_time.r, &dontcare); - debug_clock_is_running = 1; + /* set up logging while we're here */ + debug_setup_logging(); - /* - * Do initial setup. - */ + /* set 'dbgdir' and clean out old debug files */ debug_setup_1(NULL, subdir); /* * Create the new file with a unique sequence number. */ mask = (mode_t)umask((mode_t)0037); /* Allow the group read bit through */ + + /* iteratate through sequence numbers until we find one that + * is not already in use */ for(i = 0; fd < 0; i++) { amfree(db_name); - if ((db_name = get_debug_name(curtime, i)) == NULL) { - error("Cannot create %s debug file", get_pname()); + if ((db_name = get_debug_name(open_time, i)) == NULL) { + error(_("Cannot create debug file name in %d tries."), i); /*NOTREACHED*/ - } + } if ((s = newvstralloc(s, dbgdir, db_name, NULL)) == NULL) { - error("Cannot allocate %s debug file name memory", get_pname()); + error(_("Cannot allocate debug file name memory")); /*NOTREACHED*/ } - if ((fd = open(s, O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0640)) < 0) { - if (errno != EEXIST) { - error("Cannot create %s debug file: %s", - get_pname(), strerror(errno)); - /*NOTREACHED*/ - } - amfree(s); - } + if ((fd = open(s, O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0640)) < 0) { + if (errno != EEXIST) { + error(_("Cannot create debug file \"%s\": %s"), + s, strerror(errno)); + /*NOTREACHED*/ + } + amfree(s); + } } (void)umask(mask); /* Restore mask */ @@ -340,7 +471,7 @@ debug_open(char *subdir) void debug_reopen( char * dbfilename, - char * notation) + char * annotation) { char *s = NULL; int fd; @@ -349,9 +480,7 @@ debug_reopen( return; } - /* - * Do initial setup. - */ + /* set 'dbgdir' and clean out old debug files */ debug_setup_1(NULL, NULL); /* @@ -363,7 +492,7 @@ debug_reopen( s = newvstralloc(s, dbgdir, dbfilename, NULL); } if ((fd = open(s, O_RDWR|O_APPEND)) < 0) { - error("cannot reopen %s debug file %s", get_pname(), dbfilename); + error(_("cannot reopen debug file %s"), dbfilename); /*NOTREACHED*/ } @@ -372,7 +501,7 @@ debug_reopen( * * Note: we release control of the string 's' points to. */ - debug_setup_2(s, fd, notation); + debug_setup_2(s, fd, annotation); } void @@ -388,9 +517,7 @@ debug_rename( if (!db_filename) return; - /* - * Do initial setup. - */ + /* set 'dbgdir' and clean out old debug files */ debug_setup_1(config, subdir); s = newvstralloc(s, dbgdir, db_name, NULL); @@ -401,20 +528,72 @@ debug_rename( } mask = (mode_t)umask((mode_t)0037); - /* check if a file with the same name already exist */ + +#if defined(__CYGWIN__) + /* + * On cygwin, rename will not overwrite an existing file nor + * will it rename a file that is open for writing... + * + * Rename file directly. Expect failure if file already exists + * or is open by another user. + */ + + i = 0; + while (rename(db_filename, s) < 0) { + if (errno != EEXIST) { + /* + * If the failure was not due to the target file name already + * existing then we have bigger issues at hand so we keep + * the existing file. + */ + dbprintf(_("Cannot rename \"%s\" to \"%s\": %s\n"), + db_filename, s, strerror(errno)); + s = newvstralloc(s, db_filename, NULL); + i = -1; + break; + } + + /* + * Files already exists: + * Continue searching for a unique file name that will work. + */ + amfree(db_name); + if ((db_name = get_debug_name(open_time, i++)) == NULL) { + dbprintf(_("Cannot create unique debug file name")); + break; + } + s = newvstralloc(s, dbgdir, db_name, NULL); + } + if (i >= 0) { + /* + * We need to close and reopen the original file handle to + * release control of the original debug file name. + */ + if ((fd = open(s, O_WRONLY|O_APPEND, 0640)) >= 0) { + /* + * We can safely close the the original log file + * since we now have a new working handle. + */ + db_fd = 2; + fclose(db_file); + db_file = NULL; + } + } +#else + /* check if a file with the same name already exists. */ if ((fd = open(s, O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0640)) < 0) { for(i = 0; fd < 0; i++) { amfree(db_name); - if ((db_name = get_debug_name(curtime, i)) == NULL) { - dbprintf(("Cannot create %s debug file", get_pname())); + if ((db_name = get_debug_name(open_time, i)) == NULL) { + dbprintf(_("Cannot create debug file")); break; } s = newvstralloc(s, dbgdir, db_name, NULL); if ((fd = open(s, O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0640)) < 0) { if (errno != EEXIST) { - dbprintf(("Cannot create %s debug file: %s", get_pname(), - strerror(errno))); + dbprintf(_("Cannot create debug file: %s"), + strerror(errno)); break; } } @@ -422,47 +601,77 @@ debug_rename( } if (fd >= 0) { - rename(db_filename, s); + close(fd); + if (rename(db_filename, s) == -1) { + dbprintf(_("Cannot rename \"%s\" to \"%s\": %s\n"), + db_filename, s, strerror(errno)); + } + fd = -1; } +#endif + (void)umask(mask); /* Restore mask */ - close(fd); /* * Finish setup. * * Note: we release control of the string 's' points to. */ - debug_setup_2(s, -1, "rename"); + debug_setup_2(s, fd, "rename"); } void debug_close(void) { time_t curtime; - int save_debug; - pid_t save_pid; time(&curtime); - save_debug = debug; - debug = 1; - save_pid = debug_prefix_pid; - debug_prefix_pid = 0; - debug_printf("%s: pid %ld finish time %s", - debug_prefix_time(NULL), - (long)getpid(), - ctime(&curtime)); - debug_prefix_pid = save_pid; - debug = save_debug; + debug_printf(_("pid %ld finish time %s"), (long)getpid(), ctime(&curtime)); if(db_file && fclose(db_file) == EOF) { int save_errno = errno; db_file = NULL; /* prevent recursion */ - fprintf(stderr, "close debug file: %s", strerror(save_errno)); + g_fprintf(stderr, _("close debug file: %s"), strerror(save_errno)); /*NOTREACHED*/ } - db_fd = -1; + db_fd = 2; db_file = NULL; amfree(db_filename); + amfree(db_name); +} + +/* + * Format and write a debug message to the process debug file. + */ +printf_arglist_function(void debug_printf, const char *, format) +{ + va_list argp; + int save_errno; + + /* + * It is common in the code to call dbprintf to write out + * syserrno(errno) and then turn around and try to do something else + * with errno (e.g. g_printf() or log()), so we make sure errno goes + * back out with the same value it came in with. + */ + + save_errno = errno; + + /* handle the default (stderr) if debug_open hasn't been called yet */ + if(db_file == NULL && db_fd == 2) { + db_file = stderr; + } + if(db_file != NULL) { + if (db_file != stderr) + g_fprintf(db_file, "%s: %s: ", msg_timestamp(), get_pname()); + else + g_fprintf(db_file, "%s: ", get_pname()); + arglist_start(argp, format); + g_vfprintf(db_file, format, argp); + arglist_end(argp); + fflush(db_file); + } + errno = save_errno; } int @@ -483,65 +692,16 @@ debug_fn(void) return db_filename; } -/* - * Routines for returning a common debug file line prefix. Always starts - * with the current program name, possibly with an optional suffix. - * May then be followed by a PID. May then be followed by an elapsed - * time indicator. - */ - void -set_debug_prefix_pid( - pid_t p) -{ - debug_prefix_pid = p; -} - -char * -debug_prefix( - char * suffix) +debug_dup_stderr_to_debug(void) { - int save_errno; - static char *s = NULL; - char debug_pid[NUM_STR_SIZE]; - - save_errno = errno; - s = newvstralloc(s, get_pname(), suffix, NULL); - if (debug_prefix_pid != (pid_t) 0) { - snprintf(debug_pid, SIZEOF(debug_pid), - "%ld", - (long) debug_prefix_pid); - s = newvstralloc(s, s, "[", debug_pid, "]", NULL); + if(db_fd != -1 && db_fd != STDERR_FILENO) + { + if(dup2(db_fd, STDERR_FILENO) != STDERR_FILENO) + { + error(_("can't redirect stderr to the debug file")); + g_assert_not_reached(); + } } - errno = save_errno; - return s; } -char * -debug_prefix_time( - char * suffix) -{ - int save_errno; - static char *s = NULL; - char *t1; - char *t2; - times_t diff; - times_t debug_end_time; - amanda_timezone dontcare; - - save_errno = errno; - if (debug_clock_is_running == 1) { - amanda_gettimeofday(&debug_end_time.r, &dontcare); - diff = timessub(debug_end_time,debug_start_time); - t1 = ": time "; - t2 = walltime_str(diff); - } else { - t1 = t2 = NULL; - } - - s = newvstralloc(s, debug_prefix(suffix), t1, t2, NULL); - - errno = save_errno; - return s; -} -#endif diff --git a/common-src/dgram.c b/common-src/dgram.c index e6d267b..7fbabb0 100644 --- a/common-src/dgram.c +++ b/common-src/dgram.c @@ -34,15 +34,16 @@ #include "dgram.h" #include "util.h" #include "conffile.h" +#include "sockaddr-util.h" void dgram_socket( dgram_t * dgram, int socket) { - if(socket < 0 || socket >= FD_SETSIZE) { - error("dgram_socket: socket %d out of range (0 .. %d)\n", - socket, FD_SETSIZE-1); + if(socket < 0 || socket >= (int)FD_SETSIZE) { + error(_("dgram_socket: socket %d out of range (0 .. %d)\n"), + socket, (int)FD_SETSIZE-1); /*NOTREACHED*/ } dgram->socket = socket; @@ -56,8 +57,8 @@ dgram_bind( in_port_t * portp) { int s, retries; - socklen_t len; - struct sockaddr_storage name; + socklen_t_equiv len; + sockaddr_union name; int save_errno; int *portrange; @@ -65,23 +66,21 @@ dgram_bind( *portp = (in_port_t)0; if((s = socket(family, SOCK_DGRAM, 0)) == -1) { save_errno = errno; - dbprintf(("%s: dgram_bind: socket() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("dgram_bind: socket() failed: %s\n"), + strerror(save_errno)); errno = save_errno; return -1; } if(s < 0 || s >= (int)FD_SETSIZE) { - dbprintf(("%s: dgram_bind: socket out of range: %d\n", - debug_prefix_time(NULL), - s)); + dbprintf(_("dgram_bind: socket out of range: %d\n"), + s); aclose(s); errno = EMFILE; /* out of range */ return -1; } - SS_INIT(&name, family); - SS_SET_INADDR_ANY(&name); + SU_INIT(&name, family); + SU_SET_INADDR_ANY(&name); /* * If a port range was specified, we try to get a port in that @@ -97,23 +96,20 @@ dgram_bind( for (retries = 0; ; retries++) { if (bind_portrange(s, &name, portrange[0], portrange[1], "udp") == 0) goto out; - dbprintf(("%s: dgram_bind: Could not bind to port in range: %d - %d.\n", - debug_prefix_time(NULL), portrange[0], portrange[1])); + dbprintf(_("dgram_bind: Could not bind to port in range: %d - %d.\n"), + portrange[0], portrange[1]); if (retries >= BIND_CYCLE_RETRIES) { - dbprintf(("%s: dgram_bind: Giving up...\n", - debug_prefix_time(NULL))); + dbprintf(_("dgram_bind: Giving up...\n")); break; } - dbprintf(("%s: dgram_bind: Retrying entire range after 10 second delay.\n", - debug_prefix_time(NULL))); + dbprintf(_("dgram_bind: Retrying entire range after 10 second delay.\n")); sleep(15); } save_errno = errno; - dbprintf(("%s: dgram_bind: bind(in6addr_any) failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("dgram_bind: bind(in6addr_any) failed: %s\n"), + strerror(save_errno)); aclose(s); errno = save_errno; return -1; @@ -121,28 +117,26 @@ dgram_bind( out: /* find out what name was actually used */ - len = (socklen_t)sizeof(name); + len = (socklen_t_equiv)sizeof(name); if(getsockname(s, (struct sockaddr *)&name, &len) == -1) { save_errno = errno; - dbprintf(("%s: dgram_bind: getsockname() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("dgram_bind: getsockname() failed: %s\n"), strerror(save_errno)); errno = save_errno; aclose(s); return -1; } - *portp = SS_GET_PORT(&name); + *portp = SU_GET_PORT(&name); dgram->socket = s; - dbprintf(("%s: dgram_bind: socket %d bound to %s\n", - debug_prefix_time(NULL), dgram->socket, str_sockaddr(&name))); + dbprintf(_("dgram_bind: socket %d bound to %s\n"), + dgram->socket, str_sockaddr(&name)); return 0; } int dgram_send_addr( - struct sockaddr_storage *addr, + sockaddr_union *addr, dgram_t * dgram) { int s, rc; @@ -155,39 +149,35 @@ dgram_send_addr( int r; #endif - dbprintf(("%s: dgram_send_addr(addr=%p, dgram=%p)\n", - debug_prefix_time(NULL), addr, dgram)); + dbprintf(_("dgram_send_addr(addr=%p, dgram=%p)\n"), + addr, dgram); dump_sockaddr(addr); - dbprintf(("%s: dgram_send_addr: %p->socket = %d\n", - debug_prefix_time(NULL), dgram, dgram->socket)); + dbprintf(_("dgram_send_addr: %p->socket = %d\n"), + dgram, dgram->socket); if(dgram->socket != -1) { s = dgram->socket; socket_opened = 0; } else { - if((s = socket(addr->ss_family, SOCK_DGRAM, 0)) == -1) { + if((s = socket(SU_GET_FAMILY(addr), SOCK_DGRAM, 0)) == -1) { save_errno = errno; - dbprintf(("%s: dgram_send_addr: socket() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("dgram_send_addr: socket() failed: %s\n"), + strerror(save_errno)); errno = save_errno; return -1; } socket_opened = 1; #ifdef USE_REUSEADDR r = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, - (void *)&on, (socklen_t)sizeof(on)); + (void *)&on, (socklen_t_equiv)sizeof(on)); if (r < 0) { - dbprintf(("%s: dgram_send_addr: setsockopt(SO_REUSEADDR) failed: %s\n", - debug_prefix_time(NULL), - strerror(errno))); + dbprintf(_("dgram_send_addr: setsockopt(SO_REUSEADDR) failed: %s\n"), + strerror(errno)); } #endif } - if(s < 0 || s >= FD_SETSIZE) { - dbprintf(("%s: dgram_send_addr: socket out of range: %d\n", - debug_prefix_time(NULL), - s)); + if(s < 0 || s >= (int)FD_SETSIZE) { + dbprintf(_("dgram_send_addr: socket out of range: %d\n"), s); errno = EMFILE; /* out of range */ rc = -1; } else { @@ -203,28 +193,25 @@ dgram_send_addr( #ifdef ECONNREFUSED if(errno == ECONNREFUSED && wait_count++ < max_wait) { sleep(5); - dbprintf(("%s: dgram_send_addr: sendto(%s): retry %d after ECONNREFUSED\n", - debug_prefix_time(NULL), + dbprintf(_("dgram_send_addr: sendto(%s): retry %d after ECONNREFUSED\n"), str_sockaddr(addr), - wait_count)); + wait_count); continue; } #endif #ifdef EAGAIN if(errno == EAGAIN && wait_count++ < max_wait) { sleep(5); - dbprintf(("%s: dgram_send_addr: sendto(%s): retry %d after EAGAIN\n", - debug_prefix_time(NULL), + dbprintf(_("dgram_send_addr: sendto(%s): retry %d after EAGAIN\n"), str_sockaddr(addr), - wait_count)); + wait_count); continue; } #endif save_errno = errno; - dbprintf(("%s: dgram_send_addr: sendto(%s) failed: %s \n", - debug_prefix_time(NULL), + dbprintf(_("dgram_send_addr: sendto(%s) failed: %s \n"), str_sockaddr(addr), - strerror(save_errno))); + strerror(save_errno)); errno = save_errno; rc = -1; break; @@ -234,10 +221,9 @@ dgram_send_addr( if(socket_opened) { save_errno = errno; if(close(s) == -1) { - dbprintf(("%s: dgram_send_addr: close(%s): failed: %s\n", - debug_prefix_time(NULL), + dbprintf(_("dgram_send_addr: close(%s): failed: %s\n"), str_sockaddr(addr), - strerror(errno))); + strerror(errno)); /* * Calling function should not care that the close failed. * It does care about the send results though. @@ -250,17 +236,18 @@ dgram_send_addr( } + ssize_t dgram_recv( dgram_t * dgram, int timeout, - struct sockaddr_storage *fromaddr) + sockaddr_union *fromaddr) { SELECT_ARG_TYPE ready; struct timeval to; ssize_t size; int sock; - socklen_t addrlen; + socklen_t_equiv addrlen; ssize_t nfound; int save_errno; @@ -271,31 +258,26 @@ dgram_recv( to.tv_sec = timeout; to.tv_usec = 0; - dbprintf(("%s: dgram_recv(dgram=%p, timeout=%u, fromaddr=%p)\n", - debug_prefix_time(NULL), dgram, timeout, fromaddr)); + dbprintf(_("dgram_recv(dgram=%p, timeout=%u, fromaddr=%p)\n"), + dgram, timeout, fromaddr); nfound = (ssize_t)select(sock+1, &ready, NULL, NULL, &to); if(nfound <= 0 || !FD_ISSET(sock, &ready)) { save_errno = errno; if(nfound < 0) { - dbprintf(("%s: dgram_recv: select() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("dgram_recv: select() failed: %s\n"), strerror(save_errno)); } else if(nfound == 0) { - dbprintf(("%s: dgram_recv: timeout after %d second%s\n", - debug_prefix_time(NULL), - timeout, - (timeout == 1) ? "" : "s")); + dbprintf(plural(_("dgram_recv: timeout after %d second\n"), + _("dgram_recv: timeout after %d seconds\n"), + timeout), + timeout); nfound = 0; } else if (!FD_ISSET(sock, &ready)) { int i; for(i = 0; i < sock + 1; i++) { if(FD_ISSET(i, &ready)) { - dbprintf(("%s: dgram_recv: got fd %d instead of %d\n", - debug_prefix_time(NULL), - i, - sock)); + dbprintf(_("dgram_recv: got fd %d instead of %d\n"), i, sock); } } save_errno = EBADF; @@ -305,14 +287,12 @@ dgram_recv( return nfound; } - addrlen = (socklen_t)sizeof(struct sockaddr_storage); + addrlen = (socklen_t_equiv)sizeof(sockaddr_union); size = recvfrom(sock, dgram->data, (size_t)MAX_DGRAM, 0, (struct sockaddr *)fromaddr, &addrlen); if(size == -1) { save_errno = errno; - dbprintf(("%s: dgram_recv: recvfrom() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("dgram_recv: recvfrom() failed: %s\n"), strerror(save_errno)); errno = save_errno; return -1; } @@ -350,7 +330,7 @@ printf_arglist_function1(int dgram_cat, dgram_t *, dgram, const char *, fmt) return -1; arglist_start(argp, fmt); - len = vsnprintf(dgram->cur, (size_t)bufsize, fmt, argp); + len = g_vsnprintf(dgram->cur, (size_t)bufsize, fmt, argp); arglist_end(argp); if(len < 0) { return -1; diff --git a/common-src/dgram.h b/common-src/dgram.h index eb5fbfd..84277b8 100644 --- a/common-src/dgram.h +++ b/common-src/dgram.h @@ -50,12 +50,12 @@ typedef struct dgram_s { int dgram_bind(dgram_t *dgram, sa_family_t family, in_port_t *portp); void dgram_socket(dgram_t *dgram, int sock); -int dgram_send_addr(struct sockaddr_storage *addr, dgram_t *dgram); +int dgram_send_addr(sockaddr_union *addr, dgram_t *dgram); ssize_t dgram_recv(dgram_t *dgram, int timeout, - struct sockaddr_storage *fromaddr); + sockaddr_union *fromaddr); void dgram_zero(dgram_t *dgram); int dgram_cat(dgram_t *dgram, const char *fmt, ...) - __attribute__ ((format (printf, 2, 3))); + G_GNUC_PRINTF(2,3); void dgram_eatline(dgram_t *dgram); #endif /* ! DGRAM_H */ diff --git a/common-src/error.c b/common-src/error.c deleted file mode 100644 index ade2e40..0000000 --- a/common-src/error.c +++ /dev/null @@ -1,181 +0,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. - * - * Author: James da Silva, Systems Design and Analysis Group - * Computer Science Department - * University of Maryland at College Park - */ -/* - * $Id: error.c,v 1.19 2006/05/25 01:47:11 johnfranks Exp $ - * - * error handling common to Amanda programs - */ -#include "amanda.h" -#include "arglist.h" - -#define MAXFUNCS 8 - -typedef void (*voidfunc)(void); -static voidfunc onerr[MAXFUNCS] = - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; - -int erroutput_type = ERR_INTERACTIVE; - -static char *pname = "unknown"; - -static void output_error_message(char *msg); - -static void (*logerror)(char *) = NULL; - -void -set_pname( - char * p) -{ - pname = p; -} - -char * -get_pname(void) -{ - return pname; -} - -void -set_logerror( - void (*f)(char *)) -{ - logerror = f; -} - - -static void -output_error_message( - char * msg) -{ - /* print and/or log message */ - - if((erroutput_type & ERR_AMANDALOG) != 0 && logerror != NULL) { - (*logerror)(msg); - } - - if(erroutput_type & ERR_SYSLOG) { -#ifdef LOG_AUTH - openlog(get_pname(), LOG_PID, LOG_AUTH); -#else - openlog(get_pname(), LOG_PID, 0); -#endif - syslog(LOG_NOTICE, "%s", msg); - closelog(); - } - - if(erroutput_type & ERR_INTERACTIVE) { - fprintf(stderr, "%s: %s\n", get_pname(), msg); - fflush(stderr); - } - - if(dbfp() != NULL) { - dbprintf(("%s: %s\n", debug_prefix_time(NULL), msg)); - dbclose(); - } -} - - -/* - * Prints an error message, calls the functions installed via onerror(), - * then exits. - */ -printf_arglist_function(void error, const char *, format) -{ - va_list argp; - int i; - char linebuf[STR_SIZE]; - - - /* format and output the error message */ - - arglist_start(argp, format); - vsnprintf(linebuf, SIZEOF(linebuf), format, argp); - arglist_end(argp); - output_error_message(linebuf); - - /* traverse function list, calling in reverse order */ - - for(i=MAXFUNCS-1; i >= 0; i--) { - if(onerr[i] != NULL) (*onerr[i])(); - } - - /* terminate */ - exit(1); -} - - -/* - * Prints an error message, calls the functions installed via onerror(), - * then calls abort() to drop core. - */ -printf_arglist_function(void errordump, const char *, format) -{ - va_list argp; - int i; - char linebuf[STR_SIZE]; - - /* format error message */ - - arglist_start(argp, format); - vsnprintf(linebuf, SIZEOF(linebuf), format, argp); - arglist_end(argp); - output_error_message(linebuf); - - /* traverse function list, calling in reverse order */ - - for(i=MAXFUNCS-1; i >= 0; i--) { - if(onerr[i] != NULL) (*onerr[i])(); - } - - /* terminate and drop core */ - abort(); -} - - -/* - * Register function to be called when error is called. Up to MAXFUNCS - * functions can be registered. If there isn't room in the table, onerror - * returns -1, otherwise it returns 0. - * - * The resemblance to atexit() is on purpose. I wouldn't need onerror() - * if everyone had atexit(). Bummer. - */ - -int -onerror( - void (*errf)(void)) -{ - int i; - - for(i=0; i < MAXFUNCS; i++) /* find empty slot */ - if(onerr[i] == NULL) { - onerr[i] = errf; - return 0; - } - - return -1; /* full table */ -} diff --git a/common-src/event.c b/common-src/event.c index 0959c72..11bad8b 100644 --- a/common-src/event.c +++ b/common-src/event.c @@ -36,10 +36,10 @@ #include "queue.h" #include "conffile.h" -#define event_debug(i,x) do { \ - if ((i) <= debug_event) { \ - dbprintf(x); \ - } \ +#define event_debug(i, ...) do { \ + if ((i) <= debug_event) { \ + dbprintf(__VA_ARGS__); \ + } \ } while (0) /* @@ -110,23 +110,23 @@ event_register( if ((type == EV_READFD) || (type == EV_WRITEFD)) { /* make sure we aren't given a high fd that will overflow a fd_set */ - if (data >= FD_SETSIZE) { - error("event_register: Invalid file descriptor %lu", data); + if (data >= (int)FD_SETSIZE) { + error(_("event_register: Invalid file descriptor %lu"), data); /*NOTREACHED*/ } #if !defined(__lint) /* Global checking knows that these are never called */ } else if (type == EV_SIG) { /* make sure signals are within range */ if (data >= NSIG) { - error("event_register: Invalid signal %lu", data); + error(_("event_register: Invalid signal %lu"), data); /*NOTREACHED*/ } if (sigtable[data].handle != NULL) { - error("event_register: signal %lu already registered", data); + error(_("event_register: signal %lu already registered"), data); /*NOTREACHED*/ } } else if (type >= EV_DEAD) { - error("event_register: Invalid event type %d", type); + error(_("event_register: Invalid event type %d"), type); /*NOTREACHED*/ #endif } @@ -140,9 +140,8 @@ event_register( eventq_add(eventq, handle); eventq.qlength++; - event_debug(1, ("%s: event: register: %p->data=%lu, type=%s\n", - debug_prefix_time(NULL), handle, handle->data, - event_type2str(handle->type))); + event_debug(1, _("event: register: %p->data=%lu, type=%s\n"), + handle, handle->data, event_type2str(handle->type)); return (handle); } @@ -158,9 +157,9 @@ event_release( assert(handle != NULL); - event_debug(1, ("%s: event: release (mark): %p data=%lu, type=%s\n", - debug_prefix_time(NULL), handle, handle->data, - event_type2str(handle->type))); + event_debug(1, _("event: release (mark): %p data=%lu, type=%s\n"), + handle, handle->data, + event_type2str(handle->type)); assert(handle->type != EV_DEAD); /* @@ -198,14 +197,12 @@ event_wakeup( event_handle_t *eh; int nwaken = 0; - event_debug(1, ("%s: event: wakeup: enter (%lu)\n", - debug_prefix_time(NULL), id)); + event_debug(1, _("event: wakeup: enter (%lu)\n"), id); for (eh = eventq_first(eventq); eh != NULL; eh = eventq_next(eh)) { if (eh->type == EV_WAIT && eh->data == id) { - event_debug(1, ("%s: event: wakeup: %p id=%lu\n", - debug_prefix_time(NULL), eh, id)); + event_debug(1, _("event: wakeup: %p id=%lu\n"), eh, id); fire(eh); nwaken++; } @@ -258,9 +255,8 @@ event_loop_wait( int event_wait_fired = 0; int see_event; - event_debug(1, ("%s: event: loop: enter: dontblock=%d, qlength=%d, eh=%p\n", - debug_prefix_time(NULL), - dontblock, eventq.qlength, wait_eh)); + event_debug(1, _("event: loop: enter: dontblock=%d, qlength=%d, eh=%p\n"), + dontblock, eventq.qlength, wait_eh); /* * If we have no events, we have nothing to do @@ -283,14 +279,12 @@ event_loop_wait( do { if (debug_event >= 1) { - event_debug(1, ("%s: event: loop: dontblock=%d, qlength=%d eh=%p\n", - debug_prefix_time(NULL), dontblock, eventq.qlength, - wait_eh)); + event_debug(1, _("event: loop: dontblock=%d, qlength=%d eh=%p\n"), + dontblock, eventq.qlength, wait_eh); for (eh = eventq_first(eventq); eh != NULL; eh = eventq_next(eh)) { - event_debug(1, ("%s: %p): %s data=%lu fn=%p arg=%p\n", - debug_prefix_time(NULL), eh, - event_type2str(eh->type), eh->data, eh->fn, - eh->arg)); + event_debug(1, _("%p): %s data=%lu fn=%p arg=%p\n"), + eh, event_type2str(eh->type), eh->data, eh->fn, + eh->arg); } } /* @@ -427,12 +421,11 @@ event_loop_wait( * Let 'er rip */ event_debug(1, - ("%s: event: select: dontblock=%d, maxfd=%d, timeout=%ld\n", - debug_prefix_time(NULL), dontblock, maxfd, - tvptr != NULL ? timeout.tv_sec : -1)); + _("event: select: dontblock=%d, maxfd=%d, timeout=%ld\n"), + dontblock, maxfd, + tvptr != NULL ? timeout.tv_sec : -1); rc = select(maxfd + 1, &readfds, &writefds, &errfds, tvptr); - event_debug(1, ("%s: event: select returns %d\n", - debug_prefix_time(NULL), rc)); + event_debug(1, _("event: select returns %d\n"), rc); /* * Select errors can mean many things. Interrupted events should @@ -442,7 +435,7 @@ event_loop_wait( if (rc < 0) { if (errno != EINTR) { if (++ntries > 5) { - error("select failed: %s", strerror(errno)); + error(_("select failed: %s"), strerror(errno)); /*NOTREACHED*/ } continue; @@ -623,5 +616,5 @@ event_type2str( for (i = 0; i < (size_t)(sizeof(event_types) / sizeof(event_types[0])); i++) if (type == event_types[i].type) return (event_types[i].name); - return ("BOGUS EVENT TYPE"); + return (_("BOGUS EVENT TYPE")); } diff --git a/common-src/event.h b/common-src/event.h index be64f89..402d899 100644 --- a/common-src/event.h +++ b/common-src/event.h @@ -47,6 +47,7 @@ typedef struct event_handle event_handle_t; * of event we are registering. This is hopefully wide enough that * callers can cast pointers to it and keep the value untruncated and * unique. + * FIXME: THIS IS NOT 64-BIT CLEAN! */ typedef unsigned long event_id_t; diff --git a/common-src/file.c b/common-src/file.c index cadcf0a..6f2a0ac 100644 --- a/common-src/file.c +++ b/common-src/file.c @@ -30,19 +30,19 @@ #include "amanda.h" #include "util.h" +#include "timestamp.h" +#include "arglist.h" +#include "file.h" static int mk1dir(const char *, mode_t, uid_t, gid_t); static void areads_getbuf(const char *s, int l, int fd); - -uid_t client_uid = (uid_t) -1; -gid_t client_gid = (gid_t) -1; +static char *original_cwd = NULL; /* Make a directory (internal function). -** If the directory already exists then we pretend we created it. -** XXX - I'm not sure about the use of the chown() stuff. On most systems -** it will do nothing - only root is permitted to change the owner -** of a file. -*/ + * If the directory already exists then we pretend we created it. + * + * The uid and gid are used only if we are running as root. + */ static int mk1dir( const char *dir, /* directory to create */ @@ -52,17 +52,23 @@ mk1dir( { int rc; /* return code */ - if((rc = mkdir(dir, mode)) == 0) { - if ((rc = chown(dir, uid, gid)) == 0) { /* mkdir() affected by the umask */ - rc = chmod(dir, mode); - } - } else { /* maybe someone beat us to it */ + rc = mkdir(dir, mode); + if(rc != 0) { int serrno; serrno = errno; - if(access(dir, F_OK) != 0) - rc = -1; - errno = serrno; /* pass back the real error */ + if(access(dir, F_OK) == 0) + rc = 0; /* someone just beat us to it, so it's OK */ + errno = serrno; + } + + /* mkdir is affected by umask, so set the mode bits manually */ + if (rc == 0) { + rc = chmod(dir, mode); + } + + if (rc == 0 && geteuid() == 0) { + rc = chown(dir, uid, gid); } return rc; @@ -161,9 +167,6 @@ rmpdir( * * void safe_cd (void) * - * entry: client_uid and client_gid set to CLIENT_LOGIN information - * exit: none - * * Set a default umask of 0077. * * Create the Amada debug directory (if defined) and the Amanda temp @@ -186,25 +189,25 @@ safe_cd(void) { int cd_ok = 0; struct stat sbuf; - struct passwd *pwent; char *d; - - if(client_uid == (uid_t) -1 && (pwent = getpwnam(CLIENT_LOGIN)) != NULL) { - client_uid = pwent->pw_uid; - client_gid = pwent->pw_gid; - endpwent(); - } + uid_t client_uid = get_client_uid(); + gid_t client_gid = get_client_gid(); (void) umask(0077); + /* stash away the current directory for later reference */ + if (original_cwd == NULL) { + original_cwd = g_get_current_dir(); + } + if (client_uid != (uid_t) -1) { #if defined(AMANDA_DBGDIR) d = stralloc2(AMANDA_DBGDIR, "/."); - (void) mkpdir(d, (mode_t)02700, client_uid, client_gid); + (void) mkpdir(d, (mode_t)0700, client_uid, client_gid); amfree(d); #endif d = stralloc2(AMANDA_TMPDIR, "/."); - (void) mkpdir(d, (mode_t)02700, client_uid, client_gid); + (void) mkpdir(d, (mode_t)0700, client_uid, client_gid); amfree(d); } @@ -256,7 +259,7 @@ safe_fd( { int fd; - for(fd = 0; fd < FD_SETSIZE; fd++) { + for(fd = 0; fd < (int)FD_SETSIZE; fd++) { if (fd < 3) { /* * Open three file descriptors. If one of the standard @@ -269,7 +272,7 @@ safe_fd( */ if (fcntl(fd, F_GETFD) == -1) { if (open("/dev/null", O_RDWR) == -1) { - fprintf(stderr, "/dev/null is inaccessable: %s\n", + g_fprintf(stderr, _("/dev/null is inaccessable: %s\n"), strerror(errno)); exit(1); } @@ -319,7 +322,7 @@ save_core(void) char suffix[2]; char *old, *new; - ts = construct_datestamp((time_t *)&sbuf.st_mtime); + ts = get_datestamp_from_time(sbuf.st_mtime); suffix[0] = 'z'; suffix[1] = '\0'; old = vstralloc("core", ts, suffix, NULL); @@ -346,11 +349,13 @@ save_core(void) /* ** Sanitise a file name. ** -** Convert all '/' characters to '_' so that we can use, +** Convert all '/', ':', and '\' characters to '_' so that we can use, ** for example, disk names as part of file names. ** Notes: ** - there is a many-to-one mapping between input and output -** - Only / and '\0' are disallowed in filenames by POSIX... +** - Only / and '\0' are disallowed in filenames by POSIX, but Windows +** disallows ':' and '\' as well. Furthermore, we use ':' as a +** delimiter at other points in Amanda. */ char * sanitise_filename( @@ -366,7 +371,7 @@ sanitise_filename( d = buf; s = inp; while((ch = *s++) != '\0') { - if(ch == '/') { + if((ch == '/') || (ch == ':') || (ch == '\\')) { ch = '_'; /* convert "bad" to "_" */ } *d++ = (char)ch; @@ -406,6 +411,17 @@ old_sanitise_filename( return buf; } +void +canonicalize_pathname(char *pathname, char *result_buf) +{ +#ifdef __CYGWIN__ + cygwin_conv_to_full_posix_path(pathname, result_buf); +#else + strncpy(result_buf, pathname, PATH_MAX-1); + result_buf[PATH_MAX-1] = '\0'; +#endif +} + /* *===================================================================== * Get the next line of input from a stdio file. @@ -623,8 +639,6 @@ debug_areads ( size_t size; ssize_t r; - malloc_enter(dbmalloc_caller_loc(s, l)); - if(fd < 0) { errno = EBADF; return NULL; @@ -657,7 +671,6 @@ debug_areads ( if(r == 0) { errno = 0; /* flag EOF instead of error */ } - malloc_leave(dbmalloc_caller_loc(s, l)); return NULL; } endptr[r] = '\0'; /* we always leave room for this */ @@ -670,10 +683,135 @@ debug_areads ( memmove(buffer, nl, size); areads_buffer[fd].endptr = buffer + size; areads_buffer[fd].endptr[0] = '\0'; - malloc_leave(dbmalloc_caller_loc(s, l)); return line; } +int robust_open(const char * pathname, int flags, mode_t mode) { + int result = -1; + int e_busy_count = 0; + + for (;;) { + if (flags & O_CREAT) { + result = open(pathname, flags, mode); + } else { + result = open(pathname, flags); + } + + if (result < 0) { +#ifdef EBUSY + /* EBUSY is a tricky one; sometimes it is synonymous with + EINTR, but sometimes it means the device is open + elsewhere (e.g., with a tape drive on Linux). We take + the middle path and retry, but with limited + patience. */ + if (errno == EBUSY && e_busy_count < 10) { + e_busy_count ++; + continue; + } else +#endif + if (0 + /* Always retry on EINTR; if the caller did + not specify non-blocking mode, then also retry on + EAGAIN or EWOULDBLOCK. */ +#ifdef EINTR + || errno == EINTR +#endif + || ( 1 +#ifdef O_NONBLOCK + && !(flags & O_NONBLOCK) +#endif + && ( 0 +#ifdef EAGAIN + || errno == EAGAIN +#endif +#ifdef EWOULDBLOCK + || errno == EWOULDBLOCK +#endif + ) ) ) { + /* Try again */ + continue; + } else { + /* Failure. */ + return result; + } + } else { + break; + } + } + +#ifdef F_SETFD + if (result >= 0) { + fcntl(result, F_SETFD, 1); /* Throw away result. */ + } +#endif + + return result; +} + +int robust_close(int fd) { + for (;;) { + int result; + + result = close(fd); + if (result != 0 && (0 +#ifdef EINTR + || errno == EINTR +#endif +#ifdef EBUSY + || errno == EBUSY +#endif +#ifdef EAGAIN + || errno == EAGAIN +#endif +#ifdef EWOULDBLOCK + || errno == EWOULDBLOCK +#endif + )) { + continue; + } else { + return result; + } + } +} + +uid_t +get_client_uid(void) +{ + static uid_t client_uid = (uid_t) -1; + struct passwd *pwent; + + if(client_uid == (uid_t) -1 && (pwent = getpwnam(CLIENT_LOGIN)) != NULL) { + client_uid = pwent->pw_uid; + endpwent(); + } + + return client_uid; +} + +gid_t +get_client_gid(void) +{ + static gid_t client_gid = (gid_t) -1; + struct passwd *pwent; + + if(client_gid == (gid_t) -1 && (pwent = getpwnam(CLIENT_LOGIN)) != NULL) { + client_gid = pwent->pw_gid; + endpwent(); + } + + return client_gid; +} + +char * +get_original_cwd(void) +{ + if (original_cwd == NULL) { + original_cwd = g_get_current_dir(); + } + + return original_cwd; +} + #ifdef TEST int @@ -688,6 +826,15 @@ main( char *file; char *line; + /* + * 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("file test"); @@ -710,25 +857,25 @@ main( name = argv[3]; } - fprintf(stderr, "Create parent directories of %s ...", name); + g_fprintf(stderr, _("Create parent directories of %s ..."), name); rc = mkpdir(name, (mode_t)02777, (uid_t)-1, (gid_t)-1); if (rc == 0) - fprintf(stderr, " done\n"); + g_fprintf(stderr, " done\n"); else { - perror("failed"); + perror(_("failed")); return rc; } - fprintf(stderr, "Delete %s back to %s ...", name, top); + g_fprintf(stderr, _("Delete %s back to %s ..."), name, top); rc = rmpdir(name, top); if (rc == 0) - fprintf(stderr, " done\n"); + g_fprintf(stderr, _(" done\n")); else { - perror("failed"); + perror(_("failed")); return rc; } - fprintf(stderr, "areads dump of %s ...", file); + g_fprintf(stderr, _("areads dump of %s ..."), file); if ((fd = open (file, 0)) < 0) { perror(file); return 1; @@ -739,10 +886,11 @@ main( amfree(line); } aclose(fd); - fprintf(stderr, " done.\n"); + g_fprintf(stderr, _(" done.\n")); - fprintf(stderr, "Finished.\n"); + g_fprintf(stderr, _("Finished.\n")); return 0; } #endif + diff --git a/common-src/fileheader.c b/common-src/fileheader.c index 9d18d8c..ead4619 100644 --- a/common-src/fileheader.c +++ b/common-src/fileheader.c @@ -24,16 +24,20 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: fileheader.c,v 1.40 2006/07/01 00:10:38 paddy_s Exp $ + * $Id: fileheader.c 6512 2007-05-24 17:00:24Z ian $ */ #include "amanda.h" #include "fileheader.h" +#include +#include "util.h" static const char * filetype2str(filetype_t); static filetype_t str2filetype(const char *); static void strange_header(dumpfile_t *, const char *, size_t, const char *, const char *); +static char * strquotedstr(void); +static ssize_t hexdump(const char *buffer, size_t len); void fh_init( @@ -56,10 +60,10 @@ strange_header( if (expected == NULL) expected = ""; - fprintf(stderr, "%s: strange amanda header: \"%.*s\"\n", get_pname(), + g_fprintf(stderr, _("%s: strange amanda header: \"%.*s\"\n"), get_pname(), (int)buflen, buffer); - fprintf(stderr, "%s: Expected: \"%s\" Actual: \"%s\"\n", get_pname(), + g_fprintf(stderr, _("%s: Expected: \"%s\" Actual: \"%s\"\n"), get_pname(), expected, actual); file->type = F_WEIRD; @@ -104,12 +108,11 @@ parse_file_header( tok = strtok(line1, " "); if (tok == NULL) { - fprintf(stderr, "%s: Empty amanda header: buflen=" SIZE_T_FMT - " lsize=" SIZE_T_FMT "\n", get_pname(), - (SIZE_T_FMT_TYPE)buflen, - (SIZE_T_FMT_TYPE)lsize); + g_fprintf(stderr, _("%s: Empty amanda header: buflen=%zu lsize=%zu\n"), get_pname(), + buflen, + lsize); hexdump(buffer, lsize); - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } @@ -122,7 +125,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } file->type = str2filetype(tok); @@ -137,7 +140,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } strncpy(file->datestamp, tok, SIZEOF(file->datestamp) - 1); @@ -150,7 +153,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } strncpy(file->name, tok, SIZEOF(file->name) - 1); @@ -161,21 +164,21 @@ parse_file_header( case F_SPLIT_DUMPFILE: tok = strtok(NULL, " "); if (tok == NULL) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } strncpy(file->datestamp, tok, SIZEOF(file->datestamp) - 1); tok = strtok(NULL, " "); if (tok == NULL) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } strncpy(file->name, tok, SIZEOF(file->name) - 1); tok = strquotedstr(); if (tok == NULL) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } uqname = unquote_string(tok); @@ -191,7 +194,7 @@ parse_file_header( tok = strtok(NULL, "/"); if ((tok == NULL) || (sscanf(tok, "%d", &file->partnum) != 1)) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } @@ -200,7 +203,7 @@ parse_file_header( many parts there are. */ tok = strtok(NULL, " "); if((tok == NULL) || (sscanf(tok, "%d", &file->totalparts) != 1)) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } } @@ -213,7 +216,7 @@ parse_file_header( tok = strtok(NULL, " "); if ((tok == NULL) || (sscanf(tok, "%d", &file->dumplevel) != 1)) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } @@ -225,7 +228,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } strncpy(file->comp_suffix, tok, SIZEOF(file->comp_suffix) - 1); @@ -245,7 +248,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } strncpy(file->program, tok, SIZEOF(file->program) - 1); @@ -259,7 +262,7 @@ parse_file_header( if (BSTRNCMP(tok, "crypt") == 0) { tok = strtok(NULL, " "); if (tok == NULL) { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); goto out; } strncpy(file->encrypt_suffix, tok, @@ -274,7 +277,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { strange_header(file, buffer, buflen, - "", tok); + _(""), tok); goto out; } strncpy(file->srvcompprog, tok, SIZEOF(file->srvcompprog) - 1); @@ -287,7 +290,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { strange_header(file, buffer, buflen, - "", tok); + _(""), tok); goto out; } strncpy(file->clntcompprog, tok, SIZEOF(file->clntcompprog) - 1); @@ -300,7 +303,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { strange_header(file, buffer, buflen, - "", tok); + _(""), tok); goto out; } strncpy(file->srv_encrypt, tok, SIZEOF(file->srv_encrypt) - 1); @@ -313,7 +316,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { strange_header(file, buffer, buflen, - "", tok); + _(""), tok); goto out; } strncpy(file->clnt_encrypt, tok, SIZEOF(file->clnt_encrypt) - 1); @@ -326,7 +329,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { strange_header(file, buffer, buflen, - "", tok); + _(""), tok); goto out; } strncpy(file->srv_decrypt_opt, tok, @@ -340,7 +343,7 @@ parse_file_header( tok = strtok(NULL, " "); if (tok == NULL) { strange_header(file, buffer, buflen, - "", tok); + _(""), tok); goto out; } strncpy(file->clnt_decrypt_opt, tok, @@ -362,7 +365,7 @@ parse_file_header( else strncpy(file->datestamp, tok, SIZEOF(file->datestamp) - 1); } else { - strange_header(file, buffer, buflen, "", tok); + strange_header(file, buffer, buflen, _(""), tok); } } else { file->datestamp[0] = '\0'; @@ -371,7 +374,7 @@ parse_file_header( default: strange_header(file, buffer, buflen, - "TAPESTART|DUMPFILE|CONT_DUMPFILE|SPLIT_DUMPFILE|TAPEEND", tok); + _("TAPESTART|DUMPFILE|CONT_DUMPFILE|SPLIT_DUMPFILE|TAPEEND"), tok); goto out; } @@ -403,7 +406,7 @@ parse_file_header( } #undef SC -#define SC "To restore, position tape at start of file and run:" +#define SC _("To restore, position tape at start of file and run:") if (strncmp(line, SC, SIZEOF(SC) - 1) == 0) continue; #undef SC @@ -442,15 +445,15 @@ parse_file_header( strncpy(file->recover_cmd, cmd1, SIZEOF(file->recover_cmd) - 1); } else { - snprintf(file->uncompress_cmd, + g_snprintf(file->uncompress_cmd, SIZEOF(file->uncompress_cmd), "%s|", cmd1); strncpy(file->recover_cmd, cmd2, SIZEOF(file->recover_cmd) - 1); } } else { /* cmd3 presents: decrypt | uncompress | recover */ - snprintf(file->decrypt_cmd, + g_snprintf(file->decrypt_cmd, SIZEOF(file->decrypt_cmd), "%s|", cmd1); - snprintf(file->uncompress_cmd, + g_snprintf(file->uncompress_cmd, SIZEOF(file->uncompress_cmd), "%s|", cmd2); strncpy(file->recover_cmd, cmd3, SIZEOF(file->recover_cmd) - 1); @@ -470,51 +473,34 @@ void dump_dumpfile_t( const dumpfile_t *file) { - const char *pname = get_pname(); - - dbprintf(("%s: Contents of *(dumpfile_t *)%p:\n", pname, file)); - dbprintf(("%s: type = %d (%s)\n", pname, - file->type, filetype2str(file->type))); - dbprintf(("%s: datestamp = '%s'\n", pname, - file->datestamp)); - dbprintf(("%s: dumplevel = %d\n", pname, file->dumplevel)); - dbprintf(("%s: compressed = %d\n", pname, file->compressed)); - dbprintf(("%s: encrypted = %d\n", pname, file->encrypted)); - dbprintf(("%s: comp_suffix = '%s'\n", pname, - file->comp_suffix)); - dbprintf(("%s: encrypt_suffix = '%s'\n", pname, - file->encrypt_suffix)); - dbprintf(("%s: name = '%s'\n", pname, file->name)); - dbprintf(("%s: disk = '%s'\n", pname, file->disk)); - dbprintf(("%s: program = '%s'\n", pname, file->program)); - dbprintf(("%s: dumper = '%s'\n", pname, file->dumper)); - dbprintf(("%s: srvcompprog = '%s'\n", pname, - file->srvcompprog)); - dbprintf(("%s: clntcompprog = '%s'\n", pname, - file->clntcompprog)); - dbprintf(("%s: srv_encrypt = '%s'\n", pname, - file->srv_encrypt)); - dbprintf(("%s: clnt_encrypt = '%s'\n", pname, - file->clnt_encrypt)); - dbprintf(("%s: recover_cmd = '%s'\n", pname, - file->recover_cmd)); - dbprintf(("%s: uncompress_cmd = '%s'\n", pname, - file->uncompress_cmd)); - dbprintf(("%s: encrypt_cmd = '%s'\n", pname, - file->encrypt_cmd)); - dbprintf(("%s: decrypt_cmd = '%s'\n", pname, - file->decrypt_cmd)); - dbprintf(("%s: srv_decrypt_opt = '%s'\n", pname, - file->srv_decrypt_opt)); - dbprintf(("%s: clnt_decrypt_opt = '%s'\n", pname, - file->clnt_decrypt_opt)); - dbprintf(("%s: cont_filename = '%s'\n", pname, - file->cont_filename)); - dbprintf(("%s: is_partial = %d\n", pname, file->is_partial)); - dbprintf(("%s: partnum = %d\n", pname, file->partnum)); - dbprintf(("%s: totalparts = %d\n", pname, file->totalparts)); - dbprintf(("%s: blocksize = " SIZE_T_FMT "\n", pname, - (SIZE_T_FMT_TYPE)file->blocksize)); + dbprintf(_("Contents of *(dumpfile_t *)%p:\n"), file); + dbprintf(_(" type = %d (%s)\n"), + file->type, filetype2str(file->type)); + dbprintf(_(" datestamp = '%s'\n"), file->datestamp); + dbprintf(_(" dumplevel = %d\n"), file->dumplevel); + dbprintf(_(" compressed = %d\n"), file->compressed); + dbprintf(_(" encrypted = %d\n"), file->encrypted); + dbprintf(_(" comp_suffix = '%s'\n"), file->comp_suffix); + dbprintf(_(" encrypt_suffix = '%s'\n"), file->encrypt_suffix); + dbprintf(_(" name = '%s'\n"), file->name); + dbprintf(_(" disk = '%s'\n"), file->disk); + dbprintf(_(" program = '%s'\n"), file->program); + dbprintf(_(" dumper = '%s'\n"), file->dumper); + dbprintf(_(" srvcompprog = '%s'\n"), file->srvcompprog); + dbprintf(_(" clntcompprog = '%s'\n"), file->clntcompprog); + dbprintf(_(" srv_encrypt = '%s'\n"), file->srv_encrypt); + dbprintf(_(" clnt_encrypt = '%s'\n"), file->clnt_encrypt); + dbprintf(_(" recover_cmd = '%s'\n"), file->recover_cmd); + dbprintf(_(" uncompress_cmd = '%s'\n"), file->uncompress_cmd); + dbprintf(_(" encrypt_cmd = '%s'\n"), file->encrypt_cmd); + dbprintf(_(" decrypt_cmd = '%s'\n"), file->decrypt_cmd); + dbprintf(_(" srv_decrypt_opt = '%s'\n"), file->srv_decrypt_opt); + dbprintf(_(" clnt_decrypt_opt = '%s'\n"), file->clnt_decrypt_opt); + dbprintf(_(" cont_filename = '%s'\n"), file->cont_filename); + dbprintf(_(" is_partial = %d\n"), file->is_partial); + dbprintf(_(" partnum = %d\n"), file->partnum); + dbprintf(_(" totalparts = %d\n"), file->totalparts); + dbprintf(_(" blocksize = %zu\n"), file->blocksize); } static void @@ -522,7 +508,7 @@ validate_name( const char *name) { if (strlen(name) == 0) { - error("Invalid name '%s'\n", name); + error(_("Invalid name '%s'\n"), name); /*NOTREACHED*/ } } @@ -541,7 +527,7 @@ validate_datestamp( if ((strlen(datestamp) == 14) && match("^[0-9]{14}$", datestamp)) { return; } - error("Invalid datestamp '%s'\n", datestamp); + error(_("Invalid datestamp '%s'\n"), datestamp); /*NOTREACHED*/ } @@ -551,159 +537,144 @@ validate_parts( const int totalparts) { if (partnum < 1) { - error("Invalid partnum (%d)\n", partnum); + error(_("Invalid partnum (%d)\n"), partnum); /*NOTREACHED*/ } if (partnum > totalparts && totalparts >= 0) { - error("Invalid partnum (%d) > totalparts (%d)\n", + error(_("Invalid partnum (%d) > totalparts (%d)\n"), partnum, totalparts); /*NOTREACHED*/ } } -void -build_header( - char * buffer, - const dumpfile_t * file, - size_t buflen) +char * +build_header(const dumpfile_t * file, size_t size) { - int n; + GString *rval, *split_data; char *qname; - char split_data[128] = ""; + char *program; - dbprintf(("%s: Building type %d (%s) header of size " SIZE_T_FMT " using:\n", - get_pname(), file->type, filetype2str(file->type), - (SIZE_T_FMT_TYPE)buflen)); + dbprintf(_("Building type %d (%s) header of size %zu using:\n"), + file->type, filetype2str(file->type), size); dump_dumpfile_t(file); - memset(buffer,'\0',buflen); - + rval = g_string_sized_new(size); + split_data = g_string_sized_new(10); + switch (file->type) { case F_TAPESTART: validate_name(file->name); validate_datestamp(file->datestamp); - snprintf(buffer, buflen, - "AMANDA: TAPESTART DATE %s TAPE %s\n014\n", - file->datestamp, file->name); + g_string_printf(rval, + "AMANDA: TAPESTART DATE %s TAPE %s\n014\n", + file->datestamp, file->name); break; - + case F_SPLIT_DUMPFILE: validate_parts(file->partnum, file->totalparts); - snprintf(split_data, SIZEOF(split_data), - " part %d/%d ", file->partnum, file->totalparts); - /*FALLTHROUGH*/ + g_string_printf(split_data, + " part %d/%d ", file->partnum, file->totalparts); + /* FALLTHROUGH */ + case F_CONT_DUMPFILE: case F_DUMPFILE : validate_name(file->name); validate_datestamp(file->datestamp); qname = quote_string(file->disk); - n = snprintf(buffer, buflen, - "AMANDA: %s %s %s %s %s lev %d comp %s program %s", - filetype2str(file->type), - file->datestamp, file->name, qname, - split_data, - file->dumplevel, file->comp_suffix, file->program); + program = stralloc(file->program); + if (match("^.*[.][Ee][Xx][Ee]$", program)) { + /* Trim ".exe" from program name */ + program[strlen(program) - strlen(".exe")] = '\0'; + } + g_string_printf(rval, + "AMANDA: %s %s %s %s %s lev %d comp %s program %s", + filetype2str(file->type), + file->datestamp, file->name, qname, + split_data->str, + file->dumplevel, file->comp_suffix, program); + amfree(program); amfree(qname); - if ( n ) { - buffer += n; - buflen -= n; - n = 0; - } - if (strcmp(file->encrypt_suffix, "enc") == 0) { /* only output crypt if it's enabled */ - n = snprintf(buffer, buflen, " crypt %s", file->encrypt_suffix); - } - if ( n ) { - buffer += n; - buflen -= n; - n = 0; + /* only output crypt if it's enabled */ + if (strcmp(file->encrypt_suffix, "enc") == 0) { + g_string_append_printf(rval, " crypt %s", file->encrypt_suffix); } if (*file->srvcompprog) { - n = snprintf(buffer, buflen, " server_custom_compress %s", file->srvcompprog); + g_string_append_printf(rval, " server_custom_compress %s", + file->srvcompprog); } else if (*file->clntcompprog) { - n = snprintf(buffer, buflen, " client_custom_compress %s", file->clntcompprog); + g_string_append_printf(rval, " client_custom_compress %s", + file->clntcompprog); } - - if ( n ) { - buffer += n; - buflen -= n; - n = 0; - } - + if (*file->srv_encrypt) { - n = snprintf(buffer, buflen, " server_encrypt %s", file->srv_encrypt); + g_string_append_printf(rval, " server_encrypt %s", + file->srv_encrypt); } else if (*file->clnt_encrypt) { - n = snprintf(buffer, buflen, " client_encrypt %s", file->clnt_encrypt); + g_string_append_printf(rval, " client_encrypt %s", + file->clnt_encrypt); } - - if ( n ) { - buffer += n; - buflen -= n; - n = 0; - } - + if (*file->srv_decrypt_opt) { - n = snprintf(buffer, buflen, " server_decrypt_option %s", file->srv_decrypt_opt); - } else if (*file->clnt_decrypt_opt) { - n = snprintf(buffer, buflen, " client_decrypt_option %s", file->clnt_decrypt_opt); + g_string_append_printf(rval, " server_decrypt_option %s", + file->srv_decrypt_opt); + } else if (*file->clnt_decrypt_opt) { + g_string_append_printf(rval, " client_decrypt_option %s", + file->clnt_decrypt_opt); } - - if ( n ) { - buffer += n; - buflen -= n; - n = 0; - } - - n = snprintf(buffer, buflen, "\n"); - buffer += n; - buflen -= n; - + + g_string_append_printf(rval, "\n"); + if (file->cont_filename[0] != '\0') { - n = snprintf(buffer, buflen, "CONT_FILENAME=%s\n", - file->cont_filename); - buffer += n; - buflen -= n; + g_string_append_printf(rval, "CONT_FILENAME=%s\n", + file->cont_filename); } if (file->dumper[0] != '\0') { - n = snprintf(buffer, buflen, "DUMPER=%s\n", file->dumper); - buffer += n; - buflen -= n; + g_string_append_printf(rval, "DUMPER=%s\n", file->dumper); } if (file->is_partial != 0) { - n = snprintf(buffer, buflen, "PARTIAL=YES\n"); - buffer += n; - buflen -= n; + g_string_append_printf(rval, "PARTIAL=YES\n"); } - - n = snprintf(buffer, buflen, - "To restore, position tape at start of file and run:\n"); - buffer += n; - buflen -= n; + + g_string_append_printf(rval, + _("To restore, position tape at start of file and run:\n")); /* \014 == ^L == form feed */ - n = snprintf(buffer, buflen, - "\tdd if= bs=" SIZE_T_FMT "k skip=1 | %s %s %s\n\014\n", - (SIZE_T_FMT_TYPE)file->blocksize / 1024, file->decrypt_cmd, - file->uncompress_cmd, file->recover_cmd); + g_string_append_printf(rval, + "\tdd if= bs=%zuk skip=1 |%s %s %s\n\014\n", + file->blocksize / 1024, + file->decrypt_cmd, file->uncompress_cmd, + file->recover_cmd); break; case F_TAPEEND: validate_datestamp(file->datestamp); - snprintf(buffer, buflen, "AMANDA: TAPEEND DATE %s\n\014\n", - file->datestamp); + g_string_printf(rval, "AMANDA: TAPEEND DATE %s\n\014\n", + file->datestamp); break; case F_UNKNOWN: case F_EMPTY: case F_WEIRD: default: - error("Invalid header type: %d (%s)", + error(_("Invalid header type: %d (%s)"), file->type, filetype2str(file->type)); /*NOTREACHED*/ } + + g_string_free(split_data, TRUE); + + /* Since we don't return the length, it is an error for the header to be + * more than 'size' bytes */ + assert(rval->len <= size); + /* Clear extra bytes. */ + if (rval->len < size) { + bzero(rval->str + rval->len, rval->allocated_len - rval->len); + } + return g_string_free(rval, FALSE); } /* @@ -719,79 +690,79 @@ print_header( switch(file->type) { case F_EMPTY: - fprintf(outf, "EMPTY file\n"); + g_fprintf(outf, _("EMPTY file\n")); break; case F_UNKNOWN: - fprintf(outf, "UNKNOWN file\n"); + g_fprintf(outf, _("UNKNOWN file\n")); break; case F_WEIRD: - fprintf(outf, "WEIRD file\n"); + g_fprintf(outf, _("WEIRD file\n")); break; case F_TAPESTART: - fprintf(outf, "start of tape: date %s label %s\n", + g_fprintf(outf, _("start of tape: date %s label %s\n"), file->datestamp, file->name); break; case F_DUMPFILE: case F_CONT_DUMPFILE: qdisk = quote_string(file->disk); - fprintf(outf, "%s: date %s host %s disk %s lev %d comp %s", + g_fprintf(outf, "%s: date %s host %s disk %s lev %d comp %s", filetype2str(file->type), file->datestamp, file->name, qdisk, file->dumplevel, file->comp_suffix); if (*file->program) - fprintf(outf, " program %s",file->program); + g_fprintf(outf, " program %s", file->program); if (strcmp(file->encrypt_suffix, "enc") == 0) - fprintf(outf, " crypt %s", file->encrypt_suffix); + g_fprintf(outf, " crypt %s", file->encrypt_suffix); if (*file->srvcompprog) - fprintf(outf, " server_custom_compress %s", file->srvcompprog); + g_fprintf(outf, " server_custom_compress %s", file->srvcompprog); if (*file->clntcompprog) - fprintf(outf, " client_custom_compress %s", file->clntcompprog); + g_fprintf(outf, " client_custom_compress %s", file->clntcompprog); if (*file->srv_encrypt) - fprintf(outf, " server_encrypt %s", file->srv_encrypt); + g_fprintf(outf, " server_encrypt %s", file->srv_encrypt); if (*file->clnt_encrypt) - fprintf(outf, " client_encrypt %s", file->clnt_encrypt); + g_fprintf(outf, " client_encrypt %s", file->clnt_encrypt); if (*file->srv_decrypt_opt) - fprintf(outf, " server_decrypt_option %s", file->srv_decrypt_opt); + g_fprintf(outf, " server_decrypt_option %s", file->srv_decrypt_opt); if (*file->clnt_decrypt_opt) - fprintf(outf, " client_decrypt_option %s", file->clnt_decrypt_opt); - fprintf(outf, "\n"); + g_fprintf(outf, " client_decrypt_option %s", file->clnt_decrypt_opt); + g_fprintf(outf, "\n"); amfree(qdisk); break; case F_SPLIT_DUMPFILE: if(file->totalparts > 0){ - snprintf(number, SIZEOF(number), "%d", file->totalparts); + g_snprintf(number, SIZEOF(number), "%d", file->totalparts); } - else snprintf(number, SIZEOF(number), "UNKNOWN"); + else g_snprintf(number, SIZEOF(number), "UNKNOWN"); qdisk = quote_string(file->disk); - fprintf(outf, "split dumpfile: date %s host %s disk %s part %d/%s lev %d comp %s", + g_fprintf(outf, "split dumpfile: date %s host %s disk %s part %d/%s lev %d comp %s", file->datestamp, file->name, qdisk, file->partnum, number, file->dumplevel, file->comp_suffix); if (*file->program) - fprintf(outf, " program %s",file->program); + g_fprintf(outf, " program %s",file->program); if (strcmp(file->encrypt_suffix, "enc") == 0) - fprintf(outf, " crypt %s", file->encrypt_suffix); + g_fprintf(outf, " crypt %s", file->encrypt_suffix); if (*file->srvcompprog) - fprintf(outf, " server_custom_compress %s", file->srvcompprog); + g_fprintf(outf, " server_custom_compress %s", file->srvcompprog); if (*file->clntcompprog) - fprintf(outf, " client_custom_compress %s", file->clntcompprog); + g_fprintf(outf, " client_custom_compress %s", file->clntcompprog); if (*file->srv_encrypt) - fprintf(outf, " server_encrypt %s", file->srv_encrypt); + g_fprintf(outf, " server_encrypt %s", file->srv_encrypt); if (*file->clnt_encrypt) - fprintf(outf, " client_encrypt %s", file->clnt_encrypt); + g_fprintf(outf, " client_encrypt %s", file->clnt_encrypt); if (*file->srv_decrypt_opt) - fprintf(outf, " server_decrypt_option %s", file->srv_decrypt_opt); + g_fprintf(outf, " server_decrypt_option %s", file->srv_decrypt_opt); if (*file->clnt_decrypt_opt) - fprintf(outf, " client_decrypt_option %s", file->clnt_decrypt_opt); - fprintf(outf, "\n"); + g_fprintf(outf, " client_decrypt_option %s", file->clnt_decrypt_opt); + g_fprintf(outf, "\n"); amfree(qdisk); break; case F_TAPEEND: - fprintf(outf, "end of tape: date %s\n", file->datestamp); + g_fprintf(outf, "end of tape: date %s\n", file->datestamp); break; } } @@ -848,3 +819,63 @@ str2filetype( return (filetypetab[i].type); return (F_UNKNOWN); } + +gboolean headers_are_equal(dumpfile_t * a, dumpfile_t * b) { + if (a == NULL && b == NULL) + return TRUE; + + if (a == NULL || b == NULL) + return FALSE; + + return 0 == memcmp(a, b, sizeof(*a)); +} + +dumpfile_t * dumpfile_copy(dumpfile_t* source) { + gpointer rval = malloc(sizeof(dumpfile_t)); + memcpy(rval, source, sizeof(dumpfile_t)); + return rval; +} + +/* + * This function modify strtok context. + */ +static char * +strquotedstr(void) +{ + char * tok = strtok(NULL, " "); + size_t len; + + len = strlen(tok); + if ((tok != NULL) && (tok[0] == '"') && + (len > 1 && (tok[len - 1] != '"') && (tok[len - 2] != '\\'))) { + char * t; + + do { + t = strtok(NULL, " "); + tok[len] = ' '; + len = strlen(tok); + } while ((t != NULL) && + (tok[len - 1] != '"') && (tok[len - 2] != '\\')); + } + return tok; +} + +static ssize_t +hexdump( + const char *buffer, + size_t len) +{ + ssize_t rc = -1; + + FILE *stream = popen("od -c -x -", "w"); + + if (stream != NULL) { + fflush(stdout); + rc = (ssize_t)fwrite(buffer, len, 1, stream); + if (ferror(stream)) + rc = -1; + pclose(stream); + } + return rc; +} + diff --git a/common-src/fileheader.h b/common-src/fileheader.h index ea7bda5..f54fae5 100644 --- a/common-src/fileheader.h +++ b/common-src/fileheader.h @@ -31,15 +31,15 @@ #ifndef FILEHEADER_H #define FILEHEADER_H -#include "amanda.h" -#include "util.h" /* for bstrncmp() */ +#include +#include #define STRMAX 256 typedef char string_t[STRMAX]; typedef enum { - F_UNKNOWN, F_WEIRD, F_TAPESTART, F_TAPEEND, - F_DUMPFILE, F_CONT_DUMPFILE, F_SPLIT_DUMPFILE, F_EMPTY + F_UNKNOWN = 0, F_WEIRD = -1, F_TAPESTART = 1, F_TAPEEND = 2, + F_DUMPFILE = 3, F_CONT_DUMPFILE = 4, F_SPLIT_DUMPFILE = 5, F_EMPTY = -2 } filetype_t; typedef struct file_s { @@ -73,11 +73,23 @@ typedef struct file_s { /* local functions */ +/* Makes a serialized header from the dumpfile_t representation. The + * return value is allocated using malloc(), so you must free it. + * + * Build_header guarantees that the buffer returned is exactly + * 'size' bytes, with any extra bytes zeroed out. */ +char * build_header (const dumpfile_t *file, size_t size); + void fh_init(dumpfile_t *file); void parse_file_header(const char *buffer, dumpfile_t *file, size_t buflen); -void build_header(char *buffer, const dumpfile_t *file, size_t buflen); void print_header(FILE *outf, const dumpfile_t *file); int known_compress_type(const dumpfile_t *file); void dump_dumpfile_t(const dumpfile_t *file); +/* Returns TRUE if the two headers are equal, FALSE otherwise. */ +gboolean headers_are_equal(dumpfile_t * a, dumpfile_t * b); + +/* Returns an allocated duplicate header. */ +dumpfile_t * dumpfile_copy(dumpfile_t* from); + #endif /* !FILEHEADER_H */ diff --git a/common-src/genversion.c b/common-src/genversion.c index 21243b9..5ded561 100644 --- a/common-src/genversion.c +++ b/common-src/genversion.c @@ -24,12 +24,17 @@ * 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 @@ 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 @@ prstr( endline(); startline(""); } - printf(" %s", string); + g_printf(" %s", string); linelen += len; } @@ -87,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 @@ 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 @@ 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) @@ -139,12 +144,12 @@ prnum( 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 @@ 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); @@ -188,16 +202,22 @@ main( 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(); @@ -207,6 +227,7 @@ main( prvar("bindir", bindir); prvar("sbindir", sbindir); prvar("libexecdir", libexecdir); + prvar("amlibexecdir", amlibexecdir); prvar("mandir", mandir); prvar("AMANDA_TMPDIR", AMANDA_TMPDIR); #ifdef AMANDA_DBGDIR @@ -290,7 +311,11 @@ main( 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); @@ -411,8 +436,8 @@ main( prvar("CLIENT_LOGIN", CLIENT_LOGIN); -#ifdef FORCE_USERID - prstr("FORCE_USERID"); +#ifdef CHECK_USERID + prstr("CHECK_USERID"); #endif #ifdef USE_VERSION_SUFFIXES @@ -441,7 +466,7 @@ main( endline(); - printf(" 0\n};\n"); + g_printf(" 0\n};\n"); return (0); /* exit */ } diff --git a/common-src/krb4-security.c b/common-src/krb4-security.c index b4ca980..77fa3bd 100644 --- a/common-src/krb4-security.c +++ b/common-src/krb4-security.c @@ -31,7 +31,6 @@ */ #include "config.h" -#ifdef KRB4_SECURITY #include #include @@ -96,7 +95,7 @@ struct krb4_stream { security_stream_t secstr; /* MUST be first */ struct krb4_handle *krb4_handle; /* pointer into above */ int fd; /* io file descriptor */ - int port; /* local port this is bound to */ + in_port_t port; /* local port this is bound to */ int socket; /* fd for server-side accepts */ event_handle_t *ev_read; /* read event handle */ char databuf[MAX_TAPE_BLOCK_BYTES]; /* read buffer */ @@ -108,7 +107,9 @@ struct krb4_stream { /* * This is the tcp stream buffer size */ +#ifndef STREAM_BUFSIZE #define STREAM_BUFSIZE (MAX_TAPE_BLOCK_BYTES * 2) +#endif /* * Interface functions @@ -224,7 +225,7 @@ static void (*accept_fn)(security_handle_t *, pkt_t *); */ union mutual { char pad[8]; - long cksum; + unsigned long cksum; }; /* @@ -243,8 +244,8 @@ static void recvpkt_timeout(void *); static int recv_security_ok(struct krb4_handle *, pkt_t *); static void stream_read_callback(void *); static void stream_read_sync_callback(void *); -static int net_write(int, const void *, size_t); -static int net_read(int, void *, size_t, int); +static int knet_write(int, const void *, size_t); +static int knet_read(int, void *, size_t, int); static int add_ticket(struct krb4_handle *, const pkt_t *, dgram_t *); static void add_mutual_auth(struct krb4_handle *, dgram_t *); @@ -252,8 +253,8 @@ static int check_ticket(struct krb4_handle *, const pkt_t *, const char *, unsigned long); static int check_mutual_auth(struct krb4_handle *, const char *); -static const char *pkthdr2str(const struct krb4_handle *, const pkt_t *); -static int str2pkthdr(const char *, pkt_t *, char *, size_t, int *); +static const char *kpkthdr2str(const struct krb4_handle *, const pkt_t *); +static int str2kpkthdr(const char *, pkt_t *, char *, size_t, int *); static const char *bin2astr(const unsigned char *, int); static void astr2bin(const unsigned char *, unsigned char *, int *); @@ -280,7 +281,7 @@ static void init(void) { char tktfile[256]; - int port; + in_port_t port; static int beenhere = 0; if (beenhere) @@ -291,7 +292,7 @@ init(void) hostname[SIZEOF(hostname) - 1] = '\0'; if (atexit(killtickets) < 0) - error("could not setup krb4 exit handler: %s", strerror(errno)); + error(_("could not setup krb4 exit handler: %s"), strerror(errno)); /* * [XXX] It could be argued that if KRBTKFILE is set outside of amanda, @@ -299,7 +300,7 @@ init(void) * This file also needs to be removed so that no extra tickets are * hanging around. */ - snprintf(tktfile, SIZEOF(tktfile), "/tmp/tkt%ld-%ld.amanda", + g_snprintf(tktfile, SIZEOF(tktfile), "/tmp/tkt%ld-%ld.amanda", (long)getuid(), (long)getpid()); ticketfilename = stralloc(tktfile); unlink(ticketfilename); @@ -329,12 +330,12 @@ get_tgt(void) strncpy(realm, krb_realmofhost(hostname), SIZEOF(realm) - 1); realm[SIZEOF(realm) - 1] = '\0'; - rc = krb_get_svc_in_tkt(SERVER_HOST_PRINCIPLE, SERVER_HOST_INSTANCE, + rc = krb_get_svc_in_tkt(SERVER_HOST_PRINCIPAL, SERVER_HOST_INSTANCE, realm, "krbtgt", realm, TICKET_LIFETIME, SERVER_HOST_KEY_FILE); if (rc != 0) { - error("could not get krbtgt for %s.%s@%s from %s: %s", - SERVER_HOST_PRINCIPLE, SERVER_HOST_INSTANCE, realm, + error(_("could not get krbtgt for %s.%s@%s from %s: %s"), + SERVER_HOST_PRINCIPAL, SERVER_HOST_INSTANCE, realm, SERVER_HOST_KEY_FILE, krb_err_txt[rc]); } @@ -358,7 +359,10 @@ krb4_connect( char handle[32]; struct servent *se; struct hostent *he; - int port; + in_port_t port; + + (void)conf_fn; /* Quiet unused parameter warning */ + (void)datap; /* Quiet unused parameter warning */ assert(hostname != NULL); @@ -372,7 +376,7 @@ krb4_connect( if ((he = gethostbyname(hostname)) == NULL) { security_seterror(&kh->sech, - "%s: could not resolve hostname", hostname); + _("%s: could not resolve hostname"), hostname); (*fn)(arg, &kh->sech, S_ERROR); return; } @@ -380,7 +384,7 @@ krb4_connect( port = (int)KAMANDA_SERVICE_DEFAULT; else port = ntohs(se->s_port); - snprintf(handle, SIZEOF(handle), "%ld", (long)time(NULL)); + g_snprintf(handle, SIZEOF(handle), "%ld", (long)time(NULL)); inithandle(kh, he, (int)port, handle); (*fn)(arg, &kh->sech, S_OK); } @@ -395,6 +399,8 @@ krb4_accept( int out, void (*fn)(security_handle_t *, pkt_t *)) { + (void)driver; /* Quiet unused parameter warning */ + (void)out; /* Quiet unused parameter warning */ /* * Make sure we're initted @@ -497,7 +503,7 @@ krb4_sendpkt( /* * Add the header to the packet */ - dgram_cat(&netfd, pkthdr2str(kh, pkt)); + dgram_cat(&netfd, kpkthdr2str(kh, pkt)); /* * Add the security info. This depends on which kind of packet we're @@ -536,7 +542,7 @@ krb4_sendpkt( dgram_cat(&netfd, pkt->body); if (dgram_send_addr(&kh->peer, &netfd) != 0) { security_seterror(&kh->sech, - "send %s to %s failed: %s", pkt_type2str(pkt->type), + _("send %s to %s failed: %s"), pkt_type2str(pkt->type), kh->hostname, strerror(errno)); return (-1); } @@ -635,7 +641,7 @@ krb4_stream_server( ks->socket = stream_server(&ks->port, STREAM_BUFSIZE, STREAM_BUFSIZE, 1); if (ks->socket < 0) { security_seterror(&kh->sech, - "can't create server stream: %s", strerror(errno)); + _("can't create server stream: %s"), strerror(errno)); amfree(ks); return (NULL); } @@ -664,7 +670,7 @@ krb4_stream_accept( ks->fd = stream_accept(ks->socket, 30, STREAM_BUFSIZE, STREAM_BUFSIZE); if (ks->fd < 0) { security_stream_seterror(&ks->secstr, - "can't accept new stream connection: %s", strerror(errno)); + _("can't accept new stream connection: %s"), strerror(errno)); return (-1); } return (0); @@ -689,7 +695,7 @@ krb4_stream_client( &ks->port, 0); if (ks->fd < 0) { security_seterror(&kh->sech, - "can't connect stream to %s port %d: %s", kh->hostname, id, + _("can't connect stream to %s port %d: %s"), kh->hostname, id, strerror(errno)); amfree(ks); return (NULL); @@ -754,12 +760,12 @@ krb4_stream_auth( * and present it to the other side. */ gettimeofday(&local, &tz); - enc.tv_sec = (long)htonl((uint32_t)local.tv_sec); - enc.tv_usec = (long)htonl((uint32_t)local.tv_usec); + enc.tv_sec = (long)htonl((guint32)local.tv_sec); + enc.tv_usec = (long)htonl((guint32)local.tv_usec); encrypt_data(&enc, SIZEOF(enc), &kh->session_key); - if (net_write(fd, &enc, SIZEOF(enc)) < 0) { + if (knet_write(fd, &enc, SIZEOF(enc)) < 0) { security_stream_seterror(&ks->secstr, - "krb4 stream handshake write error: %s", strerror(errno)); + _("krb4 stream handshake write error: %s"), strerror(errno)); return (-1); } @@ -768,20 +774,20 @@ krb4_stream_auth( * and useconds by one. Reencrypt, and present to the other side. * Timeout in 10 seconds. */ - if (net_read(fd, &enc, SIZEOF(enc), 60) < 0) { + if (knet_read(fd, &enc, SIZEOF(enc), 60) < 0) { security_stream_seterror(&ks->secstr, - "krb4 stream handshake read error: %s", strerror(errno)); + _("krb4 stream handshake read error: %s"), strerror(errno)); return (-1); } decrypt_data(&enc, SIZEOF(enc), &kh->session_key); /* XXX do timestamp checking here */ - enc.tv_sec = (long)htonl(ntohl((uint32_t)enc.tv_sec) + 1); - enc.tv_usec =(long)htonl(ntohl((uint32_t)enc.tv_usec) + 1); + enc.tv_sec = (long)htonl(ntohl((guint32)enc.tv_sec) + 1); + enc.tv_usec =(long)htonl(ntohl((guint32)enc.tv_usec) + 1); encrypt_data(&enc, SIZEOF(enc), &kh->session_key); - if (net_write(fd, &enc, SIZEOF(enc)) < 0) { + if (knet_write(fd, &enc, SIZEOF(enc)) < 0) { security_stream_seterror(&ks->secstr, - "krb4 stream handshake write error: %s", strerror(errno)); + _("krb4 stream handshake write error: %s"), strerror(errno)); return (-1); } @@ -790,21 +796,21 @@ krb4_stream_auth( * If they incremented it properly, then succeed. * Timeout in 10 seconds. */ - if (net_read(fd, &enc, SIZEOF(enc), 60) < 0) { + if (knet_read(fd, &enc, SIZEOF(enc), 60) < 0) { security_stream_seterror(&ks->secstr, - "krb4 stream handshake read error: %s", strerror(errno)); + _("krb4 stream handshake read error: %s"), strerror(errno)); return (-1); } decrypt_data(&enc, SIZEOF(enc), &kh->session_key); - if ((ntohl((uint32_t)enc.tv_sec) == (uint32_t)(local.tv_sec + 1)) && - (ntohl((uint32_t)enc.tv_usec) == (uint32_t)(local.tv_usec + 1))) + if ((ntohl((guint32)enc.tv_sec) == (uint32_t)(local.tv_sec + 1)) && + (ntohl((guint32)enc.tv_usec) == (uint32_t)(local.tv_usec + 1))) return (0); security_stream_seterror(&ks->secstr, - "krb4 handshake failed: sent %ld,%ld - recv %ld,%ld", + _("krb4 handshake failed: sent %ld,%ld - recv %ld,%ld"), (long)(local.tv_sec + 1), (long)(local.tv_usec + 1), - (long)ntohl((uint32_t)enc.tv_sec), - (long)ntohl((uint32_t)enc.tv_usec)); + (long)ntohl((guint32)enc.tv_sec), + (long)ntohl((guint32)enc.tv_usec)); return (-1); } @@ -833,14 +839,12 @@ krb4_stream_write( size_t size) { struct krb4_stream *ks = s; - struct krb4_handle *kh = ks->krb4_handle; assert(ks != NULL); - assert(kh != NULL); - if (net_write(ks->fd, buf, size) < 0) { + if (knet_write(ks->fd, buf, size) < 0) { security_stream_seterror(&ks->secstr, - "write error on stream %d: %s", ks->fd, strerror(errno)); + _("write error on stream %d: %s"), ks->fd, strerror(errno)); return (-1); } return (0); @@ -982,6 +986,7 @@ recvpkt_callback( void (*fn)(void *, pkt_t *, security_status_t); void *arg; + (void)cookie; /* Quiet unused parameter warning */ assert(cookie == NULL); /* @@ -992,7 +997,7 @@ recvpkt_callback( dgram_zero(&netfd); if (dgram_recv(&netfd, 0, &peer) < 0) return; - if (str2pkthdr(netfd.cur, &pkt, handle, SIZEOF(handle), &sequence) < 0) + if (str2kpkthdr(netfd.cur, &pkt, handle, SIZEOF(handle), &sequence) < 0) return; for (kh = handleq_first(); kh != NULL; kh = handleq_next(kh)) { @@ -1091,17 +1096,17 @@ add_ticket( * Get a ticket with the user-defined service and instance, * and using the checksum of the body of the request packet. */ - rc = krb_mk_req(&ticket, CLIENT_HOST_PRINCIPLE, inst, kh->realm, + rc = krb_mk_req(&ticket, CLIENT_HOST_PRINCIPAL, inst, kh->realm, kh->cksum); if (rc == NO_TKT_FIL) { /* It's been kdestroyed. Get a new one and try again */ get_tgt(); - rc = krb_mk_req(&ticket, CLIENT_HOST_PRINCIPLE, inst, kh->realm, + rc = krb_mk_req(&ticket, CLIENT_HOST_PRINCIPAL, inst, kh->realm, kh->cksum); } if (rc != 0) { security_seterror(&kh->sech, - "krb_mk_req failed: %s (%d)", error_message(rc), rc); + _("krb_mk_req failed: %s (%d)"), error_message(rc), rc); return (-1); } /* @@ -1134,7 +1139,7 @@ add_mutual_auth( assert(kh->session_key[0] != '\0'); memset(&mutual, 0, SIZEOF(mutual)); - mutual.cksum = (unsigned long)htonl((uint32_t)kh->cksum + 1); + mutual.cksum = (unsigned long)htonl((guint32)kh->cksum + 1); encrypt_data(&mutual, SIZEOF(mutual), &kh->session_key); security = vstralloc("SECURITY MUTUAL-AUTH ", @@ -1164,7 +1169,7 @@ recv_security_ok( * Set this preemptively before we mangle the body. */ security_seterror(&kh->sech, - "bad %s SECURITY line from %s: '%s'", pkt_type2str(pkt->type), + _("bad %s SECURITY line from %s: '%s'"), pkt_type2str(pkt->type), kh->hostname, pkt->body); @@ -1223,7 +1228,7 @@ recv_security_ok( return (-1); if (strcmp(tok, "TICKET") != 0) { security_seterror(&kh->sech, - "REQ SECURITY line parse error, expecting TICKET, got %s", tok); + _("REQ SECURITY line parse error, expecting TICKET, got %s"), tok); return (-1); } @@ -1297,6 +1302,8 @@ check_ticket( char *user; int rc; + (void)pkt; /* Quiet unused parameter warning */ + assert(kh != NULL); assert(pkt != NULL); assert(ticket_str != NULL); @@ -1314,11 +1321,11 @@ check_ticket( inst[SIZEOF(inst) - 1] = '\0'; /* get the checksum out of the ticket */ - rc = krb_rd_req(&ticket, CLIENT_HOST_PRINCIPLE, inst, + rc = krb_rd_req(&ticket, CLIENT_HOST_PRINCIPAL, inst, kh->peer.sin6_addr.s_addr, &auth, CLIENT_HOST_KEY_FILE); if (rc != 0) { security_seterror(&kh->sech, - "krb_rd_req failed for %s: %s (%d)", kh->hostname, + _("krb_rd_req failed for %s: %s (%d)"), kh->hostname, error_message(rc), rc); return (-1); } @@ -1326,7 +1333,7 @@ check_ticket( /* verify and save the checksum and session key */ if (auth.checksum != cksum) { security_seterror(&kh->sech, - "krb4 checksum mismatch for %s (remote=%lu, local=%lu)", + _("krb4 checksum mismatch for %s (remote=%lu, local=%lu)"), kh->hostname, (long)auth.checksum, cksum); return (-1); } @@ -1334,16 +1341,16 @@ check_ticket( memcpy(kh->session_key, auth.session, SIZEOF(kh->session_key)); /* - * If FORCE_USERID is set, then we need to specifically + * If CHECK_USERID is set, then we need to specifically * check the userid we're forcing ourself to. Otherwise, * just check the login we're currently setuid to. */ -#ifdef FORCE_USERID +#ifdef CHECK_USERID if ((pwd = getpwnam(CLIENT_LOGIN)) == NULL) - error("error [getpwnam(%s) fails]", CLIENT_LOGIN); + error(_("error [getpwnam(%s) fails]"), CLIENT_LOGIN); #else if ((pwd = getpwuid(getuid())) == NULL) - error("error [getpwuid(%d) fails]", getuid()); + error(_("error [getpwuid(%d) fails]"), getuid()); #endif /* save the username in case it's overwritten */ @@ -1352,7 +1359,7 @@ check_ticket( /* check the klogin file */ if (kuserok(&auth, user)) { security_seterror(&kh->sech, - "access as %s not allowed from %s.%s@%s", user, auth.pname, + _("access as %s not allowed from %s.%s@%s"), user, auth.pname, auth.pinst, auth.prealm); amfree(user); return (-1); @@ -1388,12 +1395,12 @@ check_mutual_auth( /* unencrypt the string using the key in the ticket file */ host2key(kh->hostname, kh->inst, &kh->session_key); decrypt_data(&mutual, (size_t)len, &kh->session_key); - mutual.cksum = (unsigned long)ntohl((uint32_t)mutual.cksum); + mutual.cksum = (unsigned long)ntohl((guint32)mutual.cksum); /* the data must be the same as our request cksum + 1 */ if (mutual.cksum != (kh->cksum + 1)) { security_seterror(&kh->sech, - "krb4 checksum mismatch from %s (remote=%lu, local=%lu)", + _("krb4 checksum mismatch from %s (remote=%lu, local=%lu)"), kh->hostname, mutual.cksum, kh->cksum + 1); return (-1); } @@ -1405,7 +1412,7 @@ check_mutual_auth( * Convert a pkt_t into a header string for our packet */ static const char * -pkthdr2str( +kpkthdr2str( const struct krb4_handle * kh, const pkt_t * pkt) { @@ -1414,7 +1421,7 @@ pkthdr2str( assert(kh != NULL); assert(pkt != NULL); - snprintf(retbuf, SIZEOF(retbuf), "Amanda %d.%d %s HANDLE %s SEQ %d\n", + g_snprintf(retbuf, SIZEOF(retbuf), "Amanda %d.%d %s HANDLE %s SEQ %d\n", VERSION_MAJOR, VERSION_MINOR, pkt_type2str(pkt->type), kh->proto_handle, kh->sequence); @@ -1429,7 +1436,7 @@ pkthdr2str( * Returns negative on parse error. */ static int -str2pkthdr( +str2kpkthdr( const char *origstr, pkt_t * pkt, char * handle, @@ -1490,7 +1497,7 @@ str2pkthdr( parse_error: #if 0 /* XXX we have no way of passing this back up */ security_seterror(&kh->sech, - "parse error in packet header : '%s'", origstr); + _("parse error in packet header : '%s'"), origstr); #endif amfree(str); return (-1); @@ -1510,7 +1517,7 @@ host2key( #if CLIENT_HOST_INSTANCE != HOSTNAME_INSTANCE inst = CLIENT_HOST_INSTANCE #endif - krb_get_cred(CLIENT_HOST_PRINCIPLE, (char *)inst, realm, &cred); + krb_get_cred(CLIENT_HOST_PRINCIPAL, (char *)inst, realm, &cred); memcpy(key, cred.session, SIZEOF(des_cblock)); } @@ -1664,7 +1671,7 @@ decrypt_data( * like write(), but always writes out the entire buffer. */ static int -net_write( +knet_write( int fd, const void *vbuf, size_t size) @@ -1686,7 +1693,7 @@ net_write( * Like read(), but waits until the entire buffer has been filled. */ static int -net_read( +knet_read( int fd, void * vbuf, size_t size, @@ -1742,12 +1749,13 @@ print_hex( { int i; - dbprintf(("%s:", str)); + dbprintf("%s:", str); for(i=0;ilength, tktp->mbz)); - print_hex("ticket data", tktp->dat, tktp->length); + dbprintf(_("%s: length %d chk %lX\n"), str, tktp->length, tktp->mbz); + print_hex(_("ticket data"), tktp->dat, tktp->length); fflush(stdout); } @@ -1764,10 +1772,10 @@ static void print_auth( AUTH_DAT *authp) { - printf("\nAuth Data:\n"); - printf(" Principal \"%s\" Instance \"%s\" Realm \"%s\"\n", + g_printf("\nAuth Data:\n"); + g_printf(" Principal \"%s\" Instance \"%s\" Realm \"%s\"\n", authp->pname, authp->pinst, authp->prealm); - printf(" cksum %d life %d keylen %ld\n", authp->checksum, + g_printf(" cksum %d life %d keylen %ld\n", authp->checksum, authp->life, SIZEOF(authp->session)); print_hex("session key", authp->session, SIZEOF(authp->session)); fflush(stdout); @@ -1777,8 +1785,8 @@ static void print_credentials( CREDENTIALS *credp) { - printf("\nCredentials:\n"); - printf(" service \"%s\" instance \"%s\" realm \"%s\" life %d kvno %d\n", + g_printf("\nCredentials:\n"); + g_printf(" service \"%s\" instance \"%s\" realm \"%s\" life %d kvno %d\n", credp->service, credp->instance, credp->realm, credp->lifetime, credp->kvno); print_hex("session key", credp->session, SIZEOF(credp->session)); @@ -1786,14 +1794,3 @@ print_credentials( fflush(stdout); } #endif - -#else - -void krb4_security_dummy(void); - -void -krb4_security_dummy(void) -{ -} - -#endif /* KRB4_SECURITY */ diff --git a/common-src/krb5-security.c b/common-src/krb5-security.c index 5b3d76a..6c6572b 100644 --- a/common-src/krb5-security.c +++ b/common-src/krb5-security.c @@ -42,13 +42,12 @@ #include "security-util.h" #include "stream.h" #include "version.h" +#include "sockaddr-util.h" #ifdef KRB5_HEIMDAL_INCLUDES #include "com_err.h" #endif -#ifdef KRB5_SECURITY - #define BROKEN_MEMORY_CCACHE #ifdef BROKEN_MEMORY_CCACHE @@ -76,23 +75,12 @@ #define KRB5_ENV_CCNAME "KRB5CCNAME" #endif -#define k5printf(x) auth_debug(1,x) - - /* * consider undefining when kdestroy() is fixed. The current version does * not work under krb5-1.2.4 in rh7.3, perhaps others. */ #define KDESTROY_VIA_UNLINK 1 -/* - * Define this if you want all network traffic encrypted. This will - * extract a serious performance hit. - * - * It would be nice if we could do this on a filesystem-by-filesystem basis. - */ -/*#define AMANDA_KRB5_ENCRYPT*/ - /* * Where the keytab lives, if defined. Otherwise it expects something in the * config file. @@ -161,8 +149,11 @@ static char myhostname[MAX_HOSTNAME_LENGTH+1]; /* * Interface functions */ -static void krb5_accept(const struct security_driver *, int, int, - void (*)(security_handle_t *, pkt_t *)); +static void krb5_accept(const struct security_driver *, + char *(*)(char *, void *), + int, int, + void (*)(security_handle_t *, pkt_t *), + void *); static void krb5_connect(const char *, char *(*)(char *, void *), void (*)(void *, security_handle_t *, security_status_t), void *, void *); @@ -177,12 +168,10 @@ static int gss_client(struct sec_handle *); static const char *gss_error(OM_uint32, OM_uint32); static char *krb5_checkuser(char *host, char *name, char *realm); -#ifdef AMANDA_KRB5_ENCRYPT static int k5_encrypt(void *cookie, void *buf, ssize_t buflen, void **encbuf, ssize_t *encbuflen); static int k5_decrypt(void *cookie, void *buf, ssize_t buflen, void **encbuf, ssize_t *encbuflen); -#endif /* * This is our interface to the outside world. @@ -206,13 +195,8 @@ const security_driver_t krb5_security_driver = { tcpm_stream_read_sync, tcpm_stream_read_cancel, tcpm_close_connection, -#ifdef AMANDA_KRB5_ENCRYPT k5_encrypt, k5_decrypt, -#else - NULL, - NULL, -#endif }; static int newhandle = 1; @@ -239,16 +223,12 @@ krb5_connect( { struct sec_handle *rh; int result; - struct addrinfo hints; - struct addrinfo *res = NULL; + char *canonname; assert(fn != NULL); assert(hostname != NULL); - (void)conf_fn; /* Quiet unused parameter warning */ - (void)datap; /* Quiet unused parameter warning */ - k5printf(("%s: krb5: krb5_connect: %s\n", debug_prefix_time(NULL), - hostname)); + auth_debug(1, "krb5: krb5_connect: %s\n", hostname); krb5_init(); @@ -259,37 +239,27 @@ krb5_connect( rh->ev_timeout = NULL; rh->rc = NULL; -#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 = SOCK_DGRAM; - hints.ai_protocol = IPPROTO_UDP; - hints.ai_addrlen = 0; - hints.ai_addr = NULL; - hints.ai_canonname = NULL; - hints.ai_next = NULL; - result = getaddrinfo(hostname, NULL, &hints, &res); -#ifdef WORKING_IPV6 - if (result != 0) { - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_UNSPEC; - result = getaddrinfo(hostname, NULL, &hints, &res); - } -#endif + result = resolve_hostname(hostname, 0, NULL, &canonname); if(result != 0) { - dbprintf(("krb5_connect: getaddrinfo(%s): %s\n", hostname, gai_strerror(result))); - security_seterror(&rh->sech, "getaddrinfo(%s): %s\n", hostname, + dbprintf(_("resolve_hostname(%s): %s\n"), hostname, gai_strerror(result)); + security_seterror(&rh->sech, _("resolve_hostname(%s): %s\n"), hostname, gai_strerror(result)); (*fn)(arg, &rh->sech, S_ERROR); return; } + if (canonname == NULL) { + dbprintf(_("resolve_hostname(%s) did not return a canonical name\n"), hostname); + security_seterror(&rh->sech, + _("resolve_hostname(%s) did not return a canonical name\n"), hostname); + (*fn)(arg, &rh->sech, S_ERROR); + return; + } - rh->hostname = stralloc(res->ai_canonname); /* will be replaced */ + rh->hostname = canonname; /* will be replaced */ + canonname = NULL; /* steal reference */ rh->rs = tcpma_stream_client(rh, newhandle++); + rh->rc->conf_fn = conf_fn; + rh->rc->datap = datap; rh->rc->recv_security_ok = NULL; rh->rc->prefix_packet = NULL; @@ -340,24 +310,29 @@ krb5_connect( rh->ev_timeout = event_register(CONNECT_TIMEOUT, EV_TIME, sec_connect_timeout, rh); + amfree(canonname); return; error: + amfree(canonname); (*fn)(arg, &rh->sech, S_ERROR); } /* + * Setup to handle new incoming connections */ static void krb5_accept( const struct security_driver *driver, + char *(*conf_fn)(char *, void *), int in, int out, - void (*fn)(security_handle_t *, pkt_t *)) + void (*fn)(security_handle_t *, pkt_t *), + void *datap) { - struct sockaddr_storage sin; - socklen_t len; + sockaddr_union sin; + socklen_t_equiv len; struct tcp_conn *rc; char hostname[NI_MAXHOST]; int result; @@ -367,26 +342,32 @@ krb5_accept( len = sizeof(sin); if (getpeername(in, (struct sockaddr *)&sin, &len) < 0) { - dbprintf(("%s: getpeername returned: %s\n", debug_prefix_time(NULL), - strerror(errno))); + dbprintf(_("getpeername returned: %s\n"), + strerror(errno)); return; + } if ((result = getnameinfo((struct sockaddr *)&sin, len, hostname, NI_MAXHOST, NULL, 0, 0) != 0)) { - dbprintf(("%s: getnameinfo failed: %s\n", - debug_prefix_time(NULL), gai_strerror(result))); + dbprintf(_("getnameinfo failed: %s\n"), + gai_strerror(result)); return; } if (check_name_give_sockaddr(hostname, (struct sockaddr *)&sin, &errmsg) < 0) { + dbprintf(_("check_name_give_sockaddr(%s): %s\n"), + hostname, errmsg); amfree(errmsg); return; } + rc = sec_tcp_conn_get(hostname, 0); + rc->conf_fn = conf_fn; + rc->datap = datap; rc->recv_security_ok = NULL; rc->prefix_packet = NULL; - memcpy(&rc->peer, &sin, sizeof(rc->peer)); + copy_sockaddr(&rc->peer, &sin); rc->read = in; rc->write = out; rc->driver = driver; @@ -407,7 +388,6 @@ runkrb5( struct servent * sp; int server_socket; in_port_t my_port, port; - uid_t euid; struct tcp_conn * rc = rh->rc; const char *err; @@ -416,20 +396,20 @@ runkrb5( else port = sp->s_port; - euid = geteuid(); - if ((err = get_tgt(keytab_name, principal_name)) != NULL) { security_seterror(&rh->sech, "%s: could not get TGT: %s", rc->hostname, err); return -1; } + set_root_privs(1); server_socket = stream_client(rc->hostname, (in_port_t)(ntohs(port)), STREAM_BUFSIZE, STREAM_BUFSIZE, &my_port, 0); + set_root_privs(0); if(server_socket < 0) { security_seterror(&rh->sech, @@ -437,7 +417,6 @@ runkrb5( return -1; } - seteuid(euid); rc->read = rc->write = server_socket; @@ -445,11 +424,14 @@ runkrb5( return -1; } + return 0; } + /* + * Negotiate a krb5 gss context from the client end. */ static int @@ -467,14 +449,14 @@ gss_client( gss_name_t gss_name; char *errmsg = NULL; - k5printf(("gss_client\n")); + auth_debug(1, "gss_client\n"); send_tok.value = vstralloc("host/", rs->rc->hostname, NULL); send_tok.length = strlen(send_tok.value) + 1; maj_stat = gss_import_name(&min_stat, &send_tok, GSS_C_NULL_OID, &gss_name); if (maj_stat != (OM_uint32)GSS_S_COMPLETE) { - security_seterror(&rh->sech, "can't import name %s: %s", + security_seterror(&rh->sech, _("can't import name %s: %s"), (char *)send_tok.value, gss_error(maj_stat, min_stat)); amfree(send_tok.value); return (-1); @@ -482,7 +464,7 @@ gss_client( amfree(send_tok.value); rc->gss_context = GSS_C_NO_CONTEXT; maj_stat = gss_display_name(&min_stat, gss_name, &AA, &doid); - dbprintf(("gss_name %s\n", (char *)AA.value)); + dbprintf(_("gss_name %s\n"), (char *)AA.value); /* * Perform the context-establishement loop. @@ -520,7 +502,7 @@ gss_client( } if (maj_stat != (OM_uint32)GSS_S_COMPLETE && maj_stat != (OM_uint32)GSS_S_CONTINUE_NEEDED) { security_seterror(&rh->sech, - "error getting gss context: %s %s", + _("error getting gss context: %s %s"), gss_error(maj_stat, min_stat), (char *)send_tok.value); goto done; } @@ -529,7 +511,7 @@ gss_client( * Send back the response */ if (send_tok.length != 0 && tcpm_send_token(rc, rc->write, rs->handle, &errmsg, send_tok.value, send_tok.length) < 0) { - security_seterror(&rh->sech, rc->errmsg); + security_seterror(&rh->sech, "%s", rc->errmsg); gss_release_buffer(&min_stat, &send_tok); goto done; } @@ -547,9 +529,9 @@ gss_client( if (rvalue <= 0) { if (rvalue < 0) security_seterror(&rh->sech, - "recv error in gss loop: %s", rc->errmsg); + _("recv error in gss loop: %s"), rc->errmsg); else - security_seterror(&rh->sech, "EOF in gss loop"); + security_seterror(&rh->sech, _("EOF in gss loop")); goto done; } } @@ -580,7 +562,7 @@ gss_server( char errbuf[256]; char *errmsg = NULL; - k5printf(("gss_server\n")); + auth_debug(1, "gss_server\n"); assert(rc != NULL); @@ -591,14 +573,14 @@ gss_server( */ euid = geteuid(); if (getuid() != 0) { - snprintf(errbuf, SIZEOF(errbuf), - "real uid is %ld, needs to be 0 to read krb5 host key", + g_snprintf(errbuf, SIZEOF(errbuf), + _("real uid is %ld, needs to be 0 to read krb5 host key"), (long)getuid()); goto out; } - if (seteuid(0) < 0) { - snprintf(errbuf, SIZEOF(errbuf), - "can't seteuid to uid 0: %s", strerror(errno)); + if (!set_root_privs(0)) { + g_snprintf(errbuf, SIZEOF(errbuf), + _("can't seteuid to uid 0: %s"), strerror(errno)); goto out; } @@ -612,9 +594,9 @@ gss_server( maj_stat = gss_import_name(&min_stat, &send_tok, GSS_C_NULL_OID, &gss_name); if (maj_stat != (OM_uint32)GSS_S_COMPLETE) { - seteuid(euid); - snprintf(errbuf, SIZEOF(errbuf), - "can't import name %s: %s", (char *)send_tok.value, + set_root_privs(0); + g_snprintf(errbuf, SIZEOF(errbuf), + _("can't import name %s: %s"), (char *)send_tok.value, gss_error(maj_stat, min_stat)); amfree(send_tok.value); goto out; @@ -622,15 +604,15 @@ gss_server( amfree(send_tok.value); maj_stat = gss_display_name(&min_stat, gss_name, &AA, &doid); - dbprintf(("gss_name %s\n", (char *)AA.value)); + dbprintf(_("gss_name %s\n"), (char *)AA.value); maj_stat = gss_acquire_cred(&min_stat, gss_name, 0, GSS_C_NULL_OID_SET, GSS_C_ACCEPT, &gss_creds, NULL, NULL); if (maj_stat != (OM_uint32)GSS_S_COMPLETE) { - snprintf(errbuf, SIZEOF(errbuf), - "can't acquire creds for host key host/%s: %s", myhostname, + g_snprintf(errbuf, SIZEOF(errbuf), + _("can't acquire creds for host key host/%s: %s"), myhostname, gss_error(maj_stat, min_stat)); gss_release_name(&min_stat, &gss_name); - seteuid(euid); + set_root_privs(0); goto out; } gss_release_name(&min_stat, &gss_name); @@ -638,15 +620,16 @@ gss_server( for (recv_tok.length = 0;;) { recv_tok.value = NULL; rvalue = tcpm_recv_token(rc, rc->read, &rc->handle, &rc->errmsg, - (char **)&recv_tok.value, + /* (void *) is to avoid type-punning warning */ + (char **)(void *)&recv_tok.value, (ssize_t *)&recv_tok.length, 60); if (rvalue <= 0) { if (rvalue < 0) { - snprintf(errbuf, SIZEOF(errbuf), - "recv error in gss loop: %s", rc->errmsg); + g_snprintf(errbuf, SIZEOF(errbuf), + _("recv error in gss loop: %s"), rc->errmsg); amfree(rc->errmsg); } else - snprintf(errbuf, SIZEOF(errbuf), "EOF in gss loop"); + g_snprintf(errbuf, SIZEOF(errbuf), _("EOF in gss loop")); goto out; } @@ -656,8 +639,8 @@ gss_server( if (maj_stat != (OM_uint32)GSS_S_COMPLETE && maj_stat != (OM_uint32)GSS_S_CONTINUE_NEEDED) { - snprintf(errbuf, SIZEOF(errbuf), - "error accepting context: %s", gss_error(maj_stat, min_stat)); + g_snprintf(errbuf, SIZEOF(errbuf), + _("error accepting context: %s"), gss_error(maj_stat, min_stat)); amfree(recv_tok.value); goto out; } @@ -683,8 +666,8 @@ gss_server( maj_stat = gss_display_name(&min_stat, gss_name, &send_tok, &doid); if (maj_stat != (OM_uint32)GSS_S_COMPLETE) { - snprintf(errbuf, SIZEOF(errbuf), - "can't display gss name: %s", gss_error(maj_stat, min_stat)); + g_snprintf(errbuf, SIZEOF(errbuf), + _("can't display gss name: %s"), gss_error(maj_stat, min_stat)); gss_release_name(&min_stat, &gss_name); goto out; } @@ -692,8 +675,8 @@ gss_server( /* get rid of the realm */ if ((p = strchr(send_tok.value, '@')) == NULL) { - snprintf(errbuf, SIZEOF(errbuf), - "malformed gss name: %s", (char *)send_tok.value); + g_snprintf(errbuf, SIZEOF(errbuf), + _("malformed gss name: %s"), (char *)send_tok.value); amfree(send_tok.value); goto out; } @@ -704,8 +687,8 @@ gss_server( * If the principal doesn't match, complain */ if ((msg = krb5_checkuser(rc->hostname, send_tok.value, realm)) != NULL) { - snprintf(errbuf, SIZEOF(errbuf), - "access not allowed from %s: %s", (char *)send_tok.value, msg); + g_snprintf(errbuf, SIZEOF(errbuf), + _("access not allowed from %s: %s"), (char *)send_tok.value, msg); amfree(send_tok.value); goto out; } @@ -713,13 +696,13 @@ gss_server( rval = 0; out: - seteuid(euid); + set_root_privs(0); if (rval != 0) { rc->errmsg = stralloc(errbuf); } else { rc->auth = 1; } - k5printf(("gss_server returning %d\n", rval)); + auth_debug(1, _("gss_server returning %d\n"), rval); return (rval); } @@ -752,7 +735,7 @@ krb5_init(void) { char *ccache; ccache = malloc(128); - snprintf(ccache, SIZEOF(ccache), + g_snprintf(ccache, SIZEOF(ccache), "KRB5_ENV_CCNAME=FILE:/tmp/amanda_ccache.%ld.%ld", (long)geteuid(), (long)getpid()); putenv(ccache); @@ -766,7 +749,7 @@ krb5_init(void) * In case it isn't fully qualified, do a DNS lookup. Ignore * any errors (this is best-effort). */ - if (try_resolving_hostname(myhostname, &myfqhostname) == 0 + if (resolve_hostname(myhostname, SOCK_STREAM, NULL, &myfqhostname) == 0 && myfqhostname != NULL) { strncpy(myhostname, myfqhostname, SIZEOF(myhostname)-1); myhostname[SIZEOF(myhostname)-1] = '\0'; @@ -789,7 +772,7 @@ cleanup(void) { #ifdef KDESTROY_VIA_UNLINK char ccache[64]; - snprintf(ccache, SIZEOF(ccache), "/tmp/amanda_ccache.%ld.%ld", + g_snprintf(ccache, SIZEOF(ccache), "/tmp/amanda_ccache.%ld.%ld", (long)geteuid(), (long)getpid()); unlink(ccache); #else @@ -825,20 +808,20 @@ get_tgt( error = NULL; } if ((ret = krb5_init_context(&context)) != 0) { - error = vstralloc("error initializing krb5 context: ", - error_message(ret), NULL); + error = vstrallocf(_("error initializing krb5 context: %s"), + error_message(ret)); return (error); } /*krb5_init_ets(context);*/ if(!keytab_name) { - error = vstralloc("error -- no krb5 keytab defined", NULL); + error = vstrallocf(_("error -- no krb5 keytab defined")); return(error); } if(!principal_name) { - error = vstralloc("error -- no krb5 principal defined", NULL); + error = vstrallocf(_("error -- no krb5 principal defined")); return(error); } @@ -846,8 +829,8 @@ get_tgt( * Resolve keytab file into a keytab object */ if ((ret = krb5_kt_resolve(context, keytab_name, &keytab)) != 0) { - error = vstralloc("error resolving keytab ", keytab_name, ": ", - error_message(ret), NULL); + error = vstrallocf(_("error resolving keytab %s: %s"), keytab_name, + error_message(ret)); return (error); } @@ -857,8 +840,8 @@ get_tgt( */ ret = krb5_parse_name(context, principal_name, &client); if (ret != 0) { - error = vstralloc("error parsing ", principal_name, ": ", - error_message(ret), NULL); + error = vstrallocf(_("error parsing %s: %s"), principal_name, + error_message(ret)); return (error); } @@ -880,15 +863,14 @@ get_tgt( 0); #endif if (ret != 0) { - error = vstralloc("error while building server name: ", - error_message(ret), NULL); + error = vstrallocf(_("error while building server name: %s"), + error_message(ret)); return (error); } ret = krb5_timeofday(context, &now); if (ret != 0) { - error = vstralloc("error getting time of day: ", error_message(ret), - NULL); + error = vstrallocf(_("error getting time of day: %s"), error_message(ret)); return (error); } @@ -906,24 +888,22 @@ get_tgt( keytab, 0, &creds, 0); if (ret != 0) { - error = vstralloc("error getting ticket for ", principal_name, - ": ", error_message(ret), NULL); + error = vstrallocf(_("error getting ticket for %s: %s"), + principal_name, error_message(ret)); goto cleanup2; } if ((ret = krb5_cc_default(context, &ccache)) != 0) { - error = vstralloc("error initializing ccache: ", error_message(ret), - NULL); + error = vstrallocf(_("error initializing ccache: %s"), error_message(ret)); goto cleanup; } if ((ret = krb5_cc_initialize(context, ccache, client)) != 0) { - error = vstralloc("error initializing ccache: ", error_message(ret), - NULL); + error = vstrallocf(_("error initializing ccache: %s"), error_message(ret)); goto cleanup; } if ((ret = krb5_cc_store_cred(context, ccache, &creds)) != 0) { - error = vstralloc("error storing creds in ccache: ", - error_message(ret), NULL); + error = vstrallocf(_("error storing creds in ccache: %s"), + error_message(ret)); /* FALLTHROUGH */ } krb5_cc_close(context, ccache); @@ -988,7 +968,6 @@ gss_error( return ((const char *)msg.value); } -#ifdef AMANDA_KRB5_ENCRYPT static int k5_encrypt( void *cookie, @@ -1003,31 +982,36 @@ k5_encrypt( OM_uint32 maj_stat, min_stat; int conf_state; - k5printf(("krb5: k5_encrypt: enter %p\n", rc)); - - dectok.length = buflen; - dectok.value = buf; - - if (rc->auth == 1) { - assert(rc->gss_context != GSS_C_NO_CONTEXT); - maj_stat = gss_seal(&min_stat, rc->gss_context, 1, - GSS_C_QOP_DEFAULT, &dectok, &conf_state, &enctok); - if (maj_stat != (OM_uint32)GSS_S_COMPLETE || conf_state == 0) { - k5printf(("krb5 encrypt error to %s: %s\n", - rc->hostname, gss_error(maj_stat, min_stat))); - return (-1); + if (rc->conf_fn && rc->conf_fn("kencrypt", rc->datap)) { + auth_debug(1, _("krb5: k5_encrypt: enter %p\n"), rc); + + dectok.length = buflen; + dectok.value = buf; + + if (rc->auth == 1) { + assert(rc->gss_context != GSS_C_NO_CONTEXT); + maj_stat = gss_seal(&min_stat, rc->gss_context, 1, + GSS_C_QOP_DEFAULT, &dectok, &conf_state, + &enctok); + if (maj_stat != (OM_uint32)GSS_S_COMPLETE || conf_state == 0) { + auth_debug(1, _("krb5 encrypt error to %s: %s\n"), + rc->hostname, gss_error(maj_stat, min_stat)); + return (-1); + } + auth_debug(1, _("krb5: k5_encrypt: give %zu bytes\n"), + enctok.length); + *encbuf = enctok.value; + *encbuflen = enctok.length; + } else { + *encbuf = buf; + *encbuflen = buflen; } - k5printf(("krb5: k5_encrypt: give %zu bytes\n", enctok.length)); - *encbuf = enctok.value; - *encbuflen = enctok.length; - } else { - *encbuf = buf; - *encbuflen = buflen; + auth_debug(1, _("krb5: k5_encrypt: exit\n")); } - k5printf(("krb5: k5_encrypt: exit\n")); return (0); } + static int k5_decrypt( void *cookie, @@ -1042,33 +1026,37 @@ k5_decrypt( OM_uint32 maj_stat, min_stat; int conf_state, qop_state; - k5printf(("krb5: k5_decrypt: enter\n")); - - if (rc->auth == 1) { - enctok.length = buflen; - enctok.value = buf; + if (rc->conf_fn && rc->conf_fn("kencrypt", rc->datap)) { + auth_debug(1, _("krb5: k5_decrypt: enter\n")); + if (rc->auth == 1) { + enctok.length = buflen; + enctok.value = buf; - k5printf(("krb5: k5_decrypt: decrypting %zu bytes\n", enctok.length)); + auth_debug(1, _("krb5: k5_decrypt: decrypting %zu bytes\n"), enctok.length); - assert(rc->gss_context != GSS_C_NO_CONTEXT); - maj_stat = gss_unseal(&min_stat, rc->gss_context, &enctok, &dectok, + assert(rc->gss_context != GSS_C_NO_CONTEXT); + maj_stat = gss_unseal(&min_stat, rc->gss_context, &enctok, &dectok, &conf_state, &qop_state); - if (maj_stat != (OM_uint32)GSS_S_COMPLETE) { - k5printf(("krb5 decrypt error from %s: %s\n", - rc->hostname, gss_error(maj_stat, min_stat))); - return (-1); + if (maj_stat != (OM_uint32)GSS_S_COMPLETE) { + auth_debug(1, _("krb5 decrypt error from %s: %s\n"), + rc->hostname, gss_error(maj_stat, min_stat)); + return (-1); + } + auth_debug(1, _("krb5: k5_decrypt: give %zu bytes\n"), + dectok.length); + *decbuf = dectok.value; + *decbuflen = dectok.length; + } else { + *decbuf = buf; + *decbuflen = buflen; } - k5printf(("krb5: k5_decrypt: give %zu bytes\n", dectok.length)); - *decbuf = dectok.value; - *decbuflen = dectok.length; + auth_debug(1, _("krb5: k5_decrypt: exit\n")); } else { *decbuf = buf; *decbuflen = buflen; } - k5printf(("krb5: k5_decrypt: exit\n")); return (0); } -#endif /* * check ~/.k5amandahosts to see if this principal is allowed in. If it's @@ -1083,25 +1071,23 @@ krb5_checkuser( char * host, if(strcmp(name, AMANDA_PRINCIPAL) == 0) { return(NULL); } else { - return(vstralloc("does not match compiled in default")); + return(vstrallocf(_("does not match compiled in default"))); } #else struct passwd *pwd; char *ptmp; - char *result = "generic error"; /* default is to not permit */ + char *result = _("generic error"); /* default is to not permit */ FILE *fp = NULL; struct stat sbuf; uid_t localuid; char *line = NULL; char *filehost = NULL, *fileuser = NULL, *filerealm = NULL; - char n1[NUM_STR_SIZE]; - char n2[NUM_STR_SIZE]; assert( host != NULL); assert( name != NULL); if((pwd = getpwnam(CLIENT_LOGIN)) == NULL) { - result = vstralloc("can not find user ", CLIENT_LOGIN, NULL); + result = vstrallocf(_("can not find user %s"), CLIENT_LOGIN); } localuid = pwd->pw_uid; @@ -1112,7 +1098,7 @@ krb5_checkuser( char * host, #endif if(!ptmp) { - result = vstralloc("could not find home directory for ", CLIENT_LOGIN, NULL); + result = vstrallocf(_("could not find home directory for %s"), CLIENT_LOGIN); goto common_exit; } @@ -1125,40 +1111,36 @@ krb5_checkuser( char * host, * the destination user mimicing the .k5login functionality. */ if(strcmp(name, CLIENT_LOGIN) != 0) { - result = vstralloc(name, " does not match ", - CLIENT_LOGIN, NULL); + result = vstrallocf(_("%s does not match %s"), + name, CLIENT_LOGIN); return result; } result = NULL; goto common_exit; } - k5printf(("opening ptmp: %s\n", (ptmp)?ptmp: "NULL!")); + auth_debug(1, _("opening ptmp: %s\n"), (ptmp)?ptmp: "NULL!"); if((fp = fopen(ptmp, "r")) == NULL) { - result = vstralloc("can not open ", ptmp, NULL); + result = vstrallocf(_("can not open %s"), ptmp); return result; } - k5printf(("opened ptmp\n")); + auth_debug(1, _("opened ptmp\n")); if (fstat(fileno(fp), &sbuf) != 0) { - result = vstralloc("cannot fstat ", ptmp, ": ", strerror(errno), NULL); + result = vstrallocf(_("cannot fstat %s: %s"), ptmp, strerror(errno)); goto common_exit; } if (sbuf.st_uid != localuid) { - snprintf(n1, SIZEOF(n1), "%ld", (long) sbuf.st_uid); - snprintf(n2, SIZEOF(n2), "%ld", (long) localuid); - result = vstralloc(ptmp, ": ", - "owned by id ", n1, - ", should be ", n2, - NULL); + result = vstrallocf(_("%s is owned by %ld, should be %ld"), + ptmp, (long)sbuf.st_uid, (long)localuid); goto common_exit; } if ((sbuf.st_mode & 077) != 0) { - result = stralloc2(ptmp, - ": incorrect permissions; file must be accessible only by its owner"); + result = vstrallocf( + _("%s: incorrect permissions; file must be accessible only by its owner"), ptmp); goto common_exit; - } + } while ((line = agets(fp)) != NULL) { if (line[0] == '\0') { @@ -1166,9 +1148,6 @@ krb5_checkuser( char * host, continue; } -#if defined(SHOW_SECURITY_DETAIL) /* { */ - k5printf(("%s: processing line: <%s>\n", debug_prefix(NULL), line)); -#endif /* } */ /* if there's more than one column, then it's the host */ if( (filehost = strtok(line, " \t")) == NULL) { amfree(line); @@ -1188,7 +1167,7 @@ krb5_checkuser( char * host, amfree(line); continue; } else { - k5printf(("found a host match\n")); + auth_debug(1, _("found a host match\n")); } if( (filerealm = strchr(fileuser, '@')) != NULL) { @@ -1203,9 +1182,9 @@ krb5_checkuser( char * host, * You likely only get this far if you've turned on cross-realm auth * anyway... */ - k5printf(("comparing %s %s\n", fileuser, name)); + auth_debug(1, _("comparing %s %s\n"), fileuser, name); if(strcmp(fileuser, name) == 0) { - k5printf(("found a match!\n")); + auth_debug(1, _("found a match!\n")); if(realm && filerealm && (strcmp(realm, filerealm)!=0)) { amfree(line); continue; @@ -1216,21 +1195,10 @@ krb5_checkuser( char * host, } amfree(line); } - result = vstralloc("no match in ", ptmp, NULL); + result = vstrallocf(_("no match in %s"), ptmp); common_exit: afclose(fp); return(result); #endif /* AMANDA_PRINCIPAL */ } - -#else - -void krb5_security_dummy(void); - -void -krb5_security_dummy(void) -{ -} - -#endif /* KRB5_SECURITY */ diff --git a/common-src/match.c b/common-src/match.c index dba15c8..f9ce31d 100644 --- a/common-src/match.c +++ b/common-src/match.c @@ -83,14 +83,14 @@ match( if((result = regcomp(®c, regex, REG_EXTENDED|REG_NOSUB|REG_NEWLINE)) != 0) { regerror(result, ®c, errmsg, SIZEOF(errmsg)); - error("regex \"%s\": %s", regex, errmsg); + error(_("regex \"%s\": %s"), regex, errmsg); /*NOTREACHED*/ } if((result = regexec(®c, str, 0, 0, 0)) != 0 && result != REG_NOMATCH) { regerror(result, ®c, errmsg, SIZEOF(errmsg)); - error("regex \"%s\": %s", regex, errmsg); + error(_("regex \"%s\": %s"), regex, errmsg); /*NOTREACHED*/ } @@ -136,14 +136,14 @@ match_glob( if((result = regcomp(®c, regex, REG_EXTENDED|REG_NOSUB|REG_NEWLINE)) != 0) { regerror(result, ®c, errmsg, SIZEOF(errmsg)); - error("glob \"%s\" -> regex \"%s\": %s", glob, regex, errmsg); + error(_("glob \"%s\" -> regex \"%s\": %s"), glob, regex, errmsg); /*NOTREACHED*/ } if((result = regexec(®c, str, 0, 0, 0)) != 0 && result != REG_NOMATCH) { regerror(result, ®c, errmsg, SIZEOF(errmsg)); - error("glob \"%s\" -> regex \"%s\": %s", glob, regex, errmsg); + error(_("glob \"%s\" -> regex \"%s\": %s"), glob, regex, errmsg); /*NOTREACHED*/ } @@ -244,14 +244,14 @@ match_tar( if((result = regcomp(®c, regex, REG_EXTENDED|REG_NOSUB|REG_NEWLINE)) != 0) { regerror(result, ®c, errmsg, SIZEOF(errmsg)); - error("glob \"%s\" -> regex \"%s\": %s", glob, regex, errmsg); + error(_("glob \"%s\" -> regex \"%s\": %s"), glob, regex, errmsg); /*NOTREACHED*/ } if((result = regexec(®c, str, 0, 0, 0)) != 0 && result != REG_NOMATCH) { regerror(result, ®c, errmsg, SIZEOF(errmsg)); - error("glob \"%s\" -> regex \"%s\": %s", glob, regex, errmsg); + error(_("glob \"%s\" -> regex \"%s\": %s"), glob, regex, errmsg); /*NOTREACHED*/ } @@ -543,7 +543,7 @@ match_datestamp( int match_exact; if(strlen(dateexp) >= 100 || strlen(dateexp) < 1) { - error("Illegal datestamp expression %s",dateexp); + error(_("Illegal datestamp expression %s"),dateexp); /*NOTREACHED*/ } @@ -565,7 +565,7 @@ match_datestamp( if((dash = strchr(mydateexp,'-'))) { if(match_exact == 1) { - error("Illegal datestamp expression %s",dateexp); + error(_("Illegal datestamp expression %s"),dateexp); /*NOTREACHED*/ } len = (size_t)(dash - mydateexp); @@ -605,7 +605,7 @@ match_level( int match_exact; if(strlen(levelexp) >= 100 || strlen(levelexp) < 1) { - error("Illegal level expression %s",levelexp); + error(_("Illegal level expression %s"),levelexp); /*NOTREACHED*/ } @@ -627,7 +627,7 @@ match_level( if((dash = strchr(mylevelexp,'-'))) { if(match_exact == 1) { - error("Illegal level expression %s",levelexp); + error(_("Illegal level expression %s"),levelexp); /*NOTREACHED*/ } len = (size_t)(dash - mylevelexp); diff --git a/common-src/packet.c b/common-src/packet.c index 87b5f50..c161f95 100644 --- a/common-src/packet.c +++ b/common-src/packet.c @@ -72,14 +72,15 @@ printf_arglist_function2(void pkt_init, pkt_t *, pkt, pktype_t, type, assert(pkt != NULL); assert(strcmp(pkt_type2str(type), "BOGUS") != 0); - assert(fmt != NULL); + if(fmt == NULL) + fmt = ""; pkt->type = type; pkt->packet_size = 1000; pkt->body = alloc(pkt->packet_size); while(1) { arglist_start(argp, fmt); - len = vsnprintf(pkt->body, pkt->packet_size, fmt, argp); + len = g_vsnprintf(pkt->body, pkt->packet_size, fmt, argp); arglist_end(argp); if (len > -1 && len < (int)(pkt->packet_size - 1)) break; @@ -107,7 +108,7 @@ printf_arglist_function1(void pkt_cat, pkt_t *, pkt, const char *, fmt) while(1) { arglist_start(argp, fmt); - lenX = vsnprintf(pkt->body + len, pkt->packet_size - len, fmt,argp); + lenX = g_vsnprintf(pkt->body + len, pkt->packet_size - len, fmt,argp); arglist_end(argp); if (lenX > -1 && lenX < (int)(pkt->packet_size - len - 1)) break; diff --git a/common-src/pipespawn.c b/common-src/pipespawn.c index 09553b6..16fd67c 100644 --- a/common-src/pipespawn.c +++ b/common-src/pipespawn.c @@ -83,6 +83,8 @@ pipespawnv_passwd( char **arg; char *e; char **env; + char *cmdline; + char *quoted; char **newenv; char *passwdvar = NULL; int *passwdfd = NULL; @@ -90,8 +92,6 @@ pipespawnv_passwd( /* * Log the command line and count the args. */ - dbprintf(("%s: spawning %s in pipeline\n", debug_prefix_time(NULL), prog)); - dbprintf(("%s: argument list:", debug_prefix_time(NULL))); if ((pipedef & PASSWD_PIPE) != 0) { passwdvar = *my_argv++; passwdfd = (int *)*my_argv++; @@ -101,42 +101,42 @@ pipespawnv_passwd( memset(errpipe, -1, SIZEOF(errpipe)); memset(passwdpipe, -1, SIZEOF(passwdpipe)); argc = 0; - for(arg = my_argv; *arg != NULL; arg++) { - char *quoted; + cmdline = stralloc(prog); + for(arg = my_argv; *arg != NULL; arg++) { if (*arg != skip_argument) { argc++; quoted = quote_string(*arg); - dbprintf((" %s", quoted)); + cmdline = vstrextend(&cmdline, " ", quoted, NULL); amfree(quoted); } } - dbprintf(("\n")); + dbprintf(_("Spawning \"%s\" in pipeline\n"), cmdline); /* * Create the pipes */ if ((pipedef & STDIN_PIPE) != 0) { if(pipe(inpipe) == -1) { - error("error [open pipe to %s: %s]", prog, strerror(errno)); + error(_("error [open pipe to %s: %s]"), prog, strerror(errno)); /*NOTREACHED*/ } } if ((pipedef & STDOUT_PIPE) != 0) { if(pipe(outpipe) == -1) { - error("error [open pipe to %s: %s]", prog, strerror(errno)); + error(_("error [open pipe to %s: %s]"), prog, strerror(errno)); /*NOTREACHED*/ } } if ((pipedef & STDERR_PIPE) != 0) { if(pipe(errpipe) == -1) { - error("error [open pipe to %s: %s]", prog, strerror(errno)); + error(_("error [open pipe to %s: %s]"), prog, strerror(errno)); /*NOTREACHED*/ } } if ((pipedef & PASSWD_PIPE) != 0) { if(pipe(passwdpipe) == -1) { - error("error [open pipe to %s: %s]", prog, strerror(errno)); + error(_("error [open pipe to %s: %s]"), prog, strerror(errno)); /*NOTREACHED*/ } } @@ -147,7 +147,7 @@ pipespawnv_passwd( switch(pid = fork()) { case -1: e = strerror(errno); - error("error [fork %s: %s]", prog, e); + error(_("error [fork %s: %s]"), prog, e); /*NOTREACHED*/ default: /* parent process */ @@ -192,15 +192,15 @@ pipespawnv_passwd( * Shift the pipes to the standard file descriptors as requested. */ if(dup2(inpipe[0], 0) == -1) { - error("error [spawn %s: dup2 in: %s]", prog, strerror(errno)); + error(_("error [spawn %s: dup2 in: %s]"), prog, strerror(errno)); /*NOTREACHED*/ } if(dup2(outpipe[1], 1) == -1) { - error("error [spawn %s: dup2 out: %s]", prog, strerror(errno)); + error(_("error [spawn %s: dup2 out: %s]"), prog, strerror(errno)); /*NOTREACHED*/ } if(dup2(errpipe[1], 2) == -1) { - error("error [spawn %s: dup2 err: %s]", prog, strerror(errno)); + error(_("error [spawn %s: dup2 err: %s]"), prog, strerror(errno)); /*NOTREACHED*/ } @@ -213,19 +213,23 @@ pipespawnv_passwd( for (i = 0; env[i] != NULL; i++) (void)i; /* make lint happy and do nothing */ newenv = (char **)alloc((i + 1 + 1) * SIZEOF(*newenv)); - snprintf(number, SIZEOF(number), "%d", passwdpipe[0]); + g_snprintf(number, SIZEOF(number), "%d", passwdpipe[0]); newenv[0] = vstralloc(passwdvar, "=", number, NULL); for(i = 0; env[i] != NULL; i++) newenv[i + 1] = env[i]; newenv[i + 1] = NULL; amfree(env); env = newenv; + safe_fd(passwdpipe[0], 1); + } else { + safe_fd(-1, 0); } execve(prog, my_argv, env); e = strerror(errno); - error("error [exec %s: %s]", prog, e); + error(_("error [exec %s: %s]"), prog, e); /*NOTREACHED*/ } + amfree(cmdline); return pid; } diff --git a/common-src/protocol.c b/common-src/protocol.c index 4b3f54f..da58704 100644 --- a/common-src/protocol.c +++ b/common-src/protocol.c @@ -35,10 +35,10 @@ #include "security.h" #include "protocol.h" -#define proto_debug(i,x) do { \ - if ((i) <= debug_protocol) { \ - dbprintf(x); \ - } \ +#define proto_debug(i, ...) do { \ + if ((i) <= debug_protocol) { \ + dbprintf(__VA_ARGS__); \ + } \ } while (0) /* @@ -170,8 +170,8 @@ protocol_sendreq( p->continuation = continuation; p->datap = datap; - proto_debug(1, ("%s: security_connect: host %s -> p %p\n", - debug_prefix_time(": protocol"), hostname, p)); + proto_debug(1, _("protocol: security_connect: host %s -> p %p\n"), + hostname, p); security_connect(p->security_driver, p->hostname, conf_fn, connect_callback, p, p->datap); @@ -196,8 +196,7 @@ connect_callback( assert(p != NULL); p->security_handle = security_handle; - proto_debug(1, ("%s: connect_callback: p %p\n", - debug_prefix_time(": protocol"), p)); + proto_debug(1, _("protocol: connect_callback: p %p\n"), p); switch (status) { case S_OK: @@ -205,7 +204,7 @@ connect_callback( break; case S_TIMEOUT: - security_seterror(p->security_handle, "timeout during connect"); + security_seterror(p->security_handle, _("timeout during connect")); /* FALLTHROUGH */ case S_ERROR: @@ -217,8 +216,8 @@ connect_callback( if (--p->connecttries == 0) { state_machine(p, PA_ABORT, NULL); } else { - proto_debug(1, ("%s: connect_callback: p %p: retrying %s\n", - debug_prefix_time(": protocol"), p, p->hostname)); + proto_debug(1, _("protocol: connect_callback: p %p: retrying %s\n"), + p, p->hostname); security_close(p->security_handle); /* XXX overload p->security handle to hold the event handle */ p->security_handle = @@ -301,24 +300,22 @@ state_machine( pstate_t curstate; p_action_t retaction; - proto_debug(1, ("protocol: state_machine: initial: p %p action %s pkt %p\n", - p, action2str(action), (void *)NULL)); + proto_debug(1, _("protocol: state_machine: initial: p %p action %s pkt %p\n"), + p, action2str(action), (void *)NULL); assert(p != NULL); assert(action == PA_RCVDATA || pkt == NULL); assert(p->state != NULL); for (;;) { - proto_debug(1, ("%s: state_machine: p %p state %s action %s\n", - debug_prefix_time(": protocol"), - p, pstate2str(p->state), action2str(action))); + proto_debug(1, _("protocol: state_machine: p %p state %s action %s\n"), + p, pstate2str(p->state), action2str(action)); if (pkt != NULL) { - proto_debug(1, ("%s: pkt: %s (t %d) orig REQ (t %d cur %d)\n", - debug_prefix_time(": protocol"), + proto_debug(1, _("protocol: pkt: %s (t %d) orig REQ (t %d cur %d)\n"), pkt_type2str(pkt->type), (int)CURTIME, - (int)p->origtime, (int)p->curtime)); - proto_debug(1, ("%s: pkt contents:\n-----\n%s-----\n", - debug_prefix_time(": protocol"), pkt->body)); + (int)p->origtime, (int)p->curtime); + proto_debug(1, _("protocol: pkt contents:\n-----\n%s-----\n"), + pkt->body); } /* @@ -344,9 +341,8 @@ state_machine( */ retaction = (*curstate)(p, action, pkt); - proto_debug(1, ("%s: state_machine: p %p state %s returned %s\n", - debug_prefix_time(": protocol"), - p, pstate2str(p->state), action2str(retaction))); + proto_debug(1, _("protocol: state_machine: p %p state %s returned %s\n"), + p, pstate2str(p->state), action2str(retaction)); /* * The state function is expected to return one of the following @@ -364,9 +360,8 @@ state_machine( /* FALLTHROUGH */ case PA_PENDING: - proto_debug(1, ("%s: state_machine: p %p state %s: timeout %d\n", - debug_prefix_time(": protocol"), - p, pstate2str(p->state), (int)p->timeout)); + proto_debug(1, _("protocol: state_machine: p %p state %s: timeout %d\n"), + p, pstate2str(p->state), (int)p->timeout); /* * Get the security layer to register a receive event for this * security handle on our behalf. Have it timeout in p->timeout @@ -382,10 +377,9 @@ state_machine( */ case PA_CONTINUE: assert(p->state != curstate); - proto_debug(1, ("%s: state_machine: p %p: moved from %s to %s\n", - debug_prefix_time(": protocol"), + proto_debug(1, _("protocol: state_machine: p %p: moved from %s to %s\n"), p, pstate2str(curstate), - pstate2str(p->state))); + pstate2str(p->state)); continue; /* @@ -442,7 +436,7 @@ s_sendreq( if (security_sendpkt(p->security_handle, &p->req) < 0) { /* XXX should retry */ - security_seterror(p->security_handle, "error sending REQ: %s", + security_seterror(p->security_handle, _("error sending REQ: %s"), security_geterror(p->security_handle)); return (PA_ABORT); } @@ -491,7 +485,7 @@ s_ackwait( assert(pkt == NULL); if (--p->reqtries == 0) { - security_seterror(p->security_handle, "timeout waiting for ACK"); + security_seterror(p->security_handle, _("timeout waiting for ACK")); return (PA_ABORT); } @@ -567,7 +561,7 @@ s_repwait( * return. */ if (p->resettries == 0 || DROP_DEAD_TIME(p->origtime)) { - security_seterror(p->security_handle, "timeout waiting for REP"); + security_seterror(p->security_handle, _("timeout waiting for REP")); return (PA_ABORT); } @@ -582,6 +576,10 @@ s_repwait( assert(action == PA_RCVDATA); + /* Finish if we get a NAK */ + if (pkt->type == P_NAK) + return (PA_FINISH); + /* * We've received some data. If we didn't get a reply, * requeue the packet and retry. Otherwise, acknowledge @@ -595,7 +593,7 @@ s_repwait( if (security_sendpkt(p->security_handle, &ack) < 0) { /* XXX should retry */ amfree(ack.body); - security_seterror(p->security_handle, "error sending ACK: %s", + security_seterror(p->security_handle, _("error sending ACK: %s"), security_geterror(p->security_handle)); return (PA_ABORT); } @@ -667,7 +665,7 @@ pstate2str( for (i = 0; i < ASIZE(pstates); i++) if (pstate == pstates[i].type) return (pstates[i].name); - return ("BOGUS PSTATE"); + return (_("BOGUS PSTATE")); } /* @@ -698,5 +696,5 @@ action2str( for (i = 0; i < ASIZE(actions); i++) if (action == actions[i].type) return (actions[i].name); - return ("BOGUS ACTION"); + return (_("BOGUS ACTION")); } diff --git a/common-src/rsh-security.c b/common-src/rsh-security.c index c98aed7..26914c6 100644 --- a/common-src/rsh-security.c +++ b/common-src/rsh-security.c @@ -43,8 +43,6 @@ #include "stream.h" #include "version.h" -#ifdef RSH_SECURITY - /* * Path to the rsh binary. This should be configurable. */ @@ -125,8 +123,7 @@ rsh_connect( assert(fn != NULL); assert(hostname != NULL); - auth_debug(1, ("%s: rsh: rsh_connect: %s\n", debug_prefix_time(NULL), - hostname)); + auth_debug(1, _("rsh: rsh_connect: %s\n"), hostname); rh = alloc(SIZEOF(*rh)); security_handleinit(&rh->sech, &rsh_security_driver); @@ -136,9 +133,9 @@ rsh_connect( rh->rc = NULL; rh->hostname = NULL; - if (try_resolving_hostname(hostname, &rh->hostname)) { + if (resolve_hostname(hostname, 0, NULL, &rh->hostname) || rh->hostname == NULL) { security_seterror(&rh->sech, - "%s: could not resolve hostname", hostname); + _("%s: could not resolve hostname"), hostname); (*fn)(arg, &rh->sech, S_ERROR); return; } @@ -161,7 +158,7 @@ rsh_connect( } if(rh->rc->read == -1) { if (runrsh(rh->rs->rc, amandad_path, client_username) < 0) { - security_seterror(&rh->sech, "can't connect to %s: %s", + security_seterror(&rh->sech, _("can't connect to %s: %s"), hostname, rh->rs->rc->errmsg); goto error; } @@ -206,13 +203,13 @@ runrsh( memset(rpipe, -1, SIZEOF(rpipe)); memset(wpipe, -1, SIZEOF(wpipe)); if (pipe(rpipe) < 0 || pipe(wpipe) < 0) { - rc->errmsg = newvstralloc(rc->errmsg, "pipe: ", strerror(errno), NULL); + rc->errmsg = newvstrallocf(rc->errmsg, _("pipe: %s"), strerror(errno)); return (-1); } switch (rc->pid = fork()) { case -1: - rc->errmsg = newvstralloc(rc->errmsg, "fork: ", strerror(errno), NULL); + rc->errmsg = newvstrallocf(rc->errmsg, _("fork: %s"), strerror(errno)); aclose(rpipe[0]); aclose(rpipe[1]); aclose(wpipe[0]); @@ -233,7 +230,7 @@ runrsh( safe_fd(-1, 0); if(!xamandad_path || strlen(xamandad_path) <= 1) - xamandad_path = vstralloc(libexecdir, "/", "amandad", + xamandad_path = vstralloc(amlibexecdir, "/", "amandad", versionsuffix(), NULL); if(!xclient_username || strlen(xclient_username) <= 1) xclient_username = CLIENT_LOGIN; @@ -241,10 +238,8 @@ runrsh( execlp(RSH_PATH, RSH_PATH, "-l", xclient_username, rc->hostname, xamandad_path, "-auth=rsh", "amdump", "amindexd", "amidxtaped", (char *)NULL); - error("error: couldn't exec %s: %s", RSH_PATH, strerror(errno)); + error(_("error: couldn't exec %s: %s"), RSH_PATH, strerror(errno)); /* should never go here, shut up compiler warning */ return(-1); } - -#endif /* RSH_SECURITY */ diff --git a/common-src/security-util.c b/common-src/security-util.c index 4035cba..77e5d0c 100644 --- a/common-src/security-util.c +++ b/common-src/security-util.c @@ -42,6 +42,7 @@ #include "security-util.h" #include "stream.h" #include "version.h" +#include "sockaddr-util.h" /* * Magic values for sec_conn->handle @@ -103,9 +104,11 @@ sec_stream_id( void sec_accept( const security_driver_t *driver, + char *(*conf_fn)(char *, void *), int in, int out, - void (*fn)(security_handle_t *, pkt_t *)) + void (*fn)(security_handle_t *, pkt_t *), + void *datap) { struct tcp_conn *rc; @@ -114,6 +117,8 @@ sec_accept( rc->write = out; rc->accept_fn = fn; rc->driver = driver; + rc->conf_fn = conf_fn; + rc->datap = datap; sec_tcp_conn_read(rc); } @@ -128,8 +133,7 @@ sec_close( assert(rh != NULL); - auth_debug(1, ("%s: sec: closing handle to %s\n", debug_prefix_time(NULL), - rh->hostname)); + auth_debug(1, _("sec: closing handle to %s\n"), rh->hostname); if (rh->rs != NULL) { /* This may be null if we get here on an error */ @@ -206,8 +210,7 @@ stream_sendpkt( assert(rh != NULL); assert(pkt != NULL); - auth_debug(1, ("%s: sec: stream_sendpkt: enter\n", - debug_prefix_time(NULL))); + auth_debug(1, _("sec: stream_sendpkt: enter\n")); if (rh->rc->prefix_packet) s = rh->rc->prefix_packet(rh, pkt); @@ -222,9 +225,8 @@ stream_sendpkt( amfree(s); auth_debug(1, - ("%s: sec: stream_sendpkt: %s (%d) pkt_t (len " SIZE_T_FMT ") contains:\n\n\"%s\"\n\n", - debug_prefix_time(NULL), pkt_type2str(pkt->type), pkt->type, - strlen(pkt->body), pkt->body)); + _("sec: stream_sendpkt: %s (%d) pkt_t (len %zu) contains:\n\n\"%s\"\n\n"), + pkt_type2str(pkt->type), pkt->type, strlen(pkt->body), pkt->body); if (security_stream_write(&rh->rs->secstr, buf, len) < 0) { security_seterror(&rh->sech, security_stream_geterror(&rh->rs->secstr)); @@ -249,8 +251,7 @@ stream_recvpkt( assert(rh != NULL); - auth_debug(1, ("%s: sec: recvpkt registered for %s\n", - debug_prefix_time(NULL), rh->hostname)); + auth_debug(1, _("sec: recvpkt registered for %s\n"), rh->hostname); /* * Reset any pending timeout on this handle @@ -283,8 +284,7 @@ stream_recvpkt_timeout( assert(rh != NULL); - auth_debug(1, ("%s: sec: recvpkt timeout for %s\n", - debug_prefix_time(NULL), rh->hostname)); + auth_debug(1, _("sec: recvpkt timeout for %s\n"), rh->hostname); stream_recvpkt_cancel(rh); (*rh->fn.recvpkt)(rh->arg, NULL, S_TIMEOUT); @@ -299,8 +299,7 @@ stream_recvpkt_cancel( { struct sec_handle *rh = cookie; - auth_debug(1, ("%s: sec: cancelling recvpkt for %s\n", - debug_prefix_time(NULL), rh->hostname)); + auth_debug(1, _("sec: cancelling recvpkt for %s\n"), rh->hostname); assert(rh != NULL); @@ -325,9 +324,9 @@ tcpm_stream_write( assert(rs != NULL); assert(rs->rc != NULL); - auth_debug(1, ("%s: sec: stream_write: writing " SIZE_T_FMT " bytes to %s:%d %d\n", - debug_prefix_time(NULL), size, rs->rc->hostname, rs->handle, - rs->rc->write)); + auth_debug(1, _("sec: stream_write: writing %zu bytes to %s:%d %d\n"), + size, rs->rc->hostname, rs->handle, + rs->rc->write); if (tcpm_send_token(rs->rc, rs->rc->write, rs->handle, &rs->rc->errmsg, buf, size)) { @@ -421,8 +420,8 @@ tcpm_send_token( const void *buf, size_t len) { - uint32_t nethandle; - uint32_t netlength; + guint32 nethandle; + guint32 netlength; struct iovec iov[3]; int nb_iov = 3; int rval; @@ -431,8 +430,8 @@ tcpm_send_token( assert(SIZEOF(netlength) == 4); - auth_debug(1, ("%s: tcpm_send_token: write %zd bytes to handle %d\n", - debug_prefix_time(NULL), len, handle)); + auth_debug(1, "tcpm_send_token: write %zd bytes to handle %d\n", + len, handle); /* * Format is: * 32 bit length (network byte order) @@ -443,7 +442,7 @@ tcpm_send_token( iov[0].iov_base = (void *)&netlength; iov[0].iov_len = SIZEOF(netlength); - nethandle = htonl((uint32_t)handle); + nethandle = htonl((guint32)handle); iov[1].iov_base = (void *)&nethandle; iov[1].iov_len = SIZEOF(nethandle); @@ -474,8 +473,8 @@ tcpm_send_token( if (rval < 0) { if (errmsg) - *errmsg = newvstralloc(*errmsg, "write error to ", - ": ", strerror(errno), NULL); + *errmsg = newvstrallocf(*errmsg, _("write error to: %s"), + strerror(errno)); return (-1); } return (0); @@ -505,17 +504,14 @@ tcpm_recv_token( switch (net_read(fd, &netint, SIZEOF(netint), timeout)) { case -1: if (errmsg) - *errmsg = newvstralloc(*errmsg, "recv error: ", strerror(errno), - NULL); - auth_debug(1, ("%s: tcpm_recv_token: A return(-1)\n", - debug_prefix_time(NULL))); + *errmsg = newvstrallocf(*errmsg, _("recv error: %s"), strerror(errno)); + auth_debug(1, _("tcpm_recv_token: A return(-1)\n")); return (-1); case 0: *size = 0; *handle = H_EOF; - *errmsg = newvstralloc(*errmsg, "SOCKET_EOF", NULL); - auth_debug(1, ("%s: tcpm_recv_token: A return(0)\n", - debug_prefix_time(NULL))); + *errmsg = newvstrallocf(*errmsg, _("SOCKET_EOF")); + auth_debug(1, _("tcpm_recv_token: A return(0)\n")); return (0); default: break; @@ -544,23 +540,21 @@ tcpm_recv_token( s[6] = (*handle >> 8 ) & 0xFF; s[7] = (*handle ) & 0xFF; i = 8; s[i] = ' '; - while(i<100 && isprint(s[i]) && s[i] != '\n') { + while(i<100 && isprint((int)s[i]) && s[i] != '\n') { switch(net_read(fd, &s[i], 1, 0)) { case -1: s[i] = '\0'; break; case 0: s[i] = '\0'; break; - default: dbprintf(("read: %c\n", s[i])); i++; s[i]=' ';break; + default: + dbprintf(_("read: %c\n"), s[i]); i++; s[i]=' '; + break; } } s[i] = '\0'; - *errmsg = newvstralloc(*errmsg, "tcpm_recv_token: invalid size: ", - s, NULL); - dbprintf(("%s: tcpm_recv_token: invalid size: %s\n", - debug_prefix_time(NULL), s)); + *errmsg = newvstrallocf(*errmsg, _("tcpm_recv_token: invalid size: %s"), s); + dbprintf(_("tcpm_recv_token: invalid size %s\n"), s); } else { - *errmsg = newvstralloc(*errmsg, "tcpm_recv_token: invalid size", - NULL); - dbprintf(("%s: tcpm_recv_token: invalid size " SSIZE_T_FMT "\n", - debug_prefix_time(NULL), *size)); + *errmsg = newvstrallocf(*errmsg, _("tcpm_recv_token: invalid size")); + dbprintf(_("tcpm_recv_token: invalid size %zd\n"), *size); } *size = -1; return -1; @@ -569,41 +563,34 @@ tcpm_recv_token( *buf = alloc((size_t)*size); if(*size == 0) { - auth_debug(1, ("%s: tcpm_recv_token: read EOF from %d\n", - debug_prefix_time(NULL), *handle)); - *errmsg = newvstralloc(*errmsg, "EOF", - NULL); + auth_debug(1, _("tcpm_recv_token: read EOF from %d\n"), *handle); + *errmsg = newvstrallocf(*errmsg, _("EOF")); return 0; } switch (net_read(fd, *buf, (size_t)*size, timeout)) { case -1: if (errmsg) - *errmsg = newvstralloc(*errmsg, "recv error: ", strerror(errno), - NULL); - auth_debug(1, ("%s: tcpm_recv_token: B return(-1)\n", - debug_prefix_time(NULL))); + *errmsg = newvstrallocf(*errmsg, _("recv error: %s"), strerror(errno)); + auth_debug(1, _("tcpm_recv_token: B return(-1)\n")); return (-1); case 0: *size = 0; - *errmsg = newvstralloc(*errmsg, "SOCKET_EOF", NULL); - auth_debug(1, ("%s: tcpm_recv_token: B return(0)\n", - debug_prefix_time(NULL))); + *errmsg = newvstrallocf(*errmsg, _("SOCKET_EOF")); + auth_debug(1, _("tcpm_recv_token: B return(0)\n")); return (0); default: break; } - auth_debug(1, ("%s: tcpm_recv_token: read " SSIZE_T_FMT " bytes from %d\n", - debug_prefix_time(NULL), *size, *handle)); + auth_debug(1, _("tcpm_recv_token: read %zd bytes from %d\n"), *size, *handle); if (*size > 0 && rc->driver->data_decrypt != NULL) { - char *decbuf; + void *decbuf; ssize_t decsize; - /* (the extra (void *) cast is to quiet type-punning warnings) */ - rc->driver->data_decrypt(rc, *buf, *size, (void **)(void *)&decbuf, &decsize); - if (*buf != decbuf) { + rc->driver->data_decrypt(rc, *buf, *size, &decbuf, &decsize); + if (*buf != (char *)decbuf) { amfree(*buf); - *buf = decbuf; + *buf = (char *)decbuf; } *size = decsize; } @@ -657,7 +644,7 @@ tcpma_stream_client( if (id <= 0) { security_seterror(&rh->sech, - "%d: invalid security stream id", id); + _("%d: invalid security stream id"), id); return (NULL); } @@ -677,8 +664,7 @@ tcpma_stream_client( rh->rc = rs->rc; } - auth_debug(1, ("%s: sec: stream_client: connected to stream %d\n", - debug_prefix_time(NULL), id)); + auth_debug(1, _("sec: stream_client: connected to stream %d\n"), id); return (rs); } @@ -715,7 +701,7 @@ tcpma_stream_server( if (rs->rc->read < 0) { sec_tcp_conn_put(rs->rc); amfree(rs); - security_seterror(&rh->sech, "lost connection to %s", rh->hostname); + security_seterror(&rh->sech, _("lost connection to %s"), rh->hostname); return (NULL); } assert(strcmp(rh->hostname, rs->rc->hostname) == 0); @@ -725,8 +711,7 @@ tcpma_stream_server( */ rs->handle = 500000 - newhandle++; rs->ev_read = NULL; - auth_debug(1, ("%s: sec: stream_server: created stream %d\n", - debug_prefix_time(NULL), rs->handle)); + auth_debug(1, _("sec: stream_server: created stream %d\n"), rs->handle); return (rs); } @@ -742,8 +727,7 @@ tcpma_stream_close( assert(rs != NULL); - auth_debug(1, ("%s: sec: tcpma_stream_close: closing stream %d\n", - debug_prefix_time(NULL), rs->handle)); + auth_debug(1, _("sec: tcpma_stream_close: closing stream %d\n"), rs->handle); if(rs->closed_by_network == 0 && rs->rc->write != -1) tcpm_stream_write(rs, &buf, 0); @@ -780,11 +764,11 @@ tcp1_stream_server( rh->rc = sec_tcp_conn_get(rh->hostname, 1); rh->rc->driver = rh->sech.driver; rs->rc = rh->rc; - rs->socket = stream_server(&rs->port, STREAM_BUFSIZE, - STREAM_BUFSIZE, 0); + rs->socket = stream_server(SU_GET_FAMILY(&rh->udp->peer), &rs->port, + STREAM_BUFSIZE, STREAM_BUFSIZE, 0); if (rs->socket < 0) { security_seterror(&rh->sech, - "can't create server stream: %s", strerror(errno)); + _("can't create server stream: %s"), strerror(errno)); amfree(rs); return (NULL); } @@ -815,7 +799,7 @@ tcp1_stream_accept( bs->fd = stream_accept(bs->socket, 30, STREAM_BUFSIZE, STREAM_BUFSIZE); if (bs->fd < 0) { security_stream_seterror(&bs->secstr, - "can't accept new stream connection: %s", + _("can't accept new stream connection: %s"), strerror(errno)); return (-1); } @@ -856,7 +840,7 @@ tcp1_stream_client( STREAM_BUFSIZE, STREAM_BUFSIZE, &rs->port, 0); if (rh->rc->read < 0) { security_seterror(&rh->sech, - "can't connect stream to %s port %d: %s", + _("can't connect stream to %s port %d: %s"), rh->hostname, id, strerror(errno)); amfree(rs); return (NULL); @@ -880,7 +864,7 @@ tcp_stream_write( if (fullwrite(rs->fd, buf, size) < 0) { security_stream_seterror(&rs->secstr, - "write error on stream %d: %s", rs->port, strerror(errno)); + _("write error on stream %d: %s"), rs->port, strerror(errno)); return (-1); } return (0); @@ -900,7 +884,7 @@ bsd_prefix_packet( if ((pwd = getpwuid(getuid())) == NULL) { security_seterror(&rh->sech, - "can't get login name for my uid %ld", + _("can't get login name for my uid %ld"), (long)getuid()); return(NULL); } @@ -979,10 +963,10 @@ bsd_recv_security_ok( /* * Request packets must come from a reserved port */ - port = SS_GET_PORT(&rh->peer); + port = SU_GET_PORT(&rh->peer); if (port >= IPPORT_RESERVED) { security_seterror(&rh->sech, - "host %s: port %u not secure", rh->hostname, + _("host %s: port %u not secure"), rh->hostname, (unsigned int)port); amfree(service); amfree(security_line); @@ -991,7 +975,7 @@ bsd_recv_security_ok( if (!service) { security_seterror(&rh->sech, - "packet as no SERVICE line"); + _("packet as no SERVICE line")); amfree(security_line); return (-1); } @@ -1007,7 +991,7 @@ bsd_recv_security_ok( /* there must be some security info */ if (security == NULL) { security_seterror(&rh->sech, - "no bsd SECURITY for P_REQ"); + _("no bsd SECURITY for P_REQ")); amfree(service); return (-1); } @@ -1015,14 +999,14 @@ bsd_recv_security_ok( /* second word must be USER */ if ((tok = strtok(security, " ")) == NULL) { security_seterror(&rh->sech, - "SECURITY line: %s", security_line); + _("SECURITY line: %s"), security_line); amfree(service); amfree(security_line); return (-1); /* default errmsg */ } if (strcmp(tok, "USER") != 0) { security_seterror(&rh->sech, - "REQ SECURITY line parse error, expecting USER, got %s", tok); + _("REQ SECURITY line parse error, expecting USER, got %s"), tok); amfree(service); amfree(security_line); return (-1); @@ -1031,7 +1015,7 @@ bsd_recv_security_ok( /* the third word is the username */ if ((tok = strtok(NULL, "")) == NULL) { security_seterror(&rh->sech, - "SECURITY line: %s", security_line); + _("SECURITY line: %s"), security_line); amfree(security_line); return (-1); /* default errmsg */ } @@ -1074,7 +1058,7 @@ udpbsd_sendpkt( assert(rh != NULL); assert(pkt != NULL); - auth_debug(1, ("%s: udpbsd_sendpkt: enter\n", get_pname())); + auth_debug(1, _("udpbsd_sendpkt: enter\n")); /* * Initialize this datagram, and add the header */ @@ -1092,10 +1076,10 @@ udpbsd_sendpkt( */ if ((pwd = getpwuid(geteuid())) == NULL) { security_seterror(&rh->sech, - "can't get login name for my uid %ld", (long)getuid()); + _("can't get login name for my uid %ld"), (long)getuid()); return (-1); } - dgram_cat(&rh->udp->dgram, "SECURITY USER %s\n", pwd->pw_name); + dgram_cat(&rh->udp->dgram, _("SECURITY USER %s\n"), pwd->pw_name); break; default: @@ -1108,13 +1092,12 @@ udpbsd_sendpkt( dgram_cat(&rh->udp->dgram, pkt->body); auth_debug(1, - ("%s: sec: udpbsd_sendpkt: %s (%d) pkt_t (len " SIZE_T_FMT ") contains:\n\n\"%s\"\n\n", - debug_prefix_time(NULL), pkt_type2str(pkt->type), pkt->type, - strlen(pkt->body), pkt->body)); + _("sec: udpbsd_sendpkt: %s (%d) pkt_t (len %zu) contains:\n\n\"%s\"\n\n"), + pkt_type2str(pkt->type), pkt->type, strlen(pkt->body), pkt->body); if (dgram_send_addr(&rh->peer, &rh->udp->dgram) != 0) { security_seterror(&rh->sech, - "send %s to %s failed: %s", pkt_type2str(pkt->type), + _("send %s to %s failed: %s"), pkt_type2str(pkt->type), rh->hostname, strerror(errno)); return (-1); } @@ -1131,8 +1114,7 @@ udp_close( return; } - auth_debug(1, ("%s: udp: close handle '%s'\n", - debug_prefix_time(NULL), rh->proto_handle)); + auth_debug(1, _("udp: close handle '%s'\n"), rh->proto_handle); udp_recvpkt_cancel(rh); if (rh->next) { @@ -1166,8 +1148,8 @@ udp_recvpkt( { struct sec_handle *rh = cookie; - auth_debug(1, ("%s: udp_recvpkt(cookie=%p, fn=%p, arg=%p, timeout=%u)\n", - debug_prefix_time(NULL), cookie, fn, arg, timeout)); + auth_debug(1, _("udp_recvpkt(cookie=%p, fn=%p, arg=%p, timeout=%u)\n"), + cookie, fn, arg, timeout); assert(rh != NULL); assert(fn != NULL); @@ -1228,8 +1210,8 @@ udp_recvpkt_callback( void (*fn)(void *, pkt_t *, security_status_t); void *arg; - auth_debug(1, ("%s: udp: receive handle '%s' netfd '%s'\n", - debug_prefix_time(NULL), rh->proto_handle, rh->udp->handle)); + auth_debug(1, _("udp: receive handle '%s' netfd '%s'\n"), + rh->proto_handle, rh->udp->handle); assert(rh != NULL); /* if it doesn't correspond to this handle, something is wrong */ @@ -1238,7 +1220,7 @@ udp_recvpkt_callback( /* if it didn't come from the same host/port, forget it */ if (cmp_sockaddr(&rh->peer, &rh->udp->peer, 0) != 0) { amfree(rh->udp->handle); - dbprintf(("not form same host\n")); + dbprintf(_("not from same host\n")); dump_sockaddr(&rh->peer); dump_sockaddr(&rh->udp->peer); return; @@ -1292,7 +1274,7 @@ udp_inithandle( udp_handle_t * udp, struct sec_handle * rh, char * hostname, - struct sockaddr_storage *addr, + sockaddr_union *addr, in_port_t port, char * handle, int sequence) @@ -1300,14 +1282,14 @@ udp_inithandle( /* * Save the hostname and port info */ - auth_debug(1, ("%s: udp_inithandle port %u handle %s sequence %d\n", - debug_prefix_time(NULL), (unsigned int)ntohs(port), - handle, sequence)); + auth_debug(1, _("udp_inithandle port %u handle %s sequence %d\n"), + (unsigned int)ntohs(port), handle, sequence); assert(addr != NULL); rh->hostname = stralloc(hostname); - memcpy(&rh->peer, addr, SIZEOF(rh->peer)); - SS_SET_PORT(&rh->peer, port); + copy_sockaddr(&rh->peer, addr); + SU_SET_PORT(&rh->peer, port); + rh->prev = udp->bh_last; if (udp->bh_last) { @@ -1328,8 +1310,7 @@ udp_inithandle( rh->ev_read = NULL; rh->ev_timeout = NULL; - auth_debug(1, ("%s: udp: adding handle '%s'\n", - debug_prefix_time(NULL), rh->proto_handle)); + auth_debug(1, _("udp: adding handle '%s'\n"), rh->proto_handle); return(0); } @@ -1352,8 +1333,7 @@ udp_netfd_read_callback( char *errmsg = NULL; int result; - auth_debug(1, ("%s: udp_netfd_read_callback(cookie=%p)\n", - debug_prefix_time(NULL), cookie)); + auth_debug(1, _("udp_netfd_read_callback(cookie=%p)\n"), cookie); assert(udp != NULL); #ifndef TEST /* { */ @@ -1388,7 +1368,7 @@ udp_netfd_read_callback( * If no accept handler was setup, then just return. */ if (udp->accept_fn == NULL) { - dbprintf(("%s: Receive packet from unknown source", debug_prefix_time(NULL))); + dbprintf(_("Receive packet from unknown source")); return; } @@ -1401,8 +1381,8 @@ udp_netfd_read_callback( result = getnameinfo((struct sockaddr *)&udp->peer, SS_LEN(&udp->peer), hostname, sizeof(hostname), NULL, 0, 0); if (result != 0) { - dbprintf(("%s: getnameinfo failed: %s\n", - debug_prefix_time(NULL), gai_strerror(result))); + dbprintf("getnameinfo failed: %s\n", + gai_strerror(result)); security_seterror(&rh->sech, "getnameinfo failed: %s", gai_strerror(result)); return; @@ -1415,7 +1395,7 @@ udp_netfd_read_callback( return; } - port = SS_GET_PORT(&udp->peer); + port = SU_GET_PORT(&udp->peer); a = udp_inithandle(udp, rh, hostname, &udp->peer, @@ -1423,8 +1403,7 @@ udp_netfd_read_callback( udp->handle, udp->sequence); if (a < 0) { - auth_debug(1, ("%s: bsd: closeX handle '%s'\n", - debug_prefix_time(NULL), rh->proto_handle)); + auth_debug(1, _("bsd: closeX handle '%s'\n"), rh->proto_handle); amfree(rh); return; @@ -1451,8 +1430,7 @@ sec_tcp_conn_get( { struct tcp_conn *rc; - auth_debug(1, ("%s: sec_tcp_conn_get: %s\n", - debug_prefix_time(NULL), hostname)); + auth_debug(1, _("sec_tcp_conn_get: %s\n"), hostname); if (want_new == 0) { for (rc = connq_first(); rc != NULL; rc = connq_next(rc)) { @@ -1463,15 +1441,13 @@ sec_tcp_conn_get( if (rc != NULL) { rc->refcnt++; auth_debug(1, - ("%s: sec_tcp_conn_get: exists, refcnt to %s is now %d\n", - debug_prefix_time(NULL), - rc->hostname, rc->refcnt)); + _("sec_tcp_conn_get: exists, refcnt to %s is now %d\n"), + rc->hostname, rc->refcnt); return (rc); } } - auth_debug(1, ("%s: sec_tcp_conn_get: creating new handle\n", - debug_prefix_time(NULL))); + auth_debug(1, _("sec_tcp_conn_get: creating new handle\n")); /* * We can't be creating a new handle if we are the client */ @@ -1492,6 +1468,8 @@ sec_tcp_conn_get( rc->recv_security_ok = NULL; rc->prefix_packet = NULL; rc->auth = 0; + rc->conf_fn = NULL; + rc->datap = NULL; connq_append(rc); return (rc); } @@ -1508,14 +1486,12 @@ sec_tcp_conn_put( assert(rc->refcnt > 0); --rc->refcnt; - auth_debug(1, ("%s: sec_tcp_conn_put: decrementing refcnt for %s to %d\n", - debug_prefix_time(NULL), - rc->hostname, rc->refcnt)); + auth_debug(1, _("sec_tcp_conn_put: decrementing refcnt for %s to %d\n"), + rc->hostname, rc->refcnt); if (rc->refcnt > 0) { return; } - auth_debug(1, ("%s: sec_tcp_conn_put: closing connection to %s\n", - debug_prefix_time(NULL), rc->hostname)); + auth_debug(1, _("sec_tcp_conn_put: closing connection to %s\n"), rc->hostname); if (rc->read != -1) aclose(rc->read); if (rc->write != -1) @@ -1548,12 +1524,12 @@ sec_tcp_conn_read( if (rc->ev_read != NULL) { rc->ev_read_refcnt++; auth_debug(1, - ("%s: sec: conn_read: incremented ev_read_refcnt to %d for %s\n", - debug_prefix_time(NULL), rc->ev_read_refcnt, rc->hostname)); + _("sec: conn_read: incremented ev_read_refcnt to %d for %s\n"), + rc->ev_read_refcnt, rc->hostname); return; } - auth_debug(1, ("%s: sec: conn_read registering event handler for %s\n", - debug_prefix_time(NULL), rc->hostname)); + auth_debug(1, _("sec: conn_read registering event handler for %s\n"), + rc->hostname); rc->ev_read = event_register((event_id_t)rc->read, EV_READFD, sec_tcp_conn_read_callback, rc); rc->ev_read_refcnt = 1; @@ -1566,15 +1542,14 @@ sec_tcp_conn_read_cancel( --rc->ev_read_refcnt; auth_debug(1, - ("%s: sec: conn_read_cancel: decremented ev_read_refcnt to %d for %s\n", - debug_prefix_time(NULL), - rc->ev_read_refcnt, rc->hostname)); + _("sec: conn_read_cancel: decremented ev_read_refcnt to %d for %s\n"), + rc->ev_read_refcnt, rc->hostname); if (rc->ev_read_refcnt > 0) { return; } auth_debug(1, - ("%s: sec: conn_read_cancel: releasing event handler for %s\n", - debug_prefix_time(NULL), rc->hostname)); + _("sec: conn_read_cancel: releasing event handler for %s\n"), + rc->hostname); event_release(rc->ev_read); rc->ev_read = NULL; } @@ -1594,8 +1569,7 @@ recvpkt_callback( assert(rh != NULL); - auth_debug(1, ("%s: sec: recvpkt_callback: " SSIZE_T_FMT "\n", - debug_prefix_time(NULL), bufsize)); + auth_debug(1, _("sec: recvpkt_callback: %zd\n"), bufsize); /* * We need to cancel the recvpkt request before calling * the callback because the callback may reschedule us. @@ -1605,7 +1579,7 @@ recvpkt_callback( switch (bufsize) { case 0: security_seterror(&rh->sech, - "EOF on read from %s", rh->hostname); + _("EOF on read from %s"), rh->hostname); (*rh->fn.recvpkt)(rh->arg, NULL, S_ERROR); return; case -1: @@ -1618,9 +1592,9 @@ recvpkt_callback( parse_pkt(&pkt, buf, (size_t)bufsize); auth_debug(1, - ("%s: sec: received %s packet (%d) from %s, contains:\n\n\"%s\"\n\n", - debug_prefix_time(NULL), pkt_type2str(pkt.type), pkt.type, - rh->hostname, pkt.body)); + _("sec: received %s packet (%d) from %s, contains:\n\n\"%s\"\n\n"), + pkt_type2str(pkt.type), pkt.type, + rh->hostname, pkt.body); if (rh->rc->recv_security_ok && (rh->rc->recv_security_ok)(rh, &pkt) < 0) (*rh->fn.recvpkt)(rh->arg, NULL, S_ERROR); else @@ -1638,8 +1612,7 @@ stream_read_sync_callback( struct sec_stream *rs = s; assert(rs != NULL); - auth_debug(1, ("%s: sec: stream_read_callback_sync: handle %d\n", - debug_prefix_time(NULL), rs->handle)); + auth_debug(1, _("sec: stream_read_callback_sync: handle %d\n"), rs->handle); /* * Make sure this was for us. If it was, then blow away the handle @@ -1648,12 +1621,10 @@ stream_read_sync_callback( * If the handle is EOF, pass that up to our callback. */ if (rs->rc->handle == rs->handle) { - auth_debug(1, ("%s: sec: stream_read_callback_sync: it was for us\n", - debug_prefix_time(NULL))); + auth_debug(1, _("sec: stream_read_callback_sync: it was for us\n")); rs->rc->handle = H_TAKEN; } else if (rs->rc->handle != H_EOF) { - auth_debug(1, ("%s: sec: stream_read_callback_sync: not for us\n", - debug_prefix_time(NULL))); + auth_debug(1, _("sec: stream_read_callback_sync: not for us\n")); return; } @@ -1665,8 +1636,7 @@ stream_read_sync_callback( tcpm_stream_read_cancel(rs); if (rs->rc->pktlen <= 0) { - auth_debug(1, ("%s: sec: stream_read_sync_callback: %s\n", - debug_prefix_time(NULL), rs->rc->errmsg)); + auth_debug(1, _("sec: stream_read_sync_callback: %s\n"), rs->rc->errmsg); security_stream_seterror(&rs->secstr, rs->rc->errmsg); if(rs->closed_by_me == 0 && rs->closed_by_network == 0) sec_tcp_conn_put(rs->rc); @@ -1674,9 +1644,8 @@ stream_read_sync_callback( return; } auth_debug(1, - ("%s: sec: stream_read_callback_sync: read " SSIZE_T_FMT " bytes from %s:%d\n", - debug_prefix_time(NULL), - rs->rc->pktlen, rs->rc->hostname, rs->handle)); + _("sec: stream_read_callback_sync: read %zd bytes from %s:%d\n"), + rs->rc->pktlen, rs->rc->hostname, rs->handle); } /* @@ -1689,8 +1658,7 @@ stream_read_callback( struct sec_stream *rs = arg; assert(rs != NULL); - auth_debug(1, ("%s: sec: stream_read_callback: handle %d\n", - debug_prefix_time(NULL), rs->handle)); + auth_debug(1, _("sec: stream_read_callback: handle %d\n"), rs->handle); /* * Make sure this was for us. If it was, then blow away the handle @@ -1699,12 +1667,10 @@ stream_read_callback( * If the handle is EOF, pass that up to our callback. */ if (rs->rc->handle == rs->handle) { - auth_debug(1, ("%s: sec: stream_read_callback: it was for us\n", - debug_prefix_time(NULL))); + auth_debug(1, _("sec: stream_read_callback: it was for us\n")); rs->rc->handle = H_TAKEN; } else if (rs->rc->handle != H_EOF) { - auth_debug(1, ("%s: sec: stream_read_callback: not for us\n", - debug_prefix_time(NULL))); + auth_debug(1, _("sec: stream_read_callback: not for us\n")); return; } @@ -1716,8 +1682,7 @@ stream_read_callback( tcpm_stream_read_cancel(rs); if (rs->rc->pktlen <= 0) { - auth_debug(1, ("%s: sec: stream_read_callback: %s\n", - debug_prefix_time(NULL), rs->rc->errmsg)); + auth_debug(1, _("sec: stream_read_callback: %s\n"), rs->rc->errmsg); security_stream_seterror(&rs->secstr, rs->rc->errmsg); if(rs->closed_by_me == 0 && rs->closed_by_network == 0) sec_tcp_conn_put(rs->rc); @@ -1725,12 +1690,10 @@ stream_read_callback( (*rs->fn)(rs->arg, NULL, rs->rc->pktlen); return; } - auth_debug(1, ("%s: sec: stream_read_callback: read " SSIZE_T_FMT " bytes from %s:%d\n", - debug_prefix_time(NULL), - rs->rc->pktlen, rs->rc->hostname, rs->handle)); + auth_debug(1, _("sec: stream_read_callback: read %zd bytes from %s:%d\n"), + rs->rc->pktlen, rs->rc->hostname, rs->handle); (*rs->fn)(rs->arg, rs->rc->pkt, rs->rc->pktlen); - auth_debug(1, ("%s: sec: after callback stream_read_callback\n", - debug_prefix_time(NULL))); + auth_debug(1, _("sec: after callback stream_read_callback\n")); } /* @@ -1750,24 +1713,24 @@ sec_tcp_conn_read_callback( assert(cookie != NULL); - auth_debug(1, ("%s: sec: conn_read_callback\n", debug_prefix_time(NULL))); + auth_debug(1, _("sec: conn_read_callback\n")); /* Read the data off the wire. If we get errors, shut down. */ rval = tcpm_recv_token(rc, rc->read, &rc->handle, &rc->errmsg, &rc->pkt, &rc->pktlen, 60); - auth_debug(1, ("%s: sec: conn_read_callback: tcpm_recv_token returned " SSIZE_T_FMT "\n", - debug_prefix_time(NULL), rval)); + auth_debug(1, _("sec: conn_read_callback: tcpm_recv_token returned %zd\n"), + rval); if (rval < 0 || rc->handle == H_EOF) { rc->pktlen = rval; rc->handle = H_EOF; revent = event_wakeup((event_id_t)rc); - auth_debug(1, ("%s: sec: conn_read_callback: event_wakeup return %d\n", - debug_prefix_time(NULL), revent)); + auth_debug(1, _("sec: conn_read_callback: event_wakeup return %d\n"), + revent); /* delete our 'accept' reference */ if (rc->accept_fn != NULL) { if(rc->refcnt != 1) { - dbprintf(("STRANGE, rc->refcnt should be 1, it is %d\n", - rc->refcnt)); + dbprintf(_("STRANGE, rc->refcnt should be 1, it is %d\n"), + rc->refcnt); rc->refcnt=1; } rc->accept_fn = NULL; @@ -1780,16 +1743,14 @@ sec_tcp_conn_read_callback( rc->pktlen = 0; revent = event_wakeup((event_id_t)rc); auth_debug(1, - ("%s: 0 sec: conn_read_callback: event_wakeup return %d\n", - debug_prefix_time(NULL), revent)); + _("sec: conn_read_callback: event_wakeup return %d\n"), revent); return; } /* If there are events waiting on this handle, we're done */ rc->donotclose = 1; revent = event_wakeup((event_id_t)rc); - auth_debug(1, ("%s: sec: conn_read_callback: event_wakeup return " SSIZE_T_FMT "\n", - debug_prefix_time(NULL), rval)); + auth_debug(1, _("sec: conn_read_callback: event_wakeup return %zd\n"), rval); rc->donotclose = 0; if (rc->handle == H_TAKEN || rc->pktlen == 0) { if(rc->refcnt == 0) amfree(rc); @@ -1810,10 +1771,10 @@ sec_tcp_conn_read_callback( rh->peer = rc->peer; rh->rs = tcpma_stream_client(rh, rc->handle); - auth_debug(1, ("%s: sec: new connection\n", debug_prefix_time(NULL))); + auth_debug(1, _("sec: new connection\n")); pkt.body = NULL; parse_pkt(&pkt, rc->pkt, (size_t)rc->pktlen); - auth_debug(1, ("%s: sec: calling accept_fn\n", debug_prefix_time(NULL))); + auth_debug(1, _("sec: calling accept_fn\n")); if (rh->rc->recv_security_ok && (rh->rc->recv_security_ok)(rh, &pkt) < 0) (*rc->accept_fn)(&rh->sech, NULL); else @@ -1829,8 +1790,7 @@ parse_pkt( { const unsigned char *bufp = buf; - auth_debug(1, ("%s: sec: parse_pkt: parsing buffer of " SSIZE_T_FMT " bytes\n", - debug_prefix_time(NULL), bufsize)); + auth_debug(1, _("sec: parse_pkt: parsing buffer of %zu bytes\n"), bufsize); pkt->type = (pktype_t)*bufp++; bufsize--; @@ -1845,9 +1805,8 @@ parse_pkt( } pkt->size = strlen(pkt->body); - auth_debug(1, ("%s: sec: parse_pkt: %s (%d): \"%s\"\n", - debug_prefix_time(NULL), pkt_type2str(pkt->type), - pkt->type, pkt->body)); + auth_debug(1, _("sec: parse_pkt: %s (%d): \"%s\"\n"), pkt_type2str(pkt->type), + pkt->type, pkt->body); } /* @@ -1863,12 +1822,11 @@ pkthdr2str( assert(rh != NULL); assert(pkt != NULL); - snprintf(retbuf, SIZEOF(retbuf), "Amanda %d.%d %s HANDLE %s SEQ %d\n", + g_snprintf(retbuf, SIZEOF(retbuf), _("Amanda %d.%d %s HANDLE %s SEQ %d\n"), VERSION_MAJOR, VERSION_MINOR, pkt_type2str(pkt->type), rh->proto_handle, rh->sequence); - auth_debug(1, ("%s: bsd: pkthdr2str handle '%s'\n", - debug_prefix_time(NULL), rh->proto_handle)); + auth_debug(1, _("bsd: pkthdr2str handle '%s'\n"), rh->proto_handle); /* check for truncation. If only we had asprintf()... */ assert(retbuf[strlen(retbuf) - 1] == '\n'); @@ -1959,7 +1917,7 @@ check_user( /* lookup our local user name */ if ((pwd = getpwnam(CLIENT_LOGIN)) == NULL) { - return vstralloc("getpwnam(", CLIENT_LOGIN, ") fails", NULL); + return vstrallocf(_("getpwnam(%s) failed."), CLIENT_LOGIN); } /* @@ -1974,9 +1932,9 @@ check_user( r = check_user_amandahosts(rh->hostname, &rh->peer, pwd, remoteuser, service); #endif if (r != NULL) { - result = vstralloc("user ", remoteuser, " from ", rh->hostname, - " is not allowed to execute the service ", - service, ": ", r, NULL); + result = vstrallocf( + _("user %s from %s is not allowed to execute the service %s: %s"), + remoteuser, rh->hostname, service, r); amfree(r); } amfree(localuser); @@ -1987,7 +1945,7 @@ check_user( * See if a remote user is allowed in. This version uses ruserok() * and friends. * - * Returns 0 on success, or negative on error. + * Returns NULL on success, or error message on error. */ char * check_user_ruserok( @@ -2004,7 +1962,6 @@ check_user_ruserok( char *es; char *result; int ok; - char number[NUM_STR_SIZE]; uid_t myuid = getuid(); /* @@ -2019,22 +1976,22 @@ check_user_ruserok( * problem and is expected. Thanks a lot. Not. */ if (pipe(fd) != 0) { - return stralloc2("pipe() fails: ", strerror(errno)); + return stralloc2(_("pipe() fails: "), strerror(errno)); } if ((ruserok_pid = fork()) < 0) { - return stralloc2("fork() fails: ", strerror(errno)); + return stralloc2(_("fork() fails: "), strerror(errno)); } else if (ruserok_pid == 0) { int ec; close(fd[0]); fError = fdopen(fd[1], "w"); if (!fError) { - error("Can't fdopen: %s", strerror(errno)); + error(_("Can't fdopen: %s"), strerror(errno)); /*NOTREACHED*/ } /* pamper braindead ruserok's */ if (chdir(pwd->pw_dir) != 0) { - fprintf(fError, "chdir(%s) failed: %s", + g_fprintf(fError, _("chdir(%s) failed: %s"), pwd->pw_dir, strerror(errno)); fclose(fError); exit(1); @@ -2043,13 +2000,11 @@ check_user_ruserok( if (debug_auth >= 9) { char *dir = stralloc(pwd->pw_dir); - auth_debug(9, ("%s: bsd: calling ruserok(%s, %d, %s, %s)\n", - debug_prefix_time(NULL), host, - ((myuid == 0) ? 1 : 0), remoteuser, pwd->pw_name)); + auth_debug(9, _("bsd: calling ruserok(%s, %d, %s, %s)\n"), host, + ((myuid == 0) ? 1 : 0), remoteuser, pwd->pw_name); if (myuid == 0) { - auth_debug(9, ("%s: bsd: because you are running as root, ", - debug_prefix_time(NULL))); - auth_debug(9, ("/etc/hosts.equiv will not be used\n")); + auth_debug(9, _("bsd: because you are running as root, ")); + auth_debug(9, _("/etc/hosts.equiv will not be used\n")); } else { show_stat_info("/etc/hosts.equiv", NULL); } @@ -2060,8 +2015,7 @@ check_user_ruserok( saved_stderr = dup(2); close(2); if (open("/dev/null", O_RDWR) == -1) { - auth_debug(1, ("%s: Could not open /dev/null: %s\n", - debug_prefix_time(NULL), strerror(errno))); + auth_debug(1, _("Could not open /dev/null: %s\n"), strerror(errno)); ec = 1; } else { ok = ruserok(host, myuid == 0, remoteuser, CLIENT_LOGIN); @@ -2078,7 +2032,7 @@ check_user_ruserok( close(fd[1]); fError = fdopen(fd[0], "r"); if (!fError) { - error("Can't fdopen: %s", strerror(errno)); + error(_("Can't fdopen: %s"), strerror(errno)); /*NOTREACHED*/ } @@ -2102,19 +2056,15 @@ check_user_ruserok( while (pid != ruserok_pid) { if ((pid == (pid_t) -1) && (errno != EINTR)) { amfree(result); - return stralloc2("ruserok wait failed: %s", strerror(errno)); + return vstrallocf(_("ruserok wait failed: %s"), strerror(errno)); } pid = wait(&exitcode); } - if (WIFSIGNALED(exitcode)) { + if (!WIFEXITED(exitcode) || WEXITSTATUS(exitcode) != 0) { amfree(result); - snprintf(number, SIZEOF(number), "%d", WTERMSIG(exitcode)); - return stralloc2("ruserok child got signal ", number); - } - if (WEXITSTATUS(exitcode) == 0) { + result = str_exit_status("ruserok child", exitcode); + } else { amfree(result); - } else if (result == NULL) { - result = stralloc("ruserok failed"); } return result; @@ -2122,12 +2072,12 @@ check_user_ruserok( /* * Check to see if a user is allowed in. This version uses .amandahosts - * Returns -1 on failure, or 0 on success. + * Returns an error message on failure, or NULL on success. */ char * check_user_amandahosts( const char * host, - struct sockaddr_storage *addr, + sockaddr_union *addr, struct passwd * pwd, const char * remoteuser, const char * service) @@ -2140,8 +2090,6 @@ check_user_amandahosts( FILE *fp = NULL; int found; struct stat sbuf; - char n1[NUM_STR_SIZE]; - char n2[NUM_STR_SIZE]; int hostmatch; int usermatch; char *aservice = NULL; @@ -2151,16 +2099,16 @@ check_user_amandahosts( char ipstr[INET_ADDRSTRLEN]; #endif - auth_debug(1, ("check_user_amandahosts(host=%s, pwd=%p, " - "remoteuser=%s, service=%s)\n", - host, pwd, remoteuser, service)); + auth_debug(1, _("check_user_amandahosts(host=%s, pwd=%p, " + "remoteuser=%s, service=%s)\n"), + host, pwd, remoteuser, service); ptmp = stralloc2(pwd->pw_dir, "/.amandahosts"); if (debug_auth >= 9) { show_stat_info(ptmp, "");; } if ((fp = fopen(ptmp, "r")) == NULL) { - result = vstralloc("cannot open ", ptmp, ": ", strerror(errno), NULL); + result = vstrallocf(_("cannot open %s: %s"), ptmp, strerror(errno)); amfree(ptmp); return result; } @@ -2170,21 +2118,16 @@ check_user_amandahosts( * have any group/other access allowed. */ if (fstat(fileno(fp), &sbuf) != 0) { - result = vstralloc("cannot fstat ", ptmp, ": ", strerror(errno), NULL); + result = vstrallocf(_("cannot fstat %s: %s"), ptmp, strerror(errno)); goto common_exit; } if (sbuf.st_uid != pwd->pw_uid) { - snprintf(n1, SIZEOF(n1), "%ld", (long)sbuf.st_uid); - snprintf(n2, SIZEOF(n2), "%ld", (long)pwd->pw_uid); - result = vstralloc(ptmp, ": ", - "owned by id ", n1, - ", should be ", n2, - NULL); + result = vstrallocf(_("%s: owned by id %ld, should be %ld"), + ptmp, (long)sbuf.st_uid, (long)pwd->pw_uid); goto common_exit; } if ((sbuf.st_mode & 077) != 0) { - result = stralloc2(ptmp, - ": incorrect permissions; file must be accessible only by its owner"); + result = vstrallocf(_("%s: incorrect permissions; file must be accessible only by its owner"), ptmp); goto common_exit; } @@ -2198,8 +2141,7 @@ check_user_amandahosts( continue; } - auth_debug(9, ("%s: bsd: processing line: <%s>\n", - debug_prefix_time(NULL), line)); + auth_debug(9, _("bsd: processing line: <%s>\n"), line); /* get the host out of the file */ if ((filehost = strtok(line, " \t")) == NULL) { amfree(line); @@ -2218,26 +2160,24 @@ check_user_amandahosts( (strcasecmp(filehost, "localhost")== 0 || strcasecmp(filehost, "localhost.localdomain")== 0)) { #ifdef WORKING_IPV6 - if (addr->ss_family == (sa_family_t)AF_INET6) - inet_ntop(AF_INET6, &((struct sockaddr_in6 *)addr)->sin6_addr, + if (SU_GET_FAMILY(addr) == (sa_family_t)AF_INET6) + inet_ntop(AF_INET6, &addr->sin6.sin6_addr, ipstr, sizeof(ipstr)); else #endif - inet_ntop(AF_INET, &((struct sockaddr_in *)addr)->sin_addr, + inet_ntop(AF_INET, &addr->sin.sin_addr, ipstr, sizeof(ipstr)); if (strcmp(ipstr, "127.0.0.1") == 0 || strcmp(ipstr, "::1") == 0) hostmatch = 1; } usermatch = (strcasecmp(fileuser, remoteuser) == 0); - auth_debug(9, ("%s: bsd: comparing \"%s\" with\n", - debug_prefix_time(NULL), filehost)); - auth_debug(9, ("%s: bsd: \"%s\" (%s)\n", host, - debug_prefix_time(NULL), hostmatch ? "match" : "no match")); - auth_debug(9, ("%s: bsd: and \"%s\" with\n", - fileuser, debug_prefix_time(NULL))); - auth_debug(9, ("%s: bsd: \"%s\" (%s)\n", remoteuser, - debug_prefix_time(NULL), usermatch ? "match" : "no match")); + auth_debug(9, _("bsd: comparing \"%s\" with\n"), filehost); + auth_debug(9, _("bsd: \"%s\" (%s)\n"), host, + hostmatch ? _("match") : _("no match")); + auth_debug(9, _("bsd: and \"%s\" with\n"), fileuser); + auth_debug(9, _("bsd: \"%s\" (%s)\n"), remoteuser, + usermatch ? _("match") : _("no match")); /* compare */ if (!hostmatch || !usermatch) { amfree(line); @@ -2297,18 +2237,15 @@ check_user_amandahosts( if (! found) { if (strcmp(service, "amindexd") == 0 || strcmp(service, "amidxtaped") == 0) { - result = vstralloc("Please add \"amindexd amidxtaped\" to " - "the line in ", ptmp, " on the client", NULL); + result = vstrallocf(_("Please add the line \"%s %s amindexd amidxtaped\" to %s on the client"), host, remoteuser, ptmp); } else if (strcmp(service, "amdump") == 0 || strcmp(service, "noop") == 0 || strcmp(service, "selfcheck") == 0 || strcmp(service, "sendsize") == 0 || strcmp(service, "sendbackup") == 0) { - result = vstralloc("Please add \"amdump\" to the line in ", - ptmp, " on the client", NULL); + result = vstrallocf(_("Please add the line \"%s %s amdump\" to %s on the client"), host, remoteuser, ptmp); } else { - result = vstralloc(ptmp, ": ", - "invalid service ", service, NULL); + result = vstrallocf(_("%s: invalid service %s"), ptmp, service); } } @@ -2323,7 +2260,7 @@ common_exit: /* return 1 on success, 0 on failure */ int check_security( - struct sockaddr_storage *addr, + sockaddr_union *addr, char * str, unsigned long cksum, char ** errstr) @@ -2342,17 +2279,17 @@ check_security( (void)cksum; /* Quiet unused parameter warning */ auth_debug(1, - ("%s: check_security(addr=%p, str='%s', cksum=%lu, errstr=%p\n", - debug_prefix_time(NULL), addr, str, cksum, errstr)); + _("check_security(addr=%p, str='%s', cksum=%lu, errstr=%p\n"), + addr, str, cksum, errstr); dump_sockaddr(addr); *errstr = NULL; /* what host is making the request? */ if ((result = getnameinfo((struct sockaddr *)addr, SS_LEN(addr), - hostname, NI_MAXHOST, NULL, 0, 0) != 0)) { - dbprintf(("%s: getnameinfo failed: %s\n", - debug_prefix_time(NULL), gai_strerror(result))); + hostname, NI_MAXHOST, NULL, 0, 0)) != 0) { + dbprintf(_("getnameinfo failed: %s\n"), + gai_strerror(result)); *errstr = vstralloc("[", "addr ", str_sockaddr(addr), ": ", "getnameinfo failed: ", gai_strerror(result), "]", NULL); @@ -2365,16 +2302,12 @@ check_security( return 0; } + /* next, make sure the remote port is a "reserved" one */ - port = SS_GET_PORT(addr); + port = SU_GET_PORT(addr); if (port >= IPPORT_RESERVED) { - char number[NUM_STR_SIZE]; - - snprintf(number, SIZEOF(number), "%u", (unsigned int)port); - *errstr = vstralloc("[", - "host ", remotehost, ": ", - "port ", number, " not secure", - "]", NULL); + *errstr = vstrallocf(_("[host %s: port %u not secure]"), + remotehost, (unsigned int)port); amfree(remotehost); return 0; } @@ -2384,10 +2317,7 @@ check_security( s = str; ch = *s++; - bad_bsd = vstralloc("[", - "host ", remotehost, ": ", - "bad bsd security line", - "]", NULL); + bad_bsd = vstrallocf(_("[host %s: bad bsd security line]"), remotehost); if (strncmp_const_skip(s - 1, "USER ", s, ch) != 0) { *errstr = bad_bsd; @@ -2414,10 +2344,10 @@ check_security( myuid = getuid(); if ((pwptr = getpwuid(myuid)) == NULL) - error("error [getpwuid(%d) fails]", myuid); + error(_("error [getpwuid(%d) fails]"), (int)myuid); - auth_debug(1, ("%s: bsd security: remote host %s user %s local user %s\n", - debug_prefix_time(NULL), remotehost, remoteuser, pwptr->pw_name)); + auth_debug(1, _("bsd security: remote host %s user %s local user %s\n"), + remotehost, remoteuser, pwptr->pw_name); #ifndef USE_AMANDAHOSTS s = check_user_ruserok(remotehost, pwptr, remoteuser); @@ -2426,10 +2356,8 @@ check_security( #endif if (s != NULL) { - *errstr = vstralloc("[", - "access as ", pwptr->pw_name, " not allowed", - " from ", remoteuser, "@", remotehost, - ": ", s, "]", NULL); + *errstr = vstrallocf(_("[access as %s not allowed from %s@%s: %s]"), + pwptr->pw_name, remoteuser, remotehost, s); } amfree(s); amfree(remotehost); @@ -2459,8 +2387,7 @@ net_writev( if (n < 0) { if (errno != EINTR) return (-1); - auth_debug(1, ("%s: net_writev got EINTR\n", - debug_prefix_time(NULL))); + auth_debug(1, _("net_writev got EINTR\n")); } else if (n == 0) { errno = EIO; @@ -2473,7 +2400,7 @@ net_writev( */ for (; n > 0; iovcnt--, iov++) { /* 'delta' is the bytes written from this iovec */ - delta = ((size_t)n < iov->iov_len) ? n : (ssize_t)iov->iov_len; + delta = ((size_t)n < (size_t)iov->iov_len) ? n : (ssize_t)iov->iov_len; /* subtract from the total num bytes written */ n -= delta; assert(n >= 0); @@ -2503,28 +2430,23 @@ net_read( ssize_t nread; size_t size = origsize; - auth_debug(1, ("%s: net_read: begin " SIZE_T_FMT "\n", - debug_prefix_time(NULL), origsize)); + auth_debug(1, _("net_read: begin %zu\n"), origsize); while (size > 0) { - auth_debug(1, ("%s: net_read: while " SIZE_T_FMT "\n", - debug_prefix_time(NULL), size)); + auth_debug(1, _("net_read: while %zu\n"), size); nread = net_read_fillbuf(fd, timeout, buf, size); if (nread < 0) { - auth_debug(1, ("%s: db: net_read: end return(-1)\n", - debug_prefix_time(NULL))); + auth_debug(1, _("db: net_read: end return(-1)\n")); return (-1); } if (nread == 0) { - auth_debug(1, ("%s: net_read: end return(0)\n", - debug_prefix_time(NULL))); + auth_debug(1, _("net_read: end return(0)\n")); return (0); } buf += nread; size -= nread; } - auth_debug(1, ("%s: net_read: end " SIZE_T_FMT "\n", - debug_prefix_time(NULL), origsize)); + auth_debug(1, _("net_read: end %zu\n"), origsize); return ((ssize_t)origsize); } @@ -2542,7 +2464,7 @@ net_read_fillbuf( struct timeval tv; ssize_t nread; - auth_debug(1, ("%s: net_read_fillbuf: begin\n", debug_prefix_time(NULL))); + auth_debug(1, _("net_read_fillbuf: begin\n")); FD_ZERO(&readfds); FD_SET(fd, &readfds); tv.tv_sec = timeout; @@ -2552,25 +2474,21 @@ net_read_fillbuf( errno = ETIMEDOUT; /* FALLTHROUGH */ case -1: - auth_debug(1, ("%s: net_read_fillbuf: case -1\n", - debug_prefix_time(NULL))); + auth_debug(1, _("net_read_fillbuf: case -1\n")); return (-1); case 1: - auth_debug(1, ("%s: net_read_fillbuf: case 1\n", - debug_prefix_time(NULL))); + auth_debug(1, _("net_read_fillbuf: case 1\n")); assert(FD_ISSET(fd, &readfds)); break; default: - auth_debug(1, ("%s: net_read_fillbuf: case default\n", - debug_prefix_time(NULL))); + auth_debug(1, _("net_read_fillbuf: case default\n")); assert(0); break; } nread = read(fd, buf, size); if (nread < 0) return (-1); - auth_debug(1, ("%s: net_read_fillbuf: end " SSIZE_T_FMT "\n", - debug_prefix_time(NULL), nread)); + auth_debug(1, _("net_read_fillbuf: end %zd\n"), nread); return (nread); } @@ -2586,36 +2504,59 @@ show_stat_info( { char *name = vstralloc(a, b, NULL); struct stat sbuf; - struct passwd *pwptr; + struct passwd *pwptr G_GNUC_UNUSED; + struct passwd pw G_GNUC_UNUSED; char *owner; - struct group *grptr; + struct group *grptr G_GNUC_UNUSED; + struct group gr G_GNUC_UNUSED; char *group; + int buflen G_GNUC_UNUSED; + char *buf G_GNUC_UNUSED; if (stat(name, &sbuf) != 0) { - auth_debug(1, ("%s: bsd: cannot stat %s: %s\n", - debug_prefix_time(NULL), name, strerror(errno))); + auth_debug(1, _("bsd: cannot stat %s: %s\n"), name, strerror(errno)); amfree(name); return; } - if ((pwptr = getpwuid(sbuf.st_uid)) == NULL) { - owner = alloc(NUM_STR_SIZE + 1); - snprintf(owner, NUM_STR_SIZE, "%ld", (long)sbuf.st_uid); - } else { + +#ifdef _SC_GETPW_R_SIZE_MAX + buflen = sysconf(_SC_GETPW_R_SIZE_MAX); + if (buflen == -1) + buflen = 1024; +#else + buflen = 1024; +#endif + buf = malloc(buflen); + +#ifdef HAVE_GETPWUID_R + if (getpwuid_r(sbuf.st_uid, &pw, buf, buflen, &pwptr) == 0 && + pwptr != NULL) { owner = stralloc(pwptr->pw_name); + } else +#endif + { + owner = alloc(NUM_STR_SIZE + 1); + g_snprintf(owner, NUM_STR_SIZE, "%ld", (long)sbuf.st_uid); } - if ((grptr = getgrgid(sbuf.st_gid)) == NULL) { - group = alloc(NUM_STR_SIZE + 1); - snprintf(owner, NUM_STR_SIZE, "%ld", (long)sbuf.st_gid); - } else { +#ifdef HAVE_GETGRGID_R + if (getgrgid_r(sbuf.st_gid, &gr, buf, buflen, &grptr) == 0 && + grptr != NULL) { group = stralloc(grptr->gr_name); + } else +#endif + { + group = alloc(NUM_STR_SIZE + 1); + g_snprintf(group, NUM_STR_SIZE, "%ld", (long)sbuf.st_gid); } - auth_debug(1, ("%s: bsd: processing file: %s\n", debug_prefix_time(NULL), name)); - auth_debug(1, ("%s: bsd: owner=%s group=%s mode=%03o\n", - debug_prefix_time(NULL), owner, group, - (int) (sbuf.st_mode & 0777))); + + auth_debug(1, _("bsd: processing file: %s\n"), name); + auth_debug(1, _("bsd: owner=%s group=%s mode=%03o\n"), + owner, group, + (int) (sbuf.st_mode & 0777)); amfree(name); amfree(owner); amfree(group); + amfree(buf); } int @@ -2624,118 +2565,50 @@ check_name_give_sockaddr( struct sockaddr *addr, char **errstr) { - struct addrinfo *res = NULL, *res1; - struct addrinfo hints; int result; + struct addrinfo *res = NULL, *res1; + char *canonname; -#ifdef WORKING_IPV6 - if ((addr)->sa_family == AF_INET6) - hints.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ALL; - else -#endif - hints.ai_flags = AI_CANONNAME; - hints.ai_family = addr->sa_family; - hints.ai_socktype = 0; - hints.ai_protocol = 0; - hints.ai_addrlen = 0; - hints.ai_addr = NULL; - hints.ai_canonname = NULL; - hints.ai_next = NULL; - result = getaddrinfo(hostname, NULL, &hints, &res); + result = resolve_hostname(hostname, 0, &res, &canonname); if (result != 0) { - dbprintf(("check_name_give_sockaddr: getaddrinfo(%s): %s\n", hostname, gai_strerror(result))); - *errstr = newvstralloc(*errstr, - " getaddrinfo(", hostname, "): ", - gai_strerror(result), NULL); - return -1; + dbprintf(_("check_name_give_sockaddr: resolve_hostname('%s'): %s\n"), hostname, gai_strerror(result)); + *errstr = newvstrallocf(*errstr, + _("check_name_give_sockaddr: resolve_hostname('%s'): %s"), + hostname, gai_strerror(result)); + goto error; } - if (res->ai_canonname == NULL) { - dbprintf(("getaddrinfo(%s) did not return a canonical name\n", hostname)); - *errstr = newvstralloc(*errstr, - " getaddrinfo(", hostname, ") did not return a canonical name", NULL); - return -1; + if (canonname == NULL) { + dbprintf(_("resolve_hostname('%s') did not return a canonical name\n"), hostname); + *errstr = newvstrallocf(*errstr, + _("check_name_give_sockaddr: resolve_hostname('%s') did not return a canonical name"), + hostname); + goto error; } - if (strncasecmp(hostname, res->ai_canonname, strlen(hostname)) != 0) { - auth_debug(1, ("%s: %s doesn't resolve to itself, it resolves to %s\n", - debug_prefix_time(NULL), - hostname, res->ai_canonname)); - *errstr = newvstralloc(*errstr, hostname, - _(" doesn't resolve to itself, it resolves to "), - res->ai_canonname, NULL); - return -1; + if (strncasecmp(hostname, canonname, strlen(hostname)) != 0) { + dbprintf(_("%s doesn't resolve to itself, it resolves to %s\n"), + hostname, canonname); + *errstr = newvstrallocf(*errstr, + _("%s doesn't resolve to itself, it resolves to %s"), + hostname, canonname); + goto error; } for(res1=res; res1 != NULL; res1 = res1->ai_next) { - if (res1->ai_addr->sa_family == addr->sa_family) { - if (cmp_sockaddr((struct sockaddr_storage *)res1->ai_addr, (struct sockaddr_storage *)addr, 1) == 0) { - freeaddrinfo(res); - return 0; - } + if (cmp_sockaddr((sockaddr_union *)res1->ai_addr, (sockaddr_union *)addr, 1) == 0) { + freeaddrinfo(res); + amfree(canonname); + return 0; } } - *errstr = newvstralloc(*errstr, - str_sockaddr((struct sockaddr_storage *)addr), - " doesn't resolve to ", - hostname, NULL); - freeaddrinfo(res); + dbprintf(_("%s doesn't resolve to %s"), + hostname, str_sockaddr((sockaddr_union *)addr)); + *errstr = newvstrallocf(*errstr, + "%s doesn't resolve to %s", + hostname, str_sockaddr((sockaddr_union *)addr)); +error: + if (res) freeaddrinfo(res); + amfree(canonname); return -1; } - - -int -check_addrinfo_give_name( - struct addrinfo *res, - const char *hostname, - char **errstr) -{ - if (strncasecmp(hostname, res->ai_canonname, strlen(hostname)) != 0) { - dbprintf(("%s: %s doesn't resolve to itself, it resolv to %s\n", - debug_prefix_time(NULL), - hostname, res->ai_canonname)); - *errstr = newvstralloc(*errstr, hostname, - " doesn't resolve to itself, it resolv to ", - res->ai_canonname, NULL); - return -1; - } - - return 0; -} - -/* Try resolving the hostname, just to catch any potential - * problems down the road. This is used from most security_connect - * methods, many of which also want the canonical name. Returns - * 0 on success. - */ -int -try_resolving_hostname( - const char *hostname, - char **canonname) -{ - struct addrinfo hints; - struct addrinfo *gaires; - int res; - -#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; - if ((res = getaddrinfo(hostname, NULL, &hints, &gaires)) != 0) { - return -1; - } - if (canonname && gaires && gaires->ai_canonname) - *canonname = stralloc(gaires->ai_canonname); - if (gaires) freeaddrinfo(gaires); - - return 0; -} diff --git a/common-src/security-util.h b/common-src/security-util.h index 9b2dcc4..22accfc 100644 --- a/common-src/security-util.h +++ b/common-src/security-util.h @@ -39,9 +39,9 @@ #include "security.h" #include "event.h" -#define auth_debug(i,x) do { \ +#define auth_debug(i, ...) do { \ if ((i) <= debug_auth) { \ - dbprintf(x); \ + dbprintf(__VA_ARGS__); \ } \ } while (0) @@ -76,13 +76,15 @@ struct tcp_conn { int refcnt; /* number of handles using */ int handle; /* last proto handle read */ void (*accept_fn)(security_handle_t *, pkt_t *); - struct sockaddr_storage peer; + sockaddr_union peer; TAILQ_ENTRY(tcp_conn) tq; /* queue handle */ int (*recv_security_ok)(struct sec_handle *, pkt_t *); char * (*prefix_packet)(void *, pkt_t *); int toclose; int donotclose; int auth; + char * (*conf_fn)(char *, void *); + void * datap; #ifdef KRB5_SECURITY gss_ctx_id_t gss_context; #endif @@ -107,7 +109,7 @@ struct sec_handle { } fn; void * arg; /* argument to pass function */ event_handle_t * ev_timeout; /* timeout handle for recv */ - struct sockaddr_storage peer; + sockaddr_union peer; int sequence; event_id_t event_id; char * proto_handle; @@ -163,7 +165,7 @@ extern struct connq_s connq; typedef struct udp_handle { const struct security_driver *driver; /* MUST be first */ dgram_t dgram; /* datagram to read/write from */ - struct sockaddr_storage peer; /* who sent it to us */ + sockaddr_union peer; /* who sent it to us */ pkt_t pkt; /* parsed form of dgram */ char *handle; /* handle from recvd packet */ int sequence; /* seq no of packet */ @@ -206,8 +208,11 @@ typedef struct udp_handle { int sec_stream_auth(void *); int sec_stream_id(void *); -void sec_accept(const security_driver_t *, int, int, - void (*)(security_handle_t *, pkt_t *)); +void sec_accept(const security_driver_t *, + char *(*)(char *, void *), + int, int, + void (*)(security_handle_t *, pkt_t *), + void *); void sec_close(void *); void sec_connect_callback(void *); void sec_connect_timeout(void *); @@ -250,7 +255,7 @@ void udp_recvpkt_cancel(void *); void udp_recvpkt_callback(void *); void udp_recvpkt_timeout(void *); int udp_inithandle(udp_handle_t *, struct sec_handle *, char *hostname, - struct sockaddr_storage *, in_port_t, char *, int); + sockaddr_union *, in_port_t, char *, int); void udp_netfd_read_callback(void *); struct tcp_conn *sec_tcp_conn_get(const char *, int); @@ -265,7 +270,7 @@ char * check_user_ruserok (const char *host, struct passwd *pwd, const char *user); char * check_user_amandahosts(const char *host, - struct sockaddr_storage *addr, + sockaddr_union *addr, struct passwd *pwd, const char *user, const char *service); @@ -276,9 +281,5 @@ ssize_t net_read_fillbuf(int, int, void *, size_t); void show_stat_info(char *a, char *b); int check_name_give_sockaddr(const char *hostname, struct sockaddr *addr, char **errstr); -int check_addrinfo_give_name(struct addrinfo *res, const char *hostname, - char **errstr); -int try_resolving_hostname(const char *hostname, - char **cannonname); #endif /* _SECURITY_INFO_H */ diff --git a/common-src/security.c b/common-src/security.c index 4ee8eb7..54c6b99 100644 --- a/common-src/security.c +++ b/common-src/security.c @@ -55,6 +55,7 @@ extern const security_driver_t bsdtcp_security_driver; #ifdef BSDUDP_SECURITY extern const security_driver_t bsdudp_security_driver; #endif +extern const security_driver_t local_security_driver; static const security_driver_t *drivers[] = { #ifdef BSD_SECURITY @@ -78,6 +79,7 @@ static const security_driver_t *drivers[] = { #ifdef BSDUDP_SECURITY &bsdudp_security_driver, #endif + &local_security_driver, }; #define NDRIVERS (size_t)(sizeof(drivers) / sizeof(drivers[0])) @@ -94,13 +96,12 @@ security_getdriver( for (i = 0; i < NDRIVERS; i++) { if (strcasecmp(name, drivers[i]->name) == 0) { - dbprintf(("%s: security_getdriver(name=%s) returns %p\n", - debug_prefix_time(NULL), name, drivers[i])); + dbprintf(_("security_getdriver(name=%s) returns %p\n"), + name, drivers[i]); return (drivers[i]); } } - dbprintf(("%s: security_getdriver(name=%s) returns NULL\n", - debug_prefix_time(NULL), name)); + dbprintf(_("security_getdriver(name=%s) returns NULL\n"), name); return (NULL); } @@ -112,35 +113,35 @@ security_handleinit( security_handle_t * handle, const security_driver_t * driver) { - dbprintf(("%s: security_handleinit(handle=%p, driver=%p (%s))\n", - debug_prefix_time(NULL), handle, driver, driver->name)); + dbprintf(_("security_handleinit(handle=%p, driver=%p (%s))\n"), + handle, driver, driver->name); handle->driver = driver; - handle->error = stralloc("unknown protocol error"); + handle->error = stralloc(_("unknown protocol error")); } printf_arglist_function1(void security_seterror, security_handle_t *, handle, const char *, fmt) { - static char buf[256]; + static char buf[1024]; va_list argp; assert(handle->error != NULL); arglist_start(argp, fmt); - vsnprintf(buf, SIZEOF(buf), fmt, argp); + g_vsnprintf(buf, SIZEOF(buf), fmt, argp); arglist_end(argp); handle->error = newstralloc(handle->error, buf); - dbprintf(("%s: security_seterror(handle=%p, driver=%p (%s) error=%s)\n", - debug_prefix_time(NULL), handle, handle->driver, - handle->driver->name, handle->error)); + dbprintf(_("security_seterror(handle=%p, driver=%p (%s) error=%s)\n"), + handle, handle->driver, + handle->driver->name, handle->error); } void security_close( security_handle_t * handle) { - dbprintf(("%s: security_close(handle=%p, driver=%p (%s))\n", - debug_prefix_time(NULL), handle, handle->driver, - handle->driver->name)); + dbprintf(_("security_close(handle=%p, driver=%p (%s))\n"), + handle, handle->driver, + handle->driver->name); amfree(handle->error); (*handle->driver->close)(handle); } @@ -153,33 +154,31 @@ security_streaminit( security_stream_t * stream, const security_driver_t * driver) { - dbprintf(("%s: security_streaminit(stream=%p, driver=%p (%s))\n", - debug_prefix_time(NULL), stream, driver, driver->name)); + dbprintf(_("security_streaminit(stream=%p, driver=%p (%s))\n"), + stream, driver, driver->name); stream->driver = driver; - stream->error = stralloc("unknown stream error"); + stream->error = stralloc(_("unknown stream error")); } printf_arglist_function1(void security_stream_seterror, security_stream_t *, stream, const char *, fmt) { - static char buf[256]; + static char buf[1024]; va_list argp; arglist_start(argp, fmt); - vsnprintf(buf, SIZEOF(buf), fmt, argp); + g_vsnprintf(buf, SIZEOF(buf), fmt, argp); arglist_end(argp); stream->error = newstralloc(stream->error, buf); - dbprintf(("%s: security_stream_seterr(%p, %s)\n", - debug_prefix_time(NULL), stream, stream->error)); + dbprintf(_("security_stream_seterr(%p, %s)\n"), stream, stream->error); } void security_stream_close( security_stream_t * stream) { - dbprintf(("%s: security_stream_close(%p)\n", - debug_prefix_time(NULL), stream)); + dbprintf(_("security_stream_close(%p)\n"), stream); amfree(stream->error); (*stream->driver->stream_close)(stream); } diff --git a/common-src/security.h b/common-src/security.h index 59b2bbf..1e327f9 100644 --- a/common-src/security.h +++ b/common-src/security.h @@ -66,8 +66,11 @@ typedef struct security_driver { * This form sets up a callback that returns new handles as * they are received. It takes an input and output file descriptor. */ - void (*accept)(const struct security_driver *, int, int, - void (*)(struct security_handle *, pkt_t *)); + void (*accept)(const struct security_driver *, + char *(*)(char *, void *), + int, int, + void (*)(struct security_handle *, pkt_t *), + void *); /* * Frees up handles allocated by the previous @@ -188,20 +191,25 @@ void security_streaminit(security_stream_t *, const security_driver_t *); /* const char *security_geterror(security_handle_t *); */ #define security_geterror(handle) ((handle)->error) void security_seterror(security_handle_t *, const char *, ...) - __attribute__ ((format (printf, 2, 3))); + G_GNUC_PRINTF(2,3); -/* void security_connect(const security_driver_t *, const char *, - void (*)(void *, security_handle_t *, security_status_t), void *, void *); */ +/* void security_connect(const security_driver_t *, const char *, + char *(*)(char *, void *), + void (*)(void *, security_handle_t *, security_status_t), + void *, + void *); */ #define security_connect(driver, hostname, conf_fn, fn, arg, datap) \ (*(driver)->connect)(hostname, conf_fn, fn, arg, datap) -/* void security_accept(const security_driver_t *, int, int, - void (*)(security_handle_t *, pkt_t *)); */ -#define security_accept(driver, in, out, fn) \ - (*(driver)->accept)(driver, in, out, fn) + +/* void security_accept(const security_driver_t *, + char *(*)(char *, void *), int, int, + void (*)(security_handle_t *, pkt_t *), void *); */ +#define security_accept(driver, conf_fn, in, out, fn, datap) \ + (*(driver)->accept)(driver, conf_fn, in, out, fn, datap) void security_close(security_handle_t *); -/* int security_sendpkt(security_handle_t *, const pkt_t *); */ +/* ssize_t security_sendpkt(security_handle_t *, const pkt_t *); */ #define security_sendpkt(handle, pkt) \ (*(handle)->driver->sendpkt)(handle, pkt) @@ -217,7 +225,7 @@ void security_close(security_handle_t *); /* const char *security_stream_geterror(security_stream_t *); */ #define security_stream_geterror(stream) ((stream)->error) void security_stream_seterror(security_stream_t *, const char *, ...) - __attribute__ ((format (printf, 2, 3))); + G_GNUC_PRINTF(2,3); /* security_stream_t *security_stream_server(security_handle_t *); */ #define security_stream_server(handle) \ diff --git a/common-src/ssh-security.c b/common-src/ssh-security.c index 3736927..45a55e4 100644 --- a/common-src/ssh-security.c +++ b/common-src/ssh-security.c @@ -43,8 +43,6 @@ #include "stream.h" #include "version.h" -#ifdef SSH_SECURITY - /* * Number of seconds ssh has to start up */ @@ -114,10 +112,7 @@ ssh_connect( assert(fn != NULL); assert(hostname != NULL); - (void)conf_fn; /* Quiet unused parameter warning */ - - auth_debug(1, ("%s: ssh: ssh_connect: %s\n", debug_prefix_time(NULL), - hostname)); + auth_debug(1, "ssh_connect: %s\n", hostname); rh = alloc(SIZEOF(*rh)); security_handleinit(&rh->sech, &ssh_security_driver); @@ -127,13 +122,15 @@ ssh_connect( rh->rc = NULL; rh->hostname = NULL; - if (try_resolving_hostname(hostname, &rh->hostname)) { + if (resolve_hostname(hostname, 0, NULL, &rh->hostname) || rh->hostname == NULL) { security_seterror(&rh->sech, - "%s: ssh could not resolve hostname", hostname); + _("%s: ssh could not resolve hostname"), hostname); (*fn)(arg, &rh->sech, S_ERROR); return; } rh->rs = tcpma_stream_client(rh, newhandle++); + rh->rc->conf_fn = conf_fn; + rh->rc->datap = datap; if (rh->rs == NULL) goto error; @@ -153,7 +150,7 @@ ssh_connect( } if(rh->rc->read == -1) { if (runssh(rh->rs->rc, amandad_path, client_username, ssh_keys) < 0) { - security_seterror(&rh->sech, "can't connect to %s: %s", + security_seterror(&rh->sech, _("can't connect to %s: %s"), hostname, rh->rs->rc->errmsg); goto error; } @@ -200,13 +197,13 @@ runssh( memset(rpipe, -1, SIZEOF(rpipe)); memset(wpipe, -1, SIZEOF(wpipe)); if (pipe(rpipe) < 0 || pipe(wpipe) < 0) { - rc->errmsg = newvstralloc(rc->errmsg, "pipe: ", strerror(errno), NULL); + rc->errmsg = newvstrallocf(rc->errmsg, _("pipe: %s"), strerror(errno)); return (-1); } switch (rc->pid = fork()) { case -1: - rc->errmsg = newvstralloc(rc->errmsg, "fork: ", strerror(errno), NULL); + rc->errmsg = newvstrallocf(rc->errmsg, _("fork: %s"), strerror(errno)); aclose(rpipe[0]); aclose(rpipe[1]); aclose(wpipe[0]); @@ -227,7 +224,7 @@ runssh( safe_fd(-1, 0); if(!xamandad_path || strlen(xamandad_path) <= 1) - xamandad_path = vstralloc(libexecdir, "/", "amandad", + xamandad_path = vstralloc(amlibexecdir, "/", "amandad", versionsuffix(), NULL); if(!xclient_username || strlen(xclient_username) <= 1) xclient_username = CLIENT_LOGIN; @@ -246,5 +243,3 @@ runssh( /* should never go here, shut up compiler warning */ return(-1); } - -#endif /* SSH_SECURITY */ diff --git a/common-src/statfs.c b/common-src/statfs.c deleted file mode 100644 index 6f3e26a..0000000 --- a/common-src/statfs.c +++ /dev/null @@ -1,214 +0,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: statfs.c,v 1.16 2006/08/24 17:05:35 martinea Exp $ - * - * a generic statfs-like routine - */ -#include "amanda.h" -#include "statfs.h" - -/* - * You are in a maze of twisty passages, all alike. - * Begin retching now. - */ - -#ifdef STATFS_ULTRIX -# include -# include -# define STATFS_STRUCT struct fs_data -# define STATFS_TOTAL(buf) (buf).fd_btot -# define STATFS_AVAIL(buf) (buf).fd_bfreen -# define STATFS_FREE(buf) (buf).fd_bfree -# define STATFS_FILES(buf) (buf).fd_gtot -# define STATFS_FAVAIL(buf) (buf).fd_gfree -# define STATFS_FFREE(buf) (buf).fd_gfree -# define STATFS_SCALE(buf) 1024 -# define STATFS(path, buffer) statfs(path, &buffer) -#else -# if defined(HAVE_SYS_STATVFS_H) && !defined(STATFS_SCO_OS5) -/* -** System V.4 (STATFS_SVR4) -*/ -# include -# define STATFS_TYP "SVR4 (Irix-5+, Solaris-2, Linux glibc 2.1)" -# define STATFS_STRUCT struct statvfs -# define STATFS_TOTAL(buf) (buf).f_blocks -# define STATFS_AVAIL(buf) (buf).f_bavail -# define STATFS_FREE(buf) (buf).f_bfree -# define STATFS_FILES(buf) (buf).f_files -# define STATFS_FAVAIL(buf) (buf).f_favail -# define STATFS_FFREE(buf) (buf).f_ffree -# define STATFS_SCALE(buf) ((buf).f_frsize?(buf).f_frsize:(buf).f_bsize) -# define STATFS(path, buffer) statvfs(path, &buffer) -# else -# if HAVE_SYS_VFS_H -/* -** (STATFS_AIX, STATFS_VFS, STATFS_NEXT) -*/ -# ifdef HAVE_SYS_STATFS_H /* AIX */ -# include -# endif -# include -# define STATFS_TYP "Posix (NeXTstep, AIX, Linux, HP-UX)" -# define STATFS_STRUCT struct statfs -# define STATFS_TOTAL(buf) (buf).f_blocks -# define STATFS_AVAIL(buf) (buf).f_bavail -# define STATFS_FREE(buf) (buf).f_bfree -# define STATFS_FILES(buf) (buf).f_files -# define STATFS_FAVAIL(buf) (buf).f_ffree -# define STATFS_FFREE(buf) (buf).f_ffree -# define STATFS_SCALE(buf) (buf).f_bsize -# define STATFS(path, buffer) statfs(path, &buffer) -# else -# if HAVE_SYS_STATFS_H -/* -** System V.3 (STATFS_SVR3) -*/ -# include -# define STATFS_TYP "SVR3 (Irix-3, Irix-4)" -# define STATFS_STRUCT struct statfs -# define STATFS_TOTAL(buf) (buf).f_blocks -# define STATFS_AVAIL(buf) (buf).f_bfree -# define STATFS_FREE(buf) (buf).f_bfree -# define STATFS_FILES(buf) (buf).f_files -# define STATFS_FAVAIL(buf) (buf).f_ffree -# define STATFS_FFREE(buf) (buf).f_ffree -# define STATFS_SCALE(buf) (buf).f_bsize -# define STATFS(path, buffer) statfs(path, &buffer, SIZEOF(STATFS_STRUCT), 0) -# else -# if HAVE_SYS_MOUNT_H -/* -** BSD (STATFS_BSD43, STATFS_BSD44) -*/ -# ifdef HAVE_SYS_PARAM_H /* BSD-4.4 */ -# include -# endif -# include -# define STATFS_TYP "BSD43/44" -# define STATFS_STRUCT struct statfs -# define STATFS_TOTAL(buf) (buf).f_blocks -# define STATFS_AVAIL(buf) (buf).f_bavail -# define STATFS_FREE(buf) (buf).f_bfree -# define STATFS_FILES(buf) (buf).f_files -# define STATFS_FAVAIL(buf) (buf).f_ffree -# define STATFS_FFREE(buf) (buf).f_ffree -# define STATFS_SCALE(buf) (buf).f_bsize -# define STATFS(path, buffer) statfs(path, &buffer) -# ifdef STATFS_OSF1 -# define STATFS(path, buffer) statfs(path, &buffer, SIZEOF(STATFS_STRUCT)) -# endif -# endif -# endif -# endif -# endif -#endif - - -off_t scale(off_t r, off_t s); - -off_t -scale( - off_t r, - off_t s) -{ - if (r == (off_t)-1) - return (off_t)-1; - if (s % 1024 == 0) - return r*(s/(off_t)1024); - return (off_t)(r*((double)s/1024.0)); -} - -int -get_fs_stats( - char * dir, - generic_fs_stats_t *sp) -{ - STATFS_STRUCT statbuf; - - if(STATFS(dir, statbuf) == -1) - return -1; - - /* total, avail, free: converted to kbytes, rounded down */ - - sp->total = scale((off_t)STATFS_TOTAL(statbuf), - (off_t)STATFS_SCALE(statbuf)); - sp->avail = scale((off_t)STATFS_AVAIL(statbuf), - (off_t)STATFS_SCALE(statbuf)); - sp->free = scale((off_t)STATFS_FREE(statbuf), - (off_t)STATFS_SCALE(statbuf)); - - /* inode stats */ - - sp->files = (off_t)STATFS_FILES(statbuf); - sp->favail = (off_t)STATFS_FAVAIL(statbuf); - sp->ffree = (off_t)STATFS_FFREE(statbuf); - - return 0; -} - -#ifdef TEST -/* ----- test scaffolding ----- */ - -int -main( - int argc, - char ** argv) -{ - generic_fs_stats_t statbuf; - - safe_fd(-1, 0); - - set_pname(argv[0]); - - dbopen(NULL); - - if(argc < 2) { - fprintf(stderr, "Usage: %s files ...\n", get_pname()); - return 1; - } - - printf("statfs (%s)\n",STATFS_TYP); - printf( -"name total free avail files ffree favail\n" - ); - printf( -"---------------------------- -------- -------- -------- ------- ------- -------\n" - ); - - do { - argc--,argv++; - if(get_fs_stats(*argv, &statbuf) == -1) { - perror(*argv); - continue; - } - printf("%-28.28s %8ld %8ld %8ld %7ld %7ld %7ld\n", *argv, - statbuf.total, statbuf.free, statbuf.avail, - statbuf.files, statbuf.ffree, statbuf.favail); - } while(argc > 1); - return 0; -} -#endif diff --git a/common-src/statfs.h b/common-src/statfs.h deleted file mode 100644 index 7252e8f..0000000 --- a/common-src/statfs.h +++ /dev/null @@ -1,48 +0,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: statfs.h,v 1.4 2006/05/25 01:47:12 johnfranks Exp $ - * - * interface to statfs module - */ -#ifndef STATFS_H -#define STATFS_H - -#include "amanda.h" - -typedef struct generic_fs_stats { - off_t total; /* total KB in filesystem */ - off_t avail; /* KB available to non-superuser */ - off_t free; /* KB free for superuser */ - - off_t files; /* total # of files in filesystem */ - off_t favail; /* # files avail for non-superuser */ - off_t ffree; /* # files free for superuser */ -} generic_fs_stats_t; - -int get_fs_stats(char *dir, generic_fs_stats_t *sp); - -#endif /* !STATFS_H */ diff --git a/common-src/stream.c b/common-src/stream.c index b7925e9..d9504fc 100644 --- a/common-src/stream.c +++ b/common-src/stream.c @@ -35,6 +35,7 @@ #include "util.h" #include "conffile.h" #include "security-util.h" +#include "sockaddr-util.h" /* local functions */ static void try_socksize(int sock, int which, size_t size); @@ -44,26 +45,32 @@ static int stream_client_internal(const char *hostname, in_port_t port, int stream_server( + int family, in_port_t *portp, size_t sendsize, size_t recvsize, int priv) { int server_socket, retries; - socklen_t len; + socklen_t_equiv len; #if defined(SO_KEEPALIVE) || defined(USE_REUSEADDR) const int on = 1; int r; #endif - struct sockaddr_storage server; + sockaddr_union server; int save_errno; int *portrange; - socklen_t socklen; + socklen_t_equiv socklen; int socket_family; *portp = USHRT_MAX; /* in case we error exit */ - socket_family = AF_NATIVE; - server_socket = socket(AF_NATIVE, SOCK_STREAM, 0); + if (family == -1) { + socket_family = AF_NATIVE; + } else { + socket_family = family; + } + server_socket = socket(socket_family, SOCK_STREAM, 0); + #ifdef WORKING_IPV6 /* if that address family actually isn't supported, just try AF_INET */ if (server_socket == -1 && errno == EAFNOSUPPORT) { @@ -73,9 +80,8 @@ stream_server( #endif if (server_socket == -1) { save_errno = errno; - dbprintf(("%s: stream_server: socket() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("stream_server: socket() failed: %s\n"), + strerror(save_errno)); errno = save_errno; return -1; } @@ -83,23 +89,21 @@ stream_server( aclose(server_socket); errno = EMFILE; /* out of range */ save_errno = errno; - dbprintf(("%s: stream_server: socket out of range: %d\n", - debug_prefix_time(NULL), - server_socket)); + dbprintf(_("stream_server: socket out of range: %d\n"), + server_socket); errno = save_errno; return -1; } - SS_INIT(&server, socket_family); - SS_SET_INADDR_ANY(&server); + SU_INIT(&server, socket_family); + SU_SET_INADDR_ANY(&server); #ifdef USE_REUSEADDR r = setsockopt(server_socket, SOL_SOCKET, SO_REUSEADDR, - (void *)&on, (socklen_t)sizeof(on)); + (void *)&on, (socklen_t_equiv)sizeof(on)); if (r < 0) { - dbprintf(("%s: stream_server: setsockopt(SO_REUSEADDR) failed: %s\n", - debug_prefix_time(NULL), - strerror(errno))); + dbprintf(_("stream_server: setsockopt(SO_REUSEADDR) failed: %s\n"), + strerror(errno)); } #endif @@ -128,29 +132,27 @@ stream_server( if (bind_portrange(server_socket, &server, (in_port_t)portrange[0], (in_port_t)portrange[1], "tcp") == 0) goto out; - dbprintf(("%s: stream_server: Could not bind to port in range: %d - %d.\n", - debug_prefix_time(NULL), portrange[0], portrange[1])); + dbprintf(_("stream_server: Could not bind to port in range: %d - %d.\n"), + portrange[0], portrange[1]); } else { socklen = SS_LEN(&server); if (bind(server_socket, (struct sockaddr *)&server, socklen) == 0) goto out; - dbprintf(("%s: stream_server: Could not bind to any port: %s\n", - debug_prefix_time(NULL), strerror(errno))); + dbprintf(_("stream_server: Could not bind to any port: %s\n"), + strerror(errno)); } if (retries >= BIND_CYCLE_RETRIES) break; - dbprintf(("%s: stream_server: Retrying entire range after 10 second delay.\n", - debug_prefix_time(NULL))); + dbprintf(_("stream_server: Retrying entire range after 10 second delay.\n")); sleep(15); } save_errno = errno; - dbprintf(("%s: stream_server: bind(in6addr_any) failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("stream_server: bind(in6addr_any) failed: %s\n"), + strerror(save_errno)); aclose(server_socket); errno = save_errno; return -1; @@ -163,9 +165,8 @@ out: len = SIZEOF(server); if(getsockname(server_socket, (struct sockaddr *)&server, &len) == -1) { save_errno = errno; - dbprintf(("%s: stream_server: getsockname() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("stream_server: getsockname() failed: %s\n"), + strerror(save_errno)); aclose(server_socket); errno = save_errno; return -1; @@ -173,22 +174,20 @@ out: #ifdef SO_KEEPALIVE r = setsockopt(server_socket, SOL_SOCKET, SO_KEEPALIVE, - (void *)&on, (socklen_t)sizeof(on)); + (void *)&on, (socklen_t_equiv)sizeof(on)); if(r == -1) { save_errno = errno; - dbprintf(("%s: stream_server: setsockopt(SO_KEEPALIVE) failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("stream_server: setsockopt(SO_KEEPALIVE) failed: %s\n"), + strerror(save_errno)); aclose(server_socket); errno = save_errno; return -1; } #endif - *portp = SS_GET_PORT(&server); - dbprintf(("%s: stream_server: waiting for connection: %s\n", - debug_prefix_time(NULL), - str_sockaddr(&server))); + *portp = SU_GET_PORT(&server); + dbprintf(_("stream_server: waiting for connection: %s\n"), + str_sockaddr(&server)); return server_socket; } @@ -202,75 +201,66 @@ stream_client_internal( int nonblock, int priv) { - struct sockaddr_storage svaddr, claddr; + sockaddr_union svaddr, claddr; int save_errno; char *f; int client_socket; int *portrange; int result; - struct addrinfo hints; - struct addrinfo *res = NULL; + struct addrinfo *res, *res_addr; f = priv ? "stream_client_privileged" : "stream_client"; -#ifdef WORKING_IPV6 - hints.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ALL; - hints.ai_family = (sa_family_t)AF_UNSPEC; -#else - hints.ai_flags = AI_CANONNAME; - hints.ai_family = (sa_family_t)AF_INET; -#endif - hints.ai_socktype = SOCK_DGRAM; - hints.ai_protocol = IPPROTO_UDP; - hints.ai_addrlen = 0; - hints.ai_addr = NULL; - hints.ai_canonname = NULL; - hints.ai_next = NULL; - result = getaddrinfo(hostname, NULL, &hints, &res); -#ifdef WORKING_IPV6 + result = resolve_hostname(hostname, SOCK_STREAM, &res, NULL); if(result != 0) { - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_UNSPEC; - result = getaddrinfo(hostname, NULL, &hints, &res); + dbprintf(_("resolve_hostname(%s): %s\n"), hostname, gai_strerror(result)); + errno = EHOSTUNREACH; + return -1; } -#endif - if(result != 0) { - dbprintf(("getaddrinfo: %s\n", gai_strerror(result))); + if(!res) { + dbprintf(_("resolve_hostname(%s): no results\n"), hostname); + errno = EHOSTUNREACH; return -1; } - memcpy(&svaddr, res->ai_addr, (size_t)res->ai_addrlen); - freeaddrinfo(res); - SS_SET_PORT(&svaddr, port); + for (res_addr = res; res_addr != NULL; res_addr = res_addr->ai_next) { + /* copy the first (preferred) address we found */ + copy_sockaddr(&svaddr, (sockaddr_union *)res_addr->ai_addr); + SU_SET_PORT(&svaddr, port); - SS_INIT(&claddr, svaddr.ss_family); - SS_SET_INADDR_ANY(&claddr); + SU_INIT(&claddr, SU_GET_FAMILY(&svaddr)); + SU_SET_INADDR_ANY(&claddr); - /* - * If a privileged port range was requested, we try to get a port in - * that range first and fail if it is not available. Next, we try - * to get a port in the range built in when Amanda was configured. - * If that fails, we just go for any port. - * - * It is up to the caller to make sure we have the proper permissions - * to get the desired port, and to make sure we return a port that - * is within the range it requires. - */ - if (priv) { - portrange = getconf_intrange(CNF_RESERVED_TCP_PORT); - } else { - portrange = getconf_intrange(CNF_UNRESERVED_TCP_PORT); + /* + * If a privileged port range was requested, we try to get a port in + * that range first and fail if it is not available. Next, we try + * to get a port in the range built in when Amanda was configured. + * If that fails, we just go for any port. + * + * It is up to the caller to make sure we have the proper permissions + * to get the desired port, and to make sure we return a port that + * is within the range it requires. + */ + if (priv) { + portrange = getconf_intrange(CNF_RESERVED_TCP_PORT); + } else { + portrange = getconf_intrange(CNF_UNRESERVED_TCP_PORT); + } + client_socket = connect_portrange(&claddr, (in_port_t)portrange[0], + (in_port_t)portrange[1], + "tcp", &svaddr, nonblock); + save_errno = errno; + if (client_socket > 0) + break; } - client_socket = connect_portrange(&claddr, (in_port_t)portrange[0], - (in_port_t)portrange[1], - "tcp", &svaddr, nonblock); - save_errno = errno; + + freeaddrinfo(res); if (client_socket > 0) goto out; - dbprintf(("%s: stream_client: Could not bind to port in range %d-%d.\n", - debug_prefix_time(NULL), portrange[0], portrange[1])); + dbprintf(_("stream_client: Could not bind to port in range %d-%d.\n"), + portrange[0], portrange[1]); errno = save_errno; return -1; @@ -279,7 +269,7 @@ out: try_socksize(client_socket, SO_SNDBUF, sendsize); try_socksize(client_socket, SO_RCVBUF, recvsize); if (localport != NULL) - *localport = SS_GET_PORT(&claddr); + *localport = SU_GET_PORT(&claddr); return client_socket; } @@ -320,8 +310,8 @@ stream_client( } /* don't care about these values */ -static struct sockaddr_storage addr; -static socklen_t addrlen; +static sockaddr_union addr; +static socklen_t_equiv addrlen; int stream_accept( @@ -350,14 +340,13 @@ stream_accept( if(nfound <= 0 || !FD_ISSET(server_socket, &readset)) { save_errno = errno; if(nfound < 0) { - dbprintf(("%s: stream_accept: select() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("stream_accept: select() failed: %s\n"), + strerror(save_errno)); } else if(nfound == 0) { - dbprintf(("%s: stream_accept: timeout after %d second%s\n", - debug_prefix_time(NULL), - timeout, - (timeout == 1) ? "" : "s")); + dbprintf(plural(_("stream_accept: timeout after %d second\n"), + _("stream_accept: timeout after %d seconds\n"), + timeout), + timeout); errno = ENOENT; /* ??? */ return -1; } else if (!FD_ISSET(server_socket, &readset)) { @@ -365,10 +354,9 @@ stream_accept( for(i = 0; i < server_socket + 1; i++) { if(FD_ISSET(i, &readset)) { - dbprintf(("%s: stream_accept: got fd %d instead of %d\n", - debug_prefix_time(NULL), + dbprintf(_("stream_accept: got fd %d instead of %d\n"), i, - server_socket)); + server_socket); } } save_errno = EBADF; @@ -381,56 +369,52 @@ stream_accept( } while (nfound <= 0); while(1) { - addrlen = (socklen_t)sizeof(struct sockaddr_storage); + addrlen = (socklen_t_equiv)sizeof(sockaddr_union); connected_socket = accept(server_socket, (struct sockaddr *)&addr, &addrlen); if(connected_socket < 0) { break; } - dbprintf(("%s: stream_accept: connection from %s\n", - debug_prefix_time(NULL), - str_sockaddr(&addr))); + dbprintf(_("stream_accept: connection from %s\n"), + str_sockaddr(&addr)); /* * Make certain we got an inet connection and that it is not * from port 20 (a favorite unauthorized entry tool). */ - if (addr.ss_family == (sa_family_t)AF_INET + if (SU_GET_FAMILY(&addr) == AF_INET #ifdef WORKING_IPV6 - || addr.ss_family == (sa_family_t)AF_INET6 + || SU_GET_FAMILY(&addr) == AF_INET6 #endif ){ - port = SS_GET_PORT(&addr); + port = SU_GET_PORT(&addr); if (port != (in_port_t)20) { try_socksize(connected_socket, SO_SNDBUF, sendsize); try_socksize(connected_socket, SO_RCVBUF, recvsize); return connected_socket; } else { - dbprintf(("%s: remote port is %u: ignored\n", - debug_prefix_time(NULL), (unsigned int)port)); + dbprintf(_("remote port is %u: ignored\n"), + (unsigned int)port); } } else { #ifdef WORKING_IPV6 - dbprintf(("%s: family is %d instead of %d(AF_INET)" - " or %d(AF_INET6): ignored\n", - debug_prefix_time(NULL), - addr.ss_family, - AF_INET, AF_INET6)); + dbprintf(_("family is %d instead of %d(AF_INET)" + " or %d(AF_INET6): ignored\n"), + SU_GET_FAMILY(&addr), + AF_INET, AF_INET6); #else - dbprintf(("%s: family is %d instead of %d(AF_INET)" - ": ignored\n", - debug_prefix_time(NULL), - addr.ss_family, - AF_INET)); + dbprintf(_("family is %d instead of %d(AF_INET)" + ": ignored\n"), + SU_GET_FAMILY(&addr), + AF_INET); #endif } aclose(connected_socket); } save_errno = errno; - dbprintf(("%s: stream_accept: accept() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("stream_accept: accept() failed: %s\n"), + strerror(save_errno)); errno = save_errno; return -1; } @@ -452,18 +436,16 @@ try_socksize( /* keep trying, get as big a buffer as possible */ while((isize > 1024) && (setsockopt(sock, SOL_SOCKET, - which, (void *) &isize, (socklen_t)sizeof(isize)) < 0)) { + which, (void *) &isize, (socklen_t_equiv)sizeof(isize)) < 0)) { isize -= 1024; } if(isize > 1024) { - dbprintf(("%s: try_socksize: %s buffer size is %d\n", - debug_prefix_time(NULL), - (which == SO_SNDBUF) ? "send" : "receive", - isize)); + dbprintf(_("try_socksize: %s buffer size is %d\n"), + (which == SO_SNDBUF) ? _("send") : _("receive"), + isize); } else { - dbprintf(("%s: try_socksize: could not allocate %s buffer of " SIZE_T_FMT "\n", - debug_prefix_time(NULL), - (which == SO_SNDBUF) ? "send" : "receive", - origsize)); + dbprintf(_("try_socksize: could not allocate %s buffer of %zu\n"), + (which == SO_SNDBUF) ? _("send") : _("receive"), + origsize); } } diff --git a/common-src/stream.h b/common-src/stream.h index eb73dd4..0eaa4b8 100644 --- a/common-src/stream.h +++ b/common-src/stream.h @@ -37,7 +37,8 @@ #define NETWORK_BLOCK_BYTES DISK_BLOCK_BYTES #define STREAM_BUFSIZE (NETWORK_BLOCK_BYTES * 2) -int stream_server(in_port_t *port, size_t sendsize, size_t recvsize, int priv); +int stream_server(int family, in_port_t *port, size_t sendsize, + size_t recvsize, int priv); int stream_accept(int sock, int timeout, size_t sendsize, size_t recvsize); int stream_client_privileged(const char *hostname, in_port_t port, diff --git a/common-src/tapelist.c b/common-src/tapelist.c index 8a47596..803ea68 100644 --- a/common-src/tapelist.c +++ b/common-src/tapelist.c @@ -45,7 +45,7 @@ num_entries( for(cur_tape = tapelist ; cur_tape ; cur_tape = cur_tape->next) count++; - dbprintf(("num_entries(tapelist=%p)=%d\n", tapelist, count)); + dbprintf("num_entries(tapelist=%p)=%d\n", tapelist, count); return(count); } @@ -57,19 +57,20 @@ dump_tapelist( int count = 0; int file; - dbprintf(("dump_tapelist(%p):\n", tapelist)); + dbprintf("dump_tapelist(%p):\n", tapelist); for(cur_tape = tapelist ; cur_tape != NULL ; cur_tape = cur_tape->next) { - dbprintf((" %p->next = %p\n", cur_tape, cur_tape->next)); - dbprintf((" %p->label = %s\n", cur_tape, cur_tape->label)); - dbprintf((" %p->isafile = %d\n", cur_tape, cur_tape->isafile)); - dbprintf((" %p->numfiles = %d\n", cur_tape, cur_tape->numfiles)); + dbprintf(" %p->next = %p\n", cur_tape, cur_tape->next); + dbprintf(" %p->label = %s\n", cur_tape, cur_tape->label); + dbprintf(" %p->isafile = %d\n", cur_tape, cur_tape->isafile); + dbprintf(" %p->numfiles = %d\n", cur_tape, cur_tape->numfiles); for (file=0; file < cur_tape->numfiles; file++) { - dbprintf((" %p->files[%d] = " OFF_T_FMT "\n", - cur_tape, file, (OFF_T_FMT_TYPE)cur_tape->files[file])); + dbprintf(" %p->files[%d] = %lld, %p->partnum[%d] = %lld\n", + cur_tape, file, (long long)cur_tape->files[file], + cur_tape, file, (long long)cur_tape->partnum[file]); } count++; } - dbprintf((" %p count = %d\n", tapelist, count)); + dbprintf(" %p count = %d\n", tapelist, count); } /* @@ -81,37 +82,46 @@ append_to_tapelist( tapelist_t *tapelist, char * label, off_t file, + int partnum, int isafile) { tapelist_t *new_tape, *cur_tape; int c; - dbprintf(("append_to_tapelist(tapelist=%p, label='%s', , file=" - OFF_T_FMT ", isafile=%d)\n", - tapelist, label, (OFF_T_FMT_TYPE)file, isafile)); + dbprintf("append_to_tapelist(tapelist=%p, label='%s', file=%lld, partnum=%d, isafile=%d)\n", + tapelist, label, (long long)file, partnum, isafile); /* see if we have this tape already, and if so just add to its file list */ for(cur_tape = tapelist; cur_tape; cur_tape = cur_tape->next) { if(strcmp(label, cur_tape->label) == 0) { int d_idx = 0; off_t *newfiles; + int *newpartnum; if(file >= (off_t)0) { newfiles = alloc(SIZEOF(*newfiles) * (cur_tape->numfiles + 1)); + newpartnum = alloc(SIZEOF(*newpartnum) * + (cur_tape->numfiles + 1)); for(c = 0; c < cur_tape->numfiles ; c++) { if(cur_tape->files[c] > file && c == d_idx) { newfiles[d_idx] = file; + newpartnum[d_idx] = partnum; d_idx++; } newfiles[d_idx] = cur_tape->files[c]; + newpartnum[d_idx] = cur_tape->partnum[c]; d_idx++; } - if(c == d_idx) + if(c == d_idx) { newfiles[d_idx] = file; + newpartnum[d_idx] = partnum; + } cur_tape->numfiles++; amfree(cur_tape->files); + amfree(cur_tape->partnum); cur_tape->files = newfiles; + cur_tape->partnum = newpartnum; } return(tapelist); } @@ -123,6 +133,8 @@ append_to_tapelist( if(file >= (off_t)0){ new_tape->files = alloc(SIZEOF(*(new_tape->files))); new_tape->files[0] = file; + new_tape->partnum = alloc(SIZEOF(*(new_tape->partnum))); + new_tape->partnum[0] = partnum; new_tape->numfiles = 1; new_tape->isafile = isafile; } @@ -227,8 +239,8 @@ marshal_tapelist( for(c = 0; c < cur_tape->numfiles ; c++){ char num_str[NUM_STR_SIZE]; - snprintf(num_str, SIZEOF(num_str), OFF_T_FMT, - (OFF_T_FMT_TYPE)cur_tape->files[c]); + g_snprintf(num_str, SIZEOF(num_str), "%lld", + (long long)cur_tape->files[c]); if (!files_str) files_str = stralloc(num_str); else @@ -282,7 +294,7 @@ unmarshal_tapelist_str( } if(*tapelist_str != '\0') tapelist_str++; - tapelist = append_to_tapelist(tapelist, temp_label, (off_t)-1, 0); + tapelist = append_to_tapelist(tapelist, temp_label, (off_t)-1, -1, 0); /* now read the list of file numbers */ while(*tapelist_str != ';' && *tapelist_str != '\0'){ @@ -298,7 +310,7 @@ unmarshal_tapelist_str( } filenum = OFF_T_ATOI(temp_filenum); - tapelist = append_to_tapelist(tapelist, temp_label, filenum, 0); + tapelist = append_to_tapelist(tapelist, temp_label, filenum, -1, 0); if(*tapelist_str != '\0' && *tapelist_str != ';') tapelist_str++; } @@ -326,6 +338,7 @@ free_tapelist( for(cur_tape = tapelist ; cur_tape ; cur_tape = cur_tape->next){ amfree(cur_tape->label); amfree(cur_tape->files); + amfree(cur_tape->partnum); amfree(prev); prev = cur_tape; } diff --git a/common-src/tapelist.h b/common-src/tapelist.h index e6b58e2..c025046 100644 --- a/common-src/tapelist.h +++ b/common-src/tapelist.h @@ -45,12 +45,13 @@ typedef struct tapelist_s { char *label; int isafile; /* set to 1 and make *label the path to the file */ off_t *files; + int *partnum; int numfiles; } tapelist_t; int num_entries(tapelist_t *tapelist); tapelist_t *append_to_tapelist(tapelist_t *tapelist, char *label, - off_t file, int isafile); + off_t file, int partnum, int isafile); char *marshal_tapelist(tapelist_t *tapelist, int escape); tapelist_t *unmarshal_tapelist_str(char *tapelist_str); char *escape_label(char *label); diff --git a/common-src/tapelist.h~HEAD b/common-src/tapelist.h~HEAD deleted file mode 100644 index e6b58e2..0000000 --- a/common-src/tapelist.h~HEAD +++ /dev/null @@ -1,61 +0,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: tapelist.h,v 1.2 2006/05/25 01:47:12 johnfranks Exp $ - * - */ - -#ifndef TAPELIST_H -#define TAPELIST_H - -#include "amanda.h" - -/* XXX This looks like a lot of other things, apart from the string - * marshalling and unmarshalling. Things like the EXTRACT_LIST in amrecover's - * innards are functionally similar, so there's probably a lot of opportunity - * to pare down extraneous code here by mushing things like that in. Rainy - * day project, perhaps. - */ - -typedef struct tapelist_s { - struct tapelist_s *next; - char *label; - int isafile; /* set to 1 and make *label the path to the file */ - off_t *files; - int numfiles; -} tapelist_t; - -int num_entries(tapelist_t *tapelist); -tapelist_t *append_to_tapelist(tapelist_t *tapelist, char *label, - off_t file, int isafile); -char *marshal_tapelist(tapelist_t *tapelist, int escape); -tapelist_t *unmarshal_tapelist_str(char *tapelist_str); -char *escape_label(char *label); -char *unescape_label(char *label); -void free_tapelist(tapelist_t *tapelist); -void dump_tapelist(tapelist_t *); - -#endif /* !TAPELIST_H */ diff --git a/common-src/token.c b/common-src/token.c index 5dd8569..6489da3 100644 --- a/common-src/token.c +++ b/common-src/token.c @@ -135,7 +135,7 @@ printf_arglist_function(char *squotef, char *, format) /* Format the token */ arglist_start(argp, format); - vsnprintf(linebuf, SIZEOF(linebuf), format, argp); + g_vsnprintf(linebuf, SIZEOF(linebuf), format, argp); arglist_end(argp); return quote(" ", linebuf); @@ -149,7 +149,7 @@ printf_arglist_function1(char *quotef, char *, sep, char *, format) /* Format the token */ arglist_start(argp, format); - vsnprintf(linebuf, SIZEOF(linebuf), format, argp); + g_vsnprintf(linebuf, SIZEOF(linebuf), format, argp); arglist_end(argp); return quote(sep, linebuf); @@ -415,8 +415,19 @@ main( char *sr; int i; + /* + * 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); + setlocale(LC_ALL, "C"); + /* shut up compiler */ argc = argc; argv = argv; @@ -430,36 +441,38 @@ main( erroutput_type = ERR_INTERACTIVE; - printf("Testing split() with \" \" token separator\n"); + g_printf(_("Testing split() with \" \" token separator\n")); while(1) { - printf("Input string: "); + g_printf(_("Input string: ")); amfree(str); if ((str = agets(stdin)) == NULL) { - printf("\n"); + g_printf("\n"); break; } r = split(str, t, 20, " "); - printf("%d token%s:\n", r, (r == 1) ? "" : "s"); - for (i=0; i <= r; i++) printf("tok[%d] = \"%s\"\n", i, t[i]); + g_printf(plural(_("%d token:\n"), _("%d token:\n"), r), r); + for (i=0; i <= r; i++) + g_printf("tok[%d] = \"%s\"\n", i, t[i]); } amfree(str); - printf("\n"); + g_printf("\n"); - printf("Testing quote()\n"); + g_printf(_("Testing quote()\n")); while(1) { - printf("Input string: "); + g_printf(_("Input string: ")); amfree(str); if ((str = agets(stdin)) == NULL) { - printf("\n"); + g_printf("\n"); break; } sr = squote(str); - printf("Quoted = \"%s\"\n", sr); + g_printf(_("Quoted = \"%s\"\n"), sr); strncpy(str,sr,SIZEOF(str)-1); str[SIZEOF(str)-1] = '\0'; r = split(str, t, 20, " "); - if (r != 1) printf("split()=%d!\n", r); - printf("Unquoted = \"%s\"\n", t[1]); + if (r != 1) + g_printf("split()=%d!\n", r); + g_printf(_("Unquoted = \"%s\"\n"), t[1]); amfree(sr); } amfree(str); diff --git a/common-src/token.h b/common-src/token.h index 1856cbf..4d80699 100644 --- a/common-src/token.h +++ b/common-src/token.h @@ -37,10 +37,10 @@ typedef struct {char *word; int value;} table_t; extern int split(char *str, char **token, int toklen, char *sep); extern char *squotef(char *format, ...) - __attribute__ ((format (printf, 1, 2))); + G_GNUC_PRINTF(1,2); extern char *squote(char *str); extern char *quotef(char *sep, char *format, ...) - __attribute__ ((format (printf, 2, 3))); + G_GNUC_PRINTF(2,3); extern char *quote(char *sep, char *str); extern char *rxquote(char *str); #ifndef HAVE_SHQUOTE diff --git a/common-src/util.c b/common-src/util.c index bb27cfa..c1ba9d5 100644 --- a/common-src/util.c +++ b/common-src/util.c @@ -29,20 +29,19 @@ #include "amanda.h" #include "util.h" +#include #include "arglist.h" #include "clock.h" +#include "sockaddr-util.h" +#include "conffile.h" -/*#define NET_READ_DEBUG*/ - -#ifdef NET_READ_DEBUG -#define netprintf(x) dbprintf(x) -#else -#define netprintf(x) +#ifdef HAVE_LIBCURL +#include #endif static int make_socket(sa_family_t family); -static int connect_port(struct sockaddr_storage *addrp, in_port_t port, char *proto, - struct sockaddr_storage *svaddr, int nonblock); +static int connect_port(sockaddr_union *addrp, in_port_t port, char *proto, + sockaddr_union *svaddr, int nonblock); /* * Keep calling read() until we've read buflen's worth of data, or EOF, @@ -120,9 +119,7 @@ make_socket( s = socket(family, SOCK_STREAM, 0); if (s == -1) { save_errno = errno; - dbprintf(("%s: make_socket: socket() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("make_socket: socket() failed: %s\n"), strerror(save_errno)); errno = save_errno; return -1; } @@ -136,9 +133,8 @@ make_socket( r = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); if (r < 0) { save_errno = errno; - dbprintf(("%s: stream_server: setsockopt(SO_REUSEADDR) failed: %s\n", - debug_prefix_time(NULL), - strerror(errno))); + dbprintf(_("make_socket: setsockopt(SO_REUSEADDR) failed: %s\n"), + strerror(errno)); errno = save_errno; } #endif @@ -148,9 +144,8 @@ make_socket( (void *)&on, SIZEOF(on)); if (r == -1) { save_errno = errno; - dbprintf(("%s: make_socket: setsockopt() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("make_socket: setsockopt() failed: %s\n"), + strerror(save_errno)); aclose(s); errno = save_errno; return -1; @@ -166,11 +161,11 @@ make_socket( /* return -1 on failure */ int connect_portrange( - struct sockaddr_storage *addrp, + sockaddr_union *addrp, in_port_t first_port, in_port_t last_port, char * proto, - struct sockaddr_storage *svaddr, + sockaddr_union *svaddr, int nonblock) { int s; @@ -178,6 +173,7 @@ connect_portrange( static in_port_t port_in_use[1024]; static int nb_port_in_use = 0; int i; + int save_errno = EAGAIN; assert(first_port <= last_port); /* Try a port already used */ @@ -189,6 +185,8 @@ connect_portrange( if(s > 0) { return s; } + if (errno != EAGAIN && errno != EBUSY) + save_errno = errno; } } @@ -200,13 +198,14 @@ connect_portrange( port_in_use[nb_port_in_use++] = port; return s; } + if (errno != EAGAIN && errno != EBUSY) + save_errno = errno; } - dbprintf(("%s: connect_portrange: all ports between %d and %d busy\n", - debug_prefix_time(NULL), + dbprintf(_("connect_portrange: All ports between %d and %d are busy.\n"), first_port, - last_port)); - errno = EAGAIN; + last_port); + errno = save_errno; return -1; } @@ -217,58 +216,62 @@ connect_portrange( /* return >0: this is the connected socket */ int connect_port( - struct sockaddr_storage *addrp, + sockaddr_union *addrp, in_port_t port, char * proto, - struct sockaddr_storage *svaddr, + sockaddr_union *svaddr, int nonblock) { int save_errno; struct servent * servPort; - socklen_t len; - socklen_t socklen; + socklen_t_equiv len; + socklen_t_equiv socklen; int s; servPort = getservbyport((int)htons(port), proto); if (servPort != NULL && !strstr(servPort->s_name, "amanda")) { - dbprintf(("%s: connect_port: Skip port %d: Owned by %s.\n", - debug_prefix_time(NULL), port, servPort->s_name)); + dbprintf(_("connect_port: Skip port %d: owned by %s.\n"), + port, servPort->s_name); + errno = EBUSY; return -1; } - if(servPort == NULL) - dbprintf(("%s: connect_port: Try port %d: Available - \n", - debug_prefix_time(NULL), port)); - else { - dbprintf(("%s: connect_port: Try port %d: Owned by %s - \n", - debug_prefix_time(NULL), port, servPort->s_name)); - } + if ((s = make_socket(SU_GET_FAMILY(addrp))) == -1) return -2; - if ((s = make_socket(addrp->ss_family)) == -1) return -2; - - SS_SET_PORT(addrp, port); + SU_SET_PORT(addrp, port); socklen = SS_LEN(addrp); if (bind(s, (struct sockaddr *)addrp, socklen) != 0) { save_errno = errno; aclose(s); + if(servPort == NULL) { + dbprintf(_("connect_port: Try port %d: available - %s\n"), + port, strerror(errno)); + } else { + dbprintf(_("connect_port: Try port %d: owned by %s - %s\n"), + port, servPort->s_name, strerror(errno)); + } if (save_errno != EADDRINUSE) { - dbprintf(("errno %d strerror %s\n", - errno, strerror(errno))); errno = save_errno; return -2; } + errno = save_errno; return -1; } + if(servPort == NULL) { + dbprintf(_("connect_port: Try port %d: available - Success\n"), port); + } else { + dbprintf(_("connect_port: Try port %d: owned by %s - Success\n"), + port, servPort->s_name); + } /* find out what port was actually used */ len = sizeof(*addrp); if (getsockname(s, (struct sockaddr *)addrp, &len) == -1) { save_errno = errno; - dbprintf(("%s: connect_port: getsockname() failed: %s\n", - debug_prefix_time(NULL), - strerror(save_errno))); + dbprintf(_("connect_port: getsockname() failed: %s\n"), + strerror(save_errno)); aclose(s); errno = save_errno; return -1; @@ -278,14 +281,12 @@ connect_port( fcntl(s, F_SETFL, fcntl(s, F_GETFL, 0)|O_NONBLOCK); if (connect(s, (struct sockaddr *)svaddr, SS_LEN(svaddr)) == -1 && !nonblock) { save_errno = errno; - dbprintf(("%s: connect_portrange: connect from %s failed: %s\n", - debug_prefix_time(NULL), + dbprintf(_("connect_portrange: Connect from %s failed: %s\n"), str_sockaddr(addrp), - strerror(save_errno))); - dbprintf(("%s: connect_portrange: connect to %s failed: %s\n", - debug_prefix_time(NULL), + strerror(save_errno)); + dbprintf(_("connect_portrange: connect to %s failed: %s\n"), str_sockaddr(svaddr), - strerror(save_errno))); + strerror(save_errno)); aclose(s); errno = save_errno; if (save_errno == ECONNREFUSED || @@ -297,12 +298,10 @@ connect_port( return -1; } - dbprintf(("%s: connected to %s\n", - debug_prefix_time(NULL), - str_sockaddr(svaddr))); - dbprintf(("%s: our side is %s\n", - debug_prefix_time(NULL), - str_sockaddr(addrp))); + dbprintf(_("connected to %s\n"), + str_sockaddr(svaddr)); + dbprintf(_("our side is %s\n"), + str_sockaddr(addrp)); return s; } @@ -316,16 +315,17 @@ connect_port( int bind_portrange( int s, - struct sockaddr_storage *addrp, + sockaddr_union *addrp, in_port_t first_port, in_port_t last_port, char * proto) { in_port_t port; in_port_t cnt; - socklen_t socklen; + socklen_t_equiv socklen; struct servent *servPort; const in_port_t num_ports = (in_port_t)(last_port - first_port + 1); + int save_errno = EAGAIN; assert(first_port <= last_port); @@ -343,87 +343,39 @@ bind_portrange( for (cnt = 0; cnt < num_ports; cnt++) { servPort = getservbyport((int)htons(port), proto); if ((servPort == NULL) || strstr(servPort->s_name, "amanda")) { - if (servPort == NULL) { - dbprintf(("%s: bind_portrange2: Try port %d: Available - ", - debug_prefix_time(NULL), port)); - } else { - dbprintf(("%s: bind_portrange2: Try port %d: Owned by %s - ", - debug_prefix_time(NULL), port, servPort->s_name)); - } - SS_SET_PORT(addrp, port); + SU_SET_PORT(addrp, port); socklen = SS_LEN(addrp); if (bind(s, (struct sockaddr *)addrp, socklen) >= 0) { - dbprintf(("Success\n")); + if (servPort == NULL) { + dbprintf(_("bind_portrange2: Try port %d: Available - Success\n"), port); + } else { + dbprintf(_("bind_portrange2: Try port %d: Owned by %s - Success.\n"), port, servPort->s_name); + } return 0; } - dbprintf(("%s\n", strerror(errno))); + if (errno != EAGAIN && errno != EBUSY) + save_errno = errno; + if (servPort == NULL) { + dbprintf(_("bind_portrange2: Try port %d: Available - %s\n"), + port, strerror(errno)); + } else { + dbprintf(_("bind_portrange2: Try port %d: Owned by %s - %s\n"), + port, servPort->s_name, strerror(errno)); + } } else { - dbprintf(("%s: bind_portrange2: Skip port %d: Owned by %s.\n", - debug_prefix_time(NULL), port, servPort->s_name)); + dbprintf(_("bind_portrange2: Skip port %d: Owned by %s.\n"), + port, servPort->s_name); } if (++port > last_port) port = first_port; } - dbprintf(("%s: bind_portrange: all ports between %d and %d busy\n", - debug_prefix_time(NULL), + dbprintf(_("bind_portrange: all ports between %d and %d busy\n"), first_port, - last_port)); - errno = EAGAIN; + last_port); + errno = save_errno; return -1; } -/* - * Construct a datestamp (YYYYMMDD) from a time_t. - */ -char * -construct_datestamp( - time_t *t) -{ - struct tm *tm; - char datestamp[3 * NUM_STR_SIZE]; - time_t when; - - if (t == NULL) { - when = time((time_t *)NULL); - } else { - when = *t; - } - tm = localtime(&when); - if (!tm) - return stralloc("19000101"); - - snprintf(datestamp, SIZEOF(datestamp), - "%04d%02d%02d", tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday); - return stralloc(datestamp); -} - -/* - * Construct a timestamp (YYYYMMDDHHMMSS) from a time_t. - */ -char * -construct_timestamp( - time_t *t) -{ - struct tm *tm; - char timestamp[6 * NUM_STR_SIZE]; - time_t when; - - if (t == NULL) { - when = time((time_t *)NULL); - } else { - when = *t; - } - tm = localtime(&when); - if (!tm) - return stralloc("19000101000000"); - - snprintf(timestamp, SIZEOF(timestamp), - "%04d%02d%02d%02d%02d%02d", - tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); - return stralloc(timestamp); -} - int needs_quotes( @@ -447,7 +399,7 @@ quote_string( if ((str == NULL) || (*str == '\0')) { ret = stralloc("\"\""); - } else if ((match("[\\\"[:space:][:cntrl:]]", str)) == 0) { + } else if ((match("[:\'\\\"[:space:][:cntrl:]]", str)) == 0) { /* * String does not need to be quoted since it contains * neither whitespace, control or quote characters. @@ -556,52 +508,13 @@ sanitize_string( } else { ret = stralloc(str); for (s = ret; *s != '\0'; s++) { - if (iscntrl(*s)) + if (iscntrl((int)*s)) *s = '?'; } } return (ret); } -char * -strquotedstr(void) -{ - char * tok = strtok(NULL, " "); - - if ((tok != NULL) && (tok[0] == '"')) { - char * t; - size_t len; - - len = strlen(tok); - do { - t = strtok(NULL, " "); - tok[len] = ' '; - len = strlen(tok); - } while ((t != NULL) && - (tok[len - 1] != '"') && (tok[len - 2] != '\\')); - } - return tok; -} - -ssize_t -hexdump( - const char *buffer, - size_t len) -{ - ssize_t rc = -1; - - FILE *stream = popen("od -c -x -", "w"); - - if (stream != NULL) { - fflush(stdout); - rc = (ssize_t)fwrite(buffer, len, 1, stream); - if (ferror(stream)) - rc = -1; - pclose(stream); - } - return rc; -} - /* Return 0 if the following characters are present * ( ) < > [ ] , ; : ! $ \ / " @@ -615,138 +528,6 @@ validate_mailto( return !match("\\*|<|>|\\(|\\)|\\[|\\]|,|;|:|\\\\|/|\"|\\!|\\$|\\|", mailto); } - -void -dump_sockaddr( - struct sockaddr_storage *sa) -{ -#ifdef WORKING_IPV6 - char ipstr[INET6_ADDRSTRLEN]; -#else - char ipstr[INET_ADDRSTRLEN]; -#endif - int port; - - port = SS_GET_PORT(sa); -#ifdef WORKING_IPV6 - if ( sa->ss_family == (sa_family_t)AF_INET6) { - inet_ntop(AF_INET6, &((struct sockaddr_in6 *)sa)->sin6_addr, - ipstr, sizeof(ipstr)); - dbprintf(("%s: (sockaddr_in6 *)%p = { %d, %d, %s }\n", - debug_prefix_time(NULL), sa, - ((struct sockaddr_in6 *)sa)->sin6_family, - port, - ipstr)); - } else -#endif - { - inet_ntop(AF_INET, &((struct sockaddr_in *)sa)->sin_addr, ipstr, - sizeof(ipstr)); - dbprintf(("%s: (sockaddr_in *)%p = { %d, %d, %s }\n", - debug_prefix_time(NULL), sa, - ((struct sockaddr_in *)sa)->sin_family, - port, - ipstr)); - } -} - - -#ifdef WORKING_IPV6 -static char mystr_sockaddr[INET6_ADDRSTRLEN + 20]; -#else -static char mystr_sockaddr[INET_ADDRSTRLEN + 20]; -#endif - -char * -str_sockaddr( - struct sockaddr_storage *sa) -{ -#ifdef WORKING_IPV6 - char ipstr[INET6_ADDRSTRLEN]; -#else - char ipstr[INET_ADDRSTRLEN]; -#endif - int port; - - port = SS_GET_PORT(sa); -#ifdef WORKING_IPV6 - if ( sa->ss_family == (sa_family_t)AF_INET6) { - inet_ntop(AF_INET6, &((struct sockaddr_in6 *)sa)->sin6_addr, - ipstr, sizeof(ipstr)); - } else -#endif - { - inet_ntop(AF_INET, &((struct sockaddr_in *)sa)->sin_addr, ipstr, - sizeof(ipstr)); - } - snprintf(mystr_sockaddr,sizeof(mystr_sockaddr),"%s.%d", ipstr, port); - return mystr_sockaddr; -} - - -int -cmp_sockaddr( - struct sockaddr_storage *ss1, - struct sockaddr_storage *ss2, - int addr_only) -{ - /* if addresses are v4mapped, "unmap" them */ -#ifdef WORKING_IPV6 -#ifdef IN6_IS_ADDR_V4MAPPED - struct sockaddr_in ss1_v4; - struct sockaddr_in ss2_v4; - - if (ss1->ss_family == AF_INET6 && - IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)ss1)->sin6_addr)) { - memset(&ss1_v4, 0, sizeof(struct sockaddr_in)); - memcpy(&ss1_v4.sin_addr.s_addr, - &(((struct sockaddr_in6 *)ss1)->sin6_addr.s6_addr[12]), - sizeof(struct in_addr)); - ss1_v4.sin_family = AF_INET; - SS_SET_PORT((struct sockaddr_storage *)&ss1_v4, SS_GET_PORT(ss1)); - ss1 = (struct sockaddr_storage *)&ss1_v4; - } - - if (ss2->ss_family == AF_INET6 && - IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)ss2)->sin6_addr)) { - memset(&ss2_v4, 0, sizeof(struct sockaddr_in)); - memcpy(&ss2_v4.sin_addr.s_addr, - &(((struct sockaddr_in6 *)ss2)->sin6_addr.s6_addr[12]), - sizeof(struct in_addr)); - ss2_v4.sin_family = AF_INET; - SS_SET_PORT((struct sockaddr_storage *)&ss2_v4, SS_GET_PORT(ss2)); - ss2 = (struct sockaddr_storage *)&ss2_v4; - } -#endif -#endif - - if (ss1->ss_family == ss2->ss_family) { - if (addr_only) { -#ifdef WORKING_IPV6 - if(ss1->ss_family == (sa_family_t)AF_INET6) - return memcmp( - &((struct sockaddr_in6 *)ss1)->sin6_addr, - &((struct sockaddr_in6 *)ss2)->sin6_addr, - sizeof(((struct sockaddr_in6 *)ss1)->sin6_addr)); - else -#endif - return memcmp( - &((struct sockaddr_in *)ss1)->sin_addr, - &((struct sockaddr_in *)ss2)->sin_addr, - sizeof(((struct sockaddr_in *)ss1)->sin_addr)); - } else { - return memcmp(ss1, ss2, SS_LEN(ss1)); - } - } else { - /* compare families to give a total order */ - if (ss1->ss_family < ss2->ss_family) - return -1; - else - return 1; - } -} - - int copy_file( char *dst, char *src, @@ -761,8 +542,8 @@ int copy_file( if ((infd = open(src, O_RDONLY)) == -1) { save_errno = errno; quoted = quote_string(src); - *errmsg = vstralloc("Can't open file ", quoted, " for reading: %s", - strerror(save_errno), NULL); + *errmsg = vstrallocf(_("Can't open file '%s' for reading: %s"), + quoted, strerror(save_errno)); amfree(quoted); return -1; } @@ -770,8 +551,8 @@ int copy_file( if ((outfd = open(dst, O_WRONLY|O_CREAT, 0600)) == -1) { save_errno = errno; quoted = quote_string(dst); - *errmsg = vstralloc("Can't open file ", quoted, " for writting: %s", - strerror(save_errno), NULL); + *errmsg = vstrallocf(_("Can't open file '%s' for writting: %s"), + quoted, strerror(save_errno)); amfree(quoted); close(infd); return -1; @@ -781,8 +562,8 @@ int copy_file( if(fullwrite(outfd,&buf,(size_t)nb) < nb) { save_errno = errno; quoted = quote_string(dst); - *errmsg = vstralloc("Error writing to \"", quoted, "\":", - strerror(save_errno), NULL); + *errmsg = vstrallocf(_("Error writing to '%s': %s"), + quoted, strerror(save_errno)); amfree(quoted); close(infd); close(outfd); @@ -793,8 +574,8 @@ int copy_file( if (nb < 0) { save_errno = errno; quoted = quote_string(src); - *errmsg = vstralloc("Error reading from \"", quoted, "\":", - strerror(save_errno), NULL); + *errmsg = vstrallocf(_("Error reading from '%s': %s"), + quoted, strerror(save_errno)); amfree(quoted); close(infd); close(outfd); @@ -805,16 +586,18 @@ int copy_file( close(outfd); return 0; } -#ifndef HAVE_LIBREADLINE + +#ifndef HAVE_READLINE /* - * simple readline() replacements + * simple readline() replacements, used when we don't have readline + * support from the system. */ char * readline( const char *prompt) { - printf("%s", prompt); + g_printf("%s", prompt); fflush(stdout); fflush(stderr); return agets(stdin); @@ -824,6 +607,344 @@ void add_history( const char *line) { - (void)line; /* Quite unused parameter warning */ + (void)line; /* Quiet unused parameter warning */ +} + +#endif + +/* Order of preference: readdir64(), readdir(). */ +#if HAVE_DECL_READDIR64 +# define USE_DIRENT64 +# define USE_READDIR64 +#elif HAVE_DECL_READDIR +# define USE_READDIR +#else +# error No readdir() or readdir64() available! +#endif + +char * portable_readdir(DIR* handle) { + +#ifdef USE_DIRENT64 + struct dirent64 *entry_p; +#else + struct dirent *entry_p; +#endif + + static GStaticMutex mutex = G_STATIC_MUTEX_INIT; + + g_static_mutex_lock(&mutex); + +#ifdef USE_READDIR + entry_p = readdir(handle); +#endif +#ifdef USE_READDIR64 + entry_p = readdir64(handle); +#endif + + g_static_mutex_unlock(&mutex); + + if (entry_p == NULL) + return NULL; + + /* FIXME: According to glibc documentation, d_name may not be + null-terminated in some cases on some very old platforms. Not + sure what to do about that case. */ + return strdup(entry_p->d_name); +} + +int search_directory(DIR * handle, const char * regex, + SearchDirectoryFunctor functor, gpointer user_data) { + int rval = 0; + regex_t compiled_regex; + gboolean done = FALSE; + + if (regcomp(&compiled_regex, regex, REG_EXTENDED | REG_NOSUB) != 0) { + regfree(&compiled_regex); + return -1; + } + + rewinddir(handle); + + while (!done) { + char * read_name; + int result; + read_name = portable_readdir(handle); + if (read_name == NULL) { + regfree(&compiled_regex); + return rval; + } + result = regexec(&compiled_regex, read_name, 0, NULL, 0); + if (result == 0) { + rval ++; + done = !functor(read_name, user_data); + } + amfree(read_name); + } + regfree(&compiled_regex); + return rval; +} + +char* find_regex_substring(const char* base_string, const regmatch_t match) { + char * rval; + int size; + + size = match.rm_eo - match.rm_so; + rval = malloc(size+1); + memcpy(rval, base_string + match.rm_so, size); + rval[size] = '\0'; + + return rval; +} + +int compare_possibly_null_strings(const char * a, const char * b) { + if (a == b) { + /* NULL or otherwise, they're the same. */ + return 0; + } else if (a == NULL) { + /* b != NULL */ + return -1; + } else if (b == NULL) { + /* a != NULL */ + return 1; + } else { + /* a != NULL != b */ + return strcmp(a, b); + } +} + +gboolean amanda_thread_init(void) { + gboolean success = FALSE; +#ifdef HAVE_LIBCURL + static gboolean did_curl_init = FALSE; + if (!did_curl_init) { +# ifdef G_THREADS_ENABLED + g_assert(!g_thread_supported()); +# endif + g_assert(curl_global_init(CURL_GLOBAL_ALL) == 0); + did_curl_init = TRUE; + } +#endif +#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE) + if (g_thread_supported()) { + return TRUE; + } + g_thread_init(NULL); + success = TRUE; +#endif + return success; +} + +int +resolve_hostname(const char *hostname, + int socktype, + struct addrinfo **res, + char **canonname) +{ + struct addrinfo hints; + struct addrinfo *myres; + int flags = 0; + int result; + + if (res) *res = NULL; + if (canonname) { + *canonname = NULL; + flags = AI_CANONNAME; + } + +#ifdef AI_ADDRCONFIG + flags |= AI_ADDRCONFIG; +#endif + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_flags = flags; + hints.ai_socktype = socktype; + result = getaddrinfo(hostname, NULL, &hints, &myres); + if (result != 0) { + return result; + } + + if (canonname && myres && myres->ai_canonname) { + *canonname = stralloc(myres->ai_canonname); + } + + if (res) { + *res = myres; + } else { + freeaddrinfo(myres); + } + + return result; +} + +char * +_str_exit_status( + char *subject, + amwait_t status) +{ + if (WIFEXITED(status)) { + int exitstatus = WEXITSTATUS(status); + if (exitstatus == 0) + return vstrallocf(_("%s exited normally"), subject); + else + return vstrallocf(_("%s exited with status %d"), subject, exitstatus); + } + + if (WIFSIGNALED(status)) { + int signal = WTERMSIG(status); +#ifdef WCOREDUMP + if (WCOREDUMP(status)) + return vstrallocf(_("%s exited after receiving signal %d (core dumped)"), + subject, signal); + else +#endif + return vstrallocf(_("%s exited after receiving signal %d"), + subject, signal); + } + + if (WIFSTOPPED(status)) { + int signal = WSTOPSIG(status); + return vstrallocf(_("%s stopped temporarily after receiving signal %d"), + subject, signal); + } + +#ifdef WIFCONTINUED + if (WIFCONTINUED(status)) { + return vstrallocf(_("%s was resumed"), subject); + } +#endif + + return vstrallocf(_("%s exited in unknown circumstances"), subject); +} + +void +check_running_as(running_as_flags who) +{ +#ifdef CHECK_USERID + struct passwd *pw; + uid_t uid_me; + uid_t uid_target; + char *uname_me = NULL; + char *uname_target = NULL; + char *dumpuser; + + uid_me = getuid(); + if ((pw = getpwuid(uid_me)) == NULL) { + error(_("current userid %ld not found in password database"), (long)uid_me); + /* NOTREACHED */ + } + uname_me = stralloc(pw->pw_name); + +#ifndef SINGLE_USERID + if (!(who & RUNNING_AS_UID_ONLY) && uid_me != geteuid()) { + error(_("euid (%lld) does not match uid (%lld); is this program setuid-root when it shouldn't be?"), + (long long int)geteuid(), (long long int)uid_me); + /* NOTREACHED */ + } +#endif + + switch (who & RUNNING_AS_USER_MASK) { + case RUNNING_AS_ROOT: + uid_target = 0; + uname_target = "root"; + break; + + case RUNNING_AS_DUMPUSER_PREFERRED: + dumpuser = getconf_str(CNF_DUMPUSER); + if ((pw = getpwnam(dumpuser)) != NULL && + uid_me != pw->pw_uid) { + if ((pw = getpwnam(CLIENT_LOGIN)) != NULL && + uid_me == pw->pw_uid) { + /* uid == CLIENT_LOGIN: not ideal, but OK */ + dbprintf(_("NOTE: running as '%s', which is the client" + " user, not the dumpuser ('%s'); forging" + " on anyway\n"), + CLIENT_LOGIN, dumpuser); + uid_target = uid_me; /* force success below */ + break; + } + } + /* FALLTHROUGH */ + + case RUNNING_AS_DUMPUSER: + uname_target = getconf_str(CNF_DUMPUSER); + if ((pw = getpwnam(uname_target)) == NULL) { + error(_("cannot look up dumpuser \"%s\""), uname_target); + /*NOTREACHED*/ + } + uid_target = pw->pw_uid; + break; + + case RUNNING_AS_CLIENT_LOGIN: + uname_target = CLIENT_LOGIN; + if ((pw = getpwnam(uname_target)) == NULL) { + error(_("cannot look up client user \"%s\""), uname_target); + /*NOTREACHED*/ + } + uid_target = pw->pw_uid; + break; + + default: + error(_("Unknown check_running_as() call")); + /* NOTREACHED */ + } + + if (uid_me != uid_target) { + error(_("running as user \"%s\" instead of \"%s\""), uname_me, uname_target); + /*NOTREACHED*/ + } + amfree(uname_me); + +#else + /* Quiet unused variable warning */ + (void)who; +#endif } + +int +set_root_privs(int need_root) +{ +#ifndef SINGLE_USERID + if (need_root) { + if (seteuid(0) == -1) return 0; + /* (we don't switch the group back) */ + } else { + if (geteuid() != 0) return 0; + if (seteuid(getuid()) == -1) return 0; + if (setegid(getgid()) == -1) return 0; + } +#else + (void)need_root; /* Quiet unused variable warning */ #endif + return 1; +} + +int +become_root(void) +{ +#ifndef SINGLE_USERID + if (setuid(0) == -1) return 0; +#endif + return 1; +} + +/* + * Process parameters + */ + +/* current process name */ +#define MAX_PNAME 128 +static char pname[MAX_PNAME] = "unknown"; + +void +set_pname(char *p) +{ + g_strlcpy(pname, p, sizeof(pname)); +} + +char * +get_pname(void) +{ + return pname; +} + diff --git a/common-src/util.h b/common-src/util.h index f09c87b..3a9efe7 100644 --- a/common-src/util.h +++ b/common-src/util.h @@ -32,6 +32,12 @@ #include "amanda.h" #include "sl.h" +#include +#include +#include + +#include "glib-util.h" + #define BIGINT INT_MAX #define BSTRNCMP(a,b) strncmp(a, b, strlen(b)) @@ -42,9 +48,9 @@ ssize_t fullread(int, void *, size_t); ssize_t fullwrite(int, const void *, size_t); -int connect_portrange(struct sockaddr_storage *, in_port_t, in_port_t, char *, - struct sockaddr_storage *, int); -int bind_portrange(int, struct sockaddr_storage *, in_port_t, in_port_t, +int connect_portrange(sockaddr_union *, in_port_t, in_port_t, char *, + sockaddr_union *, int); +int bind_portrange(int, sockaddr_union *, in_port_t, in_port_t, char *); char * construct_datestamp(time_t *t); @@ -55,17 +61,6 @@ char * construct_timestamp(time_t *t); int needs_quotes(const char * str); char * sanitize_string(const char *str); -char * strquotedstr(void); -ssize_t hexdump(const char *buffer, size_t bytes); -void dump_sockaddr(struct sockaddr_storage * sa); -char * str_sockaddr(struct sockaddr_storage *sa); -/* Compare two sockaddr_storage objects, optionally comparing - * only the address (and thus ignoring port, flow info, etc.). - * @returns: -1, 0, or 1 for <, ==, >, respectively - */ -int cmp_sockaddr(struct sockaddr_storage *ss1, - struct sockaddr_storage *ss2, - int addr_only); int copy_file(char *dst, char *src, char **errmsg); /* @@ -75,6 +70,176 @@ int copy_file(char *dst, char *src, char **errmsg); */ int validate_mailto(const char *mailto); -char *taperalgo2str(int taperalgo); +/* This function is a portable reimplementation of readdir(). It + * returns a newly-allocated string, that should be freed with + * free(). Returns NULL on error or end of directory. + * It is reentrant, with the following exceptions: + * - This function cannot be run at the same time as readdir() or + * readdir64(). + * - This function cannot be run simultaneously on the same directory + * handle. */ +char * portable_readdir(DIR*); + +typedef gboolean (*SearchDirectoryFunctor)(const char * filename, + gpointer user_data); +/* This function will search the given directory handle for files + matching the given POSIX extended regular expression. + For each matching file, the functor will be called with the given + user data. Stops when the functor returns FALSE, or all files have + been searched. Returns the number of matching files. */ +int search_directory(DIR * handle, const char * regex, + SearchDirectoryFunctor functor, gpointer user_data); + +/* This function extracts a substring match from a regular expression + match result, and copies it into a newly allocated string. Example + usage to get the first matched substring: + substring = find_regmatch(whole_string, pmatch[1]) + Note that pmatch[0] yields the entire matching portion of the string. */ +char* find_regex_substring(const char* base_string, const regmatch_t match); + +void free_new_argv(int new_argc, char **new_argv); + +/* Like strcmp(a, b), except that NULL strings are sorted before non-NULL + * strings, instead of segfaulting. */ +int compare_possibly_null_strings(const char * a, const char * b); + +/* Does g_thread_init(), along with anything else that should be done + * before/after thread setup. It's OK to call this function more than once. + * Returns TRUE if threads are supported. */ +gboolean amanda_thread_init(void); + +/* Given a hostname, call getaddrinfo to resolve it. Optionally get the + * entire set of results (if res is not NULL) and the canonical name of + * the host (if canonname is not NULL). The canonical name might + * expand e.g., www.domain.com to server3.webfarm.hosting.com. + * + * If not NULL, the caller is responsible for freeing res with freeaddrinfo(). + * Similarly, the caller is responsible for freeing canonname if it is + * not NULL. + * + * @param hostname: the hostname to start with + * @param res: (result) if not NULL, the results from getaddrinfo() + * @param canonname: (result) if not NULL, the canonical name of the host + * @returns: newly allocated canonical hostname, or NULL if no + * canonical hostname was available. + */ +int resolve_hostname(const char *hostname, int socktype, + struct addrinfo **res, char **canonname); + +/* Interpret a status (as returned from wait() and friends) + * into a human-readable sentence. + * + * Caller is responsible for freeing the resulting string. + * The resulting string has already been translated. + * + * The macro definition allows this to work even when amwait_t + * is 'union wait' (4.3BSD). The cast is safe because the two + * argument types are interchangeable. + * + * @param subject: subject of the sentence (program name, etc.) + * @param status: the exit status + * @returns: newly allocated string describing status + */ +#define str_exit_status(subject, status) \ + _str_exit_status((subject), *(amwait_t *)&(status)) +char *_str_exit_status(char *subject, amwait_t status); + +/* + * Userid manipulation + */ + +/* Check that the current uid and euid are set to a specific user, + * calling error() if not. Does nothing if CHECK_USERID is not + * defined. + * + * @param who: one of the RUNNING_AS_* constants, below. + */ +typedef enum { + /* userid is 0 */ + RUNNING_AS_ROOT, + + /* userid belongs to dumpuser (from config) */ + RUNNING_AS_DUMPUSER, + + /* prefer that userid belongs to dumpuser, but accept when userid belongs to + * CLIENT_LOGIN with a debug-log message (needed because amandad always runs + * as CLIENT_LOGIN, even on server) */ + RUNNING_AS_DUMPUSER_PREFERRED, + + /* userid belongs to CLIENT_LOGIN (from --with-user) */ + RUNNING_AS_CLIENT_LOGIN, + + RUNNING_AS_USER_MASK = (1 << 8) - 1, + /* '&' this on to only check the uid, not the euid; use this for programs + * that will call become_root() */ + RUNNING_AS_UID_ONLY = 1 << 8 +} running_as_flags; + +void check_running_as(running_as_flags who); + +/* Drop and regain root priviledges; used from setuid-root binaries which only + * need to be root for certain operations. Does nothing if SINGLE_USERID is + * defined. + * + * @param need_root: if true, try to assume root priviledges; otherwise, drop + * priviledges. + * @returns: true if the priviledge change succeeded + */ +int set_root_privs(int need_root); + +/* Become root completely, by setting the uid to 0. This is used by setuid-root + * apps which will exec subprocesses which will also need root priviledges. Does + * nothing if SINGLE_USERID is defined. + * + * @returns: true if the priviledge change succeeded + */ +int become_root(void); + +/* + * Process parameters + */ + +/* Set the name of the process. The parameter is copied, and remains + * the responsibility of the caller on return. This value is used in log + * messages and other output throughout Amanda. + * + * @param pname: the new process name + */ +void set_pname(char *pname); + +/* Get the current process name; the result is in a static buffer, and + * should *not* be free()d by the caller. + * + * @returns: process name + */ +char *get_pname(void); + +/* + * Readline support + * + * This either includes the system readline header we found in configure, + * or prototypes some simple stub functions that are used instead. + */ + +#ifdef HAVE_READLINE +# ifdef HAVE_READLINE_READLINE_H +# include +# ifdef HAVE_READLINE_HISTORY_H +# include +# endif +# else +# ifdef HAVE_READLINE_H +# include +# ifdef HAVE_HISTORY_H +# include +# endif +# endif +# endif +#else + +char * readline(const char *prompt); +void add_history(const char *line); + +#endif #endif /* UTIL_H */ diff --git a/common-src/version.c b/common-src/version.c deleted file mode 100644 index 4d6b862..0000000 --- a/common-src/version.c +++ /dev/null @@ -1,30 +0,0 @@ -/* version.c - generated by genversion.c - DO NOT EDIT! */ -const char * const version_info[] = { - "build: VERSION=\"Amanda-2.5.2p1\"\n", - " BUILT_DATE=\"Wed Jun 6 19:23:48 EDT 2007\"\n", - " BUILT_MACH=\"Linux kdc.localdomain 2.6.20-1.2952.fc6 #1 SMP Wed May 16 18:18:22 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux\"\n", - " CC=\"gcc\"\n", - " CONFIGURE_COMMAND=\"'./configure' '--prefix=/home/martinea/linux' '--with-configdir=/home/martinea/etc/amanda' '--with-gnutar-listdir=/var/gnutar-lists' '--with-bsd-security' '--with-bsdudp-security' '--with-bsdtcp-security' '--with-ssh-security' '--with-rsh-security' '--without-krb4-security' '--with-krb5-security' '--with-user=martinea' '--with-group=martinea' '--enable-manpage-build' '--mandir=/home/martinea/man'\"\n", - "paths: bindir=\"/home/martinea/linux/bin\"\n", - " sbindir=\"/home/martinea/linux/sbin\"\n", - " libexecdir=\"/home/martinea/linux/libexec\"\n", - " mandir=\"/home/martinea/man\" AMANDA_TMPDIR=\"/tmp/amanda\"\n", - " AMANDA_DBGDIR=\"/tmp/amanda\"\n", - " CONFIG_DIR=\"/home/martinea/etc/amanda\" DEV_PREFIX=\"/dev/\"\n", - " RDEV_PREFIX=\"/dev/\" DUMP=\"/sbin/dump\"\n", - " RESTORE=\"/sbin/restore\" VDUMP=UNDEF VRESTORE=UNDEF\n", - " XFSDUMP=UNDEF XFSRESTORE=UNDEF VXDUMP=UNDEF VXRESTORE=UNDEF\n", - " SAMBA_CLIENT=\"/usr/bin/smbclient\" GNUTAR=\"/bin/gtar\"\n", - " COMPRESS_PATH=\"/usr/bin/gzip\"\n", - " UNCOMPRESS_PATH=\"/usr/bin/gzip\" LPRCMD=\"/usr/bin/lpr\"\n", - " MAILER=\"/usr/bin/Mail\" listed_incr_dir=\"/var/gnutar-lists\"\n", - "defs: DEFAULT_SERVER=\"kdc.localdomain\"\n", - " DEFAULT_CONFIG=\"DailySet1\"\n", - " DEFAULT_TAPE_SERVER=\"kdc.localdomain\" HAVE_MMAP NEED_STRSTR\n", - " HAVE_SYSVSHM LOCKING=POSIX_FCNTL SETPGRP_VOID DEBUG_CODE\n", - " AMANDA_DEBUG_DAYS=4 BSD_SECURITY KRB5_SECURITY RSH_SECURITY\n", - " USE_AMANDAHOSTS CLIENT_LOGIN=\"martinea\" FORCE_USERID\n", - " HAVE_GZIP COMPRESS_SUFFIX=\".gz\" COMPRESS_FAST_OPT=\"--fast\"\n", - " COMPRESS_BEST_OPT=\"--best\" UNCOMPRESS_OPT=\"-dc\"\n", - 0 -}; diff --git a/common-src/version.h b/common-src/version.h index 1ee7cf9..f5b7871 100644 --- a/common-src/version.h +++ b/common-src/version.h @@ -40,10 +40,6 @@ #ifndef VERSION_H #define VERSION_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - extern const int VERSION_MAJOR; extern const int VERSION_MINOR; extern const int VERSION_PATCH; diff --git a/common-src/versuff.c b/common-src/versuff.c index 0e51292..3504b30 100644 --- a/common-src/versuff.c +++ b/common-src/versuff.c @@ -32,15 +32,15 @@ #include "version.h" const int VERSION_MAJOR = 2; -const int VERSION_MINOR = 5; -const int VERSION_PATCH = 2; -const char *const VERSION_COMMENT = "p1"; +const int VERSION_MINOR = 6; +const int VERSION_PATCH = 0; +const char *const VERSION_COMMENT = "p2"; const char * versionsuffix(void) { #ifdef USE_VERSION_SUFFIXES - return "-2.5.2p1"; + return "-2.6.0p2"; #else return ""; #endif @@ -49,5 +49,5 @@ versionsuffix(void) const char * version(void) { - return "2.5.2p1"; + return "2.6.0p2"; } diff --git a/config/Makefile.am b/config/Makefile.am index bf61cb0..6e32254 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -1,11 +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 --git a/config/Makefile.in b/config/Makefile.in index bf8205d..3f046b7 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -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. @@ -13,15 +13,11 @@ # 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 @@ 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 @@ -92,9 +160,9 @@ 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@ @@ -109,7 +177,13 @@ 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 +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,52 +220,162 @@ 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@ @@ -200,7 +383,8 @@ 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 +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 +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 +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 +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 +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 +671,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: tags: TAGS TAGS: @@ -411,22 +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 +738,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am 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 +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 +784,23 @@ ps: ps-am 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 --git a/config/acinclude.m4i b/config/acinclude.m4i deleted file mode 100644 index e8e9029..0000000 --- a/config/acinclude.m4i +++ /dev/null @@ -1,1256 +0,0 @@ -dnl Check if the compiler can handle unsigned long constants, ie 2ul. -AC_DEFUN([AMANDA_C_UNSIGNED_LONG_CONSTANTS], - [ - AC_CACHE_CHECK( - [for working unsigned long constants], - amanda_cv_c_unsigned_long_constants, - [ - AC_TRY_COMPILE( - [ - ], - [ - long l = 1ul; - ], - amanda_cv_c_unsigned_long_constants=yes, - amanda_cv_c_unsigned_long_constants=no - ) - ] - ) - if test "$amanda_cv_c_unsigned_long_constants" = yes; then - AC_DEFINE(HAVE_UNSIGNED_LONG_CONSTANTS,1,[Define if the compiler support unsigned long constants. ]) - fi - ] -) - -dnl Check for the argument type for shmat() and shmdt() -AC_DEFUN([AMANDA_FUNC_SHM_ARG_TYPE], - [ - AC_CACHE_CHECK( - [for shmdt() argument type], - amanda_cv_shmdt_arg_type, - [ - if test "$ac_cv_func_shmget" = yes; then - cat <conftest.$ac_ext -#include "confdefs.h" -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_IPC_H -# include -#endif -#ifdef HAVE_SYS_SHM_H -# include -#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 - ] - ) - AC_DEFINE_UNQUOTED(SHM_ARG_TYPE,$amanda_cv_shmdt_arg_type,[Define to type of shmget() function argument. ]) - ] -) - -dnl Figure out the select() argument type. -AC_DEFUN([AMANDA_FUNC_SELECT_ARG_TYPE], - [ - AC_CACHE_CHECK( - [for select() argument type], - amanda_cv_select_arg_type, - [ - rm -f conftest.c - cat <conftest.$ac_ext -#include "confdefs.h" -#ifdef HAVE_SYS_TIME_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#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; -} -EOF - - dnl Figure out the select argument type by first trying to - dnl compile with the fd_set argument. If the compile fails, - dnl then we know to use the int. If it suceeds, then try to - dnl use the int. If the int fails, then use fd_set. If - dnl both suceeed, then do a line count on the number of - dnl lines that the compiler spit out, assuming that the - dnl 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 -#include -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -main() { -#ifdef SO_SNDTIMEO - int sock = socket(AF_INET, SOCK_STREAM, 0); - struct timeval timeout; - timeout.tv_sec = 1; - timeout.tv_usec = 0; - return (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, - (void *)&timeout, sizeof(timeout))); -#else - return -1; -#endif -} - ], - amanda_cv_setsockopt_SO_SNDTIMEO=yes, - amanda_cv_setsockopt_SO_SNDTIMEO=no, - amanda_cv_setsockopt_SO_SNDTIMEO=no - ) - ] - ) - if test "$amanda_cv_setsockopt_SO_SNDTIMEO" = yes; then - AC_DEFINE(HAVE_SO_SNDTIMEO,1,[Define if SO_SNDTIMEO is available. ]) - fi - ] -) - -dnl Check for the one or two argument version of gettimeofday. -AC_DEFUN([AMANDA_FUNC_GETTIMEOFDAY_ARGS], - [ - AC_REQUIRE([AC_HEADER_TIME]) - AC_CACHE_CHECK( - [for gettimeofday number of arguments], - amanda_cv_gettimeofday_args, - [ - AC_TRY_COMPILE( - [ -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - ], - [ - struct timeval val; - struct timezone zone; - gettimeofday(&val, &zone); - ], - amanda_cv_gettimeofday_args=2, - amanda_cv_gettimeofday_args=1 - ) - ] - ) - if test "$amanda_cv_gettimeofday_args" = 2; then - AC_DEFINE(HAVE_TWO_ARG_GETTIMEOFDAY,1,[Define if gettimeofday takes two arguments. ]) - fi - ] -) - - - -dnl Check for if pid_t is a long, int, or short. -AC_DEFUN([AMANDA_TYPE_PID_T], - [ - AC_REQUIRE([AC_TYPE_PID_T]) - AC_CACHE_CHECK([for pid_t type], amanda_cv_pid_type, - [ - amanda_cv_pid_type=unknown - if test "$ac_cv_type_pid_t" = no; then - amanda_cv_pid_type=int - fi - for TEST_amanda_cv_pid_type in long short int; do - if test $amanda_cv_pid_type = unknown; then - AC_EGREP_CPP(typedef.*${TEST_amanda_cv_pid_type}.*pid_t, - [ -#include -#if STDC_HEADERS -#include -#include -#endif - ], - amanda_cv_pid_type=$TEST_amanda_cv_pid_type) - fi - if test $amanda_cv_pid_type = unknown; then - AC_EGREP_CPP(ZZZZ.*${TEST_amanda_cv_pid_type}, - [ -#include -#if STDC_HEADERS -#include -#include -#endif - ZZZZ pid_t - ], - amanda_cv_pid_type=$TEST_amanda_cv_pid_type) - fi - done - if test $amanda_cv_pid_type = unknown; then - amanda_cv_pid_type=int - fi - ] - ) - case $amanda_cv_pid_type in - int) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%d",[Define to printf formatting string to print a PID. ]) ;; - long) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%ld") ;; - short) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%d") ;; - esac - ] -) - -dnl -dnl -dnl ICE_CHECK_DECL (FUNCTION, HEADER-FILE...) -dnl If FUNCTION is available, define `HAVE_FUNCTION'. If it is declared -dnl in one of the headers named in the whitespace-separated list -dnl HEADER_FILE, define `HAVE_FUNCTION_DECL` (in all capitals). -dnl -AC_DEFUN([ICE_CHECK_DECL], -[ -ice_have_$1=no -AC_CHECK_FUNCS($1, ice_have_$1=yes) -if test "${ice_have_$1}" = yes; then -AC_MSG_CHECKING(for $1 declaration in $2) -AC_CACHE_VAL(ice_cv_have_$1_decl, -[ -ice_cv_have_$1_decl=no -changequote(,)dnl -ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' -ice_re_word='(^|[^a-zA-Z0-9_])' -changequote([,])dnl -for header in $2; do -# Check for ordinary declaration -AC_EGREP_HEADER([${ice_re_word}$1[ ]*\(], $header, - ice_cv_have_$1_decl=yes) -if test "$ice_cv_have_$1_decl" = yes; then - break -fi -# Check for "fixed" declaration like "getpid _PARAMS((int))" -AC_EGREP_HEADER([${ice_re_word}$1[ ]*$ice_re_params\(\(], $header, - ice_cv_have_$1_decl=yes) -if test "$ice_cv_have_$1_decl" = yes; then - break -fi -done -]) -AC_MSG_RESULT($ice_cv_have_$1_decl) -if test "$ice_cv_have_$1_decl" = yes; then -AC_DEFINE_UNQUOTED([HAVE_]translit($1,[a-z],[A-Z])[_DECL],1,[Define if $1 is declared. ]) -fi -fi -])dnl -dnl Test for the presence of , 'union wait', arg-type of 'wait()'. -dnl by T.E.Dickey" , Jim Spath -dnl -dnl FIXME: These tests should have been in autoconf 1.11! -dnl -dnl Note that we cannot simply grep for 'union wait' in the wait.h file, -dnl because some Posix systems turn this on only when a BSD variable is -dnl defined. Since I'm trying to do without special defines, I'll live -dnl with the default behavior of the include-file. -dnl -dnl I do _2_ compile checks, because we may have union-wait, but the -dnl prototype for 'wait()' may want an int. -dnl -dnl Don't use HAVE_UNION_WAIT, because the autoconf documentation implies -dnl that if we've got union-wait, we'll automatically use it. -dnl -dnl Garrett Wollman adds: -dnl The tests described above don't quite do the right thing, -dnl since some systems have hacks which allow `union wait' to -dnl still work even though `int' is preferred (and generates -dnl fewer warnings). Since all of these systems use prototypes, -dnl we can use the prototype of wait(2) to disambiguate them. -dnl -dnl Alexandre Oliva adds: -dnl A single compile check is enough. If we don't have union wait, -dnl it's obvious that the test will fail, and that we must use int. -dnl If we do, the prototype (on STDC systems) and WIFEXITED will tell -dnl whether we're supposed to be using union wait instead of int. -dnl -AC_DEFUN([CF_WAIT], -[ -AC_REQUIRE([AC_TYPE_PID_T]) -AC_HAVE_HEADERS(sys/wait.h wait.h) -AC_CACHE_CHECK([whether wait uses union wait], [cf_cv_arg_union_wait], - [AC_TRY_COMPILE([ -#include - -#if HAVE_SYS_WAIT_H -# include -#else -# if HAVE_WAIT_H -# include -# endif -#endif - -#ifdef __STDC__ -pid_t wait(union wait *); -#endif -], [ - union wait x; int i; - wait(&x); i = WIFEXITED(x) -], [cf_cv_arg_union_wait=yes], [cf_cv_arg_union_wait=no])]) -if test $cf_cv_arg_union_wait = yes; then - AC_DEFINE(WAIT_USES_UNION,1,[Defined if wait() puts the status in a union wait instead of int. ]) -fi -])dnl -AC_DEFUN([CF_WAIT_INT], -[ -AC_REQUIRE([AC_TYPE_PID_T]) -AC_HAVE_HEADERS(sys/wait.h wait.h) -AC_CACHE_CHECK([whether wait uses int], [cf_cv_arg_int], - [AC_TRY_COMPILE([ -#include - -#if HAVE_SYS_WAIT_H -# include -#else -# if HAVE_WAIT_H -# include -# endif -#endif - -#ifdef __STDC__ -pid_t wait(int *); -#endif -], [ - int x; int i; - wait(&x); i = WIFEXITED(x) -], [cf_cv_arg_int=yes], [cf_cv_arg_int=no])]) -if test $cf_cv_arg_int = yes; then - AC_DEFINE(WAIT_USES_INT,1,[Defined if wait() puts the status in a int instead of a union wait. ]) -fi -])dnl - -dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] -dnl -dnl the "ISO C9X: 7.18 Integer types " section requires the -dnl existence of an include file that defines a set of -dnl typedefs, especially uint8_t,int32_t,uintptr_t. -dnl Many older installations will not provide this file, but some will -dnl have the very same definitions in . In other enviroments -dnl we can use the inet-types in which would define the -dnl typedefs int8_t and u_int8_t respectivly. -dnl -dnl This macros will create a local "_stdint.h" or the headerfile given as -dnl an argument. In many cases that file will just "#include " -dnl or "#include ", while in other environments it will provide -dnl the set of basic 'stdint's definitions/typedefs: -dnl int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t -dnl int_least32_t.. int_fast32_t.. intmax_t -dnl which may or may not rely on the definitions of other files, -dnl or using the AC_CHECK_SIZEOF macro to determine the actual -dnl sizeof each type. -dnl -dnl if your header files require the stdint-types you will want to create an -dnl installable file mylib-int.h that all your other installable header -dnl may include. So if you have a library package named "mylib", just use -dnl AX_CREATE_STDINT_H(mylib-int.h) -dnl in configure.ac and go to install that very header file in Makefile.am -dnl along with the other headers (mylib.h) - and the mylib-specific headers -dnl can simply use "#include " to obtain the stdint-types. -dnl -dnl Remember, if the system already had a valid , the generated -dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things... -dnl -dnl @, (status: used on new platforms) (see http://ac-archive.sf.net/gstdint/) -dnl @version Id: ax_create_stdint_h.m4,v 1.5 2005/01/06 18:27:27 guidod Exp -dnl @author Guido Draheim - -AC_DEFUN([AX_CHECK_DATA_MODEL],[ - AC_CHECK_SIZEOF(char) - AC_CHECK_SIZEOF(short) - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(void*) - 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" - AC_MSG_CHECKING([data model]) - 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 - AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)]) -]) - -dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF]) -AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[ -AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ - ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h]) ; do - unset ac_cv_type_uintptr_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$1],[$1]) break - done - AC_MSG_CHECKING([for stdint uintptr_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ -AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ - ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h stdint.h]) ; do - unset ac_cv_type_uint32_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$1],[$1]) break - break; - done - AC_MSG_CHECKING([for stdint uint32_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ -AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ - ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do - unset ac_cv_type_u_int32_t - unset ac_cv_type_u_int64_t - AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$1],[$1]) break - break; - done - AC_MSG_CHECKING([for stdint u_int32_t]) - ]) -]) - -AC_DEFUN([AX_CREATE_STDINT_H], -[# ------ AX CREATE STDINT H ------------------------------------- -AC_MSG_CHECKING([for stdint types]) -ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` -# try to shortcircuit - if the default include path of the compiler -# can find a "stdint.h" header then we assume that all compilers can. -AC_CACHE_VAL([ac_cv_header_stdint_t],[ -old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" -old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" -old_CFLAGS="$CFLAGS" ; CFLAGS="" -AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], -[ac_cv_stdint_result="(assuming C99 compatible system)" - ac_cv_header_stdint_t="stdint.h"; ], -[ac_cv_header_stdint_t=""]) -CXXFLAGS="$old_CXXFLAGS" -CPPFLAGS="$old_CPPFLAGS" -CFLAGS="$old_CFLAGS" ]) - -v="... $ac_cv_header_stdint_h" -if test "$ac_stdint_h" = "stdint.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) -elif test "$ac_stdint_h" = "inttypes.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) -elif test "_$ac_cv_header_stdint_t" = "_" ; then - AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) -else - ac_cv_header_stdint="$ac_cv_header_stdint_t" - AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) -fi - -if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. - -dnl .....intro message done, now do a few system checks..... -dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, -dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW -dnl instead that is triggered with 3 or more arguments (see types.m4) - -inttype_headers=`echo $2 | sed -e 's/,/ /g'` - -ac_cv_stdint_result="(no helpful system typedefs seen)" -AX_CHECK_HEADER_STDINT_X(dnl - stdint.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") - -if test "_$ac_cv_header_stdint_x" = "_" ; then -AX_CHECK_HEADER_STDINT_O(dnl, - inttypes.h sys/inttypes.h stdint.h $inttype_headers, - ac_cv_stdint_result="(seen uint32_t$and64 in $i)") -fi - -if test "_$ac_cv_header_stdint_x" = "_" ; then -if test "_$ac_cv_header_stdint_o" = "_" ; then -AX_CHECK_HEADER_STDINT_U(dnl, - sys/types.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") -fi fi - -dnl if there was no good C99 header file, do some typedef checks... -if test "_$ac_cv_header_stdint_x" = "_" ; then - AC_MSG_CHECKING([for stdint datatype model]) - AC_MSG_RESULT([(..)]) - AX_CHECK_DATA_MODEL -fi - -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" -else - ac_cv_header_stdint="stddef.h" -fi - -AC_MSG_CHECKING([for extra inttypes in chosen header]) -AC_MSG_RESULT([($ac_cv_header_stdint)]) -dnl see if int_least and int_fast types are present in _this_ header. -unset ac_cv_type_int_least32_t -unset ac_cv_type_int_fast32_t -AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) -AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) -AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) - -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" -fi - -AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl -$ac_cv_stdint_result]) - -dnl ----------------------------------------------------------------- -# ----------------- DONE inttypes.h checks START header ------------- -AC_CONFIG_COMMANDS([$ac_stdint_h],[ -AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) -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 " >>$ac_stdint -echo "#endif" >>$ac_stdint -echo "#endif" >>$ac_stdint -else - -cat >>$ac_stdint < -#else -#include - -/* .................... configured part ............................ */ - -STDINT_EOF - -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 -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 -else -echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint -echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -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 -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 -else -echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - - cat >>$ac_stdint <= 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) */ - -dnl /* have a look at "64bit and data size neutrality" at */ -dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ -dnl /* (the shorthand "ILP" types always have a "P" part) */ - -#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. - */ - -#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 - -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 - -#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 - -/* 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 - - /* literalnumbers */ -#endif -#endif - -/* 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)) - -/* 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 - -/* 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 - AC_MSG_NOTICE([$ac_stdint_h is unchanged]) - else - ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` - AS_MKDIR_P(["$ac_dir"]) - rm -f $ac_stdint_h - mv $ac_stdint $ac_stdint_h - fi -],[# variables for create stdint.h replacement -PACKAGE="$PACKAGE" -VERSION="$VERSION" -ac_stdint_h="$ac_stdint_h" -_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) -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" -]) -]) - -# AC_PROG_XSLTPROC -# ----------------------------------------------------------------- -# Find an xsltproc executable. -# -# Input: -# $1 is the default $XSLTPROC_FLAGS, which will be overridden if the -# user specifies --with-xsltproc-flags. -# Output: -# $XSLTPROC contains the path to xsltproc, or is empty if none was -# found or the user specified --without-xsltproc. $XSLTPROC_FLAGS -# contains the flags to use with xsltproc. - -AC_DEFUN([AC_PROG_XSLTPROC], -[ -XSLTPROC_FLAGS="$1" -AC_SUBST(XSLTPROC_FLAGS) - -# The (lack of) whitespace and overquoting here are all necessary for -# proper formatting. -AC_ARG_WITH(xsltproc, -AS_HELP_STRING([--with-xsltproc[[[[[=PATH]]]]]], - [Use the xsltproc binary in in PATH.]), - [ ac_with_xsltproc=$withval; ], - [ ac_with_xsltproc=maybe; ]) - -AC_ARG_WITH(xsltproc-flags, -AS_HELP_STRING([ --with-xsltproc-flags=FLAGS], - [Flags to pass to xsltproc (default $1)]), - [ if test "x$withval" == "xno"; then - XSLTPROC_FLAGS='' - else - if test "x$withval" != "xyes"; then - XSLTPROC_FLAGS="$withval" - fi - fi - ]) - -# search for xsltproc if it wasn't specified -if test "$ac_with_xsltproc" = "yes" -o "$ac_with_xsltproc" = "maybe"; then - AC_PATH_PROGS(XSLTPROC,xsltproc,,$LOCSYSPATH) -else - if test "$ac_with_xsltproc" != "no"; then - if test -x "$ac_with_xsltproc"; then - XSLTPROC="$ac_with_xsltproc"; - else - AC_MSG_WARN([Specified xsltproc of $ac_with_xsltproc isn't]) - AC_MSG_WARN([executable; searching for an alternative.]) - AC_PATH_PROGS(XSLTPROC,xsltproc,,$LOCSYSPATH) - fi - fi -fi -]) - -# AC_CHECK_DOCBOOK_XSLT -# ----------------------------------------------------------------- -# Check for access to docbook stylesheets of a particular revision. -# This macro can be used for multiple versions within the same script. -# -# Input: -# $1 is the version of docbook to search for; default 'current' -# Output: -# $HAVE_DOCBOOK_XSLT_VERS will be set to 'yes' or 'no' depending -# on the results of the test, where VERS is $1, with '_' substituted -# for '.' $HAVE_DOCBOOK_XSLT will also be set to the same value. -AC_DEFUN([AC_CHECK_DOCBOOK_XSLT], -[ - AC_REQUIRE([AC_PROG_XSLTPROC]) - - dnl define a temporary variable for the version, so this macro can be - dnl used with multiple versions - define([_VERS], $1) - ifelse(_VERS, [], [define([_VERS], [current])]) - define([ac_cv_docbook_xslt_VERS], patsubst([ac_cv_docbook_xslt_]_VERS, [\.], [_])) - define([HAVE_DOCBOOK_XSLT_VERS], patsubst([HAVE_DOCBOOK_XSLT_]_VERS, [\.], [_])) - - AC_CACHE_CHECK([for Docbook XSLT version ]_VERS, [ac_cv_docbook_xslt_VERS], - [ - ac_cv_docbook_xslt_VERS=no - if test -n "$XSLTPROC"; then - echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/_VERS/xhtml/docbook.xsl'" >&AS_MESSAGE_LOG_FD - $XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/_VERS/xhtml/docbook.xsl >&AS_MESSAGE_LOG_FD 2>&1 - - if test "$?" = 0; then - ac_cv_docbook_xslt_VERS=yes - fi - fi - ]) - - HAVE_DOCBOOK_XSLT_VERS="$ac_cv_docbook_xslt_VERS" - HAVE_DOCBOOK_XSLT=HAVE_DOCBOOK_XSLT_VERS - undefine([_VERS]) -]) - -# AC_CHECK_DOCBOOK_DTD -# ----------------------------------------------------------------- -# Check for access to docbook DTD of a particular revision. -# This macro can be used for multiple versions within the same script. -# -# Input: -# $1 is the version of docbook to search for; default 'current' -# Output: -# $HAVE_DOCBOOK_DTD_VERS will be set to 'yes' or 'no' depending -# on the results of the test, where VERS is $1, with '_' substituted -# for '.' $HAVE_DOCBOOK_DTD will also be set to the same value. -AC_DEFUN([AC_CHECK_DOCBOOK_DTD], -[ - AC_REQUIRE([AC_PROG_XSLTPROC]) - - dnl define a temporary variable for the version, so this macro can be - dnl used with multiple versions - define([_VERS], $1) - ifelse(_VERS, [], [define([_VERS], [current])]) - define([ac_cv_docbook_dtd_VERS], patsubst([ac_cv_docbook_dtd_]_VERS, [\.], [_])) - define([HAVE_DOCBOOK_DTD_VERS], patsubst([HAVE_DOCBOOK_DTD_]_VERS, [\.], [_])) - - AC_CACHE_CHECK([for Docbook DTD version ]_VERS, [ac_cv_docbook_dtd_VERS], - [ - ac_cv_docbook_dtd_VERS=no - if test -n "$XSLTPROC"; then - MY_XSLTPROC_FLAGS=`echo "" $XSLTPROC_FLAGS|sed -e s/--novalid//g` - cat <conftest.xml - - - - -EOF - echo "Trying '$XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml'" >&AS_MESSAGE_LOG_FD - $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_VERS=yes - fi - fi - cat conftest.out >&AS_MESSAGE_LOG_FD - - rm -f conftest.xml conftest.out - fi - ]) - - HAVE_DOCBOOK_DTD_VERS="$ac_cv_docbook_dtd_VERS" - HAVE_DOCBOOK_DTD=HAVE_DOCBOOK_DTD_VERS - undefine([_VERS]) -]) -dnl -dnl Checks to see if there's a sockaddr_storage structure -dnl -dnl usage: -dnl -dnl AC_SOCKADDR_STORAGE -dnl -dnl results: -dnl -dnl HAVE_SOCKADDR_STORAGE (defined) -dnl -AC_DEFUN([AC_SOCKADDR_STORAGE], - [AC_MSG_CHECKING(if sockaddr_storage struct exists) - AC_CACHE_VAL(ac_cv_has_sockaddr_storage, - AC_TRY_COMPILE([ -# include -# include ], - [u_int i = sizeof (struct sockaddr_storage)], - ac_cv_has_sockaddr_storage=yes, - ac_cv_has_sockaddr_storage=no)) - AC_MSG_RESULT($ac_cv_has_sockaddr_storage) - if test $ac_cv_has_sockaddr_storage = yes ; then - AC_DEFINE(HAVE_SOCKADDR_STORAGE,1,[if struct sockaddr_storage exists]) - fi]) - - diff --git a/config/config.guess b/config/config.guess index f32079a..6960a39 100755 --- a/config/config.guess +++ b/config/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2008-01-23' +timestamp='2007-01-15' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -56,8 +56,8 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 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." @@ -139,6 +139,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +if [ "${UNAME_SYSTEM}" = "Linux" ] ; then + eval $set_cc_for_build + cat << EOF > $dummy.c + #include + #ifdef __UCLIBC__ + # ifdef __UCLIBC_CONFIG_VERSION__ + LIBC=uclibc __UCLIBC_CONFIG_VERSION__ + # else + LIBC=uclibc + # endif + #else + LIBC=gnu + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` +fi + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -330,7 +347,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -532,7 +549,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -791,18 +808,12 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -836,35 +847,28 @@ EOF echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo cris-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo crisv32-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo frv-unknown-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:*) eval $set_cc_for_build @@ -887,7 +891,7 @@ EOF s: ::g p }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -910,16 +914,16 @@ EOF s: ::g p }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo or32-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -932,40 +936,40 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo x86_64-unknown-linux-${LIBC} exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + xtensa:Linux:*:*) + echo xtensa-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so @@ -980,20 +984,22 @@ EOF p'` case "$ld_supported_targets" in elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" ;; a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" exit ;; coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" exit ;; esac + # This should get integrated into the C code below, but now we hack + if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -1484,9 +1490,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config/config.h.in b/config/config.h.in index 0f02920..2196c49 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -1,14 +1,8 @@ /* config/config.h.in. Generated from configure.in by autoheader. */ -/* Define this to an absolute name of . */ -#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 @@ -27,6 +21,21 @@ /* 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 @@ -36,14 +45,17 @@ /* 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 @@ /* 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 @@ /* 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 @@ -86,10 +95,6 @@ /* 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 @@ -102,9 +107,6 @@ /* 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 @@ -117,6 +119,10 @@ /* 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 @@ -126,7 +132,10 @@ /* 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 @@ -142,9 +151,6 @@ /* 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 @@ -164,12 +170,6 @@ /* 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 @@ -197,13 +197,6 @@ /* 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 @@ -213,23 +206,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_CAMLIB_H -/* Define to 1 if you have the 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 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 header file. */ #undef HAVE_CHIO_H @@ -246,17 +229,12 @@ /* Define if connect is declared. */ #undef HAVE_CONNECT_DECL -/* Define to 1 if you have the header file. */ -#undef HAVE_DBM_H +/* Define to 1 if you have the 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 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. */ @@ -278,6 +256,26 @@ 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 @@ -286,6 +284,10 @@ */ #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 header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H @@ -293,12 +295,12 @@ /* Define to 1 if you have the 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 header file. */ +#undef HAVE_DUSTAT_H + /* Define to 1 if you have the `endmntent' function. */ #undef HAVE_ENDMNTENT @@ -317,17 +319,8 @@ /* 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 header file. */ -#undef HAVE_FNMATCH_H +/* Define to 1 if you have the header file. */ +#undef HAVE_FLOAT_H /* Define to 1 if you have the `fprintf' function. */ #undef HAVE_FPRINTF @@ -368,14 +361,11 @@ /* 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 @@ -386,9 +376,6 @@ /* 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 @@ -404,8 +391,8 @@ /* 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 @@ -419,14 +406,17 @@ /* 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 header file. */ #undef HAVE_GRP_H @@ -437,14 +427,17 @@ /* Define to 1 if you have the header file. */ #undef HAVE_HISTORY_H +/* Define to 1 if you have the 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 @@ -471,18 +464,15 @@ /* Define if ioctl is declared. */ #undef HAVE_IOCTL_DECL +/* Define to 1 if you have the header file. */ +#undef HAVE_IO_H + /* Define to 1 if defines AF_INET. */ #undef HAVE_IPV4 /* Define to 1 if 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 @@ -495,8 +485,11 @@ /* 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 @@ -504,18 +497,6 @@ /* Define to 1 if you have the 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 header file. */ #undef HAVE_LIBGEN_H @@ -528,18 +509,9 @@ /* 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 @@ -549,17 +521,14 @@ /* 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 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 header file. */ +#undef HAVE_LINUX_CHIO_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_ZFTAPE_H @@ -570,9 +539,6 @@ /* 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 @@ -585,12 +551,18 @@ /* Define if lstat is declared. */ #undef HAVE_LSTAT_DECL +/* Define to 1 if you have the 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 header file. */ #undef HAVE_MATH_H @@ -609,8 +581,8 @@ /* 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 @@ -654,9 +626,6 @@ /* Define if the mtget structure has an mt_flags field */ #undef HAVE_MT_FLAGS -/* Define to 1 if you have the header file. */ -#undef HAVE_NDBM_H - /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H @@ -681,6 +650,9 @@ /* Define if openlog is declared. */ #undef HAVE_OPENLOG_DECL +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_HMAC_H + /* Define to 1 if you have the `pclose' function. */ #undef HAVE_PCLOSE @@ -699,6 +671,12 @@ /* 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 defines PTHREAD_MUTEX_RECURSIVE. */ #undef HAVE_PTHREAD_MUTEX_RECURSIVE @@ -717,6 +695,9 @@ /* 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 header file. */ #undef HAVE_READLINE_H @@ -756,9 +737,6 @@ /* 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 @@ -861,6 +839,15 @@ /* 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 @@ -885,21 +872,12 @@ /* 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 header file. */ #undef HAVE_STDARG_H @@ -913,6 +891,9 @@ uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -964,8 +945,8 @@ /* 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 @@ -976,6 +957,9 @@ /* Define to 1 if you have the 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 @@ -985,6 +969,9 @@ /* Define if SysV shared-memory functions are available. */ #undef HAVE_SYSVSHM +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_BITYPES_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_CHIO_H @@ -1001,9 +988,21 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FILSYS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_S5PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_TYPES_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_GSCDDS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_INTTYPES_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H @@ -1029,6 +1028,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PSTAT_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SCARRAY_H @@ -1056,15 +1058,30 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STATFS_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STATVFS_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSINFO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSMP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSTEMCFG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TABLE_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TAPE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIMEB_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H @@ -1083,6 +1100,9 @@ /* Define to 1 if you have the 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 @@ -1101,9 +1121,6 @@ /* 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 @@ -1113,8 +1130,8 @@ /* Define to 1 if you have the 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 @@ -1141,18 +1158,12 @@ /* 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 header file. */ -#undef HAVE_VTBLC_H - /* Define to 1 if you have the header file. */ #undef HAVE_WAIT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_WCHAR_H + /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T @@ -1177,8 +1188,12 @@ /* 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 @@ -1186,26 +1201,68 @@ /* 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 @@ -1215,20 +1272,19 @@ /* 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 */ @@ -1252,9 +1308,16 @@ /* 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 @@ -1280,8 +1343,8 @@ /* 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. */ @@ -1293,43 +1356,46 @@ /* 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 a `int', as computed by sizeof. */ +/* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT -/* The size of a `intmax_t', as computed by sizeof. */ +/* The size of `intmax_t', as computed by sizeof. */ #undef SIZEOF_INTMAX_T -/* The size of a `long', as computed by sizeof. */ +/* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of a `long long', as computed by sizeof. */ +/* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The size of a `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 a `ssize_t', as computed by sizeof. */ +/* The size of `ssize_t', as computed by sizeof. */ #undef SIZEOF_SSIZE_T -/* The size of a `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 @@ -1344,31 +1410,53 @@ /* 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 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 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 @@ -1378,8 +1466,8 @@ /* Define to 1 if your 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. */ @@ -1388,36 +1476,12 @@ /* 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 @@ -1478,11 +1542,52 @@ /* 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. */ @@ -1498,13 +1603,6 @@ `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 @@ -1526,16 +1624,39 @@ /* 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 @@ -1543,9 +1664,21 @@ /* 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 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 @@ -1558,10 +1691,13 @@ /* 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 does not define. */ +/* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ @@ -1571,17 +1707,23 @@ 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 does not define. */ +/* Define to `unsigned int' if 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 doesn't define. */ #undef uid_t diff --git a/config/config.rpath b/config/config.rpath index e082db6..c547c68 100644 --- a/config/config.rpath +++ b/config/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2006 Free Software Foundation, Inc. +# Copyright 1996-2007 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # @@ -64,7 +64,7 @@ else ;; esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' @@ -74,7 +74,7 @@ else ;; newsos6) ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) wl='-Wl,' @@ -100,7 +100,7 @@ else osf3* | osf4* | osf5*) wl='-Wl,' ;; - sco3.2v5*) + rdos*) ;; solaris*) wl='-Wl,' @@ -108,11 +108,14 @@ else sunos4*) wl='-Qoption ld ' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; unicos*) wl='-Wl,' ;; @@ -189,11 +192,11 @@ if test "$with_gnu_ld" = yes; then ld_shlibs=no fi ;; - interix3*) + interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; - linux*) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else @@ -280,7 +283,7 @@ else strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct=yes + : else # We have old collect2 hardcode_direct=unsupported @@ -359,7 +362,7 @@ else hardcode_direct=yes hardcode_minus_L=yes ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; @@ -412,18 +415,22 @@ else hardcode_libdir_separator=: ;; openbsd*) - hardcode_direct=yes - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi else - case "$host_os" in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs=no fi ;; os2*) @@ -471,7 +478,7 @@ else ld_shlibs=yes fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' @@ -523,9 +530,6 @@ case "$host_os" in ;; freebsd1*) ;; - kfreebsd*-gnu) - library_names_spec='$libname$shrext' - ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) @@ -551,7 +555,7 @@ case "$host_os" in esac library_names_spec='$libname$shrext' ;; - interix3*) + interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) @@ -572,7 +576,7 @@ case "$host_os" in ;; linux*oldld* | linux*aout* | linux*coff*) ;; - linux*) + linux* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) @@ -598,6 +602,8 @@ case "$host_os" in osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; + rdos*) + ;; solaris*) library_names_spec='$libname$shrext' ;; diff --git a/config/config.sub b/config/config.sub index 6759825..695284a 100755 --- a/config/config.sub +++ b/config/config.sub @@ -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 @@ Report bugs and patches to ." 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 @@ case $basic_machine in | 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 \ @@ -277,7 +277,7 @@ case $basic_machine in | 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 \ @@ -358,7 +358,7 @@ case $basic_machine in | 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-* \ @@ -369,7 +369,7 @@ case $basic_machine in | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ + | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -487,8 +487,8 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) - basic_machine=cr16-unknown + cr16c) + basic_machine=cr16c-unknown os=-elf ;; crds | unos) @@ -714,6 +714,24 @@ case $basic_machine in 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/'` ;; @@ -1258,7 +1276,7 @@ case $os in | -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 --git a/config/depcomp b/config/depcomp index ffcd540..ca5ea4e 100755 --- a/config/depcomp +++ b/config/depcomp @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-02-09.22 +scriptversion=2006-10-15.18 -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. # 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 @@ -17,8 +18,8 @@ scriptversion=2005-02-09.22 # 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# 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 @@ -91,7 +92,20 @@ gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -276,6 +290,46 @@ icc) rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -288,13 +342,13 @@ tru64) if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is @@ -467,7 +521,8 @@ cpp) done "$@" -E | - sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" diff --git a/config/gnulib/absolute-header.m4 b/config/gnulib/absolute-header.m4 index c649df0..5b7a2fc 100644 --- a/config/gnulib/absolute-header.m4 +++ b/config/gnulib/absolute-header.m4 @@ -1,5 +1,5 @@ -# absolute-header.m4 serial 6 -dnl Copyright (C) 2006 Free Software Foundation, Inc. +# absolute-header.m4 serial 7 +dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -32,7 +32,12 @@ dnl eval is necessary to expand ac_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. AS_VAR_SET(gl_absolute_header, [`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | -sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`]) +sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{ + s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1# + s#^/[^/]#//&# + p + q +}'`]) fi AS_VAR_POPDEF([ac_header_exists])dnl ])dnl diff --git a/config/gnulib/extensions.m4 b/config/gnulib/extensions.m4 index 143a9e5..bcbb3ce 100644 --- a/config/gnulib/extensions.m4 +++ b/config/gnulib/extensions.m4 @@ -1,14 +1,14 @@ -# serial 4 -*- Autoconf -*- +# serial 5 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc. # This file 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. # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf -# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly +# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. @@ -16,26 +16,48 @@ # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. +# Remember that #undef in AH_VERBATIM gets replaced with #define by +# AC_DEFINE. The goal here is to define all known feature-enabling +# macros, then, if reports of conflicts are made, disable macros that +# cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], -[ - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) - AC_BEFORE([$0], [AC_RUN_IFELSE]) +[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl +AC_BEFORE([$0], [AC_RUN_IFELSE])dnl - AC_REQUIRE([AC_GNU_SOURCE]) - AC_REQUIRE([AC_AIX]) - AC_REQUIRE([AC_MINIX]) + AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) + if test "$MINIX" = yes; then + AC_DEFINE([_POSIX_SOURCE], [1], + [Define to 1 if you need to in order for `stat' and other + things to work.]) + AC_DEFINE([_POSIX_1_SOURCE], [2], + [Define to 2 if the system does not provide POSIX.1 features + except with this defined.]) + AC_DEFINE([_MINIX], [1], + [Define to 1 if on MINIX.]) + fi AH_VERBATIM([__EXTENSIONS__], -[/* 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]) +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif +]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( @@ -46,9 +68,11 @@ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_ALL_SOURCE]) + AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) -]) +])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS # ------------------------ diff --git a/config/gnulib/getaddrinfo.m4 b/config/gnulib/getaddrinfo.m4 index db285d9..7be1e49 100644 --- a/config/gnulib/getaddrinfo.m4 +++ b/config/gnulib/getaddrinfo.m4 @@ -1,11 +1,12 @@ -# getaddrinfo.m4 serial 11 -dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +# getaddrinfo.m4 serial 13 +dnl Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_GETADDRINFO], [ + AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo]) AC_SEARCH_LIBS(getaddrinfo, [nsl socket]) @@ -28,12 +29,36 @@ AC_DEFUN([gl_GETADDRINFO], fi ]) - AC_REPLACE_FUNCS(gai_strerror) + # 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. + AC_CHECK_HEADERS_ONCE(netdb.h) + AC_CACHE_CHECK([for gai_strerror (possibly via ws2tcpip.h)], + gl_cv_func_gai_strerror, [ + AC_TRY_LINK([ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif +], [gai_strerror (0);], + [gl_cv_func_gai_strerror=yes], + [gl_cv_func_gai_strerror=no])]) + if test $gl_cv_func_gai_strerror = no; then + AC_LIBOBJ(gai_strerror) + fi + gl_PREREQ_GETADDRINFO ]) # Prerequisites of lib/getaddrinfo.h and lib/getaddrinfo.c. AC_DEFUN([gl_PREREQ_GETADDRINFO], [ + AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H AC_SEARCH_LIBS(gethostbyname, [inet nsl]) AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet]) AC_CHECK_FUNCS(gethostbyname,, [ @@ -56,7 +81,7 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [ AC_REQUIRE([gl_SOCKET_FAMILIES]) AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([AC_GNU_SOURCE]) + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_HEADERS_ONCE(netinet/in.h netdb.h) AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[ /* sys/types.h is not needed according to POSIX, but the diff --git a/config/gnulib/gnulib-cache.m4 b/config/gnulib/gnulib-cache.m4 index 717621b..f1b01f7 100644 --- a/config/gnulib/gnulib-cache.m4 +++ b/config/gnulib/gnulib-cache.m4 @@ -15,17 +15,19 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib --m4-base=config/gnulib --doc-base=doc --aux-dir=config --libtool --macro-prefix=gl getaddrinfo lock visibility +# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib --m4-base=config/gnulib --doc-base=doc --aux-dir=config --libtool --macro-prefix=gl base64 fsusage getaddrinfo lock mkdtemp physmem visibility # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) -gl_MODULES([getaddrinfo lock visibility]) +gl_MODULES([base64 fsusage getaddrinfo lock mkdtemp physmem visibility]) gl_AVOID([]) gl_SOURCE_BASE([gnulib]) gl_M4_BASE([config/gnulib]) +gl_PO_BASE([]) gl_DOC_BASE([doc]) gl_TESTS_BASE([tests]) gl_LIB([libgnu]) gl_MAKEFILE_NAME([]) gl_LIBTOOL gl_MACRO_PREFIX([gl]) +gl_PO_DOMAIN([]) diff --git a/config/gnulib/gnulib-comp.m4 b/config/gnulib/gnulib-comp.m4 index f26cf17..3c36360 100644 --- a/config/gnulib/gnulib-comp.m4 +++ b/config/gnulib/gnulib-comp.m4 @@ -42,21 +42,48 @@ AC_DEFUN([gl_INIT], gl_source_base='gnulib' gl_FUNC_ALLOCA gl_HEADER_ARPA_INET - dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac. + AC_PROG_MKDIR_P + gl_FUNC_BASE64 + gl_FLOAT_H + gl_FSUSAGE gl_GETADDRINFO + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + gl_FUNC_GETTIMEOFDAY gl_INET_NTOP gl_LOCK + gl_FUNC_MALLOC_POSIX + gl_STDLIB_MODULE_INDICATOR([malloc-posix]) + gt_FUNC_MKDTEMP + gl_STDLIB_MODULE_INDICATOR([mkdtemp]) gl_HEADER_NETINET_IN + AC_PROG_MKDIR_P + gl_PHYSMEM + gl_SAFE_READ + gl_SAFE_WRITE gl_SIZE_MAX gl_FUNC_SNPRINTF + gl_STDIO_MODULE_INDICATOR([snprintf]) gl_TYPE_SOCKLEN_T + gt_TYPE_SSIZE_T AM_STDBOOL_H + gl_STDINT_H + gl_STDIO_H + gl_STDLIB_H gl_FUNC_STRDUP + gl_STRING_MODULE_INDICATOR([strdup]) gl_HEADER_STRING_H gl_HEADER_SYS_SOCKET AC_PROG_MKDIR_P + gl_HEADER_SYS_STAT_H + AC_PROG_MKDIR_P + gl_HEADER_SYS_TIME_H + AC_PROG_MKDIR_P + gl_FUNC_GEN_TEMPNAME + gl_UNISTD_H gl_FUNC_VASNPRINTF gl_VISIBILITY + gl_WCHAR_H gl_XSIZE m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) @@ -96,37 +123,71 @@ AC_DEFUN([gl_LIBSOURCES], # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ build-aux/config.rpath + build-aux/link-warning.h lib/alloca_.h lib/asnprintf.c + lib/base64.c + lib/base64.h + lib/float+.h + lib/float_.h + lib/fsusage.c + lib/fsusage.h + lib/full-read.c + lib/full-read.h + lib/full-write.c + lib/full-write.h lib/gai_strerror.c lib/getaddrinfo.c lib/getaddrinfo.h lib/gettext.h + lib/gettimeofday.c lib/inet_ntop.c lib/inet_ntop.h lib/lock.c lib/lock.h + lib/malloc.c + lib/mkdtemp.c + lib/netinet_in_.h + lib/physmem.c + lib/physmem.h lib/printf-args.c lib/printf-args.h lib/printf-parse.c lib/printf-parse.h + lib/safe-read.c + lib/safe-read.h + lib/safe-write.c + lib/safe-write.h lib/size_max.h lib/snprintf.c - lib/snprintf.h - lib/socket_.h lib/stdbool_.h + lib/stdint_.h + lib/stdio_.h + lib/stdlib_.h lib/strdup.c lib/string_.h + lib/sys_socket_.h + lib/sys_stat_.h + lib/sys_time_.h + lib/tempname.c + lib/tempname.h + lib/unistd_.h lib/vasnprintf.c lib/vasnprintf.h + lib/wchar_.h lib/xsize.h m4/absolute-header.m4 m4/alloca.m4 m4/arpa_inet_h.m4 + m4/base64.m4 m4/eoverflow.m4 m4/extensions.m4 + m4/float_h.m4 + m4/fsusage.m4 m4/getaddrinfo.m4 + m4/gettimeofday.m4 m4/gnulib-common.m4 + m4/include_next.m4 m4/inet_ntop.m4 m4/intmax_t.m4 m4/inttypes_h.m4 @@ -134,21 +195,35 @@ AC_DEFUN([gl_FILE_LIST], [ m4/lib-link.m4 m4/lib-prefix.m4 m4/lock.m4 - m4/longdouble.m4 m4/longlong.m4 + m4/malloc.m4 + m4/mkdtemp.m4 m4/netinet_in_h.m4 m4/onceonly_2_57.m4 + m4/physmem.m4 + m4/safe-read.m4 + m4/safe-write.m4 m4/size_max.m4 m4/snprintf.m4 m4/socklen.m4 m4/sockpfaf.m4 + m4/ssize_t.m4 m4/stdbool.m4 + m4/stdint.m4 m4/stdint_h.m4 + m4/stdio_h.m4 + m4/stdlib_h.m4 m4/strdup.m4 m4/string_h.m4 m4/sys_socket_h.m4 + m4/sys_stat_h.m4 + m4/sys_time_h.m4 + m4/tempname.m4 + m4/ulonglong.m4 + m4/unistd_h.m4 m4/vasnprintf.m4 m4/visibility.m4 + m4/wchar.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/xsize.m4 diff --git a/config/gnulib/lock.m4 b/config/gnulib/lock.m4 index 0224f2f..4cc585e 100644 --- a/config/gnulib/lock.m4 +++ b/config/gnulib/lock.m4 @@ -1,5 +1,5 @@ -# lock.m4 serial 6 (gettext-0.16) -dnl Copyright (C) 2005-2006 Free Software Foundation, Inc. +# lock.m4 serial 7 (gettext-0.16.2) +dnl Copyright (C) 2005-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -35,7 +35,12 @@ AC_DEFUN([gl_LOCK_EARLY_BODY], AC_BEFORE([$0], [gl_ARGP])dnl AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems + dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. + dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes + dnl AC_GNU_SOURCE. + m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], + [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], + [AC_REQUIRE([AC_GNU_SOURCE])]) dnl Check for multithreading. AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) diff --git a/config/gnulib/netinet_in_h.m4 b/config/gnulib/netinet_in_h.m4 index d73531a..096be74 100644 --- a/config/gnulib/netinet_in_h.m4 +++ b/config/gnulib/netinet_in_h.m4 @@ -1,18 +1,30 @@ -# netinet_in_h.m4 serial 1 -dnl Copyright (C) 2006 Free Software Foundation, Inc. +# netinet_in_h.m4 serial 3 +dnl Copyright (C) 2006-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -dnl Written by Simon Josefsson - AC_DEFUN([gl_HEADER_NETINET_IN], [ - AC_CHECK_HEADERS_ONCE([netinet/in.h]) - if test $ac_cv_header_netinet_in_h = yes; then + AC_CACHE_CHECK([whether is self-contained], + [gl_cv_header_netinet_in_h_selfcontained], + [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [])], + [gl_cv_header_netinet_in_h_selfcontained=yes], + [gl_cv_header_netinet_in_h_selfcontained=no]) + ]) + if test $gl_cv_header_netinet_in_h_selfcontained = yes; then NETINET_IN_H='' else NETINET_IN_H='netinet/in.h' + AC_CHECK_HEADERS([netinet/in.h]) + gl_CHECK_NEXT_HEADERS([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 + AC_SUBST([HAVE_NETINET_IN_H]) fi - AC_SUBST(NETINET_IN_H) + AC_SUBST([NETINET_IN_H]) ]) diff --git a/config/gnulib/snprintf.m4 b/config/gnulib/snprintf.m4 index 432e037..f21200d 100644 --- a/config/gnulib/snprintf.m4 +++ b/config/gnulib/snprintf.m4 @@ -1,13 +1,29 @@ -# snprintf.m4 serial 2 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# snprintf.m4 serial 4 +dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SNPRINTF], [ - AC_REPLACE_FUNCS(snprintf) - AC_CHECK_DECLS_ONCE(snprintf) + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_CHECK_FUNCS([snprintf]) + if test $ac_cv_func_snprintf = no; then + gl_REPLACE_SNPRINTF + fi + AC_CHECK_DECLS_ONCE([snprintf]) + if test $ac_cv_have_decl_snprintf = no; then + HAVE_DECL_SNPRINTF=0 + fi +]) + +AC_DEFUN([gl_REPLACE_SNPRINTF], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_LIBOBJ([snprintf]) + if test $ac_cv_func_snprintf = yes; then + REPLACE_SNPRINTF=1 + fi gl_PREREQ_SNPRINTF ]) diff --git a/config/gnulib/string_h.m4 b/config/gnulib/string_h.m4 index 84db7a5..ec51e9a 100644 --- a/config/gnulib/string_h.m4 +++ b/config/gnulib/string_h.m4 @@ -18,19 +18,52 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - gl_ABSOLUTE_HEADER([string.h]) - ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\" - AC_SUBST([ABSOLUTE_STRING_H]) + gl_CHECK_NEXT_HEADERS([string.h]) +]) + +AC_DEFUN([gl_STRING_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ + GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) + GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) + GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) + GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) + GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) + GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) + GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) + GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) + GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) + GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) + GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) + GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) + GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) + GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) + GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) + GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) + GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) + GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) + GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) + GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) + GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) + GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) + GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) + GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) + GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) + GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) + GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) + HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP]) HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) @@ -39,8 +72,6 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) + HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) - REPLACE_STRCASECMP=0; AC_SUBST([REPLACE_STRCASECMP]) - REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) - REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) ]) diff --git a/config/gnulib/sys_socket_h.m4 b/config/gnulib/sys_socket_h.m4 index d3e45b4..d9659c2 100644 --- a/config/gnulib/sys_socket_h.m4 +++ b/config/gnulib/sys_socket_h.m4 @@ -1,5 +1,5 @@ -# sys_socket_h.m4 serial 2 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. +# sys_socket_h.m4 serial 4 +dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -8,16 +8,44 @@ dnl From Simon Josefsson. AC_DEFUN([gl_HEADER_SYS_SOCKET], [ - AC_CHECK_HEADERS_ONCE([sys/socket.h]) - if test $ac_cv_header_sys_socket_h = yes; then + AC_CACHE_CHECK([whether is self-contained], + [gl_cv_header_sys_socket_h_selfcontained], + [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [])], + [gl_cv_header_sys_socket_h_selfcontained=yes], + [gl_cv_header_sys_socket_h_selfcontained=no]) + ]) + if test $gl_cv_header_sys_socket_h_selfcontained = yes; then SYS_SOCKET_H='' else - dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make - dnl the check for those headers unconditional; yet cygwin reports - dnl that the headers are present but cannot be compiled (since on - dnl cygwin, all socket information should come from sys/socket.h). - AC_CHECK_HEADERS([winsock2.h ws2tcpip.h]) SYS_SOCKET_H='sys/socket.h' + + gl_CHECK_NEXT_HEADERS([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 + dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make + dnl the check for those headers unconditional; yet cygwin reports + dnl that the headers are present but cannot be compiled (since on + dnl cygwin, all socket information should come from sys/socket.h). + AC_CHECK_HEADERS([winsock2.h ws2tcpip.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 + AC_SUBST([HAVE_SYS_SOCKET_H]) + AC_SUBST([HAVE_WINSOCK2_H]) + AC_SUBST([HAVE_WS2TCPIP_H]) fi - AC_SUBST(SYS_SOCKET_H) + AC_SUBST([SYS_SOCKET_H]) ]) diff --git a/config/gnulib/vasnprintf.m4 b/config/gnulib/vasnprintf.m4 index 72c9a13..ef2de78 100644 --- a/config/gnulib/vasnprintf.m4 +++ b/config/gnulib/vasnprintf.m4 @@ -1,5 +1,5 @@ -# vasnprintf.m4 serial 7 -dnl Copyright (C) 2002-2004, 2006 Free Software Foundation, Inc. +# vasnprintf.m4 serial 20 +dnl Copyright (C) 2002-2004, 2006-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -7,23 +7,33 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VASNPRINTF], [ AC_REQUIRE([gl_EOVERFLOW]) - AC_REPLACE_FUNCS(vasnprintf) + AC_CHECK_FUNCS_ONCE([vasnprintf]) if test $ac_cv_func_vasnprintf = no; then - AC_LIBOBJ(printf-args) - AC_LIBOBJ(printf-parse) - AC_LIBOBJ(asnprintf) - gl_PREREQ_PRINTF_ARGS - gl_PREREQ_PRINTF_PARSE - gl_PREREQ_VASNPRINTF - gl_PREREQ_ASNPRINTF + gl_REPLACE_VASNPRINTF fi ]) +AC_DEFUN([gl_REPLACE_VASNPRINTF], +[ + AC_CHECK_FUNCS_ONCE([vasnprintf]) + AC_LIBOBJ([vasnprintf]) + AC_LIBOBJ([printf-args]) + AC_LIBOBJ([printf-parse]) + AC_LIBOBJ([asnprintf]) + if test $ac_cv_func_vasnprintf = yes; then + AC_DEFINE([REPLACE_VASNPRINTF], 1, + [Define if vasnprintf exists but is overridden by gnulib.]) + fi + gl_PREREQ_PRINTF_ARGS + gl_PREREQ_PRINTF_PARSE + gl_PREREQ_VASNPRINTF + gl_PREREQ_ASNPRINTF +]) + # Prequisites of lib/printf-args.h, lib/printf-args.c. AC_DEFUN([gl_PREREQ_PRINTF_ARGS], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_LONGDOUBLE]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) ]) @@ -32,7 +42,6 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS], AC_DEFUN([gl_PREREQ_PRINTF_PARSE], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_LONGDOUBLE]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_REQUIRE([AC_TYPE_SIZE_T]) @@ -45,10 +54,141 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF], [ AC_REQUIRE([AC_FUNC_ALLOCA]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_LONGDOUBLE]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_CHECK_FUNCS(snprintf wcslen) + dnl Use the _snprintf function only if it is declared (because on NetBSD it + dnl is defined as a weak alias of snprintf; we prefer to use the latter). + AC_CHECK_DECLS([_snprintf], , , [#include ]) +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting 'long double' +# arguments. +AC_DEFUN([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], +[ + AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) + case "$gl_cv_func_printf_long_double" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], 1, + [Define if the vasnprintf implementation needs special code for + 'long double' arguments.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double' +# arguments. +AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], +[ + AC_REQUIRE([gl_PRINTF_INFINITE]) + case "$gl_cv_func_printf_infinite" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], 1, + [Define if the vasnprintf implementation needs special code for + infinite 'double' arguments.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double' +# arguments. +AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], +[ + AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) + dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if + dnl NEED_PRINTF_LONG_DOUBLE is already set. + AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE]) + case "$gl_cv_func_printf_long_double" in + *yes) + case "$gl_cv_func_printf_infinite_long_double" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], 1, + [Define if the vasnprintf implementation needs special code for + infinite 'long double' arguments.]) + ;; + esac + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive. +AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], +[ + AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) + case "$gl_cv_func_printf_directive_a" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], 1, + [Define if the vasnprintf implementation needs special code for + the 'a' and 'A' directives.]) + AC_CHECK_FUNCS([nl_langinfo]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive. +AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], +[ + AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) + case "$gl_cv_func_printf_directive_f" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], 1, + [Define if the vasnprintf implementation needs special code for + the 'F' directive.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag. +AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], +[ + AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) + case "$gl_cv_func_printf_flag_grouping" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], 1, + [Define if the vasnprintf implementation needs special code for the + ' flag.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag. +AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], +[ + AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) + case "$gl_cv_func_printf_flag_zero" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_FLAG_ZERO], 1, + [Define if the vasnprintf implementation needs special code for the + 0 flag.]) + ;; + esac +]) + +# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance. +AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], +[ + AC_REQUIRE([gl_PREREQ_VASNPRINTF]) + gl_PREREQ_VASNPRINTF_LONG_DOUBLE + gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE + gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE + gl_PREREQ_VASNPRINTF_DIRECTIVE_A + gl_PREREQ_VASNPRINTF_DIRECTIVE_F + gl_PREREQ_VASNPRINTF_FLAG_GROUPING + gl_PREREQ_VASNPRINTF_FLAG_ZERO ]) # Prerequisites of lib/asnprintf.c. diff --git a/config/gnulib/wint_t.m4 b/config/gnulib/wint_t.m4 index 3706c04..2cac1a7 100644 --- a/config/gnulib/wint_t.m4 +++ b/config/gnulib/wint_t.m4 @@ -1,4 +1,4 @@ -# wint_t.m4 serial 2 (gettext-0.12) +# wint_t.m4 serial 2 (gettext-0.16.2) dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/config/install-sh b/config/install-sh index 1a83534..4fbbae7 100755 --- a/config/install-sh +++ b/config/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-02-02.21 +scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,15 +39,24 @@ scriptversion=2005-02-02.21 # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. + +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" @@ -58,7 +67,13 @@ stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -chmodcmd="$chmodprog 0755" +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= @@ -95,7 +110,7 @@ Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " -while test -n "$1"; do +while test $# -ne 0; do case $1 in -c) shift continue;; @@ -111,9 +126,15 @@ while test -n "$1"; do --help) echo "$usage"; exit $?;; - -m) chmodcmd="$chmodprog $2" + -m) mode=$2 shift shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac continue;; -o) chowncmd="$chownprog $2" @@ -136,25 +157,33 @@ while test -n "$1"; do --version) echo "$0 $scriptversion"; exit $?;; - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done + --) shift break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; esac done -if test -z "$1"; then +if test $# -ne 0 && test -z "$dir_arg$dstarg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -164,6 +193,33 @@ if test -z "$1"; then exit 0 fi +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + for src do # Protect names starting with `-'. @@ -173,15 +229,11 @@ do if test -n "$dir_arg"; then dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -208,53 +260,188 @@ do echo "$0: $dstarg: Is a directory" >&2 exit 1 fi - dst=$dst/`basename "$src"` + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? fi fi - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - - # Make sure that the destination directory exists. - - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - pathcomp= + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi - pathcomp=$pathcomp/ - done + fi fi if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else - dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -262,10 +449,9 @@ do # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -276,10 +462,10 @@ do { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not @@ -291,11 +477,12 @@ do # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + if test -f "$dst"; then + $doit $rmcmd -f "$dst" 2>/dev/null \ + || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ + && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else @@ -304,16 +491,13 @@ do } && # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + $doit $mvcmd "$dsttmp" "$dst" } - } - fi || { (exit 1); exit 1; } -done + } || exit 1 -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} + trap '' 0 + fi +done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/config/libtool.m4i b/config/libtool.m4i deleted file mode 100644 index 771b86f..0000000 --- a/config/libtool.m4i +++ /dev/null @@ -1,6184 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -## Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit , 1996 -## -## This file 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. - -# serial 47 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# 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' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH - -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 - -# 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'] - -# 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' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# 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" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# 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 - -# 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= - -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 - -_LT_CC_BASENAME([$compiler]) - -# 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 - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; 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_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[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* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[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* -])# _LT_LINKER_BOILERPLATE - - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -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],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -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 AC_TRY_EVAL(ac_compile); 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 __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); 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 AC_TRY_EVAL(ac_compile); 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" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - 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 - ;; -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # 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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - 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 - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - 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>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp - $SED '/^$/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - 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 - ;; - - 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; - ;; - - 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; - ;; - - 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; - ;; - - 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 -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# -------------------- -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ------------------------------------------------------------------ -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#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 AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_unknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -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= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) - ]) - ]) - ]) - ]) - ]) - ;; - 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" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - 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 - - 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 -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - 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_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $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* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - 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 - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[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]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != 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, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = 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 -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -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" - AC_MSG_RESULT([yes]) -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" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) -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.so - # instead of lib.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 - - # 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' - ;; - -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 - ;; - -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" - ;; - -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 - ;; - -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' - ;; - -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 - ;; - 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 - ;; - -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 -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - 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 - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - 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_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - 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" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [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], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -#- set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [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], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [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], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognise shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[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 -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - 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 <&2 - -*** 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 - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognise a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - 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 - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[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 &1 /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 - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -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 - ;; - -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 - ;; - -# This must be Linux ELF. -linux*) - 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)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - 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)$' - 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 -]) -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 -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, -[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 - fi - done - IFS="$lt_save_ifs" - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# --------------- -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([AC_PROG_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_PROG_CXXCPP -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# -------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' - -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# -# Check for any special shared library compilation flags. -# -_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' - ;; - esac -fi -if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then - AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) - if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : - else - AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) - _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) - - -## 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... -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) - -# Report which librarie types wil actually be built -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -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 -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# 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 -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_LD - - # 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 - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${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}' - - # 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 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - 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. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - 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"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -_LT_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=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 - - 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. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=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 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=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 - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - 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. - _LT_AC_TAGVAR(always_export_symbols, $1)=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. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${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. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$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... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=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 - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(module_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(module_expsym_cmds, $1)='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' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='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}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - ia64*|hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$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. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - 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. - _LT_AC_TAGVAR(archive_cmds, $1)='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' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$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."*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - osf3*) - 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. - _LT_AC_TAGVAR(archive_cmds, $1)='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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - 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. - _LT_AC_TAGVAR(archive_cmds, $1)='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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # 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 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sco*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=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?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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 - _LT_AC_TAGVAR(link_all_deplibs, $1)=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. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$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. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - fi - ;; - esac - ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -## 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... -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -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 -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" -ifelse([$1], [], -[#! $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 , 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 - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# 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], -[# ### 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=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# 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_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# 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_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# 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_AC_TAGVAR(lt_prog_compiler_pic, $1) -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_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# 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 - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -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_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -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_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# 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=$_LT_AC_TAGVAR(hardcode_action, $1) - -# 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_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) - -# 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_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# 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=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# 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="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" - -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# 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_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - 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 - # 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_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# 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]]*\)' - -# 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'" - -# 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 - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # 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 - - rm -f conftest* - cat > conftest.$ac_ext < $nlist) && 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 - - # 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 < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> 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[[]] = -{ -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 -} -#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_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && 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" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # 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 -]) -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 - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-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*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - sco*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - *) - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - unixware*) - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux*) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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 - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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' - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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 - _LT_AC_TAGVAR(include_expsyms, $1)= - # 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'. - _LT_AC_TAGVAR(exclude_expsyms, $1)="_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. - _LT_CC_BASENAME([$compiler]) - 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 - - _LT_AC_TAGVAR(ld_shlibs, $1)=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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${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 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - 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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&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. - -EOF - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$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)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II 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. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$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... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(ld_shlibs, $1)=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 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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 - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&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. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=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 - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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 - - # 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 - - 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. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - 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 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=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 - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - 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. - _LT_AC_TAGVAR(always_export_symbols, $1)=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. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${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. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$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)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-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. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=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. - _LT_AC_TAGVAR(archive_cmds, $1)='$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. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='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' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='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}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_TAGVAR(ld_shlibs, $1)=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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$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*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$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' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - sco3.2v5*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=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 - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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 - _LT_AC_TAGVAR(link_all_deplibs, $1)=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. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4.2uw2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv5*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -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 - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = 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$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) 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. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# 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 -]) -SED=$lt_cv_path_SED -AC_MSG_RESULT([$SED]) -]) diff --git a/config/ltmain.sh b/config/ltmain.sh index 9e71d27..d74b5a6 100644 --- a/config/ltmain.sh +++ b/config/ltmain.sh @@ -1,8 +1,8 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify @@ -43,14 +43,22 @@ EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.20 -TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)" - -# 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 +VERSION=1.5.24 +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -105,12 +113,14 @@ esac # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -if test "${LC_ALL+set}" = set; then - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL -fi -if test "${LANG+set}" = set; then - save_LANG="$LANG"; LANG=C; export LANG -fi +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" +done # Make sure IFS has a sensible default lt_nl=' @@ -132,13 +142,54 @@ run= show="$echo" show_help= execute_dlfiles= +duplicate_deps=no +preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + # func_win32_libid arg # return the library type of file 'arg' # @@ -157,12 +208,17 @@ func_win32_libid () if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` - if test "X$win32_nmres" = "Ximport" ; then - win32_libid_type="x86 archive import" - else - win32_libid_type="x86 archive static" - fi + $SED -n -e '1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac fi ;; *DLL*) @@ -219,7 +275,21 @@ func_infer_tag () esac CC_quoted="$CC_quoted $arg" done + # user sometimes does CC=-gcc so we need to match that to 'gcc' + trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"` + # and sometimes libtool has CC=-gcc but user does CC=gcc + extendcc=${host}-${CC} + # and sometimes libtool has CC=-gcc but user has CC=-gcc + # (Gentoo-specific hack because we always export $CHOST) + mungedcc=${CHOST-${host}}-${trimedcc} case "$@ " in + "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\ + "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*) + tagname=CC + break ;; + "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\ + "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\ + "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. @@ -289,15 +359,25 @@ func_extract_archives () *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" - status=$? - if test "$status" -ne 0 && test ! -d "$my_xdir"; then - exit $status + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status fi case $host in *-darwin*) @@ -352,6 +432,8 @@ func_extract_archives () # Darwin sucks eval std_shrext=\"$shrext_cmds\" +disable_libs=no + # Parse our command line options once, thoroughly. while test "$#" -gt 0 do @@ -414,11 +496,12 @@ do ;; --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 2007 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." exit $? ;; @@ -468,7 +551,11 @@ do preserve_args="$preserve_args $arg" ;; - --tag) prevopt="--tag" prev=tag ;; + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; --tag=*) set tag "$optarg" ${1+"$@"} shift @@ -500,6 +587,18 @@ if test -n "$prevopt"; then exit $EXIT_FAILURE fi +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. @@ -699,9 +798,10 @@ if test -z "$show_help"; then *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; + *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; + *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -795,7 +895,7 @@ if test -z "$show_help"; then # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do + until $run ln "$srcfile" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done @@ -856,9 +956,9 @@ EOF if test ! -d "${xdir}$objdir"; then $show "$mkdir ${xdir}$objdir" $run $mkdir ${xdir}$objdir - status=$? - if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then - exit $status + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then + exit $exit_status fi fi @@ -1061,6 +1161,7 @@ EOF no_install=no objs= non_pic_objects= + notinst_path= # paths that contain not-installed libtool libraries precious_files_regex= prefer_static_libs=no preload=no @@ -1081,22 +1182,32 @@ EOF for arg do case $arg in - -all-static | -static) - if test "X$arg" = "X-all-static"; then + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi - else + prefer_static_libs=yes + ;; + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi - fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac build_libtool_libs=no build_old_libs=yes - prefer_static_libs=yes break ;; esac @@ -1271,6 +1382,11 @@ EOF if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. @@ -1354,8 +1470,8 @@ EOF prev= continue ;; - darwin_framework) - compiler_flags="$compiler_flags $arg" + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= @@ -1419,13 +1535,17 @@ EOF continue ;; - -framework|-arch) - prev=darwin_framework - compiler_flags="$compiler_flags $arg" + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" - continue - ;; + continue + ;; -inst-prefix-dir) prev=inst_prefix @@ -1453,7 +1573,8 @@ EOF absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - exit $EXIT_FAILURE + absdir="$dir" + notinst_path="$notinst_path $dir" fi dir="$absdir" ;; @@ -1467,10 +1588,15 @@ EOF esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac continue @@ -1479,11 +1605,11 @@ EOF -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-pw32* | *-*-beos*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; - *-*-mingw* | *-*-os2*) + *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; @@ -1495,6 +1621,15 @@ EOF # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; esac elif test "X$arg" = "X-lc_r"; then case $host in @@ -1518,7 +1653,7 @@ EOF continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" @@ -1536,7 +1671,13 @@ EOF # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. @@ -1548,9 +1689,7 @@ EOF esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" - if test "$with_gcc" = "yes" ; then - compiler_flags="$compiler_flags $arg" - fi + compiler_flags="$compiler_flags $arg" continue ;; @@ -1566,9 +1705,9 @@ EOF -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. + # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no @@ -1627,7 +1766,7 @@ EOF continue ;; - -static) + -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -1788,6 +1927,11 @@ EOF if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. @@ -1893,9 +2037,9 @@ EOF if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir - status=$? - if test "$status" -ne 0 && test ! -d "$output_objdir"; then - exit $status + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status fi fi @@ -1958,7 +2102,6 @@ EOF newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" @@ -2005,7 +2148,7 @@ EOF lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -2194,7 +2337,7 @@ EOF esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else - $echo "$modename: cannot find the library \`$lib'" 1>&2 + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi @@ -2401,7 +2544,9 @@ EOF if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -2445,8 +2590,12 @@ EOF fi link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes @@ -2559,11 +2708,15 @@ EOF if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in - *-*-sco3.2v5* ) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo @@ -3089,7 +3242,7 @@ EOF # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows) + darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3100,9 +3253,10 @@ EOF age="0" ;; irix|nonstopux) - current=`expr $number_major + $number_minor - 1` + current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" + lt_irix_increment=no ;; esac ;; @@ -3161,7 +3315,8 @@ EOF versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) @@ -3175,8 +3330,11 @@ EOF ;; irix | nonstopux) - major=`expr $current - $age + 1` - + if test "X$lt_irix_increment" = "Xno"; then + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; @@ -3313,11 +3471,11 @@ EOF fi # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` - deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` - done + #for path in $notinst_path; do + # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3369,7 +3527,12 @@ EOF ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. @@ -3413,13 +3576,12 @@ EOF int main() { return 0; } EOF $rm conftest - $LTCC -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then + if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3458,9 +3620,7 @@ EOF # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - $LTCC -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3492,7 +3652,7 @@ EOF droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -3705,6 +3865,35 @@ EOF deplibs=$newdeplibs fi + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). library_names= old_library= @@ -3749,7 +3938,10 @@ EOF test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi @@ -3788,6 +3980,7 @@ EOF fi lib="$output_objdir/$realname" + linknames= for link do linknames="$linknames $link" @@ -4107,12 +4300,14 @@ EOF reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4219,6 +4414,35 @@ EOF ;; esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" @@ -4263,10 +4487,15 @@ EOF fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac done @@ -4383,10 +4612,22 @@ extern \"C\" { export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac else - $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac fi fi @@ -4503,16 +4744,29 @@ static const void *lt_preloaded_setup() { esac # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 @@ -4525,19 +4779,19 @@ static const void *lt_preloaded_setup() { # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" - status=$? + exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then @@ -4545,7 +4799,7 @@ static const void *lt_preloaded_setup() { $run $rm "$output_objdir/${outputname}S.${objext}" fi - exit $status + exit $exit_status fi if test -n "$shlibpath_var"; then @@ -4618,7 +4872,7 @@ static const void *lt_preloaded_setup() { if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= @@ -4655,7 +4909,7 @@ static const void *lt_preloaded_setup() { fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. @@ -4685,10 +4939,12 @@ static const void *lt_preloaded_setup() { esac case $host in *cygwin* | *mingw* ) - cwrappersource=`$echo ${objdir}/lt-${outputname}.c` - cwrapper=`$echo ${output}.exe` - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource < #include #include +#include +#include +#include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX @@ -4723,15 +4982,19 @@ EOF #endif #ifndef DIR_SEPARATOR -#define DIR_SEPARATOR '/' +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) -#define HAVE_DOS_BASED_FILE_SYSTEM -#ifndef DIR_SEPARATOR_2 -#define DIR_SEPARATOR_2 '\\' -#endif +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif #endif #ifndef DIR_SEPARATOR_2 @@ -4741,17 +5004,32 @@ EOF (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); -char * basename (const char *name); -char * fnqualify(const char *path); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); @@ -4761,29 +5039,50 @@ main (int argc, char *argv[]) char **newargz; int i; - program_name = (char *) xstrdup ((char *) basename (argv[0])); + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF - cat >> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = fnqualify(argv[0]); + cat >> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + cat >> $cwrappersource <<"EOF" return 127; } @@ -4804,48 +5103,148 @@ xstrdup (const char *string) ; } -char * -basename (const char *name) +const char * +base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha (name[0]) && name[1] == ':') + if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; - return (char *) base; + return base; } +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ char * -fnqualify(const char *path) +find_executable (const char* wrapper) { - size_t size; - char *p; + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - assert(path != NULL); + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; - /* Is it qualified already? */ + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha (path[0]) && path[1] == ':') - return xstrdup (path); + } #endif - if (IS_DIR_SEPARATOR (path[0])) - return xstrdup (path); - /* prepend the current directory */ - /* doesn't handle '~' */ + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); - size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ - p = XMALLOC(char, size); - sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); - return p; + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; } char * @@ -4889,16 +5288,16 @@ lt_fatal (const char *message, ...) va_end (ap); } EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL @@ -4917,6 +5316,20 @@ EOF Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + # 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 @@ -5043,6 +5456,11 @@ else $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. + + # Make sure env LD_LIBRARY_PATH does not mess us up + if test -n \"\${LD_LIBRARY_PATH+set}\"; then + export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH + fi " case $host in # Backslashes separate directories on plain windows @@ -5059,7 +5477,7 @@ else ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else @@ -5128,9 +5546,9 @@ fi\ $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" - status=$? - if test "$status" -ne 0 && test ! -d "$gentop"; then - exit $status + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status fi fi @@ -5245,7 +5663,7 @@ fi\ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5270,9 +5688,53 @@ fi\ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi - newdependency_libs="$newdependency_libs $libdir/$name" + if test "X$EGREP" = X ; then + EGREP=egrep + fi + # We do not want portage's install root ($D) present. Check only for + # this if the .la is being installed. + if test "$installed" = yes && test "$D"; then + eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` + else + mynewdependency_lib="$libdir/$name" + fi + # Do not add duplicates + if test "$mynewdependency_lib"; then + my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` + if test -z "$my_little_ninja_foo_1"; then + newdependency_libs="$newdependency_libs $mynewdependency_lib" + fi + fi + ;; + *) + if test "$installed" = yes; then + # Rather use S=WORKDIR if our version of portage supports it. + # This is because some ebuild (gcc) do not use $S as buildroot. + if test "$PWORKDIR"; then + S="$PWORKDIR" + fi + # We do not want portage's build root ($S) present. + my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"` + # We do not want portage's install root ($D) present. + my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"` + if test -n "$my_little_ninja_foo_2" && test "$S"; then + mynewdependency_lib="" + elif test -n "$my_little_ninja_foo_3" && test "$D"; then + eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` + else + mynewdependency_lib="$deplib" + fi + else + mynewdependency_lib="$deplib" + fi + # Do not add duplicates + if test "$mynewdependency_lib"; then + my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"` + if test -z "$my_little_ninja_foo_4"; then + newdependency_libs="$newdependency_libs $mynewdependency_lib" + fi + fi ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" @@ -5324,6 +5786,10 @@ fi\ case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac + # Do not add duplicates + if test "$installed" = yes && test "$D"; then + install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'` + fi $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP @@ -5590,9 +6056,9 @@ relink_command=\"$relink_command\"" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -5797,22 +6263,11 @@ relink_command=\"$relink_command\"" outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then - tmpdir="/tmp" - test -n "$TMPDIR" && tmpdir="$TMPDIR" - tmpdir="$tmpdir/libtool-$$" - save_umask=`umask` - umask 0077 - if $mkdir "$tmpdir"; then - umask $save_umask - else - umask $save_umask - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 - continue - fi + tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : @@ -5932,7 +6387,7 @@ relink_command=\"$relink_command\"" # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS - $echo "----------------------------------------------------------------------" + $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" @@ -5965,7 +6420,7 @@ relink_command=\"$relink_command\"" $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "----------------------------------------------------------------------" + $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; @@ -6023,8 +6478,10 @@ relink_command=\"$relink_command\"" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi fi ;; @@ -6088,12 +6545,12 @@ relink_command=\"$relink_command\"" fi # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + fi" + done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6182,9 +6639,17 @@ relink_command=\"$relink_command\"" rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - if test "$mode" = uninstall; then + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds @@ -6217,7 +6682,8 @@ relink_command=\"$relink_command\"" IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. - fi + ;; + esac fi ;; @@ -6441,9 +6907,9 @@ The following components of LINK-COMMAND are treated specially: -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6457,9 +6923,11 @@ The following components of LINK-COMMAND are treated specially: -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. @@ -6516,12 +6984,11 @@ exit $? # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes +disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` +disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: diff --git a/config/missing b/config/missing index 09edd88..1c8ff70 100755 --- a/config/missing +++ b/config/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-02-08.22 +scriptversion=2006-05-10.23 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -19,8 +19,8 @@ scriptversion=2005-02-08.22 # 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# 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 @@ -33,6 +33,8 @@ if test $# -eq 0; then fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +46,7 @@ fi msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,6 +79,7 @@ Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -106,7 +109,7 @@ esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). -case "$1" in +case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; @@ -135,7 +138,7 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg. You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file @@ -289,14 +290,23 @@ WARNING: \`$1' is $msg. You should only need it if DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 touch $file ;; @@ -314,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if fi firstarg="$1" if shift; then - case "$firstarg" in + case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case "$firstarg" in + case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 diff --git a/config/mkinstalldirs b/config/mkinstalldirs index 5d26a48..ef7e16f 100755 --- a/config/mkinstalldirs +++ b/config/mkinstalldirs @@ -1,7 +1,7 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -scriptversion=2005-02-02.21 +scriptversion=2006-05-11.19 # Original author: Noah Friedman # Created: 1993-05-16 @@ -11,8 +11,11 @@ scriptversion=2005-02-02.21 # bugs to or send patches to # . +nl=' +' +IFS=" "" $nl" errstatus=0 -dirmode="" +dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... @@ -103,13 +106,21 @@ esac for file do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file shift + IFS=$oIFS - pathcomp= for d do - pathcomp="$pathcomp$d" + test "x$d" = x && continue + + pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac @@ -124,7 +135,7 @@ do else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" - lasterr="" + lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then @@ -134,7 +145,7 @@ do fi fi - pathcomp="$pathcomp/" + pathcomp=$pathcomp/ done done diff --git a/configure b/configure index 08704fb..d90c7e7 100755 --- a/configure +++ b/configure @@ -1,25 +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 @@ else 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='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($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 @@ -63,157 +128,388 @@ fi # 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 @@ else 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'" @@ -231,15 +548,6 @@ 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 @@ tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 +exec 7<&0 &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 @@ ac_unique_file="common-src/amanda.h" # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # 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 # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #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 @@ x_libraries=NONE # 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 ;; @@ -541,33 +1365,45 @@ do --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- \ @@ -594,6 +1430,12 @@ do -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 ;; @@ -618,13 +1460,16 @@ do | --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) @@ -689,6 +1534,16 @@ do | --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 ;; @@ -741,24 +1596,20 @@ do -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 @@ Try \`$0 --help' for more information." >&2 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 @@ if test -n "$ac_prev"; then { (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 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- 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 @@ 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 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --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 @@ 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 if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory 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 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/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` @@ -1291,6 +2157,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1312,7 +2179,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1323,7 +2189,7 @@ 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 @@ -1345,9 +2211,7 @@ do -* ) 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 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # 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. { @@ -1372,20 +2236,34 @@ trap 'exit_status=$? _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 @@ _ASBOX 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 @@ -1423,26 +2307,24 @@ _ASBOX ## ----------- ## _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 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +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 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1506,15 +2391,33 @@ echo "$as_me: creating cache $cache_file" >&6;} >$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 @@ echo "$as_me: current value: $ac_new_val" >&2;} # 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,12 +2459,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (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" @@ -1584,108 +2480,163 @@ 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 +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: @@ -1721,8 +2664,8 @@ am__api_version="1.9" # 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 +2687,7 @@ case $as_dir/ in # 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. @@ -1763,21 +2706,22 @@ case $as_dir/ in ;; 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 +2731,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' 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 +2774,20 @@ echo "$as_me: error: newly created file is older than distributed files! 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` @@ -1858,45 +2802,60 @@ else 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 @@ -1909,54 +2868,57 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -1969,12 +2931,16 @@ else 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 @@ -1989,7 +2955,7 @@ fi # Define the identity of the package. PACKAGE=amanda - VERSION=2.5.2p1 + VERSION="2.6.0p2" cat >>confdefs.h <<_ACEOF @@ -2017,7 +2983,7 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} 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 +2993,8 @@ if test "$cross_compiling" != no; then 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 @@ -2041,32 +3007,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -2079,33 +3047,47 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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,55 +3101,48 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - 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) @@ -2178,10 +3153,17 @@ echo "$as_me: error: *** You must supply an argument to the --with-cflags option 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 +3172,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ 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 @@ -2204,32 +3186,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -2242,36 +3226,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -2284,61 +3283,24 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -2346,12 +3308,13 @@ 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 @@ -2365,7 +3328,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -2376,6 +3339,7 @@ do 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. @@ -2393,22 +3357,23 @@ 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 "$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 @@ -2421,36 +3386,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -2463,29 +3430,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 +3481,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +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 &5\"") >&5 - (eval $ac_compiler --version &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 &5\"") >&5 - (eval $ac_compiler -v &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 &5\"") >&5 - (eval $ac_compiler -V &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 +3534,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ 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 +3616,21 @@ See \`config.log' for more details." >&2;} 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 +3649,27 @@ See \`config.log' for more details." >&2;} 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 @@ -2646,9 +3680,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 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 +3695,14 @@ See \`config.log' for more details." >&2;} 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 +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 @@ -2714,12 +3753,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ 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 +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 +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 @@ -2848,12 +3966,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$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 +4005,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* 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,60 +4030,54 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +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', @@ -3104,8 +4221,6 @@ 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 +4228,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ 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 +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 +4266,20 @@ if test "$am__include" = "#"; then 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 @@ -3176,11 +4289,10 @@ fi - 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 @@ -3244,6 +4356,7 @@ 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 @@ -3269,13 +4382,11 @@ else 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= @@ -3289,8 +4400,8 @@ 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 +{ 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 @@ -3303,32 +4414,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 @@ -3341,27 +4454,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -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 +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 +4540,22 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +4564,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3451,24 +4577,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _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 +4603,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3496,8 +4621,8 @@ fi 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 +4645,22 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +4669,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3558,24 +4682,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _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 +4708,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3608,21 +4731,77 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ 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 @@ -3636,24 +4815,98 @@ cat >>conftest.$ac_ext <<_ACEOF 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 +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 +5010,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3780,18 +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 +5063,14 @@ 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 +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 +5093,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$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 +5109,35 @@ $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 + (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 @@ -3890,18 +5148,19 @@ fi 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 +5171,37 @@ $ac_includes_default #include _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 +5210,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _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 +5233,10 @@ 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: 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 +5260,18 @@ echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compi 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 +5281,7 @@ else fi -if test "$MINIX" = yes; then + if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 @@ -4050,20 +5297,12 @@ cat >>confdefs.h <<\_ACEOF #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 +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 +5378,18 @@ _ACEOF - # 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 : case "$host_os" in @@ -4179,8 +5423,8 @@ 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 +{ 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 @@ -4195,44 +5439,42 @@ int 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 +5483,8 @@ _ACEOF 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 +5501,7 @@ cat >>conftest.$ac_ext <<_ACEOF # include # define alloca _alloca # else -# if HAVE_ALLOCA_H +# ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX @@ -4277,44 +5519,42 @@ int 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 @@ -4328,15 +5568,15 @@ else # 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 +5586,7 @@ _ACEOF 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 @@ -4362,14 +5602,14 @@ fi 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 +5635,60 @@ cat >>conftest.$ac_ext <<_ACEOF #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 @@ -4469,8 +5701,8 @@ fi 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 +5715,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int find_stack_direction () { @@ -4500,17 +5733,26 @@ 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 +5765,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( 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 @@ -4544,18 +5788,19 @@ fi 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 +5811,37 @@ $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 + (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 +5850,22 @@ 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 +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 +5873,10 @@ 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: 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 +5900,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 @@ -4695,8 +5929,77 @@ done -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 +6013,53 @@ _ACEOF 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) @@ -4761,38 +6075,239 @@ _ACEOF + { 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 < conftestd1/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include_next +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat < 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 +_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 is self-contained" >&5 +echo $ECHO_N "checking whether 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 +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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 + +_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 +6318,37 @@ $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 + (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 +6357,22 @@ 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 +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 +6380,10 @@ 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: 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 +6407,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 @@ -4927,7 +6431,20 @@ fi 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 @@ -4940,6 +6457,12 @@ done + + + + + + : @@ -4947,8 +6470,8 @@ done - 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 +6501,35 @@ int x = AF_INET; struct in_addr y; struct sockaddr_in z; } _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 +6538,8 @@ _ACEOF 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 +6569,35 @@ int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; } _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 @@ -5091,77 +6606,240 @@ _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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 + +_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 + #endif + #include +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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 @@ -5185,13 +6863,13 @@ esac 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 @@ -5208,8 +6886,8 @@ 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 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 @@ -5238,11 +6916,11 @@ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 ;; 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 @@ -5272,17 +6950,17 @@ fi 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 +6972,15 @@ case `$LD -v 2>&1 &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 @@ -5314,24 +6992,22 @@ 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 @@ -5360,8 +7036,8 @@ fi; 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 +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 . 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 +7110,37 @@ $ac_includes_default #include _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 +7149,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _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 +7172,10 @@ 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: 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 +7199,18 @@ echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\" 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 +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 +7291,53 @@ 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 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. @@ -5700,8 +7357,8 @@ fi 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 +7371,53 @@ 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 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 @@ -5772,8 +7426,8 @@ fi 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 +7440,53 @@ 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 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 +7515,8 @@ _ACEOF 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 +7528,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +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 +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 @@ -5981,8 +7624,10 @@ 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 fi fi fi @@ -6008,34 +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 +7711,8 @@ _ACEOF - 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 @@ -6077,7 +7720,6 @@ else - use_additional=yes acl_save_prefix="$prefix" @@ -6092,10 +7734,9 @@ else 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 @@ -6118,11 +7759,11 @@ if test "${with_libpth_prefix+set}" = set; then fi fi -fi; +fi + LIBPTH= LTLIBPTH= INCPTH= - LIBPTH_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= @@ -6156,50 +7797,20 @@ fi; 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 @@ -6217,42 +7828,19 @@ 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 ;; @@ -6278,10 +7866,10 @@ 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 @@ -6313,7 +7901,7 @@ fi; 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" @@ -6332,7 +7920,6 @@ fi; 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 @@ -6483,21 +8070,21 @@ fi; 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 @@ -6512,15 +8099,13 @@ fi; 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= @@ -6546,7 +8131,6 @@ echo "${ECHO_T}$ac_cv_libpth_libs" >&6 - HAVE_LIBPTH=yes @@ -6570,34 +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 @@ -6643,18 +8225,250 @@ _ACEOF 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 + +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 +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 +8483,7 @@ int main () { #ifndef snprintf - char *p = (char *) snprintf; + (void) snprintf; #endif ; @@ -6677,38 +8491,34 @@ 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_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 @@ -6726,8 +8536,8 @@ fi -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 +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 +8664,47 @@ cat confdefs.h >>conftest.$ac_ext 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 @@ -6919,11 +8722,260 @@ _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 + #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; @@ -6932,14 +8984,12 @@ _ACEOF 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 +9004,7 @@ int main () { #ifndef strdup - char *p = (char *) strdup; + (void) strdup; #endif ; @@ -6962,38 +9012,34 @@ 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_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 @@ -7020,204 +9066,567 @@ fi - echo "$as_me:$LINENO: checking absolute name of " >&5 -echo $ECHO_N "checking absolute name of ... $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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 + _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 -#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 +#include -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#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 -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include +#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 -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include - +#include + /* 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 + /* 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 + /* 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 + /* 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 + /* 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 +#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 +#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 +9643,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -static int test_array [1 - 2 * !((EOVERFLOW) < 0)]; +static int test_array [1 - 2 * !((EOVERFLOW) >= 0)]; test_array [0] = 0 ; @@ -7242,27 +9651,120 @@ 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 +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include + +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=$? echo "$as_me:$LINENO: \$? = $ac_status" >&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 +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include + +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 +9791,48 @@ 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 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$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 +9860,36 @@ 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 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$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 +9904,8 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include -long longval () { return EOVERFLOW; } -unsigned long ulongval () { return EOVERFLOW; } +static long int longval () { return EOVERFLOW; } +static unsigned long int ulongval () { return EOVERFLOW; } #include #include int @@ -7425,35 +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 +9962,7 @@ echo "$as_me: failed program was:" >&5 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 @@ -7474,8 +9971,8 @@ rm -f conftest.val 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 +9984,15 @@ _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 "$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 +10001,58 @@ _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; +#include + 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. */ @@ -7545,146 +10060,53 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif +#include + 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=$? 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 @@ -7693,131 +10115,62 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - 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: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - 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 @@ -7826,65 +10179,57 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include +#include 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 +10239,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include +#include 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 @@ -7956,60 +10297,47 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +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 +10349,8 @@ _ACEOF - 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 +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 @@ -8102,12 +10426,17 @@ _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 @@ -8128,8 +10457,8 @@ fi # 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 +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 @@ -8194,144 +10523,290 @@ _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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 -/* 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 + #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 +#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 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. */ @@ -8339,172 +10814,227 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ +#include +#include +#include + 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 -#else -# include -#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 #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 #endif -#ifdef __cplusplus -} +#ifdef HAVE_SYS_VFS_H +#include #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 -#endif - -int -main () -{ -getaddrinfo(0, 0, 0, 0); - ; - return 0; -} +#include +#include + 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. */ @@ -8512,355 +11042,506 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 +#ifdef HAVE_SYS_PARAM_H +#include #endif -#ifdef __cplusplus -} +#ifdef HAVE_SYS_MOUNT_H +#include #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 +#ifdef HAVE_SYS_PARAM_H +#include #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 +#endif +#ifdef HAVE_SYS_FS_TYPES_H +#include +#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 -/* 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=$? 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=$? 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 +#include 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 +11567,467 @@ cat >>conftest.$ac_ext <<_ACEOF #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 #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 +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 +12035,8 @@ _ACEOF 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 +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 @@ -9039,8 +12117,8 @@ done - 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 @@ -9070,7 +12148,7 @@ int main () { #ifndef getaddrinfo - char *p = (char *) getaddrinfo; + (void) getaddrinfo; #endif ; @@ -9078,38 +12156,34 @@ 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_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 +12198,8 @@ _ACEOF 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 @@ -9155,7 +12229,7 @@ int main () { #ifndef freeaddrinfo - char *p = (char *) freeaddrinfo; + (void) freeaddrinfo; #endif ; @@ -9163,38 +12237,31 @@ main () } _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=$? 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 +12276,8 @@ _ACEOF 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 @@ -9240,7 +12307,7 @@ int main () { #ifndef gai_strerror - char *p = (char *) gai_strerror; + (void) gai_strerror; #endif ; @@ -9248,38 +12315,34 @@ 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_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 +12357,8 @@ _ACEOF 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 @@ -9325,7 +12388,7 @@ int main () { #ifndef getnameinfo - char *p = (char *) getnameinfo; + (void) getnameinfo; #endif ; @@ -9333,38 +12396,34 @@ 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_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 +12440,8 @@ _ACEOF 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 +12464,47 @@ cat >>conftest.$ac_ext <<_ACEOF #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 @@ -9462,12 +12518,20 @@ 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 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 @@ -9476,110 +12540,61 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 + 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. */ @@ -9587,49 +12602,58 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include + #include + #include + #include 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 @@ -9646,52 +12670,293 @@ else _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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#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 +12967,37 @@ $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 + (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 +13006,22 @@ 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 +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 +13029,10 @@ 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: 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 +13056,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 @@ -9826,131 +13080,278 @@ fi 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 declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -#include -#if HAVE_STDINT_H -#include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include #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 -#include +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 -#include +#include + 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 @@ -9958,19 +13359,6 @@ 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 -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; -test_array [0] = 0 ; return 0; @@ -9998,617 +13386,547 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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. */ -#include -#include + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + + + int main () { -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; -test_array [0] = 0 - ; - 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 -#include +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 is self-contained" >&5 +echo $ECHO_N "checking whether 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 -#include -long longval () { return sizeof (size_t) * CHAR_BIT - 1; } -unsigned long ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } -#include -#include +#include 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 -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 -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 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done + 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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; -test_array [0] = 0 +#include - ; - 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 -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 -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 -long longval () { return sizeof (size_t) <= sizeof (unsigned int); } -unsigned long ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } -#include -#include -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 - 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 declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i 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. @@ -10623,548 +13941,954 @@ cat >>conftest.$ac_ext <<_ACEOF #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 - #if HAVE_SYS_SOCKET_H - # include - #elif HAVE_WS2TCPIP_H - # include - #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 - #include - - 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 +#if HAVE_STDINT_H +#include #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 +#include 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 +#include +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 +#include +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 +#include +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 +#include +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 +#include +static long int longval () { return sizeof (size_t) * CHAR_BIT - 1; } +static unsigned long int ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } +#include +#include +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 +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 +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 +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 +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 +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 +static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); } +static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } +#include +#include +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 + 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 +14914,96 @@ cat >>conftest.$ac_ext <<_ACEOF #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 @@ -11289,76 +15012,137 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include + #if HAVE_SYS_SOCKET_H + # include + #elif HAVE_WS2TCPIP_H + # include + #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 + #include -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 @@ -11367,121 +15151,325 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 + +_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 +/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ +#if !(defined WCHAR_MIN && defined WCHAR_MAX) +#error "WCHAR_MIN, WCHAR_MAX not defined in " +#endif + + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #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 /* 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 () { @@ -11491,72 +15479,56 @@ 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 +15539,37 @@ $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 + (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 +15578,22 @@ 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 +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 +15601,10 @@ 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: 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 +15628,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 @@ -11691,5379 +15652,4890 @@ fi 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 - /* 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: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include 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: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include +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 - /* 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: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include 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 - /* 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: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include 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 - /* 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: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include 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 - /* 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: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include +static long int longval () { return sizeof ($gltype) * CHAR_BIT; } +static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } +#include +#include 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: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #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: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 +_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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 +_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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#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 is self-contained" >&5 +echo $ECHO_N "checking whether 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 +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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 -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 - 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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 -/* 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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 +_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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 +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 is standalone" >&5 +echo $ECHO_N "checking whether 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_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 " >&5 +echo $ECHO_N "checking absolute name of ... $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 - ;; -*) { { 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 <>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 <>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 <>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 <>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 -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 <>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 <>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 <>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 <>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 <>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 <>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 <>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 <>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 -#include -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 -#include -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 -#include -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 <>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 <>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 + 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 <conftest.xml + + + + +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 <conftest.xml + + + + +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 <>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 -#include -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 + 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 +#include + 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. */ @@ -17071,130 +20543,139 @@ _ACEOF 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 -#include + +#include +#include +#include + 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 +#include +#include +#include - 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 @@ -17203,56 +20684,66 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_cv_header_stdint> + +#include +#include +#include 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 @@ -17261,56 +20752,67 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include<$ac_cv_header_stdint> + +#include +#include +#include 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 @@ -17319,951 +20821,1230 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_cv_header_stdint> + +#include +#include +#include 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 +# include +# include +# include +# include +# include +# include -# ----------------- 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 +#include +#include + +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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + 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 +#else +# include +#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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + 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 +#else +# include +#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 +#endif +#if HAVE_UNISTD_H +# include +#endif +#if HAVE_FCNTL_H +# include +#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 +#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 +#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 +#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 @@ -18272,90 +22053,142 @@ 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_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 @@ -18364,165 +22197,191 @@ 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_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 @@ -18531,621 +22390,122 @@ 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_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 <>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 +22523,36 @@ u_int i = sizeof (struct sockaddr_storage) } _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 @@ -19204,22 +22561,46 @@ _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 +22609,397 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -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 +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +#include +#include +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 -#include -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 @@ -19774,412 +23008,279 @@ _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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 +#include -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 +# 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 -#include -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 @@ -20188,64 +23289,105 @@ _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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 +23395,519 @@ 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; -} -_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 <conftest.$ac_ext +#include "confdefs.h" +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_IPC_H +# include +#endif +#ifdef HAVE_SYS_SHM_H +# include +#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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 -#include -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 @@ -20602,412 +23916,590 @@ _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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 <>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 <>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 +#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 -#include + +/* 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 @@ -21016,2557 +24508,2752 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default + +#if HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# 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 +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# 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 +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# 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 +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# 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 -#include -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 <>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 <>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 <>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 -#include -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 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 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 +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 -#include -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 +#include 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 +#include 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 -#include -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 &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 &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 +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 +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 @@ -23574,118 +27261,279 @@ 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_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 &5\"") >&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 &5\"") >&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 &5\"") >&5 - (eval $ac_compiler -V &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 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 @@ -23694,2991 +27542,5629 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define curl_free to an innocuous variant, in case declares curl_free. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 +#include +#endif +#include + + + +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 to if __STDC__ is defined, since - # 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 -#else -# include -#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 +#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 to if __STDC__ is defined, since - # 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 -#else -# include -#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 +#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 &5\"") >&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 &5\"") >&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 &5\"") >&5 - (eval $ac_compiler -V &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 +#endif +#ifdef HAVE_SYS_MTIO_H +# include +#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 +#include +#include -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 +#include +#include - # 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 <&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 < 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 <> 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 +#include +#include + +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 +#include +#include + +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 +#include +#include +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 <&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 <&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 <>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 <&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 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 <>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 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 <&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 <>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 <>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 <>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 <>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 <>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 <>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 +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 +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 +#include + +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 +#include + +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 ;; + *) + 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 + ;; + 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 + ;; + *) + 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 &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 &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 + 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" >&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 + ;; variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then @@ -26688,13 +33174,13 @@ fi # # 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 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. ;; @@ -26707,208 +33193,15 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& $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.so - # instead of lib.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 ;; @@ -27015,12 +33308,8 @@ gnu*) 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*) shrext_cmds='.so' @@ -27105,44 +33394,7 @@ linux*oldld* | linux*aout* | linux*coff*) # 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*) @@ -27181,27 +33433,10 @@ nto-qnx*) ;; 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 ;; @@ -27307,33 +33542,36 @@ 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= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then +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" != 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, )" != no && - test "$hardcode_minus_L" != 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=relink + hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate + hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. - hardcode_action=unsupported + 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 || @@ -27379,28 +33617,125 @@ 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_check_lib_save_LIBS=$LIBS @@ -27428,43 +33763,42 @@ dlopen (); } _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 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 + ;; lt_cv_dlopen="dyld" lt_cv_dlopen_libs= @@ -27474,13 +33808,24 @@ 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 @@ -27531,50 +33876,38 @@ 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 @@ -27597,29 +33930,23 @@ 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 @@ -27630,30 +33957,46 @@ 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 declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - 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; } #ifdef __STDC__ # include @@ -27683,6 +34026,167 @@ char (*f) () = dlopen; } #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 () { @@ -27691,51 +34195,50 @@ 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 @@ -27757,202 +34260,139 @@ 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 case $lt_cv_dlopen in dlopen) @@ -27965,9 +34405,9 @@ fi 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 "$cross_compiling" = yes; then : @@ -27976,7 +34416,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext </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 void fnord() { int i=42;} int main () @@ -28027,97 +34502,132 @@ 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 to if __STDC__ is defined, since + # 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 +#else +# include +#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 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < -#endif + # Broken: fails on valid input. +continue +fi -#include +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 +_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 void fnord() { int i=42;} int main () @@ -28132,44 +34642,88 @@ int main () /* 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 to if __STDC__ is defined, since + # 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 +#else +# include +#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=$? 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 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 +_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 case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; @@ -28177,43 +34731,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 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 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -28237,180 +34755,307 @@ if test -f "$ltmain"; then 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 , 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 # A symbol stripping program STRIP=$lt_STRIP @@ -28424,8 +35069,14 @@ DLLTOOL="$DLLTOOL" # 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" # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -28435,7 +35086,7 @@ 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 +wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" @@ -28446,18 +35097,68 @@ 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 # 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 # Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks @@ -28465,8 +35166,12 @@ 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 # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -28477,55 +35182,87 @@ dlopen_self=$enable_dlopen_self # 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'" # 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 # 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 # 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 # 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'" # 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 +old_archive_cmds=$lt_old_archive_cmds_CXX 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 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # 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 # 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 # 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 # Commands to strip libraries. old_striplib=$lt_old_striplib @@ -28533,23 +35270,45 @@ striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects +predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects +postdep_objects=$lt_postdep_objects_CXX # 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 @@ -28558,16 +35317,18 @@ 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 +allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag +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 +# 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' # 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 @@ -28584,111 +35345,479 @@ 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 +# 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 +# ### 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 <&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 <&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 @@ -28699,111 +35828,56 @@ 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= +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 f77 test sources. +ac_ext=f -# Object file extension for compiled C++ test sources. +# Object file extension for compiled f77 test sources. objext=o -objext_CXX=$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=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -28828,1653 +35902,1416 @@ _lt_linker_boilerplate=`cat conftest.err` $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 &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 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 -with_gnu_ld=$lt_cv_prog_gnu_ld + cat <>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 <>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 + 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 + 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 + 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_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + 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_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_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_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_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_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_F77='-Wl,' + # PIC (with -KPIC) is the default. + 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_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_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_F77='-Wl,' + # All Alpha code is PIC. + 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_F77='-Wl,' + # All OSF/1 code is PIC. + 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_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_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' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + 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_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + 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_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_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: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_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 - # 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_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_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_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_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 <>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_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-%%"` + + 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_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_F77=no + cat <&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_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 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 + ;; - 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_F77=unsupported + # Joseph Beckenbach 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 + ;; - # 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, 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' + 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 - # 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_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_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 + ;; -## 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_F77=no + cat <&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 <&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 + ;; -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_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + 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_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 - # 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_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 + ;; - 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_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 - -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_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_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 - esac - done + 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_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 + + 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_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=' ' + 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_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 ;; - 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_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*) - # 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_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_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_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_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_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 - ;; - 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_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 - ;; - 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_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 + ;; 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_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 + ;; -# -# 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_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: 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_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_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_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 + ;; -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_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_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=: + ;; -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_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_F77='-rpath $libdir' + fi + 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_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_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_F77=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_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 + ;; -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_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 + ;; -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_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_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 + ;; -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_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_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' + ;; + + 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 + ;; + + *) + 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 @@ -30484,13 +37321,13 @@ fi # # Do we need to explicitly link libc? # -case "x$archive_cmds_need_lc_CXX" 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_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in + case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; @@ -30498,8 +37335,8 @@ x|xyes) # 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 @@ -30512,39 +37349,39 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& lib=conftest libobjs=conftest.$ac_objext deplibs= - wl=$lt_prog_compiler_wl_CXX + 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_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_F77=no else - archive_cmds_need_lc_CXX=yes + archive_cmds_need_lc_F77=yes fi - allow_undefined_flag_CXX=$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= @@ -31097,39 +37934,39 @@ uts4*) 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_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, F77)" != no && + test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink + hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=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_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_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || @@ -31140,62 +37977,119 @@ fi 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 +38102,69 @@ 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 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 +38178,76 @@ cat >>conftest.$ac_ext <<_ACEOF For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os -#ifdef __STDC__ -# include -#else -# include -#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 +38260,58 @@ 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 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 +38325,73 @@ cat >>conftest.$ac_ext <<_ACEOF For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# A symbol stripping program +STRIP=$lt_STRIP -#ifdef __STDC__ -# include -#else -# include -#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 +38404,58 @@ 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 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 +38468,58 @@ 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 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 +38532,108 @@ 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 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 @@ -31772,63 +38643,37 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < -#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 +# 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); } @@ -31852,15 +38697,18 @@ EOF 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 @@ -31870,7 +38718,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&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" @@ -31974,6 +38822,43 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 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 +38881,51 @@ if test -f "$ltmain"; then 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 | \ @@ -32054,16 +38939,64 @@ if test -f "$ltmain"; then 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 , 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 +39010,10 @@ build_libtool_libs=$enable_shared 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 +39039,16 @@ AR_FLAGS=$lt_AR_FLAGS 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 +39079,7 @@ 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_CXX +wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" @@ -32161,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 +39122,19 @@ dlopen_self=$enable_dlopen_self 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 +39151,25 @@ 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_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 +39177,23 @@ striplib=$lt_striplib # 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 @@ -32269,10 +39202,10 @@ 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_F77 # Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX +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 +39232,45 @@ shlibpath_var=$shlibpath_var 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_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_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_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_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_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_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_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_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_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec @@ -32346,22 +39279,22 @@ 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_F77" # Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX +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_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_F77 # Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX +include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname @@ -32385,62 +39318,136 @@ 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 -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 <>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 <>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 <>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; }; } ;; - 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_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="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='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -32467,9 +39474,9 @@ $rm conftest* # Allow CC to be a program name with arguments. 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 ) ;; @@ -32481,63 +39488,140 @@ 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 +# 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 +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 &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 &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 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' 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 ;; @@ -32545,7 +39629,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # 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' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) @@ -32555,27 +39639,40 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 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' ;; 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 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but @@ -32585,25 +39682,58 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # +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 # 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' + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) @@ -32611,8 +39741,8 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # 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 ;; @@ -32620,11 +39750,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 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' ;; 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 @@ -32632,120 +39762,131 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # +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' ;; 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' ;; 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' ;; 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' + 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_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) - lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' + lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; 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' ;; 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' ;; 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 ;; 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' ;; 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 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 + 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 @@ -32755,53 +39896,65 @@ else -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 @@ -32817,11 +39970,11 @@ else -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 @@ -32829,7 +39982,7 @@ else $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 @@ -32843,911 +39996,1286 @@ else $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 + ;; + 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 + 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 <&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 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 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 <&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 <&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 <>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 @@ -33757,13 +41285,13 @@ fi # # 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. ;; @@ -33771,8 +41299,8 @@ x|xyes) # 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 @@ -33785,39 +41313,39 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& 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= @@ -34370,39 +41898,39 @@ uts4*) 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 || @@ -34413,1097 +41941,1106 @@ fi 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 declares shl_load. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ -# Format of library name prefix. -libname_spec=$lt_libname_spec +#ifdef __STDC__ +# include +#else +# include +#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 declares dlopen. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + 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 +#else +# include +#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 < +#endif -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds +#include -# 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 < +#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 -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 <&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 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 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 if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ @@ -35912,112 +43449,82 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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; } newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' @@ -36057,17 +43564,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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; } osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then @@ -36211,10 +43709,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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 ;; *) @@ -36365,24 +43870,16 @@ aix4* | aix5*) 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.so - # instead of lib.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 + ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' @@ -36390,11 +43887,21 @@ amigaos*) 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' + ;; bsdi[45]*) version_type=linux @@ -36416,20 +43923,27 @@ cygwin* | mingw* | pw32*) 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 + ;; case $host_os in cygwin*) @@ -36453,9 +43967,16 @@ cygwin* | mingw* | pw32*) 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 ;; @@ -36497,21 +44018,15 @@ dgux*) 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' + ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new @@ -36552,15 +44067,8 @@ freebsd* | dragonfly*) 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; } hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to @@ -36608,23 +44116,59 @@ hpux9* | hpux10* | hpux11*) 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= ;; *) case $LD in # libtool.m4 will add one of these switches to LD @@ -36645,31 +44189,55 @@ irix5* | irix6* | nonstopux*) 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 @@ -36680,52 +44248,85 @@ linux*) 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 <>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 @@ -36735,10 +44336,34 @@ openbsd*) 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 openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no @@ -36804,20 +44429,60 @@ sunos4*) 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 ;; motorola) need_lib_prefix=no @@ -36859,35 +44524,38 @@ 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 + ;; striplib= old_striplib= @@ -36938,196 +44606,544 @@ else lt_cv_dlopen_libs= ;; - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; + 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 + +/* 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 + +/* 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 { (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 declares shl_load. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - 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 -#else -# include -#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 + ;; /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -37265,10 +45281,13 @@ 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 @@ -37331,30 +45350,19 @@ 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 /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -37392,27 +45400,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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 ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" @@ -37481,13 +45513,84 @@ fi fi -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 + ;; -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 + ;; -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' + ;; fi @@ -37495,19 +45598,95 @@ fi ;; 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 + ;; 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' + ;; save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" @@ -37530,7 +45709,11 @@ else #include #endif -#include + # 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 #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL @@ -37581,24 +45764,28 @@ int main () /* 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* @@ -37666,18 +45853,20 @@ else 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 exit (status); } @@ -37699,17 +45888,39 @@ EOF lt_cv_dlopen_self_static=no fi fi -rm -fr conftest* - +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } 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 @@ -38062,33 +46273,33 @@ 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 @@ -38096,28 +46307,398 @@ 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_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 + ;; + +# 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' + ;; + +# 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 + + 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 + ;; + +# 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 + + 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 + ;; + +# 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 + 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' + ;; # 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; } # ### 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; } else # If there is no Makefile yet, we rely on a make rule to execute @@ -38129,66 +46710,141 @@ else 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 <>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 ) ;; @@ -38361,11 +47017,34 @@ 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 <&2 # How to create reloadable object files. reload_flag=$lt_reload_flag @@ -38383,18 +47062,61 @@ libext="$libext" # 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 + ;; # Must we lock files when doing compilation? need_locks=$lt_need_locks @@ -38411,11 +47133,38 @@ dlopen_support=$enable_dlopen # 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 + ;; # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC @@ -38432,8 +47181,45 @@ thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # 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 # 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. @@ -38442,27 +47228,38 @@ library_names_spec=$lt_library_names_spec # 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 # 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 # Commands to strip libraries. old_striplib=$lt_old_striplib @@ -38472,39 +47269,133 @@ striplib=$lt_striplib # 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 # 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 + ;; # 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 + ;; # 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 @@ -38518,8 +47409,13 @@ 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 + # 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 + ;; # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath @@ -38527,8 +47423,39 @@ shlibpath_overrides_runpath=$shlibpath_overrides_runpath # 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 # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. @@ -38550,9 +47477,27 @@ hardcode_direct=$hardcode_direct_RC # 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 + ;; # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. @@ -38562,8 +47507,16 @@ hardcode_automatic=$hardcode_automatic_RC # 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' # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec @@ -38571,8 +47524,48 @@ 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_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 + ;; # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC @@ -38604,6 +47597,9 @@ else 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 ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -38615,25 +47611,83 @@ 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 rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 @@ -38658,44 +47712,182 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' +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 + ;; + 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 + ;; +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' + ;; +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 + ;; +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' + ;; -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 -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 if test $ac_cv_prog_gcc_traditional = no; then @@ -38816,13 +48008,30 @@ 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 +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 + ;; cat >>confdefs.h <<\_ACEOF #define const @@ -38851,42 +48060,24 @@ 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 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; } fi echo "$as_me:$LINENO: result: $amanda_cv_c_unsigned_long_constants" >&5 @@ -38899,71 +48090,33 @@ _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 echo "$as_me:$LINENO: checking for pid_t" >&5 @@ -39032,9 +48185,11 @@ _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 + 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 cat >conftest.$ac_ext <<_ACEOF @@ -39043,53 +48198,56 @@ _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 cat >>confdefs.h <<_ACEOF @@ -39099,9 +48257,10 @@ _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 @@ -39137,78 +48296,65 @@ _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 -#include -#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 cat >conftest.$ac_ext <<_ACEOF @@ -39220,101 +48366,59 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include +/* 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 ac_check_lib_save_LIBS=$LIBS @@ -39326,62 +48430,66 @@ 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 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 @@ -39393,99 +48501,59 @@ 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 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 # POSIX says lex can declare yytext either as a pointer or an array; the @@ -39496,60 +48564,65 @@ 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 cat >conftest.$ac_ext <<_ACEOF @@ -39563,42 +48636,55 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include +/* 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 @@ -39644,21 +48730,51 @@ 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 -#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 < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ @@ -39684,28 +48800,119 @@ 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 -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 < +#endif + +#include + +#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 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 cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 @@ -39792,7 +48999,15 @@ 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 ac_header_dirent=no @@ -40116,13 +49331,17 @@ 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 fi +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode for ac_header in sys/wait.h wait.h do @@ -40175,45 +49394,11 @@ 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 ac_header_preproc=no fi @@ -40273,35 +49458,20 @@ fi 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 +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ -#if HAVE_SYS_WAIT_H -# include -#else -# if HAVE_WAIT_H -# include -# 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 union wait x; int i; wait(&x); i = WIFEXITED(x) @@ -40349,428 +49519,29 @@ 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 - -#if HAVE_SYS_WAIT_H -# include -#else -# if HAVE_WAIT_H -# include -# 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 -#include -#include - -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 +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 @@ -40821,131 +49592,58 @@ 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 fi 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 -#if HAVE_SYS_TYPES_H -#include +#if HAVE_SYS_WAIT_H +# include +#else +# if HAVE_WAIT_H +# include +# endif #endif -#ifdef HAVE_NETINET_IN_SYSTM_H -#include + +#ifdef __STDC__ +pid_t wait(int *); #endif -#include +int +main () +{ -#include <$ac_header> + 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 @@ -40969,48 +49667,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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" +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 + +cat >>confdefs.h <<\_ACEOF +#define WAIT_USES_INT 1 _ACEOF 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 -#endif - +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ -#include <$ac_header> +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 @@ -41034,618 +49720,572 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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 + + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + + + +# 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 + + +# 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 + + + + + + + + + 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 -#include +# 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 -#include +# 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 +# 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 -#include +# 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 -#include -#include +# 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 -#include -#include -#include +# 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 -#include -#include +# 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" && @@ -41662,91 +50302,25 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include -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 -#include -#include -int -main () -{ - int device; - char *Command; - ioctl(device, STIOCMD, Command); ; return 0; @@ -41815,202 +50389,126 @@ cat >>conftest.$ac_ext <<_ACEOF # include # include -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 +#include +#include +#include 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 -#include -#include -#include - -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 - 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 @@ -42023,11 +50521,10 @@ if test x"$ac_cv_header_chio_h" = x"yes" || 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 ac_check_lib_save_LIBS=$LIBS LIBS="-lcur_colr $LIBS" @@ -42037,65 +50534,78 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include +#include +#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 -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 ac_check_lib_save_LIBS=$LIBS @@ -42116,45 +50626,36 @@ 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 LIBS="-lintl $LIBS" @@ -42164,13 +50665,70 @@ 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 @@ -42187,60 +50745,38 @@ 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 @@ -42257,42 +50793,72 @@ 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_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 HAVE_LIBRESOLV 1 _ACEOF @@ -42302,9 +50868,12 @@ _ACEOF 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 ac_check_lib_save_LIBS=$LIBS @@ -42316,63 +50885,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +# include +# include 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 ac_check_lib_save_LIBS=$LIBS @@ -42383,453 +50945,309 @@ _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 ac_check_lib_save_LIBS=$LIBS LIBS="-lvtblc $LIBS" @@ -42839,74 +51257,92 @@ _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 +#include +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: 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 ac_check_lib_save_LIBS=$LIBS @@ -42917,398 +51353,312 @@ _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 -#include -#include - +$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 -#include -#include - +$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 -#include -#include - +$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 -#include -#include - +$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 -#include -#include - +$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 ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" @@ -43318,75 +51668,93 @@ _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 +#include 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 ac_check_lib_save_LIBS=$LIBS @@ -43397,868 +51765,647 @@ _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=$? 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 +#include 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 -#else -# if defined(USE_DBM_H) -# include -# else -# if defined(USE_NDBM_H) -# include -# 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 -#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 -#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 @@ -44268,29 +52415,49 @@ 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 -#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 amanda_cv_have_char_max=no fi @@ -44305,12 +52472,23 @@ 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. */ @@ -44318,41 +52496,96 @@ _ACEOF 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 +#include +int +main () +{ -#include -#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 @@ -44361,319 +52594,234 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 _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 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 +$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 -# define alloca _alloca -# else -# if HAVE_ALLOCA_H -# include -# 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -44687,130 +52835,73 @@ webecray 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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. */ @@ -44818,19 +52909,34 @@ _ACEOF 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 +#include int 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; int main () @@ -44839,45 +52945,59 @@ main () } _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 @@ -44886,438 +53006,404 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 +#include +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 @@ -45326,502 +53412,407 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 +#include +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 @@ -45830,436 +53821,408 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 +#include +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 @@ -46268,107 +54231,54 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 @@ -46382,52 +54292,72 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 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 @@ -46436,160 +54366,157 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 + +_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 +#include +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 @@ -46601,161 +54528,140 @@ _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 +#include +#include 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=$? 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: 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 + #include + 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 @@ -46770,61 +54676,74 @@ _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 +#include +#endif +#include + -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 @@ -46833,1109 +54752,1228 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include +#ifdef STDC_HEADERS +#include +#include #endif +#include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ +#include -#ifdef __STDC__ -# include +#if HAVE_SYS_WAIT_H +# include #else -# include +# if HAVE_WAIT_H +# include +# 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ +#include -#ifdef __STDC__ -# include +#if HAVE_SYS_WAIT_H +# include #else -# include +# if HAVE_WAIT_H +# include +# 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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. */ @@ -47943,836 +55981,897 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ +#include +#include +#include -#ifdef __STDC__ -# include -#else -# include -#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, µ) != 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 +#include 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 _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 _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 @@ -48781,12 +56880,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. +/* Define backtrace_symbols_fd to an innocuous variant, in case declares backtrace_symbols_fd. For example, HP-UX 11i 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 to if __STDC__ is defined, since exists even on freestanding compilers. */ @@ -48796,87 +56895,95 @@ cat >>conftest.$ac_ext <<_ACEOF # include #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 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 +57009,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +57093,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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,33 +57112,34 @@ cat >>conftest.$ac_ext <<_ACEOF _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 ac_check_lib_save_LIBS=$LIBS @@ -49050,206 +57150,182 @@ _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 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 +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# 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 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 +57351,158 @@ cat >>conftest.$ac_ext <<_ACEOF #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,68 +57528,60 @@ cat >>conftest.$ac_ext <<_ACEOF #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 @@ -49515,14 +57655,14 @@ 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 +57688,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +57772,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +57791,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +57848,145 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +58012,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +58096,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +58115,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +58172,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +58256,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +58275,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +58332,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +58416,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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,34 +58435,36 @@ cat >>conftest.$ac_ext <<_ACEOF _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 @@ -50370,65 +58479,68 @@ cat >>conftest.$ac_ext <<_ACEOF # include # include #else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif +# include +#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 @@ -50436,13 +58548,14 @@ _ACEOF +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 +58581,140 @@ cat >>conftest.$ac_ext <<_ACEOF #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 -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 +58740,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +58824,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +58843,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +58900,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +58984,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59003,110 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59132,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +59216,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59235,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59292,76 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +59376,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59395,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59452,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +59536,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59555,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59612,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +59696,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59715,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59772,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +59856,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59875,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +59932,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +60016,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +60035,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +60092,140 @@ cat >>conftest.$ac_ext <<_ACEOF #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 -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 +60251,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +60335,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +60354,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +60411,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +60495,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +60514,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +60571,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +60655,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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,38 +60674,36 @@ cat >>conftest.$ac_ext <<_ACEOF _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 @@ -52511,46 +60718,95 @@ _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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 +_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 @@ -52587,82 +60843,6 @@ 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - #ifdef __STDC__ # include #else @@ -52671,83 +60851,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 -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. */ @@ -52755,174 +60931,158 @@ _ACEOF 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 declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -#include -#include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#if !STDC_HEADERS && !HAVE_STDLIB_H -char *malloc (); +#ifdef __STDC__ +# include +#else +# include #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 -# 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 +61108,141 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +61268,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +61352,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +61371,179 @@ cat >>conftest.$ac_ext <<_ACEOF _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 declares getpgrp. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ -for ac_func in pclose +#ifdef __STDC__ +# include +#else +# include +#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 +61569,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +61653,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +61672,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +61729,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +61813,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +61832,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +61889,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +61973,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +61992,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +62049,140 @@ cat >>conftest.$ac_ext <<_ACEOF #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 -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 +62208,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +62292,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +62311,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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,84 +62368,76 @@ cat >>conftest.$ac_ext <<_ACEOF #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 stdlib.h; do @@ -54086,12 +62452,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +62471,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +62528,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +62612,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +62631,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +62688,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +62772,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +62791,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +62848,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +62932,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +62951,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +63008,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +63092,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +63111,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +63168,136 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +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 -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 +63323,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +63407,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +63426,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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,87 +63483,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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_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. */ @@ -55196,12 +63567,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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))" @@ -55215,33 +63586,36 @@ cat >>conftest.$ac_ext <<_ACEOF _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 @@ -55257,67 +63631,79 @@ else #ifdef HAVE_SYS_SELECT_H # include #endif -#ifdef HAVE_SYS_SOCKET_H -# include + +#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 +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 &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 +63729,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +63813,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +63832,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +63889,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +63973,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +63992,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +64049,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +64133,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +64152,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +64209,139 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +64367,60 @@ cat >>conftest.$ac_ext <<_ACEOF #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 @@ -56018,15 +64430,14 @@ fi 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 +64463,76 @@ cat >>conftest.$ac_ext <<_ACEOF #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=$? 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 +64544,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +64563,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +64620,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +64704,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +64723,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +64780,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +64864,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +64883,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +64940,76 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +65024,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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,85 +65043,24 @@ cat >>conftest.$ac_ext <<_ACEOF _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 declares setpgid. - For example, HP-UX 11i declares gettimeofday. */ -#define setpgid innocuous_setpgid - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char setpgid (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 @@ -56789,14 +65104,14 @@ cat >>confdefs.h <<\_ACEOF _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 +65137,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +65221,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +65240,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 @@ -56987,80 +65297,81 @@ cat >>conftest.$ac_ext <<_ACEOF #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 @@ -57081,35 +65392,45 @@ main () 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 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 @@ -57117,14 +65438,14 @@ 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 +65471,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +65555,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +65574,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +65631,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +65715,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +65734,24 @@ cat >>conftest.$ac_ext <<_ACEOF _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 @@ -57455,181 +65759,249 @@ 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 declares $ac_func. - For example, HP-UX 11i 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 to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 <conftest.$ac_ext + rm -f conftest.c + cat <conftest.$ac_ext #include "confdefs.h" +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #ifdef HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_IPC_H -# include +#ifdef HAVE_SYS_SELECT_H +# include #endif -#ifdef HAVE_SYS_SHM_H -# include +#ifdef HAVE_SYS_SOCKET_H +# include #endif - -#ifdef __cplusplus -extern "C" void *shmat(int, void *, int); -#else -void *shmat(); +#ifdef HAVE_UNISTD_H +# include #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 &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 +66027,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +66111,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +66130,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +66187,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +66271,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +66290,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +66347,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +66431,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +66450,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +66507,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +66591,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +66610,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +66667,139 @@ cat >>conftest.$ac_ext <<_ACEOF #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,68 +66825,60 @@ cat >>conftest.$ac_ext <<_ACEOF #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 @@ -58588,14 +66952,14 @@ 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 +66985,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +67069,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +67088,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +67145,76 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +67229,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +67248,33 @@ cat >>conftest.$ac_ext <<_ACEOF _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 @@ -58939,12 +67283,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. +/* Define setpgid to an innocuous variant, in case declares setpgid. For example, HP-UX 11i 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 to if __STDC__ is defined, since exists even on freestanding compilers. */ @@ -58954,87 +67298,77 @@ cat >>conftest.$ac_ext <<_ACEOF # include #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 +67394,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +67478,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +67497,36 @@ cat >>conftest.$ac_ext <<_ACEOF _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 @@ -59209,12 +67535,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. +/* Define setpgrp to an innocuous variant, in case declares setpgrp. For example, HP-UX 11i 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 to if __STDC__ is defined, since exists even on freestanding compilers. */ @@ -59224,161 +67550,145 @@ cat >>conftest.$ac_ext <<_ACEOF # include #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 +67714,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +67798,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +67817,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +67874,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +67958,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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))" @@ -59679,42 +67973,138 @@ _ACEOF 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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#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 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 +68130,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +68214,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +68233,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +68290,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +68374,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +68393,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +68450,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +68534,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +68553,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +68610,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +68694,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +68713,36 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +68768,148 @@ cat >>conftest.$ac_ext <<_ACEOF #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,84 +68935,76 @@ cat >>conftest.$ac_ext <<_ACEOF #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 stdio.h; do @@ -60672,12 +69019,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +69038,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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,79 +69095,81 @@ cat >>conftest.$ac_ext <<_ACEOF #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 @@ -60839,27 +69190,24 @@ cat >>conftest.$ac_ext <<_ACEOF # include #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 () @@ -60869,34 +69217,14 @@ 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 rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -60905,8 +69233,12 @@ 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 @@ -60916,14 +69248,14 @@ 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 +69281,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +69365,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +69384,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +69441,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +69525,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +69544,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +69601,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +69685,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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,84 +69704,24 @@ cat >>conftest.$ac_ext <<_ACEOF _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 declares wait4. - For example, HP-UX 11i declares gettimeofday. */ -#define wait4 innocuous_wait4 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wait4 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#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 @@ -61504,22 +69752,18 @@ 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 +69789,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +69873,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +69892,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +69949,79 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +70033,12 @@ cat >>conftest.$ac_ext <<_ACEOF _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 +70052,38 @@ cat >>conftest.$ac_ext <<_ACEOF _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,180 +70109,81 @@ cat >>conftest.$ac_ext <<_ACEOF #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 @@ -62066,34 +70196,9 @@ cat >>conftest.$ac_ext <<_ACEOF #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 echo "$as_me:$LINENO: result: $amanda_cv_posix_filelocking" >&5 echo "${ECHO_T}$amanda_cv_posix_filelocking" >&6 @@ -62103,7 +70208,8 @@ 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 if test -z "$HAS_WORKING_FILE_LOCK"; then @@ -62131,31 +70237,14 @@ cat >>conftest.$ac_ext <<_ACEOF #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 rm -f /tmp/conftest.lock @@ -62164,25 +70253,28 @@ 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 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. */ @@ -62191,26 +70283,44 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#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=$? 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: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -62220,141 +70330,95 @@ sed 's/^/| /' conftest.$ac_ext >&5 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 -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 - - - - - - - - -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 WANT_SERVER_TRUE='#' WANT_SERVER_FALSE= @@ -62371,10 +70435,47 @@ else 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 WANT_TAPE_TRUE='#' WANT_TAPE_FALSE= @@ -62382,62 +70483,54 @@ 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 - - -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 - - -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 @@ -62531,17 +70624,15 @@ do 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 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 @@ -62589,185 +70680,263 @@ 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 - - - - - - - - - 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 declares wait4. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#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 - 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 <conftest.xml - - - - -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 declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#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 <conftest.xml - - - - -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. */ @@ -62775,151 +70944,155 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#ifdef HAVE_SYS_SOCKET_H -#include +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i 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 to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include #endif -#ifdef HAVE_NETINET_IN_H -#include + +#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 +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 -#include -#include -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 @@ -62940,39 +71113,58 @@ _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 +71173,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + 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 @@ -63050,24 +71228,24 @@ fi 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 +71284,13 @@ echo "$as_me: error: conditional \"WANT_AMPLOT\" was never defined. 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 +71298,185 @@ echo "$as_me: error: conditional \"WANT_CHG_SCSI\" was never defined. 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 +71487,24 @@ echo "$as_me: error: conditional \"WANT_SSH_SECURITY\" was never defined. 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 +71515,13 @@ echo "$as_me: error: conditional \"GCC_COMPILER\" was never defined. 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 +71546,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## 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 @@ -63199,8 +71594,43 @@ else 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='+ ' @@ -63214,18 +71644,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($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 @@ -63233,159 +71664,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' +as_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=: @@ -63394,7 +71786,28 @@ else 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'" @@ -63403,31 +71816,14 @@ 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 @@ -63435,30 +71831,20 @@ generated by GNU Autoconf 2.59. Invocation command line was 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. @@ -63466,7 +71852,7 @@ 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 +71871,22 @@ Configuration commands: $config_commands Report bugs to ." -_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 +71897,24 @@ while test $# != 0 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 @@ -63550,18 +71924,24 @@ Try \`$0 --help' for more information." >&2;} $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 @@ -63577,109 +71957,87 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + 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 +72049,965 @@ if $ac_need_defaults; then 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 >$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 >$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 >$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 >$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 >$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 @@ -64194,248 +73015,131 @@ _ACEOF 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 <>$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 <>$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 @@ -64446,135 +73150,39 @@ 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. @@ -64582,20 +73190,32 @@ echo "$as_me: executing $ac_dest commands" >&6;} # 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 @@ -64617,556 +73237,340 @@ echo X"$mf" | 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 " >>$ac_stdint -echo "#endif" >>$ac_stdint -echo "#endif" >>$ac_stdint -else - -cat >>$ac_stdint < "$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 -#else -#include + 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 <= 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 --git a/configure.in b/configure.in index a15742a..b5eee29 100644 --- a/configure.in +++ b/configure.in @@ -1,2781 +1,269 @@ - AC_INIT AC_CONFIG_SRCDIR([common-src/amanda.h]) AC_CONFIG_AUX_DIR(config) AC_CANONICAL_TARGET([]) +PACKAGE=amanda +AC_SUBST(PACKAGE) -CONFIGURE_COMMAND="'$0'" -for arg in "$@"; do - CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'" -done -AC_DEFINE_UNQUOTED(CONFIGURE_COMMAND,"$CONFIGURE_COMMAND", - [Saves the original ./configure command line arguments]) -AC_SUBST(CONFIGURE_COMMAND) - -AM_INIT_AUTOMAKE(amanda, 2.5.2p1) -AM_CONFIG_HEADER(config/config.h) - -AC_PREREQ(2.59) dnl Minimum Autoconf version required. - -if test -f "$srcdir/SNAPSHOT"; then - cat < "$srcdir/SNAPSHOT" -changequote(,) - snapdate=`sed -n '/^Snapshot Date: \([0-9]*\)/ s//\1/p' < $srcdir/SNAPSHOT` -changequote([,]) - test -z "$snapdate" || VERSION="$VERSION-$snapdate" - SNAPSHOT_STAMP=SNAPSHOT -else - SNAPSHOT_STAMP= -fi -AC_SUBST(SNAPSHOT_STAMP) - -if test -f config.local; then - echo "running local script ./config.local" - . ./config.local -fi - -dnl -dnl Set the version number of this release of Amanda from the VERSION -dnl string, which is set in AM_INIT_AUTOMAKE. -dnl -changequote(,) -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]*\(.*\)'`\" -changequote([,]) - -VERSION_SUFFIX="$VERSION" -AC_SUBST(VERSION_MAJOR) -AC_SUBST(VERSION_MINOR) -AC_SUBST(VERSION_PATCH) -AC_SUBST(VERSION_COMMENT) -AC_SUBST(VERSION_SUFFIX) +AM_INIT_AUTOMAKE(amanda, "2.6.0p2") +AC_CONFIG_HEADERS([config/config.h]) -dnl -dnl runtime and compile time paths -dnl -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" - -dnl -dnl Set up compiler location, basic CFLAGS, and include locations -dnl and library locations before we start checking the system -dnl configuration in more detail... -dnl +dnl Minimum Autoconf version required. +AC_PREREQ(2.59) -AC_ARG_WITH(cflags, - [ --with-cflags=CFLAGS arguments to the c compiler (-Wall, -g, etc)], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-cflags option.]) - ;; - esac - CFLAGS="$withval" - ]) - -CFLAGS="-D_GNU_SOURCE $CFLAGS" +# +# Take care of some early Amanda-specific setup +# +AMANDA_INIT_SUMMARY +AMANDA_SNAPSHOT_STAMP +AMANDA_SPLIT_VERSION +AMANDA_CONFIG_LOCAL +# +# Set up compiler location, basic flags, and include locations +# and library locations before we start checking the system +# configuration in more detail... +# AC_PROG_CC gl_EARLY gl_INIT AC_OBJEXT AC_EXEEXT -AC_SYS_LARGEFILE - -dnl -dnl Process tool locations for tools we need right away to configure. -dnl -AC_PATH_PROGS(GREP,grep,,$LOCSYSPATH) -if test -z "$GREP"; then - GREP=grep -fi -AC_DEFINE_UNQUOTED(GREP,"$GREP",[Define the location of the grep program. ]) -AC_PATH_PROGS(EGREP,egrep,,$LOCSYSPATH) - -AC_PATH_PROGS(AMLINT,lint,,/opt/SUNWspro/bin:$SYSLOCPATH) -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 - AC_PATH_PROGS(AMLINT,splint,,$SYSLOCPATH) - 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' -fi -AC_SUBST(AMLINTFLAGS) - -AC_ARG_WITH(includes, - [ --with-includes=DIR site header files for readline, etc in DIR], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-includes option.]) - ;; - esac - INCLUDE_DIRS="$withval" - ]) - -if test "$INCLUDE_DIRS"; then - for dir in $INCLUDE_DIRS; do - if test -d "$dir"; then - AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS -I$dir" - else - AC_MSG_WARN([*** Include directory $dir does not exist.]) - fi - done -fi - -AC_ARG_WITH(libraries, - [ --with-libraries=DIR site library directories for readline, etc in DIR], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-libraries option.]) - ;; - esac - LIBRARY_DIRS="$withval" - ]) - -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 - AC_MSG_WARN([*** Library directory $dir does not exist.]) - fi - done -fi - -dnl -dnl Process configuration flags -dnl - -AC_ARG_WITH(dumperdir, - [ --with-dumperdir=DIR where we install the dumpers [[EPREFIX/dumper]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-dumperdir option.]) - ;; - esac - DUMPER_DIR="$withval" - ], [ - test "x$prefix" = xNONE && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix=${prefix} - DUMPER_DIR=$exec_prefix/dumper - ] -) -DUMPER_DIR=`( - test "x$prefix" = xNONE && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix=${prefix} - eval echo "$DUMPER_DIR" -)` -AC_DEFINE_UNQUOTED(DUMPER_DIR,"$DUMPER_DIR",[Directory in which dumper interfaces should be installed and searched. ]) -AC_SUBST(DUMPER_DIR) - -AC_ARG_WITH(configdir, - [ --with-configdir=DIR runtime config files in DIR [[sysconfdir/amanda]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-configdir option.]) - ;; - *) CONFIG_DIR="$withval" - ;; - esac - ], - : ${CONFIG_DIR="$sysconfdir/amanda"} -) -CONFIG_DIR=`( - test "x$prefix" = xNONE && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix=${prefix} - eval echo "$CONFIG_DIR" -)` -AC_DEFINE_UNQUOTED(CONFIG_DIR,"$CONFIG_DIR", - [The directory in which configuration directories should be created. ]) -AC_SUBST(CONFIG_DIR) - -AC_ARG_WITH(indexdir, - [ --with-indexdir deprecated, use indexdir in amanda.conf], - [ AC_MSG_ERROR([*** --with-indexdir is deprecated, use indexdir in amanda.conf instead.]) - ],) - -AC_ARG_WITH(dbdir, - [ --with-dbdir deprecated, use infofile in amanda.conf], - [ AC_MSG_ERROR([*** --with-dbdir is deprecated, use infofile in amanda.conf instead.]) - ],) - -AC_ARG_WITH(logdir, - [ --with-logdir deprecated, use logfile in amanda.conf], - [ AC_MSG_ERROR([*** --with-logdir is deprecated, use logdir in amanda.conf instead.]) - ],) - -AC_ARG_WITH(suffixes, - [ --with-suffixes install binaries with version string appended to name], - USE_VERSION_SUFFIXES=$withval, - : ${USE_VERSION_SUFFIXES=no} -) -case "$USE_VERSION_SUFFIXES" in -y | ye | yes) - AC_DEFINE(USE_VERSION_SUFFIXES, 1, - [Define to have programs use version suffixes when calling other programs.]) - - 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 - ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-suffixes option.]) - ;; -esac -AC_SUBST(USE_VERSION_SUFFIXES) - -case "$target" in - *-hp-*) - CLIENT_SCRIPTS_OPT=amhpfixdevs - ;; - *-sni-sysv4) - CLIENT_SCRIPTS_OPT=amsinixfixdevs - ;; - *) - CLIENT_SCRIPTS_OPT= - ;; -esac - -AC_SUBST(CLIENT_SCRIPTS_OPT) - -AC_ARG_WITH(client-only, - [ --with-client-only deprecated, use --without-server], - [ AC_MSG_ERROR([*** --with-client-only is deprecated, use --without-server instead.]) - ],) -AC_ARG_WITH(server-only, - [ --with-server-only deprecated, use --without-client], - [ AC_MSG_ERROR([*** --with-server-only is deprecated, use --without-client instead.]) - ],) - -AC_ARG_WITH(client, - [ --without-client do not build client stuff], - [ - case "$withval" in - y | ye | yes) NO_CLIENT_MODE=false;; - n | no) NO_CLIENT_MODE=true;; - *) - AC_MSG_ERROR([*** You must not supply an argument to --with-client option.]) - ;; - esac - ] -) - -AC_ARG_WITH(server, - [ --without-server do not build server stuff (set --without-restore)], - [ - case "$withval" in - y | ye | yes) NO_SERVER_MODE=false ;; - n | no) NO_SERVER_MODE=true;NO_RESTORE_MODE=true;; - *) - AC_MSG_ERROR([*** You must not supply an argument to --with-server option. Maybe you meant --with-index-server=$withval]) - ;; - esac - ] -) -if test "x${NO_SERVER_MODE+set}" != xset ; then - NO_SERVER_MODE=false -fi - -AC_ARG_WITH(restore, - [ --without-restore do not build amrestore nor amidxtaped], - [ - case "$withval" in - y | ye | yes) NO_RESTORE_MODE=false;; - n | no) NO_RESTORE_MODE=true;; - *) - AC_MSG_ERROR([*** You must not supply an argument to --with-restore option.]) - ;; - esac - ] -) -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 - dnl - dnl --without-server and --without-restore is OK - dnl - true - else - AC_MSG_ERROR([*** --without-server requires --without-restore]) - fi -fi - -AC_ARG_WITH(amrecover, - [ --without-amrecover do not build amrecover], - [ - case "$withval" in - y | ye | yes) - if ${NO_CLIENT_MODE-false}; then - AC_MSG_ERROR([*** --without-client and --with-amrecover are incompatible]) - fi - NO_RECOVER_MODE=false;; - n | no) NO_RECOVER_MODE=true;; - *) - AC_MSG_ERROR([*** You must not supply an argument to --with-amrecover option.]) - ;; - esac - ] -) - -AC_ARG_WITH(index-server, - [ --with-index-server=HOST default amanda index server [[`uname -n`]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-index-server option.]) - ;; - *) DEFAULT_SERVER="$withval" - ;; - esac - ], - : ${DEFAULT_SERVER=`uname -n`} -) -AC_DEFINE_UNQUOTED(DEFAULT_SERVER,"$DEFAULT_SERVER", - [This is the default Amanda index server. ]) -AC_SUBST(DEFAULT_SERVER) - -AC_ARG_WITH(force-uid, - [ --without-force-uid do not force the uid to --with-user], - FORCE_USERID="$withval", - : ${FORCE_USERID=yes} -) -case "$FORCE_USERID" in -y | ye | yes) AC_DEFINE(FORCE_USERID, 1, - [Define to force to another user on client machines. ]) - ;; -n | no) : - ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-force-uid option.]) -esac - -AC_ARG_WITH(user, - [ --with-user=USER force execution to USER on client systems [[required]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-user option.]) - ;; - *) CLIENT_LOGIN="$withval" - ;; - esac - ] -) -if test "x${CLIENT_LOGIN+set}" != xset; then - AC_MSG_ERROR([*** --with-user=USER is missing]) -fi -AC_DEFINE_UNQUOTED(CLIENT_LOGIN,"$CLIENT_LOGIN", - [Define as a the user to force to on client machines. ]) -AC_SUBST(CLIENT_LOGIN) - -AC_ARG_WITH(group, - [ --with-group=GROUP group allowed to execute setuid-root programs [[required]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-group option.]) - ;; - *) SETUID_GROUP="$withval" - ;; - esac - ] -) -if test "x${SETUID_GROUP+set}" != xset; then - AC_MSG_ERROR([*** --with-group=GROUP is missing]) -fi -AC_SUBST(SETUID_GROUP) - -AC_ARG_WITH(owner, - [ --with-owner=USER force ownership of files to USER [[default == --with-user value]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-owner option.]) - ;; - *) BINARY_OWNER="$withval" - ;; - esac - ] -) -if test "x${BINARY_OWNER+set}" != xset ; then - BINARY_OWNER=$CLIENT_LOGIN -fi -AC_DEFINE_UNQUOTED(BINARY_OWNER,"$BINARY_OWNER", - [Define as the user who owns installed binaries. ]) -AC_SUBST(BINARY_OWNER) - -AC_ARG_WITH(rundump, - [ --with-rundump use rundump (setuid-root) to invoke dump], - [ - case "$withval" in - n | no | y | ye | yes) FORCE_USE_RUNDUMP="$withval";; - *) AC_MSG_ERROR([*** You must not supply an argument to --with-rundump option.]);; - esac - ] -) - -AC_ARG_WITH(config, - [ --with-config=CONFIG default configuration [[DailySet1]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-config option.]) - ;; - *) DEFAULT_CONFIG="$withval" - ;; - esac - ], - : ${DEFAULT_CONFIG=DailySet1} -) -AC_DEFINE_UNQUOTED(DEFAULT_CONFIG,"$DEFAULT_CONFIG", - [This is the default Amanda configuration. ]) -AC_SUBST(DEFAULT_CONFIG) - -AC_ARG_WITH(tape-server, - [ --with-tape-server=HOST default restoring tape server is HOST [[same as --with-index-server]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-tape-server option.]) - ;; - *) DEFAULT_TAPE_SERVER="$withval" - ;; - esac - ], - : ${DEFAULT_TAPE_SERVER=$DEFAULT_SERVER} -) -AC_DEFINE_UNQUOTED(DEFAULT_TAPE_SERVER,"$DEFAULT_TAPE_SERVER",[This is the default restoring Amanda tape server. ]) -AC_SUBST(DEFAULT_TAPE_SERVER) - -AC_ARG_WITH(tape-device, - [ --with-tape-device=ARG restoring tape server HOST's no rewinding tape drive], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-tape-device option.]) - ;; - *) DEFAULT_TAPE_DEVICE="$withval" - ;; - esac - ] -) - -if test ! -z "$DEFAULT_TAPE_DEVICE"; then - AC_DEFINE_UNQUOTED(DEFAULT_TAPE_DEVICE,"$DEFAULT_TAPE_DEVICE",[This is the default no-rewinding tape device. ]) - AC_SUBST(DEFAULT_TAPE_DEVICE) - EXAMPLE_TAPEDEV=$DEFAULT_TAPE_DEVICE -else - EXAMPLE_TAPEDEV="/dev/null" -fi -AC_SUBST(EXAMPLE_TAPEDEV) - -AC_ARG_WITH(ftape-raw-device, - [ --with-ftape-rawdevice=ARG raw device on tape server HOST's if using Linux ftape >=3.04d], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-ftape-rawdevice option.]) - ;; - *) DEFAULT_RAW_TAPE_DEVICE="$withval" - ;; - esac - ], - [ - if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then - AC_MSG_CHECKING(for raw ftape device) - dnl Look for tape devices in /dev. - raw_tape_dev=/dev/null - dnl Look for tape devices in /dev. - 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 - AC_MSG_RESULT($DEFAULT_RAW_TAPE_DEVICE) - fi - ] -) - -if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then - DEFAULT_RAW_TAPE_DEVICE=/dev/null -fi - -AC_DEFINE_UNQUOTED(DEFAULT_RAW_TAPE_DEVICE,"$DEFAULT_RAW_TAPE_DEVICE",[For Linux systems with floppy tapes: - * QIC volume table support via raw tape device. ]) -AC_SUBST(DEFAULT_RAW_TAPE_DEVICE) - -AC_ARG_WITH(rew-tape, - [ --with-rew-tape deprecated, use --with-tape-device], - [ AC_MSG_ERROR([*** --with-rew-tape is deprecated, use --with-tape-device instead.]) - ],) - -AC_ARG_WITH(norew-tape, - [ --with-norew-tape=ARG deprecated, use --with-tape-device], - [ AC_MSG_ERROR([*** --with-norew-tape is deprecated, use --with-tape-device instead.]) - ],) - -AC_ARG_WITH(changer-device, - [ --with-changer-device=ARG default tape changer device [[/dev/ch0 if it exists]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-changer-device option.]) - ;; - *) DEFAULT_CHANGER_DEVICE="$withval" - ;; - esac - ], - [ - if test -z "$DEFAULT_CHANGER_DEVICE" && - test -f /dev/ch0; then - DEFAULT_CHANGER_DEVICE=/dev/ch0 - fi - ] -) - -if test -z "$DEFAULT_CHANGER_DEVICE"; then - DEFAULT_CHANGER_DEVICE=/dev/null -fi - -AC_DEFINE_UNQUOTED(DEFAULT_CHANGER_DEVICE,"$DEFAULT_CHANGER_DEVICE",[This is the default changer device. ]) -AC_SUBST(DEFAULT_CHANGER_DEVICE) - -AC_ARG_WITH(fqdn, - [ --with-fqdn use FQDN's to backup multiple networks], - USE_FQDN=$withval, - : ${USE_FQDN=no} -) -case "$USE_FQDN" in -n | no) : ;; -y | ye | yes) AC_DEFINE(USE_FQDN,1,[Define for backups being done on a multiple networks and FQDNs are used. ]) - ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-fqdn option.]) - ;; -esac - -AC_ARG_WITH(broken-fsf, - [ --with-broken-fsf only enable if tape fsf calls fail mid-file], - HAVE_BROKEN_FSF=$withval, - : ${HAVE_BROKEN_FSF=no} -) -case "$HAVE_BROKEN_FSF" in -n | no) : ;; -y | ye | yes) AC_DEFINE(HAVE_BROKEN_FSF,1,[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. -]) - ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-broken-fsf option.]) - ;; -esac - -AC_ARG_WITH(reuseports, - [ --without-reuseaddr Don't closed network connections to be reused until full timeout period.], - [ case "$withval" in - y | ye | yes) - REUSEADDR=no;; - n | no) - REUSEADDR=yes;; - *) - REUSEADDR=no;; - esac - ], - [ REUSEADDR=yes; ]) -case "$REUSEADDR" in -n | no) : - ;; -y | ye | yes) - AC_DEFINE(USE_REUSEADDR,1,[Define to set SO_REUSEADDR on network connections.]) - ;; -*) - AC_MSG_ERROR([*** You must not supply an argument to --with-reuseports option.]) - ;; -esac - -AC_ARG_WITH(gnutar, - [ --with-gnutar[[=PROG]] use PROG as GNU tar executable [[default: looks for one]]], - [ - case "$withval" in - /*) GNUTAR="$withval";; - y|ye|yes) :;; - n|no) GNUTAR=;; - *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar]);; - esac - ] -) - -AC_ARG_WITH(smbclient, - [ --with-smbclient[[=PROG]] use PROG as Samba's smbclient executable [[default: looks for one]]], - [ - case "$withval" in - /*) SAMBA_CLIENT="$withval";; - y|ye|yes) :;; - n|no) SAMBA_CLIENT=;; - *) AC_MSG_ERROR([*** You must supply a full pathname to --with-smbclient]);; - esac - ] -) - -AC_ARG_WITH(samba-user, - [ --with-samba-user was deprecated], - [ AC_MSG_ERROR([*** The samba-user option was deprecated, the username go in the amandapass]) - ] -) - -AC_ARG_WITH(gnutar-listdir, - [ --with-gnutar-listdir=DIR gnutar directory lists go in DIR [[localstatedir/amanda/gnutar-lists]]], - [ - case "$withval" in - n | no) unset GNUTAR_LISTDIR ;; - y | ye | yes) : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists} ;; - /*) GNUTAR_LISTDIR="$withval" ;; - *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar-listdir]) - esac - ], - : ${GNUTAR_LISTDIR="$localstatedir/amanda/gnutar-lists"} -) -if test "$GNUTAR_LISTDIR"; then - GNUTAR_LISTDIR=`( - test "x$prefix" = xNONE && prefix=$ac_default_prefix - eval echo "$GNUTAR_LISTDIR" - )` - AC_DEFINE_UNQUOTED(GNUTAR_LISTED_INCREMENTAL_DIR,"$GNUTAR_LISTDIR",[The directory in which GNU tar should store directory lists for incrementals. ]) - GNUTAR_LISTED_INCREMENTAL_DIRX=$GNUTAR_LISTDIR -else - GNUTAR_LISTED_INCREMENTAL_DIRX= -fi -AC_SUBST(GNUTAR_LISTED_INCREMENTAL_DIRX) - -AC_ARG_WITH(gnutar-listed-incremental, - [ --with-gnutar-listed-incremental was deprecated, use --with-gnutar-listdir], - [ AC_MSG_ERROR([*** The gnutar-listed-incremental option was deprecated, use gnutar-listdir instead]) - ] -) -GNUTAR_LISTED_INCREMENTAL_DIR=$GNUTAR_LISTDIR -AC_SUBST(GNUTAR_LISTED_INCREMENTAL_DIR) - -AC_ARG_WITH(bsd-security, - [ --without-bsd-security do not use BSD rsh/rlogin style security], - BSD_SECURITY=$withval, - : ${BSD_SECURITY=yes} -) -case "$BSD_SECURITY" in -n | no) : ;; -y | ye | yes) AC_DEFINE(BSD_SECURITY,1,[Define to use BSD .rhosts/.amandahosts security. ]) - ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-bsd-security option.]) - ;; -esac - -AC_ARG_WITH(amandahosts, - [ --without-amandahosts use .rhosts instead of .amandahosts], - USE_AMANDAHOSTS=$withval, - : ${USE_AMANDAHOSTS=yes} -) -case "$USE_AMANDAHOSTS" in -n | no) : ;; -y | ye | yes) : - case "$BSD_SECURITY" in - y | ye | yes) AC_DEFINE(USE_AMANDAHOSTS,1,[Define if you want to use the .amandahosts for BSD security. ]) - ;; - esac - ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-amandahosts option.]) - ;; -esac - -dnl Specify --with-dbmalloc if you desire dbmalloc to be linked in - -AC_ARG_WITH(dbmalloc, - [ --with-dbmalloc=DIR Location of dbmalloc libs and headers], - DBMALLOC="$withval", - : ${DBMALLOC=no} -) - -case "$DBMALLOC" in -n | no) - DBMALLOCCFLAGS="" - DBMALLOCLIBS="" - ;; -*) - AC_CHECK_LIB(dbmalloc,malloc) - if test "x$ac_cv_lib_dbmalloc_malloc" != "xyes"; then - AC_MSG_WARN([*** dbmalloc library not found - no malloc debugging support!]) - DBMALLOCCFLAGS="" - DBMALLOCLIBS="" - else - DBMALLOCCFLAGS="-I$DBMALLOC -DUSE_DBMALLOC" - DBMALLOCLIBS="-L$DBMALLOC -ldbmalloc" - fi - ;; -esac +AMANDA_INIT_FLAGS +AMANDA_ADD_CPPFLAGS([-D_GNU_SOURCE]) -AC_ARG_WITH(ipv6, - AS_HELP_STRING([--with-ipv6], - [If IPv6 must be enabled (Default)]) -AS_HELP_STRING([--without-ipv6], - [If IPv6 must be disable]), - [ - case "$withval" in - y | ye | yes) amanda_ipv6=true;; - n | no) amanda_ipv6=false;; - *) - AC_MSG_ERROR([*** You must not supply an argument to --with-ipv6 option.]) - ;; - esac - ] -) - -dnl Specify --with-krb4-security if Kerberos software is in somewhere -dnl other than the listed KRB4_SPOTS. We only compile kerberos support in -dnl if the right files are there. - -: ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"} - -AC_ARG_WITH(krb4-security, - [ --with-krb4-security=DIR Location of Kerberos software [[/usr/kerberos /usr/cygnus /usr /opt/kerberos]]], - KRB4_SECURITY="$withval", - : ${KRB4_SECURITY=no} -) - -case "$KRB4_SECURITY" in -n | no) KRB4_SECURITY=no ;; -y | ye | yes) : ;; -*) KRB4_SPOTS="$KRB4_SECURITY" - KRB4_SECURITY=yes - ;; -esac - -AC_MSG_CHECKING(for Kerberos and Amanda kerberos4 bits) -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. - # - AC_MSG_RESULT(found in $dir) - KRB4_SECURITY=yes - AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ]) - 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. - # - AC_MSG_RESULT(found in $dir) - KRB4_SECURITY=yes - AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ]) - 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 - - if test "x$KRB4LDFLAGS" = "x" ; then - AC_MSG_RESULT(no libraries found) - fi -else - AC_MSG_RESULT(no) -fi - -AC_ARG_WITH(rsh-security, - [ --with-rsh-security use rsh as a transport], - RSH_SECURITY=$withval, - : ${RSH_SECURITY=yes} -) -case "$RSH_SECURITY" in -n | no) : ;; -y | ye | yes) AC_DEFINE(RSH_SECURITY,1,[Define if RSH transport should be enabled. ]) - ;; -*) AC_MSG_ERROR([*** You must not supply an argument the to --with-rsh-security option.]) - ;; -esac - -AC_ARG_WITH(ssh-security, - [ --with-ssh-security use ssh as a transport], - SSH_SECURITY=$withval, - : ${SSH_SECURITY=no} -) -case "$SSH_SECURITY" in -n | no) : ;; -y | ye | yes) AC_DEFINE(SSH_SECURITY,1,[Define if SSH transport should be enabled. ]) - SSH_SECURITY_SET=true - ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-ssh-security.]) - ;; -esac - -# find SSH and check for SSH options if we're using SSH security -if test x"$SSH_SECURITY" = "xyes"; then - AC_PATH_PROGS(SSH, ssh, , $LOCSYSPATH) - AC_DEFINE_UNQUOTED(SSH, "$SSH", [Path to the SSH binary]) - - AC_ARG_WITH(ssh-options, - AS_HELP_STRING([--with-ssh-options=@<:@OPTIONS@:>@], - [Use these ssh options for ssh security; the default should work]), - [ SSH_OPTIONS="$withval" ], - [ SSH_OPTIONS='' ] - ) - - case "$SSH_OPTIONS" in - y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to --with-ssh-options.]);; - *) : ;; - esac - - AC_MSG_CHECKING([SSH options]) - # 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 - - # 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 - AC_MSG_RESULT($SSH_OPTIONS) - - AC_DEFINE_UNQUOTED(SSH_OPTIONS, $SSH_OPTIONS, [Arguments to ssh]) -fi - -AC_ARG_WITH(bsdtcp-security, - [ --with-bsdtcp-security use tcp as a transport], - BSDTCP_SECURITY=$withval, - : ${BSDTCP_SECURITY=yes} -) -case "$BSDTCP_SECURITY" in -n | no) : ;; -y | ye | yes) AC_DEFINE(BSDTCP_SECURITY,1,[Define if BSDTCP transport should be enabled. ]) - BSDTCP_SECURITY_SET=true - ;; -*) AC_MSG_ERROR([*** You must not supply an argument the to --with-bsdtcp-security option.]) - ;; -esac - -AC_ARG_WITH(bsdudp-security, - [ --with-bsdudp-security use udp as a transport], - BSDUDP_SECURITY=$withval, - : ${BSDUDP_SECURITY=yes} -) -case "$BSDUDP_SECURITY" in -n | no) : ;; -y | ye | yes) AC_DEFINE(BSDUDP_SECURITY,1,[Define if BSDUDP transport should be enabled. ]) - BSDUDP_SECURITY_SET=true - ;; -*) AC_MSG_ERROR([*** You must not supply an argument the to --with-bsdudp-security option.]) - ;; -esac - -AC_ARG_WITH(server-principal, - [ --with-server-principal=ARG server host principal [["amanda"]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-server-principal option.]) - ;; - *) - SERVER_HOST_PRINCIPLE="$withval" - ;; - esac - ], - : ${SERVER_HOST_PRINCIPLE="amanda"} -) -AC_DEFINE_UNQUOTED(SERVER_HOST_PRINCIPLE,"$SERVER_HOST_PRINCIPLE",[The Kerberos server principle. ]) - -AC_ARG_WITH(server-instance, - [ --with-server-instance=ARG server host instance [["amanda"]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-server-instance option.]) - ;; - *) SERVER_HOST_INSTANCE="$withval" - ;; - esac - ], - : ${SERVER_HOST_INSTANCE="amanda"} -) -AC_DEFINE_UNQUOTED(SERVER_HOST_INSTANCE,"$SERVER_HOST_INSTANCE",[The Kerberos server instance. ]) - -AC_ARG_WITH(server-keyfile, - [ --with-server-keyfile=ARG server host key file [["/.amanda"]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-server-keyfile option.]) - ;; - *) SERVER_HOST_KEY_FILE="$withval" - ;; - esac - ], - : ${SERVER_HOST_KEY_FILE="/.amanda"} -) -AC_DEFINE_UNQUOTED(SERVER_HOST_KEY_FILE,"$SERVER_HOST_KEY_FILE",[The Kerberos server key file. ]) - -AC_ARG_WITH(client-principal, - [ --with-client-principal=ARG client host principal [["rcmd"]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-client-principal option.]) - ;; - *) CLIENT_HOST_PRINCIPLE="$withval" - ;; - esac - ], - : ${CLIENT_HOST_PRINCIPLE="rcmd"} -) -AC_DEFINE_UNQUOTED(CLIENT_HOST_PRINCIPLE,"$CLIENT_HOST_PRINCIPLE",[The Kerberos client host principle. ]) - -AC_ARG_WITH(client-instance, - [ --with-client-instance=ARG client host instance [[HOSTNAME_INSTANCE]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-client-instance option.]) - ;; - *) CLIENT_HOST_INSTANCE="$withval" - ;; - esac - ], - : ${CLIENT_HOST_INSTANCE=HOSTNAME_INSTANCE} -) -AC_DEFINE_UNQUOTED(CLIENT_HOST_INSTANCE,$CLIENT_HOST_INSTANCE,[The Kerberos client host instance. ]) - -AC_ARG_WITH(client-keyfile, - [ --with-client-keyfile=ARG client host key file [[KEYFILE]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-client-keyfile option.]) - ;; - *) CLIENT_HOST_KEY_FILE="$withval" - ;; - esac - ], - : ${CLIENT_HOST_KEY_FILE=KEYFILE} -) - -# 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 - -AC_DEFINE_UNQUOTED(CLIENT_HOST_KEY_FILE,$CLIENT_HOST_KEY_FILE,[The Kerberos client host key file. ]) - -AC_ARG_WITH(ticket-lifetime, - [ --with-ticket-lifetime=ARG ticket lifetime [[128]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-ticket-lifetime option.]) - ;; - *) TICKET_LIFETIME="$withval" - ;; - esac - ], - : ${TICKET_LIFETIME=128} -) -AC_DEFINE_UNQUOTED(TICKET_LIFETIME,$TICKET_LIFETIME,[The Kerberos ticket lifetime. ]) - -dnl Specify --with-krb5-security if Kerberos software is in somewhere -dnl other than the listed KRB5_SPOTS. We only compile kerberos support in -dnl if the right files are there. - -: ${KRB5_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"} - -AC_ARG_WITH(krb5-security, - [ --with-krb5-security=DIR Location of Kerberos V software [[/usr/kerberos /usr/cygnus /usr /opt/kerberos]]], - KRB5_SECURITY="$withval", - : ${KRB5_SECURITY=no} -) - -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 -AC_MSG_CHECKING(for Kerberos V) -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 - AC_MSG_RESULT(found in $KRB5_DIR_FOUND) - KRB5_SECURITY=yes - AC_DEFINE(KRB5_SECURITY,1,[Define if Kerberos 5 security is to be enabled. ]) - # - # 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 - AC_CHECK_LIB(krb5support,main) - KRB5LDFLAGS=-L$k5libdir - break -fi - -if test "x$KRB5LDFLAGS" = "x" ; then - AC_MSG_RESULT(no krb5 system libraries found) -fi - - -AC_ARG_WITH(low-tcpportrange, - [ --with-low-tcpportrange=low,high bind reserved TCP server sockets to ports within this range [unlimited] (mainly for amrecover)], - [ - LOW_TCPPORTRANGE="$withval" - ] -) - -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 - AC_MSG_ERROR([*** --with-low-tcpportrange requires two comma-separated positive numbers]) - 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 - AC_MSG_ERROR([*** the second TCP port number must be greater than the first in --with-low-tcpportrange]) - fi - if test $min_low_tcp_port -lt 512; then - AC_MSG_WARN([*** the low TCP port range should be 512 or greater in --with-low-tcpportrange]) - fi - if test $max_low_tcp_port -ge 1024; then - AC_MSG_WARN([*** the low TCP port range should be less than 1024 in --with-low-tcpportrange]) - fi - AC_DEFINE_UNQUOTED(LOW_TCPPORTRANGE,$LOW_TCPPORTRANGE,[A comma-separated list of two integers, determining the minimum and - maximum reserved TCP port numbers sockets should be bound to. (mainly for amrecover) ]) -fi - -AC_ARG_WITH(tcpportrange, - [ --with-tcpportrange=low,high bind unreserved TCP server sockets to ports within this range [[unlimited]]], - [ - TCPPORTRANGE="$withval" - ] -) -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 - AC_MSG_ERROR([*** --with-tcpportrange requires two comma-separated positive numbers]) - 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 - AC_MSG_ERROR([*** the second TCP port number must be greater than the first in --with-tcpportrange]) - fi - if test $min_tcp_port -lt 1024; then - AC_MSG_WARN([*** the TCP port range should be 1024 or greater in --with-tcpportrange]) - fi - if test $max_tcp_port -ge 65536; then - AC_MSG_WARN([*** the TCP port range should be less than 65536 in --with-tcpportrange]) - fi - AC_DEFINE_UNQUOTED(TCPPORTRANGE,$TCPPORTRANGE,[A comma-separated list of two integers, determining the minimum and - maximum unreserved TCP port numbers sockets should be bound to. ]) -fi - -AC_ARG_WITH(udpportrange, - [ --with-udpportrange=low,high bind reserved UDP server sockets to ports within this range [[unlimited]]], - [ - UDPPORTRANGE="$withval" - ] -) -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 - AC_MSG_ERROR([*** --with-udpportrange requires two comma-separated positive numbers]) - 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 - AC_MSG_ERROR([*** the second UDP port number must be greater than the first in --with-udpportrange]) - fi - if test $max_udp_port -ge 1024; then - AC_MSG_WARN([*** the UDP port range should be less than 1024 in --with-udpportrange]) - fi - if test $min_udp_port -le 0; then - AC_MSG_WARN([*** the UDP port range should be greater than 0 in --with-udpportrange]) - fi - AC_DEFINE_UNQUOTED(UDPPORTRANGE,$UDPPORTRANGE,[A comma-separated list of two integers, determining the minimum and - maximum reserved UDP port numbers sockets should be bound to. ]) -fi +dnl ------------------------------------------------------------------------- -AC_ARG_WITH(maxtapeblocksize, - [ --with-maxtapeblocksize=kb Maximum size of a tape block], - [ - MAXTAPEBLOCKSIZE="$withval" - ], - : ${MAXTAPEBLOCKSIZE=32} -) - -AC_DEFINE_UNQUOTED(MAX_TAPE_BLOCK_KB,($MAXTAPEBLOCKSIZE),[Maximum size of a tape block in KBytes.]) -AC_SUBST(MAXTAPEBLOCKSIZE) - -AC_ARG_WITH(db, - [ --with-db={text,db,dbm,gdbm,ndbm} use the selected database format [[text]]], - [ - case "$withval" in - "" | y | ye | yes | n | no) - AC_MSG_ERROR([*** You must supply an argument to the --with-db option.]) - ;; - *) DB_STYLE="$withval" - ;; - esac - ] -) -if test "$DB_STYLE"; then - case "$DB_STYLE" in - db | dbm | gdbm | ndbm | text) ;; - *) - AC_MSG_ERROR([*** Unknown argument $DB_STYLE given to --with-db. Choose from db, dbm, gdbm, ndbm, text.]) - DB_STYLE= - ;; - esac -fi - -AC_ARG_WITH(mmap, - [ --with-mmap force use of mmap instead of shared memory support], - FORCE_MMAP=$withval, - : ${FORCE_MMAP=no} -) -case "$FORCE_MMAP" in -y | ye | yes | n | no) : ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-mmap.]) - ;; -esac - -AC_ARG_WITH(buffered-dump, - [ --with-buffered-dump buffer the dumping sockets on the server for speed], - DUMPER_SOCKET_BUFFERING=$withval, - : ${DUMPER_SOCKET_BUFFERING=no} -) -case "$DUMPER_SOCKET_BUFFERING" in -n | no) : - ;; -y | ye | yes) AC_DEFINE(DUMPER_SOCKET_BUFFERING,1,[Define if dumper should buffer the sockets for faster throughput. ]) - ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-buffered-dump.]) - ;; -esac - -AC_ARG_WITH(assertions, - [ --with-assertions compile assertions into code], - ASSERTIONS="$withval", - : ${ASSERTIONS=no} -) -case "$ASSERTIONS" in -n | no) : ;; -y | ye | yes) AC_DEFINE(ASSERTIONS,1,[Define if you want assertion checking. ]) - ;; -*) AC_MSG_ERROR([*** You must not supply an argument to --with-assertions option.]) - ;; -esac - -AC_ARG_WITH(tmpdir, - [ --with-tmpdir[=/temp/dir] area Amanda can use for temp files [[/tmp/amanda]]], - tmpdir="$withval", - : ${tmpdir=yes} -) -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) AC_MSG_ERROR([*** --without-tmpdir is not allowed.]);; -y | ye | yes) - AMANDA_TMPDIR="/tmp/amanda";; -/*) - AMANDA_TMPDIR="$tmpdir";; -*) AC_MSG_ERROR([*** You must supply a full pathname to --with-tmpdir option.]);; -esac -AC_DEFINE_UNQUOTED(AMANDA_TMPDIR,"$AMANDA_TMPDIR",[The directory in which Amanda should create temporary files. ]) -AC_SUBST(AMANDA_TMPDIR) - -AC_ARG_WITH(debugging, - [ --with[[out]]-debugging[[=/debug/dir]] [[do not]] record runtime debugging information in specified directory [[--with-tmpdir]]], - debugging="$withval", - : ${debugging=yes} -) -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";; -*) AC_MSG_ERROR([*** You must supply a full pathname to --with-debugging option.]) - ;; -esac -case "$AMANDA_DBGDIR" in -"") :;; -*) AC_DEFINE(DEBUG_CODE,1,[Define if you want debugging. ]) - AC_DEFINE_UNQUOTED(AMANDA_DBGDIR,"$AMANDA_DBGDIR",[Location of Amanda directories and files. ]) - AC_SUBST(AMANDA_DBGDIR);; -esac - -AC_ARG_WITH(debug_days, - [ --with-debug-days=NN number of days to keep debugging files [[default=4]]], - debug_days="$withval", - : ${debug_days=4} -) -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" ;; -*) AC_MSG_ERROR([*** --with-debug-days value not numeric or out of range.]) - ;; -esac -AC_DEFINE_UNQUOTED(AMANDA_DEBUG_DAYS,$AMANDA_DEBUG_DAYS,[Number of days to keep debugging files. ]) -AC_SUBST(AMANDA_DEBUG_DAYS) - -AC_ARG_WITH(testing, - [ --with-testing[[=suffix]] use alternate service names], - TESTING="$withval", - : ${TESTING=no} -) -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" -AC_SUBST(SERVICE_SUFFIX) -AC_DEFINE_UNQUOTED(SERVICE_SUFFIX, "$SERVICE_SUFFIX",[A suffix that will be appended to service names. - * Useful for testing in parallel with a working version. ]) -AC_DEFINE_UNQUOTED(AMANDA_SERVICE_NAME, "$AMANDA_SERVICE_NAME", [The name for the Amanda service. ]) -AC_DEFINE_UNQUOTED(KAMANDA_SERVICE_NAME, "$KAMANDA_SERVICE_NAME", [The name for the Kerberized Amanda service. ]) - -( - test "x$prefix" = xNONE && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix=${prefix} - - tmp=`eval echo "$bindir"` - AC_DEFINE_UNQUOTED(bindir,"$tmp",[Directory in which user binaries should be installed. ]) - - tmp=`eval echo "$sbindir"` - AC_DEFINE_UNQUOTED(sbindir,"$tmp",[Directory in which administrator binaries should be installed. ]) - - tmp=`eval echo "$libexecdir"` - AC_DEFINE_UNQUOTED(libexecdir,"$tmp",[Directory in which internal binaries should be installed. ]) - - tmp=`eval echo $mandir` - AC_DEFINE_UNQUOTED(mandir,"$tmp",[Directory in which man-pages should be installed]) -) - -dnl Set the order of dump programs to look for. Finding the proper file -dnl system dumping program is problematic. Some systems, notably HP-UX -dnl and AIX, have both the backup and dump programs. HP-UX can't use the -dnl the backup program while AIX systems can't use the dump program. So -dnl a variable is set up here to specify the order of dump programs to -dnl search for on the system. -DUMP_PROGRAMS="ufsdump dump backup" -GETCONF_LFS="LFS" - -dump_returns_1= -xenix_tapeio= -case "$target" in - *-dec-osf*) - AC_DEFINE(STATFS_OSF1,1,[Define on OSF1. ]) - ;; - *-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 - AC_DEFINE(AIX_TAPEIO,1,[Define on AIX. ]) - AC_DEFINE(AIX_BACKUP,1,[Define on AIX. ]) - ;; - m88k-motorola-sysv4) - ;; - *-nextstep3) - ;; - *-pc-bsdi*) - ;; - *-pc-linux-*) - ;; - *-redhat-linux-*) - ;; - *-suse-linux-*) - ;; - x86_64-*-linux-*) - ;; - alpha*-*-linux-*) - ;; - sparc*-*-linux-*) - ;; - powerpc-*-linux-*) - ;; - *-sgi-irix3*) - dnl The old cc won't work! - CC=gcc - ;; - *-sgi-irix4*) - ;; - *-sgi-irix5*) - ;; - *-sgi-irix6*) - ;; - *-solaris2*) - ;; - *-sun-sunos4.1*) - ;; - *-ultrix*) - : ${USE_RUNDUMP=yes} - AC_DEFINE(STATFS_ULTRIX,1,[Define on Ultrix. ]) - dump_returns_1=yes - ;; - *-sysv4.2uw2*) - AC_DEFINE(UWARE_TAPEIO,1,[Define on UnixWare. ]) - ;; - *-sco3.2v4*) - DEV_PREFIX=/dev/ - RDEV_PREFIX=/dev/ - ;; - *-sco3.2v5*) - xenix_tapeio=yes - AC_DEFINE(STATFS_SCO_OS5,1,[Define on SCO OS5. ]) - ;; - i386-pc-isc4*) - xenix_tapeio=yes - ;; - *-sni-sysv4) - ;; - *-pc-cygwin) - AC_DEFINE(IGNORE_TAR_ERRORS,1,[Define on Cygwin. ]) - # Cygwin needs PATH to find cygwin1.dll - AC_DEFINE(NEED_PATH_ENV,1,[Define on Cygwin. ]) - AC_DEFINE(IGNORE_UID_CHECK,1,[Define on Cygwin. ]) - AC_DEFINE(IGNORE_FSTAB,1,[Define on Cygwin. ]) - AC_DEFINE(DONT_SUID_ROOT,1,[Define on Cygwin. ]) - NEED_SETUID_CLIENT=false - NEED_RUNTIME_PSEUDO_RELOC=true - BROKEN_IPV6=true - ;; - *) - cat <&1`" in - *GNU*tar* | *Free*paxutils* ) - AC_DEFINE_UNQUOTED(GNUTAR,"$GNUTAR",[Define to the location of Gnu tar. ]) - ;; - *) - AC_MSG_WARN([*** $GNUTAR is not GNU tar, so it will not be used.]) - GNUTAR= - ;; - esac -fi - -AC_PATH_PROGS(SAMBA_CLIENT,smbclient,,$LOCSYSPATH) -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 - ;; - *) - AC_MSG_WARN([*** $SAMBA_CLIENT does not seem to be smbclient, so it will not be used.]) - SAMBA_CLIENT= - ;; - esac - if test -n "$SAMBA_CLIENT"; then - AC_DEFINE_UNQUOTED(SAMBA_CLIENT,"$SAMBA_CLIENT",[Define the location of smbclient for backing up Samba PC clients. ]) - AC_DEFINE_UNQUOTED(SAMBA_VERSION, $smbversion, - [Not the actual samba version, just a number that should be increased whenever we start to rely on a new samba feature. ]) - fi -fi - -AC_PATH_PROGS(GZIP,gzip,,$LOCSYSPATH) -if test "$GZIP"; then - AC_DEFINE(HAVE_GZIP,1,[Define if Amanda is using the gzip program. ]) - 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 - dnl If we have to use cat, we don't define COMPRESS_FAST_OPT, - dnl COMPRESS_BEST_OPT, or UNCOMPRESS_OPT as "" since cat will look - dnl look for a file by the name of "". - AC_MSG_WARN([*** Cannot find either gzip or compress. Using cat. ***]) - COMPRESS_PATH="$CAT" - COMPRESS_SUFFIX="" - COMPRESS_FAST_OPT="" - COMPRESS_BEST_OPT="" - UNCOMPRESS_PATH="$CAT" - UNCOMPRESS_OPT="" - fi -fi -AC_DEFINE_UNQUOTED(COMPRESS_PATH,"$COMPRESS_PATH",[Define to the exact path to the gzip or the compress program. ]) -AC_DEFINE_UNQUOTED(COMPRESS_SUFFIX,"$COMPRESS_SUFFIX",[Define to the suffix for the COMPRESS_PATH compression program. ]) -AC_DEFINE_UNQUOTED(COMPRESS_FAST_OPT,"$COMPRESS_FAST_OPT",[Define as the command line option for fast compression. ]) -AC_DEFINE_UNQUOTED(COMPRESS_BEST_OPT,"$COMPRESS_BEST_OPT",[Define as the command line option for best compression. ]) -AC_DEFINE_UNQUOTED(UNCOMPRESS_PATH,"$UNCOMPRESS_PATH",[Define as the exact path to the gzip or compress command. ]) -AC_DEFINE_UNQUOTED(UNCOMPRESS_OPT,"$UNCOMPRESS_OPT",[Define as any optional arguments to get UNCOMPRESS_PATH to uncompress. ]) - -AC_PATH_PROGS(SORT,sort,,$LOCSYSPATH) -if test -z "$SORT"; then - if $NO_SERVER_MODE; then - SORT="NONE" - else - AC_MSG_ERROR([Set SORT to the path of the sort program.]) - fi -fi -AC_DEFINE_UNQUOTED(SORT_PATH,"$SORT",[Define to the exact path to the sort program. ]) - -AC_PATH_PROGS(MAILER,Mail mailx mail) -if test -z "$MAILER"; then - if $NO_SERVER_MODE; then - MAILER="NONE" - AC_MSG_WARN([*** WARNING: Amanda cannot send mail reports without these programs.]) - else - AC_MSG_ERROR([Set MAILER to some program that accepts -s subject user < message_file.]) - fi -fi -AC_DEFINE_UNQUOTED(MAILER,"$MAILER",[Define to a program that understands -s "subject" user < message_file]) - -AC_PATH_PROGS(MT,mt,mt,$LOCSYSPATH) - -AC_PATH_PROGS(CHIO,chio,chio,$LOCSYSPATH) - -AC_PATH_PROGS(CHS,chs,chs,$LOCSYSPATH) +AC_PROG_MKDIR_P +AMANDA_PROG_DD +AMANDA_PROG_BASH +AMANDA_PROG_SORT +AMANDA_PROG_MAILER +AMANDA_PROG_MT +AMANDA_PROG_PRINT +AMANDA_PROG_PCAT +AMANDA_PROG_PERL +AMANDA_PROG_SWIG + +dnl ------------------------------------------------------------------------- -AC_PATH_PROGS(MTX,mtx,mtx,$LOCSYSPATH) - -AC_PATH_PROGS(MCUTIL,mcutil,mcutil,$LOCSYSPATH) - -AC_PATH_PROGS(PRINT, lpr lp) -if test ! -z "$PRINT"; then - AC_DEFINE_UNQUOTED(LPRCMD, "$PRINT",[Command for starting printing jobs. ]) - AC_CACHE_CHECK([which flag to use to select a printer], - amanda_cv_printer_flag, [ - amanda_cv_printer_flag=$PRINTER_FLAG - case "$PRINT" in - lpr|*/lpr) amanda_cv_printer_flag="-P";; - lp|*/lp) amanda_cv_printer_flag="-d";; - esac - ]) - if test ! -z "$amanda_cv_printer_flag"; then - AC_DEFINE_UNQUOTED(LPRFLAG, "$amanda_cv_printer_flag",[LPRCMD switch for specifying a printer name. ]) - else - AC_MSG_WARN([*** WARNING: amanda will always print to the default printer]) - fi -fi - -AC_PATH_PROGS(PCAT,pcat,,$LOCSYSPATH) -AC_PATH_PROGS(PERL,perl5 perl,,$LOCSYSPATH) - -dnl AC_PATH_PROGS(MAKEINFO,makeinfo,,$LOCSYSPATH) -dnl AC_PATH_PROGS(TEXI2DVI,texi2dvi,,$LOCSYSPATH) - -AC_PATH_PROGS(DUMP,$DUMP_PROGRAMS,,$SYSLOCPATH) -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 -AC_PATH_PROGS(RESTORE,ufsrestore restore,,$SYSLOCPATH) -if test "$DUMP" -a "$RESTORE"; then - AC_DEFINE_UNQUOTED(DUMP,"$DUMP",[Define the location of the ufsdump, backup, or dump program. ]) - AC_DEFINE_UNQUOTED(RESTORE,"$RESTORE",[Define the location of the ufsrestore or restore program. ]) - if test -x $DUMP; then - AC_CACHE_CHECK( - [whether $DUMP supports -E or -S for estimates], - amanda_cv_dump_estimate, - [ - case "$DUMP" in - *dump) - AC_TRY_COMMAND($DUMP 9Ef /dev/null /dev/null/invalid/fs 2>&1 - | $GREP -v Dumping - | $GREP -v Date - | $GREP -v Label >conftest.d-E 2>&1) - cat conftest.d-E >&AS_MESSAGE_LOG_FD() - AC_TRY_COMMAND($DUMP 9Sf /dev/null /dev/null/invalid/fs 2>&1 - | $GREP -v Dumping - | $GREP -v Date - | $GREP -v Label >conftest.d-S 2>&1) - cat conftest.d-S >&AS_MESSAGE_LOG_FD() - AC_TRY_COMMAND($DUMP 9f /dev/null /dev/null/invalid/fs 2>&1 - | $GREP -v Dumping - | $GREP -v Date - | $GREP -v Label >conftest.d 2>&1) - cat conftest.d >&AS_MESSAGE_LOG_FD() - if AC_TRY_COMMAND(cmp conftest.d-E conftest.d 1>&2); then - amanda_cv_dump_estimate=E - elif AC_TRY_COMMAND(cmp conftest.d-S conftest.d 1>&2); 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 - ]) - else - AC_MSG_WARN([*** $DUMP is not executable, cannot run -E/-S test]) - amanda_cv_dump_estimate=no - fi - if test "x$amanda_cv_dump_estimate" != xno; then - AC_DEFINE_UNQUOTED(HAVE_DUMP_ESTIMATE, "$amanda_cv_dump_estimate",[Define to the string that enables dump estimates. ]) - fi - - AC_ARG_WITH(dump-honor-nodump, - [ --with-dump-honor-nodump if dump supports -h, use it for level0s too], - [ if test -x $DUMP; then - AC_CACHE_CHECK( - [whether $DUMP supports -h (honor nodump flag)], - amanda_cv_honor_nodump, - [ - case "$DUMP" in - *dump) - AC_TRY_COMMAND($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) - cat conftest.d-h >&AS_MESSAGE_LOG_FD() - AC_TRY_COMMAND($DUMP 9f /dev/null /dev/null/invalid/fs 2>&1 - | $GREP -v Dumping - | $GREP -v Date - | $GREP -v Label >conftest.d 2>&1) - cat conftest.d >&AS_MESSAGE_LOG_FD() - if AC_TRY_COMMAND(diff conftest.d-h conftest.d 1>&2); 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 - ]) - else - AC_MSG_WARN([*** $DUMP is not executable, cannot run -h test]) - amanda_cv_honor_nodump=no - fi - if test "x$amanda_cv_honor_nodump" = xyes; then - AC_DEFINE(HAVE_HONOR_NODUMP,1,[Define this if dump accepts -h for honoring nodump. ]) - fi - ]) -fi - -AC_PATH_PROGS(XFSDUMP,xfsdump,,$SYSLOCPATH) -AC_PATH_PROGS(XFSRESTORE,xfsrestore,,$SYSLOCPATH) -if test "$XFSDUMP" -a "$XFSRESTORE"; then - AC_DEFINE_UNQUOTED(XFSDUMP,"$XFSDUMP",[Define the location of the xfsdump program on Irix hosts. ]) - AC_DEFINE_UNQUOTED(XFSRESTORE,"$XFSRESTORE",[Define the location of the xfsrestore program on Irix hosts. ]) - AC_MSG_WARN([*** xfsdump causes the setuid-root rundump program to be enabled]) - AC_MSG_WARN([[*** to disable it, just #undef XFSDUMP in config/config.h]]) -fi - -VXSYSLOCPATH="$SYSLOCPATH:/usr/lib/fs/vxfs" -AC_PATH_PROGS(VXDUMP,vxdump,,$VXSYSLOCPATH) -AC_PATH_PROGS(VXRESTORE,vxrestore,,$VXSYSLOCPATH) -if test "$VXDUMP" -a "$VXRESTORE"; then - AC_DEFINE_UNQUOTED(VXDUMP,"$VXDUMP",[Define the location of the vxdump program on HPUX and SINIX hosts or on - * other hosts where the Veritas filesystem (vxfs) has been installed. ]) - AC_DEFINE_UNQUOTED(VXRESTORE,"$VXRESTORE",[Define the location of the vxrestore program on HPUX and SINIX hosts or on - * other hosts where the Veritas filesystem (vxfs) has been installed. ]) -fi - -AC_PATH_PROGS(VDUMP,vdump,,$SYSLOCPATH) -AC_PATH_PROGS(VRESTORE,vrestore,,$SYSLOCPATH) -if test "$VDUMP" -a "$VRESTORE"; then - AC_DEFINE_UNQUOTED(VDUMP,"$VDUMP",[Define the location of the vdump program. ]) - AC_DEFINE_UNQUOTED(VRESTORE,"$VRESTORE",[Define the location of the vrestore program. ]) -fi - -dnl Handle all of the substitutions to make amplot work. -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 -AC_SUBST(AMPLOT_COMPRESS) -AC_SUBST(AMPLOT_CAT_GZIP) -AC_SUBST(AMPLOT_CAT_COMPRESS) -AC_SUBST(AMPLOT_CAT_PACK) - -AC_SOCKADDR_STORAGE - -# 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. +# Compiler / system characteristics # -AC_MSG_CHECKING(printf format modifier for 64-bit integers) -AC_TRY_RUN([ -#include -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)); -} -], - [AC_MSG_RESULT(ll) - LL_FMT="%lld"; LL_RFMT="lld"], - [AC_MSG_RESULT(l) - LL_FMT="%ld"; LL_RFMT="ld"], - [AC_MSG_RESULT(assuming target platform uses ll) - LL_FMT="%lld"; LL_RFMT="lld"]) -AC_DEFINE_UNQUOTED(LL_FMT,"$LL_FMT", - [Format for a long long printf. ]) -AC_DEFINE_UNQUOTED(LL_RFMT,"$LL_RFMT", - [Format for a long long printf. ]) -AC_SUBST(LL_FMT) -AC_SUBST(LL_RFMT) -dnl Empty GZIP so that make dist works. -GZIP= +# +# compiler +# +AC_PROG_GCC_TRADITIONAL +AC_C_CONST +AC_C_BIGENDIAN -dnl Checks for compilers, typedefs, structures, and compiler characteristics. -dnl Check for large file compilation environment. -need_resetofs=yes -AC_CACHE_CHECK( - [for large file compilation CFLAGS], - amanda_cv_LFS_CFLAGS, - [ - 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 - ] -) -AC_CACHE_CHECK( - [for large file compilation LDFLAGS], - amanda_cv_LFS_LDFLAGS, - [ - 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 - ] -) -AC_CACHE_CHECK( - [for large file compilation LIBS], - amanda_cv_LFS_LIBS, - [ - 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 - ] -) -if test "x$need_resetofs" = xyes; then - AC_DEFINE(NEED_RESETOFS,1,[Define if we have to reset tape offsets when reacing 2GB. ]) -fi +# GCC_COMPILER is needed in the gnulib Makefile to silence errors +AM_CONDITIONAL([GCC_COMPILER], [test "x$GCC" = "xyes"]) +# +# Warnings +# +AMANDA_ENABLE_GCC_WARNING([parentheses]) +AMANDA_ENABLE_GCC_WARNING([declaration-after-statement]) +AMANDA_ENABLE_GCC_WARNING([missing-prototypes]) +AMANDA_ENABLE_GCC_WARNING([strict-prototypes]) +AMANDA_ENABLE_GCC_WARNING([missing-declarations]) +AMANDA_ENABLE_GCC_WARNING([format]) +AMANDA_ENABLE_GCC_WARNING([sign-compare]) +AMANDA_ENABLE_GCC_WARNING([float-equal]) +AMANDA_ENABLE_GCC_WARNING([old-style-definition]) +AMANDA_DISABLE_GCC_WARNING([strict-aliasing]) +AMANDA_DISABLE_GCC_WARNING([unknown-pragmas]) -CFLAGS="$amanda_cv_LFS_CFLAGS $CFLAGS" -CPPFLAGS="$amanda_cv_LFS_CPPFLAGS $CPPFLAGS" -LDFLAGS="$amanda_cv_LFS_LDFLAGS $LDFLAGS" -LIBS="$amanda_cv_LFS_LIBS $LIBS" - -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(long long) -AC_CHECK_SIZEOF(intmax_t) -AC_CHECK_SIZEOF(off_t) -AC_CHECK_SIZEOF(size_t) -AC_CHECK_SIZEOF(ssize_t) -AC_CHECK_SIZEOF(time_t) +# +# Libtool +# AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) +AMANDA_STATIC_FLAGS -AC_PROG_GCC_TRADITIONAL -AC_C_CONST -AMANDA_C_UNSIGNED_LONG_CONSTANTS -AC_TYPE_OFF_T -AC_TYPE_PID_T -AC_TYPE_SIZE_T - -AC_TYPE_UID_T -AC_TYPE_SIGNAL -AC_STRUCT_TM -AM_PROG_LEX - -dnl From here on we need to know about STDC_HEADERS +# +# headers +# AC_HEADER_STDC - -dnl AC_CHECK_TYPE does not work for socklen_t because it does not look -dnl in , so this is a variant that adds another header. -AC_DEFUN([AMANDA_CHECK_TYPE], -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(ac_cv_type_$1, -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#if STDC_HEADERS -#include -#include -#endif -#include <$3>], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl -AC_MSG_RESULT($ac_cv_type_$1) -if test "x$ac_cv_type_$1" = xno; then - AC_DEFINE($1, $2, [Define if $1 is not a standard system type]) -fi -]) -AMANDA_CHECK_TYPE(socklen_t, int, sys/socket.h) -AMANDA_CHECK_TYPE(sa_family_t, unsigned short, sys/socket.h) - -dnl Checks for header files. -AC_HEADER_DIRENT -CF_WAIT -CF_WAIT_INT AC_HEADER_TIME -AC_CHECK_HEADERS(\ +AC_CHECK_HEADERS( 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 \ + netinet/in.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/shm.h \ sys/time.h \ sys/types.h \ sys/uio.h \ - sys/vfs.h \ - sys/vfstab.h \ syslog.h \ unistd.h \ - vtblc.h \ ) -AC_CHECK_HEADERS(netinet/ip.h,,, -[[#include -#if HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_SYSTM_H -#include -#endif -#include -]]) - -AC_CHECK_HEADERS(sys/mount.h,,, -[[#ifdef HAVE_SYS_PARAM_H -#include -#endif -]]) - -NO_SCSI_CHANGER_MODE=true -NO_CHIO_CHANGER_MODE=true - -AC_C_BIGENDIAN - -dnl -dnl chio support -dnl -if test x"$ac_cv_header_sys_scsi_h" = x"yes"; then - AC_CACHE_CHECK([for HP/UX-like scsi changer support], - amanda_cv_hpux_scsi_chio, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -]], [[ - static struct element_addresses changer_info; - int i = SIOC_ELEMENT_ADDRESSES; - int j = SIOC_ELEMENT_STATUS; - int k = SIOC_MOVE_MEDIUM; -]])],[amanda_cv_hpux_scsi_chio=yes],[amanda_cv_hpux_scsi_chio=no])]) - if test x"$amanda_cv_hpux_scsi_chio" = x"yes"; then - AC_DEFINE(HAVE_HPUX_SCSI_CHIO,1,[Define to enable HPUX chio based changer support. ]) - NO_SCSI_CHANGER_MODE=false - fi -fi - -dnl -dnl Linux SCSI based on ioctl -dnl -if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_scsi_scsi_ioctl_h" = x"yes"; then - AC_CACHE_CHECK([for Linux like scsi support (ioctl)], - amanda_cv_linux_scsi, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -]], [[ - int device; - char *Command; - ioctl(device, SCSI_IOCTL_SEND_COMMAND, Command); -]])],[amanda_cv_linux_scsi=yes],[amanda_cv_linux_scsi=no])]) -fi - -dnl -dnl Linux SCSI based on sg -dnl -if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_scsi_sg_h" = x"yes"; then - AC_CACHE_CHECK([for Linux like scsi support (sg)], - amanda_cv_linux_sg_scsi, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - int device; - struct sg_header *psg_header; - char *buffer; - write(device, buffer, 1); -]])],[amanda_cv_linux_sg_scsi=yes],[amanda_cv_linux_sg_scsi=no])]) -fi - -if test x"$amanda_cv_linux_scsi" = x"yes" || - test x"$amanda_cv_linux_sg_scsi" = x"yes";then - AC_DEFINE(HAVE_LINUX_LIKE_SCSI,1,[Define to enable Linux tape-changer support.]) - NO_SCSI_CHANGER_MODE=false -fi - -dnl -dnl HP-UX SCSI -dnl -if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_sys_scsi_h" = x"yes"; then - AC_CACHE_CHECK([for HP-UX like scsi support], - amanda_cv_hpux_scsi, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -#include -]], [[ - int device; - char *Command; - ioctl(device, SIOC_IO, Command); -]])],[amanda_cv_hpux_scsi=yes],[amanda_cv_hpux_scsi=no])]) - if test x"$amanda_cv_hpux_scsi" = x"yes";then - AC_DEFINE(HAVE_HPUX_LIKE_SCSI,1,[Define to enable HPUX tape-changer support. ]) - NO_SCSI_CHANGER_MODE=false - NO_CHIO_CHANGER_MODE=false - fi -fi - -dnl -dnl IRIX SCSI -dnl -if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_sys_dsreq_h" = x"yes"; then - AC_CACHE_CHECK([for Irix like scsi support], - amanda_cv_irix_scsi, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - int device=1; - char Command; - ioctl(device, DS_ENTER, &Command); -]])],[amanda_cv_irix_scsi=yes],[amanda_cv_irix_scsi=no])]) - if test x"$amanda_cv_irix_scsi" = x"yes";then - AC_DEFINE(HAVE_IRIX_LIKE_SCSI,1,[Define to enable IRIX tape-changer support]) - NO_SCSI_CHANGER_MODE=false - fi -fi - -dnl -dnl Solaris SCSI -dnl -if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_sys_scsi_impl_uscsi_h" = x"yes"; then - AC_CACHE_CHECK([for Solaris-like scsi support], - amanda_cv_solaris_scsi, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - int device; - char *Command; - ioctl(device, USCSICMD, Command); -]])],[amanda_cv_solaris_scsi=yes],[amanda_cv_solaris_scsi=no])]) - if test x"$amanda_cv_solaris_scsi" = x"yes";then - AC_DEFINE(HAVE_SOLARIS_LIKE_SCSI,1,[Define to enable Solaris tape-changer support]) - NO_SCSI_CHANGER_MODE=false - fi -fi - -dnl -dnl AIX SCSI -dnl -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 - AC_CACHE_CHECK([for AIX like scsi support], - amanda_cv_aix_scsi, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - int device; - char *Command; - ioctl(device, STIOCMD, Command); -]])],[amanda_cv_aix_scsi=yes],[amanda_cv_aix_scsi=no])]) - if test x"$amanda_cv_aix_scsi" = x"yes";then - AC_DEFINE(HAVE_AIX_LIKE_SCSI,1,[Define to enable AIX tape-changer support]) - NO_SCSI_CHANGER_MODE=false - fi -fi -dnl -dnl BSD CAM SCSI -dnl -if test x"$ac_cv_header_cam_cam_h" = x"yes";then - AC_CACHE_CHECK([for CAM like scsi support], - amanda_cv_cam_scsi, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -# include -# include -# include -# include -# include -# include -]], [[ - struct cam_device *curdev; - - curdev = cam_open_pass("", O_RDWR, NULL); -]])],[amanda_cv_cam_scsi=yes],[amanda_cv_cam_scsi=no])]) - if test x"$amanda_cv_cam_scsi" = x"yes";then - AC_DEFINE(HAVE_CAM_LIKE_SCSI,1,[Define to enable CAM tape-changer support]) - NO_SCSI_CHANGER_MODE=false - AC_CHECK_LIB(cam,main) - fi -fi - - -dnl -dnl BSD SCSI -dnl -if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_sys_scsiio_h" = x"yes"; then - AC_CACHE_CHECK([for BSD like scsi support], - amanda_cv_bsd_scsi, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - int device=1; - char Command; - ioctl(device, SCIOCCOMMAND, &Command); -]])],[amanda_cv_bsd_scsi=yes],[amanda_cv_bsd_scsi=no])]) - if test x"$amanda_cv_bsd_scsi" = x"yes";then - AC_DEFINE(HAVE_BSD_LIKE_SCSI,1,[Define to enable BSD tape-changer support]) - NO_SCSI_CHANGER_MODE=false - fi -fi - -dnl Do not build chg-scsi-chio if we cannot find the needed support -dnl include files for the SCSI interfaces -dnl 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_sys_chio_h" = x"yes"; then - dnl chg-scsi does not support FreeBSD 3.0's chio.h; it became backward - dnl incompatible with the introduction of camlib.h - 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 +# +# Types +# +AC_SOCKADDR_STORAGE +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long long) +AC_CHECK_SIZEOF(intmax_t) +AC_CHECK_SIZEOF(off_t) +AC_CHECK_SIZEOF(size_t) +AC_CHECK_SIZEOF(ssize_t) +AC_CHECK_SIZEOF(time_t) +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_UID_T +AC_TYPE_SIGNAL +AC_STRUCT_TM +AMANDA_SOCKLEN_T_EQUIV +AMANDA_CHECK_TYPE(sa_family_t, unsigned short, sys/socket.h) +AMANDA_CHECK_TYPE(in_port_t, unsigned short, netinet/in.h) +CF_WAIT +CF_WAIT_INT -dnl cur_colr is on some HP's +# +# Libraries +# +# cur_colr is on some HP's AC_CHECK_LIB(cur_colr,main) - AC_CHECK_LIB(intl,main) - -dnl Make sure we don't use -lnsl and -lsun on Irix systems. -case "$target" in - *sgi-irix*) - AC_CHECK_LIB(socket,main) - ;; - *) - AC_CHECK_LIB(resolv,main) - AC_CHECK_LIB(nsl,main) - AC_CHECK_LIB(socket,main) - AC_CHECK_LIB(sun,main) - ;; -esac - -AC_CHECK_LIB(termcap,tgetent) -if test "x$ac_cv_lib_termcap_tgetent" != xyes; then - AC_CHECK_LIB(curses,tgetent) - if test "x$ac_cv_lib_curses_tgetent" != xyes; then - AC_CHECK_LIB(ncurses,tgetent) - fi -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 - AC_CHECK_LIB(readline,readline) - if test "x$ac_cv_lib_readline_readline" = xyes; then - READLINE_LIBS="-lreadline" - AC_SUBST(READLINE_LIBS) - else - AC_MSG_WARN([*** No readline library, no history and command line editing in amrecover!]) - fi -else - AC_MSG_WARN([*** No terminal library, no history and command line editing in amrecover!]) -fi - -if test "x$ac_cv_header_linux_zftape_h" = xyes; then - if test "x$ac_cv_header_vtblc_h" = xyes; then - AC_CHECK_LIB(vtblc,main) - if test "x$ac_cv_lib_vtblc_main" != xyes; then - AC_MSG_WARN([*** vtblc library not found - no QIC volume table support!]) - fi - else - AC_MSG_WARN([*** vtblc headers not found - no QIC volume table support!]) - fi -fi - +AMANDA_CHECK_NET_LIBS +AMANDA_CHECK_GLIB +AMANDA_CHECK_READLINE AC_CHECK_LIB(m,modf) +AMANDA_GLIBC_BACKTRACE -dnl Check for various "mt status" related structure elements. - -AC_MSG_CHECKING(for mt_flags mtget structure element) -mt_flags_result="found" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - struct mtget buf; - long ds; - - ds = buf.mt_flags; -]])],[AC_DEFINE(HAVE_MT_FLAGS,1,Define if the mtget structure has an mt_flags field)],[mt_flags_result="not found"]) -AC_MSG_RESULT($mt_flags_result) - -AC_MSG_CHECKING(for mt_fileno mtget structure element) -mt_fileno_result="found" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - struct mtget buf; - long ds; - - ds = buf.mt_fileno; -]])],[AC_DEFINE(HAVE_MT_FILENO,1,Define if the mtget structure has an mt_fileno field)],[mt_fileno_result="not found"]) -AC_MSG_RESULT($mt_fileno_result) - -AC_MSG_CHECKING(for mt_blkno mtget structure element) -mt_blkno_result="found" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - struct mtget buf; - long ds; - - ds = buf.mt_blkno; -]])],[AC_DEFINE(HAVE_MT_BLKNO,1,Define if the mtget structure has an mt_blkno field)],[mt_blkno_result="not found"]) -AC_MSG_RESULT($mt_blkno_result) - -AC_MSG_CHECKING(for mt_dsreg mtget structure element) -mt_dsreg_result="found" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - struct mtget buf; - long ds; - - ds = buf.mt_dsreg; -]])],[AC_DEFINE(HAVE_MT_DSREG,1,Define if the mtget structure has an mt_dsreg field)],[mt_dsreg_result="not found"]) -AC_MSG_RESULT($mt_dsreg_result) - -AC_MSG_CHECKING(for mt_erreg mtget structure element) -mt_erreg_result="found" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - struct mtget buf; - long ds; - - ds = buf.mt_erreg; -]])],[AC_DEFINE(HAVE_MT_ERREG,1,Define if the mtget structure has an mt_erreg field)],[mt_erreg_result="not found"]) -AC_MSG_RESULT($mt_erreg_result) - -dnl - -dnl Check if the system does support the user requested database library. -dnl Begin by checking for the header file. If it is not there, then do -dnl not use the library. If the header file is there, then try to link -dnl against the library. If it's not there, then try to link using -dnl just the -lc library. If the link against -lc fails, then do not -dnl use this library. -DB_HEADER= -DB_LIB= - -dnl Testing if libc contains the dbm_open routine is tested for a -dnl lot of times below. We do it once here now. -save_LIBS="$LIBS" -AC_CHECK_LIB(c,dbm_open) -LIBS="$save_LIBS" - -case "$DB_STYLE" in - db) - if test "x$ac_cv_header_db_h" = xyes; then - AC_CHECK_LIB(db,main) - if test "x$ac_cv_lib_db_main" = xyes; then - AC_CHECK_LIB(db,dbm_open) - if test "x$ac_cv_lib_db_dbm_open" = xyes; then - DB_HEADER=db.h - DB_LIB=db - else - DB_STYLE= - AC_MSG_WARN([*** db database library requested but dbm_open not found in -ldb.]) - fi - else - if test "x$ac_cv_lib_c_dbm_open" = xyes; then - DB_HEADER=db.h - DB_LIB=c - else - DB_STYLE= - AC_MSG_WARN([*** db library requested but -ldb doesn't exist and dbm_open cannot be found.]) - fi - fi - else - DB_STYLE= - AC_MSG_WARN([*** db database library requested but db.h not found.]) - fi - ;; - - dbm) - if test "x$ac_cv_header_dbm_h" = xyes; then - AC_CHECK_LIB(dbm,main) - if test "x$ac_cv_lib_dbm_main" = xyes; then - AC_CHECK_LIB(dbm,dbm_open) - if test "x$ac_cv_lib_dbm_dbm_open" = xyes; then - DB_HEADER=dbm.h - DB_LIB=dbm - else - DB_STYLE= - AC_MSG_WARN([*** dbm database library requested but dbm_open not found in -ldbm.]) - fi - else - if test "x$ac_cv_lib_c_dbm_open" = xyes; then - DB_HEADER=dbm.h - DB_LIB=c - else - DB_STYLE= - AC_MSG_WARN([*** dbm library requested but -ldbm doesn't exist and dbm_open cannot be found.]) - fi - fi - else - DB_STYLE= - AC_MSG_WARN([*** dbm database library requested but dbm.h not found.]) - fi - ;; - - gdbm) - if test "x$ac_cv_header_ndbm_h" = xyes; then - AC_CHECK_LIB(gdbm,main) - if test "x$ac_cv_lib_gdbm_main" = xyes; then - AC_CHECK_LIB(gdbm,dbm_open) - if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then - DB_HEADER=ndbm.h - DB_LIB=gdbm - else - DB_STYLE= - AC_MSG_WARN([*** gdbm database library requested but -lgdbm not found.]) - fi - else - if test "x$ac_cv_lib_c_dbm_open" = xyes; then - DB_HEADER=ndbm.h - DB_LIB=c - else - DB_STYLE= - AC_MSG_WARN([*** gdbm library requested but -lgdbm doesn't exist and dbm_open cannot be found.]) - fi - fi - else - DB_STYLE= - AC_MSG_WARN([*** gdbm database library requested but ndbm.h not found.]) - fi - ;; - - ndbm) - if test "x$ac_cv_header_ndbm_h" = xyes; then - AC_CHECK_LIB(ndbm,main) - if test "x$ac_cv_lib_ndbm_main" = xyes; then - AC_CHECK_LIB(ndbm,dbm_open) - if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then - DB_HEADER=ndbm.h - DB_LIB=ndbm - else - DB_STYLE= - AC_MSG_WARN([*** ndbm database library requested but -lndbm not found.]) - fi - else - if test "x$ac_cv_lib_c_dbm_open" = xyes; then - DB_HEADER=ndbm.h - DB_LIB=c - else - DB_STYLE= - AC_MSG_WARN([*** ndbm library requested but -lndbm doesn't exist and dbm_open cannot be found.]) - fi - fi - else - DB_STYLE= - AC_MSG_WARN([*** ndbm database library requested but ndbm.h not found.]) - fi - ;; - text) - DB_HEADER= - DB_LIB= - ;; -esac - -dnl If a database style was not specified select an appropriate one -dnl automatically. -dnl Nowadays we default to our own internal text database, but I have left -dnl the code that does the testing here just in case it is needed one day. - -if test -z "$DB_STYLE"; then - DB_STYLE=text - DB_HEADER= - DB_LIB= -fi - -dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_ndbm_h" = xyes; then -dnl AC_CHECK_LIB(ndbm,dbm_open) -dnl if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then -dnl DB_STYLE=ndbm -dnl DB_HEADER=ndbm.h -dnl DB_LIB=ndbm -dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then -dnl DB_STYLE=ndbm -dnl DB_HEADER=ndbm.h -dnl DB_LIB=c -dnl fi -dnl fi -dnl -dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_db_h" = xyes; then -dnl AC_CHECK_LIB(db,dbm_open) -dnl if test "x$ac_cv_lib_db_dbm_open" = xyes; then -dnl DB_STYLE=db -dnl DB_HEADER=db.h -dnl DB_LIB=db -dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then -dnl DB_STYLE=db -dnl DB_HEADER=db.h -dnl DB_LIB=c -dnl fi -dnl fi -dnl -dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_dbm_h" = xyes; then -dnl AC_CHECK_LIB(dbm,dbm_open) -dnl if test "x$ac_cv_lib_db_dbm_open" = xyes; then -dnl DB_STYLE=dbm -dnl DB_HEADER=dbm.h -dnl DB_LIB=dbm -dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then -dnl DB_STYLE=dbm -dnl DB_HEADER=dbm.h -dnl DB_LIB=c -dnl fi -dnl fi -dnl -dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_ndbm_h" = xyes; then -dnl AC_CHECK_LIB(gdbm,dbm_open) -dnl if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then -dnl DB_STYLE=gdbm -dnl DB_HEADER=ndbm.h -dnl DB_LIB=gdbm -dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then -dnl DB_STYLE=gdbm -dnl DB_HEADER=ndbm.h -dnl DB_LIB=c -dnl fi -dnl fi -dnl -dnl if test -z "$DB_STYLE"; then -dnl if test "x$ac_cv_lib_c_dbm_open" = xyes; then -dnl AC_MSG_WARN([*** A dbm_open() routine was found in -lc, but no header]) -dnl AC_MSG_WARN([*** files exist. Please remedy the situation.]) -dnl else -dnl AC_MSG_WARN([*** No dbm_open() routine found!]) -dnl fi -dnl AC_MSG_WARN([*** You may want to install the gdbm library from]) -dnl AC_MSG_WARN([*** ftp://prep.ai.mit.edu/pub/gnu/gdbm-1.7.3.tar.gz.]) -dnl -dnl AC_MSG_WARN([*** Using the built-in text database.]) -dnl DB_STYLE=text -dnl DB_HEADER= -dnl DB_LIB= -dnl fi - -if test "x$DB_STYLE" = xtext; then - AC_DEFINE(TEXTDB,1,[Define to enable the text-based database format. ]) -else - AC_MSG_CHECKING([for database]) - AC_MSG_RESULT([header is $DB_HEADER, linking against -l$DB_LIB]) - case "$DB_STYLE" in - db) AC_DEFINE(USE_DB_H,1,[Define to enable db databases. ]) ;; - dbm) AC_DEFINE(USE_DBM_H,1,[Define to enable dbm databases. ]) ;; - gdbm) AC_DEFINE(USE_GDBM_H,1,[Define to enable gdbm databases. ]) ;; - ndbm) AC_DEFINE(USE_NDBM_H,1,[Define to enable ndbm databases. ]) ;; - esac - - AC_CACHE_CHECK( - [for struct datum declared in header files], - amanda_cv_struct_datum, - [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#if defined(USE_DB_H) -# include -#else -# if defined(USE_DBM_H) -# include -# else -# if defined(USE_NDBM_H) -# include -# endif -# endif -#endif - ]], [[ - datum a; - ]])],[amanda_cv_struct_datum=yes],[amanda_cv_struct_datum=no - ]) - ]) - if test "x$amanda_cv_struct_datum" = xyes; then - AC_DEFINE(HAVE_STRUCT_DATUM,1,[Define if the database header declares struct datum. ]) - 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 -AC_SUBST(DB_EXT) - -AC_CACHE_CHECK(whether _POSIX2_RE_DUP_MAX is defined, - amanda_cv_have__posix2_re_dup_max, - AC_EGREP_CPP(yes, [ -#include -#ifdef _POSIX2_RE_DUP_MAX - yes -#endif -], amanda_cv_have__posix2_re_dup_max=yes, amanda_cv_have__posix2_re_dup_max=no)) -if test "x$amanda_cv_have__posix2_re_dup_max" = xyes; then - AC_DEFINE(HAVE__POSIX2_RE_DUP_MAX,1,[Define if limits.h defines _POSIX2_RE_DUP_MAX. ]) -fi - -AC_CACHE_CHECK(whether CHAR_MIN is defined, - amanda_cv_have_char_min, - AC_EGREP_CPP(yes, [ -#include -#ifdef CHAR_MIN - yes -#endif -], amanda_cv_have_char_min=yes, amanda_cv_have_char_min=no)) -if test "x$amanda_cv_have_char_min" = xyes; then - AC_DEFINE(HAVE_CHAR_MIN,1,[Define if limits.h defines CHAR_MIN. ]) -fi - -AC_CACHE_CHECK(whether CHAR_MAX is defined, - amanda_cv_have_char_max, - AC_EGREP_CPP(yes, [ -#include -#ifdef CHAR_MAX - yes -#endif -], amanda_cv_have_char_max=yes, amanda_cv_have_char_max=no)) -if test "x$amanda_cv_have_char_max" = xyes; then - AC_DEFINE(HAVE_CHAR_MAX,1,[Define if limits.h defines CHAR_MAX. ]) -fi - -AC_CACHE_CHECK(whether CHAR_BIT is defined, - amanda_cv_have_char_bit, - AC_EGREP_CPP(yes, [ -#include -#ifdef CHAR_BIT - yes -#endif -], amanda_cv_have_char_bit=yes, amanda_cv_have_char_bit=no)) -if test "x$amanda_cv_have_char_bit" = xyes; then - AC_DEFINE(HAVE_CHAR_BIT,1,[Define if limits.h defines CHAR_BIT. ]) -fi - -dnl Checks for library functions and if the function is declared in -dnl an appropriate header file. Add some of the missing functions -dnl to LIBOBJS. +# +# 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_CHECK_DECL(accept,sys/types.h sys/socket.h) AC_FUNC_ALLOCA AC_CHECK_FUNCS(atexit) ICE_CHECK_DECL(atof,stdlib.h) -ICE_CHECK_DECL(atoi,stdlib.h) ICE_CHECK_DECL(atol,stdlib.h) ICE_CHECK_DECL(atoll,stdlib.h) ICE_CHECK_DECL(strtol,stdlib.h) @@ -2787,29 +275,23 @@ ICE_CHECK_DECL(bzero,string.h strings.h stdlib.h) AC_FUNC_CLOSEDIR_VOID ICE_CHECK_DECL(closelog,syslog.h) ICE_CHECK_DECL(connect,sys/types.h sys/socket.h) -ICE_CHECK_DECL(dbm_open,${DB_HEADER-no/db/header/file}) -AC_CHECK_FUNCS(endmntent) ICE_CHECK_DECL(fclose,stdio.h) ICE_CHECK_DECL(fflush,stdio.h) -ICE_CHECK_DECL(flock,sys/file.h) ICE_CHECK_DECL(fprintf,stdio.h) ICE_CHECK_DECL(fputc,stdio.h) ICE_CHECK_DECL(fputs,stdio.h) ICE_CHECK_DECL(fread,stdio.h stdlib.h) ICE_CHECK_DECL(fseek,stdio.h) ICE_CHECK_DECL(fwrite,stdio.h stdlib.h) -AC_CHECK_FUNCS(getfsent) +AC_CHECK_FUNCS(getgrgid_r) +AC_CHECK_FUNCS(getpwuid_r) ICE_CHECK_DECL(gethostname,unistd.h) -AC_FUNC_GETMNTENT ICE_CHECK_DECL(getopt,stdlib.h unistd.h libc.h) ICE_CHECK_DECL(getpeername,sys/types.h sys/socket.h) -AC_CHECK_FUNCS(getpgrp) +AC_CHECK_FUNC(getpgrp) AC_FUNC_GETPGRP ICE_CHECK_DECL(getsockname,sys/types.h sys/socket.h) ICE_CHECK_DECL(getsockopt,sys/types.h sys/socket.h) -ICE_CHECK_DECL(gettimeofday,time.h sys/time.h) -AMANDA_FUNC_GETTIMEOFDAY_ARGS -AC_CHECK_FUNCS(getvfsent initgroups isascii) ICE_CHECK_DECL(initgroups,grp.h sys/types.h unistd.h libc.h) ICE_CHECK_DECL(ioctl,sys/ioctl.h unistd.h libc.h) ICE_CHECK_DECL(isnormal,math.h) @@ -2818,12 +300,9 @@ ICE_CHECK_DECL(lstat,sys/types.h sys/stat.h) ICE_CHECK_DECL(malloc,stdlib.h) ICE_CHECK_DECL(memmove,string.h strings.h) ICE_CHECK_DECL(memset,string.h strings.h) -AC_CHECK_FUNCS(mkdir) ICE_CHECK_DECL(mkstemp,stdlib.h) ICE_CHECK_DECL(mktemp,stdlib.h) ICE_CHECK_DECL(mktime,time.h sys/time.h) -AC_FUNC_MMAP -dnl atexit() is prefered, sunos (maybe others?) define on_exit AC_CHECK_FUNCS(on_exit) ICE_CHECK_DECL(openlog,syslog.h) ICE_CHECK_DECL(pclose,stdio.h) @@ -2836,68 +315,25 @@ ICE_CHECK_DECL(recvfrom,sys/types.h sys/socket.h) ICE_CHECK_DECL(remove,stdio.h) ICE_CHECK_DECL(rename,stdio.h) ICE_CHECK_DECL(rewind,stdio.h) -AC_CHECK_FUNCS(rmdir) ICE_CHECK_DECL(ruserok,netdb.h sys/socket.h libc.h unistd.h) ICE_CHECK_DECL(select,sys/types.h sys/socket.h sys/select.h time.h sys/time.h) AMANDA_FUNC_SELECT_ARG_TYPE ICE_CHECK_DECL(sendto,sys/types.h sys/socket.h) ICE_CHECK_DECL(setegid,unistd.h) ICE_CHECK_DECL(seteuid,unistd.h) -AC_CHECK_FUNCS(setmntent) -AC_CHECK_FUNCS(shquote) - ICE_CHECK_DECL(setresgid,unistd.h) ICE_CHECK_DECL(setresuid,unistd.h) +AC_CHECK_FUNCS(shquote) ICE_CHECK_DECL(snprintf,stdio.h) ICE_CHECK_DECL(vsnprintf,stdio.h) - -dnl arguments for setpgrp or not -AC_CHECK_FUNC(setpgid, [ - AC_DEFINE(HAVE_SETPGID,1,[Define if setpgid() is available. ]) - ICE_CHECK_DECL(setpgid,sys/types.h unistd.h) -]) +AMANDA_FUNC_SETPGID AC_CHECK_FUNC(setpgrp,[AC_FUNC_SETPGRP]) ICE_CHECK_DECL(setpgrp,sys/types.h unistd.h libc.h) - ICE_CHECK_DECL(setsockopt,sys/types.h sys/socket.h) - -AC_CHECK_FUNCS(shmget, - [ - AMANDA_FUNC_SHM_ARG_TYPE - case "$FORCE_MMAP" in - n | no) - AC_DEFINE(HAVE_SYSVSHM,1,[Define if SysV shared-memory functions are available. ]) - ;; - esac - ] -) -ICE_CHECK_DECL(shmat,sys/types.h sys/ipc.h sys/shm.h) -ICE_CHECK_DECL(shmctl,sys/types.h sys/ipc.h sys/shm.h) -ICE_CHECK_DECL(shmdt,sys/types.h sys/ipc.h sys/shm.h) -ICE_CHECK_DECL(shmget,sys/types.h sys/ipc.h sys/shm.h) - -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 - AC_MSG_WARN([*** Neither shmget() nor mmap() found!]) - AC_MSG_WARN([*** This system will not support the Amanda server.]) - NO_SERVER_MODE=true - fi - ;; - y | ye | yes) - AC_MSG_WARN([*** --with-mmap used on a system with no mmap() support!]) - AC_MSG_WARN([*** This system will not support the Amanda server.]) - NO_SERVER_MODE=true - ;; - esac -fi - AC_CHECK_FUNCS(sigaction sigemptyset sigvec) ICE_CHECK_DECL(socket,sys/types.h sys/socket.h) ICE_CHECK_DECL(socketpair,sys/types.h sys/socket.h) ICE_CHECK_DECL(sscanf,stdio.h) -AC_CHECK_FUNCS(statfs statvfs) ICE_CHECK_DECL(strerror,string.h strings.h) AC_FUNC_STRFTIME ICE_CHECK_DECL(strftime,time.h sys/time.h) @@ -2908,431 +344,52 @@ ICE_CHECK_DECL(time,time.h sys/time.h) ICE_CHECK_DECL(tolower,ctype.h) ICE_CHECK_DECL(toupper,ctype.h) ICE_CHECK_DECL(ungetc,stdio.h) -AC_FUNC_VPRINTF ICE_CHECK_DECL(vfprintf,stdio.h stdlib.h) ICE_CHECK_DECL(vprintf,stdio.h stdlib.h) -ICE_CHECK_DECL(vsprintf,stdio.h stdlib.h) AC_CHECK_FUNC(wait4) -#AC_REPLACE_FUNCS(writev) ICE_CHECK_DECL(writev, unistd.h sys/uio.h) ICE_CHECK_DECL(strcasecmp,string.h strings.h) -AC_CHECK_FUNCS(fnmatch) - - -dnl disk device prefixes -AC_MSG_CHECKING(disk device prefixes) -dnl Use df to find the mount point for the root filesystem. Use -dnl the positional parameters to find the particular line from df -dnl that contains the root paritition. We put it in a subshell so -dnl 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/)//' ` - -dnl Search for the mount point by using expr to find the parameter -dnl 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 -)` - -if test "$DEV_PREFIX" && test "$RDEV_PREFIX"; then - AC_MSG_RESULT((predefined) $DEV_PREFIX - $RDEV_PREFIX) -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/ - AC_MSG_WARN("*** Run amsinixfixdevs on Sinix systems using VxFS.") - ;; - - *) - 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 - AC_MSG_RESULT($DEV_PREFIX - $RDEV_PREFIX) -fi - -AC_DEFINE_UNQUOTED(DEV_PREFIX,"${DEV_PREFIX}",[Define as the prefix for disk devices, commonly /dev/ or /dev/dsk/ ]) -AC_DEFINE_UNQUOTED(RDEV_PREFIX,"${RDEV_PREFIX}",[Define as the prefix for raw disk devices, commonly /dev/r or /dev/rdsk/ ]) - -case $mount in - /dev/vg*) - AC_MSG_WARN("*** Run amhpfixdevs on HP-UX systems using /dev/vg??.") - ;; -esac - -dnl lock/flock/fcntl -AC_CACHE_CHECK( - [whether posix fcntl locking works], - amanda_cv_posix_filelocking, - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#undef ASSERTIONS -#define CONFIGURE_TEST -#define USE_POSIX_FCNTL -#include "${srcdir-.}/common-src/amflock.c" -]])],[ - amanda_cv_posix_filelocking=yes -],[ - amanda_cv_posix_filelocking="no" -],[ - amanda_cv_posix_filelocking="no (cannot run test)" -]) - rm -f /tmp/conftest.lock +dnl ------------------------------------------------------------------------- + +dnl +dnl Set up files for autoconf substitution. All files are listed here, in +dnl order by subdirectory, as a central location for this list. +dnl +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 ]) -if test "x$amanda_cv_posix_filelocking" = xyes; then - AC_DEFINE(USE_POSIX_FCNTL,1,[Define to use Posix fcntl for file locking.]) - HAS_WORKING_FILE_LOCK=1 -fi - -if test -z "$HAS_WORKING_FILE_LOCK"; then - AC_CACHE_CHECK( - [whether flock locking works], - amanda_cv_flock_filelocking, - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#undef ASSERTIONS -#define CONFIGURE_TEST -#define USE_FLOCK -#include "${srcdir-.}/common-src/amflock.c" -]])],[ - amanda_cv_flock_filelocking="yes" -],[ - amanda_cv_flock_filelocking="no" -],[ - amanda_cv_flock_filelocking="no (cannot run test)" -]) - rm -f /tmp/conftest.lock -]) - if test "x$amanda_cv_flock_filelocking" = xyes; then - AC_DEFINE(USE_FLOCK,1,[Define to use flock for file locking.]) - HAS_WORKING_FILE_LOCK=1 - fi -fi - -if test -z "$HAS_WORKING_FILE_LOCK"; then - AC_CACHE_CHECK( - [whether lockf locking works], - amanda_cv_lockf_filelocking, - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#undef ASSERTIONS -#define CONFIGURE_TEST -#define USE_LOCKF -#include "${srcdir-.}/common-src/amflock.c" -]])],[ - amanda_cv_lockf_filelocking="yes" -],[ - amanda_cv_lockf_filelocking="no" -],[ - amanda_cv_lockf_filelocking="no (cannot run test)" -]) - rm -f /tmp/conftest.lock -]) - if test "x$amanda_cv_lockf_filelocking" = xyes; then - AC_DEFINE(USE_LOCKF,1,[Define to use lockf for file locking.]) - HAS_WORKING_FILE_LOCK=1 - fi -fi - -if test -z "$HAS_WORKING_FILE_LOCK"; then - AC_CACHE_CHECK( - [whether lnlock locking works], - amanda_cv_lnlock_filelocking, - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#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" -]])],[ - amanda_cv_lnlock_filelocking="yes" -],[ - amanda_cv_lnlock_filelocking="no" -],[ - amanda_cv_lnlock_filelocking="no (cannot run test)" -]) - rm -f /tmp/conftest.lock -]) - if test "x$amanda_cv_lnlock_filelocking" = xyes; then - AC_DEFINE(USE_LNLOCK,1,[Define to use a hard-link based approach for file locking.]) - HAS_WORKING_FILE_LOCK=1 - fi -fi - -if test -z "$HAS_WORKING_FILE_LOCK"; then - AC_MSG_WARN([*** No working file locking capability found!]) - AC_MSG_WARN([*** Be VERY VERY careful.]) -fi - -dnl extra substitution parameters -AC_SUBST(CHS) -AC_SUBST(MTX) -AC_SUBST(MCUTIL) -AC_SUBST(ac_n) -AC_SUBST(ac_c) - -AM_CONDITIONAL(WANT_CLIENT, test x"$NO_CLIENT_MODE" != x"true") -AM_CONDITIONAL(WANT_SAMBA, test ! -z "$SAMBA_CLIENT") -AM_CONDITIONAL(WANT_RESTORE, test x"$NO_RESTORE_MODE" != x"true") -AM_CONDITIONAL(WANT_SERVER, test x"$NO_SERVER_MODE" != x"true") -AM_CONDITIONAL(WANT_RECOVER, test x"$NO_RECOVER_MODE" != x"true" && test x"$NO_CLIENT_MODE" != x"true") -AM_CONDITIONAL(WANT_TAPE, test x"$NO_SERVER_MODE" != x"true" || test x"$NO_RESTORE_MODE" != x"true") -AM_CONDITIONAL(WANT_AMPLOT, test x"$NO_AMPLOT_MODE" != x"true") -AM_CONDITIONAL(WANT_CHG_SCSI, test x"$NO_SCSI_CHANGER_MODE" != x"true") -AM_CONDITIONAL(WANT_CHIO_SCSI, test x"$NO_CHIO_CHANGER_MODE" != x"true") -AM_CONDITIONAL(WANT_RUNTIME_PSEUDO_RELOC, test x"$NEED_RUNTIME_PSEUDO_RELOC" = x"true") -AM_CONDITIONAL(WANT_SETUID_CLIENT, test x"$NEED_SETUID_CLIENT" != x"false") -AM_CONDITIONAL(WANT_SSH_SECURITY, test x"$SSH_SECURITY_SET" = x"true") - -case "${FORCE_USE_RUNDUMP-${USE_RUNDUMP}}" in -y | ye | yes) AC_DEFINE(USE_RUNDUMP,1,[Define to invoke rundump (setuid-root) instead of DUMP program directly. ]);; -esac - -# This is necessary so that .o files in LIBOBJS are also built via -# the ANSI2KNR-filtering rules. -LIB@&t@OBJS=`echo "$LIB@&t@OBJS" | - sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'` -LTLIBOBJS=`echo "$LIB@&t@OBJS" | - sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'` -AC_SUBST(LTLIBOBJS) - -LTALLOCA=`echo "$ALLOCA" | sed 's/\.'"${ac_objext}"'/\.lo/g'` -AC_SUBST(LTALLOCA) - -## This stuff is needed for the documentation. -DOC_BUILD_DATE=`date '+%d-%m-%Y'` -AC_SUBST(DOC_BUILD_DATE) - -AC_ARG_ENABLE(manpage-build, -AS_HELP_STRING([--enable-manpage-build], - [Build the manpages from their XML source (shipped manpages are usually sufficient)]), - [ ENABLE_MANPAGE_BUILD=$enableval ], - [ ENABLE_MANPAGE_BUILD=no ]) - -AC_PROG_XSLTPROC([--nonet]) -AC_CHECK_DOCBOOK_XSLT([1.72.0]) -AC_CHECK_DOCBOOK_DTD([4.1.2]) -AC_CHECK_DOCBOOK_DTD([4.2]) - -# 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 - AC_MSG_ERROR([Cannot build manpages: 'xsltproc' was not found.]) - fi - - if test "x$HAVE_DOCBOOK_XSLT_1_72_0" = "xno"; then - AC_MSG_ERROR([Cannot build manpages: docbook version 1.72.0 was not found.]) - fi - - if test "x$HAVE_DOCBOOK_DTD_4_1_2" = "xno" || test "x$HAVE_DOCBOOK_DTD_4_2" = "xno"; then - AC_MSG_WARN([Docbook DTD versions 4.1.2 and 4.2 are required for manpage validation; disabling validation]) - XSLTPROC_FLAGS="$XSLTPROC_FLAGS --novalid" - fi -fi -AM_CONDITIONAL(ENABLE_MANPAGE_BUILD, test "x$ENABLE_MANPAGE_BUILD" = "xyes") - -AC_CACHE_CHECK([for working IPv6], - amanda_working_ipv6, - [AC_TRY_RUN([#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_WINSOCK2_H -#include -#endif -#include -#include -#include - -main() -{ - int aa; - aa = socket(AF_INET6, SOCK_STREAM, 0); - if (aa > 0) return 0; - return aa; -}],amanda_working_ipv6=yes, - amanda_working_ipv6=no, - amanda_working_ipv6=yes - ) - ] -) - -if test "$BROKEN_IPV6" = true; then - amanda_working_ipv6=no; -fi - -if test "$amanda_working_ipv6" = yes; then - if test "$amanda_ipv6" != false; then - AC_DEFINE(WORKING_IPV6,1,[Define if IPv6 is working. ]) - fi -else - if test "$amanda_ipv6" = true; then - AC_MSG_ERROR([Asked for IPv6 but it is not working.]) - fi -fi - -AM_CONDITIONAL([GCC_COMPILER], [test "x$CC" = "xgcc"]) - -#### 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 - - $CC -v --help 2>&1 | $GREP -- '-Wsign-compare' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wsign-compare" - 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 - - $CC -v --help 2>&1 | $GREP -- '-Wfloat-equal' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wfloat-equal" - fi - - $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 -AC_SUBST(AM_CFLAGS) - -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_OUTPUT +AMANDA_GET_SVN_INFO +AMANDA_SHOW_SUMMARY diff --git a/contrib/set_prod_link.pl b/contrib/set_prod_link.pl index 3143212..e694869 100644 --- a/contrib/set_prod_link.pl +++ b/contrib/set_prod_link.pl @@ -22,7 +22,6 @@ # ----------------------------------------------------------------------- # History: # -# $Log: set_prod_link.pl,v $ # Revision 1.3 2006/05/25 01:47:13 johnfranks # Allow spaces and arbitrary binary characters in file names # and configuration files. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 30bd62f..0000000 --- a/debian/copyright +++ /dev/null @@ -1,42 +0,0 @@ -This package was built by Bdale Garbee using sources downloaded -from - - ftp://ftp.amanda.org/pub/amanda/ - -The Amanda copyright: - -/* - * Amanda, The Advanced Maryland Automatic Network Disk Archiver - * Copyright (c) 1991, 1996 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. - * - * Author: James da Silva, Systems Design and Analysis Group - * Computer Science Department - * University of Maryland at College Park - */ - -/* -** This Version of Amanda contains parts of GNU programs -** (alloca.c, exclude_file.c) -*/ - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - diff --git a/docs/Makefile.am b/docs/Makefile.am deleted file mode 100644 index d4bbf41..0000000 --- a/docs/Makefile.am +++ /dev/null @@ -1,85 +0,0 @@ -## Process this file with automake to produce Makefile.in -pkgdata_DATA = \ - Appendix.txt \ - amadmin.8.txt \ - amaespipe.8.txt \ - amanda.8.txt \ - amanda.conf.5.txt \ - amanda-client.conf.5.txt \ - amcheck.8.txt \ - amcheckdb.8.txt \ - amcleanup.8.txt \ - amcrypt.8.txt \ - amcrypt-asym-ossl.8.txt \ - amcrypt-ossl.8.txt \ - amdd.8.txt \ - amdump.8.txt \ - amfetchdump.8.txt \ - amflush.8.txt \ - amgetconf.8.txt \ - amlabel.8.txt \ - ammt.8.txt \ - amoverview.8.txt \ - amplot.8.txt \ - amrecover.8.txt \ - amreport.8.txt \ - amrestore.8.txt \ - amrmtape.8.txt \ - amstatus.8.txt \ - amtape.8.txt \ - amtapetype.8.txt \ - amtoc.8.txt \ - amverify.8.txt \ - amverifyrun.8.txt \ - chgscsi.txt \ - dumperapi.txt \ - eventapi.txt \ - exclude.txt \ - faq.txt \ - historical.txt \ - howto-afs.txt \ - howto-auth.txt \ - howto-cygwin.txt \ - howto-filedriver.txt \ - howto-wrapper.txt \ - howtos.txt \ - index.txt \ - indexing.txt \ - install.txt \ - internals.txt \ - introduction.txt \ - ix01.txt \ - kerberos.txt \ - labelprinting.txt \ - links.txt \ - manpages.txt \ - multitape.txt \ - portusage.txt \ - pr01.txt \ - pr02.txt \ - pr03.txt \ - pr04.txt \ - rait.txt \ - references.txt \ - restore.txt \ - samba.txt \ - security-api.txt \ - security.txt \ - strategy-api.txt \ - survey.txt \ - systemnotes.txt \ - tapechangers.txt \ - tapesnchangers.txt \ - tapetypes.txt \ - technical.txt \ - topten.txt \ - upgrade.txt \ - using.txt \ - various.txt \ - vtape-api.txt \ - whatwasnew.txt \ - wishlist.txt \ - y2k.txt \ - zftape.txt - -EXTRA_DIST = $(pkgdata_DATA) diff --git a/docs/Makefile.in b/docs/Makefile.in deleted file mode 100644 index a7846b1..0000000 --- a/docs/Makefile.in +++ /dev/null @@ -1,610 +0,0 @@ -# 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 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# 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 -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = docs -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 \ - $(top_srcdir)/config/gnulib/alloca.m4 \ - $(top_srcdir)/config/gnulib/arpa_inet_h.m4 \ - $(top_srcdir)/config/gnulib/eoverflow.m4 \ - $(top_srcdir)/config/gnulib/extensions.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/gnulib-comp.m4 \ - $(top_srcdir)/config/gnulib/gnulib-tool.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/netinet_in_h.m4 \ - $(top_srcdir)/config/gnulib/onceonly_2_57.m4 \ - $(top_srcdir)/config/gnulib/size_max.m4 \ - $(top_srcdir)/config/gnulib/snprintf.m4 \ - $(top_srcdir)/config/gnulib/socklen.m4 \ - $(top_srcdir)/config/gnulib/sockpfaf.m4 \ - $(top_srcdir)/config/gnulib/stdbool.m4 \ - $(top_srcdir)/config/gnulib/stdint_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/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 -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 = -SOURCES = -DIST_SOURCES = -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)$(pkgdatadir)" -pkgdataDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgdata_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_TMPDIR = @AMANDA_TMPDIR@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMLINT = @AMLINT@ -AMLINTFLAGS = @AMLINTFLAGS@ -AMPLOT_CAT_COMPRESS = @AMPLOT_CAT_COMPRESS@ -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@ -BINARY_OWNER = @BINARY_OWNER@ -CAT = @CAT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ -CHIO = @CHIO@ -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@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DB_EXT = @DB_EXT@ -DD = @DD@ -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@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DOC_BUILD_DATE = @DOC_BUILD_DATE@ -DUMP = @DUMP@ -DUMPER_DIR = @DUMPER_DIR@ -ECHO = @ECHO@ -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@ -GETCONF = @GETCONF@ -GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ -GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ -GNUPLOT = @GNUPLOT@ -GNUTAR = @GNUTAR@ -GNUTAR_LISTED_INCREMENTAL_DIR = @GNUTAR_LISTED_INCREMENTAL_DIR@ -GNUTAR_LISTED_INCREMENTAL_DIRX = @GNUTAR_LISTED_INCREMENTAL_DIRX@ -GREP = @GREP@ -GZIP = @GZIP@ -HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ -HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ -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_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRNDUP = @HAVE_STRNDUP@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HAVE__BOOL = @HAVE__BOOL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -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@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAILER = @MAILER@ -MAKEINFO = @MAKEINFO@ -MAXTAPEBLOCKSIZE = @MAXTAPEBLOCKSIZE@ -MCUTIL = @MCUTIL@ -MKDIR_P = @MKDIR_P@ -MT = @MT@ -MTX = @MTX@ -MT_FILE_FLAG = @MT_FILE_FLAG@ -NETINET_IN_H = @NETINET_IN_H@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCAT = @PCAT@ -PERL = @PERL@ -PRINT = @PRINT@ -RANLIB = @RANLIB@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_STRCASECMP = @REPLACE_STRCASECMP@ -REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -RESTORE = @RESTORE@ -SAMBA_CLIENT = @SAMBA_CLIENT@ -SERVICE_SUFFIX = @SERVICE_SUFFIX@ -SETUID_GROUP = @SETUID_GROUP@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SNAPSHOT_STAMP = @SNAPSHOT_STAMP@ -SORT = @SORT@ -SSH = @SSH@ -STDBOOL_H = @STDBOOL_H@ -STRIP = @STRIP@ -SYS_SOCKET_H = @SYS_SOCKET_H@ -USE_VERSION_SUFFIXES = @USE_VERSION_SUFFIXES@ -VDUMP = @VDUMP@ -VERSION = @VERSION@ -VERSION_COMMENT = @VERSION_COMMENT@ -VERSION_MAJOR = @VERSION_MAJOR@ -VERSION_MINOR = @VERSION_MINOR@ -VERSION_PATCH = @VERSION_PATCH@ -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@ -XFSDUMP = @XFSDUMP@ -XFSRESTORE = @XFSRESTORE@ -XSLTPROC = @XSLTPROC@ -XSLTPROC_FLAGS = @XSLTPROC_FLAGS@ -YACC = @YACC@ -ac_c = @ac_c@ -ac_ct_AR = @ac_ct_AR@ -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@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -pkgdata_DATA = \ - Appendix.txt \ - amadmin.8.txt \ - amaespipe.8.txt \ - amanda.8.txt \ - amanda.conf.5.txt \ - amanda-client.conf.5.txt \ - amcheck.8.txt \ - amcheckdb.8.txt \ - amcleanup.8.txt \ - amcrypt.8.txt \ - amcrypt-asym-ossl.8.txt \ - amcrypt-ossl.8.txt \ - amdd.8.txt \ - amdump.8.txt \ - amfetchdump.8.txt \ - amflush.8.txt \ - amgetconf.8.txt \ - amlabel.8.txt \ - ammt.8.txt \ - amoverview.8.txt \ - amplot.8.txt \ - amrecover.8.txt \ - amreport.8.txt \ - amrestore.8.txt \ - amrmtape.8.txt \ - amstatus.8.txt \ - amtape.8.txt \ - amtapetype.8.txt \ - amtoc.8.txt \ - amverify.8.txt \ - amverifyrun.8.txt \ - chgscsi.txt \ - dumperapi.txt \ - eventapi.txt \ - exclude.txt \ - faq.txt \ - historical.txt \ - howto-afs.txt \ - howto-auth.txt \ - howto-cygwin.txt \ - howto-filedriver.txt \ - howto-wrapper.txt \ - howtos.txt \ - index.txt \ - indexing.txt \ - install.txt \ - internals.txt \ - introduction.txt \ - ix01.txt \ - kerberos.txt \ - labelprinting.txt \ - links.txt \ - manpages.txt \ - multitape.txt \ - portusage.txt \ - pr01.txt \ - pr02.txt \ - pr03.txt \ - pr04.txt \ - rait.txt \ - references.txt \ - restore.txt \ - samba.txt \ - security-api.txt \ - security.txt \ - strategy-api.txt \ - survey.txt \ - systemnotes.txt \ - tapechangers.txt \ - tapesnchangers.txt \ - tapetypes.txt \ - technical.txt \ - topten.txt \ - upgrade.txt \ - using.txt \ - various.txt \ - vtape-api.txt \ - whatwasnew.txt \ - wishlist.txt \ - y2k.txt \ - zftape.txt - -EXTRA_DIST = $(pkgdata_DATA) -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-pkgdataDATA: $(pkgdata_DATA) - @$(NORMAL_INSTALL) - 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) \ - echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ - $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ - done - -uninstall-pkgdataDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgdata_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -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; \ - 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 \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(DATA) -installdirs: - for dir in "$(DESTDIR)$(pkgdatadir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -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 - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pkgdataDATA - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-pkgdataDATA - -.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-pkgdataDATA \ - 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-pkgdataDATA - -# 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 --git a/dumper-src/Makefile.am b/dumper-src/Makefile.am index 442c876..ed1aef9 100644 --- a/dumper-src/Makefile.am +++ b/dumper-src/Makefile.am @@ -1,33 +1,27 @@ # Makefile for Amanda wrapper programs. +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_builddir)/common-src \ -I$(top_srcdir)/common-src -dumper_SCRIPTS = amgtar generic-dumper -dumperdir = @DUMPER_DIR@ - -SUFFIXES = .sh .pl - -.pl: - cat $< > $@ - chmod a+x $@ - -test -z "$(PERL)" || $(PERL) -c -w -W -T $@ || rm $@ +AM_CFLAGS = $(AMANDA_WARNING_CFLAGS) +AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS) -.sh: - cat $< > $@ - chmod a+x $@ +SCRIPTS_PERL = \ + amgtar -DISTCLEANFILES = $(dumper_SCRIPTS) +SCRIPTS_INCLUDE = \ + generic-dumper +EXTRA_DIST += generic-dumper.pl -# these are used for testing only: +CHECK_PERL = $(SCRIPTS_PERL) $(SCRIPTS_INCLUDE) -install-data-hook: - @list="$(dumper_SCRIPTS)"; \ - for p in $$list; do \ - pa=$(DESTDIR)$(dumperdir)/`echo $$p|sed '$(transform)'`; \ - echo chown $(BINARY_OWNER) $$pa; \ - chown $(BINARY_OWNER) $$pa; \ - echo chgrp $(SETUID_GROUP) $$pa; \ - chgrp $(SETUID_GROUP) $$pa; \ - done +dumperdir = $(DUMPER_DIR) +dumper_SCRIPTS = $(SCRIPTS_PERL) +dumper_DATA = $(SCRIPTS_INCLUDE) +INSTALLPERMS_data = dest=$(dumperdir) chown=amanda $(dumper_SCRIPTS) diff --git a/dumper-src/Makefile.in b/dumper-src/Makefile.in index 3b65707..bd21ff1 100644 --- a/dumper-src/Makefile.in +++ b/dumper-src/Makefile.in @@ -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. @@ -16,15 +16,135 @@ # Makefile for Amanda wrapper programs. -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ +# 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 + + 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,67 +159,146 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -subdir = dumper-src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/amgtar.pl.in $(srcdir)/generic-dumper.pl.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 = dumper-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 CONFIG_HEADER = $(top_builddir)/config/config.h -CONFIG_CLEAN_FILES = amgtar.pl generic-dumper.pl -am__installdirs = "$(DESTDIR)$(dumperdir)" +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(dumperdir)" "$(DESTDIR)$(dumperdir)" dumperSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(dumper_SCRIPTS) SOURCES = DIST_SOURCES = +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|^.*/||'`; +dumperDATA_INSTALL = $(INSTALL_DATA) +DATA = $(dumper_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@ @@ -107,14 +306,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@ @@ -125,20 +329,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 +355,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@ @@ -215,10 +527,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 +555,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 +618,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 +666,72 @@ 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 = generic-dumper.pl +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 -dumper_SCRIPTS = amgtar generic-dumper -dumperdir = @DUMPER_DIR@ -SUFFIXES = .sh .pl -DISTCLEANFILES = $(dumper_SCRIPTS) -all: all-am +AM_CFLAGS = $(AMANDA_WARNING_CFLAGS) +AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS) +SCRIPTS_PERL = \ + amgtar + +SCRIPTS_INCLUDE = \ + generic-dumper + +CHECK_PERL = $(SCRIPTS_PERL) $(SCRIPTS_INCLUDE) +dumperdir = $(DUMPER_DIR) +dumper_SCRIPTS = $(SCRIPTS_PERL) +dumper_DATA = $(SCRIPTS_INCLUDE) +INSTALLPERMS_data = dest=$(dumperdir) chown=amanda $(dumper_SCRIPTS) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .sh .pl -$(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*) \ @@ -378,13 +760,9 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -amgtar.pl: $(top_builddir)/config.status $(srcdir)/amgtar.pl.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -generic-dumper.pl: $(top_builddir)/config.status $(srcdir)/generic-dumper.pl.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-dumperSCRIPTS: $(dumper_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(dumperdir)" || $(mkdir_p) "$(DESTDIR)$(dumperdir)" + test -z "$(dumperdir)" || $(MKDIR_P) "$(DESTDIR)$(dumperdir)" @list='$(dumper_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ @@ -407,10 +785,23 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +install-dumperDATA: $(dumper_DATA) + @$(NORMAL_INSTALL) + test -z "$(dumperdir)" || $(MKDIR_P) "$(DESTDIR)$(dumperdir)" + @list='$(dumper_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dumperDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(dumperdir)/$$f'"; \ + $(dumperDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(dumperdir)/$$f"; \ + done -distclean-libtool: - -rm -f libtool -uninstall-info-am: +uninstall-dumperDATA: + @$(NORMAL_UNINSTALL) + @list='$(dumper_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dumperdir)/$$f'"; \ + rm -f "$(DESTDIR)$(dumperdir)/$$f"; \ + done tags: TAGS TAGS: @@ -419,22 +810,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; \ @@ -445,14 +835,20 @@ distdir: $(DISTFILES) || 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 $(SCRIPTS) + $(MAKE) $(AM_MAKEFLAGS) check-local +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(SCRIPTS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(dumperdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + for dir in "$(DESTDIR)$(dumperdir)" "$(DESTDIR)$(dumperdir)"; 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 @@ -467,8 +863,10 @@ 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) @@ -477,13 +875,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 @@ -495,16 +897,26 @@ info: info-am info-am: -install-data-am: install-dumperSCRIPTS +install-data-am: install-dumperDATA install-dumperSCRIPTS @$(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 @@ -523,40 +935,154 @@ ps: ps-am ps-am: -uninstall-am: uninstall-dumperSCRIPTS uninstall-info-am +uninstall-am: uninstall-dumperDATA uninstall-dumperSCRIPTS + +.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-data-hook \ - install-dumperSCRIPTS install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.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-data install-data-am \ + install-data-hook install-dumperDATA install-dumperSCRIPTS \ + 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-dumperSCRIPTS uninstall-info-am + uninstall-dumperDATA uninstall-dumperSCRIPTS -.pl: - cat $< > $@ - chmod a+x $@ - -test -z "$(PERL)" || $(PERL) -c -w -W -T $@ || rm $@ +# Perl +%: %.pl $(top_builddir)/config.status + $(top_builddir)/config.status --file=$@:$< + chmod a+x $@ -.sh: - cat $< > $@ - chmod a+x $@ +%.pl: %.pl.in $(top_builddir)/config.status + $(top_builddir)/config.status --file=$@:$< -# these are used for testing only: +%.pm: %.pm.in $(top_builddir)/config.status + $(top_builddir)/config.status --file=$@:$< -install-data-hook: - @list="$(dumper_SCRIPTS)"; \ - for p in $$list; do \ - pa=$(DESTDIR)$(dumperdir)/`echo $$p|sed '$(transform)'`; \ - echo chown $(BINARY_OWNER) $$pa; \ - chown $(BINARY_OWNER) $$pa; \ - echo chgrp $(SETUID_GROUP) $$pa; \ - chgrp $(SETUID_GROUP) $$pa; \ - done +# 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 $@ $< # 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 --git a/example/Makefile.am b/example/Makefile.am index e22862b..824aead 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -1,10 +1,43 @@ # Makefile for sample configuration files -noinst_DATA = amanda.conf \ - amanda-client.conf +include $(top_srcdir)/config/automake/installperms.am -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 \ +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) diff --git a/example/Makefile.in b/example/Makefile.in index 1144b74..a270515 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -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. @@ -16,15 +16,50 @@ # 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,56 +74,139 @@ 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@ @@ -96,9 +214,9 @@ 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@ @@ -113,7 +231,13 @@ 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 +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,52 +274,162 @@ 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@ @@ -204,7 +437,8 @@ 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 +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 +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 +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 +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,6 +688,8 @@ $(top_srcdir)/configure: $(am__configure_deps) 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 @@ -388,10 +702,57 @@ mostlyclean-libtool: 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 +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 +790,9 @@ check-am: all-am 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 +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 +837,27 @@ info: info-am 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 +876,73 @@ ps: ps-am 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: diff --git a/example/amanda-client.conf.in b/example/amanda-client.conf.in index c4cb9b9..10e859d 100644 --- a/example/amanda-client.conf.in +++ b/example/amanda-client.conf.in @@ -1,13 +1,3 @@ -### !!! WARNING !!! !!! WARNING !!! !!! WARNING !!! !!! WARNING !!! ### -### ### -### This file is not meant to be installed "as is", and in fact, it ### -### WILL NOT WORK! You must go through it and make changes appropriate ### -### to your own situation. See the documentation in this file, in the ### -### "man amanda" man page, in the "docs" directory and at the Amanda ### -### web page (www.amanda.org). ### -### ### -### !!! WARNING !!! !!! WARNING !!! !!! WARNING !!! !!! WARNING !!! ### - # # amanda.conf - sample Amanda client configuration file. # @@ -18,17 +8,17 @@ conf "@DEFAULT_CONFIG@" # your config name index_server "@DEFAULT_SERVER@" # your amindexd server tape_server "@DEFAULT_TAPE_SERVER@" # your amidxtaped server -tapedev "@EXAMPLE_TAPEDEV@" # your tape device +#tapedev "@EXAMPLE_TAPEDEV@" # your tape device + # if not set, Use configure or ask server. + # if set to empty string "", ask server + # amrecover will use the changer if set to the value + # of 'amrecover_changer' in the server amanda.conf. # auth - authentication scheme to use between server and client. -# Valid values are "bsd", "krb4", "krb5" and "ssh". -# Default: [auth "bsd"] -auth "bsd" +# Valid values are "bsd", "bsdudp", "bsdtcp", "krb5", "local", +# "rsh" and "ssh". +# Default: [auth "bsdtcp"] +auth "bsdtcp" ssh_keys "" # your ssh keys file if you use ssh auth -# You may include other amanda configuration files, so you can share -# dumptypes, tapetypes and interface definitions among several -# configurations. - -#includefile "@CONFIG_DIR@/amanda-client.conf.main" diff --git a/example/amanda.conf.in b/example/amanda.conf.in index 1cd9978..5e9df2b 100644 --- a/example/amanda.conf.in +++ b/example/amanda.conf.in @@ -37,7 +37,7 @@ displayunit "k" # Possible values: "k|m|g|t" # The unit used to print many numbers. # k=kilo, m=mega, g=giga, t=tera -netusage 600 Kbps # maximum net bandwidth for Amanda, in KB per sec +netusage 8000 Kbps # maximum net bandwidth for Amanda, in KB per sec dumpcycle 4 weeks # the number of days in the normal dump cycle runspercycle 20 # the number of amdump runs in dumpcycle days @@ -59,8 +59,8 @@ dtimeout 1800 # number of idle seconds before a dump is aborted. ctimeout 30 # maximum number of seconds that amcheck waits # for each client host -tapebufs 20 # A positive integer telling taper how many - # 32k buffers to allocate. The default is 20 (640k). +device_output_buffer_size 1280k + # amount of buffer space to use when writing to devices # By default, Amanda can only track at most one run per calendar day. When # the usetimestamps option is enabled, however, Amanda can track as many @@ -70,6 +70,46 @@ tapebufs 20 # A positive integer telling taper how many # edition 2.5 usetimestamps yes +# flush-threshold-dumped, flush-threshold-scheduled, taperflush, and autoflush +# are used to control tape utilization. See the amanda.conf (5) manpage for +# details on how they work. Taping will not start until all criteria are +# satisfied. Here are some examples: +# +# You want to fill tapes completely even in the case of failed dumps, and +# don't care if some dumps are left on the holding disk after a run: +# flush-threshold-dumped 100 # (or more) +# flush-threshold-scheduled 100 # (or more) +# taperflush 100 +# autoflush yes +# +# You want to improve tape performance by waiting for a complete tape of data +# before writing anything. However, all dumps will be flushed; none will +# be left on the holding disk. +# flush-threshold-dumped 100 # (or more) +# flush-threshold-scheduled 100 # (or more) +# taperflush 0 +# +# You don't want to use a new tape for every run, but want to start writing +# to tape as soon as possible: +# flush-threshold-dumped 0 # (or more) +# flush-threshold-scheduled 100 # (or more) +# taperflush 100 +# autoflush yes +# maxdumpsize 100k # amount of data to dump each run; see above. +# +# You want to keep the most recent dumps on holding disk, for faster recovery. +# Older dumps will be rotated to tape during each run. +# flush-threshold-dumped 300 # (or more) +# flush-threshold-scheduled 300 # (or more) +# taperflush 300 +# autoflush yes +# +# Defaults: +# (no restrictions; flush to tape immediately; don't flush old dumps.) +flush-threshold-dumped 0 +flush-threshold-scheduled 0 +taperflush 0 +autoflush no # Specify tape device and/or tape changer. If you don't have a tape # changer, and you don't want to use more than one tape per run of @@ -91,7 +131,7 @@ usetimestamps yes runtapes 1 # number of tapes to be used in a single run of amdump tpchanger "chg-manual" # the tape-changer glue script tapedev "@EXAMPLE_TAPEDEV@" # the no-rewind tape device to be used -rawtapedev "@DEFAULT_RAW_TAPE_DEVICE@" # the raw device to be used (ftape only) + #changerfile "@CONFIG_DIR@/@DEFAULT_CONFIG@/changer" #changerfile "@CONFIG_DIR@/@DEFAULT_CONFIG@/changer-status" changerfile "@CONFIG_DIR@/@DEFAULT_CONFIG@/changer.conf" @@ -112,11 +152,10 @@ amrecover_do_fsf yes # amrecover will call amrestore with the # -f flag for faster positioning of the tape. amrecover_check_label yes # amrecover will call amrestore with the # -l flag to check the label. -amrecover_changer "@EXAMPLE_TAPEDEV@" # amrecover will use the changer if you restore - # from this device. - # It could be a string like 'changer' and - # amrecover will use your changer if you - # set your tape with 'settape changer' +amrecover_changer "changer" # amrecover will use the changer if you restore + # from this device. It could be a string like 'changer' and amrecover will use your + # changer if you set your tape to 'changer' with 'setdevice changer' or via + # 'tapedev "changer"' in amanda-client.conf # Specify holding disks. These are used as a temporary staging area for # dumps before they are written to tape and are recommended for most sites. @@ -166,10 +205,6 @@ holdingdisk hd1 { # This means save at least 30% of the holding disk space for degraded # mode backups. -autoflush no # -# if autoflush is set to yes, then amdump will schedule all dump on -# holding disks to be flush to tape during the run. - # The format for a ColumnSpec is a ',' seperated list of triples. # Each triple consists of # + the name of the column (as in ColumnNameStrings) @@ -312,6 +347,12 @@ define tapetype MIMSY-MEGATAPE { speed 170 kbytes # limited by the Emulex bus interface, ugh } +define tapetype SEAGATE-ULTRIUM-LTO { + comment "SEAGATE ULTRIUM 06242 LTO, compression off" + length 99584 mbytes + filemark 0 kbytes + speed 11288 kps +} # dumptypes # @@ -676,13 +717,13 @@ define dumptype client-encrypt-nocomp { define interface local { comment "a local disk" - use 1000 kbps + use 8000 kbps } -define interface le0 { - comment "10 Mbps ethernet" - use 400 kbps -} +#define interface le0 { +# comment "10 Mbps ethernet" +# use 400 kbps +#} # You may include other amanda configuration files, so you can share # dumptypes, tapetypes and interface definitions among several diff --git a/example/chg-mcutil.conf b/example/chg-mcutil.conf index bf1acfa..e58ba16 100644 --- a/example/chg-mcutil.conf +++ b/example/chg-mcutil.conf @@ -26,7 +26,7 @@ # mcutil mcutil #location of the mcutil program -tape /dev/null # use ntape for norewind +tape tape:/dev/YOUR-TAPE-DEVICE-HERE # use ntape for norewind # {a|m|h|c} suffixes should NOT # be tape device since they all # implement hardware compression @@ -40,11 +40,11 @@ use_cleaning 0 # 0 for yes ; 1 for no cleanslot 7 # slot containing the cleaning disk cleansleep 300 # How long to wait before the cleaning tape finishes (default: 5 min) cleanme 45 # number of days before messages popup to clean tape drive -cleanfile /home/martinea/etc/amanda/changer/times_cleaned -lastfile /home/martinea/etc/amanda/changer/last_cleaned +cleanfile /etc/amanda/changer/times_cleaned +lastfile /etc/amanda/changer/last_cleaned # Names a status file where the current 'changer' state is stored. -currentslot /home/martinea/etc/amanda/changer/currentslot +currentslot /etc/amanda/changer/currentslot # Where to log changer debugging info logfile /tmp/amanda/changer.debug diff --git a/example/config.site b/example/config.site index 2ead4d8..134a4d2 100644 --- a/example/config.site +++ b/example/config.site @@ -195,18 +195,6 @@ # DEFAULT_TAPE_DEVICE=/dev/nrst0 -# DEFAULT_RAW_TAPE_DEVICE --with-ftape-rawdevice=RAW_TAPE_DEVICE -# Default: /dev/rawft[0-3] -# This sets the default raw tape device for use with the Linux -# floppy tape driver ftape (version 3.04d). -# The configure script will search for the lowest numbered -# /dev/rawft[0-3] device. If no device is found, /dev/null is used. -# -# This device is needed for QIC volume table operations with -# floppy tapes. -# DEFAULT_RAW_TAPE_DEVICE=/dev/rawft0 - - # DEFAULT_CHANGER_DEVICE --with-changer-device=CHANGER_DEVICE # Default: /dev/ch0 or /dev/null # This sets the default tape changer device. diff --git a/gnulib/Makefile.am b/gnulib/Makefile.am index b83d0f2..78cdadf 100644 --- a/gnulib/Makefile.am +++ b/gnulib/Makefile.am @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib --m4-base=config/gnulib --doc-base=doc --aux-dir=config --libtool --macro-prefix=gl getaddrinfo lock visibility +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib --m4-base=config/gnulib --doc-base=doc --aux-dir=config --libtool --macro-prefix=gl base64 fsusage getaddrinfo lock mkdtemp physmem visibility AUTOMAKE_OPTIONS = 1.5 gnits @@ -27,7 +27,7 @@ MAINTAINERCLEANFILES = AM_CPPFLAGS = if GCC_COMPILER - AM_CFLAGS += -Wno-error + AM_CFLAGS = -Wno-error -Wno-sign-compare endif noinst_LTLIBRARIES += libgnu.la @@ -38,6 +38,15 @@ libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libgnu_la_SOURCES = libgnu_la_LDFLAGS = $(AM_LDFLAGS) +## begin gnulib module absolute-header + +# Use this preprocessor expression to decide whether #include_next works. +# Do not rely on a 'configure'-time test for this, since the expression +# might appear in an installed header, which is used by some other compiler. +HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) + +## end gnulib module absolute-header + ## begin gnulib module alloca-opt BUILT_SOURCES += $(ALLOCA_H) @@ -62,7 +71,7 @@ BUILT_SOURCES += $(ARPA_INET_H) # We need the following in order to create when the system # doesn't have one. arpa/inet.h: - test -d arpa || mkdir arpa + @MKDIR_P@ arpa rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#include '; \ @@ -73,6 +82,53 @@ MOSTLYCLEANDIRS += arpa ## end gnulib module arpa_inet +## begin gnulib module base64 + +libgnu_la_SOURCES += base64.h base64.c + +## end gnulib module base64 + +## begin gnulib module float + +BUILT_SOURCES += $(FLOAT_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +float.h: float_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ + < $(srcdir)/float_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += float.h float.h-t + +EXTRA_DIST += float_.h + +## end gnulib module float + +## begin gnulib module fsusage + + +EXTRA_DIST += fsusage.c fsusage.h + +EXTRA_libgnu_la_SOURCES += fsusage.c + +## end gnulib module fsusage + +## begin gnulib module full-read + +libgnu_la_SOURCES += full-read.h full-read.c + +## end gnulib module full-read + +## begin gnulib module full-write + +libgnu_la_SOURCES += full-write.h full-write.c + +## end gnulib module full-write + ## begin gnulib module getaddrinfo @@ -88,6 +144,22 @@ libgnu_la_SOURCES += gettext.h ## end gnulib module gettext-h +## begin gnulib module gettimeofday + + +EXTRA_DIST += gettimeofday.c + +EXTRA_libgnu_la_SOURCES += gettimeofday.c + +## end gnulib module gettimeofday + +## begin gnulib module havelib + + +EXTRA_DIST += $(top_srcdir)/config/config.rpath + +## end gnulib module havelib + ## begin gnulib module inet_ntop @@ -97,12 +169,40 @@ EXTRA_libgnu_la_SOURCES += inet_ntop.c ## end gnulib module inet_ntop +## begin gnulib module link-warning + +LINK_WARNING_H=$(top_srcdir)/config/link-warning.h + +EXTRA_DIST += $(top_srcdir)/config/link-warning.h + +## end gnulib module link-warning + ## begin gnulib module lock libgnu_la_SOURCES += lock.h lock.c +EXTRA_DIST += $(top_srcdir)/config/config.rpath + ## end gnulib module lock +## begin gnulib module malloc-posix + + +EXTRA_DIST += malloc.c + +EXTRA_libgnu_la_SOURCES += malloc.c + +## end gnulib module malloc-posix + +## begin gnulib module mkdtemp + + +EXTRA_DIST += mkdtemp.c + +EXTRA_libgnu_la_SOURCES += mkdtemp.c + +## end gnulib module mkdtemp + ## begin gnulib module netinet_in BUILT_SOURCES += $(NETINET_IN_H) @@ -110,17 +210,49 @@ BUILT_SOURCES += $(NETINET_IN_H) # We need the following in order to create when the system # doesn't have one. netinet/in.h: - test -d netinet || mkdir netinet + @MKDIR_P@ netinet rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - echo '#include '; \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ + -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ + < $(srcdir)/netinet_in_.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t MOSTLYCLEANDIRS += netinet +EXTRA_DIST += netinet_in_.h + ## end gnulib module netinet_in +## begin gnulib module physmem + + +EXTRA_DIST += physmem.c physmem.h + +EXTRA_libgnu_la_SOURCES += physmem.c + +## end gnulib module physmem + +## begin gnulib module safe-read + + +EXTRA_DIST += safe-read.c safe-read.h + +EXTRA_libgnu_la_SOURCES += safe-read.c + +## end gnulib module safe-read + +## begin gnulib module safe-write + + +EXTRA_DIST += safe-write.c safe-write.h + +EXTRA_libgnu_la_SOURCES += safe-write.c + +## end gnulib module safe-write + ## begin gnulib module size_max libgnu_la_SOURCES += size_max.h @@ -130,7 +262,7 @@ libgnu_la_SOURCES += size_max.h ## begin gnulib module snprintf -EXTRA_DIST += snprintf.c snprintf.h +EXTRA_DIST += snprintf.c EXTRA_libgnu_la_SOURCES += snprintf.c @@ -154,6 +286,136 @@ EXTRA_DIST += stdbool_.h ## end gnulib module stdbool +## begin gnulib module stdint + +BUILT_SOURCES += $(STDINT_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdint.h: stdint_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ + -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ + -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ + -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ + -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ + -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ + -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ + -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ + -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ + -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ + -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ + -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ + -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ + -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ + < $(srcdir)/stdint_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdint.h stdint.h-t + +EXTRA_DIST += stdint_.h + +## end gnulib module stdint + +## begin gnulib module stdio + +BUILT_SOURCES += stdio.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdio.h: stdio_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ + -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ + -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ + -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ + -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ + -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ + -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ + -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ + -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ + -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ + -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ + -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ + -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ + -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ + -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ + -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ + -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ + -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ + -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ + -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ + -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ + -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ + -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ + -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ + -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ + -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ + -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ + -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ + -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ + -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ + -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ + -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/stdio_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdio.h stdio.h-t + +EXTRA_DIST += stdio_.h + +## end gnulib module stdio + +## begin gnulib module stdlib + +BUILT_SOURCES += stdlib.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdlib.h: stdlib_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ + -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ + -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ + -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ + -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ + -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ + -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ + -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \ + -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ + -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \ + -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ + -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \ + -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/stdlib_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdlib.h stdlib.h-t + +EXTRA_DIST += stdlib_.h + +## end gnulib module stdlib + ## begin gnulib module strdup @@ -172,12 +434,41 @@ BUILT_SOURCES += string.h string.h: string_.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ + -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ + -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ + -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ + -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ + -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ + -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ + -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ + -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ + -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ + -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ + -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ + -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ + -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ + -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ + -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ + -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ + -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ + -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ + -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ + -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ + -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ + -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ + -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ + -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ + -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ + -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ + -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ + -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ @@ -186,10 +477,9 @@ string.h: string_.h -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ + -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ - -e 's|@''REPLACE_STRCASECMP''@|$(REPLACE_STRCASECMP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/string_.h; \ } > $@-t mv $@-t $@ @@ -205,28 +495,157 @@ BUILT_SOURCES += $(SYS_SOCKET_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. -sys/socket.h: socket_.h +sys/socket.h: sys_socket_.h @MKDIR_P@ sys { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/socket_.h; \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ + -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + < $(srcdir)/sys_socket_.h; \ } > $@-t mv -f $@-t $@ MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t MOSTLYCLEANDIRS += sys -EXTRA_DIST += socket_.h +EXTRA_DIST += sys_socket_.h ## end gnulib module sys_socket +## begin gnulib module sys_stat + +BUILT_SOURCES += $(SYS_STAT_H) + +# We need the following in order to create when the system +# has one that is incomplete. +sys/stat.h: sys_stat_.h + @MKDIR_P@ sys + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ + -e 's|@''HAVE_IO_H''@|$(HAVE_IO_H)|g' \ + -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ + -e 's|@''HAVE_DECL_MKDIR''@|$(HAVE_DECL_MKDIR)|g' \ + < $(srcdir)/sys_stat_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_stat_.h + +## end gnulib module sys_stat + +## begin gnulib module sys_time + +BUILT_SOURCES += $(SYS_TIME_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/time.h: sys_time_.h + @MKDIR_P@ sys + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ + -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + < $(srcdir)/sys_time_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += sys/time.h sys/time.h-t + +EXTRA_DIST += sys_time_.h + +## end gnulib module sys_time + +## begin gnulib module tempname + + +EXTRA_DIST += tempname.c tempname.h + +EXTRA_libgnu_la_SOURCES += tempname.c + +## end gnulib module tempname + +## begin gnulib module unistd + +BUILT_SOURCES += unistd.h + +# We need the following in order to create an empty placeholder for +# when the system doesn't have one. +unistd.h: unistd_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ + -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ + -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ + -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ + -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ + -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ + -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ + -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ + -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ + -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ + -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ + -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ + -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ + -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ + -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ + -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ + -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ + -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ + -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ + -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ + -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ + < $(srcdir)/unistd_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += unistd.h unistd.h-t + +EXTRA_DIST += unistd_.h + +## end gnulib module unistd + ## begin gnulib module vasnprintf -EXTRA_DIST += asnprintf.c printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h +EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h EXTRA_libgnu_la_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c ## end gnulib module vasnprintf +## begin gnulib module wchar + +BUILT_SOURCES += $(WCHAR_H) + +# We need the following in order to create when the system +# version does not work standalone. +wchar.h: wchar_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ + -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ + -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ + -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ + -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/wchar_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += wchar.h wchar.h-t + +EXTRA_DIST += wchar_.h + +## end gnulib module wchar + ## begin gnulib module xsize libgnu_la_SOURCES += xsize.h @@ -239,7 +658,8 @@ mostlyclean-local: mostlyclean-generic if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ - done + done; \ + : # Make sure regenerate/* are in the distribution tarball EXTRA_DIST += regenerate/getaddrinfo-cygwin.patch regenerate/no-error.patch regenerate/regenerate diff --git a/gnulib/Makefile.in b/gnulib/Makefile.in index 2157892..aab44ad 100644 --- a/gnulib/Makefile.in +++ b/gnulib/Makefile.in @@ -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. @@ -23,19 +23,15 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib --m4-base=config/gnulib --doc-base=doc --aux-dir=config --libtool --macro-prefix=gl getaddrinfo lock visibility +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib --m4-base=config/gnulib --doc-base=doc --aux-dir=config --libtool --macro-prefix=gl base64 fsusage getaddrinfo lock mkdtemp physmem visibility -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 @@ -50,48 +46,116 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@GCC_COMPILER_TRUE@am__append_1 = -Wno-error subdir = gnulib 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 @@ -100,34 +164,37 @@ CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -am_libgnu_la_OBJECTS = lock.lo +am_libgnu_la_OBJECTS = base64.lo full-read.lo full-write.lo lock.lo libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config +libgnu_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libgnu_la_LDFLAGS) $(LDFLAGS) -o $@ +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 = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES) DIST_SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_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@ @@ -135,14 +202,19 @@ AMPLOT_CAT_GZIP = @AMPLOT_CAT_GZIP@ AMPLOT_CAT_PACK = @AMPLOT_CAT_PACK@ AMPLOT_COMPRESS = @AMPLOT_COMPRESS@ AMTAR = @AMTAR@ -AM_CFLAGS = @AM_CFLAGS@ $(am__append_1) 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 +225,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 +251,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@ @@ -243,10 +423,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 +451,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 +514,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,55 +562,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@ AUTOMAKE_OPTIONS = 1.5 gnits noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = libgnu.la # Make sure regenerate/* are in the distribution tarball -EXTRA_DIST = alloca_.h gai_strerror.c getaddrinfo.c getaddrinfo.h \ - inet_ntop.c inet_ntop.h snprintf.c snprintf.h stdbool_.h \ - strdup.c string_.h socket_.h asnprintf.c printf-args.c \ - printf-args.h printf-parse.c printf-parse.h vasnprintf.c \ - vasnprintf.h regenerate/getaddrinfo-cygwin.patch \ +EXTRA_DIST = alloca_.h float_.h fsusage.c fsusage.h gai_strerror.c \ + getaddrinfo.c getaddrinfo.h gettimeofday.c \ + $(top_srcdir)/config/config.rpath inet_ntop.c inet_ntop.h \ + $(top_srcdir)/config/link-warning.h \ + $(top_srcdir)/config/config.rpath malloc.c mkdtemp.c \ + netinet_in_.h physmem.c physmem.h safe-read.c safe-read.h \ + safe-write.c safe-write.h snprintf.c stdbool_.h stdint_.h \ + stdio_.h stdlib_.h strdup.c string_.h sys_socket_.h \ + sys_stat_.h sys_time_.h tempname.c tempname.h unistd_.h \ + asnprintf.c float+.h printf-args.c printf-args.h \ + printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h \ + wchar_.h regenerate/getaddrinfo-cygwin.patch \ regenerate/no-error.patch regenerate/regenerate -BUILT_SOURCES = $(ALLOCA_H) $(ARPA_INET_H) $(NETINET_IN_H) \ - $(STDBOOL_H) string.h $(SYS_SOCKET_H) +BUILT_SOURCES = $(ALLOCA_H) $(ARPA_INET_H) $(FLOAT_H) $(NETINET_IN_H) \ + $(STDBOOL_H) $(STDINT_H) stdio.h stdlib.h string.h \ + $(SYS_SOCKET_H) $(SYS_STAT_H) $(SYS_TIME_H) unistd.h \ + $(WCHAR_H) SUFFIXES = MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arpa/inet.h \ - arpa/inet.h-t netinet/in.h netinet/in.h-t stdbool.h \ - stdbool.h-t string.h string.h-t sys/socket.h sys/socket.h-t -MOSTLYCLEANDIRS = arpa netinet sys + arpa/inet.h-t float.h float.h-t netinet/in.h netinet/in.h-t \ + stdbool.h stdbool.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ + stdlib.h stdlib.h-t string.h string.h-t sys/socket.h \ + sys/socket.h-t sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t \ + unistd.h unistd.h-t wchar.h wchar.h-t +MOSTLYCLEANDIRS = arpa netinet sys sys CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = -libgnu_la_SOURCES = gettext.h lock.h lock.c size_max.h xsize.h +@GCC_COMPILER_TRUE@AM_CFLAGS = -Wno-error -Wno-sign-compare +libgnu_la_SOURCES = base64.h base64.c full-read.h full-read.c \ + full-write.h full-write.c gettext.h lock.h lock.c size_max.h \ + xsize.h libgnu_la_LIBADD = $(gl_LTLIBOBJS) libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) -EXTRA_libgnu_la_SOURCES = gai_strerror.c getaddrinfo.c inet_ntop.c \ - snprintf.c strdup.c asnprintf.c printf-args.c printf-parse.c \ - vasnprintf.c +EXTRA_libgnu_la_SOURCES = fsusage.c gai_strerror.c getaddrinfo.c \ + gettimeofday.c inet_ntop.c malloc.c mkdtemp.c physmem.c \ + safe-read.c safe-write.c snprintf.c strdup.c tempname.c \ + asnprintf.c printf-args.c printf-parse.c vasnprintf.c libgnu_la_LDFLAGS = $(AM_LDFLAGS) + +# Use this preprocessor expression to decide whether #include_next works. +# Do not rely on a 'configure'-time test for this, since the expression +# might appear in an installed header, which is used by some other compiler. +HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) +LINK_WARNING_H = $(top_srcdir)/config/link-warning.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -443,7 +687,7 @@ clean-noinstLTLIBRARIES: rm -f "$${dir}/so_locations"; \ done libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) - $(LINK) $(libgnu_la_LDFLAGS) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS) + $(libgnu_la_LINK) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -452,33 +696,44 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsusage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gai_strerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getaddrinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdtemp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/physmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-read.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.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 $@ $< @@ -489,10 +744,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 \ @@ -542,23 +793,21 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/regenerate - @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; \ @@ -613,7 +862,7 @@ 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 @@ -627,12 +876,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 @@ -653,19 +910,23 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ 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-info \ - install-info-am install-man install-strip installcheck \ + 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-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am + pdf-am ps ps-am tags uninstall uninstall-am # We need the following in order to create when the system @@ -679,20 +940,34 @@ alloca.h: alloca_.h # We need the following in order to create when the system # doesn't have one. arpa/inet.h: - test -d arpa || mkdir arpa + @MKDIR_P@ arpa rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#include '; \ } > $@-t mv $@-t $@ +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +float.h: float_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ + < $(srcdir)/float_.h; \ + } > $@-t + mv $@-t $@ + # We need the following in order to create when the system # doesn't have one. netinet/in.h: - test -d netinet || mkdir netinet + @MKDIR_P@ netinet rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - echo '#include '; \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ + -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ + < $(srcdir)/netinet_in_.h; \ } > $@-t mv $@-t $@ @@ -705,17 +980,149 @@ stdbool.h: stdbool_.h } > $@-t mv $@-t $@ +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdint.h: stdint_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ + -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ + -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ + -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ + -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ + -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ + -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ + -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ + -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ + -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ + -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ + -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ + -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ + -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ + < $(srcdir)/stdint_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdio.h: stdio_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ + -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ + -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ + -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ + -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ + -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ + -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ + -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ + -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ + -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ + -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ + -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ + -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ + -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ + -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ + -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ + -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ + -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ + -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ + -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ + -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ + -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ + -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ + -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ + -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ + -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ + -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ + -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ + -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ + -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ + -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ + -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ + -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/stdio_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdlib.h: stdlib_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ + -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ + -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ + -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ + -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ + -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ + -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ + -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \ + -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ + -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \ + -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ + -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \ + -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/stdlib_.h; \ + } > $@-t + mv $@-t $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string_.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ + -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ + -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ + -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ + -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ + -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ + -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ + -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ + -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ + -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ + -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ + -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ + -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ + -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ + -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ + -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ + -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ + -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ + -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ + -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ + -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ + -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ + -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ + -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ + -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ + -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ + -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ + -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ + -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ @@ -724,29 +1131,112 @@ string.h: string_.h -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ + -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ - -e 's|@''REPLACE_STRCASECMP''@|$(REPLACE_STRCASECMP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/string_.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. -sys/socket.h: socket_.h +sys/socket.h: sys_socket_.h @MKDIR_P@ sys { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/socket_.h; \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ + -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + < $(srcdir)/sys_socket_.h; \ } > $@-t mv -f $@-t $@ +# We need the following in order to create when the system +# has one that is incomplete. +sys/stat.h: sys_stat_.h + @MKDIR_P@ sys + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ + -e 's|@''HAVE_IO_H''@|$(HAVE_IO_H)|g' \ + -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ + -e 's|@''HAVE_DECL_MKDIR''@|$(HAVE_DECL_MKDIR)|g' \ + < $(srcdir)/sys_stat_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/time.h: sys_time_.h + @MKDIR_P@ sys + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ + -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + < $(srcdir)/sys_time_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create an empty placeholder for +# when the system doesn't have one. +unistd.h: unistd_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ + -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ + -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ + -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ + -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ + -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ + -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ + -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ + -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ + -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ + -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ + -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ + -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ + -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ + -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ + -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ + -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ + -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ + -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ + -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ + -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ + < $(srcdir)/unistd_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# version does not work standalone. +wchar.h: wchar_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ + -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ + -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ + -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ + -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/wchar_.h; \ + } > $@-t + mv $@-t $@ + mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ - done + 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 --git a/gnulib/alloca_.h b/gnulib/alloca_.h index dd0b3e9..af274b9 100644 --- a/gnulib/alloca_.h +++ b/gnulib/alloca_.h @@ -1,6 +1,6 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004, 2006 Free Software + Copyright (C) 1995, 1999, 2001-2004, 2006-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -20,8 +20,8 @@ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ -#ifndef _GNULIB_ALLOCA_H -# define _GNULIB_ALLOCA_H +#ifndef _GL_ALLOCA_H +#define _GL_ALLOCA_H /* alloca (N) returns a pointer to N bytes of memory allocated on the stack, which will last until the function returns. @@ -51,4 +51,4 @@ void *alloca (size_t); # endif #endif -#endif /* _GNULIB_ALLOCA_H */ +#endif /* _GL_ALLOCA_H */ diff --git a/gnulib/getaddrinfo.c b/gnulib/getaddrinfo.c index 1b6100d..55462c4 100644 --- a/gnulib/getaddrinfo.c +++ b/gnulib/getaddrinfo.c @@ -31,6 +31,9 @@ /* Get memcpy, strdup. */ #include +/* Get snprintf. */ +#include + #include #include "gettext.h" @@ -38,7 +41,6 @@ #define N_(String) String #include "inet_ntop.h" -#include "snprintf.h" extern int h_errno; @@ -181,13 +183,11 @@ getaddrinfo (const char *restrict nodename, { 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 == NULL) || !(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) { diff --git a/gnulib/printf-args.c b/gnulib/printf-args.c index 2259d53..4978914 100644 --- a/gnulib/printf-args.c +++ b/gnulib/printf-args.c @@ -15,16 +15,25 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +/* This file can be parametrized with the following macros: + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. + PRINTF_FETCHARGS Name of the function to be defined. + STATIC Set to 'static' to declare the function static. */ + +#ifndef PRINTF_FETCHARGS +# include +#endif /* Specification. */ -#include "printf-args.h" +#ifndef PRINTF_FETCHARGS +# include "printf-args.h" +#endif #ifdef STATIC STATIC #endif int -printf_fetchargs (va_list args, arguments *a) +PRINTF_FETCHARGS (va_list args, arguments *a) { size_t i; argument *ap; @@ -67,11 +76,9 @@ printf_fetchargs (va_list args, arguments *a) case TYPE_DOUBLE: ap->a.a_double = va_arg (args, double); break; -#if HAVE_LONG_DOUBLE case TYPE_LONGDOUBLE: ap->a.a_longdouble = va_arg (args, long double); break; -#endif case TYPE_CHAR: ap->a.a_char = va_arg (args, int); break; @@ -132,6 +139,45 @@ printf_fetchargs (va_list args, arguments *a) case TYPE_COUNT_LONGLONGINT_POINTER: ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); break; +#endif +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ + case TYPE_U8_STRING: + ap->a.a_u8_string = va_arg (args, const uint8_t *); + /* A null pointer is an invalid argument for "%U", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_u8_string == NULL) + { + static const uint8_t u8_null_string[] = + { '(', 'N', 'U', 'L', 'L', ')', 0 }; + ap->a.a_u8_string = u8_null_string; + } + break; + case TYPE_U16_STRING: + ap->a.a_u16_string = va_arg (args, const uint16_t *); + /* A null pointer is an invalid argument for "%lU", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_u16_string == NULL) + { + static const uint16_t u16_null_string[] = + { '(', 'N', 'U', 'L', 'L', ')', 0 }; + ap->a.a_u16_string = u16_null_string; + } + break; + case TYPE_U32_STRING: + ap->a.a_u32_string = va_arg (args, const uint32_t *); + /* A null pointer is an invalid argument for "%llU", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_u32_string == NULL) + { + static const uint32_t u32_null_string[] = + { '(', 'N', 'U', 'L', 'L', ')', 0 }; + ap->a.a_u32_string = u32_null_string; + } + break; #endif default: /* Unknown type. */ diff --git a/gnulib/printf-args.h b/gnulib/printf-args.h index 74a18d9..6f75e2a 100644 --- a/gnulib/printf-args.h +++ b/gnulib/printf-args.h @@ -18,6 +18,16 @@ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H +/* This file can be parametrized with the following macros: + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. + PRINTF_FETCHARGS Name of the function to be declared. + STATIC Set to 'static' to declare the function static. */ + +/* Default parameters. */ +#ifndef PRINTF_FETCHARGS +# define PRINTF_FETCHARGS printf_fetchargs +#endif + /* Get size_t. */ #include @@ -52,9 +62,7 @@ typedef enum TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, -#if HAVE_LONG_DOUBLE TYPE_LONGDOUBLE, -#endif TYPE_CHAR, #if HAVE_WINT_T TYPE_WIDE_CHAR, @@ -71,6 +79,12 @@ typedef enum #if HAVE_LONG_LONG_INT , TYPE_COUNT_LONGLONGINT_POINTER #endif +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ +, TYPE_U8_STRING +, TYPE_U16_STRING +, TYPE_U32_STRING +#endif } arg_type; /* Polymorphic argument */ @@ -93,9 +107,7 @@ typedef struct #endif float a_float; double a_double; -#if HAVE_LONG_DOUBLE long double a_longdouble; -#endif int a_char; #if HAVE_WINT_T wint_t a_wide_char; @@ -111,6 +123,12 @@ typedef struct long int * a_count_longint_pointer; #if HAVE_LONG_LONG_INT long long int * a_count_longlongint_pointer; +#endif +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ + const uint8_t * a_u8_string; + const uint16_t * a_u16_string; + const uint32_t * a_u32_string; #endif } a; @@ -131,6 +149,6 @@ STATIC #else extern #endif -int printf_fetchargs (va_list args, arguments *a); +int PRINTF_FETCHARGS (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */ diff --git a/gnulib/printf-parse.c b/gnulib/printf-parse.c index f5cdb6e..2e67980 100644 --- a/gnulib/printf-parse.c +++ b/gnulib/printf-parse.c @@ -15,25 +15,50 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +/* This file can be parametrized with the following macros: + CHAR_T The element type of the format string. + CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters + in the format string are ASCII. + DIRECTIVE Structure denoting a format directive. + Depends on CHAR_T. + DIRECTIVES Structure denoting the set of format directives of a + format string. Depends on CHAR_T. + PRINTF_PARSE Function that parses a format string. + Depends on CHAR_T. + STATIC Set to 'static' to declare the function static. + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ + +#ifndef PRINTF_PARSE +# include +#endif /* Specification. */ -#if WIDE_CHAR_VERSION -# include "wprintf-parse.h" -#else +#ifndef PRINTF_PARSE # include "printf-parse.h" #endif +/* Default parameters. */ +#ifndef PRINTF_PARSE +# define PRINTF_PARSE printf_parse +# define CHAR_T char +# define DIRECTIVE char_directive +# define DIRECTIVES char_directives +#endif + /* Get size_t, NULL. */ #include /* Get intmax_t. */ -#if HAVE_STDINT_H_WITH_UINTMAX +#ifdef IN_LIBINTL +# if HAVE_STDINT_H_WITH_UINTMAX +# include +# endif +# if HAVE_INTTYPES_H_WITH_UINTMAX +# include +# endif +#else # include #endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -# include -#endif /* malloc(), realloc(), free(). */ #include @@ -41,16 +66,9 @@ /* Checked size_t computations. */ #include "xsize.h" -#if WIDE_CHAR_VERSION -# define PRINTF_PARSE wprintf_parse -# define CHAR_T wchar_t -# define DIRECTIVE wchar_t_directive -# define DIRECTIVES wchar_t_directives -#else -# define PRINTF_PARSE printf_parse -# define CHAR_T char -# define DIRECTIVE char_directive -# define DIRECTIVES char_directives +#if CHAR_T_ONLY_ASCII +/* c_isascii(). */ +# include "c-ctype.h" #endif #ifdef STATIC @@ -115,7 +133,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) if (c == '%') { size_t arg_index = ARG_NONE; - DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */ + DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ /* Initialize the next directive. */ dp->dir_start = cp - 1; @@ -326,7 +344,6 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) flags += 8; cp++; } -#if HAVE_INTMAX_T else if (*cp == 'j') { if (sizeof (intmax_t) > sizeof (long)) @@ -341,7 +358,6 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) } cp++; } -#endif else if (*cp == 'z' || *cp == 'Z') { /* 'z' is standardized in ISO C 99, but glibc uses 'Z' @@ -419,12 +435,10 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) break; case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': -#if HAVE_LONG_DOUBLE if (flags >= 16 || (flags & 4)) type = TYPE_LONGDOUBLE; else -#endif - type = TYPE_DOUBLE; + type = TYPE_DOUBLE; break; case 'c': if (flags >= 8) @@ -479,6 +493,17 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) else type = TYPE_COUNT_INT_POINTER; break; +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ + case 'U': + if (flags >= 16) + type = TYPE_U32_STRING; + else if (flags >= 8) + type = TYPE_U16_STRING; + else + type = TYPE_U8_STRING; + break; +#endif case '%': type = TYPE_NONE; break; @@ -522,6 +547,13 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) d->dir = memory; } } +#if CHAR_T_ONLY_ASCII + else if (!c_isascii (c)) + { + /* Non-ASCII character. Not supported. */ + goto error; + } +#endif } d->dir[d->count].dir_start = cp; @@ -537,7 +569,8 @@ error: return -1; } +#undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE +#undef CHAR_T_ONLY_ASCII #undef CHAR_T -#undef PRINTF_PARSE diff --git a/gnulib/printf-parse.h b/gnulib/printf-parse.h index 82a0d37..de7fc49 100644 --- a/gnulib/printf-parse.h +++ b/gnulib/printf-parse.h @@ -1,5 +1,5 @@ /* Parse printf format string. - Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2003, 2005, 2007 Free Software Foundation, Inc. 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 @@ -18,6 +18,10 @@ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H +/* This file can be parametrized with the following macros: + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. + STATIC Set to 'static' to declare the function static. */ + #include "printf-args.h" @@ -32,6 +36,9 @@ /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) +/* xxx_directive: A parsed directive. + xxx_directives: A parsed format string. */ + /* A parsed directive. */ typedef struct { @@ -44,7 +51,7 @@ typedef struct const char* precision_start; const char* precision_end; size_t precision_arg_index; - char conversion; /* d i o u x X f e E g G c s p n U % but not C S */ + char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } char_directive; @@ -59,16 +66,114 @@ typedef struct } char_directives; +#if ENABLE_UNISTDIO + +/* A parsed directive. */ +typedef struct +{ + const uint8_t* dir_start; + const uint8_t* dir_end; + int flags; + const uint8_t* width_start; + const uint8_t* width_end; + size_t width_arg_index; + const uint8_t* precision_start; + const uint8_t* precision_end; + size_t precision_arg_index; + uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ + size_t arg_index; +} +u8_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + u8_directive *dir; + size_t max_width_length; + size_t max_precision_length; +} +u8_directives; + +/* A parsed directive. */ +typedef struct +{ + const uint16_t* dir_start; + const uint16_t* dir_end; + int flags; + const uint16_t* width_start; + const uint16_t* width_end; + size_t width_arg_index; + const uint16_t* precision_start; + const uint16_t* precision_end; + size_t precision_arg_index; + uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ + size_t arg_index; +} +u16_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + u16_directive *dir; + size_t max_width_length; + size_t max_precision_length; +} +u16_directives; + +/* A parsed directive. */ +typedef struct +{ + const uint32_t* dir_start; + const uint32_t* dir_end; + int flags; + const uint32_t* width_start; + const uint32_t* width_end; + size_t width_arg_index; + const uint32_t* precision_start; + const uint32_t* precision_end; + size_t precision_arg_index; + uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ + size_t arg_index; +} +u32_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + u32_directive *dir; + size_t max_width_length; + size_t max_precision_length; +} +u32_directives; + +#endif + /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ -#ifdef STATIC -STATIC +#if ENABLE_UNISTDIO +extern int + ulc_printf_parse (const char *format, char_directives *d, arguments *a); +extern int + u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); +extern int + u16_printf_parse (const uint16_t *format, u16_directives *d, + arguments *a); +extern int + u32_printf_parse (const uint32_t *format, u32_directives *d, + arguments *a); #else +# ifdef STATIC +STATIC +# else extern -#endif +# endif int printf_parse (const char *format, char_directives *d, arguments *a); +#endif #endif /* _PRINTF_PARSE_H */ diff --git a/gnulib/regenerate/getaddrinfo-cygwin.patch b/gnulib/regenerate/getaddrinfo-cygwin.patch index 7a384cc..1577b03 100644 --- a/gnulib/regenerate/getaddrinfo-cygwin.patch +++ b/gnulib/regenerate/getaddrinfo-cygwin.patch @@ -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 @@ -46,6 +58,7 @@ #else nodename = "0.0.0.0"; #endif +<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch @@ -175,11 +181,13 @@ { struct servent *se = NULL; @@ -65,6 +78,9 @@ if (!se) { @@ -196,7 +204,7 @@ +======= +@@ -198,7 +204,7 @@ +>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch } /* FIXME: Use gethostbyname_r if available. */ @@ -73,7 +89,11 @@ 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; } @@ -82,7 +102,11 @@ { 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. */ @@ -93,7 +117,11 @@ 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; } diff --git a/gnulib/regenerate/no-error.patch b/gnulib/regenerate/no-error.patch index 411d948..ebe43e4 100644 --- a/gnulib/regenerate/no-error.patch +++ b/gnulib/regenerate/no-error.patch @@ -7,7 +7,11 @@ Index: gnulib/Makefile.am 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 diff --git a/gnulib/regenerate/regenerate b/gnulib/regenerate/regenerate index 0265ca2..a32ab34 100644 --- a/gnulib/regenerate/regenerate +++ b/gnulib/regenerate/regenerate @@ -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 @@ shopt -u nullglob ## 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 --git a/gnulib/snprintf.c b/gnulib/snprintf.c index db1ca9a..7314c83 100644 --- a/gnulib/snprintf.c +++ b/gnulib/snprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. This program is free software; you can redistribute it and/or modify @@ -18,7 +18,8 @@ #include -#include "snprintf.h" +/* Specification. */ +#include #include #include @@ -37,7 +38,7 @@ additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, - return a negative value. */ + return a negative value. */ int snprintf (char *str, size_t size, const char *format, ...) { diff --git a/gnulib/stdbool_.h b/gnulib/stdbool_.h index efa80ba..150a010 100644 --- a/gnulib/stdbool_.h +++ b/gnulib/stdbool_.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2003, 2006, 2007 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify @@ -15,8 +15,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _STDBOOL_H -#define _STDBOOL_H +#ifndef _GL_STDBOOL_H +#define _GL_STDBOOL_H /* ISO C 99 for platforms that lack it. */ @@ -41,6 +41,9 @@ - You cannot assume that _Bool is a typedef; it might be a macro. + - Bit-fields of type 'bool' are not supported. Portable code + should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. + - In C99, casts and automatic conversions to '_Bool' or 'bool' are performed in such a way that every nonzero value gets converted to 'true', and zero gets converted to 'false'. This doesn't work @@ -112,4 +115,4 @@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; #define true 1 #define __bool_true_false_are_defined 1 -#endif /* _STDBOOL_H */ +#endif /* _GL_STDBOOL_H */ diff --git a/gnulib/string_.h b/gnulib/string_.h index 94d991c..bfb22b0 100644 --- a/gnulib/string_.h +++ b/gnulib/string_.h @@ -16,57 +16,113 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef _GL_STRING_H + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_STRING_H@ + #ifndef _GL_STRING_H #define _GL_STRING_H -#include @ABSOLUTE_STRING_H@ + +/* The definition of GL_LINK_WARNING is copied here. */ + #ifdef __cplusplus extern "C" { #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ -#if ! @HAVE_DECL_MEMMEM@ +#if @GNULIB_MEMMEM@ +# if ! @HAVE_DECL_MEMMEM@ extern void *memmem (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memmem +# define memmem(a,al,b,bl) \ + (GL_LINK_WARNING ("memmem is unportable - " \ + "use gnulib module memmem for portability"), \ + memmem (a, al, b, bl)) #endif /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ -#if ! @HAVE_MEMPCPY@ +#if @GNULIB_MEMPCPY@ +# if ! @HAVE_MEMPCPY@ extern void *mempcpy (void *restrict __dest, void const *restrict __src, size_t __n); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mempcpy +# define mempcpy(a,b,n) \ + (GL_LINK_WARNING ("mempcpy is unportable - " \ + "use gnulib module mempcpy for portability"), \ + mempcpy (a, b, n)) #endif /* Search backwards through a block for a byte (specified as an int). */ -#if ! @HAVE_DECL_MEMRCHR@ +#if @GNULIB_MEMRCHR@ +# if ! @HAVE_DECL_MEMRCHR@ extern void *memrchr (void const *, int, size_t); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memrchr +# define memrchr(a,b,c) \ + (GL_LINK_WARNING ("memrchr is unportable - " \ + "use gnulib module memrchr for portability"), \ + memrchr (a, b, c)) #endif /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ -#if ! @HAVE_STPCPY@ +#if @GNULIB_STPCPY@ +# if ! @HAVE_STPCPY@ extern char *stpcpy (char *restrict __dst, char const *restrict __src); +# endif +#elif defined GNULIB_POSIXCHECK +# undef stpcpy +# define stpcpy(a,b) \ + (GL_LINK_WARNING ("stpcpy is unportable - " \ + "use gnulib module stpcpy for portability"), \ + stpcpy (a, b)) #endif /* Copy no more than N bytes of SRC to DST, returning a pointer past the last non-NUL byte written into DST. */ -#if ! @HAVE_STPNCPY@ -# define stpncpy gnu_stpncpy +#if @GNULIB_STPNCPY@ +# if ! @HAVE_STPNCPY@ +# define stpncpy gnu_stpncpy extern char *stpncpy (char *restrict __dst, char const *restrict __src, size_t __n); +# endif +#elif defined GNULIB_POSIXCHECK +# undef stpncpy +# define stpncpy(a,b,n) \ + (GL_LINK_WARNING ("stpncpy is unportable - " \ + "use gnulib module stpncpy for portability"), \ + stpncpy (a, b, n)) #endif /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. - Note: This function may, in multibyte locales, return 0 for strings of - different lengths! - No known system has a strcasecmp() function that works correctly in - multibyte locales. Therefore use our version always, if the - strcase module is available. */ -#if @REPLACE_STRCASECMP@ -# define strcasecmp rpl_strcasecmp -extern int strcasecmp (char const *__s1, char const *__s2); + Note: This function does not work in multibyte locales. */ +#if ! @HAVE_STRCASECMP@ +extern int strcasecmp (char const *s1, char const *s2); +#endif +#if defined GNULIB_POSIXCHECK +/* strcasecmp() does not work with multibyte strings: + POSIX says that it operates on "strings", and "string" in POSIX is defined + as a sequence of bytes, not of characters. */ +# undef strcasecmp +# define strcasecmp(a,b) \ + (GL_LINK_WARNING ("strcasecmp cannot work correctly on character strings " \ + "in multibyte locales - " \ + "use mbscasecmp if you care about " \ + "internationalization, or use c_strcasecmp (from " \ + "gnulib module c-strcase) if you want a locale " \ + "independent function"), \ + strcasecmp (a, b)) #endif /* Compare no more than N bytes of strings S1 and S2, ignoring case, @@ -74,38 +130,150 @@ extern int strcasecmp (char const *__s1, char const *__s2); lexicographically less than, equal to or greater than S2. Note: This function cannot work correctly in multibyte locales. */ #if ! @HAVE_DECL_STRNCASECMP@ -extern int strncasecmp (char const *__s1, char const *__s2, size_t __n); +extern int strncasecmp (char const *s1, char const *s2, size_t n); +#endif +#if defined GNULIB_POSIXCHECK +/* strncasecmp() does not work with multibyte strings: + POSIX says that it operates on "strings", and "string" in POSIX is defined + as a sequence of bytes, not of characters. */ +# undef strncasecmp +# define strncasecmp(a,b,n) \ + (GL_LINK_WARNING ("strncasecmp cannot work correctly on character " \ + "strings in multibyte locales - " \ + "use mbsncasecmp or mbspcasecmp if you care about " \ + "internationalization, or use c_strncasecmp (from " \ + "gnulib module c-strcase) if you want a locale " \ + "independent function"), \ + strncasecmp (a, b, n)) +#endif + +#if defined GNULIB_POSIXCHECK +/* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +# undef strchr +# define strchr(s,c) \ + (GL_LINK_WARNING ("strchr cannot work correctly on character strings " \ + "in some multibyte locales - " \ + "use mbschr if you care about internationalization"), \ + strchr (s, c)) #endif /* Find the first occurrence of C in S or the final NUL byte. */ -#if ! @HAVE_STRCHRNUL@ +#if @GNULIB_STRCHRNUL@ +# if ! @HAVE_STRCHRNUL@ extern char *strchrnul (char const *__s, int __c_in); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strchrnul +# define strchrnul(a,b) \ + (GL_LINK_WARNING ("strchrnul is unportable - " \ + "use gnulib module strchrnul for portability"), \ + strchrnul (a, b)) #endif /* Duplicate S, returning an identical malloc'd string. */ -#if ! @HAVE_DECL_STRDUP@ && ! defined strdup +#if @GNULIB_STRDUP@ +# if ! @HAVE_DECL_STRDUP@ && ! defined strdup extern char *strdup (char const *__s); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strdup +# define strdup(a) \ + (GL_LINK_WARNING ("strdup is unportable - " \ + "use gnulib module strdup for portability"), \ + strdup (a)) #endif /* Return a newly allocated copy of at most N bytes of STRING. */ -#if ! @HAVE_STRNDUP@ -# undef strndup -# define strndup rpl_strndup -# if ! @HAVE_DECL_STRNDUP@ +#if @GNULIB_STRNDUP@ +# if ! @HAVE_STRNDUP@ +# undef strndup +# define strndup rpl_strndup +# endif +# if ! @HAVE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@ extern char *strndup (char const *__string, size_t __n); # endif +#elif defined GNULIB_POSIXCHECK +# undef strndup +# define strndup(a,n) \ + (GL_LINK_WARNING ("strndup is unportable - " \ + "use gnulib module strndup for portability"), \ + strndup (a, n)) #endif /* Find the length (number of bytes) of STRING, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many bytes, return MAXLEN. */ -#if ! @HAVE_DECL_STRNLEN@ +#if @GNULIB_STRNLEN@ +# if ! @HAVE_DECL_STRNLEN@ extern size_t strnlen (char const *__string, size_t __maxlen); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strnlen +# define strnlen(a,n) \ + (GL_LINK_WARNING ("strnlen is unportable - " \ + "use gnulib module strnlen for portability"), \ + strnlen (a, n)) +#endif + +#if defined GNULIB_POSIXCHECK +/* strcspn() assumes the second argument is a list of single-byte characters. + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +# undef strcspn +# define strcspn(s,a) \ + (GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \ + "in multibyte locales - " \ + "use mbscspn if you care about internationalization"), \ + strcspn (s, a)) #endif /* Find the first occurrence in S of any character in ACCEPT. */ -#if ! @HAVE_STRPBRK@ +#if @GNULIB_STRPBRK@ +# if ! @HAVE_STRPBRK@ extern char *strpbrk (char const *__s, char const *__accept); +# endif +# if defined GNULIB_POSIXCHECK +/* strpbrk() assumes the second argument is a list of single-byte characters. + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +# undef strpbrk +# define strpbrk(s,a) \ + (GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \ + "in multibyte locales - " \ + "use mbspbrk if you care about internationalization"), \ + strpbrk (s, a)) +# endif +#elif defined GNULIB_POSIXCHECK +# undef strpbrk +# define strpbrk(s,a) \ + (GL_LINK_WARNING ("strpbrk is unportable - " \ + "use gnulib module strpbrk for portability"), \ + strpbrk (s, a)) +#endif + +#if defined GNULIB_POSIXCHECK +/* strspn() assumes the second argument is a list of single-byte characters. + Even in this simple case, it cannot work with multibyte strings. */ +# undef strspn +# define strspn(s,a) \ + (GL_LINK_WARNING ("strspn cannot work correctly on character strings " \ + "in multibyte locales - " \ + "use mbsspn if you care about internationalization"), \ + strspn (s, a)) +#endif + +#if defined GNULIB_POSIXCHECK +/* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +# undef strrchr +# define strrchr(s,c) \ + (GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \ + "in some multibyte locales - " \ + "use mbsrchr if you care about internationalization"), \ + strrchr (s, c)) #endif /* Search the next delimiter (char listed in DELIM) starting at *STRINGP. @@ -124,29 +292,57 @@ extern char *strpbrk (char const *__s, char const *__accept); characters are ASCII characters < 0x30. See also strtok_r(). */ -#if ! @HAVE_STRSEP@ +#if @GNULIB_STRSEP@ +# if ! @HAVE_STRSEP@ extern char *strsep (char **restrict __stringp, char const *restrict __delim); +# endif +# if defined GNULIB_POSIXCHECK +# undef strsep +# define strsep(s,d) \ + (GL_LINK_WARNING ("strsep cannot work correctly on character strings " \ + "in multibyte locales - " \ + "use mbssep if you care about internationalization"), \ + strsep (s, d)) +# endif +#elif defined GNULIB_POSIXCHECK +# undef strsep +# define strsep(s,d) \ + (GL_LINK_WARNING ("strsep is unportable - " \ + "use gnulib module strsep for portability"), \ + strsep (s, d)) #endif -/* Find the first occurrence of NEEDLE in HAYSTACK. - No known system has a strstr() function that works correctly in - multibyte locales. Therefore use our version always, if the strstr - module is available. */ -#if @REPLACE_STRSTR@ +#if defined GNULIB_POSIXCHECK +/* strstr() does not work with multibyte strings if the locale encoding is + different from UTF-8: + POSIX says that it operates on "strings", and "string" in POSIX is defined + as a sequence of bytes, not of characters. */ # undef strstr -# define strstr rpl_strstr -extern char *strstr (char const *__haystack, char const *__needle); +# define strstr(a,b) \ + (GL_LINK_WARNING ("strstr cannot work correctly on character strings " \ + "in most multibyte locales - " \ + "use mbsstr if you care about internationalization"), \ + strstr (a, b)) #endif /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive - comparison. - Note: This function may, in multibyte locales, return success even if - strlen (haystack) < strlen (needle) ! */ -#if @REPLACE_STRCASESTR@ -# undef strcasestr -# define strcasestr rpl_strcasestr + comparison. */ +#if ! @HAVE_STRCASESTR@ extern char *strcasestr (const char *haystack, const char *needle); #endif +#if defined GNULIB_POSIXCHECK +/* strcasestr() does not work with multibyte strings: + It is a glibc extension, and glibc implements it only for unibyte + locales. */ +# undef strcasestr +# define strcasestr(a,b) \ + (GL_LINK_WARNING ("strcasestr does work correctly on character strings " \ + "in multibyte locales - " \ + "use mbscasestr if you care about " \ + "internationalization, or use c-strcasestr if you want " \ + "a locale independent function"), \ + strcasestr (a, b)) +#endif /* Parse S into tokens separated by characters in DELIM. If S is NULL, the saved pointer in SAVE_PTR is used as @@ -170,13 +366,183 @@ extern char *strcasestr (const char *haystack, const char *needle); characters are ASCII characters < 0x30. See also strsep(). */ -#if ! @HAVE_DECL_STRTOK_R@ -extern char *strtok_r (char *restrict __s, char const *restrict __sep, - char **restrict __lasts); +#if @GNULIB_STRTOK_R@ +# if ! @HAVE_DECL_STRTOK_R@ +extern char *strtok_r (char *restrict s, char const *restrict delim, + char **restrict save_ptr); +# endif +# if defined GNULIB_POSIXCHECK +# undef strtok_r +# define strtok_r(s,d,p) \ + (GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \ + "in multibyte locales - " \ + "use mbstok_r if you care about internationalization"), \ + strtok_r (s, d, p)) +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtok_r +# define strtok_r(s,d,p) \ + (GL_LINK_WARNING ("strtok_r is unportable - " \ + "use gnulib module strtok_r for portability"), \ + strtok_r (s, d, p)) +#endif + + +/* The following functions are not specified by POSIX. They are gnulib + extensions. */ + +#if @GNULIB_MBSLEN@ +/* Return the number of multibyte characters in the character string STRING. + This considers multibyte characters, unlike strlen, which counts bytes. */ +extern size_t mbslen (const char *string); +#endif + +#if @GNULIB_MBSNLEN@ +/* Return the number of multibyte characters in the character string starting + at STRING and ending at STRING + LEN. */ +extern size_t mbsnlen (const char *string, size_t len); +#endif + +#if @GNULIB_MBSCHR@ +/* Locate the first single-byte character C in the character string STRING, + and return a pointer to it. Return NULL if C is not found in STRING. + Unlike strchr(), this function works correctly in multibyte locales with + encodings such as GB18030. */ +# define mbschr rpl_mbschr /* avoid collision with HP-UX function */ +extern char * mbschr (const char *string, int c); +#endif + +#if @GNULIB_MBSRCHR@ +/* Locate the last single-byte character C in the character string STRING, + and return a pointer to it. Return NULL if C is not found in STRING. + Unlike strrchr(), this function works correctly in multibyte locales with + encodings such as GB18030. */ +# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ +extern char * mbsrchr (const char *string, int c); +#endif + +#if @GNULIB_MBSSTR@ +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. + Unlike strstr(), this function works correctly in multibyte locales with + encodings different from UTF-8. */ +extern char * mbsstr (const char *haystack, const char *needle); +#endif + +#if @GNULIB_MBSCASECMP@ +/* Compare the character strings S1 and S2, ignoring case, returning less than, + equal to or greater than zero if S1 is lexicographically less than, equal to + or greater than S2. + Note: This function may, in multibyte locales, return 0 for strings of + different lengths! + Unlike strcasecmp(), this function works correctly in multibyte locales. */ +extern int mbscasecmp (const char *s1, const char *s2); #endif +#if @GNULIB_MBSNCASECMP@ +/* Compare the initial segment of the character string S1 consisting of at most + N characters with the initial segment of the character string S2 consisting + of at most N characters, ignoring case, returning less than, equal to or + greater than zero if the initial segment of S1 is lexicographically less + than, equal to or greater than the initial segment of S2. + Note: This function may, in multibyte locales, return 0 for initial segments + of different lengths! + Unlike strncasecmp(), this function works correctly in multibyte locales. + But beware that N is not a byte count but a character count! */ +extern int mbsncasecmp (const char *s1, const char *s2, size_t n); +#endif + +#if @GNULIB_MBSPCASECMP@ +/* Compare the initial segment of the character string STRING consisting of + at most mbslen (PREFIX) characters with the character string PREFIX, + ignoring case, returning less than, equal to or greater than zero if this + initial segment is lexicographically less than, equal to or greater than + PREFIX. + Note: This function may, in multibyte locales, return 0 if STRING is of + smaller length than PREFIX! + Unlike strncasecmp(), this function works correctly in multibyte + locales. */ +extern char * mbspcasecmp (const char *string, const char *prefix); +#endif + +#if @GNULIB_MBSCASESTR@ +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK, using case-insensitive comparison. + Note: This function may, in multibyte locales, return success even if + strlen (haystack) < strlen (needle) ! + Unlike strcasestr(), this function works correctly in multibyte locales. */ +extern char * mbscasestr (const char *haystack, const char *needle); +#endif + +#if @GNULIB_MBSCSPN@ +/* Find the first occurrence in the character string STRING of any character + in the character string ACCEPT. Return the number of bytes from the + beginning of the string to this occurrence, or to the end of the string + if none exists. + Unlike strcspn(), this function works correctly in multibyte locales. */ +extern size_t mbscspn (const char *string, const char *accept); +#endif + +#if @GNULIB_MBSPBRK@ +/* Find the first occurrence in the character string STRING of any character + in the character string ACCEPT. Return the pointer to it, or NULL if none + exists. + Unlike strpbrk(), this function works correctly in multibyte locales. */ +# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ +extern char * mbspbrk (const char *string, const char *accept); +#endif + +#if @GNULIB_MBSSPN@ +/* Find the first occurrence in the character string STRING of any character + not in the character string REJECT. Return the number of bytes from the + beginning of the string to this occurrence, or to the end of the string + if none exists. + Unlike strspn(), this function works correctly in multibyte locales. */ +extern size_t mbsspn (const char *string, const char *reject); +#endif + +#if @GNULIB_MBSSEP@ +/* Search the next delimiter (multibyte character listed in the character + string DELIM) starting at the character string *STRINGP. + If one is found, overwrite it with a NUL, and advance *STRINGP to point + to the next multibyte character after it. Otherwise, set *STRINGP to NULL. + If *STRINGP was already NULL, nothing happens. + Return the old value of *STRINGP. + + This is a variant of mbstok_r() that supports empty fields. + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + + See also mbstok_r(). */ +extern char * mbssep (char **stringp, const char *delim); +#endif + +#if @GNULIB_MBSTOK_R@ +/* Parse the character string STRING into tokens separated by characters in + the character string DELIM. + If STRING is NULL, the saved pointer in SAVE_PTR is used as + the next starting point. For example: + char s[] = "-abc-=-def"; + char *sp; + x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" + x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL + x = mbstok_r(NULL, "=", &sp); // x = NULL + // s = "abc\0-def\0" + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + + See also mbssep(). */ +extern char * mbstok_r (char *string, const char *delim, char **save_ptr); +#endif + + #ifdef __cplusplus } #endif -#endif +#endif /* _GL_STRING_H */ +#endif /* _GL_STRING_H */ diff --git a/gnulib/vasnprintf.c b/gnulib/vasnprintf.c index 67406ae..f563823 100644 --- a/gnulib/vasnprintf.c +++ b/gnulib/vasnprintf.c @@ -15,6 +15,35 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* This file can be parametrized with the following macros: + VASNPRINTF The name of the function being defined. + FCHAR_T The element type of the format string. + DCHAR_T The element type of the destination (result) string. + FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters + in the format string are ASCII. MUST be set if + FCHAR_T and DCHAR_T are not the same type. + DIRECTIVE Structure denoting a format directive. + Depends on FCHAR_T. + DIRECTIVES Structure denoting the set of format directives of a + format string. Depends on FCHAR_T. + PRINTF_PARSE Function that parses a format string. + Depends on FCHAR_T. + DCHAR_CPY memcpy like function for DCHAR_T[] arrays. + DCHAR_SET memset like function for DCHAR_T[] arrays. + DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. + SNPRINTF The system's snprintf (or similar) function. + This may be either snprintf or swprintf. + TCHAR_T The element type of the argument and result string + of the said SNPRINTF function. This may be either + char or wchar_t. The code exploits that + sizeof (TCHAR_T) | sizeof (DCHAR_T) and + alignof (TCHAR_T) <= alignof (DCHAR_T). + DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. + DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. + DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. + DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. + DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ + /* Tell glibc's to provide a prototype for snprintf(). This must come before because may include , and once has been included, it's too late. */ @@ -22,33 +51,74 @@ # define _GNU_SOURCE 1 #endif -#include +#ifndef VASNPRINTF +# include +#endif #ifndef IN_LIBINTL # include #endif /* Specification. */ -#if WIDE_CHAR_VERSION -# include "vasnwprintf.h" -#else -# include "vasnprintf.h" +#ifndef VASNPRINTF +# if WIDE_CHAR_VERSION +# include "vasnwprintf.h" +# else +# include "vasnprintf.h" +# endif #endif +#include /* localeconv() */ #include /* snprintf(), sprintf() */ #include /* abort(), malloc(), realloc(), free() */ #include /* memcpy(), strlen() */ #include /* errno */ #include /* CHAR_BIT */ #include /* DBL_MAX_EXP, LDBL_MAX_EXP */ -#if WIDE_CHAR_VERSION -# include "wprintf-parse.h" -#else -# include "printf-parse.h" +#if HAVE_NL_LANGINFO +# include +#endif +#ifndef VASNPRINTF +# if WIDE_CHAR_VERSION +# include "wprintf-parse.h" +# else +# include "printf-parse.h" +# endif #endif /* Checked size_t computations. */ #include "xsize.h" +#if NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL +# include +# include "float+.h" +# include "fpucw.h" +#endif + +#if NEED_PRINTF_INFINITE_DOUBLE && !defined IN_LIBINTL +# include +# include "isnan.h" +#endif + +#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !defined IN_LIBINTL +# include +# include "isnanl-nolibm.h" +# include "fpucw.h" +#endif + +#if NEED_PRINTF_DIRECTIVE_A && !defined IN_LIBINTL +# include +# include "isnan.h" +# include "printf-frexp.h" +# include "isnanl-nolibm.h" +# include "printf-frexpl.h" +# include "fpucw.h" +#endif + +/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */ +#ifndef EOVERFLOW +# define EOVERFLOW E2BIG +#endif + #if HAVE_WCHAR_T # if HAVE_WCSLEN # define local_wcslen wcslen @@ -72,12 +142,32 @@ local_wcslen (const wchar_t *s) # endif #endif +/* Default parameters. */ +#ifndef VASNPRINTF +# if WIDE_CHAR_VERSION +# define VASNPRINTF vasnwprintf +# define FCHAR_T wchar_t +# define DCHAR_T wchar_t +# define TCHAR_T wchar_t +# define DCHAR_IS_TCHAR 1 +# define DIRECTIVE wchar_t_directive +# define DIRECTIVES wchar_t_directives +# define PRINTF_PARSE wprintf_parse +# define DCHAR_CPY wmemcpy +# else +# define VASNPRINTF vasnprintf +# define FCHAR_T char +# define DCHAR_T char +# define TCHAR_T char +# define DCHAR_IS_TCHAR 1 +# define DIRECTIVE char_directive +# define DIRECTIVES char_directives +# define PRINTF_PARSE printf_parse +# define DCHAR_CPY memcpy +# endif +#endif #if WIDE_CHAR_VERSION -# define VASNPRINTF vasnwprintf -# define CHAR_T wchar_t -# define DIRECTIVE wchar_t_directive -# define DIRECTIVES wchar_t_directives -# define PRINTF_PARSE wprintf_parse + /* TCHAR_T is wchar_t. */ # define USE_SNPRINTF 1 # if HAVE_DECL__SNWPRINTF /* On Windows, the function swprintf() has a different signature than @@ -88,23 +178,1019 @@ local_wcslen (const wchar_t *s) # define SNPRINTF swprintf # endif #else -# define VASNPRINTF vasnprintf -# define CHAR_T char -# define DIRECTIVE char_directive -# define DIRECTIVES char_directives -# define PRINTF_PARSE printf_parse -# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) + /* TCHAR_T is char. */ +# /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. + But don't use it on BeOS, since BeOS snprintf produces no output if the + size argument is >= 0x3000000. */ +# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ +# define USE_SNPRINTF 1 +# else +# define USE_SNPRINTF 0 +# endif # if HAVE_DECL__SNPRINTF /* Windows. */ # define SNPRINTF _snprintf # else /* Unix. */ # define SNPRINTF snprintf + /* Here we need to call the native snprintf, not rpl_snprintf. */ +# undef snprintf +# endif +#endif +/* Here we need to call the native sprintf, not rpl_sprintf. */ +#undef sprintf + +#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL +/* Determine the decimal-point character according to the current locale. */ +# ifndef decimal_point_char_defined +# define decimal_point_char_defined 1 +static char +decimal_point_char () +{ + const char *point; + /* Determine it in a multithread-safe way. We know nl_langinfo is + multithread-safe on glibc systems, but is not required to be multithread- + safe by POSIX. sprintf(), however, is multithread-safe. localeconv() + is rarely multithread-safe. */ +# if HAVE_NL_LANGINFO && __GLIBC__ + point = nl_langinfo (RADIXCHAR); +# elif 1 + char pointbuf[5]; + sprintf (pointbuf, "%#.0f", 1.0); + point = &pointbuf[1]; +# else + point = localeconv () -> decimal_point; +# endif + /* The decimal point is always a single byte: either '.' or ','. */ + return (point[0] != '\0' ? point[0] : '.'); +} +# endif +#endif + +#if NEED_PRINTF_INFINITE_DOUBLE && !defined IN_LIBINTL + +/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ +static int +is_infinite_or_zero (double x) +{ + return isnan (x) || x + x == x; +} + +#endif + +#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !defined IN_LIBINTL + +/* Equivalent to !isfinite(x), but does not require libm. */ +static int +is_infinitel (long double x) +{ + return isnanl (x) || (x + x == x && x != 0.0L); +} + +#endif + +#if NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL + +/* Converting 'long double' to decimal without rare rounding bugs requires + real bignums. We use the naming conventions of GNU gmp, but vastly simpler + (and slower) algorithms. */ + +typedef unsigned int mp_limb_t; +# define GMP_LIMB_BITS 32 +typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS) - 1]; + +typedef unsigned long long mp_twolimb_t; +# define GMP_TWOLIMB_BITS 64 +typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS) - 1]; + +/* Representation of a bignum >= 0. */ +typedef struct +{ + size_t nlimbs; + mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ +} mpn_t; + +/* Compute the product of two bignums >= 0. + Return the allocated memory in case of success, NULL in case of memory + allocation failure. */ +static void * +multiply (mpn_t src1, mpn_t src2, mpn_t *dest) +{ + const mp_limb_t *p1; + const mp_limb_t *p2; + size_t len1; + size_t len2; + + if (src1.nlimbs <= src2.nlimbs) + { + len1 = src1.nlimbs; + p1 = src1.limbs; + len2 = src2.nlimbs; + p2 = src2.limbs; + } + else + { + len1 = src2.nlimbs; + p1 = src2.limbs; + len2 = src1.nlimbs; + p2 = src1.limbs; + } + /* Now 0 <= len1 <= len2. */ + if (len1 == 0) + { + /* src1 or src2 is zero. */ + dest->nlimbs = 0; + dest->limbs = (mp_limb_t *) malloc (1); + } + else + { + /* Here 1 <= len1 <= len2. */ + size_t dlen; + mp_limb_t *dp; + size_t k, i, j; + + dlen = len1 + len2; + dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); + if (dp == NULL) + return NULL; + for (k = len2; k > 0; ) + dp[--k] = 0; + for (i = 0; i < len1; i++) + { + mp_limb_t digit1 = p1[i]; + mp_twolimb_t carry = 0; + for (j = 0; j < len2; j++) + { + mp_limb_t digit2 = p2[j]; + carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; + carry += dp[i + j]; + dp[i + j] = (mp_limb_t) carry; + carry = carry >> GMP_LIMB_BITS; + } + dp[i + len2] = (mp_limb_t) carry; + } + /* Normalise. */ + while (dlen > 0 && dp[dlen - 1] == 0) + dlen--; + dest->nlimbs = dlen; + dest->limbs = dp; + } + return dest->limbs; +} + +/* Compute the quotient of a bignum a >= 0 and a bignum b > 0. + a is written as a = q * b + r with 0 <= r < b. q is the quotient, r + the remainder. + Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, + q is incremented. + Return the allocated memory in case of success, NULL in case of memory + allocation failure. */ +static void * +divide (mpn_t a, mpn_t b, mpn_t *q) +{ + /* Algorithm: + First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] + with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). + If m=n=1, perform a single-precision division: + r:=0, j:=m, + while j>0 do + {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = + = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, perform a multiple-precision division: + We have a/b < beta^(m-n+1). + s:=intDsize-1-(hightest bit in b[n-1]), 0<=s=beta/2. + For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} + Compute q* : + q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). + In case of overflow (q* >= beta) set q* := beta-1. + Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] + and c3 := b[n-2] * q*. + {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow + occurred. Furthermore 0 <= c3 < beta^2. + If there was overflow and + r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, + the next test can be skipped.} + While c3 > c2, {Here 0 <= c2 < c3 < beta^2} + Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. + If q* > 0: + Put r := r - b * q* * beta^j. In detail: + [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. + hence: u:=0, for i:=0 to n-1 do + u := u + q* * b[i], + r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), + u:=u div beta (+ 1, if carry in subtraction) + r[n+j]:=r[n+j]-u. + {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 + < q* + 1 <= beta, + the carry u does not overflow.} + If a negative carry occurs, put q* := q* - 1 + and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. + Set q[j] := q*. + Normalise [q[m-n],..,q[0]]; this yields the quotient q. + Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the + rest r. + The room for q[j] can be allocated at the memory location of r[n+j]. + Finally, round-to-even: + Shift r left by 1 bit. + If r > b or if r = b and q[0] is odd, q := q+1. + */ + const mp_limb_t *a_ptr = a.limbs; + size_t a_len = a.nlimbs; + const mp_limb_t *b_ptr = b.limbs; + size_t b_len = b.nlimbs; + mp_limb_t *roomptr; + mp_limb_t *tmp_roomptr = NULL; + mp_limb_t *q_ptr; + size_t q_len; + mp_limb_t *r_ptr; + size_t r_len; + + /* Allocate room for a_len+2 digits. + (Need a_len+1 digits for the real division and 1 more digit for the + final rounding of q.) */ + roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); + if (roomptr == NULL) + return NULL; + + /* Normalise a. */ + while (a_len > 0 && a_ptr[a_len - 1] == 0) + a_len--; + + /* Normalise b. */ + for (;;) + { + if (b_len == 0) + /* Division by zero. */ + abort (); + if (b_ptr[b_len - 1] == 0) + b_len--; + else + break; + } + + /* Here m = a_len >= 0 and n = b_len > 0. */ + + if (a_len < b_len) + { + /* m beta^(m-2) <= a/b < beta^m */ + r_ptr = roomptr; + q_ptr = roomptr + 1; + { + mp_limb_t den = b_ptr[0]; + mp_limb_t remainder = 0; + const mp_limb_t *sourceptr = a_ptr + a_len; + mp_limb_t *destptr = q_ptr + a_len; + size_t count; + for (count = a_len; count > 0; count--) + { + mp_twolimb_t num = + ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; + *--destptr = num / den; + remainder = num % den; + } + /* Normalise and store r. */ + if (remainder > 0) + { + r_ptr[0] = remainder; + r_len = 1; + } + else + r_len = 0; + /* Normalise q. */ + q_len = a_len; + if (q_ptr[q_len - 1] == 0) + q_len--; + } + } + else + { + /* n>1: multiple precision division. + beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> + beta^(m-n-1) <= a/b < beta^(m-n+1). */ + /* Determine s. */ + size_t s; + { + mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ + s = 31; + if (msd >= 0x10000) + { + msd = msd >> 16; + s -= 16; + } + if (msd >= 0x100) + { + msd = msd >> 8; + s -= 8; + } + if (msd >= 0x10) + { + msd = msd >> 4; + s -= 4; + } + if (msd >= 0x4) + { + msd = msd >> 2; + s -= 2; + } + if (msd >= 0x2) + { + msd = msd >> 1; + s -= 1; + } + } + /* 0 <= s < GMP_LIMB_BITS. + Copy b, shifting it left by s bits. */ + if (s > 0) + { + tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); + if (tmp_roomptr == NULL) + { + free (roomptr); + return NULL; + } + { + const mp_limb_t *sourceptr = b_ptr; + mp_limb_t *destptr = tmp_roomptr; + mp_twolimb_t accu = 0; + size_t count; + for (count = b_len; count > 0; count--) + { + accu += (mp_twolimb_t) *sourceptr++ << s; + *destptr++ = (mp_limb_t) accu; + accu = accu >> GMP_LIMB_BITS; + } + /* accu must be zero, since that was how s was determined. */ + if (accu != 0) + abort (); + } + b_ptr = tmp_roomptr; + } + /* Copy a, shifting it left by s bits, yields r. + Memory layout: + At the beginning: r = roomptr[0..a_len], + at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ + r_ptr = roomptr; + if (s == 0) + { + memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); + r_ptr[a_len] = 0; + } + else + { + const mp_limb_t *sourceptr = a_ptr; + mp_limb_t *destptr = r_ptr; + mp_twolimb_t accu = 0; + size_t count; + for (count = a_len; count > 0; count--) + { + accu += (mp_twolimb_t) *sourceptr++ << s; + *destptr++ = (mp_limb_t) accu; + accu = accu >> GMP_LIMB_BITS; + } + *destptr++ = (mp_limb_t) accu; + } + q_ptr = roomptr + b_len; + q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ + { + size_t j = a_len - b_len; /* m-n */ + mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ + mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ + mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ + ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; + /* Division loop, traversed m-n+1 times. + j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ + for (;;) + { + mp_limb_t q_star; + mp_limb_t c1; + if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ + { + /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ + mp_twolimb_t num = + ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) + | r_ptr[j + b_len - 1]; + q_star = num / b_msd; + c1 = num % b_msd; + } + else + { + /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ + q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ + /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta + <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta + <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) + {<= beta !}. + If yes, jump directly to the subtraction loop. + (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta + <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ + if (r_ptr[j + b_len] > b_msd + || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) + /* r[j+n] >= b[n-1]+1 or + r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a + carry. */ + goto subtract; + } + /* q_star = q*, + c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, decrease it by + b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 + this can happen only twice. */ + if (c3 > c2) + { + q_star = q_star - 1; /* q* := q* - 1 */ + if (c3 - c2 > b_msdd) + q_star = q_star - 1; /* q* := q* - 1 */ + } + } + if (q_star > 0) + subtract: + { + /* Subtract r := r - b * q* * beta^j. */ + mp_limb_t cr; + { + const mp_limb_t *sourceptr = b_ptr; + mp_limb_t *destptr = r_ptr + j; + mp_twolimb_t carry = 0; + size_t count; + for (count = b_len; count > 0; count--) + { + /* Here 0 <= carry <= q*. */ + carry = + carry + + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ + + (mp_limb_t) ~(*destptr); + /* Here 0 <= carry <= beta*q* + beta-1. */ + *destptr++ = ~(mp_limb_t) carry; + carry = carry >> GMP_LIMB_BITS; /* <= q* */ + } + cr = (mp_limb_t) carry; + } + /* Subtract cr from r_ptr[j + b_len], then forget about + r_ptr[j + b_len]. */ + if (cr > r_ptr[j + b_len]) + { + /* Subtraction gave a carry. */ + q_star = q_star - 1; /* q* := q* - 1 */ + /* Add b back. */ + { + const mp_limb_t *sourceptr = b_ptr; + mp_limb_t *destptr = r_ptr + j; + mp_limb_t carry = 0; + size_t count; + for (count = b_len; count > 0; count--) + { + mp_limb_t source1 = *sourceptr++; + mp_limb_t source2 = *destptr; + *destptr++ = source1 + source2 + carry; + carry = + (carry + ? source1 >= (mp_limb_t) ~source2 + : source1 > (mp_limb_t) ~source2); + } + } + /* Forget about the carry and about r[j+n]. */ + } + } + /* q* is determined. Store it as q[j]. */ + q_ptr[j] = q_star; + if (j == 0) + break; + j--; + } + } + r_len = b_len; + /* Normalise q. */ + if (q_ptr[q_len - 1] == 0) + q_len--; +# if 0 /* Not needed here, since we need r only to compare it with b/2, and + b is shifted left by s bits. */ + /* Shift r right by s bits. */ + if (s > 0) + { + mp_limb_t ptr = r_ptr + r_len; + mp_twolimb_t accu = 0; + size_t count; + for (count = r_len; count > 0; count--) + { + accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; + accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); + *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); + } + } +# endif + /* Normalise r. */ + while (r_len > 0 && r_ptr[r_len - 1] == 0) + r_len--; + } + /* Compare r << 1 with b. */ + if (r_len > b_len) + goto increment_q; + { + size_t i; + for (i = b_len;;) + { + mp_limb_t r_i = + (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) + | (i < r_len ? r_ptr[i] << 1 : 0); + mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); + if (r_i > b_i) + goto increment_q; + if (r_i < b_i) + goto keep_q; + if (i == 0) + break; + i--; + } + } + if (q_len > 0 && ((q_ptr[0] & 1) != 0)) + /* q is odd. */ + increment_q: + { + size_t i; + for (i = 0; i < q_len; i++) + if (++(q_ptr[i]) != 0) + goto keep_q; + q_ptr[q_len++] = 1; + } + keep_q: + if (tmp_roomptr != NULL) + free (tmp_roomptr); + q->limbs = q_ptr; + q->nlimbs = q_len; + return roomptr; +} + +/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal + representation. + Destroys the contents of a. + Return the allocated memory - containing the decimal digits in low-to-high + order, terminated with a NUL character - in case of success, NULL in case + of memory allocation failure. */ +static char * +convert_to_decimal (mpn_t a, size_t extra_zeroes) +{ + mp_limb_t *a_ptr = a.limbs; + size_t a_len = a.nlimbs; + /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ + size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); + char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); + if (c_ptr != NULL) + { + char *d_ptr = c_ptr; + for (; extra_zeroes > 0; extra_zeroes--) + *d_ptr++ = '0'; + while (a_len > 0) + { + /* Divide a by 10^9, in-place. */ + mp_limb_t remainder = 0; + mp_limb_t *ptr = a_ptr + a_len; + size_t count; + for (count = a_len; count > 0; count--) + { + mp_twolimb_t num = + ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; + *ptr = num / 1000000000; + remainder = num % 1000000000; + } + /* Store the remainder as 9 decimal digits. */ + for (count = 9; count > 0; count--) + { + *d_ptr++ = '0' + (remainder % 10); + remainder = remainder / 10; + } + /* Normalize a. */ + if (a_ptr[a_len - 1] == 0) + a_len--; + } + /* Remove leading zeroes. */ + while (d_ptr > c_ptr && d_ptr[-1] == '0') + d_ptr--; + /* But keep at least one zero. */ + if (d_ptr == c_ptr) + *d_ptr++ = '0'; + /* Terminate the string. */ + *d_ptr = '\0'; + } + return c_ptr; +} + +/* Assuming x is finite and >= 0: + write x as x = 2^e * m, where m is a bignum. + Return the allocated memory in case of success, NULL in case of memory + allocation failure. */ +static void * +decode_long_double (long double x, int *ep, mpn_t *mp) +{ + mpn_t m; + int exp; + long double y; + size_t i; + + /* Allocate memory for result. */ + m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; + m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); + if (m.limbs == NULL) + return NULL; + /* Split into exponential part and mantissa. */ + y = frexpl (x, &exp); + if (!(y >= 0.0L && y < 1.0L)) + abort (); + /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the + latter is an integer. */ + /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs. + I'm not sure whether it's safe to cast a 'long double' value between + 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only + 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', + doesn't matter). */ +# if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 +# if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 + { + mp_limb_t hi, lo; + y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); + hi = (int) y; + y -= hi; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); + lo = (int) y; + y -= lo; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; + } +# else + { + mp_limb_t d; + y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); + d = (int) y; + y -= d; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; + } +# endif # endif + for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) + { + mp_limb_t hi, lo; + y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); + hi = (int) y; + y -= hi; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); + lo = (int) y; + y -= lo; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; + } + if (!(y == 0.0L)) + abort (); + /* Normalise. */ + while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) + m.nlimbs--; + *mp = m; + *ep = exp - LDBL_MANT_BIT; + return m.limbs; +} + +/* Assuming x is finite and >= 0, and n is an integer: + Returns the decimal representation of round (x * 10^n). + Return the allocated memory - containing the decimal digits in low-to-high + order, terminated with a NUL character - in case of success, NULL in case + of memory allocation failure. */ +static char * +scale10_round_decimal_long_double (long double x, int n) +{ + int e; + mpn_t m; + void *memory = decode_long_double (x, &e, &m); + int s; + size_t extra_zeroes; + unsigned int abs_n; + unsigned int abs_s; + mp_limb_t *pow5_ptr; + size_t pow5_len; + unsigned int s_limbs; + unsigned int s_bits; + mpn_t pow5; + mpn_t z; + void *z_memory; + char *digits; + + if (memory == NULL) + return NULL; + /* x = 2^e * m, hence + y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) + = round (2^s * 5^n * m). */ + s = e + n; + extra_zeroes = 0; + /* Factor out a common power of 10 if possible. */ + if (s > 0 && n > 0) + { + extra_zeroes = (s < n ? s : n); + s -= extra_zeroes; + n -= extra_zeroes; + } + /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. + Before converting to decimal, we need to compute + z = round (2^s * 5^n * m). */ + /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same + sign. 2.322 is slightly larger than log(5)/log(2). */ + abs_n = (n >= 0 ? n : -n); + abs_s = (s >= 0 ? s : -s); + pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 + + abs_s / GMP_LIMB_BITS + 1) + * sizeof (mp_limb_t)); + if (pow5_ptr == NULL) + { + free (memory); + return NULL; + } + /* Initialize with 1. */ + pow5_ptr[0] = 1; + pow5_len = 1; + /* Multiply with 5^|n|. */ + if (abs_n > 0) + { + static mp_limb_t const small_pow5[13 + 1] = + { + 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, + 48828125, 244140625, 1220703125 + }; + unsigned int n13; + for (n13 = 0; n13 <= abs_n; n13 += 13) + { + mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; + size_t j; + mp_twolimb_t carry = 0; + for (j = 0; j < pow5_len; j++) + { + mp_limb_t digit2 = pow5_ptr[j]; + carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; + pow5_ptr[j] = (mp_limb_t) carry; + carry = carry >> GMP_LIMB_BITS; + } + if (carry > 0) + pow5_ptr[pow5_len++] = (mp_limb_t) carry; + } + } + s_limbs = abs_s / GMP_LIMB_BITS; + s_bits = abs_s % GMP_LIMB_BITS; + if (n >= 0 ? s >= 0 : s <= 0) + { + /* Multiply with 2^|s|. */ + if (s_bits > 0) + { + mp_limb_t *ptr = pow5_ptr; + mp_twolimb_t accu = 0; + size_t count; + for (count = pow5_len; count > 0; count--) + { + accu += (mp_twolimb_t) *ptr << s_bits; + *ptr++ = (mp_limb_t) accu; + accu = accu >> GMP_LIMB_BITS; + } + if (accu > 0) + { + *ptr = (mp_limb_t) accu; + pow5_len++; + } + } + if (s_limbs > 0) + { + size_t count; + for (count = pow5_len; count > 0;) + { + count--; + pow5_ptr[s_limbs + count] = pow5_ptr[count]; + } + for (count = s_limbs; count > 0;) + { + count--; + pow5_ptr[count] = 0; + } + pow5_len += s_limbs; + } + pow5.limbs = pow5_ptr; + pow5.nlimbs = pow5_len; + if (n >= 0) + { + /* Multiply m with pow5. No division needed. */ + z_memory = multiply (m, pow5, &z); + } + else + { + /* Divide m by pow5 and round. */ + z_memory = divide (m, pow5, &z); + } + } + else + { + pow5.limbs = pow5_ptr; + pow5.nlimbs = pow5_len; + if (n >= 0) + { + /* n >= 0, s < 0. + Multiply m with pow5, then divide by 2^|s|. */ + mpn_t numerator; + mpn_t denominator; + void *tmp_memory; + tmp_memory = multiply (m, pow5, &numerator); + if (tmp_memory == NULL) + { + free (pow5_ptr); + free (memory); + return NULL; + } + /* Construct 2^|s|. */ + { + mp_limb_t *ptr = pow5_ptr + pow5_len; + size_t i; + for (i = 0; i < s_limbs; i++) + ptr[i] = 0; + ptr[s_limbs] = (mp_limb_t) 1 << s_bits; + denominator.limbs = ptr; + denominator.nlimbs = s_limbs + 1; + } + z_memory = divide (numerator, denominator, &z); + free (tmp_memory); + } + else + { + /* n < 0, s > 0. + Multiply m with 2^s, then divide by pow5. */ + mpn_t numerator; + mp_limb_t *num_ptr; + num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) + * sizeof (mp_limb_t)); + if (num_ptr == NULL) + { + free (pow5_ptr); + free (memory); + return NULL; + } + { + mp_limb_t *destptr = num_ptr; + { + size_t i; + for (i = 0; i < s_limbs; i++) + *destptr++ = 0; + } + if (s_bits > 0) + { + const mp_limb_t *sourceptr = m.limbs; + mp_twolimb_t accu = 0; + size_t count; + for (count = m.nlimbs; count > 0; count--) + { + accu += (mp_twolimb_t) *sourceptr++ << s; + *destptr++ = (mp_limb_t) accu; + accu = accu >> GMP_LIMB_BITS; + } + if (accu > 0) + *destptr++ = (mp_limb_t) accu; + } + else + { + const mp_limb_t *sourceptr = m.limbs; + size_t count; + for (count = m.nlimbs; count > 0; count--) + *destptr++ = *sourceptr++; + } + numerator.limbs = num_ptr; + numerator.nlimbs = destptr - num_ptr; + } + z_memory = divide (numerator, pow5, &z); + free (num_ptr); + } + } + free (pow5_ptr); + free (memory); + + /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ + + if (z_memory == NULL) + return NULL; + digits = convert_to_decimal (z, extra_zeroes); + free (z_memory); + return digits; +} + +/* Assuming x is finite and > 0: + Return an approximation for n with 10^n <= x < 10^(n+1). + The approximation is usually the right n, but may be off by 1 sometimes. */ +static int +floorlog10l (long double x) +{ + int exp; + long double y; + double z; + double l; + + /* Split into exponential part and mantissa. */ + y = frexpl (x, &exp); + if (!(y >= 0.0L && y < 1.0L)) + abort (); + if (y == 0.0L) + return INT_MIN; + if (y < 0.5L) + { + while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) + { + y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); + exp -= GMP_LIMB_BITS; + } + if (y < (1.0L / (1 << 16))) + { + y *= 1.0L * (1 << 16); + exp -= 16; + } + if (y < (1.0L / (1 << 8))) + { + y *= 1.0L * (1 << 8); + exp -= 8; + } + if (y < (1.0L / (1 << 4))) + { + y *= 1.0L * (1 << 4); + exp -= 4; + } + if (y < (1.0L / (1 << 2))) + { + y *= 1.0L * (1 << 2); + exp -= 2; + } + if (y < (1.0L / (1 << 1))) + { + y *= 1.0L * (1 << 1); + exp -= 1; + } + } + if (!(y >= 0.5L && y < 1.0L)) + abort (); + /* Compute an approximation for l = log2(x) = exp + log2(y). */ + l = exp; + z = y; + if (z < 0.70710678118654752444) + { + z *= 1.4142135623730950488; + l -= 0.5; + } + if (z < 0.8408964152537145431) + { + z *= 1.1892071150027210667; + l -= 0.25; + } + if (z < 0.91700404320467123175) + { + z *= 1.0905077326652576592; + l -= 0.125; + } + if (z < 0.9576032806985736469) + { + z *= 1.0442737824274138403; + l -= 0.0625; + } + /* Now 0.95 <= z <= 1.01. */ + z = 1 - z; + /* log(1-z) = - z - z^2/2 - z^3/3 - z^4/4 - ... + Four terms are enough to get an approximation with error < 10^-7. */ + l -= z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); + /* Finally multiply with log(2)/log(10), yields an approximation for + log10(x). */ + l *= 0.30102999566398119523; + /* Round down to the next integer. */ + return (int) l + (l < 0 ? -1 : 0); +} + #endif -CHAR_T * -VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args) +DCHAR_T * +VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + const FCHAR_T *format, va_list args) { DIRECTIVES d; arguments a; @@ -120,7 +1206,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar if (a.arg) \ free (a.arg); - if (printf_fetchargs (args, &a) < 0) + if (PRINTF_FETCHARGS (args, &a) < 0) { CLEANUP (); errno = EINVAL; @@ -129,13 +1215,13 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar { size_t buf_neededlength; - CHAR_T *buf; - CHAR_T *buf_malloced; - const CHAR_T *cp; + TCHAR_T *buf; + TCHAR_T *buf_malloced; + const FCHAR_T *cp; size_t i; DIRECTIVE *dp; /* Output string accumulator. */ - CHAR_T *result; + DCHAR_T *result; size_t allocated; size_t length; @@ -144,158 +1230,1812 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar buf_neededlength = xsum4 (7, d.max_width_length, d.max_precision_length, 6); #if HAVE_ALLOCA - if (buf_neededlength < 4000 / sizeof (CHAR_T)) + if (buf_neededlength < 4000 / sizeof (TCHAR_T)) { - buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T)); + buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); buf_malloced = NULL; } else #endif { - size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T)); + size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); if (size_overflow_p (buf_memsize)) goto out_of_memory_1; - buf = (CHAR_T *) malloc (buf_memsize); + buf = (TCHAR_T *) malloc (buf_memsize); if (buf == NULL) goto out_of_memory_1; buf_malloced = buf; } - if (resultbuf != NULL) - { - result = resultbuf; - allocated = *lengthp; - } - else - { - result = NULL; - allocated = 0; - } - length = 0; - /* Invariants: - result is either == resultbuf or == NULL or malloc-allocated. - If length > 0, then result != NULL. */ + if (resultbuf != NULL) + { + result = resultbuf; + allocated = *lengthp; + } + else + { + result = NULL; + allocated = 0; + } + length = 0; + /* Invariants: + result is either == resultbuf or == NULL or malloc-allocated. + If length > 0, then result != NULL. */ + + /* Ensures that allocated >= needed. Aborts through a jump to + out_of_memory if needed is SIZE_MAX or otherwise too big. */ +#define ENSURE_ALLOCATION(needed) \ + if ((needed) > allocated) \ + { \ + size_t memory_size; \ + DCHAR_T *memory; \ + \ + allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ + if ((needed) > allocated) \ + allocated = (needed); \ + memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ + if (size_overflow_p (memory_size)) \ + goto out_of_memory; \ + if (result == resultbuf || result == NULL) \ + memory = (DCHAR_T *) malloc (memory_size); \ + else \ + memory = (DCHAR_T *) realloc (result, memory_size); \ + if (memory == NULL) \ + goto out_of_memory; \ + if (result == resultbuf && length > 0) \ + DCHAR_CPY (memory, result, length); \ + result = memory; \ + } + + for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) + { + if (cp != dp->dir_start) + { + size_t n = dp->dir_start - cp; + size_t augmented_length = xsum (length, n); + + ENSURE_ALLOCATION (augmented_length); + /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we + need that the format string contains only ASCII characters + if FCHAR_T and DCHAR_T are not the same type. */ + if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) + { + DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); + length = augmented_length; + } + else + { + do + result[length++] = (unsigned char) *cp++; + while (--n > 0); + } + } + if (i == d.count) + break; + + /* Execute a single directive. */ + if (dp->conversion == '%') + { + size_t augmented_length; + + if (!(dp->arg_index == ARG_NONE)) + abort (); + augmented_length = xsum (length, 1); + ENSURE_ALLOCATION (augmented_length); + result[length] = '%'; + length = augmented_length; + } + else + { + if (!(dp->arg_index != ARG_NONE)) + abort (); + + if (dp->conversion == 'n') + { + switch (a.arg[dp->arg_index].type) + { + case TYPE_COUNT_SCHAR_POINTER: + *a.arg[dp->arg_index].a.a_count_schar_pointer = length; + break; + case TYPE_COUNT_SHORT_POINTER: + *a.arg[dp->arg_index].a.a_count_short_pointer = length; + break; + case TYPE_COUNT_INT_POINTER: + *a.arg[dp->arg_index].a.a_count_int_pointer = length; + break; + case TYPE_COUNT_LONGINT_POINTER: + *a.arg[dp->arg_index].a.a_count_longint_pointer = length; + break; +#if HAVE_LONG_LONG_INT + case TYPE_COUNT_LONGLONGINT_POINTER: + *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; + break; +#endif + default: + abort (); + } + } +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ + else if (dp->conversion == 'U') + { + arg_type type = a.arg[dp->arg_index].type; + int flags = dp->flags; + int has_width; + size_t width; + int has_precision; + size_t precision; + + has_width = 0; + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + if (arg < 0) + { + /* "A negative field width is taken as a '-' flag + followed by a positive field width." */ + flags |= FLAG_LEFT; + width = (unsigned int) (-arg); + } + else + width = arg; + } + else + { + const FCHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + has_width = 1; + } + + has_precision = 0; + precision = 0; + if (dp->precision_start != dp->precision_end) + { + if (dp->precision_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->precision_arg_index].a.a_int; + /* "A negative precision is taken as if the precision + were omitted." */ + if (arg >= 0) + { + precision = arg; + has_precision = 1; + } + } + else + { + const FCHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + while (digitp != dp->precision_end) + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + has_precision = 1; + } + } + + switch (type) + { + case TYPE_U8_STRING: + { + const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; + const uint8_t *arg_end; + size_t characters; + + if (has_precision) + { + /* Use only PRECISION characters, from the left. */ + arg_end = arg; + characters = 0; + for (; precision > 0; precision--) + { + int count = u8_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else if (has_width) + { + /* Use the entire string, and count the number of + characters. */ + arg_end = arg; + characters = 0; + for (;;) + { + int count = u8_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else + { + /* Use the entire string. */ + arg_end = arg + u8_strlen (arg); + /* The number of characters doesn't matter. */ + characters = 0; + } + + if (has_width && width > characters + && !(dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + +# if DCHAR_IS_UINT8_T + { + size_t n = arg_end - arg; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_CPY (result + length, arg, n); + length += n; + } +# else + { /* Convert. */ + DCHAR_T *converted = result + length; + size_t converted_len = allocated - length; +# if DCHAR_IS_TCHAR + /* Convert from UTF-8 to locale encoding. */ + if (u8_conv_to_encoding (locale_charset (), + iconveh_question_mark, + arg, arg_end - arg, NULL, + &converted, &converted_len) + < 0) +# else + /* Convert from UTF-8 to UTF-16/UTF-32. */ + converted = + U8_TO_DCHAR (arg, arg_end - arg, + converted, &converted_len); + if (converted == NULL) +# endif + { + int saved_errno = errno; + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = saved_errno; + return NULL; + } + if (converted != result + length) + { + ENSURE_ALLOCATION (xsum (length, converted_len)); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } + length += converted_len; + } +# endif + + if (has_width && width > characters + && (dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + } + break; + + case TYPE_U16_STRING: + { + const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; + const uint16_t *arg_end; + size_t characters; + + if (has_precision) + { + /* Use only PRECISION characters, from the left. */ + arg_end = arg; + characters = 0; + for (; precision > 0; precision--) + { + int count = u16_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else if (has_width) + { + /* Use the entire string, and count the number of + characters. */ + arg_end = arg; + characters = 0; + for (;;) + { + int count = u16_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else + { + /* Use the entire string. */ + arg_end = arg + u16_strlen (arg); + /* The number of characters doesn't matter. */ + characters = 0; + } + + if (has_width && width > characters + && !(dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + +# if DCHAR_IS_UINT16_T + { + size_t n = arg_end - arg; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_CPY (result + length, arg, n); + length += n; + } +# else + { /* Convert. */ + DCHAR_T *converted = result + length; + size_t converted_len = allocated - length; +# if DCHAR_IS_TCHAR + /* Convert from UTF-16 to locale encoding. */ + if (u16_conv_to_encoding (locale_charset (), + iconveh_question_mark, + arg, arg_end - arg, NULL, + &converted, &converted_len) + < 0) +# else + /* Convert from UTF-16 to UTF-8/UTF-32. */ + converted = + U16_TO_DCHAR (arg, arg_end - arg, + converted, &converted_len); + if (converted == NULL) +# endif + { + int saved_errno = errno; + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = saved_errno; + return NULL; + } + if (converted != result + length) + { + ENSURE_ALLOCATION (xsum (length, converted_len)); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } + length += converted_len; + } +# endif + + if (has_width && width > characters + && (dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + } + break; + + case TYPE_U32_STRING: + { + const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; + const uint32_t *arg_end; + size_t characters; + + if (has_precision) + { + /* Use only PRECISION characters, from the left. */ + arg_end = arg; + characters = 0; + for (; precision > 0; precision--) + { + int count = u32_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else if (has_width) + { + /* Use the entire string, and count the number of + characters. */ + arg_end = arg; + characters = 0; + for (;;) + { + int count = u32_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else + { + /* Use the entire string. */ + arg_end = arg + u32_strlen (arg); + /* The number of characters doesn't matter. */ + characters = 0; + } + + if (has_width && width > characters + && !(dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + +# if DCHAR_IS_UINT32_T + { + size_t n = arg_end - arg; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_CPY (result + length, arg, n); + length += n; + } +# else + { /* Convert. */ + DCHAR_T *converted = result + length; + size_t converted_len = allocated - length; +# if DCHAR_IS_TCHAR + /* Convert from UTF-32 to locale encoding. */ + if (u32_conv_to_encoding (locale_charset (), + iconveh_question_mark, + arg, arg_end - arg, NULL, + &converted, &converted_len) + < 0) +# else + /* Convert from UTF-32 to UTF-8/UTF-16. */ + converted = + U32_TO_DCHAR (arg, arg_end - arg, + converted, &converted_len); + if (converted == NULL) +# endif + { + int saved_errno = errno; + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = saved_errno; + return NULL; + } + if (converted != result + length) + { + ENSURE_ALLOCATION (xsum (length, converted_len)); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } + length += converted_len; + } +# endif + + if (has_width && width > characters + && (dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + } + break; + + default: + abort (); + } + } +#endif +#if NEED_PRINTF_DIRECTIVE_A && !defined IN_LIBINTL + else if (dp->conversion == 'a' || dp->conversion == 'A') + { + arg_type type = a.arg[dp->arg_index].type; + int flags = dp->flags; + int has_width; + size_t width; + int has_precision; + size_t precision; + size_t tmp_length; + DCHAR_T tmpbuf[700]; + DCHAR_T *tmp; + DCHAR_T *pad_ptr; + DCHAR_T *p; + + has_width = 0; + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + if (arg < 0) + { + /* "A negative field width is taken as a '-' flag + followed by a positive field width." */ + flags |= FLAG_LEFT; + width = (unsigned int) (-arg); + } + else + width = arg; + } + else + { + const FCHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + has_width = 1; + } + + has_precision = 0; + precision = 0; + if (dp->precision_start != dp->precision_end) + { + if (dp->precision_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->precision_arg_index].a.a_int; + /* "A negative precision is taken as if the precision + were omitted." */ + if (arg >= 0) + { + precision = arg; + has_precision = 1; + } + } + else + { + const FCHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + while (digitp != dp->precision_end) + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + has_precision = 1; + } + } + + /* Allocate a temporary buffer of sufficient size. */ + if (type == TYPE_LONGDOUBLE) + tmp_length = + (unsigned int) ((LDBL_DIG + 1) + * 0.831 /* decimal -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) ((DBL_DIG + 1) + * 0.831 /* decimal -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Account for sign, decimal point etc. */ + tmp_length = xsum (tmp_length, 12); + + if (tmp_length < width) + tmp_length = width; + + tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ + + if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) + tmp = tmpbuf; + else + { + size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); + + if (size_overflow_p (tmp_memsize)) + /* Overflow, would lead to out of memory. */ + goto out_of_memory; + tmp = (DCHAR_T *) malloc (tmp_memsize); + if (tmp == NULL) + /* Out of memory. */ + goto out_of_memory; + } + + pad_ptr = NULL; + p = tmp; + if (type == TYPE_LONGDOUBLE) + { + long double arg = a.arg[dp->arg_index].a.a_longdouble; + + if (isnanl (arg)) + { + if (dp->conversion == 'A') + { + *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; + } + else + { + *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; + } + } + else + { + int sign = 0; + DECL_LONG_DOUBLE_ROUNDING + + BEGIN_LONG_DOUBLE_ROUNDING (); + + if (signbit (arg)) /* arg < 0.0L or negative zero */ + { + sign = -1; + arg = -arg; + } + + if (sign < 0) + *p++ = '-'; + else if (flags & FLAG_SHOWSIGN) + *p++ = '+'; + else if (flags & FLAG_SPACE) + *p++ = ' '; + + if (arg > 0.0L && arg + arg == arg) + { + if (dp->conversion == 'A') + { + *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; + } + else + { + *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; + } + } + else + { + int exponent; + long double mantissa; + + if (arg > 0.0L) + mantissa = printf_frexpl (arg, &exponent); + else + { + exponent = 0; + mantissa = 0.0L; + } + + if (has_precision + && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) + { + /* Round the mantissa. */ + long double tail = mantissa; + size_t q; + + for (q = precision; ; q--) + { + int digit = (int) tail; + tail -= digit; + if (q == 0) + { + if (digit & 1 ? tail >= 0.5L : tail > 0.5L) + tail = 1 - tail; + else + tail = - tail; + break; + } + tail *= 16.0L; + } + if (tail != 0.0L) + for (q = precision; q > 0; q--) + tail *= 0.0625L; + mantissa += tail; + } + + *p++ = '0'; + *p++ = dp->conversion - 'A' + 'X'; + pad_ptr = p; + { + int digit; + + digit = (int) mantissa; + mantissa -= digit; + *p++ = '0' + digit; + if ((flags & FLAG_ALT) + || mantissa > 0.0L || precision > 0) + { + *p++ = decimal_point_char (); + /* This loop terminates because we assume + that FLT_RADIX is a power of 2. */ + while (mantissa > 0.0L) + { + mantissa *= 16.0L; + digit = (int) mantissa; + mantissa -= digit; + *p++ = digit + + (digit < 10 + ? '0' + : dp->conversion - 10); + if (precision > 0) + precision--; + } + while (precision > 0) + { + *p++ = '0'; + precision--; + } + } + } + *p++ = dp->conversion - 'A' + 'P'; +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + { '%', '+', 'd', '\0' }; + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, "%+d", exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, "%+d", exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } +# endif + } + + END_LONG_DOUBLE_ROUNDING (); + } + } + else + { + double arg = a.arg[dp->arg_index].a.a_double; + + if (isnan (arg)) + { + if (dp->conversion == 'A') + { + *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; + } + else + { + *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; + } + } + else + { + int sign = 0; + + if (signbit (arg)) /* arg < 0.0 or negative zero */ + { + sign = -1; + arg = -arg; + } + + if (sign < 0) + *p++ = '-'; + else if (flags & FLAG_SHOWSIGN) + *p++ = '+'; + else if (flags & FLAG_SPACE) + *p++ = ' '; + + if (arg > 0.0 && arg + arg == arg) + { + if (dp->conversion == 'A') + { + *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; + } + else + { + *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; + } + } + else + { + int exponent; + double mantissa; + + if (arg > 0.0) + mantissa = printf_frexp (arg, &exponent); + else + { + exponent = 0; + mantissa = 0.0; + } + + if (has_precision + && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) + { + /* Round the mantissa. */ + double tail = mantissa; + size_t q; + + for (q = precision; ; q--) + { + int digit = (int) tail; + tail -= digit; + if (q == 0) + { + if (digit & 1 ? tail >= 0.5 : tail > 0.5) + tail = 1 - tail; + else + tail = - tail; + break; + } + tail *= 16.0; + } + if (tail != 0.0) + for (q = precision; q > 0; q--) + tail *= 0.0625; + mantissa += tail; + } + + *p++ = '0'; + *p++ = dp->conversion - 'A' + 'X'; + pad_ptr = p; + { + int digit; + + digit = (int) mantissa; + mantissa -= digit; + *p++ = '0' + digit; + if ((flags & FLAG_ALT) + || mantissa > 0.0 || precision > 0) + { + *p++ = decimal_point_char (); + /* This loop terminates because we assume + that FLT_RADIX is a power of 2. */ + while (mantissa > 0.0) + { + mantissa *= 16.0; + digit = (int) mantissa; + mantissa -= digit; + *p++ = digit + + (digit < 10 + ? '0' + : dp->conversion - 10); + if (precision > 0) + precision--; + } + while (precision > 0) + { + *p++ = '0'; + precision--; + } + } + } + *p++ = dp->conversion - 'A' + 'P'; +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + { '%', '+', 'd', '\0' }; + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, "%+d", exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, "%+d", exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } +# endif + } + } + } + /* The generated string now extends from tmp to p, with the + zero padding insertion point being at pad_ptr. */ + if (has_width && p - tmp < width) + { + size_t pad = width - (p - tmp); + DCHAR_T *end = p + pad; + + if (flags & FLAG_LEFT) + { + /* Pad with spaces on the right. */ + for (; pad > 0; pad--) + *p++ = ' '; + } + else if ((flags & FLAG_ZERO) && pad_ptr != NULL) + { + /* Pad with zeroes. */ + DCHAR_T *q = end; + + while (p > pad_ptr) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = '0'; + } + else + { + /* Pad with spaces on the left. */ + DCHAR_T *q = end; + + while (p > tmp) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = ' '; + } + + p = end; + } + + { + size_t count = p - tmp; + + if (count >= tmp_length) + /* tmp_length was incorrectly calculated - fix the + code above! */ + abort (); + + /* Make room for the result. */ + if (count >= allocated - length) + { + size_t n = xsum (length, count); + + ENSURE_ALLOCATION (n); + } + + /* Append the result. */ + memcpy (result + length, tmp, count * sizeof (DCHAR_T)); + if (tmp != tmpbuf) + free (tmp); + length += count; + } + } +#endif +#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL + else if ((dp->conversion == 'f' || dp->conversion == 'F' + || dp->conversion == 'e' || dp->conversion == 'E' + || dp->conversion == 'g' || dp->conversion == 'G' + || dp->conversion == 'a' || dp->conversion == 'A') + && (0 +# if NEED_PRINTF_INFINITE_DOUBLE + || (a.arg[dp->arg_index].type == TYPE_DOUBLE + /* The systems (mingw) which produce wrong output + for Inf, -Inf, and NaN also do so for -0.0. + Therefore we treat this case here as well. */ + && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) +# endif +# if NEED_PRINTF_LONG_DOUBLE + || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE +# elif NEED_PRINTF_INFINITE_LONG_DOUBLE + || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE + /* Some systems produce wrong output for Inf, + -Inf, and NaN. */ + && is_infinitel (a.arg[dp->arg_index].a.a_longdouble)) +# endif + )) + { +# if NEED_PRINTF_INFINITE_DOUBLE && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) + arg_type type = a.arg[dp->arg_index].type; +# endif + int flags = dp->flags; + int has_width; + size_t width; + int has_precision; + size_t precision; + size_t tmp_length; + DCHAR_T tmpbuf[700]; + DCHAR_T *tmp; + DCHAR_T *pad_ptr; + DCHAR_T *p; + + has_width = 0; + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + if (arg < 0) + { + /* "A negative field width is taken as a '-' flag + followed by a positive field width." */ + flags |= FLAG_LEFT; + width = (unsigned int) (-arg); + } + else + width = arg; + } + else + { + const FCHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + has_width = 1; + } + + has_precision = 0; + precision = 0; + if (dp->precision_start != dp->precision_end) + { + if (dp->precision_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->precision_arg_index].a.a_int; + /* "A negative precision is taken as if the precision + were omitted." */ + if (arg >= 0) + { + precision = arg; + has_precision = 1; + } + } + else + { + const FCHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + while (digitp != dp->precision_end) + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + has_precision = 1; + } + } + + /* POSIX specifies the default precision to be 6 for %f, %F, + %e, %E, but not for %g, %G. Implementations appear to use + the same default precision also for %g, %G. */ + if (!has_precision) + precision = 6; + + /* Allocate a temporary buffer of sufficient size. */ +# if NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE + tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); +# elif NEED_PRINTF_LONG_DOUBLE + tmp_length = LDBL_DIG + 1; +# else + tmp_length = 0; +# endif + if (tmp_length < precision) + tmp_length = precision; +# if NEED_PRINTF_LONG_DOUBLE +# if NEED_PRINTF_INFINITE_DOUBLE + if (type == TYPE_LONGDOUBLE) +# endif + if (dp->conversion == 'f' || dp->conversion == 'F') + { + long double arg = a.arg[dp->arg_index].a.a_longdouble; + if (!(isnanl (arg) || arg + arg == arg)) + { + /* arg is finite and nonzero. */ + int exponent = floorlog10l (arg < 0 ? -arg : arg); + if (exponent >= 0 && tmp_length < exponent + precision) + tmp_length = exponent + precision; + } + } +# endif + /* Account for sign, decimal point etc. */ + tmp_length = xsum (tmp_length, 12); + + if (tmp_length < width) + tmp_length = width; + + tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ + + if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) + tmp = tmpbuf; + else + { + size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); + + if (size_overflow_p (tmp_memsize)) + /* Overflow, would lead to out of memory. */ + goto out_of_memory; + tmp = (DCHAR_T *) malloc (tmp_memsize); + if (tmp == NULL) + /* Out of memory. */ + goto out_of_memory; + } + + pad_ptr = NULL; + p = tmp; + +# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE +# if NEED_PRINTF_INFINITE_DOUBLE + if (type == TYPE_LONGDOUBLE) +# endif + { + long double arg = a.arg[dp->arg_index].a.a_longdouble; + + if (isnanl (arg)) + { + if (dp->conversion >= 'A' && dp->conversion <= 'Z') + { + *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; + } + else + { + *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; + } + } + else + { + int sign = 0; + DECL_LONG_DOUBLE_ROUNDING + + BEGIN_LONG_DOUBLE_ROUNDING (); + + if (signbit (arg)) /* arg < 0.0L or negative zero */ + { + sign = -1; + arg = -arg; + } + + if (sign < 0) + *p++ = '-'; + else if (flags & FLAG_SHOWSIGN) + *p++ = '+'; + else if (flags & FLAG_SPACE) + *p++ = ' '; + + if (arg > 0.0L && arg + arg == arg) + { + if (dp->conversion >= 'A' && dp->conversion <= 'Z') + { + *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; + } + else + { + *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; + } + } + else + { +# if NEED_PRINTF_LONG_DOUBLE + pad_ptr = p; + + if (dp->conversion == 'f' || dp->conversion == 'F') + { + char *digits; + size_t ndigits; + + digits = + scale10_round_decimal_long_double (arg, precision); + if (digits == NULL) + { + END_LONG_DOUBLE_ROUNDING (); + goto out_of_memory; + } + ndigits = strlen (digits); + + if (ndigits > precision) + do + { + --ndigits; + *p++ = digits[ndigits]; + } + while (ndigits > precision); + else + *p++ = '0'; + /* Here ndigits <= precision. */ + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > ndigits; precision--) + *p++ = '0'; + while (ndigits > 0) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + + free (digits); + } + else if (dp->conversion == 'e' || dp->conversion == 'E') + { + int exponent; + + if (arg == 0.0L) + { + exponent = 0; + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + } + else + { + /* arg > 0.0L. */ + int adjusted; + char *digits; + size_t ndigits; + + exponent = floorlog10l (arg); + adjusted = 0; + for (;;) + { + digits = + scale10_round_decimal_long_double (arg, + (int)precision - exponent); + if (digits == NULL) + { + END_LONG_DOUBLE_ROUNDING (); + goto out_of_memory; + } + ndigits = strlen (digits); + + if (ndigits == precision + 1) + break; + if (ndigits < precision + || ndigits > precision + 2) + /* The exponent was not guessed + precisely enough. */ + abort (); + if (adjusted) + /* None of two values of exponent is + the right one. Prevent an endless + loop. */ + abort (); + free (digits); + if (ndigits == precision) + exponent -= 1; + else + exponent += 1; + adjusted = 1; + } + + /* Here ndigits = precision+1. */ + *p++ = digits[--ndigits]; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + while (ndigits > 0) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + + free (digits); + } + + *p++ = dp->conversion; /* 'e' or 'E' */ +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + { '%', '+', '.', '2', 'd', '\0' }; + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, "%+.2d", exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, "%+.2d", exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } +# endif + } + else if (dp->conversion == 'g' || dp->conversion == 'G') + { + if (precision == 0) + precision = 1; + /* precision >= 1. */ + + if (arg == 0.0L) + /* The exponent is 0, >= -4, < precision. + Use fixed-point notation. */ + { + size_t ndigits = precision; + /* Number of trailing zeroes that have to be + dropped. */ + size_t nzeroes = + (flags & FLAG_ALT ? 0 : precision - 1); + + --ndigits; + *p++ = '0'; + if ((flags & FLAG_ALT) || ndigits > nzeroes) + { + *p++ = decimal_point_char (); + while (ndigits > nzeroes) + { + --ndigits; + *p++ = '0'; + } + } + } + else + { + /* arg > 0.0L. */ + int exponent; + int adjusted; + char *digits; + size_t ndigits; + size_t nzeroes; + + exponent = floorlog10l (arg); + adjusted = 0; + for (;;) + { + digits = + scale10_round_decimal_long_double (arg, + (int)(precision - 1) - exponent); + if (digits == NULL) + { + END_LONG_DOUBLE_ROUNDING (); + goto out_of_memory; + } + ndigits = strlen (digits); + + if (ndigits == precision) + break; + if (ndigits < precision - 1 + || ndigits > precision + 1) + /* The exponent was not guessed + precisely enough. */ + abort (); + if (adjusted) + /* None of two values of exponent is + the right one. Prevent an endless + loop. */ + abort (); + free (digits); + if (ndigits < precision) + exponent -= 1; + else + exponent += 1; + adjusted = 1; + } + /* Here ndigits = precision. */ + + /* Determine the number of trailing zeroes + that have to be dropped. */ + nzeroes = 0; + if ((flags & FLAG_ALT) == 0) + while (nzeroes < ndigits + && digits[nzeroes] == '0') + nzeroes++; + + /* The exponent is now determined. */ + if (exponent >= -4 + && exponent < (long)precision) + { + /* Fixed-point notation: + max(exponent,0)+1 digits, then the + decimal point, then the remaining + digits without trailing zeroes. */ + if (exponent >= 0) + { + size_t count = exponent + 1; + /* Note: count <= precision = ndigits. */ + for (; count > 0; count--) + *p++ = digits[--ndigits]; + if ((flags & FLAG_ALT) || ndigits > nzeroes) + { + *p++ = decimal_point_char (); + while (ndigits > nzeroes) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + } + else + { + size_t count = -exponent - 1; + *p++ = '0'; + *p++ = decimal_point_char (); + for (; count > 0; count--) + *p++ = '0'; + while (ndigits > nzeroes) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + } + else + { + /* Exponential notation. */ + *p++ = digits[--ndigits]; + if ((flags & FLAG_ALT) || ndigits > nzeroes) + { + *p++ = decimal_point_char (); + while (ndigits > nzeroes) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + { '%', '+', '.', '2', 'd', '\0' }; + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, "%+.2d", exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, "%+.2d", exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } +# endif + } + + free (digits); + } + } + else + abort (); +# else + /* arg is finite. */ + abort (); +# endif + } + + END_LONG_DOUBLE_ROUNDING (); + } + } +# if NEED_PRINTF_INFINITE_DOUBLE + else +# endif +# endif +# if NEED_PRINTF_INFINITE_DOUBLE + { + /* Simpler than above: handle only NaN, Infinity, zero. */ + double arg = a.arg[dp->arg_index].a.a_double; + + if (isnan (arg)) + { + if (dp->conversion >= 'A' && dp->conversion <= 'Z') + { + *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; + } + else + { + *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; + } + } + else + { + int sign = 0; + + if (signbit (arg)) /* arg < 0.0L or negative zero */ + { + sign = -1; + arg = -arg; + } + + if (sign < 0) + *p++ = '-'; + else if (flags & FLAG_SHOWSIGN) + *p++ = '+'; + else if (flags & FLAG_SPACE) + *p++ = ' '; + + if (arg > 0.0 && arg + arg == arg) + { + if (dp->conversion >= 'A' && dp->conversion <= 'Z') + { + *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; + } + else + { + *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; + } + } + else + { + if (!(arg == 0.0)) + abort (); + + pad_ptr = p; + + if (dp->conversion == 'f' || dp->conversion == 'F') + { + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + } + else if (dp->conversion == 'e' || dp->conversion == 'E') + { + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + *p++ = dp->conversion; /* 'e' or 'E' */ + *p++ = '+'; + /* Produce the same number of exponent digits as + the native printf implementation. */ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + *p++ = '0'; +# endif + *p++ = '0'; + *p++ = '0'; + } + else if (dp->conversion == 'g' || dp->conversion == 'G') + { + *p++ = '0'; + if (flags & FLAG_ALT) + { + size_t ndigits = + (precision > 0 ? precision - 1 : 0); + *p++ = decimal_point_char (); + for (; ndigits > 0; --ndigits) + *p++ = '0'; + } + } + else + abort (); + } + } + } +# endif + + /* The generated string now extends from tmp to p, with the + zero padding insertion point being at pad_ptr. */ + if (has_width && p - tmp < width) + { + size_t pad = width - (p - tmp); + DCHAR_T *end = p + pad; - /* Ensures that allocated >= needed. Aborts through a jump to - out_of_memory if needed is SIZE_MAX or otherwise too big. */ -#define ENSURE_ALLOCATION(needed) \ - if ((needed) > allocated) \ - { \ - size_t memory_size; \ - CHAR_T *memory; \ - \ - allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ - if ((needed) > allocated) \ - allocated = (needed); \ - memory_size = xtimes (allocated, sizeof (CHAR_T)); \ - if (size_overflow_p (memory_size)) \ - goto out_of_memory; \ - if (result == resultbuf || result == NULL) \ - memory = (CHAR_T *) malloc (memory_size); \ - else \ - memory = (CHAR_T *) realloc (result, memory_size); \ - if (memory == NULL) \ - goto out_of_memory; \ - if (result == resultbuf && length > 0) \ - memcpy (memory, result, length * sizeof (CHAR_T)); \ - result = memory; \ - } + if (flags & FLAG_LEFT) + { + /* Pad with spaces on the right. */ + for (; pad > 0; pad--) + *p++ = ' '; + } + else if ((flags & FLAG_ZERO) && pad_ptr != NULL) + { + /* Pad with zeroes. */ + DCHAR_T *q = end; - for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) - { - if (cp != dp->dir_start) - { - size_t n = dp->dir_start - cp; - size_t augmented_length = xsum (length, n); + while (p > pad_ptr) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = '0'; + } + else + { + /* Pad with spaces on the left. */ + DCHAR_T *q = end; - ENSURE_ALLOCATION (augmented_length); - memcpy (result + length, cp, n * sizeof (CHAR_T)); - length = augmented_length; - } - if (i == d.count) - break; + while (p > tmp) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = ' '; + } - /* Execute a single directive. */ - if (dp->conversion == '%') - { - size_t augmented_length; + p = end; + } - if (!(dp->arg_index == ARG_NONE)) - abort (); - augmented_length = xsum (length, 1); - ENSURE_ALLOCATION (augmented_length); - result[length] = '%'; - length = augmented_length; - } - else - { - if (!(dp->arg_index != ARG_NONE)) - abort (); + { + size_t count = p - tmp; - if (dp->conversion == 'n') - { - switch (a.arg[dp->arg_index].type) - { - case TYPE_COUNT_SCHAR_POINTER: - *a.arg[dp->arg_index].a.a_count_schar_pointer = length; - break; - case TYPE_COUNT_SHORT_POINTER: - *a.arg[dp->arg_index].a.a_count_short_pointer = length; - break; - case TYPE_COUNT_INT_POINTER: - *a.arg[dp->arg_index].a.a_count_int_pointer = length; - break; - case TYPE_COUNT_LONGINT_POINTER: - *a.arg[dp->arg_index].a.a_count_longint_pointer = length; - break; -#if HAVE_LONG_LONG_INT - case TYPE_COUNT_LONGLONGINT_POINTER: - *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; - break; -#endif - default: + if (count >= tmp_length) + /* tmp_length was incorrectly calculated - fix the + code above! */ abort (); - } + + /* Make room for the result. */ + if (count >= allocated - length) + { + size_t n = xsum (length, count); + + ENSURE_ALLOCATION (n); + } + + /* Append the result. */ + memcpy (result + length, tmp, count * sizeof (DCHAR_T)); + if (tmp != tmpbuf) + free (tmp); + length += count; + } } +#endif else { arg_type type = a.arg[dp->arg_index].type; - CHAR_T *p; + int flags = dp->flags; +#if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO + int has_width; + size_t width; +#endif +#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO + int pad_ourselves; +#else +# define pad_ourselves 0 +#endif + TCHAR_T *fbp; unsigned int prefix_count; int prefixes[2]; #if !USE_SNPRINTF size_t tmp_length; - CHAR_T tmpbuf[700]; - CHAR_T *tmp; + TCHAR_T tmpbuf[700]; + TCHAR_T *tmp; +#endif + +#if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO + has_width = 0; + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + if (arg < 0) + { + /* "A negative field width is taken as a '-' flag + followed by a positive field width." */ + flags |= FLAG_LEFT; + width = (unsigned int) (-arg); + } + else + width = arg; + } + else + { + const FCHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + has_width = 1; + } +#endif +#if !USE_SNPRINTF /* Allocate a temporary buffer of sufficient size for calling sprintf. */ { - size_t width; size_t precision; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - width = (arg < 0 ? (unsigned int) (-arg) : arg); - } - else - { - const CHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - } - precision = 6; if (dp->precision_start != dp->precision_end) { @@ -310,7 +3050,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar } else { - const CHAR_T *digitp = dp->precision_start + 1; + const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) @@ -408,7 +3148,6 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar break; case 'f': case 'F': -# if HAVE_LONG_DOUBLE if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_MAX_EXP @@ -418,7 +3157,6 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ else -# endif tmp_length = (unsigned int) (DBL_MAX_EXP * 0.30103 /* binary -> decimal */ @@ -430,12 +3168,30 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar break; case 'e': case 'E': case 'g': case 'G': - case 'a': case 'A': tmp_length = 12; /* sign, decimal point, exponent etc. */ tmp_length = xsum (tmp_length, precision); break; + case 'a': case 'A': + if (type == TYPE_LONGDOUBLE) + tmp_length = + (unsigned int) (LDBL_DIG + * 0.831 /* decimal -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) (DBL_DIG + * 0.831 /* decimal -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Account for sign, decimal point etc. */ + tmp_length = xsum (tmp_length, 12); + break; + case 'c': # if HAVE_WINT_T && !WIDE_CHAR_VERSION if (type == TYPE_WIDE_CHAR) @@ -474,55 +3230,121 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar abort (); } +# if ENABLE_UNISTDIO + /* Padding considers the number of characters, therefore the + number of elements after padding may be + > max (tmp_length, width) + but is certainly + <= tmp_length + width. */ + tmp_length = xsum (tmp_length, width); +# else + /* Padding considers the number of elements, says POSIX. */ if (tmp_length < width) tmp_length = width; +# endif tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ } - if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T)) + if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) tmp = tmpbuf; else { - size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T)); + size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; - tmp = (CHAR_T *) malloc (tmp_memsize); + tmp = (TCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } #endif + /* Decide whether to perform the padding ourselves. */ +#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO + switch (dp->conversion) + { +# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO + /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need + to perform the padding after this conversion. Functions + with unistdio extensions perform the padding based on + character count rather than element count. */ + case 'c': case 's': +# endif +# if NEED_PRINTF_FLAG_ZERO + case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': + case 'a': case 'A': +# endif + pad_ourselves = 1; + break; + default: + pad_ourselves = 0; + break; + } +#endif + /* Construct the format string for calling snprintf or sprintf. */ - p = buf; - *p++ = '%'; - if (dp->flags & FLAG_GROUP) - *p++ = '\''; - if (dp->flags & FLAG_LEFT) - *p++ = '-'; - if (dp->flags & FLAG_SHOWSIGN) - *p++ = '+'; - if (dp->flags & FLAG_SPACE) - *p++ = ' '; - if (dp->flags & FLAG_ALT) - *p++ = '#'; - if (dp->flags & FLAG_ZERO) - *p++ = '0'; - if (dp->width_start != dp->width_end) + fbp = buf; + *fbp++ = '%'; +#if NEED_PRINTF_FLAG_GROUPING + /* The underlying implementation doesn't support the ' flag. + Produce no grouping characters in this case; this is + acceptable because the grouping is locale dependent. */ +#else + if (flags & FLAG_GROUP) + *fbp++ = '\''; +#endif + if (flags & FLAG_LEFT) + *fbp++ = '-'; + if (flags & FLAG_SHOWSIGN) + *fbp++ = '+'; + if (flags & FLAG_SPACE) + *fbp++ = ' '; + if (flags & FLAG_ALT) + *fbp++ = '#'; + if (!pad_ourselves) { - size_t n = dp->width_end - dp->width_start; - memcpy (p, dp->width_start, n * sizeof (CHAR_T)); - p += n; + if (flags & FLAG_ZERO) + *fbp++ = '0'; + if (dp->width_start != dp->width_end) + { + size_t n = dp->width_end - dp->width_start; + /* The width specification is known to consist only + of standard ASCII characters. */ + if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) + { + memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); + fbp += n; + } + else + { + const FCHAR_T *mp = dp->width_start; + do + *fbp++ = (unsigned char) *mp++; + while (--n > 0); + } + } } if (dp->precision_start != dp->precision_end) { size_t n = dp->precision_end - dp->precision_start; - memcpy (p, dp->precision_start, n * sizeof (CHAR_T)); - p += n; + /* The precision specification is known to consist only + of standard ASCII characters. */ + if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) + { + memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); + fbp += n; + } + else + { + const FCHAR_T *mp = dp->precision_start; + do + *fbp++ = (unsigned char) *mp++; + while (--n > 0); + } } switch (type) @@ -530,8 +3352,15 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: - *p++ = 'l'; +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + *fbp++ = 'I'; + *fbp++ = '6'; + *fbp++ = '4'; + break; +# else + *fbp++ = 'l'; /*FALLTHROUGH*/ +# endif #endif case TYPE_LONGINT: case TYPE_ULONGINT: @@ -541,28 +3370,31 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar #if HAVE_WCHAR_T case TYPE_WIDE_STRING: #endif - *p++ = 'l'; + *fbp++ = 'l'; break; -#if HAVE_LONG_DOUBLE case TYPE_LONGDOUBLE: - *p++ = 'L'; + *fbp++ = 'L'; break; -#endif default: break; } - *p = dp->conversion; +#if NEED_PRINTF_DIRECTIVE_F + if (dp->conversion == 'F') + *fbp = 'f'; + else +#endif + *fbp = dp->conversion; #if USE_SNPRINTF - p[1] = '%'; - p[2] = 'n'; - p[3] = '\0'; + fbp[1] = '%'; + fbp[2] = 'n'; + fbp[3] = '\0'; #else - p[1] = '\0'; + fbp[1] = '\0'; #endif /* Construct the arguments for calling snprintf or sprintf. */ prefix_count = 0; - if (dp->width_arg_index != ARG_NONE) + if (!pad_ourselves && dp->width_arg_index != ARG_NONE) { if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); @@ -576,36 +3408,46 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar } #if USE_SNPRINTF + /* The SNPRINTF result is appended after result[0..length]. + The latter is an array of DCHAR_T; SNPRINTF appends an + array of TCHAR_T to it. This is possible because + sizeof (TCHAR_T) divides sizeof (DCHAR_T) and + alignof (TCHAR_T) <= alignof (DCHAR_T). */ +# define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) /* Prepare checking whether snprintf returns the count via %n. */ ENSURE_ALLOCATION (xsum (length, 1)); - result[length] = '\0'; + *(TCHAR_T *) (result + length) = '\0'; #endif for (;;) { - size_t maxlen; - int count; - int retcount; - - maxlen = allocated - length; - count = -1; - retcount = 0; + int count = -1; #if USE_SNPRINTF + int retcount = 0; + size_t maxlen = allocated - length; + /* SNPRINTF can fail if its second argument is + > INT_MAX. */ + if (maxlen > INT_MAX / TCHARS_PER_DCHAR) + goto overflow; + maxlen = maxlen * TCHARS_PER_DCHAR; # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ - retcount = SNPRINTF (result + length, maxlen, buf, \ + retcount = SNPRINTF ((TCHAR_T *) (result + length), \ + maxlen, buf, \ arg, &count); \ break; \ case 1: \ - retcount = SNPRINTF (result + length, maxlen, buf, \ + retcount = SNPRINTF ((TCHAR_T *) (result + length), \ + maxlen, buf, \ prefixes[0], arg, &count); \ break; \ case 2: \ - retcount = SNPRINTF (result + length, maxlen, buf, \ + retcount = SNPRINTF ((TCHAR_T *) (result + length), \ + maxlen, buf, \ prefixes[0], prefixes[1], arg, \ &count); \ break; \ @@ -701,14 +3543,12 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar SNPRINTF_BUF (arg); } break; -#if HAVE_LONG_DOUBLE case TYPE_LONGDOUBLE: { long double arg = a.arg[dp->arg_index].a.a_longdouble; SNPRINTF_BUF (arg); } break; -#endif case TYPE_CHAR: { int arg = a.arg[dp->arg_index].a.a_char; @@ -756,7 +3596,8 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar { /* Verify that snprintf() has NUL-terminated its result. */ - if (count < maxlen && result[length + count] != '\0') + if (count < maxlen + && ((TCHAR_T *) (result + length)) [count] != '\0') abort (); /* Portability hack. */ if (retcount > count) @@ -766,11 +3607,11 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar { /* snprintf() doesn't understand the '%n' directive. */ - if (p[1] != '\0') + if (fbp[1] != '\0') { /* Don't use the '%n' directive; instead, look at the snprintf() return value. */ - p[1] = '\0'; + fbp[1] = '\0'; continue; } else @@ -806,37 +3647,261 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar return NULL; } -#if !USE_SNPRINTF +#if USE_SNPRINTF + /* Handle overflow of the allocated buffer. */ + if (count >= maxlen) + { + /* Need at least count * sizeof (TCHAR_T) bytes. But + allocate proportionally, to avoid looping eternally + if snprintf() reports a too small count. */ + size_t n = + xmax (xsum (length, + (count + TCHARS_PER_DCHAR - 1) + / TCHARS_PER_DCHAR), + xtimes (allocated, 2)); + + ENSURE_ALLOCATION (n); + continue; + } +#endif + +#if !DCHAR_IS_TCHAR +# if !USE_SNPRINTF if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); +# endif + + /* Convert from TCHAR_T[] to DCHAR_T[]. */ + if (dp->conversion == 'c' || dp->conversion == 's') + { + /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING + TYPE_WIDE_STRING. + The result string is not certainly ASCII. */ + const TCHAR_T *tmpsrc; + DCHAR_T *tmpdst; + size_t tmpdst_len; + /* This code assumes that TCHAR_T is 'char'. */ + typedef int TCHAR_T_verify + [2 * (sizeof (TCHAR_T) == 1) - 1]; +# if USE_SNPRINTF + tmpsrc = (TCHAR_T *) (result + length); +# else + tmpsrc = tmp; +# endif + tmpdst = NULL; + tmpdst_len = 0; + if (DCHAR_CONV_FROM_ENCODING (locale_charset (), + iconveh_question_mark, + tmpsrc, count, + NULL, + &tmpdst, &tmpdst_len) + < 0) + { + int saved_errno = errno; + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = saved_errno; + return NULL; + } + ENSURE_ALLOCATION (xsum (length, tmpdst_len)); + DCHAR_CPY (result + length, tmpdst, tmpdst_len); + free (tmpdst); + count = tmpdst_len; + } + else + { + /* The result string is ASCII. + Simple 1:1 conversion. */ +# if USE_SNPRINTF + /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a + no-op conversion, in-place on the array starting + at (result + length). */ + if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) +# endif + { + const TCHAR_T *tmpsrc; + DCHAR_T *tmpdst; + size_t n; + +# if USE_SNPRINTF + if (result == resultbuf) + { + tmpsrc = (TCHAR_T *) (result + length); + /* ENSURE_ALLOCATION will not move tmpsrc + (because it's part of resultbuf). */ + ENSURE_ALLOCATION (xsum (length, count)); + } + else + { + /* ENSURE_ALLOCATION will move the array + (because it uses realloc(). */ + ENSURE_ALLOCATION (xsum (length, count)); + tmpsrc = (TCHAR_T *) (result + length); + } +# else + tmpsrc = tmp; + ENSURE_ALLOCATION (xsum (length, count)); +# endif + tmpdst = result + length; + /* Copy backwards, because of overlapping. */ + tmpsrc += count; + tmpdst += count; + for (n = count; n > 0; n--) + *--tmpdst = (unsigned char) *--tmpsrc; + } + } #endif +#if DCHAR_IS_TCHAR && !USE_SNPRINTF /* Make room for the result. */ - if (count >= maxlen) + if (count > allocated - length) { - /* Need at least count bytes. But allocate - proportionally, to avoid looping eternally if - snprintf() reports a too small count. */ + /* Need at least count elements. But allocate + proportionally. */ size_t n = xmax (xsum (length, count), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); -#if USE_SNPRINTF - continue; + } #endif + + /* Here count <= allocated - length. */ + + /* Perform padding. */ +#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO + if (pad_ourselves && has_width) + { + size_t w; +# if ENABLE_UNISTDIO + /* Outside POSIX, it's preferrable to compare the width + against the number of _characters_ of the converted + value. */ + w = DCHAR_MBSNLEN (result + length, count); +# else + /* The width is compared against the number of _bytes_ + of the converted value, says POSIX. */ + w = count; +# endif + if (w < width) + { + size_t pad = width - w; +# if USE_SNPRINTF + /* Make room for the result. */ + if (xsum (count, pad) > allocated - length) + { + /* Need at least count + pad elements. But + allocate proportionally. */ + size_t n = + xmax (xsum3 (length, count, pad), + xtimes (allocated, 2)); + + length += count; + ENSURE_ALLOCATION (n); + length -= count; + } + /* Here count + pad <= allocated - length. */ +# endif + { +# if !DCHAR_IS_TCHAR || USE_SNPRINTF + DCHAR_T * const rp = result + length; +# else + DCHAR_T * const rp = tmp; +# endif + DCHAR_T *p = rp + count; + DCHAR_T *end = p + pad; +# if NEED_PRINTF_FLAG_ZERO + DCHAR_T *pad_ptr; +# if !DCHAR_IS_TCHAR + if (dp->conversion == 'c' + || dp->conversion == 's') + /* No zero-padding for string directives. */ + pad_ptr = NULL; + else +# endif + { + pad_ptr = (*rp == '-' ? rp + 1 : rp); + /* No zero-padding of "inf" and "nan". */ + if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') + || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) + pad_ptr = NULL; + } +# endif + /* The generated string now extends from rp to p, + with the zero padding insertion point being at + pad_ptr. */ + + count = count + pad; /* = end - rp */ + + if (flags & FLAG_LEFT) + { + /* Pad with spaces on the right. */ + for (; pad > 0; pad--) + *p++ = ' '; + } +# if NEED_PRINTF_FLAG_ZERO + else if ((flags & FLAG_ZERO) && pad_ptr != NULL) + { + /* Pad with zeroes. */ + DCHAR_T *q = end; + + while (p > pad_ptr) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = '0'; + } +# endif + else + { + /* Pad with spaces on the left. */ + DCHAR_T *q = end; + + while (p > rp) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = ' '; + } + } + } } +#endif -#if USE_SNPRINTF +#if DCHAR_IS_TCHAR && !USE_SNPRINTF + if (count >= tmp_length) + /* tmp_length was incorrectly calculated - fix the + code above! */ + abort (); +#endif + + /* Here still count <= allocated - length. */ + +#if !DCHAR_IS_TCHAR || USE_SNPRINTF /* The snprintf() result did fit. */ #else /* Append the sprintf() result. */ - memcpy (result + length, tmp, count * sizeof (CHAR_T)); + memcpy (result + length, tmp, count * sizeof (DCHAR_T)); +#endif +#if !USE_SNPRINTF if (tmp != tmpbuf) free (tmp); #endif +#if NEED_PRINTF_DIRECTIVE_F + if (dp->conversion == 'F') + { + /* Convert the %f result to upper case for %F. */ + DCHAR_T *rp = result + length; + size_t rc; + for (rc = count; rc > 0; rc--, rp++) + if (*rp >= 'a' && *rp <= 'z') + *rp = *rp - 'a' + 'A'; + } +#endif + length += count; break; } @@ -851,9 +3916,9 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar if (result != resultbuf && length + 1 < allocated) { /* Shrink the allocated memory if possible. */ - CHAR_T *memory; + DCHAR_T *memory; - memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T)); + memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); if (memory != NULL) result = memory; } @@ -868,6 +3933,15 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar not have this limitation. */ return result; + overflow: + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EOVERFLOW; + return NULL; + out_of_memory: if (!(result == resultbuf || result == NULL)) free (result); @@ -880,10 +3954,13 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar } } +#undef TCHARS_PER_DCHAR #undef SNPRINTF #undef USE_SNPRINTF #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE -#undef CHAR_T +#undef TCHAR_T +#undef DCHAR_T +#undef FCHAR_T #undef VASNPRINTF diff --git a/gnulib/vasnprintf.h b/gnulib/vasnprintf.h index 894008c..7a0c01f 100644 --- a/gnulib/vasnprintf.h +++ b/gnulib/vasnprintf.h @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 2002-2004 Free Software Foundation, Inc. + Copyright (C) 2002-2004, 2007 Free Software Foundation, Inc. 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 @@ -37,7 +37,7 @@ # endif #endif -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -65,12 +65,16 @@ extern "C" { free (output); } */ +#if REPLACE_VASNPRINTF +# define asnprintf rpl_asnprintf +# define vasnprintf rpl_vasnprintf +#endif extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 3, 0))); -#ifdef __cplusplus +#ifdef __cplusplus } #endif diff --git a/man/Makefile.am b/man/Makefile.am index d0cd8a5..c060341 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -2,21 +2,19 @@ transform = s,x,x,; -if WANT_AMPLOT -AMPLOT_MAN8_PAGES = amplot.8 -endif +AMPLOT_MAN_PAGES = amplot.8 -COMMON_MAN8_PAGES = amanda.8 - -COMMON_MAN5_PAGES = amanda.conf.5 \ +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 \ @@ -31,120 +29,107 @@ SERVER_MAN8_PAGES = amadmin.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 +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) +if WANT_AMPLOT + WANTED_MAN_PAGES += $(AMPLOT_MAN_PAGES) +endif +if WANT_SERVER + WANTED_MAN_PAGES += $(SERVER_MAN_PAGES) +endif if WANT_RECOVER -RECOVER_MAN8_PAGES = amrecover.8 + WANTED_MAN_PAGES += $(RECOVER_MAN_PAGES) endif - if WANT_RESTORE -RESTORE_MAN8_PAGES = amrestore.8 + WANTED_MAN_PAGES += $(RESTORE_MAN_PAGES) endif -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 $mandir variables. -man5_MANS = -man8_MANS = - 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) +EXTRA_DIST = $(ALL_MAN_PAGES) $(MAN_XML) $(EXTRA_HTML) $(EXTRA_XML) GEN_XML = $(ALL_MAN_PAGES:%=xml-source/%.proc.xml) MOSTLYCLEANFILES = $(GEN_XML) MAINTAINERCLEANFILES = $(ALL_MAN_PAGES) +# 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=$@:$< + if ENABLE_MANPAGE_BUILD +# phase one of the documentation build expands some macros. xml-source/%.proc.xml: $(SRCMANPAGEDIR)/%.xml $(srcdir)/xslt/expand-sambadoc.xsl $(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 %: xml-source/%.proc.xml $(srcdir)/xslt/man.xsl - $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --output $@ http://docbook.sourceforge.net/release/xsl/1.72.0/manpages/docbook.xsl $< + $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --output $@ xslt/man.xsl $< + +%.html: xml-source/%.proc.xml $(srcdir)/xslt/html.xsl + $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --output $@ xslt/html.xsl $< else !ENABLE_MANPAGE_BUILD %: $(SRCMANPAGEDIR)/%.xml @echo WARNING: Not building needed $@ because building manpages is disabled. + @echo 'DUMMY' > $@ + +# (no rule to build HTML without ENABLE_MANPAGE_BUILD) + endif -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) -if ENABLE_MANPAGE_BUILD - @list="$(man8_pages)"; \ - for p in $$list; do \ - pa=$(DESTDIR)$(man8dir)/`echo $$p|sed '$(transform)'`; \ - echo $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man8dir); \ - $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man8dir); \ - echo chown \"$(BINARY_OWNER)\" $$pa; \ - chown "$(BINARY_OWNER)" $$pa; \ - echo chgrp \"$(SETUID_GROUP)\" $$pa; \ - chgrp "$(SETUID_GROUP)" $$pa; \ - done - @list="$(man5_pages)"; \ - for p in $$list; do \ - pa=$(DESTDIR)$(man5dir)/`echo $$p|sed '$(transform)'`; \ - echo $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man5dir); \ - $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man5dir); \ - echo chown \"$(BINARY_OWNER)\" $$pa; \ - chown "$(BINARY_OWNER)" $$pa; \ - echo chgrp \"$(SETUID_GROUP)\" $$pa; \ - chgrp "$(SETUID_GROUP)" $$pa; \ - done -else !ENABLE_MANPAGE_BUILD - @list="$(man8_pages)"; \ - for p in $$list; do \ - if test -e $$p; then \ - pa=$(DESTDIR)$(man8dir)/`echo $$p|sed '$(transform)'`; \ - echo $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man8dir); \ - $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man8dir); \ - echo chown \"$(BINARY_OWNER)\" $$pa; \ - chown "$(BINARY_OWNER)" $$pa; \ - echo chgrp \"$(SETUID_GROUP)\" $$pa; \ - chgrp "$(SETUID_GROUP)" $$pa; \ - fi \ - done - @list="$(man5_pages)"; \ - for p in $$list; do \ - if test -e $$p; then \ - pa=$(DESTDIR)$(man5dir)/`echo $$p|sed '$(transform)'`; \ - echo $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man5dir); \ - $(INSTALL) -c -m 644 $$p $(DESTDIR)$(man5dir); \ - echo chown \"$(BINARY_OWNER)\" $$pa; \ - chown "$(BINARY_OWNER)" $$pa; \ - echo chgrp \"$(SETUID_GROUP)\" $$pa; \ - chgrp "$(SETUID_GROUP)" $$pa; \ - fi \ +## +## HTML Generation +## + +EXTRA_DIST += \ + index.php \ + amanda.css + +ALL_MAN_HTMLS = $(ALL_MAN_PAGES:%=%.html) + +# 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 -endif + +man_MANS = $(WANTED_MAN_PAGES) diff --git a/man/Makefile.in b/man/Makefile.in index 4fcf374..e5e805d 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -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. @@ -15,15 +15,11 @@ @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 @@ 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 @@ -97,9 +166,9 @@ 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@ @@ -114,7 +183,13 @@ 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 +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,52 +226,162 @@ 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@ @@ -205,7 +389,8 @@ 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 +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 +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 +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 +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 \ @@ -364,45 +591,47 @@ SERVER_MAN8_PAGES = amadmin.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 $mandir 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 +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 +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 +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; \ @@ -570,12 +793,15 @@ distdir: $(DISTFILES) || 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 +835,32 @@ 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 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 +879,57 @@ ps: ps-am 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 --git a/man/amadmin.8 b/man/amadmin.8 index 671439e..871d679 100644 --- a/man/amadmin.8 +++ b/man/amadmin.8 @@ -1,17 +1,17 @@ .\" Title: amadmin .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMADMIN" "8" "06/06/2007" "" "" +.TH "AMADMIN" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amadmin \- administrative interface to control Amanda backups +amadmin - administrative interface to control Amanda backups .SH "SYNOPSIS" .HP 8 \fBamadmin\fR \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...] [\fB\-o\ \fR\fIconfigoption\fR]... @@ -21,12 +21,12 @@ amadmin \- administrative interface to control Amanda backups performs various administrative tasks on the \fIconfig\fR \fIAmanda\fR -configuration. +configuration\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "COMMANDS" .PP Commands that take a @@ -37,28 +37,28 @@ Commands that take a \fIdisklist\fR for that \fIhostname\fR -if no disks are specified. Where +if no disks are specified\. Where \fIhostname\fR is also marked as being optional, the command operates on all hosts and disks in the -\fIdisklist\fR. Both +\fIdisklist\fR\. Both \fIhostname\fR and \fIdisks\fR are special expressions; see the "HOST & DISK EXPRESSION" section of \fBamanda\fR(8) -for a description. +for a description\. .PP Commands that take one or more \fIdumpspec\fR -parameters operate on the set of dumps specified by all of the expressions. See the "DUMP SPECIFICATIONS" section of +parameters operate on the set of dumps specified by all of the expressions\. See the "DUMP SPECIFICATIONS" section of \fBamanda\fR(8) -for a description. +for a description\. .PP \fBversion\fR .RS 4 -Show the current version and some compile time and runtime parameters. The +Show the current version and some compile time and runtime parameters\. The \fIconfig\fR -parameter must be present but is ignored. +parameter must be present but is ignored\. .RE .PP \fBforce\-bump\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+ @@ -69,7 +69,7 @@ on \fIhostname\fR to bump to a new incremental level during the next \fIAmanda\fR -run. +run\. .RE .PP \fBforce\-no\-bump\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+ @@ -80,7 +80,7 @@ on \fIhostname\fR to not bump to a new incremental level during the next \fIAmanda\fR -run. +run\. .RE .PP \fBunforce\-bump\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+ @@ -89,7 +89,7 @@ Undo a previous \fBforce\-bump\fR or \fBforce\-no\-bump\fR -command. +command\. .RE .PP \fBforce\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+ @@ -100,51 +100,50 @@ on \fIhostname\fR to do a full (level 0) backup during the next \fIAmanda\fR -run. +run\. .RE .PP \fBunforce\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+ .RS 4 Undo a previous \fBforce\fR -command. +command\. .RE .PP -\fBreuse\fR \fItapelabel\fR [ ... ] +\fBreuse\fR \fItapelabel\fR [ \.\.\. ] .RS 4 -The tapes listed will be available for reuse at their point in the tape cycle. +The tapes listed will be available for reuse at their point in the tape cycle\. .RE .PP -\fBno\-reuse\fR \fItapelabel\fR [ ... ] +\fBno\-reuse\fR \fItapelabel\fR [ \.\.\. ] .RS 4 -The tapes listed will not be reused when their turn comes up again in the tape cycle. Note that if this causes the number of reusable tapes to drop below the -\fBamanda.conf\fR +The tapes listed will not be reused when their turn comes up again in the tape cycle\. Note that if this causes the number of reusable tapes to drop below the +\fBamanda\.conf\fR \fItapecycle\fR value, \fIAmanda\fR -will request new tapes until the count is satisfied again. +will request new tapes until the count is satisfied again\. .sp Tape marked \fIno\-reuse\fR are available for recovery, marking them \fIno\-reuse\fR -is a security to be sure amanda will not overwrite them. +is a security to be sure amanda will not overwrite them\. .RE .PP \fBdue\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]* .RS 4 -Show when the next full dump is due. +Show when the next full dump is due\. .RE .PP \fBfind\fR [ \fB\-\-sort\fR \fIhkdlpb\fR ] [ \fIhostname\fR [ \fIdisks\fR ]* ]* .RS 4 -Display all backups currently on tape or in the holding disk. The tape label or holding disk filename, file number, and status are displayed. +Display all backups currently on tape or in the holding disk\. The tape label or holding disk filename, file number, and status are displayed\. .sp The \fB\-\-sort\fR option changes the sort order using the following flags: .sp -.RS 4 .nf \fIh\fR: host name \fIk\fR: disk name @@ -153,20 +152,23 @@ option changes the sort order using the following flags: \fIp\fR: dump part \fIb\fR: tape label .fi -.RE .sp -An uppercase letter reverses the sort order for that key. The default sort order is -\fBhkdlpb\fR. +An uppercase letter reverses the sort order for that key\. The default sort order is +\fBhkdlpb\fR\. .RE .PP -\fBholding delete\fR \fIhostname\fR [ \fIdisk\fR [ \fIdatestamp\fR [ .. ] ] ] +\fBholding delete\fR \fIhostname\fR [ \fIdisk\fR [ \fIdatestamp\fR [ \.\. ] ] ] .RS 4 -Delete holding files matching the given specification. At least a hostname must be provided. +Delete holding files matching the given specification\. At least a hostname must be provided\. .RE .PP -\fBholding list\fR [\-l] [ \fIhostname\fR [ \fIdisk\fR [ \fIdatestamp\fR [ .. ] ] ] ] +\fBholding list\fR [\-l] [\-d] [ \fIhostname\fR [ \fIdisk\fR [ \fIdatestamp\fR [ \.\. ] ] ] ] .RS 4 -List holding files matching the given specification, or all holding files if no specification is provided. With '\-l', additional information (size and level) is provided. +List holding files matching the given specification, or all holding files if no specification is provided\. With \'\-l\', additional information (size, level, and whether the dump is outdated) is provided\. With \'\-d\', only outdated dumps are shown\. +.sp +An outdated holding file is one which is not required for a restore of the +\fImost recent\fR +dump\. Note that outdated dumps may still be required for restores at earlier dates\. For example, assume that a DLE had a level 0 on Monday, level 1\'s Tuesday through Thursday, and a level 2 on Friday\. Then the files required for a restore of Fridays (the most recent) dump are those from Monday (level 0), Thursday (level 1), and Friday (level 2)\. Tuesday and Wednesday\'s files are outdated\. .RE .PP \fBdelete\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]+ @@ -177,36 +179,36 @@ on \fIhostname\fR from the \fIAmanda\fR -database. +database\. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR +Note If you do not also remove the disk from the \fIdisklist\fR file, \fIAmanda\fR -will treat it as a new disk during the next run. +will treat it as a new disk during the next run\. .RE .PP \fBtape\fR .RS 4 Display the tape(s) \fIAmanda\fR -expects to write to during the next run. See also -\fBamcheck\fR(8). +expects to write to during the next run\. See also +\fBamcheck\fR(8)\. .RE .PP \fBbumpsize\fR .RS 4 -Display the current bump threshold parameters, calculated for all backup levels. +Display the current bump threshold parameters, calculated for all backup levels\. .RE .PP \fBbalance\fR [ \fB\-\-days\fR \fI\fR ] .RS 4 -Display the distribution of full backups throughout the dump schedule. +Display the distribution of full backups throughout the dump schedule\. .RE .PP \fBexport\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]* @@ -216,7 +218,7 @@ Convert records from the database to a text format that may be transmitted to another \fIAmanda\fR machine and -\fBimport\fRed. +\fBimport\fRed\. .RE .PP \fBimport\fR @@ -224,7 +226,7 @@ machine and Convert \fBexport\fRed records read from standard input to a form \fIAmanda\fR -uses and insert them into the database on this machine. +uses and insert them into the database on this machine\. .RE .PP \fBdisklist\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]* @@ -235,7 +237,7 @@ information for each of the \fIdisks\fR on \fIhostname\fR -(or all hosts). Mostly used for debugging. +(or all hosts)\. Mostly used for debugging\. .RE .PP \fBinfo\fR [ \fIhostname\fR [ \fIdisks\fR ]* ]* @@ -244,13 +246,13 @@ Display the database record for each of the \fIdisks\fR on \fIhostname\fR -(or all hosts). Mostly used for debugging. +(or all hosts)\. Mostly used for debugging\. .RE .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .SH "EXAMPLES" .PP @@ -258,65 +260,54 @@ Request three specific file systems on \fImachine\-a\fR get a full level 0 backup during the next \fIAmanda\fR -run. -.sp -.RS 4 +run\. .nf $ amadmin daily force machine\-a / /var /usr -amadmin: machine\-a:/ is set to a forced level 0 tonight. -amadmin: machine\-a:/var is set to a forced level 0 tonight. -amadmin: machine\-a:/usr is set to a forced level 0 tonight. +amadmin: machine\-a:/ is set to a forced level 0 tonight\. +amadmin: machine\-a:/var is set to a forced level 0 tonight\. +amadmin: machine\-a:/usr is set to a forced level 0 tonight\. .fi -.RE .PP Request all file systems on \fImachine\-b\fR get a full level 0 backup during the next \fIAmanda\fR -run. -.sp -.RS 4 +run\. .nf $ amadmin daily force machine\-b -amadmin: machine\-b:/ is set to a forced level 0 tonight. -amadmin: machine\-b:/var is set to a forced level 0 tonight. -amadmin: machine\-b:/usr is set to a forced level 0 tonight. -amadmin: machine\-b:/home is set to a forced level 0 tonight. +amadmin: machine\-b:/ is set to a forced level 0 tonight\. +amadmin: machine\-b:/var is set to a forced level 0 tonight\. +amadmin: machine\-b:/usr is set to a forced level 0 tonight\. +amadmin: machine\-b:/home is set to a forced level 0 tonight\. .fi -.RE .PP Undo the previous \fBforce\fR request for \fI/home\fR on -\fImachine\-b\fR. The other file systems will still get a full level 0 backup. -.sp -.RS 4 +\fImachine\-b\fR\. The other file systems will still get a full level 0 backup\. .nf $ amadmin daily unforce machine\-b /home -amadmin: force command for machine\-b:/home cleared. +amadmin: force command for machine\-b:/home cleared\. .fi -.RE .PP Locate backup images of \fI/var\fR from -\fImachine\-c\fR. The +\fImachine\-c\fR\. The \fItape or file\fR -column displays either a tape label or a filename depending on whether the image is on tape or is still in the holding disk. If the image is on tape, the +column displays either a tape label or a filename depending on whether the image is on tape or is still in the holding disk\. If the image is on tape, the \fIfile\fR -column tells you which file on the tape has the image (file number zero is a tape label). This column shows zero and is not meaningful if the image is still in the holding disk. The +column tells you which file on the tape has the image (file number zero is a tape label)\. This column shows zero and is not meaningful if the image is still in the holding disk\. The \fIstatus\fR -column tells you whether the backup was successful or had some type of error. -.sp -.RS 4 +column tells you whether the backup was successful or had some type of error\. .nf $ amadmin daily find machine\-c /var date host disk lv tape or file file part status 2000\-11\-09 machine\-c /var 0 000110 9 \-\- OK 2000\-11\-08 machine\-c /var 2 000109 2 \-\- OK -2000\-11\-07 machine\-c /var 2 /amanda/20001107/machine\-c._var.2 0 OK +2000\-11\-07 machine\-c /var 2 /amanda/20001107/machine\-c\._var\.2 0 OK 2000\-11\-06 machine\-c /var 2 000107 2 \-\- OK 2000\-11\-05 machine\-c /var 2 000106 3 \-\- OK 2000\-11\-04 machine\-c /var 2 000105 2 \-\- OK @@ -325,91 +316,81 @@ date host disk lv tape or file file part status 2000\-11\-01 machine\-c /var 1 000102 5 \-\- OK 2000\-10\-31 machine\-c /var 1 000101 3 \-\- OK .fi -.RE .PP Forget about the \fI/workspace\fR disk on -\fImachine\-d\fR. If you do not also remove the disk from the +\fImachine\-d\fR\. If you do not also remove the disk from the \fIdisklist\fR file, \fIAmanda\fR -will treat it as a new disk during the next run. -.sp -.RS 4 +will treat it as a new disk during the next run\. .nf $ amadmin daily delete machine\-d /workspace -amadmin: machine\-d:/workspace deleted from database. -amadmin: NOTE: you'll have to remove these from the disklist yourself. +amadmin: machine\-d:/workspace deleted from database\. +amadmin: NOTE: you\'ll have to remove these from the disklist yourself\. .fi -.RE .PP Find the next tape \fIAmanda\fR will use (in this case, -123456). -.sp -.RS 4 +123456)\. .nf $ amadmin daily tape -The next \fIAmanda\fR run should go onto tape 123456 or a new tape. +The next \fIAmanda\fR run should go onto tape 123456 or a new tape\. .fi -.RE .PP -Show how well full backups are balanced across the dump cycle. The +Show how well full backups are balanced across the dump cycle\. The \fIdue\-date\fR -column is the day the backups are due for a full backup. +column is the day the backups are due for a full backup\. \fI#fs\fR shows the number of filesystems doing full backups that night, and \fIorig KB\fR and \fIout KB\fR -show the estimated total size of the backups before and after any compression, respectively. +show the estimated total size of the backups before and after any compression, respectively\. .PP The \fIbalance\fR -column shows how far off that night's backups are from the average size (shown at the bottom of the balance column). +column shows how far off that night\'s backups are from the average size (shown at the bottom of the balance column)\. \fIAmanda\fR tries to keep the backups within +/\- 5%, but since the amount of data on each filesystem is always changing, and \fIAmanda\fR -will never delay backups just to rebalance the schedule, it is common for the schedule to fluctuate by larger percentages. In particular, in the case of a tape or backup failure, a bump will occur the following night, which will not be smoothed out until the next pass through the schedule. +will never delay backups just to rebalance the schedule, it is common for the schedule to fluctuate by larger percentages\. In particular, in the case of a tape or backup failure, a bump will occur the following night, which will not be smoothed out until the next pass through the schedule\. .PP The last line also shows an estimate of how many \fIAmanda\fR -runs will be made between full backups for a file system. In the example, a file system will probably have a full backup done every eight times +runs will be made between full backups for a file system\. In the example, a file system will probably have a full backup done every eight times \fIAmanda\fR -is run (e.g. every eight days). -.sp -.RS 4 +is run (e\.g\. every eight days)\. .nf $ amadmin daily balance due\-date #fs orig KB out KB balance \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- -11/10 Mon 21 930389 768753 +5.1% -11/11 Tue 29 1236272 733211 +0.2% -11/12 Wed 31 1552381 735796 +0.6% -11/13 Thu 23 1368447 684552 \-6.4% -11/14 Fri 32 1065603 758155 +3.6% -11/15 Sat 14 1300535 738430 +0.9% -11/16 Sun 31 1362696 740365 +1.2% -11/17 Mon 30 1427936 773397 +5.7% -11/18 Tue 11 1059191 721786 \-1.3% -11/19 Wed 19 1108737 661867 \-9.5% +11/10 Mon 21 930389 768753 +5\.1% +11/11 Tue 29 1236272 733211 +0\.2% +11/12 Wed 31 1552381 735796 +0\.6% +11/13 Thu 23 1368447 684552 \-6\.4% +11/14 Fri 32 1065603 758155 +3\.6% +11/15 Sat 14 1300535 738430 +0\.9% +11/16 Sun 31 1362696 740365 +1\.2% +11/17 Mon 30 1427936 773397 +5\.7% +11/18 Tue 11 1059191 721786 \-1\.3% +11/19 Wed 19 1108737 661867 \-9\.5% \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- TOTAL 241 12412187 7316312 731631 (estimated 8 runs per dumpcycle) .fi -.RE .SH "FILES" .PP -/usr/local/etc/amanda/\fIconfig\fR/amanda.conf +/usr/local/etc/amanda/\fIconfig\fR/amanda\.conf .SH "AUTHOR" .PP James da Silva, - + : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP @@ -417,4 +398,5 @@ Stefan G. Weichinger, \fBamcheck\fR(8), \fBamdump\fR(8), \fBamrestore\fR(8), -\fBamfetchdump\fR(8) +\fBamfetchdump\fR(8), +: http://wiki.zmanda.com diff --git a/man/amaespipe.8 b/man/amaespipe.8 index ae0d536..5bf7451 100644 --- a/man/amaespipe.8 +++ b/man/amaespipe.8 @@ -1,17 +1,17 @@ .\" Title: amaespipe .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMAESPIPE" "8" "06/06/2007" "" "" +.TH "AMAESPIPE" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amaespipe \- wrapper program for aespipe +amaespipe - wrapper program for aespipe .SH "SYNOPSIS" .HP 10 \fBamaespipe\fR @@ -24,12 +24,12 @@ requires \fBuuencode\fR and \fBgpg\fR -to work. Aespipe is available from -\fI\%http://loop\-aes.sourceforge.net\fR +to work\. Aespipe is available from +: http://loop-aes.sourceforge.net .PP \fBamaespipe\fR -will search for the aespipe program in the following directories: /usr/bin:/usr/local/bin:/sbin:/usr/sbin. +will search for the aespipe program in the following directories: /usr/bin:/usr/local/bin:/sbin:/usr/sbin\. .PP \fBamaespipe\fR @@ -37,19 +37,20 @@ is called by \fBamcrypt\fR for \fIAmanda\fR -data encryption. +data encryption\. .PP \fBamaespipe\fR -is based on aespipe's bzaespipe program. It calls aespipe to encrypt data using AES256 as the encryption and SHA256 as the hash function. GPG key should be stored in $AMANDA_HOME/.gnupg/am_key.gpg. +is based on aespipe\'s bzaespipe program\. It calls aespipe to encrypt data using AES256 as the encryption and SHA256 as the hash function\. GPG key should be stored in $AMANDA_HOME/\.gnupg/am_key\.gpg\. \fBamaespipe\fR -reads passphrase from file descriptor 3. During decryption, +reads passphrase from file descriptor 3\. During decryption, \fBamaespipe\fR -autodects encryption type and hash function from the encrypted image. +autodects encryption type and hash function from the encrypted image\. .SH "SEE ALSO" .PP \fBamanda\fR(8), \fBamanda.conf\fR(5), \fBaespipe\fR(1), \fBamcrypt\fR(8), -\fBgpg\fR(1) +\fBgpg\fR(1), +: http://wiki.zmanda.com diff --git a/man/amanda-client.conf.5 b/man/amanda-client.conf.5 index 51a72dc..fb15d22 100644 --- a/man/amanda-client.conf.5 +++ b/man/amanda-client.conf.5 @@ -1,104 +1,104 @@ .\" Title: amanda-client.conf .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMANDA\-CLIENT.CONF" "5" "06/06/2007" "" "" +.TH "AMANDA\-CLIENT\.CONF" "5" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amanda\-client.conf \- Client configuration file for Amanda, the Advanced Maryland Automatic Network Disk Archiver +amanda-client.conf - Client configuration file for Amanda, the Advanced Maryland Automatic Network Disk Archiver .SH "DESCRIPTION" .PP -\fIamanda\-client.conf\fR +\fIamanda\-client\.conf\fR is the client configuration file for -\fIAmanda\fR. This manpage lists the relevant sections and parameters of this file for quick reference. +\fIAmanda\fR\. This manpage lists the relevant sections and parameters of this file for quick reference\. .PP The files -\fB/amanda\-client.conf\fR +\fB/amanda\-client\.conf\fR and -\fB//amanda\-client.conf\fR -are loaded. +\fB//amanda\-client\.conf\fR +are loaded\. .SH "PARAMETERS" .PP There are a number of configuration parameters that control the behavior of the \fIAmanda\fR -programs. All have default values, so you need not specify the parameter in -\fBamanda\-client.conf\fR -if the default is suitable. +programs\. All have default values, so you need not specify the parameter in +\fBamanda\-client\.conf\fR +if the default is suitable\. .PP -Lines starting with # are ignored, as are blank lines. Comments may be placed on a line with a directive by starting the comment with a #. The remainder of the line is ignored. +Lines starting with # are ignored, as are blank lines\. Comments may be placed on a line with a directive by starting the comment with a #\. The remainder of the line is ignored\. .PP -Keywords are case insensitive, i.e. +Keywords are case insensitive, i\.e\. \fBauth\fR and \fBAuth\fR -are treated the same. +are treated the same\. .PP Integer arguments may have one of the following (case insensitive) suffixes, some of which have a multiplier effect: .SS "POSSIBLE SUFFIXES" .PP \fBb byte bytes\fR .RS 4 -Some number of bytes. +Some number of bytes\. .RE .PP \fBbps\fR .RS 4 -Some number of bytes per second. +Some number of bytes per second\. .RE .PP \fBk kb kbyte kbytes kilobyte kilobytes\fR .RS 4 -Some number of kilobytes (bytes*1024). +Some number of kilobytes (bytes*1024)\. .RE .PP \fBkps kbps\fR .RS 4 -Some number of kilobytes per second (bytes*1024). +Some number of kilobytes per second (bytes*1024)\. .RE .PP \fBm mb meg mbyte mbytes megabyte megabytes\fR .RS 4 -Some number of megabytes (bytes*1024*1024). +Some number of megabytes (bytes*1024*1024)\. .RE .PP \fBmps mbps\fR .RS 4 -Some number of megabytes per second (bytes*1024*1024). +Some number of megabytes per second (bytes*1024*1024)\. .RE .PP \fBg gb gbyte gbytes gigabyte gigabytes\fR .RS 4 -Some number of gigabytes (bytes*1024*1024*1024). +Some number of gigabytes (bytes*1024*1024*1024)\. .RE .PP \fBtape tapes\fR .RS 4 -Some number of tapes. +Some number of tapes\. .RE .PP \fBday days\fR .RS 4 -Some number of days. +Some number of days\. .RE .PP \fBweek weeks\fR .RS 4 -Some number of weeks (days*7). +Some number of weeks (days*7)\. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR +Note The value \fBinf\fR -may be used in most places where an integer is expected to mean an infinite amount. +may be used in most places where an integer is expected to mean an infinite amount\. .sp Boolean arguments may have any of the values \fBy\fR, @@ -114,180 +114,182 @@ to indicate a true state, or \fBfalse\fR or \fBoff\fR -to indicate a false state. If no argument is given, +to indicate a false state\. If no argument is given, \fBtrue\fR -is assumed. +is assumed\. .RE .SS "PARAMETERS" .PP \fBconf\fR \fI string\fR .RS 4 Default: -\fISet by configure\fR. The conf use by amrecover. +\fISet by configure\fR\. The conf use by amrecover\. .RE .PP \fBindex_server\fR \fI string\fR .RS 4 Default: -\fISet by configure\fR. The amindexd server amrecover will connect to. +\fISet by configure\fR\. The amindexd server amrecover will connect to\. .RE .PP \fBtape_server\fR \fI string\fR .RS 4 Default: -\fISet by configure\fR. The amidxtaped server amrecover will connect to. +\fISet by configure\fR\. The amidxtaped server amrecover will connect to\. .RE .PP \fBtapedev\fR \fI string\fR .RS 4 Default: -\fISet by configure\fR. The tapedev amrecover will use. +\fISet by configure\fR\. The tapedev amrecover will use\. .RE .PP \fBauth\fR \fI string\fR .RS 4 Default: -\fIbsd\fR. Type of authorization to perform between tape server and backup client hosts. +\fIbsd\fR\. Type of authorization to perform between tape server and backup client hosts\. .sp -\fBbsd\fR, bsd authorization with udp initial connection and one tcp connection by data stream. +\fBbsd\fR, bsd authorization with udp initial connection and one tcp connection by data stream\. .sp -\fBbsdtcp\fR, bsd authorization but use only one tcp connection. +\fBbsdtcp\fR, bsd authorization but use only one tcp connection\. .sp -\fBbsdudp\fR, like bsd, but will use only one tcp connection for all data stream. +\fBbsdudp\fR, like bsd, but will use only one tcp connection for all data stream\. .sp \fBkrb4\fR -to use Kerberos\-IV authorization. +to use Kerberos\-IV authorization\. .sp \fBkrb5\fR -to use Kerberos\-V authorization. +to use Kerberos\-V authorization\. +.sp +\fBlocal\fR, if the client is the server, it doesn\'t require authencation setup\. .sp \fBrsh\fR -to use rsh authorization. +to use rsh authorization\. .sp \fBssh\fR -to use OpenSSH authorization. +to use OpenSSH authorization\. .RE .PP \fBssh_keys\fR \fI string\fR .RS 4 Default: -\fINo default\fR. The key file the ssh auth will use, it must be the private key. If this parameter is not specified, then the deafult ssh key will be used. +\fINo default\fR\. The key file the ssh auth will use, it must be the private key\. If this parameter is not specified, then the deafult ssh key will be used\. .RE .PP \fBgnutar_list_dir\fR \fI string\fR .RS 4 Default from configure -\fI\-\-with\-gnutar\-listdir=DIR\fR. The directory where gnutar keep its state file. +\fI\-\-with\-gnutar\-listdir=DIR\fR\. The directory where gnutar keep its state file\. .RE .PP \fBamandates\fR \fI string\fR .RS 4 Default: -\fI/etc/amandates\fR. The file where amanda keep the last date of each dumplevel. +\fI/etc/amandates\fR\. The file where amanda keep the last date of each dumplevel\. .RE .PP \fBconnect_tries\fR int .RS 4 Default: -\fI3\fR. How many times the server will try a connection. +\fI3\fR\. How many times the server will try a connection\. .RE .PP \fBrep_tries\fR int .RS 4 Default: -\fI5\fR. How many times amandad will resend a REP packet if it doesn't get the ACK packet. +\fI5\fR\. How many times amandad will resend a REP packet if it doesn\'t get the ACK packet\. .RE .PP \fBdebug_amandad\fR int .RS 4 Default: -\fI0\fR. Debug level of the amandad process +\fI0\fR\. Debug level of the amandad process .RE .PP \fBdebug_amidxtaped\fR int .RS 4 Default: -\fI0\fR. Debug level of the amidxtaped process +\fI0\fR\. Debug level of the amidxtaped process .RE .PP \fBdebug_amindexd\fR int .RS 4 Default: -\fI0\fR. Debug level of the amindexd process +\fI0\fR\. Debug level of the amindexd process .RE .PP \fBdebug_amrecover\fR int .RS 4 Default: -\fI0\fR. Debug level of the amrecover process +\fI0\fR\. Debug level of the amrecover process .RE .PP \fBdebug_auth\fR int .RS 4 Default: -\fI0\fR. Debug level of the auth module +\fI0\fR\. Debug level of the auth module .RE .PP \fBdebug_event\fR int .RS 4 Default: -\fI0\fR. Debug level of the event module +\fI0\fR\. Debug level of the event module .RE .PP \fBdebug_holding\fR int .RS 4 Default: -\fI0\fR. Debug level of the holdingdisk module +\fI0\fR\. Debug level of the holdingdisk module .RE .PP \fBdebug_protocol\fR int .RS 4 Default: -\fI0\fR. Debug level of the protocol module +\fI0\fR\. Debug level of the protocol module .RE .PP \fBdebug_selfcheck\fR int .RS 4 Default: -\fI0\fR. Debug level of the selfcheck process +\fI0\fR\. Debug level of the selfcheck process .RE .PP \fBdebug_sendsize\fR int .RS 4 Default: -\fI0\fR. Debug level of the sendsize process +\fI0\fR\. Debug level of the sendsize process .RE .PP \fBdebug_sendbackup\fR int .RS 4 Default: -\fI0\fR. Debug level of the sendbackup process +\fI0\fR\. Debug level of the sendbackup process .RE .PP \fBreserved\-udp\-port\fR int,int .RS 4 Default: \-\-with\-udpportrange or -\fI512,1023\fR. Reserved udp port that will be used (amrecover with bsd or bsdudp) +\fI512,1023\fR\. Reserved udp port that will be used (amrecover with bsd or bsdudp) .RE .PP \fBreserved\-tcp\-port\fR int,int .RS 4 Default: \-\-with\-low\-tcpportrange or -\fI512,1023\fR. Reserved tcp port that will be used (amrecover with bsdtcp) +\fI512,1023\fR\. Reserved tcp port that will be used (amrecover with bsdtcp) .RE .PP \fBunreserved\-tcp\-port\fR int,int .RS 4 Default: \-\-with\-tcpportrange or -\fI1025,65536\fR. Unreserved tcp port that will be used (bsd, bsdudp) +\fI1025,65536\fR\. Unreserved tcp port that will be used (bsd, bsdudp) .RE .SH "AUTHOR" .PP James da Silva, -: Original text +: Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion, major update, splitting .SH "SEE ALSO" .PP @@ -296,3 +298,4 @@ Stefan G. Weichinger, \fBamanda.conf\fR(5), \fBamcrypt\fR(8), \fBaespipe\fR(1), +: http://wiki.zmanda.com diff --git a/man/amanda.8 b/man/amanda.8 index f34b9a5..ef16e72 100644 --- a/man/amanda.8 +++ b/man/amanda.8 @@ -1,17 +1,17 @@ .\" Title: amanda .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMANDA" "8" "06/06/2007" "" "" +.TH "AMANDA" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amanda \- Advanced Maryland Automatic Network Disk Archiver +amanda - Advanced Maryland Automatic Network Disk Archiver .SH "SYNOPSIS" .HP 8 \fBamadmin\fR \fIconfig\fR \fIcommand\fR [\fIoptions\fR] @@ -97,82 +97,88 @@ amanda \- Advanced Maryland Automatic Network Disk Archiver \fBamtoc\fR [\fIoptions\fR] \fIlogfile\fR .br -.HP 9 -\fBamverify\fR \fIconfig\fR +.HP 12 +\fBamcheckdump\fR [\fIoptions\fR] \fIconfig\fR +.br + +.HP 15 +\fBamserverconfig\fR [\fIoptions\fR] \fIconfig\fR .br .HP 12 -\fBamverifyrun\fR \fIconfig\fR +\fBamaddclient\fR \fIconfig\fR [\fIoptions\fR] +.br + .SH "DESCRIPTION" .PP \fIAmanda\fR -is the "Advanced Maryland Automatic Network Disk Archiver". This manual page gives an overview of the +is the "Advanced Maryland Automatic Network Disk Archiver"\. This manual page gives an overview of the \fIAmanda\fR -commands and configuration files for quick reference. +commands and configuration files for quick reference\. .PP Here are all the \fIAmanda\fR -commands. Each one has its own manual page. See them for all the gory details. +commands\. Each one has its own manual page\. See them for all the gory details\. .PP \fBamdump\fR .RS 4 Take care of automatic \fIAmanda\fR -backups. This is normally executed by +backups\. This is normally executed by \fBcron\fR on a computer called the \fItape server host\fR and requests backups of file systems located on \fIbackup\fR -\fIclients\fR. +\fIclients\fR\. \fBAmdump\fR backs up all disks in the \fIdisklist\fR file (discussed below) to tape or, if there is a problem, to a special \fIholding\fR -\fIdisk\fR. After all backups are done, +\fIdisk\fR\. After all backups are done, \fBamdump\fR -sends mail reporting failures and successes. +sends mail reporting failures and successes\. .RE .PP \fBamflush\fR .RS 4 -Flush backups from the holding disk to tape. +Flush backups from the holding disk to tape\. \fBAmflush\fR is used after \fBamdump\fR -has reported it could not write backups to tape for some reason. When this happens, backups stay in the holding disk. Run +has reported it could not write backups to tape for some reason\. When this happens, backups stay in the holding disk\. Run \fBamflush\fR -after the tape problem is corrected to write backups from the holding disk to tape. +after the tape problem is corrected to write backups from the holding disk to tape\. .RE .PP \fBamcleanup\fR .RS 4 Clean up after an interrupted -\fBamdump\fR. This command is only needed if +\fBamdump\fR\. This command is only needed if \fBamdump\fR was unable to complete for some reason, usually because the tape server host crashed while \fBamdump\fR -was running. +was running\. .RE .PP \fBamrecover\fR .RS 4 Provides an interactive interface to browse the \fIAmanda\fR -index files (backup image catalogues) and select which tapes to recover files from. It can also run +index files (backup image catalogues) and select which tapes to recover files from\. It can also run \fBamrestore\fR -and a restore program (e.g. -\fBtar\fR) to actually recover the files. +and a restore program (e\.g\. +\fBtar\fR) to actually recover the files\. .RE .PP \fBamrestore\fR .RS 4 Read an \fIAmanda\fR -tape, searching for requested backups. +tape, searching for requested backups\. \fBAmrestore\fR -is suitable for everything from interactive restores of single files to a full restore of all partitions on a failed disk. +is suitable for everything from interactive restores of single files to a full restore of all partitions on a failed disk\. .RE .PP \fBamfetchdump\fR @@ -180,105 +186,119 @@ is suitable for everything from interactive restores of single files to a full r Performs \fIAmanda\fR tape restoration, similar to -\fBamrestore\fR. Additional capabilities include "hands\-off" searching of multiple tapes, automatic retrieval of specific dump files based on dump logs, and assembly of tape\-spanning split dump files. +\fBamrestore\fR\. Additional capabilities include "hands\-off" searching of multiple tapes, automatic retrieval of specific dump files based on dump logs, and assembly of tape\-spanning split dump files\. .RE .PP \fBamlabel\fR .RS 4 Write an \fIAmanda\fR -format label onto a tape. All +format label onto a tape\. All \fIAmanda\fR tapes must be labeled with -\fBamlabel\fR. +\fBamlabel\fR\. \fBAmdump\fR and \fBamflush\fR -will not write to an unlabeled tape (see TAPE MANAGEMENT below). +will not write to an unlabeled tape (see TAPE MANAGEMENT below)\. .RE .PP \fBamcheck\fR .RS 4 -Verify the correct tape is mounted and all file systems on all backup client systems are ready to be backed up. Often run by +Verify the correct tape is mounted and all file systems on all backup client systems are ready to be backed up\. Often run by \fBcron\fR before \fBamdump\fR -to generate a mail warning that backups might fail unless corrective action is taken. +to generate a mail warning that backups might fail unless corrective action is taken\. .RE .PP \fBamadmin\fR .RS 4 -Take care of administrative tasks like finding out which tapes are needed to restore a filesystem, forcing hosts to do full backups of selected disks and looking at schedule balance information. +Take care of administrative tasks like finding out which tapes are needed to restore a filesystem, forcing hosts to do full backups of selected disks and looking at schedule balance information\. .RE .PP \fBamtape\fR .RS 4 -Take care of tape changer control operations like loading particular tapes, ejecting tapes and scanning the tape storage slots. +Take care of tape changer control operations like loading particular tapes, ejecting tapes and scanning the tape storage slots\. .RE .PP -\fBamverify\fR +\fBamcheckdump\fR .RS 4 -Check +Check the results of an \fIAmanda\fR -backup tapes for errors. +dump\. +.RE +.PP +\fBamserverconfig\fR +.RS 4 +Program to setup initial +\fIAmanda\fR +configuration\. +.RE +.PP +\fBamaddclient\fR +.RS 4 +Program to add client to an existing +\fIAmanda\fR +configuration\. .RE .PP \fBamrmtape\fR .RS 4 Delete a tape from the \fIAmanda\fR -databases. +databases\. .RE .PP \fBamstatus\fR .RS 4 Report the status of a running or completed -\fBamdump\fR. +\fBamdump\fR\. .RE .PP \fBamoverview\fR .RS 4 -Display a chart of hosts and file systems backed up every run. +Display a chart of hosts and file systems backed up every run\. .RE .PP \fBamplot\fR .RS 4 Generate utilization plots of \fIAmanda\fR -runs for performance tuning. +runs for performance tuning\. .RE .PP \fBamreport\fR .RS 4 Generate an \fIAmanda\fR -summary E\-mail report. +summary E\-mail report\. .RE .PP \fBamtoc\fR .RS 4 Generate table of content files for \fIAmanda\fR -tapes. +tapes\. .RE .PP \fBamcheckdb\fR .RS 4 Verify every tape \fIAmanda\fR -knows about is consistent in the database. +knows about is consistent in the database\. .RE .PP \fBamgetconf\fR .RS 4 Look up parameters in the \fIAmanda\fR -configuration file. +configuration file\. .RE .PP \fBamtapetype\fR .RS 4 -Generate a tapetype definition. +Generate a tapetype definition\. .RE .PP \fBamaespipe\fR @@ -293,150 +313,147 @@ Reference encryption program for Amanda symmetric data encryption .SH "CONFIGURATION" .PP There are three user\-editable files that control the behavior of -\fIAmanda\fR. +\fIAmanda\fR\. .PP The first is -\fBamanda.conf\fR, the main configuration file. It contains parameters to customize +\fBamanda\.conf\fR, the main configuration file\. It contains parameters to customize \fIAmanda\fR -for the site. Refer to the +for the site\. Refer to the \fBamanda.conf\fR(5), manpage for details on \fIAmanda\fR -configuration parameters. +configuration parameters\. .PP Second is the \fIdisklist\fR -file, which lists hosts and disk partitions to back up. +file, which lists hosts and disk partitions to back up\. .PP Third is the \fItapelist\fR -file, which lists tapes that are currently active. These files are described in more detail in the following sections. +file, which lists tapes that are currently active\. These files are described in more detail in the following sections\. .PP All files are stored in individual configuration directories under -\fI/usr/local/etc/amanda/\fR. A site will often have more than one configuration. For example, it might have a +\fI/usr/local/etc/amanda/\fR\. A site will often have more than one configuration\. For example, it might have a \fInormal\fR configuration for everyday backups and an \fIarchive\fR -configuration for infrequent full archival backups. The configuration files would be stored under directories +configuration for infrequent full archival backups\. The configuration files would be stored under directories \fI/usr/local/etc/amanda/normal/\fR and -\fI/usr/local/etc/amanda/archive/\fR, respectively. Part of the job of an +\fI/usr/local/etc/amanda/archive/\fR, respectively\. Part of the job of an \fIAmanda\fR -administrator is to create, populate and maintain these directories. +administrator is to create, populate and maintain these directories\. .PP All log and database files generated by \fIAmanda\fR -go in corresponding directories somewhere. The exact location is controlled by entries in -\fBamanda.conf\fR. A typical location would be under -\fI/var/adm/amanda\fR. For the above example, the files might go in +go in corresponding directories somewhere\. The exact location is controlled by entries in +\fBamanda\.conf\fR\. A typical location would be under +\fI/var/adm/amanda\fR\. For the above example, the files might go in \fI/var/adm/amanda/normal/\fR and -\fI/var/adm/amanda/archive/\fR. +\fI/var/adm/amanda/archive/\fR\. .PP As log files are no longer needed (no longer contain relevant information), \fIAmanda\fR -cycles them out in various ways, depending on the type of file. +cycles them out in various ways, depending on the type of file\. .PP Detailed information about \fBamdump\fR runs are stored in files named -\fBamdump.\fR\fINN\fR +\fBamdump\.\fR\fINN\fR where \fINN\fR -is a sequence number, with 1 being the most recent file. +is a sequence number, with 1 being the most recent file\. \fBAmdump\fR rotates these files each run, keeping roughly the last \fBtapecycle\fR -(see below) worth of them. +(see below) worth of them\. .PP The file used by \fBamreport\fR to generate the mail summary is named -\fBlog.\fR\fIYYYYMMDD.NN\fR +\fBlog\.\fR\fIYYYYMMDD\.NN\fR where \fIYYYYMMDD\fR is the datestamp of the start of the \fBamdump\fR run and \fINN\fR -is a sequence number started at 0. At the end of each +is a sequence number started at 0\. At the end of each \fBamdump\fR run, log files for runs whose tapes have been reused are renamed into a subdirectory of the main log directory (see the \fBlogdir\fR parameter below) named -\fBoldlog\fR. It is up to the +\fBoldlog\fR\. It is up to the \fIAmanda\fR -administrator to remove them from this directory when desired. +administrator to remove them from this directory when desired\. .PP Index (backup image catalogue) files older than the full dump matching the oldest backup image for a given client and disk are removed by \fBamdump\fR -at the end of each run. +at the end of each run\. .SH "DISKLIST FILE" .PP The \fIdisklist\fR file determines which disks will be backed up by -\fIAmanda\fR. The file usually contains one line per disk: -.sp -.RS 4 +\fIAmanda\fR\. The file usually contains one line per disk: .nf \fIhostname diskname\fR [\fIdiskdevice\fR] \fIdumptype\fR [\fIspindle\fR [\fIinterface\fR] ] .fi -.RE .PP All pairs [ \fIhostname diskname\fR -] must be unique. +] must be unique\. .PP -Lines starting with # are ignored, as are blank lines. The fields have the following meanings: +Lines starting with # are ignored, as are blank lines\. The fields have the following meanings: .PP \fIhostname\fR .RS 4 -The name of the host to be backed up. If +The name of the host to be backed up\. If \fBdiskdevice\fR refers to a PC share, this is the host \fIAmanda\fR will run the Samba \fBsmbclient\fR -program on to back up the share. +program on to back up the share\. .RE .PP \fIdiskname\fR .RS 4 -The name of the disk (a label). In most case, you set your +The name of the disk (a label)\. In most case, you set your \fBdiskname\fR to the \fBdiskdevice\fR -and you don't set the -\fBdiskdevice.\fR +and you don\'t set the +\fBdiskdevice\.\fR If you want multiple entries with the same \fBdiskdevice\fR, you must set a different \fBdiskname\fR -for each entry. It's the +for each entry\. It\'s the \fBdiskname\fR that you use on the commandline for any \fIAmanda\fR -command. Look at the example/disklist file for example. +command\. Look at the example/disklist file for example\. .RE .PP \fIdiskdevice\fR .RS 4 -Default: same as diskname. The name of the disk device to be backed up. It may be a full device name, a device name without the +Default: same as diskname\. The name of the disk device to be backed up\. It may be a full device name, a device name without the \fI/dev/\fR -prefix, e.g. +prefix, e\.g\. \fIsd0a\fR, or a mount point such as -\fI/usr\fR. +\fI/usr\fR\. .sp -It may also refer to a PC share by starting the name with two (forward) slashes, e.g. -\fI//some\-pc/home\fR. In this case, the +It may also refer to a PC share by starting the name with two (forward) slashes, e\.g\. +\fI//some\-pc/home\fR\. In this case, the \fBprogram\fR option in the associated \fBdumptype\fR must be entered as -\fBGNUTAR\fR. It is the combination of the double slash disk name and +\fBGNUTAR\fR\. It is the combination of the double slash disk name and \fBprogram GNUTAR\fR in the \fBdumptype\fR -that triggers the use of Samba. +that triggers the use of Samba\. .RE .PP \fIdumptype\fR @@ -444,26 +461,26 @@ that triggers the use of Samba. Refers to a \fBdumptype\fR defined in the -\fBamanda.conf\fR -file. +\fBamanda\.conf\fR +file\. \fIDumptype\fRs specify backup related parameters, such as whether to compress the backups, whether to record backup results in -\fI/etc/dumpdates\fR, the disk's relative priority, etc. +\fI/etc/dumpdates\fR, the disk\'s relative priority, etc\. .RE .PP \fIspindle\fR .RS 4 Default: -\fB\-1\fR. A number used to balance backup load on a host. +\fB\-1\fR\. A number used to balance backup load on a host\. \fIAmanda\fR -will not run multiple backups at the same time on the same spindle, unless the spindle number is \-1, which means there is no spindle restriction. +will not run multiple backups at the same time on the same spindle, unless the spindle number is \-1, which means there is no spindle restriction\. .RE .PP \fIinterface\fR .RS 4 Default: -\fIlocal\fR. The name of a network interface definition in the -\fBamanda.conf\fR -file, used to balance network load. +\fIlocal\fR\. The name of a network interface definition in the +\fBamanda\.conf\fR +file, used to balance network load\. .RE .PP Instead of naming a @@ -472,41 +489,36 @@ Instead of naming a options within curly braces, one per line, just like a \fBdumptype\fR definition in -\fBamanda.conf\fR. Since pre\-existing +\fBamanda\.conf\fR\. Since pre\-existing \fBdumptype\fRs are valid option names, this syntax may be used to customize -\fBdumptype\fRs for particular disks. +\fBdumptype\fRs for particular disks\. .PP A line break \fBmust\fR -follow the left curly bracket. +follow the left curly bracket\. .PP For instance, if a \fBdumptype\fR named \fInormal\fR is used for most disks, but use of the holding disk needs to be disabled for the file system that holds it, this would work instead of defining a new dumptype: -.sp -.RS 4 .nf \fIhostname diskname\fR [ \fIdiskdevice\fR ] { normal holdingdisk never } [ \fIspindle\fR [ \fIinterface\fR ] ] .fi -.RE .SH "TAPE MANAGEMENT" .PP The \fItapelist\fR -file contains the list of tapes in active use. This file is maintained entirely by +file contains the list of tapes in active use\. This file is maintained entirely by \fIAmanda\fR -and should not be created or edited during normal operation. It contains lines of the form: +and should not be created or edited during normal operation\. It contains lines of the form: .PP -.RS 4 .nf YYYYMMDD label flags .fi -.RE .PP Where \fIYYYYMMDD\fR @@ -521,16 +533,16 @@ tell whether the tape may be reused, etc (see the \fBreuse\fR options of -\fBamadmin\fR). +\fBamadmin\fR)\. .PP \fBAmdump\fR and \fBamflush\fR -will refuse to write to an unlabeled tape, or to a labeled tape that is considered active. There must be more tapes in active rotation (see the +will refuse to write to an unlabeled tape, or to a labeled tape that is considered active\. There must be more tapes in active rotation (see the \fBtapecycle\fR option) than there are runs in the backup cycle (see the \fBdumpcycle\fR -option) to prevent overwriting a backup image that would be needed to do a full recovery. +option) to prevent overwriting a backup image that would be needed to do a full recovery\. .SH "OUTPUT DRIVERS" .PP The normal value for the @@ -540,10 +552,10 @@ parameter, or for what a tape changer returns, is a full path name to a non\-rew or \fI/dev/rmt/0mn\fR or -\fI/dev/nst0.1\fR -or whatever conventions the operating system uses. +\fI/dev/nst0\.1\fR +or whatever conventions the operating system uses\. \fIAmanda\fR -provides additional application level drivers that support non\-traditional tape\-simulations or features. To access a specific output driver, set +provides additional application level drivers that support non\-traditional tape\-simulations or features\. To access a specific output driver, set \fBtapedev\fR (or configure your changer to return) a string of the form \fIdriver\fR:\fIdriver\-info\fR @@ -551,62 +563,55 @@ where \fIdriver\fR is one of the supported drivers and \fIdriver\-info\fR -is optional additional information needed by the driver. +is optional additional information needed by the driver\. .PP The supported drivers are: .PP \fItape\fR .RS 4 -This is the default driver. The +This is the default driver\. The \fIdriver\-info\fR -is the tape device name. Entering +is the tape device name\. Entering .sp -.RS 4 .nf tapedev /dev/rmt/0mn .fi -.RE -.sp is really a short hand for .sp -.RS 4 .nf tapedev tape:/dev/rmt/0mn .fi .RE -.RE .PP \fInull\fR .RS 4 This driver throws away anything written to it and returns EOF for any reads except a special case is made for reading a label, in which case a "fake" value is returned that \fIAmanda\fR checks for and allows through regardless of what you have set in -\fBlabelstr\fR. The +\fBlabelstr\fR\. The \fIdriver\-info\fR field is not used and may be left blank: .sp .sp -.RS 4 .nf tapedev null: .fi -.RE .sp The \fIlength\fR value from the associated \fBtapetype\fR -is used to limit the amount of data written. When the limit is reached, the driver will simulate end of tape. +is used to limit the amount of data written\. When the limit is reached, the driver will simulate end of tape\. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR +Note This driver should only be used for debugging and testing, and probably only with the \fBrecord\fR option set to -\fIno\fR. +\fIno\fR\. .RE .PP \fIrait\fR @@ -614,18 +619,16 @@ option set to \fIR\fRedundant \fIA\fRrray of \fII\fRnexpensive (?) -\fIT\fRapes. Reads and writes tapes mounted on multiple drives by spreading the data across N\-1 drives and using the last drive for a checksum. See docs/RAIT for more information. +\fIT\fRapes\. Reads and writes tapes mounted on multiple drives by spreading the data across N\-1 drives and using the last drive for a checksum\. See docs/RAIT for more information\. .sp The \fIdriver\-info\fR -field describes the devices to use. Curly braces indicate multiple replacements in the string. For instance: +field describes the devices to use\. Curly braces indicate multiple replacements in the string\. For instance: .sp .sp -.RS 4 .nf tapedev rait:/dev/rmt/tps0d{4,5,6}n .fi -.RE .sp would use the following devices: .sp @@ -636,49 +639,49 @@ would use the following devices: .PP \fIfile\fR .RS 4 -This driver emulates a tape device with a set of files in a directory. The +This driver emulates a tape device with a set of files in a directory\. The \fIdriver\-info\fR -field must be the name of an existing directory. The driver will test for a subdirectory of that named +field must be the name of an existing directory\. The driver will test for a subdirectory of that named \fIdata\fR and return \fBoffline\fR -until it is present. When present, the driver uses two files in the +until it is present\. When present, the driver uses two files in the \fIdata\fR -subdirectory for each tape file. One contains the actual data. The other contains record length information. +subdirectory for each tape file\. One contains the actual data\. The other contains record length information\. .sp The driver uses a file named \fIstatus\fR in the \fBfile\fR -device directory to hold driver status information, such as tape position. If not present, the driver will create it as though the device is rewound. +device directory to hold driver status information, such as tape position\. If not present, the driver will create it as though the device is rewound\. .sp The \fIlength\fR value from the associated \fBtapetype\fR -is used to limit the amount of data written. When the limit is reached, the driver will simulate end of tape. +is used to limit the amount of data written\. When the limit is reached, the driver will simulate end of tape\. .sp One way to use this driver with a real device such as a CD\-writer is to create a directory for the \fBfile\fR -device and one or more other directories for the actual data. Create a symlink named +device and one or more other directories for the actual data\. Create a symlink named \fIdata\fR in the \fBfile\fR -directory to one of the data directories. Set the +directory to one of the data directories\. Set the \fBtapetype\fR -length to whatever the medium will hold. +length to whatever the medium will hold\. .sp When \fIAmanda\fR fills the \fBfile\fR -device, remove the symlink and (optionally) create a new symlink to another data area. Use a CD writer software package to burn the image from the first data area. +device, remove the symlink and (optionally) create a new symlink to another data area\. Use a CD writer software package to burn the image from the first data area\. .sp To read the CD, mount it and create the \fIdata\fR symlink in the \fBfile\fR -device directory. +device directory\. .RE .SH "AUTHORIZATION" .PP @@ -686,37 +689,37 @@ device directory. processes on the tape server host run as the \fBdumpuser\fR user listed in -\fBamanda.conf\fR. When they connect to a backup client, they do so with an -\fIAmanda\fR\-specific protocol. They do not, for instance, use +\fBamanda\.conf\fR\. When they connect to a backup client, they do so with an +\fIAmanda\fR\-specific protocol\. They do not, for instance, use \fBrsh\fR or \fBssh\fR -directly. +directly\. .PP On the client side, the \fBamandad\fR daemon validates the connection using one of several methods, depending on how it was compiled and on options it is passed: .PP -\&.rhosts +\.rhosts .RS 4 Even though \fIAmanda\fR does not use \fBrsh\fR, it can use -\fB.rhosts\fR\-style authentication and a -\fB.rhosts\fR -file. +\fB\.rhosts\fR\-style authentication and a +\fB\.rhosts\fR +file\. .RE .PP -\&.amandahosts +\.amandahosts .RS 4 This is essentially the same as -\fB.rhosts\fR -authentication except a different file, with almost the same format, is used. This is the default mechanism built into -\fIAmanda\fR. +\fB\.rhosts\fR +authentication except a different file, with almost the same format, is used\. This is the default mechanism built into +\fIAmanda\fR\. .sp The format of the -\fI.amandahosts\fR +\fI\.amandahosts\fR file is: .sp \fIhostname\fR @@ -729,11 +732,11 @@ file is: If \fIusername\fR is ommitted, it defaults to the user running -\fBamandad\fR, i.e. the user listed in the +\fBamandad\fR, i\.e\. the user listed in the \fBinetd\fR or \fBxinetd\fR -configuration file. +configuration file\. .sp The \fIservice\fR @@ -744,7 +747,7 @@ is a list of the service the client is authorized to execute: \fBsendsize\fR, \fBsendbackup\fR, \fBamindexd\fR, -\fBamidxtaped\fR. +\fBamidxtaped\fR\. \fBamdump\fR is a shortcut for "noop selfcheck sendsize sendbackup" .RE @@ -752,39 +755,36 @@ is a shortcut for "noop selfcheck sendsize sendbackup" Kerberos .RS 4 \fIAmanda\fR -may use the Kerberos authentication system. Further information is in the +may use the Kerberos authentication system\. Further information is in the \fBdocs/KERBEROS\fR file that comes with an \fIAmanda\fR -distribution. +distribution\. .sp For Samba access, \fIAmanda\fR needs a file on the Samba server (which may or may not also be the tape server) named \fI/etc/amandapass\fR -with share names, (clear text) passwords and (optional) domain names, in that order, one per line, whitespace separated. By default, the user used to connect to the PC is the same for all PC's and is compiled into -\fIAmanda\fR. It may be changed on a host by host basis by listing it first in the password field followed by a percent sign and then the password. For instance: -.sp -.RS 4 +with share names, (clear text) passwords and (optional) domain names, in that order, one per line, whitespace separated\. By default, the user used to connect to the PC is the same for all PC\'s and is compiled into +\fIAmanda\fR\. It may be changed on a host by host basis by listing it first in the password field followed by a percent sign and then the password\. For instance: .nf //some\-pc/home normalpw //another\-pc/disk otheruser%otherpw .fi -.RE -With clear text passwords, this file should obviously be tightly protected. It only needs to be readable by the -\fIAmanda\fR\-user on the Samba server. +With clear text passwords, this file should obviously be tightly protected\. It only needs to be readable by the +\fIAmanda\fR\-user on the Samba server\. .sp You can find further information in the \fBdocs/SAMBA\fR file that comes with an \fIAmanda\fR -distribution. +distribution\. .RE .SH "HOST & DISK EXPRESSION" .PP -All host and disk arguments to programs are special expressions. The command applies to all disks that match your arguments. This section describes the matcher. +All host and disk arguments to programs are special expressions\. The command applies to all disks that match your arguments\. This section describes the matcher\. .PP -The matcher matches by word, each word is a glob expression, words are separated by the separator '.' for host and '/' for disk. You can anchor the expression at left with a '^'. You can anchor the expression at right with a '$'. The matcher is case insensitive for host but is case sensitive for disk. A match succeeds if all words in your expression match contiguous words in the host or disk. +The matcher matches by word, each word is a glob expression, words are separated by the separator \'\.\' for host and \'/\' for disk\. You can anchor the expression at left with a \'^\'\. You can anchor the expression at right with a \'$\'\. The matcher is case insensitive for host but is case sensitive for disk\. A match succeeds if all words in your expression match contiguous words in the host or disk\. .TS tab(:); l l @@ -795,7 +795,7 @@ l l l l l l. T{ -\&. +\. T}:T{ word separator for a host T} @@ -830,7 +830,6 @@ T}:T{ match zero or more characters including the separator T} .TE -.sp .PP Some examples: .TS @@ -862,130 +861,130 @@ T}:T{ WILL NOT MATCH T} T{ -\ +hosta T}:T{ -ho.aina.org +hosta T}:T{ -\ +hostb T} T{ -^hosta +\ T}:T{ -hosta +hoSTA\.dOMAIna\.ORG T}:T{ -foo.hosta.org +\ T} T{ -sda* +\ T}:T{ -/dev/sda1 +foo\.hosta\.org T}:T{ \ T} T{ -\ +host T}:T{ -/dev/sda12 +host T}:T{ -\ +hosta T} T{ -/opt +host? T}:T{ -opt (disk) +hosta T}:T{ -opt (host) +host T} T{ -\&.opt. +\ T}:T{ -opt (host) +hostb T}:T{ -opt (disk) +\ T} T{ -/ +ho*na T}:T{ -/ +hoina T}:T{ -any other disk +ho\.aina\.org T} T{ -/usr +ho**na T}:T{ -/usr +hoina T}:T{ \ T} T{ \ T}:T{ -/usr/opt +ho\.aina\.org T}:T{ \ T} T{ -/usr$ +^hosta T}:T{ -/usr +hosta T}:T{ -/usr/opt +foo\.hosta\.org T} T{ -hosta +sda* T}:T{ -hosta +/dev/sda1 T}:T{ -hostb +\ T} T{ \ T}:T{ -hoSTA.dOMAIna.ORG +/dev/sda12 T}:T{ \ T} T{ -\ +/opt T}:T{ -foo.hosta.org +opt (disk) T}:T{ -\ +opt (host) T} T{ -host +\.opt\. T}:T{ -host +opt (host) T}:T{ -hosta +opt (disk) T} T{ -host? +/ T}:T{ -hosta +/ T}:T{ -host +any other disk T} T{ -\ +/usr T}:T{ -hostb +/usr T}:T{ \ T} T{ -ho*na +\ T}:T{ -hoina +/usr/opt T}:T{ -ho.aina.org +\ T} T{ -ho**na +/usr$ T}:T{ -hoina +/usr T}:T{ -\ +/usr/opt T} .TE .sp @@ -993,7 +992,7 @@ T} .PP A \fIdatestamp\fR -expression is a range expression where we only match the prefix. Leading ^ is removed. Trailing $ forces an exact match. +expression is a range expression where we only match the prefix\. Leading ^ is removed\. Trailing $ forces an exact match\. .TS allbox tab(:); l l @@ -1039,12 +1038,11 @@ T}:T{ match only 200010 T} .TE -.sp .PP .SH "DUMP SPECIFICATIONS" .PP -A dump specification selects one or more dumps. It has the form -\fI[host][:disk][@datestamp]\fR, where each component is a pattern as described above. If a component is missing, it is treated as a wildcard. The characters ':', '@', and '\e' may be escaped within any component by preceding them with a '\e'. +A dump specification selects one or more dumps\. It has the form +\fI[host][:disk][@datestamp]\fR, where each component is a pattern as described above\. If a component is missing, it is treated as a wildcard\. The characters \':\', \'@\', and \'\e\' may be escaped within any component by preceding them with a \'\e\'\. .PP Some examples: .TS @@ -1089,32 +1087,56 @@ T} .sp .SH "CONFIGURATION OVERRIDE" .PP -Most command allow to overwrite any configuration parameter on the command line with the \-o option. +Most commands allow the override of specific configuration options on the command line, using the +\-o +option\. This option has the form +\-o\fIname\fR=\fIvalue\fR\. An optional space is allowed after the +\-o\. Each configuration option should be specified in a separate command\-line option\. .PP -\-o NAME=value -.PP -eg. \-o runtapes=2 -.PP -eg. \-o DUMPTYPE:no\-compress:compress="server fast" -.PP -eg. \-o TAPETYPE:HP\-DAT:length=2000m +For global options, +\fIname\fR +is simply the name of the option, e\.g\., +.sp +.nf +amdump \-oruntapes=2 +.fi +For options in a named section of the configuration, +\fIname\fR +has the form +\fISECTION\fR:\fIsection_name\fR:\fIname\fR, where +\fISECTION\fR +is one of TAPETYPE, DUMPTYPE, HOLDINGDISK, or INTERFACE, and +\fIsection_name\fR +is the name of the tapetype, dumptype, holdingdisk, or interface\. Examples: +.sp +.nf +amdump \-o TAPETYPE:HP\-DAT:length=2000m +amdump \-o DUMPTYPE:no\-compress:compress="server fast" +amdump \-o HOLDINGDISK:hd1:use="\-100 mb" +amdump \-o INTERFACE:local:use="2000 kbps" +.fi .PP -eg. \-o INTERFACE:local:use="2000 kbps" +Note that configuration overrides are not effective for tape changers, which supply a tapedev based on their own configuration\. In order to override +\fItapedev\fR, you must also disable any changer: +.sp +.nf +amdump \-otapedev=/dev/nst1 \-otpchanger=\'\' +.fi .SH "AUTHOR" .PP James da Silva, - + : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion, major update .SH "SEE ALSO" .PP \fBamadmin\fR(8), \fBamanda.conf\fR(5), -\fBamanda\-client.conf\fR(5), +\fBamanda-client.conf\fR(5), \fBamcheck\fR(8), \fBamcheckdb\fR(8), \fBamcleanup\fR(8), @@ -1135,5 +1157,7 @@ Stefan G. Weichinger, \fBamtape\fR(8), \fBamtapetype\fR(8), \fBamtoc\fR(8), -\fBamverify\fR(8), -\fBamverifyrun\fR(8) +\fBamcheckdump\fR(8), +\fBamserverconfig\fR(8), +\fBamaddclient\fR(8), +: http://wiki.zmanda.com diff --git a/man/amanda.conf.5 b/man/amanda.conf.5 index 2064aaf..31e7d46 100644 --- a/man/amanda.conf.5 +++ b/man/amanda.conf.5 @@ -1,102 +1,102 @@ .\" Title: amanda.conf .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMANDA.CONF" "5" "06/06/2007" "" "" +.TH "AMANDA\.CONF" "5" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amanda.conf \- Main configuration file for Amanda, the Advanced Maryland Automatic Network Disk Archiver +amanda.conf - Main configuration file for Amanda, the Advanced Maryland Automatic Network Disk Archiver .SH "DESCRIPTION" .PP -\fIamanda.conf\fR +\fIamanda\.conf\fR is the main configuration file for -\fIAmanda\fR. This manpage lists the relevant sections and parameters of this file for quick reference. +\fIAmanda\fR\. This manpage lists the relevant sections and parameters of this file for quick reference\. .PP The file -\fB//amanda.conf\fR -is loaded. +\fB//amanda\.conf\fR +is loaded\. .SH "PARAMETERS" .PP There are a number of configuration parameters that control the behavior of the \fIAmanda\fR -programs. All have default values, so you need not specify the parameter in -\fBamanda.conf\fR -if the default is suitable. +programs\. All have default values, so you need not specify the parameter in +\fBamanda\.conf\fR +if the default is suitable\. .PP -Lines starting with # are ignored, as are blank lines. Comments may be placed on a line with a directive by starting the comment with a #. The remainder of the line is ignored. +Lines starting with # are ignored, as are blank lines\. Comments may be placed on a line with a directive by starting the comment with a #\. The remainder of the line is ignored\. .PP -Keywords are case insensitive, i.e. +Keywords are case insensitive, i\.e\. \fBmailto\fR and \fBMailTo\fR -are treated the same. +are treated the same\. .PP Integer arguments may have one of the following (case insensitive) suffixes, some of which have a multiplier effect: .SS "POSSIBLE SUFFIXES" .PP \fBb byte bytes\fR .RS 4 -Some number of bytes. +Some number of bytes\. .RE .PP \fBbps\fR .RS 4 -Some number of bytes per second. +Some number of bytes per second\. .RE .PP \fBk kb kbyte kbytes kilobyte kilobytes\fR .RS 4 -Some number of kilobytes (bytes*1024). +Some number of kilobytes (bytes*1024)\. .RE .PP \fBkps kbps\fR .RS 4 -Some number of kilobytes per second (bytes*1024). +Some number of kilobytes per second (bytes*1024)\. .RE .PP \fBm mb meg mbyte mbytes megabyte megabytes\fR .RS 4 -Some number of megabytes (bytes*1024*1024). +Some number of megabytes (bytes*1024*1024)\. .RE .PP \fBmps mbps\fR .RS 4 -Some number of megabytes per second (bytes*1024*1024). +Some number of megabytes per second (bytes*1024*1024)\. .RE .PP \fBg gb gbyte gbytes gigabyte gigabytes\fR .RS 4 -Some number of gigabytes (bytes*1024*1024*1024). +Some number of gigabytes (bytes*1024*1024*1024)\. .RE .PP \fBtape tapes\fR .RS 4 -Some number of tapes. +Some number of tapes\. .RE .PP \fBday days\fR .RS 4 -Some number of days. +Some number of days\. .RE .PP \fBweek weeks\fR .RS 4 -Some number of weeks (days*7). +Some number of weeks (days*7)\. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR +Note The value \fBinf\fR -may be used in most places where an integer is expected to mean an infinite amount. +may be used in most places where an integer is expected to mean an infinite amount\. .sp Boolean arguments may have any of the values \fBy\fR, @@ -112,138 +112,135 @@ to indicate a true state, or \fBfalse\fR or \fBoff\fR -to indicate a false state. If no argument is given, +to indicate a false state\. If no argument is given, \fBtrue\fR -is assumed. +is assumed\. .RE .SS "PARAMETERS" .PP \fBorg\fR \fI string\fR .RS 4 Default: -\fIdaily\fR. A descriptive name for the configuration. This string appears in the Subject line of mail reports. Each +\fIdaily\fR\. A descriptive name for the configuration\. This string appears in the Subject line of mail reports\. Each \fIAmanda\fR -configuration should have a different string to keep mail reports distinct. +configuration should have a different string to keep mail reports distinct\. .RE .PP \fBmailto\fR \fI string\fR .RS 4 Default: -\fIoperators\fR. A space separated list of recipients for mail reports. +\fIoperators\fR\. A space separated list of recipients for mail reports\. .RE .PP \fBdumpcycle\fR \fI int\fR .RS 4 Default: -\fI10 days\fR. The number of days in the backup cycle. Each disk will get a full backup at least this often. Setting this to zero tries to do a full backup each run. +\fI10 days\fR\. The number of days in the backup cycle\. Each disk will get a full backup at least this often\. Setting this to zero tries to do a full backup each run\. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR +Note This parameter may also be set in a specific \fBdumptype\fR -(see below). This value sets the default for all +(see below)\. This value sets the default for all \fBdumptype\fRs so must appear in -\fBamanda.conf\fR +\fBamanda\.conf\fR before any -\fBdumptype\fRs are defined. +\fBdumptype\fRs are defined\. .RE .PP \fBrunspercycle\fR \fI int\fR .RS 4 Default: -\fIsame as dumpcycle\fR. The number of amdump runs in +\fIsame as dumpcycle\fR\. The number of amdump runs in \fBdumpcycle\fR -days. A value of 0 means the same value as -\fBdumpcycle\fR. A value of \-1 means guess the number of runs from the +days\. A value of 0 means the same value as +\fBdumpcycle\fR\. A value of \-1 means guess the number of runs from the \fItapelist\fR file, which is the number of tapes used in the last \fBdumpcycle\fR days / -\fBruntapes\fR. +\fBruntapes\fR\. .RE .PP \fBtapecycle\fR \fI int\fR .RS 4 Default: -\fI15 tapes\fR. Typically tapes are used by +\fI15 tapes\fR\. Typically tapes are used by \fIAmanda\fR -in an ordered rotation. The +in an ordered rotation\. The \fBtapecycle\fR -parameter defines the size of that rotation. The number of tapes in rotation must be larger than the number of tapes required for a complete dump cycle (see the +parameter defines the size of that rotation\. The number of tapes in rotation must be larger than the number of tapes required for a complete dump cycle (see the \fBdumpcycle\fR -parameter). +parameter)\. .sp This is calculated by multiplying the number of \fBamdump\fR runs per dump cycle (\fBrunspercycle\fR parameter) times the number of tapes used per run (\fBruntapes\fR -parameter). Typically two to four times this calculated number of tapes are in rotation. While +parameter)\. Typically two to four times this calculated number of tapes are in rotation\. While \fIAmanda\fR -is always willing to use a new tape in its rotation, it refuses to reuse a tape until at least '\fBtapecycle\fR -\-1' number of other tapes have been used. +is always willing to use a new tape in its rotation, it refuses to reuse a tape until at least \'\fBtapecycle\fR +\-1\' number of other tapes have been used\. .sp It is considered good administrative practice to set the \fBtapecycle\fR -parameter slightly lower than the actual number of tapes in rotation. This allows the administrator to more easily cope with damaged or misplaced tapes or schedule adjustments that call for slight adjustments in the rotation order. +parameter slightly lower than the actual number of tapes in rotation\. This allows the administrator to more easily cope with damaged or misplaced tapes or schedule adjustments that call for slight adjustments in the rotation order\. .RE .PP \fBusetimestamps\fR \fI bool\fR .RS 4 Default: -\fBNo\fR. By default, Amanda can only track at most one run per calendar day. When this option is enabled, however, Amanda can track as many runs as you care to make. -.sp - -\fBWARNING\fR: This option is not backward\-compatible. Do not enable it if you intend to downgrade your server installation to Amanda community edition 2.5.0 +\fBYes\fR\. This option allows Amanda to track multiple runs per calendar day\. The only reason one might disable it is that Amanda versions before 2\.5\.1 can\'t read logfiles written when this option was enabled\. .RE .PP \fBlabel_new_tapes\fR \fI string\fR .RS 4 -Default: not set. When set, this directive will cause +Default: not set\. When set, this directive will cause \fIAmanda\fR to automatically write an \fIAmanda\fR -tape label to any blank tape she encounters. This option is DANGEROUS because when set, +tape label to any blank tape she encounters\. This option is DANGEROUS because when set, \fIAmanda\fR will ERASE any non\-\fIAmanda\fR -tapes you may have, and may also ERASE any near\-failing tapes. Use with caution. +tapes you may have, and may also ERASE any near\-failing tapes\. Use with caution\. .sp -When using this directive, specify the template for new tape labels. The template should contain some number of contiguous '%' characters, which will be replaced with a generated number. Be sure to specify enough '%' characters that you do not run out of tape labels. Example: +When using this directive, specify the template for new tape labels\. The template should contain some number of contiguous \'%\' characters, which will be replaced with a generated number\. Be sure to specify enough \'%\' characters that you do not run out of tape labels\. Example: \fBlabel_new_tapes "DailySet1\-%%%"\fR .RE .PP \fBdumpuser\fR \fI string\fR .RS 4 Default: -\fIamanda\fR. The login name +\fIamanda\fR\. The login name \fIAmanda\fR -uses to run the backups. The backup client hosts must allow access from the tape server host as this user via -\fB.rhosts\fR +uses to run the backups\. The backup client hosts must allow access from the tape server host as this user via +\fB\.rhosts\fR or -\fB.amandahosts\fR, depending on how the +\fB\.amandahosts\fR, depending on how the \fIAmanda\fR -software was built. +software was built\. .RE .PP \fBprinter\fR string .RS 4 -Printer to use when doing tape labels. See the +Printer to use when doing tape labels\. See the \fBlbl\-templ\fR \fBtapetype\fR -option. +option\. .RE .PP \fBtapedev\fR string .RS 4 Default: -\fInull:\fR. The path name of the non\-rewinding tape device. Non\-rewinding tape device names often have an 'n' in the name, e.g. -\fI/dev/rmt/0mn\fR, however this is operating system specific and you should consult that documentation for detailed naming information. +\fInull:\fR\. The path name of the non\-rewinding tape device\. Non\-rewinding tape device names often have an \'n\' in the name, e\.g\. +\fI/dev/rmt/0mn\fR, however this is operating system specific and you should consult that documentation for detailed naming information\. .sp If a tape changer is configured (see the \fBtpchanger\fR -option), this option might not be used. +option), this option might not be used\. .sp If the \fBnull\fR @@ -251,129 +248,138 @@ output driver is selected (see the section OUTPUT DRIVERS in the \fBamanda\fR(8) manpage for more information), programs such as \fBamdump\fR -will run normally but all images will be thrown away. This should only be used for debugging and testing, and probably only with the +will run normally but all images will be thrown away\. This should only be used for debugging and testing, and probably only with the \fBrecord\fR option set to -\fIno\fR. +\fIno\fR\. .RE .PP -\fBrawtapedev\fR string +\fBdevice_property\fR string string .RS 4 -Default: -\fInull:\fR. The path name of the raw tape device. This is only used if -\fIAmanda\fR -is compiled for Linux machines with floppy tapes and is needed for QIC volume table operations. +These options can set various device properties, including block size, maximum volume usage, authentication information, hardware feature support, and more\.Specifics of how properties are used are device\-dependent, though some common properties are supported across multiple device drivers\. +.sp +Both strings are quoted; the first string contains the name of the property to set, and the second contains its value\. For example, to set a fixed block size of 128k, do: +.nf +device_property "BLOCK_SIZE" "131072".fi +.sp +The order in which device properties are set is as follows: +.sp +.RS 4 +\h'-04' 1.\h'+02'Tapetype parameters, including length, blocksize, readblocksize, file\-pad, are translated into device properties and set accordingly\. +.RE +.sp +.RS 4 +\h'-04' 2.\h'+02'Device properties from any device_property configuration directives are set, in the order they appear in the configuration file\. +.RE .RE .PP \fBtpchanger\fR string .RS 4 Default: -\fInone\fR. The name of the tape changer. If a tape changer is not configured, this option is not used and should be commented out of the configuration file. +\fInone\fR\. The name of the tape changer\. If a tape changer is not configured, this option is not used and should be commented out of the configuration file\. .sp -If a tape changer is configured, choose one of the changer scripts (e.g. -\fBchg\-scsi\fR) and enter that here. +If a tape changer is configured, choose one of the changer scripts (e\.g\. +\fBchg\-scsi\fR) and enter that here\. .RE .PP \fBchangerdev\fR string .RS 4 Default: -\fI/dev/null\fR. A tape changer configuration parameter. Usage depends on the particular changer defined with the +\fI/dev/null\fR\. A tape changer configuration parameter\. Usage depends on the particular changer defined with the \fBtpchanger\fR -option. +option\. .RE .PP \fBchangerfile\fR string .RS 4 Default: -\fI/usr/adm/amanda/log/changer\-status\fR. A tape changer configuration parameter. Usage depends on the particular changer defined with the +\fI/usr/adm/amanda/log/changer\-status\fR\. A tape changer configuration parameter\. Usage depends on the particular changer defined with the \fBtpchanger\fR -option. +option\. .RE .PP \fBruntapes\fR int .RS 4 Default: -1. The maximum number of tapes used in a single run. If a tape changer is not configured, this option is not used and should be commented out of the configuration file. +1\. The maximum number of tapes used in a single run\. If a tape changer is not configured, this option is not used and should be commented out of the configuration file\. .sp If a tape changer is configured, this may be set larger than one to let \fIAmanda\fR -write to more than one tape. +write to more than one tape\. .sp Note that this is an upper bound on the number of tapes, and \fIAmanda\fR -may use less. +may use less\. .sp Also note that as of this release, \fIAmanda\fR -does not support true tape overflow. When it reaches the end of one tape, the backup image +does not support true tape overflow\. When it reaches the end of one tape, the backup image \fIAmanda\fR -was processing starts over again on the next tape. +was processing starts over again on the next tape\. .RE .PP \fBmaxdumpsize\fR int .RS 4 Default: -\fIruntapes\fR*\fItape_length\fR. Maximum number of bytes the planner will schedule for a run. +\fIruntapes\fR*\fItape_length\fR\. Maximum number of bytes the planner will schedule for a run\. .RE .PP \fBtaperalgo\fR [first|firstfit|largest|largestfit|smallest|last] .RS 4 Default: -\fIfirst\fR. The algorithm used to choose which dump image to send to the taper. -.RS 4 +\fIfirst\fR\. The algorithm used to choose which dump image to send to the taper\. .PP \fBfirst\fR .RS 4 -First in, first out. +First in, first out\. .RE .PP \fBfirstfit\fR .RS 4 -The first dump image that will fit on the current tape. +The first dump image that will fit on the current tape\. .RE .PP \fBlargest\fR .RS 4 -The largest dump image. +The largest dump image\. .RE .PP \fBlargestfit\fR .RS 4 -The largest dump image that will fit on the current tape. +The largest dump image that will fit on the current tape\. .RE .PP \fBsmallest\fR .RS 4 -The smallest dump image. +The smallest dump image\. .RE .PP \fBlast\fR .RS 4 -Last in, first out. -.RE +Last in, first out\. .RE .RE .PP \fBlabelstr\fR \fI string\fR .RS 4 Default: -\fI.*\fR. The tape label constraint regular expression. All tape labels generated (see -\fBamlabel\fR(8)) and used by this configuration must match the regular expression. If multiple configurations are run from the same tape server host, it is helpful to set their labels to different strings (for example, "DAILY[0\-9][0\-9]*" vs. "ARCHIVE[0\-9][0\-9]*") to avoid overwriting each other's tapes. +\fI\.*\fR\. The tape label constraint regular expression\. All tape labels generated (see +\fBamlabel\fR(8)) and used by this configuration must match the regular expression\. If multiple configurations are run from the same tape server host, it is helpful to set their labels to different strings (for example, "DAILY[0\-9][0\-9]*" vs\. "ARCHIVE[0\-9][0\-9]*") to avoid overwriting each other\'s tapes\. .RE .PP \fBtapetype\fR \fI string\fR .RS 4 Default: -\fIEXABYTE\fR. The type of tape drive associated with +\fIEXABYTE\fR\. The type of tape drive associated with \fBtapedev\fR or -\fBtpchanger\fR. This refers to one of the defined +\fBtpchanger\fR\. This refers to one of the defined \fBtapetype\fRs in the config file (see below), which specify various tape parameters, like the \fBlength\fR, \fBfilemark\fR size, and \fBspeed\fR -of the tape media and device. +of the tape media and device\. .sp First character of a \fBtapetype\fR @@ -383,76 +389,75 @@ string must be an alphabetic character \fBctimeout\fR int .RS 4 Default: -\fI30 seconds\fR. Maximum amount of time that +\fI30 seconds\fR\. Maximum amount of time that \fBamcheck\fR -will wait for each client host. +will wait for each client host\. .RE .PP \fBdtimeout\fR int .RS 4 Default: -\fI1800 seconds\fR. Amount of idle time per disk on a given client that a +\fI1800 seconds\fR\. Amount of idle time per disk on a given client that a \fBdumper\fR running from within \fBamdump\fR -will wait before it fails with a data timeout error. +will wait before it fails with a data timeout error\. .RE .PP \fBetimeout\fR int .RS 4 Default: -\fI300 seconds\fR. Amount of time per disk on a given client that the +\fI300 seconds\fR\. Amount of time per estimate on a given client that the \fBplanner\fR step of \fBamdump\fR -will wait to get the dump size estimates. For instance, with the default of 300 seconds and four disks on client A, +will wait to get the dump size estimates (note: Amanda runs up to 3 estimates for each DLE)\. For instance, with the default of 300 seconds and four DLE\'s, each estimating level 0 and level 1 on client A, \fBplanner\fR -will wait up to 20 minutes for that machine. A negative value will be interpreted as a total amount of time to wait per client instead of per disk. +will wait up to 40 minutes for that machine\. A negative value will be interpreted as a total amount of time to wait per client instead of per disk\. .RE .PP \fBconnect_tries\fR int .RS 4 Default: -\fI3\fR. How many times the server will try a connection. +\fI3\fR\. How many times the server will try a connection\. .RE .PP \fBreq_tries\fR int .RS 4 Default: -\fI3\fR. How many times the server will resend a REQ packet if it doesn't get the ACK packet. +\fI3\fR\. How many times the server will resend a REQ packet if it doesn\'t get the ACK packet\. .RE .PP \fBnetusage\fR int .RS 4 Default: -\fI300 Kbps\fR. The maximum network bandwidth allocated to -\fIAmanda\fR, in Kbytes per second. See also the +\fI8000 Kbps\fR\. The maximum network bandwidth allocated to +\fIAmanda\fR, in Kbytes per second\. See also the \fBinterface\fR -section. +section\. .RE .PP \fBinparallel\fR int .RS 4 Default: -10. The maximum number of backups that +10\. The maximum number of backups that \fIAmanda\fR -will attempt to run in parallel. +will attempt to run in parallel\. \fIAmanda\fR -will stay within the constraints of network bandwidth and holding disk space available, so it doesn't hurt to set this number a bit high. Some contention can occur with larger numbers of backups, but this effect is relatively small on most systems. +will stay within the constraints of network bandwidth and holding disk space available, so it doesn\'t hurt to set this number a bit high\. Some contention can occur with larger numbers of backups, but this effect is relatively small on most systems\. .RE .PP \fBdisplayunit\fR "k|m|g|t" .RS 4 Default: -"k". The unit used to print many numbers, k=kilo, m=mega, g=giga, t=tera. +"k"\. The unit used to print many numbers, k=kilo, m=mega, g=giga, t=tera\. .RE .PP \fBdumporder\fR string .RS 4 Default: -\fItttTTTTTTT\fR. The priority order of each dumper: +\fItttTTTTTTT\fR\. The priority order of each dumper: .sp -.RS 4 .nf s: smallest size S: largest size @@ -462,190 +467,194 @@ b: smallest bandwidth B: largest bandwidth .fi .RE -.RE .PP \fBmaxdumps\fR int .RS 4 Default: -1. The maximum number of backups from a single host that +1\. The maximum number of backups from a single host that \fIAmanda\fR -will attempt to run in parallel. See also the +will attempt to run in parallel\. See also the \fBinparallel\fR -option. +option\. .sp Note that this parameter may also be set in a specific \fBdumptype\fR -(see below). This value sets the default for all +(see below)\. This value sets the default for all \fBdumptype\fRs so must appear in -\fBamanda.conf\fR +\fBamanda\.conf\fR before any -\fBdumptype\fRs are defined. +\fBdumptype\fRs are defined\. .RE .PP \fBbumpsize\fR int .RS 4 Default: -\fI10 Mbytes\fR. The minimum savings required to trigger an automatic bump from one incremental level to the next, expressed as size. If +\fI10 Mbytes\fR\. The minimum savings required to trigger an automatic bump from one incremental level to the next, expressed as size\. If \fIAmanda\fR -determines that the next higher backup level will be this much smaller than the current level, it will do the next level. The value of this parameter is used only if the parameter +determines that the next higher backup level will be this much smaller than the current level, it will do the next level\. The value of this parameter is used only if the parameter \fIbumppercent\fR -is set to 0. +is set to 0\. .sp -The global setting of this parameter can be overwritten inside of a dumptype\-definition. +The global setting of this parameter can be overwritten inside of a dumptype\-definition\. .sp See also the options \fBbumppercent\fR, \fBbumpmult\fR and -\fBbumpdays\fR. +\fBbumpdays\fR\. .RE .PP \fBbumppercent\fR int .RS 4 Default: -\fI0 percent\fR. The minimum savings required to trigger an automatic bump from one incremental level to the next, expressed as percentage of the current size of the DLE (size of current level 0). If +\fI0 percent\fR\. The minimum savings required to trigger an automatic bump from one incremental level to the next, expressed as percentage of the current size of the DLE (size of current level 0)\. If \fIAmanda\fR -determines that the next higher backup level will be this much smaller than the current level, it will do the next level. +determines that the next higher backup level will be this much smaller than the current level, it will do the next level\. .sp If this parameter is set to 0, the value of the parameter \fIbumpsize\fR -is used to trigger bumping. +is used to trigger bumping\. .sp -The global setting of this parameter can be overwritten inside of a dumptype\-definition. +The global setting of this parameter can be overwritten inside of a dumptype\-definition\. .sp See also the options \fBbumpsize\fR, \fBbumpmult\fR and -\fBbumpdays\fR. +\fBbumpdays\fR\. .RE .PP \fBbumpmult\fR \fI float\fR .RS 4 Default: -1.5. The bump size multiplier. +1\.5\. The bump size multiplier\. \fIAmanda\fR multiplies \fBbumpsize\fR -by this factor for each level. This prevents active filesystems from bumping too much by making it harder to bump to the next level. For example, with the default +by this factor for each level\. This prevents active filesystems from bumping too much by making it harder to bump to the next level\. For example, with the default \fBbumpsize\fR and \fBbumpmult\fR -set to 2.0, the bump threshold will be 10 Mbytes for level one, 20 Mbytes for level two, 40 Mbytes for level three, and so on. +set to 2\.0, the bump threshold will be 10 Mbytes for level one, 20 Mbytes for level two, 40 Mbytes for level three, and so on\. .sp -The global setting of this parameter can be overwritten inside of a dumptype\-definition. +The global setting of this parameter can be overwritten inside of a dumptype\-definition\. .RE .PP \fBbumpdays\fR \fI int\fR .RS 4 Default: -\fI2 days\fR. To insure redundancy in the dumps, +\fI2 days\fR\. To insure redundancy in the dumps, \fIAmanda\fR keeps filesystems at the same incremental level for at least \fBbumpdays\fR -days, even if the other bump threshold criteria are met. +days, even if the other bump threshold criteria are met\. .sp -The global setting of this parameter can be overwritten inside of a dumptype\-definition. +The global setting of this parameter can be overwritten inside of a dumptype\-definition\. .RE .PP \fBdiskfile\fR \fI string\fR .RS 4 Default: -\fIdisklist\fR. The file name for the +\fIdisklist\fR\. The file name for the \fIdisklist\fR -file holding client hosts, disks and other client dumping information. +file holding client hosts, disks and other client dumping information\. .RE .PP \fBinfofile\fR \fI string\fR .RS 4 Default: -\fI/usr/adm/amanda/curinfo\fR. The file or directory name for the historical information database. If +\fI/usr/adm/amanda/curinfo\fR\. The file or directory name for the historical information database\. If \fIAmanda\fR -was configured to use DBM databases, this is the base file name for them. If it was configured to use text formated databases (the default), this is the base directory and within here will be a directory per client, then a directory per disk, then a text file of data. +was configured to use DBM databases, this is the base file name for them\. If it was configured to use text formated databases (the default), this is the base directory and within here will be a directory per client, then a directory per disk, then a text file of data\. .RE .PP \fBlogdir\fR \fI string\fR .RS 4 Default: -\fI/usr/adm/amanda\fR. The directory for the +\fI/usr/adm/amanda\fR\. The directory for the \fBamdump\fR and \fBlog\fR -files. +files\. .RE .PP \fBindexdir\fR \fI string\fR .RS 4 Default -\fI/usr/adm/amanda/index\fR. The directory where index files (backup image catalogues) are stored. Index files are only generated for filesystems whose +\fI/usr/adm/amanda/index\fR\. The directory where index files (backup image catalogues) are stored\. Index files are only generated for filesystems whose \fBdumptype\fR has the \fBindex\fR -option enabled. +option enabled\. .RE .PP \fBtapelist\fR \fI string\fR .RS 4 Default: -\fItapelist\fR. The file name for the active +\fItapelist\fR\. The file name for the active \fItapelist\fR -file. +file\. +\fIAmanda\fR +maintains this file with information about the active set of tapes\. +.RE +.PP +\fBdevice_output_buffer_size\fR \fI int\fR +.RS 4 +Default: +640k\. Controls the amount of memory used by \fIAmanda\fR -maintains this file with information about the active set of tapes. +to hold data as it is read from the network or disk before it is written to the output device\. Higher values may be useful on fast tape drives and optical media\. .RE .PP \fBtapebufs\fR \fI int\fR .RS 4 Default: -20. The number of buffers used by the -\fBtaper\fR -process run by -\fBamdump\fR -and -\fBamflush\fR -to hold data as it is read from the network or disk before it is written to tape. Each buffer is a little larger than 32 KBytes and is held in a shared memory region. +20\. This option is deprecated; use the +\fBdevice_output_buffer_size\fR +directive instead\. +\fBtapebufs\fR +works the same way, but the number specified is multiplied by the device blocksize prior to use\. .RE .PP \fBreserve\fR \fI number\fR .RS 4 Default: -100. The part of holding\-disk space that should be reserved for incremental backups if no tape is available, expressed as a percentage of the available holding\-disk space (0\-100). By default, when there is no tape to write to, degraded mode (incremental) backups will be performed to the holding disk. If full backups should also be allowed in this case, the amount of holding disk space reserved for incrementals should be lowered. +100\. The part of holding\-disk space that should be reserved for incremental backups if no tape is available, expressed as a percentage of the available holding\-disk space (0\-100)\. By default, when there is no tape to write to, degraded mode (incremental) backups will be performed to the holding disk\. If full backups should also be allowed in this case, the amount of holding disk space reserved for incrementals should be lowered\. .RE .PP \fBautoflush\fR \fI bool\fR .RS 4 Default: -\fIoff\fR. Whether an amdump run will flush the dumps from holding disk to tape. +\fIoff\fR\. Whether an amdump run will flush the dumps from holding disk to tape\. .RE .PP \fBamrecover_do_fsf\fR \fI bool\fR .RS 4 Default: -\fIon\fR. Amrecover will call amrestore with the \-f flag for faster positioning of the tape. +\fIon\fR\. Amrecover will call amrestore with the \-f flag for faster positioning of the tape\. .RE .PP \fBamrecover_check_label\fR \fI bool\fR .RS 4 Default: -\fIon\fR. Amrecover will call amrestore with the \-l flag to check the label. +\fIon\fR\. Amrecover will call amrestore with the \-l flag to check the label\. .RE .PP \fBamrecover_changer\fR \fI string\fR .RS 4 -Default: ''. Amrecover will use the changer if you use 'settape ' and that string is the same as the amrecover_changer setting. +Default: \'\'\. Amrecover will use the changer if you use \'settape \' and that string is the same as the amrecover_changer setting\. .RE .PP \fBcolumnspec\fR \fI string\fR .RS 4 Defines the width of columns \fBamreport\fR -should use. +should use\. \fIString\fR -is a comma (',') separated list of triples. Each triple consists of three parts which are separated by a equal sign ('=') and a colon (':') (see the example). These three parts specify: -.RS 4 -\h'-04' 1.\h'+02'the name of the column, which may be: +is a comma (\',\') separated list of triples\. Each triple consists of three parts which are separated by a equal sign (\'=\') and a colon (\':\') (see the example)\. These three parts specify: .sp .RS 4 +\h'-04' 1.\h'+02'the name of the column, which may be: .nf Compress (compression ratio) Disk (client disk name) @@ -657,334 +666,409 @@ is a comma (',') separated list of triples. Each triple consists of three parts OutKB (output image size in KBytes) TapeRate (tape writing rate in KBytes/sec) TapeTime (total tape time in hours:minutes) - -.fi -.RE + .fi .RE +.sp .RS 4 -\h'-04' 2.\h'+02'the amount of space to display before the column (used to get whitespace between columns). +\h'-04' 2.\h'+02'the amount of space to display before the column (used to get whitespace between columns)\. .sp .RE +.sp .RS 4 -\h'-04' 3.\h'+02'the width of the column itself. If set to a negative value, the width will be calculated on demand to fit the largest entry in this column. +\h'-04' 3.\h'+02'the width of the column itself\. If set to a negative value, the width will be calculated on demand to fit the largest entry in this column\. .RE .IP "" 4 Here is an example: .sp -.RS 4 .nf columnspec "Disk=1:18,HostName=0:10,OutKB=1:7" .fi -.RE .sp -The above will display the disk information in 18 characters and put one space before it. The hostname column will be 10 characters wide with no space to the left. The output KBytes column is seven characters wide with one space before it. +The above will display the disk information in 18 characters and put one space before it\. The hostname column will be 10 characters wide with no space to the left\. The output KBytes column is seven characters wide with one space before it\. .RE .PP \fBincludefile\fR \fI string\fR .RS 4 Default: -\fInone\fR. The name of an +\fInone\fR\. The name of an \fIAmanda\fR -configuration file to include within the current file. Useful for sharing dumptypes, tapetypes and interface definitions among several configurations. +configuration file to include within the current file\. Useful for sharing dumptypes, tapetypes and interface definitions among several configurations\. Relative pathnames are relative to the configuration directory\. .RE .PP \fBdebug_auth\fR int .RS 4 Default: -\fI0\fR. Debug level of the auth module +\fI0\fR\. Debug level of the auth module .RE .PP \fBdebug_event\fR int .RS 4 Default: -\fI0\fR. Debug level of the event module +\fI0\fR\. Debug level of the event module .RE .PP \fBdebug_holding\fR int .RS 4 Default: -\fI0\fR. Debug level of the holdingdisk module +\fI0\fR\. Debug level of the holdingdisk module .RE .PP \fBdebug_protocol\fR int .RS 4 Default: -\fI0\fR. Debug level of the protocol module +\fI0\fR\. Debug level of the protocol module .RE .PP \fBdebug_planner\fR int .RS 4 Default: -\fI0\fR. Debug level of the planner process +\fI0\fR\. Debug level of the planner process .RE .PP \fBdebug_driver\fR int .RS 4 Default: -\fI0\fR. Debug level of the driver process +\fI0\fR\. Debug level of the driver process .RE .PP \fBdebug_dumper\fR int .RS 4 Default: -\fI0\fR. Debug level of the dumper process +\fI0\fR\. Debug level of the dumper process .RE .PP \fBdebug_chunker\fR int .RS 4 Default: -\fI0\fR. Debug level of the chunker process +\fI0\fR\. Debug level of the chunker process .RE .PP \fBdebug_taper\fR int .RS 4 Default: -\fI0\fR. Debug level of the taper process +\fI0\fR\. Debug level of the taper process +.RE +.PP +\fBflush\-threshold\-dumped\fR int +.RS 4 +Default: +\fI0\fR\. +\fIAmanda\fR +will not begin writing data to a new volume until the amount of data on the holding disk is at least this percentage of the volume size\. In other words, +\fIAmanda\fR +will not begin until the inequality +h < t \(mu d +is satisfied, where +h +is the amount of data on the holding disk, +t +is the capacity of a volume, and +d +is this parameter, expressed as a percentage\. +.sp +Needless to say, your holding disk must be big enough that this criterion could be satisfied\. If the holding disk cannot be used for a particular dump (because, for example, there is no remaining holding space) then +\fIAmanda\fR +will disregard the constraint specified by this setting and start a new volume anyway\. Once writing to a volume has begun, this constraint is not applied unless and until a new volume is needed\. +.sp +The value of this parameter may not exceed than that of the +\fBflush\-threshold\-scheduled\fR +parameter\. +.RE +.PP +\fBflush\-threshold\-scheduled\fR int +.RS 4 +Default: +\fI0\fR\. +\fIAmanda\fR +will not begin writing data to a new volume until the sum of the amount of data on the holding disk and the estimated amount of data remaining to be dumped during this run is at least this percentage of the volume size\. In other words, +\fIAmanda\fR +will not begin until the inequality +h + s < t \(mu d +is satisfied, where +h +is the amount of data on the holding disk, +s +is the total amount of data scheduled for this run but not dumped yet, +t +is the capacity of a volume, and +d +is this parameter, expressed as a percentage\. +.sp +Needless to say, your holding disk must be big enough that this criterion could be satisfied\. If the holding disk cannot be used for a particular dump (because, for example, there is no remaining holding space) then +\fIAmanda\fR +will disregard the constraint specified by this setting and start a new volume anyway\. Once writing to a volume has begun, this constraint is not applied unless and until a new volume is needed\. +.sp +The value of this parameter may not be less than that of the +\fBflush\-threshold\-dumped\fR +or +\fBtaperflush\fR +parameters\. +.RE +.PP +\fBtaperflush\fR int +.RS 4 +Default: +\fI0\fR\. At the end of a run, +\fIAmanda\fR +will start a new tape to flush remaining data if there is more data on the holding disk at the end of a run than this setting allows; the amount is specified as a percentage of the capacity of a single volume\. In other words, at the end of a run, +\fIAmanda\fR +will begin a new tape if the inequality +h < t \(mu f +is satisfied, where +h +is the amount of data remaining on the holding disk from this or previous runs, +t +is the capacity of a volume, and +f +is this parameter, expressed as a percentage\. +.sp +The value of this parameter may not exceed that of the +\fBflush\-threshold\-scheduled\fR +parameter\.; +\fBautoflush\fR +must be set to \'yes\' if +\fBtaperflush\fR +is greater than 0\. .RE .PP \fBreserved\-udp\-port\fR int,int .RS 4 Default: \-\-with\-udpportrange or -\fI512,1023\fR. Reserved udp port that will be used (bsd, bsdudp) +\fI512,1023\fR\. Reserved udp port that will be used (bsd, bsdudp)\. Range is inclusive\. .RE .PP \fBreserved\-tcp\-port\fR int,int .RS 4 Default: \-\-with\-low\-tcpportrange or -\fI512,1023\fR. Reserved tcp port that will be used (bsdtcp) +\fI512,1023\fR\. Reserved tcp port that will be used (bsdtcp)\. Range is inclusive\. .RE .PP \fBunreserved\-tcp\-port\fR int,int .RS 4 Default: \-\-with\-tcpportrange or -\fI1025,65536\fR. Unreserved tcp port that will be used (bsd, bsdudp) +\fI1024,65535\fR\. Unreserved tcp port that will be used (bsd, bsdudp)\. Range is inclusive\. .RE .SH "HOLDINGDISK SECTION" .PP The -\fBamanda.conf\fR -file may define one or more holding disks used as buffers to hold backup images before they are written to tape. The syntax is: -.sp -.RS 4 +\fBamanda\.conf\fR +file may define one or more holding disks used as buffers to hold backup images before they are written to tape\. The syntax is: .nf holdingdisk \fIname\fR { \fIholdingdisk\-option\fR \fIholdingdisk\-value\fR - ... + \.\.\. } .fi -.RE .PP \fIName\fR -is a logical name for this holding disk. +is a logical name for this holding disk\. .PP The options and values are: .PP \fBcomment\fR \fI string\fR .RS 4 Default: -\fInone\fR. A comment string describing this holding disk. +\fInone\fR\. A comment string describing this holding disk\. .RE .PP \fBdirectory\fR \fI disk\fR .RS 4 Default: -\fI/dumps/amanda\fR. The path to this holding area. +\fI/dumps/amanda\fR\. The path to this holding area\. .RE .PP \fBuse\fR \fI int\fR .RS 4 Default: -\fI0 Gb\fR. Amount of space that can be used in this holding disk area. If the value is zero, all available space on the file system is used. If the value is negative, +\fI0 Gb\fR\. Amount of space that can be used in this holding disk area\. If the value is zero, all available space on the file system is used\. If the value is negative, \fIAmanda\fR -will use all available space minus that value. +will use all available space minus that value\. .RE .PP \fBchunksize\fR \fI int\fR .RS 4 Default: -\fI1 Gb\fR. Holding disk chunk size. Dumps larger than the specified size will be stored in multiple holding disk files. The size of each chunk will not exceed the specified value. However, even though dump images are split in the holding disk, they are concatenated as they are written to tape, so each dump image still corresponds to a single continuous tape section. +\fI1 Gb\fR\. Holding disk chunk size\. Dumps larger than the specified size will be stored in multiple holding disk files\. The size of each chunk will not exceed the specified value\. However, even though dump images are split in the holding disk, they are concatenated as they are written to tape, so each dump image still corresponds to a single continuous tape section\. .sp If 0 is specified, \fIAmanda\fR -will create holding disk chunks as large as ((INT_MAX/1024)\-64) Kbytes. +will create holding disk chunks as large as ((INT_MAX/1024)\-64) Kbytes\. .sp -Each holding disk chunk includes a 32 Kbyte header, so the minimum chunk size is 64 Kbytes (but that would be really silly). +Each holding disk chunk includes a 32 Kbyte header, so the minimum chunk size is 64 Kbytes (but that would be really silly)\. .sp -Operating systems that are limited to a maximum file size of 2 Gbytes actually cannot handle files that large. They must be at least one byte less than 2 Gbytes. Since +Operating systems that are limited to a maximum file size of 2 Gbytes actually cannot handle files that large\. They must be at least one byte less than 2 Gbytes\. Since \fIAmanda\fR -works with 32 Kbyte blocks, and to handle the final read at the end of the chunk, the chunk size should be at least 64 Kbytes (2 * 32 Kbytes) smaller than the maximum file size, e.g. 2047 Mbytes. +works with 32 Kbyte blocks, and to handle the final read at the end of the chunk, the chunk size should be at least 64 Kbytes (2 * 32 Kbytes) smaller than the maximum file size, e\.g\. 2047 Mbytes\. .RE .SH "DUMPTYPE SECTION" .PP The -\fIamanda.conf\fR +\fIamanda\.conf\fR file may define multiple sets of backup options and refer to them by name from the \fIdisklist\fR -file. For instance, one set of options might be defined for file systems that can benefit from high compression, another set that does not compress well, another set for file systems that should always get a full backup and so on. +file\. For instance, one set of options might be defined for file systems that can benefit from high compression, another set that does not compress well, another set for file systems that should always get a full backup and so on\. .PP A set of backup options are entered in a \fBdumptype\fR section, which looks like this: -.sp -.RS 4 .nf define dumptype \fIname\fR { \fIdumptype\-option\fR \fIdumptype\-value\fR - ... + \.\.\. } .fi -.RE .PP \fIName\fR -is the name of this set of backup options. It is referenced from the +is the name of this set of backup options\. It is referenced from the \fIdisklist\fR -file. +file\. .PP Some of the options in a \fBdumptype\fR section are the same as those in the main part of -\fIamanda.conf\fR. The main option value is used to set the default for all +\fIamanda\.conf\fR\. The main option value is used to set the default for all \fBdumptype\fR -sections. For instance, setting +sections\. For instance, setting \fBdumpcycle\fR to 50 in the main part of the config file causes all following \fBdumptype\fR -sections to start with that value, but the value may be changed on a section by section basis. Changes to variables in the main part of the config file must be done before (earlier in the file) any -\fBdumptype\fRs are defined. +sections to start with that value, but the value may be changed on a section by section basis\. Changes to variables in the main part of the config file must be done before (earlier in the file) any +\fBdumptype\fRs are defined\. .PP The dumptype options and values are: .PP \fBauth\fR \fI string\fR .RS 4 Default: -\fIbsd\fR. Type of authorization to perform between tape server and backup client hosts. +\fIbsd\fR\. Type of authorization to perform between tape server and backup client hosts\. .sp -\fBbsd\fR, bsd authorization with udp initial connection and one tcp connection by data stream. +\fBbsd\fR, bsd authorization with udp initial connection and one tcp connection by data stream\. .sp -\fBbsdtcp\fR, bsd authorization but use only one tcp connection. +\fBbsdtcp\fR, bsd authorization but use only one tcp connection\. .sp -\fBbsdudp\fR, like bsd, but will use only one tcp connection for all data stream. +\fBbsdudp\fR, like bsd, but will use only one tcp connection for all data stream\. .sp \fBkrb4\fR -to use Kerberos\-IV authorization. +to use Kerberos\-IV authorization\. .sp \fBkrb5\fR -to use Kerberos\-V authorization. +to use Kerberos\-V authorization\. +.sp +\fBlocal\fR, if the client is the server, it doesn\'t require authencation setup\. .sp \fBrsh\fR -to use rsh authorization. +to use rsh authorization\. .sp \fBssh\fR -to use OpenSSH authorization. +to use OpenSSH authorization\. .RE .PP \fBamandad_path\fR \fI string\fR .RS 4 Default: -\fI$libexec/amandad\fR. Specify the amandad path of the client, only use with rsh/ssh authentification. +\fI$libexec/amandad\fR\. Specify the amandad path of the client, only use with rsh/ssh authentification\. .RE .PP \fBclient_username\fR \fI string\fR .RS 4 Default: -\fICLIENT_LOGIN\fR. Specify the username to connect on the client, only use with rsh/ssh authentification. +\fICLIENT_LOGIN\fR\. Specify the username to connect on the client, only use with rsh/ssh authentification\. .RE .PP \fBbumpsize\fR int .RS 4 Default: -\fI10 Mbytes\fR. The minimum savings required to trigger an automatic bump from one incremental level to the next, expressed as size. If +\fI10 Mbytes\fR\. The minimum savings required to trigger an automatic bump from one incremental level to the next, expressed as size\. If \fIAmanda\fR -determines that the next higher backup level will be this much smaller than the current level, it will do the next level. The value of this parameter is used only if the parameter +determines that the next higher backup level will be this much smaller than the current level, it will do the next level\. The value of this parameter is used only if the parameter \fIbumppercent\fR -is set to 0. +is set to 0\. .sp See also the options \fBbumppercent\fR, \fBbumpmult\fR and -\fBbumpdays\fR. +\fBbumpdays\fR\. .RE .PP \fBbumppercent\fR int .RS 4 Default: -\fI0 percent\fR. The minimum savings required to trigger an automatic bump from one incremental level to the next, expressed as percentage of the current size of the DLE (size of current level 0). If +\fI0 percent\fR\. The minimum savings required to trigger an automatic bump from one incremental level to the next, expressed as percentage of the current size of the DLE (size of current level 0)\. If \fIAmanda\fR -determines that the next higher backup level will be this much smaller than the current level, it will do the next level. +determines that the next higher backup level will be this much smaller than the current level, it will do the next level\. .sp If this parameter is set to 0, the value of the parameter \fIbumpsize\fR -is used to trigger bumping. +is used to trigger bumping\. .sp See also the options \fBbumpsize\fR, \fBbumpmult\fR and -\fBbumpdays\fR. +\fBbumpdays\fR\. .RE .PP \fBbumpmult\fR \fI float\fR .RS 4 Default: -1.5. The bump size multiplier. +1\.5\. The bump size multiplier\. \fIAmanda\fR multiplies \fBbumpsize\fR -by this factor for each level. This prevents active filesystems from bumping too much by making it harder to bump to the next level. For example, with the default +by this factor for each level\. This prevents active filesystems from bumping too much by making it harder to bump to the next level\. For example, with the default \fBbumpsize\fR and \fBbumpmult\fR -set to 2.0, the bump threshold will be 10 Mbytes for level one, 20 Mbytes for level two, 40 Mbytes for level three, and so on. +set to 2\.0, the bump threshold will be 10 Mbytes for level one, 20 Mbytes for level two, 40 Mbytes for level three, and so on\. .RE .PP \fBbumpdays\fR \fI int\fR .RS 4 Default: -\fI2 days\fR. To insure redundancy in the dumps, +\fI2 days\fR\. To insure redundancy in the dumps, \fIAmanda\fR keeps filesystems at the same incremental level for at least \fBbumpdays\fR -days, even if the other bump threshold criteria are met. +days, even if the other bump threshold criteria are met\. .RE .PP \fBcomment\fR \fI string\fR .RS 4 Default: -\fInone\fR. A comment string describing this set of backup options. +\fInone\fR\. A comment string describing this set of backup options\. .RE .PP \fBcomprate\fR \fIfloat\fR [, \fIfloat\fR ] .RS 4 Default: -0.50, -0.50. The expected full and incremental compression factor for dumps. It is only used if +0\.50, +0\.50\. The expected full and incremental compression factor for dumps\. It is only used if \fIAmanda\fR -does not have any history information on compression rates for a filesystem, so should not usually need to be set. However, it may be useful for the first time a very large filesystem that compresses very little is backed up. +does not have any history information on compression rates for a filesystem, so should not usually need to be set\. However, it may be useful for the first time a very large filesystem that compresses very little is backed up\. .RE .PP \fBcompress [client|server]\fR \fI string\fR .RS 4 Default: -\fIclient fast\fR. If +\fIclient fast\fR\. If \fIAmanda\fR -does compression of the backup images, it can do so either on the backup client host before it crosses the network or on the tape server host as it goes from the network into the holding disk or to tape. Which place to do compression (if at all) depends on how well the dump image usually compresses, the speed and load on the client or server, network capacity, holding disk capacity, availability of tape hardware compression, etc. +does compression of the backup images, it can do so either on the backup client host before it crosses the network or on the tape server host as it goes from the network into the holding disk or to tape\. Which place to do compression (if at all) depends on how well the dump image usually compresses, the speed and load on the client or server, network capacity, holding disk capacity, availability of tape hardware compression, etc\. .sp For either type of compression, \fIAmanda\fR -also allows the selection of three styles of compression. +also allows the selection of three styles of compression\. \fBBest\fR -is the best compression available, often at the expense of CPU overhead. +is the best compression available, often at the expense of CPU overhead\. \fBFast\fR is often not as good a compression as -\fBbest\fR, but usually less CPU overhead. Or to specify +\fBbest\fR, but usually less CPU overhead\. Or to specify \fBCustom\fR -to use your own compression method. (See dumptype custom\-compress in example/amanda.conf for reference) +to use your own compression method\. (See dumptype custom\-compress in example/amanda\.conf for reference) .sp So the \fBcompress\fR options line may be one of: -.RS 4 .PP compress none .RS 4 @@ -1004,7 +1088,7 @@ Specify \fIclient_custom_compress\fR "PROG" .sp -PROG must not contain white space and it must accept \-d for uncompress. +PROG must not contain white space and it must accept \-d for uncompress\. .RE .PP compress server fast @@ -1021,32 +1105,30 @@ Specify \fIserver_custom_compress\fR "PROG" .sp -PROG must not contain white space and it must accept \-d for uncompress. +PROG must not contain white space and it must accept \-d for uncompress\. .RE -.RE -.IP "" 4 -Note that some tape devices do compression and this option has nothing to do with whether that is used. If hardware compression is used (usually via a particular tape device name or +.sp +Note that some tape devices do compression and this option has nothing to do with whether that is used\. If hardware compression is used (usually via a particular tape device name or \fBmt\fR option), \fIAmanda\fR -(software) compression should be disabled. +(software) compression should be disabled\. .RE .PP \fBdumpcycle\fR \fI int\fR .RS 4 Default: -\fI10 days\fR. The number of days in the backup cycle. Each disk using this set of options will get a full backup at least this of ten. Setting this to zero tries to do a full backup each run. +\fI10 days\fR\. The number of days in the backup cycle\. Each disk using this set of options will get a full backup at least this of ten\. Setting this to zero tries to do a full backup each run\. .RE .PP \fBencrypt [none|client|server]\fR .RS 4 Default: -\fInone\fR. To encrypt backup images, it can do so either on the backup client host before it crosses the network or on the tape server host as it goes from the network into the holding disk or to tape. +\fInone\fR\. To encrypt backup images, it can do so either on the backup client host before it crosses the network or on the tape server host as it goes from the network into the holding disk or to tape\. .sp So the \fBencrypt\fR options line may be one of: -.RS 4 .PP encrypt none .RS 4 @@ -1056,91 +1138,88 @@ encrypt client .RS 4 Specify client_encrypt "PROG" .sp -PROG must not contain white space. +PROG must not contain white space\. .sp Specify client_decrypt_option "decryption\-parameter" Default: "\-d" .sp -decryption\-parameter must not contain white space. +decryption\-parameter must not contain white space\. .sp -(See dumptype server\-encrypt\-fast in example/amanda.conf for reference) +(See dumptype server\-encrypt\-fast in example/amanda\.conf for reference) .RE .PP encrypt server .RS 4 Specify server_encrypt "PROG" .sp -PROG must not contain white space. +PROG must not contain white space\. .sp Specify server_decrypt_option "decryption\-parameter" Default: "\-d" .sp -decryption\-parameter must not contain white space. +decryption\-parameter must not contain white space\. .sp -(See dumptype client\-encrypt\-nocomp in example/amanda.conf for reference) -.RE +(See dumptype client\-encrypt\-nocomp in example/amanda\.conf for reference) .RE -.IP "" 4 -Note that current logic assumes compression then encryption during backup(thus decrypt then uncompress during restore). So specifying client\-encryption AND server\-compression is not supported. +.sp +Note that current logic assumes compression then encryption during backup(thus decrypt then uncompress during restore)\. So specifying client\-encryption AND server\-compression is not supported\. \fIamcrypt\fR which is a wrapper of \fIaespipe\fR -is provided as a reference symmetric encryption program. +is provided as a reference symmetric encryption program\. .RE .PP \fBestimate\fR \fIclient|calcsize|server\fR .RS 4 Default: -\fIclient\fR. Determine the way +\fIclient\fR\. Determine the way \fIAmanda\fR -does it's estimate. -.RS 4 +does it\'s estimate\. .PP client .RS 4 -Use the same program as the dumping program, this is the most accurate way to do estimates, but it can take a long time. +Use the same program as the dumping program, this is the most accurate way to do estimates, but it can take a long time\. .RE .PP calcsize .RS 4 -Use a faster program to do estimates, but the result is less accurate. +Use a faster program to do estimates, but the result is less accurate\. .RE .PP server .RS 4 -Use only statistics from the previous run to give an estimate, it takes only a few seconds but the result is not accurate if your disk usage changes from day to day. -.RE +Use only statistics from the previous run to give an estimate, it takes only a few seconds but the result is not accurate if your disk usage changes from day to day\. .RE .RE .PP \fBexclude\fR [ list|file ][[optional][ append ][ \fIstring\fR ]+] .RS 4 Default: -\fIfile\fR. There are two exclude lists, +\fIfile\fR\. There are two exclude lists, \fBexclude file\fR and -\fBexclude list.\fR +\fBexclude list\.\fR With \fBexclude file\fR , the \fIstring\fR is a \fBGNU\-tar\fR -exclude expression. With +exclude expression\. With \fBexclude list\fR , the \fIstring\fR is a file name on the client containing \fBGNU\-tar\fR -exclude expressions. The path to the specified exclude list file, if present (see description of 'optional' below), must be readable by the +exclude expressions\. The path to the specified exclude list file, if present (see description of \'optional\' below), must be readable by the \fIAmanda\fR -user. +user\. .sp All exclude expressions are concatenated in one file and passed to \fBGNU\-tar\fR as an \fB\-\-exclude\-from\fR -argument. +argument\. .sp -Exclude expressions must always be specified as relative to the head directory of the DLE. +Exclude expressions must always be specified as relative to the head directory of the DLE\. .sp With the \fBappend\fR @@ -1148,102 +1227,97 @@ keyword, the \fIstring\fR is appended to the current list, without it, the \fIstring\fR -overwrites the list. +overwrites the list\. .sp If \fBoptional\fR is specified for -\fBexclude list\fR, then amcheck will not complain if the file doesn't exist or is not readable. +\fBexclude list\fR, then amcheck will not complain if the file doesn\'t exist or is not readable\. .sp For -\fBexclude list\fR, if the file name is relative, the disk name being backed up is prepended. So if this is entered: -.sp -.RS 4 +\fBexclude list\fR, if the file name is relative, the disk name being backed up is prepended\. So if this is entered: .nf - exclude list ".amanda.excludes" + exclude list "\.amanda\.excludes" .fi -.RE the actual file used would be -\fI/var/.amanda.excludes\fR +\fI/var/\.amanda\.excludes\fR for a backup of \fI/var\fR, -\fI/usr/local/.amanda.excludes\fR +\fI/usr/local/\.amanda\.excludes\fR for a backup of -\fI/usr/local\fR, and so on. +\fI/usr/local\fR, and so on\. .RE .PP \fBholdingdisk\fR [ never|auto|required ] .RS 4 Default: -\fIauto\fR. Whether a holding disk should be used for these backups or whether they should go directly to tape. If the holding disk is a portion of another file system that +\fIauto\fR\. Whether a holding disk should be used for these backups or whether they should go directly to tape\. If the holding disk is a portion of another file system that \fIAmanda\fR is backing up, that file system should refer to a dumptype with \fBholdingdisk\fR set to \fInever\fR -to avoid backing up the holding disk into itself. -.RS 4 +to avoid backing up the holding disk into itself\. .PP \fBnever\fR|no|false|off .RS 4 -Never use a holdingdisk, the dump will always go directly to tape. There will be no dump if you have a tape error. +Never use a holdingdisk, the dump will always go directly to tape\. There will be no dump if you have a tape error\. .RE .PP \fBauto\fR|yes|true|on .RS 4 -Use the holding disk, unless there is a problem with the holding disk, the dump won't fit there or the medium doesn't require spooling (e.g., VFS device) +Use the holding disk, unless there is a problem with the holding disk, the dump won\'t fit there or the medium doesn\'t require spooling (e\.g\., VFS device) .RE .PP \fBrequired\fR .RS 4 -Always dump to holdingdisk, never directly to tape. There will be no dump if it doesn't fit on holdingdisk -.RE +Always dump to holdingdisk, never directly to tape\. There will be no dump if it doesn\'t fit on holdingdisk .RE .RE .PP \fBignore\fR \fI boolean\fR .RS 4 Default: -\fIno\fR. Whether disks associated with this backup type should be backed up or not. This option is useful when the +\fIno\fR\. Whether disks associated with this backup type should be backed up or not\. This option is useful when the \fIdisklist\fR -file is shared among several configurations, some of which should not back up all the listed file systems. +file is shared among several configurations, some of which should not back up all the listed file systems\. .RE .PP \fBinclude\fR [ list|file ][[optional][ append ][ \fIstring\fR ]+] .RS 4 Default: \fIfile\fR -".". There are two include lists, +"\."\. There are two include lists, \fBinclude file\fR and -\fBinclude list.\fR +\fBinclude list\.\fR With \fBinclude file\fR , the \fIstring\fR -is a glob expression. With +is a glob expression\. With \fBinclude list\fR , the \fIstring\fR -is a file name on the client containing glob expressions. +is a file name on the client containing glob expressions\. .sp All include expressions are expanded by \fIAmanda\fR, concatenated in one file and passed to \fBGNU\-tar\fR as a \fB\-\-files\-from\fR -argument. They must start with "./" and contain no other "/". +argument\. They must start with "\./" and contain no other "/"\. .sp -Include expressions must always be specified as relative to the head directory of the DLE. +Include expressions must always be specified as relative to the head directory of the DLE\. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR +Note For globbing to work at all, even the limited single level, the top level directory of the DLE must be readable by the \fIAmanda\fR -user. +user\. With the \fBappend\fR @@ -1251,174 +1325,168 @@ keyword, the \fIstring\fR is appended to the current list, without it, the \fIstring\fR -overwrites the list. +overwrites the list\. .sp If \fBoptional\fR is specified for \fBinclude list,\fR -then amcheck will not complain if the file doesn't exist or is not readable. +then amcheck will not complain if the file doesn\'t exist or is not readable\. .sp For -\fBinclude list\fR, If the file name is relative, the disk name being backed up is prepended. +\fBinclude list\fR, If the file name is relative, the disk name being backed up is prepended\. .RE .PP \fBindex\fR \fI boolean\fR .RS 4 Default: -\fIno\fR. Whether an index (catalogue) of the backup should be generated and saved in -\fBindexdir\fR. These catalogues are used by the +\fIno\fR\. Whether an index (catalogue) of the backup should be generated and saved in +\fBindexdir\fR\. These catalogues are used by the \fBamrecover\fR -utility. +utility\. .RE .PP \fBkencrypt\fR \fI boolean\fR .RS 4 Default: -\fIno\fR. Whether the backup image should be encrypted by Kerberos as it is sent across the network from the backup client host to the tape server host. +\fIno\fR\. Whether the backup image should be encrypted by Kerberos as it is sent across the network from the backup client host to the tape server host\. .RE .PP \fBmaxdumps\fR \fI int\fR .RS 4 Default: -1. The maximum number of backups from a single host that +1\. The maximum number of backups from a single host that \fIAmanda\fR -will attempt to run in parallel. See also the main section parameter -\fBinparallel\fR. +will attempt to run in parallel\. See also the main section parameter +\fBinparallel\fR\. .RE .PP \fBmaxpromoteday\fR \fI int\fR .RS 4 Default: -10000. The maximum number of day for a promotion, set it 0 if you don't want promotion, set it to 1 or 2 if your disks get overpromoted. +10000\. The maximum number of day for a promotion, set it 0 if you don\'t want promotion, set it to 1 or 2 if your disks get overpromoted\. .RE .PP \fBpriority\fR \fI string\fR .RS 4 Default: -\fImedium\fR. When there is no tape to write to, +\fImedium\fR\. When there is no tape to write to, \fIAmanda\fR -will do incremental backups in priority order to the holding disk. The priority may be high (2), medium (1), low (0) or a number of your choice. +will do incremental backups in priority order to the holding disk\. The priority may be high (2), medium (1), low (0) or a number of your choice\. .RE .PP \fBprogram\fR \fI string\fR .RS 4 Default: -\fIDUMP\fR. The type of backup to perform. Valid values are +\fIDUMP\fR\. The type of backup to perform\. Valid values are \fBDUMP\fR for the native operating system backup program, and \fBGNUTAR\fR to use \fBGNU\-tar\fR -or to do PC backups using Samba. +or to do PC backups using Samba\. .RE .PP \fBrecord\fR \fI boolean\fR .RS 4 Default: -\fIyes\fR. Whether to ask the backup program to update its database (e.g. +\fIyes\fR\. Whether to ask the backup program to update its database (e\.g\. \fI/etc/dumpdates\fR for DUMP or \fI/usr/local/var/amanda/gnutar\-lists\fR -for GNUTAR) of time stamps. This is normally enabled for daily backups and turned off for periodic archival runs. +for GNUTAR) of time stamps\. This is normally enabled for daily backups and turned off for periodic archival runs\. .RE .PP \fBskip\-full\fR \fI boolean\fR .RS 4 Default: -\fIno\fR. If +\fIno\fR\. If \fItrue\fR and \fBplanner\fR -has scheduled a full backup, these disks will be skipped, and full backups should be run off\-line on these days. It was reported that +has scheduled a full backup, these disks will be skipped, and full backups should be run off\-line on these days\. It was reported that \fIAmanda\fR -only schedules level 1 incrementals in this configuration; this is probably a bug. +only schedules level 1 incrementals in this configuration; this is probably a bug\. .RE .PP \fBskip\-incr\fR \fI boolean\fR .RS 4 Default: -\fIno\fR. If +\fIno\fR\. If \fItrue\fR and \fBplanner\fR -has scheduled an incremental backup, these disks will be skipped. +has scheduled an incremental backup, these disks will be skipped\. .RE .PP \fBstarttime\fR \fI int\fR .RS 4 Default: -\fInone\fR. Backups will not start until after this time of day. The value should be hh*100+mm, e.g. 6:30PM (18:30) would be entered as -1830. +\fInone\fR\. Backups will not start until after this time of day\. The value should be hh*100+mm, e\.g\. 6:30PM (18:30) would be entered as +1830\. .RE .PP \fBstrategy\fR \fI string\fR .RS 4 Default: -\fIstandard\fR. Strategy to use when planning what level of backup to run next. Values are: -.RS 4 +\fIstandard\fR\. Strategy to use when planning what level of backup to run next\. Values are: .PP \fBstandard\fR .RS 4 The standard \fIAmanda\fR -schedule. +schedule\. .RE .PP \fBnofull\fR .RS 4 -Never do full backups, only level 1 incrementals. +Never do full backups, only level 1 incrementals\. .RE .PP \fBnoinc\fR .RS 4 -Never do incremental backups, only full dumps. +Never do incremental backups, only full dumps\. .RE .PP \fBskip\fR .RS 4 Never do backups (useful when sharing the \fIdisklist\fR -file). +file)\. .RE .PP \fBincronly\fR .RS 4 -Only do incremental dumps. +Only do incremental dumps\. \fBamadmin force\fR should be used to tell \fIAmanda\fR -that a full dump has been performed off\-line, so that it resets to level 1. It is similar to skip\-full, but with incronly full dumps may be scheduled manually. Unfortunately, it appears that -\fIAmanda\fR -will perform full backups with this configuration, which is probably a bug. -.RE +that a full dump has been performed off\-line, so that it resets to level 1\. .RE .RE .PP \fBtape_splitsize\fR \fI int\fR .RS 4 Default: -\fInone\fR. Split dump file on tape into pieces of a specified size. This allows dumps to be spread across multiple tapes, and can potentially make more efficient use of tape space. Note that if this value is too large (more than half the size of the average dump being split), substantial tape space can be wasted. If too small, large dumps will be split into innumerable tiny dumpfiles, adding to restoration complexity. A good rule of thumb, usually, is 1/10 of the size of your tape. +\fInone\fR\. Split dump file on tape into pieces of a specified size\. This allows dumps to be spread across multiple tapes, and can potentially make more efficient use of tape space\. Note that if this value is too large (more than half the size of the average dump being split), substantial tape space can be wasted\. If too small, large dumps will be split into innumerable tiny dumpfiles, adding to restoration complexity\. A good rule of thumb, usually, is 1/10 of the size of your tape\. .RE .PP \fBsplit_diskbuffer\fR \fI string\fR .RS 4 Default: -\fInone\fR. When dumping a split dump in PORT\-WRITE mode (usually meaning "no holding disk"), buffer the split chunks to a file in the directory specified by this option. +\fInone\fR\. When dumping a split dump in PORT\-WRITE mode (usually meaning "no holding disk"), buffer the split chunks to a file in the directory specified by this option\. .RE .PP \fBfallback_splitsize\fR \fI int\fR .RS 4 Default: -\fI10M\fR. When dumping a split dump in PORT\-WRITE mode, if no split_diskbuffer is specified (or if we somehow fail to use our split_diskbuffer), we must buffer split chunks in memory. This specifies the maximum size split chunks can be in this scenario, and thus the maximum amount of memory consumed for in\-memory splitting. The size of this buffer can be changed from its (very conservative) default to a value reflecting the amount of memory that each taper process on the dump server may reasonably consume. +\fI10M\fR\. When dumping a split dump in PORT\-WRITE mode, if no split_diskbuffer is specified (or if we somehow fail to use our split_diskbuffer), we must buffer split chunks in memory\. This specifies the maximum size split chunks can be in this scenario, and thus the maximum amount of memory consumed for in\-memory splitting\. The size of this buffer can be changed from its (very conservative) default to a value reflecting the amount of memory that each taper process on the dump server may reasonably consume\. .RE .PP The following \fBdumptype\fR entries are predefined by \fIAmanda\fR: -.sp -.RS 4 .nf define dumptype no\-compress { compress none @@ -1448,7 +1516,6 @@ define dumptype no\-full { skip\-full yes } .fi -.RE .PP In addition to options in a \fBdumptype\fR @@ -1457,11 +1524,9 @@ section, one or more other names may be entered, which make this \fBdumptype\fR inherit options from other previously defined -\fBdumptype\fRs. For instance, two sections might be the same except for the +\fBdumptype\fRs\. For instance, two sections might be the same except for the \fBrecord\fR option: -.sp -.RS 4 .nf define dumptype normal { comment "Normal backup, no compression, do indexing" @@ -1475,7 +1540,6 @@ define dumptype testing { record no } .fi -.RE .PP \fIAmanda\fR provides a @@ -1483,109 +1547,106 @@ provides a named \fIglobal\fR in the sample -\fBamanda.conf\fR +\fBamanda\.conf\fR file that all -\fBdumptype\fRs should reference. This provides an easy place to make changes that will affect every -\fBdumptype\fR. +\fBdumptype\fRs should reference\. This provides an easy place to make changes that will affect every +\fBdumptype\fR\. .SH "TAPETYPE SECTION" .PP The -\fBamanda.conf\fR -file may define multiple types of tape media and devices. The information is entered in a +\fBamanda\.conf\fR +file may define multiple types of tape media and devices\. The information is entered in a \fBtapetype\fR section, which looks like this in the config file: -.sp -.RS 4 .nf define tapetype \fIname\fR { \fItapetype\-option\fR \fItapetype\-value\fR - ... + \.\.\. } .fi -.RE .PP \fIName\fR -is the name of this type of tape medium/device. It is referenced from the +is the name of this type of tape medium/device\. It is referenced from the \fBtapetype\fR -option in the main part of the config file. +option in the main part of the config file\. .PP The tapetype options and values are: .PP \fBcomment\fR \fI string\fR .RS 4 Default: -\fInone\fR. A comment string describing this set of tape information. +\fInone\fR\. A comment string describing this set of tape information\. .RE .PP \fBfilemark\fR \fI int\fR .RS 4 Default: -\fI1 kbytes\fR. How large a file mark (tape mark) is, measured in kbytes. If the size is only known in some linear measurement (e.g. inches), convert it to kbytes using the device density. +\fI1 kbytes\fR\. How large a file mark (tape mark) is, measured in kbytes\. If the size is only known in some linear measurement (e\.g\. inches), convert it to kbytes using the device density\. .RE .PP \fBlength\fR \fI int\fR .RS 4 Default: -\fI2000 kbytes\fR. How much data will fit on a tape. +\fI2000 kbytes\fR\. How much data will fit on a tape\. .sp Note that this value is only used by \fIAmanda\fR -to schedule which backups will be run. Once the backups start, +to schedule which backups will be run\. Once the backups start, \fIAmanda\fR will continue to write to a tape until it gets an error, regardless of what value is entered for \fBlength\fR (but see the section OUTPUT DRIVERS in the \fBamanda\fR(8) -manpage for exceptions). +manpage for exceptions)\. .RE .PP \fBblocksize\fR \fI int\fR .RS 4 Default: -\fI32 kbytes\fR. How much data will be written in each tape record expressed in KiloBytes. The tape record size (= blocksize) can not be reduced below the default 32 KBytes. The parameter blocksize can only be raised if +\fI32 kbytes\fR\. How much data will be written in each tape record expressed in KiloBytes\. The tape record size (= blocksize) can not be reduced below the default 32 KBytes\. The parameter blocksize can only be raised if \fIAmanda\fR was compiled with the configure option \-\-with\-maxtapeblocksize=N set with "N" greater than 32 during -\fBconfigure\fR. +\fBconfigure\fR\. .RE .PP \fBreadblocksize\fR \fI int\fR .RS 4 -Default: (\fIfrom configure \-\-with\-maxtapeblocksize\fR). How much data will be read in each tape record expressed in KiloBytes. Some hardware require a value not too large, and some require it to be equal to the blocksize. It is useful if you configured amanda with a big \-\-with\-maxtapeblocksize and your hardware don't work with a value that big. +Default: (\fIfrom configure \-\-with\-maxtapeblocksize\fR)\. How much data will be read in each tape record expressed in KiloBytes\. Some hardware require a value not too large, and some require it to be equal to the blocksize\. It is useful if you configured amanda with a big \-\-with\-maxtapeblocksize and your hardware don\'t work with a value that big\. .RE .PP \fBfile\-pad\fR \fI boolean\fR .RS 4 Default: -\fItrue\fR. If true, every record, including the last one in the file, will have the same length. This matches the way +\fItrue\fR\. If true, every record, including the last one in the file, will have the same length\. This matches the way \fIAmanda\fR -wrote tapes prior to the availability of this parameter. It may also be useful on devices that only support a fixed blocksize. +wrote tapes prior to the availability of this parameter\. It may also be useful on devices that only support a fixed blocksize\. .sp Note that the last record on the tape probably includes trailing null byte padding, which will be passed back to \fBgzip\fR, \fBcompress\fR -or the restore program. Most programs just ignore this (although possibly with a warning). +or the restore program\. Most programs just ignore this (although possibly with a warning)\. .sp -If this parameter is false, the last record in a file may be shorter than the block size. The file will contain the same amount of data the dump program generated, without trailing null byte padding. When read, the same amount of data that was written will be returned. +If this parameter is false, the last record in a file may be shorter than the block size\. The file will contain the same amount of data the dump program generated, without trailing null byte padding\. When read, the same amount of data that was written will be returned\. .RE .PP \fBspeed\fR \fI int\fR .RS 4 Default: -\fI200 bps\fR. How fast the drive will accept data, in bytes per second. This parameter is NOT currently used by -\fIAmanda\fR. +\fI200 bps\fR\. How fast the drive will accept data, in bytes per second\. This parameter is NOT currently used by +\fIAmanda\fR\. .RE .PP \fBlbl\-templ\fR \fI string\fR .RS 4 A PostScript template file used by \fBamreport\fR -to generate labels. Several sample files are provided with the +to generate labels\. Several sample files are provided with the \fIAmanda\fR sources in the \fIexample\fR -directory. See the +directory\. See the \fBamreport\fR(8) -man page for more information. +man page for more information\. .RE .PP In addition to options, another @@ -1593,9 +1654,7 @@ In addition to options, another name may be entered, which makes this \fBtapetype\fR inherit options from another -\fBtapetype\fR. For instance, the only difference between a DLT4000 tape drive using Compact\-III tapes and one using Compact\-IV tapes is the length of the tape. So they could be entered as: -.sp -.RS 4 +\fBtapetype\fR\. For instance, the only difference between a DLT4000 tape drive using Compact\-III tapes and one using Compact\-IV tapes is the length of the tape\. So they could be entered as: .nf define tapetype DLT4000\-III { comment "DLT4000 tape drives with Compact\-III tapes" @@ -1609,49 +1668,44 @@ define tapetype DLT4000\-IV { length 25000 mbytes # 20 Gig tapes with some compression } .fi -.RE -.sp .SH "INTERFACE SECTION" .PP The -\fBamanda.conf\fR -file may define multiple types of network interfaces. The information is entered in an +\fBamanda\.conf\fR +file may define multiple types of network interfaces\. The information is entered in an \fBinterface\fR section, which looks like this: -.sp -.RS 4 .nf define interface \fIname\fR { \fIinterface\-option\fR \fIinterface\-value\fR - ... + \.\.\. } .fi -.RE .PP \fIname\fR -is the name of this type of network interface. It is referenced from the +is the name of this type of network interface\. It is referenced from the \fIdisklist\fR -file. +file\. .PP -Note that these sections define network interface characteristics, not the actual interface that will be used. Nor do they impose limits on the bandwidth that will actually be taken up by -\fIAmanda\fR. +Note that these sections define network interface characteristics, not the actual interface that will be used\. Nor do they impose limits on the bandwidth that will actually be taken up by +\fIAmanda\fR\. \fIAmanda\fR -computes the estimated bandwidth each file system backup will take based on the estimated size and time, then compares that plus any other running backups with the limit as another of the criteria when deciding whether to start the backup. Once a backup starts, +computes the estimated bandwidth each file system backup will take based on the estimated size and time, then compares that plus any other running backups with the limit as another of the criteria when deciding whether to start the backup\. Once a backup starts, \fIAmanda\fR -will use as much of the network as it can leaving throttling up to the operating system and network hardware. +will use as much of the network as it can leaving throttling up to the operating system and network hardware\. .PP The interface options and values are: .PP \fBcomment\fR \fI string\fR .RS 4 Default: -\fInone\fR. A comment string describing this set of network information. +\fInone\fR\. A comment string describing this set of network information\. .RE .PP \fBuse\fR \fI int\fR .RS 4 Default: -\fI300 Kbps\fR. The speed of the interface in Kbytes per second. +\fI8000 Kbps\fR\. The speed of the interface in Kbytes per second\. .RE .PP In addition to options, another @@ -1659,19 +1713,20 @@ In addition to options, another name may be entered, which makes this \fBinterface\fR inherit options from another -\fBinterface\fR. At the moment, this is of little use. +\fBinterface\fR\. At the moment, this is of little use\. .SH "AUTHOR" .PP James da Silva, -: Original text +: Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion, major update, splitting .SH "SEE ALSO" .PP \fBamanda\fR(8), -\fBamanda\-client.conf\fR(5), +\fBamanda-client.conf\fR(5), \fBamcrypt\fR(8), \fBaespipe\fR(1), +: http://wiki.zmanda.com diff --git a/man/amcheck.8 b/man/amcheck.8 index 5ed8abb..e4d7f6f 100644 --- a/man/amcheck.8 +++ b/man/amcheck.8 @@ -1,17 +1,17 @@ .\" Title: amcheck .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMCHECK" "8" "06/06/2007" "" "" +.TH "AMCHECK" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amcheck \- run Amanda self\-checks +amcheck - run Amanda self-checks .SH "SYNOPSIS" .HP 8 \fBamcheck\fR [\-am] [\-w] [\-sclt] [\-M\ \fIaddress\fR] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] [\-o\ \fIconfigoption\fR]... @@ -22,71 +22,71 @@ runs a number of self\-checks on both the \fIAmanda\fR tape server host and the \fIAmanda\fR -client hosts. +client hosts\. .PP On the tape server host, \fBamcheck\fR can go through the same tape checking used at the start of the nightly \fBamdump\fR -run to verify the correct tape for the next run is mounted. +run to verify the correct tape for the next run is mounted\. .PP \fBAmcheck\fR -can also do a self\-check on all client hosts to make sure each host is running and that permissions on filesystems to be backed up are correct. +can also do a self\-check on all client hosts to make sure each host is running and that permissions on filesystems to be backed up are correct\. .PP -You can specify many host/disk expressions, only disks that match an expression will be checked. All disks are checked if no expressions are given. +You can specify many host/disk expressions, only disks that match an expression will be checked\. All disks are checked if no expressions are given\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP \fB\-s\fR .RS 4 Run the tape server local and tape checks (same as -\fB\-lt\fR). +\fB\-lt\fR)\. .RE .PP \fB\-c\fR .RS 4 -Run the client host checks. Multiple specific clients can be checked by specifying the client name. +Run the client host checks\. Multiple specific clients can be checked by specifying the client name\. .RE .PP \fB\-l\fR .RS 4 -Run the local tests (e.g. permissions) on the server host. +Run the local tests (e\.g\. permissions) on the server host\. .RE .PP \fB\-t\fR .RS 4 -Run the tape tests on the server host. +Run the tape tests on the server host\. .RE .PP \fB\-w\fR .RS 4 Enables a DESTRUCTIVE check for write\-protection on the tape (which would otherwise cause the subsequent \fBamdump\fR -to fail). If the tape is writable, this check causes all data after the tape label to be erased. If the label_new_tapes option is enabled, this check may ERASE any non\-Amanda tape in the drive or changer. The check enable the tape tests on the server host and is only made if the tape is otherwise correct. +to fail)\. If the tape is writable, this check causes all data after the tape label to be erased\. If the label_new_tapes option is enabled, this check may ERASE any non\-Amanda tape in the drive or changer\. The check enable the tape tests on the server host and is only made if the tape is otherwise correct\. .RE .PP \fB\-m\fR .RS 4 -Nothing is printed, but mail is sent if any errors are detected. The mail goes to the +Nothing is printed, but mail is sent if any errors are detected\. The mail goes to the \fBmailto\fR address specified in the -\fIamanda.conf\fR +\fIamanda\.conf\fR file or the \fIaddress\fR value if \fB\-M\fR -is set. +is set\. .RE .PP \fB\-a\fR .RS 4 Like \fB\-m\fR -but the mail is always sent. +but the mail is always sent\. .RE .PP \fB\-M\fR \fIaddress\fR @@ -96,72 +96,66 @@ Mail the report to instead of the \fBmailto\fR value from -\fIamanda.conf\fR. Implies -\fB\-m\fR. +\fIamanda\.conf\fR\. Implies +\fB\-m\fR\. .RE .PP \fIhost\fR [\fIdisk\fR]* .RS 4 -Specify the host and disk on which the command will work. +Specify the host and disk on which the command will work\. .RE .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .PP The default is -\fB\-cs\fR. +\fB\-cs\fR\. .SH "EXAMPLES" .PP -In this example, both the tape server and client tests are run. The results are displayed on standard output. -.sp -.RS 4 +In this example, both the tape server and client tests are run\. The results are displayed on standard output\. .nf % amcheck daily \fIAmanda\fR Tape Server Host Check \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- -/amanda2/amanda/work: 911475 KB disk space available, that's plenty. -NOTE: skipping tape\-writable test. -Tape VOL10 label ok. -Server check took 34.966 seconds. +/amanda2/amanda/work: 911475 KB disk space available, that\'s plenty\. +NOTE: skipping tape\-writable test\. +Tape VOL10 label ok\. +Server check took 34\.966 seconds\. \fIAmanda\fR Backup Client Hosts Check \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- -WARNING: northstar: selfcheck request timed out. Host down? -WARNING: drinkme: selfcheck request timed out. Host down? -WARNING: scruffy: selfcheck request timed out. Host down? -Client check: 136 hosts checked in 51.945 seconds, 3 problems found. +WARNING: northstar: selfcheck request timed out\. Host down? +WARNING: drinkme: selfcheck request timed out\. Host down? +WARNING: scruffy: selfcheck request timed out\. Host down? +Client check: 136 hosts checked in 51\.945 seconds, 3 problems found\. -(brought to you by \fIAmanda\fR 2.5.0) +(brought to you by \fIAmanda\fR 2\.5\.0) .fi -.RE .PP In this example, if the line \fBmailto csd\-amanda\fR is in -\fIamanda.conf\fR, mail will be sent to +\fIamanda\.conf\fR, mail will be sent to \fBcsd\-amanda\fR -if the server check returns an error. -.sp -.RS 4 +if the server check returns an error\. .nf % amcheck \-s \-m daily .fi -.RE .SH "MESSAGES" .PP fatal slot \fIslot\fR: \fIerror message\fR .RS 4 (error) The tape changer detected some kind of fatal error while trying to load slot -\fIslot\fR. +\fIslot\fR\. .RE .PP slot \fIslot\fR: \fIerror message\fR .RS 4 -(warning) The tape changer detected some kind of non\-fatal error (e.g. an empty slot was detected) while trying to load slot -\fIslot\fR, or an error was detected trying to read the tape label. +(warning) The tape changer detected some kind of non\-fatal error (e\.g\. an empty slot was detected) while trying to load slot +\fIslot\fR, or an error was detected trying to read the tape label\. .RE .PP slot \fIslot\fR: date \fIYYYYMMDD\fR label \fIlabel\fR (\fIresult\fR) @@ -171,15 +165,14 @@ slot \fIslot\fR: date \fIYYYYMMDD\fR label \fIlabel\fR (\fIresult\fR) in slot \fIslot\fR was loaded and found to have been last written on -\fIYYYYMMDD\fR. If the tape is new, the date field will be an -\fIX\fR. The +\fIYYYYMMDD\fR\. If the tape is new, the date field will be an +\fIX\fR\. The \fIresult\fR may be one of: -.RS 4 .PP exact label match .RS 4 -This is the expected tape. +This is the expected tape\. .RE .PP no match @@ -187,12 +180,12 @@ no match This label does not match the \fBlabelstr\fR pattern in -\fIamanda.conf\fR. Tape scanning will continue. +\fIamanda\.conf\fR\. Tape scanning will continue\. .RE .PP active tape .RS 4 -This tape is still active and cannot be overwritten. Tape scanning will continue. +This tape is still active and cannot be overwritten\. Tape scanning will continue\. .RE .PP first labelstr match @@ -200,7 +193,7 @@ first labelstr match This tape is the first one that matches the \fBlabelstr\fR pattern in -\fIamanda.conf\fR. Tape scanning will continue if necessary. +\fIamanda\.conf\fR\. Tape scanning will continue if necessary\. .RE .PP labelstr match @@ -208,10 +201,9 @@ labelstr match This tape is the next one that matches the \fBlabelstr\fR pattern in -\fIamanda.conf\fR. Tape scanning will continue. -.RE +\fIamanda\.conf\fR\. Tape scanning will continue\. .RE -.IP "" 4 +.sp .RE .PP ERROR: cannot look up dump user \fIuser\fR @@ -219,8 +211,8 @@ ERROR: cannot look up dump user \fIuser\fR (error) Dump user \fIuser\fR from -\fIamanda.conf\fR -could not be found in the system password information. +\fIamanda\.conf\fR +could not be found in the system password information\. .RE .PP ERROR: cannot look up my own uid (\fIuid\fR) @@ -229,7 +221,7 @@ ERROR: cannot look up my own uid (\fIuid\fR) \fIuid\fR running \fBamcheck\fR -could not be found in the system password information. +could not be found in the system password information\. .RE .PP ERROR: running as user \fIrunuser\fR instead of \fIdumpuser\fR @@ -239,9 +231,9 @@ ERROR: running as user \fIrunuser\fR instead of \fIdumpuser\fR should be run as the dump user \fIdumpuser\fR from -\fIamanda.conf\fR +\fIamanda\.conf\fR instead of -\fIrunuser\fR. +\fIrunuser\fR\. .RE .PP ERROR: program dir \fIdirectory\fR: not accessible @@ -249,45 +241,44 @@ ERROR: program dir \fIdirectory\fR: not accessible (error) The directory \fIAmanda\fR expects to find its auxiliary programs in, -\fIdirectory\fR, is not accessible. +\fIdirectory\fR, is not accessible\. .RE .PP ERROR: program \fIprogram\fR: does not exist .RS 4 (error) Program \fIprogram\fR -needed on the tape server could not be found. +needed on the tape server could not be found\. .RE .PP ERROR: program \fIprogram\fR: not a file .RS 4 (error) Program \fIprogram\fR -needed on the tape server exists but is not a file. +needed on the tape server exists but is not a file\. .RE .PP ERROR: program \fIprogram\fR: not executable .RS 4 (error) Program \fIprogram\fR -needed on the tape server exists but is not executable. +needed on the tape server exists but is not executable\. .RE .PP WARNING: program \fIprogram\fR: not setuid\-root .RS 4 (warning) Program \fIprogram\fR -needed on the tape server exists but should be owned by user "root" and setuid. +needed on the tape server exists but should be owned by user "root" and setuid\. .RE .PP ERROR: \fIXXX\fR dir \fIdirectory\fR: not writable .RS 4 (error) Directory \fIdirectory\fR -is either not writable, i.e. the dump user will not be able to create or remove files, or cannot be accessed, perhaps because a parent directory does not allow search permission. The +is either not writable, i\.e\. the dump user will not be able to create or remove files, or cannot be accessed, perhaps because a parent directory does not allow search permission\. The \fIXXX\fR may be: -.RS 4 .PP log .RS 4 @@ -296,7 +287,7 @@ for the log directory (see \fBlogdir\fR in -\fBamanda.conf\fR) +\fBamanda\.conf\fR) .RE .PP oldlog @@ -304,7 +295,7 @@ oldlog for the directory that holds the old log files (see \fBlogdir\fR in -\fBamanda.conf\fR) +\fBamanda\.conf\fR) .RE .PP info @@ -314,7 +305,7 @@ for an database information directory (see \fBcurinfo\fR in -\fBamanda.conf\fR) or +\fBamanda\.conf\fR) or .RE .PP index @@ -324,7 +315,7 @@ for an index directory (see \fBindexdir\fR in -\fBamanda.conf\fR) +\fBamanda\.conf\fR) .RE .PP tapelist @@ -334,20 +325,19 @@ for the tapelist directory (see \fBtapelist\fR in -\fBamanda.conf\fR) +\fBamanda\.conf\fR) .RE -.RE -.IP "" 4 +.sp .RE .PP NOTE: \fIXXX\fR dir \fIdirectory\fR: does not exist .RS 4 -(info) A database (info) or index directory does not exist or cannot be accessed. This might just mean this is a new client or disk, but if that is not the case, this should be treated as an error. +(info) A database (info) or index directory does not exist or cannot be accessed\. This might just mean this is a new client or disk, but if that is not the case, this should be treated as an error\. .RE .PP NOTE: it will be created on the next run .RS 4 -(info) This indicates the info directory listed in the previous message will be created on the next run. +(info) This indicates the info directory listed in the previous message will be created on the next run\. .RE .PP ERROR: \fIXXX\fR dir \fIname\fR: not a directory @@ -356,14 +346,14 @@ ERROR: \fIXXX\fR dir \fIname\fR: not a directory \fBAmcheck\fR expected \fIname\fR -to be a directory, but it is something else (e.g. file). +to be a directory, but it is something else (e\.g\. file)\. .RE .PP WARNING: info file \fIfile\fR: does not exist .RS 4 (warning) File \fIfile\fR -does not exist in the text format database. Since the parent directories do exist, the file should already have been created. +does not exist in the text format database\. Since the parent directories do exist, the file should already have been created\. .RE .PP ERROR: info file \fIname\fR: not a file @@ -372,14 +362,14 @@ ERROR: info file \fIname\fR: not a file \fBAmcheck\fR expected \fIname\fR -to be a file, but it is something else (e.g. file). +to be a file, but it is something else (e\.g\. file)\. .RE .PP ERROR: info file \fIfile\fR: not readable .RS 4 (error) The text format database file \fIfile\fR -is not readable. +is not readable\. .RE .PP ERROR: log file \fIfile\fR: not writable @@ -391,7 +381,7 @@ ERROR: log file \fIfile\fR: not writable in \fBlogdir\fR from -\fBamanda.conf\fR) is either not writable, or cannot be accessed, perhaps because a parent directory does not allow search permission. +\fBamanda\.conf\fR) is either not writable, or cannot be accessed, perhaps because a parent directory does not allow search permission\. .RE .PP ERROR: tape list \fItapelist\fR: not writable @@ -403,7 +393,7 @@ tape list file (see \fBtapelist\fR in -\fBamanda.conf\fR) is not writable or was not found. +\fBamanda\.conf\fR) is not writable or was not found\. .RE .PP ERROR: tape list \fItapelist\fR: parse error @@ -415,7 +405,7 @@ tape list file (see \fBtapelist\fR in -\fBamanda.conf\fR) could not be read or parsed. +\fBamanda\.conf\fR) could not be read or parsed\. .RE .PP WARNING: tapedev is /dev/null, dumps will be thrown away @@ -423,12 +413,12 @@ WARNING: tapedev is /dev/null, dumps will be thrown away (warning) The \fBtapedev\fR parameter in -\fBamanda.conf\fR +\fBamanda\.conf\fR is set to \fI/dev/null\fR and \fIAmanda\fR -uses that when debugging to throw all the dump images away. +uses that when debugging to throw all the dump images away\. .RE .PP WARNING: hold file \fIfile\fR exists @@ -437,7 +427,7 @@ WARNING: hold file \fIfile\fR exists \fIfile\fR exists and will cause \fBamdump\fR -to pause at the beginning until it is removed. +to pause at the beginning until it is removed\. .RE .PP ERROR: holding disk \fIdisk\fR: statfs: \fIerror message\fR @@ -446,16 +436,16 @@ ERROR: holding disk \fIdisk\fR: statfs: \fIerror message\fR \fIstatfs\fR system call on holding disk \fIdisk\fR -(maybe because it does not exist). +(maybe because it does not exist)\. .RE .PP ERROR: holding disk \fIdisk\fR: not writable .RS 4 (error) Holding disk -\fIdisk\fR, is not writable, probably because the caller does not have write permission or a parent directory does not allow search permission. +\fIdisk\fR, is not writable, probably because the caller does not have write permission or a parent directory does not allow search permission\. .RE .PP -WARNING: holding disk \fIdisk\fR: available space unknown \fIN\fR KB requested. +WARNING: holding disk \fIdisk\fR: available space unknown \fIN\fR KB requested\. .RS 4 (warning) \fBAmcheck\fR @@ -463,37 +453,37 @@ could not determine the amount of available space on holding disk \fIdisk\fR to see if there were at least \fIN\fR -KBytes available. +KBytes available\. .RE .PP -WARNING: holding disk \fIdisk\fR: only \fIF\fR KB free (\fIR\fR KB requested). +WARNING: holding disk \fIdisk\fR: only \fIF\fR KB free (\fIR\fR KB requested)\. .RS 4 (warning) -\fIamanda.conf\fR +\fIamanda\.conf\fR requested \fIR\fR KBytes of free space on holding disk \fIdisk\fR, but only \fIF\fR -KBytes were available. 10 MBytes is subtracted for each backup process (see the +KBytes were available\. 10 MBytes is subtracted for each backup process (see the \fBinparallel\fR -\fIamanda.conf\fR -option) to allow for unexpected overruns. +\fIamanda\.conf\fR +option) to allow for unexpected overruns\. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR +Note Even though this message is listed as a warning, it causes \fBamcheck\fR -to exit with a non\-zero status. +to exit with a non\-zero status\. .RE .PP -Holding disk \fIdisk\fR: \fIN\fR KB disk space available, that's plenty. +Holding disk \fIdisk\fR: \fIN\fR KB disk space available, that\'s plenty\. .RS 4 (info) There was sufficient free space on holding disk -\fIdisk\fR. +\fIdisk\fR\. .RE .PP WARNING: holding disk \fIdisk\fR: only \fIF\fR KB free, using nothing @@ -503,7 +493,7 @@ WARNING: holding disk \fIdisk\fR: only \fIF\fR KB free, using nothing has \fIF\fR KBytes of free space, but that is not enough for what is requested in -\fIamanda.conf\fR. +\fIamanda\.conf\fR\. .RE .PP Holding disk \fIdisk\fR: \fIF\fR KB disk space available, using \fIU\fR KB @@ -516,78 +506,78 @@ KBytes of free space and \fIAmanda\fR will be using up to \fIU\fR -Kbytes. +Kbytes\. .RE .PP -WARNING: if a tape changer is not available, runtapes must be set to 1. +WARNING: if a tape changer is not available, runtapes must be set to 1\. .RS 4 (warning) The \fBruntapes\fR -\fIamanda.conf\fR +\fIamanda\.conf\fR option must be set to 1 if the \fBtpchanger\fR -\fIamanda.conf\fR -option is not set. +\fIamanda\.conf\fR +option is not set\. .RE .PP -ERROR: \fIerror message\fR. +ERROR: \fIerror message\fR\. .RS 4 -(error) An error was detected while initializing the tape changer. +(error) An error was detected while initializing the tape changer\. .RE .PP -ERROR: \fItape device\fR: \fIerror message\fR. +ERROR: \fItape device\fR: \fIerror message\fR\. .RS 4 -(error) An error was detected while processing the tape label. +(error) An error was detected while processing the tape label\. .RE .PP -ERROR: cannot overwrite active tape \fIlabel\fR. +ERROR: cannot overwrite active tape \fIlabel\fR\. .RS 4 (error) Tape \fIlabel\fR -is still active and cannot be used. +is still active and cannot be used\. .RE .PP -ERROR: label \fIlabel\fR doesn't match labelstr \fIpattern\fR . +ERROR: label \fIlabel\fR doesn\'t match labelstr \fIpattern\fR \. .RS 4 (error) The label on tape \fIlabel\fR does not match the \fBlabelstr\fR -\fIamanda.conf\fR -option. +\fIamanda\.conf\fR +option\. .RE .PP (expecting a new tape) .RS 4 -(info) The tape is not OK and a new tape was expected. +(info) The tape is not OK and a new tape was expected\. .RE .PP (expecting tape \fIlabel\fR or a new tape) .RS 4 (info) The tape is not OK and either tape \fIlabel\fR -or a new tape was expected. +or a new tape was expected\. .RE .PP -ERROR: tape \fIlabel\fR label ok, but is not writable. +ERROR: tape \fIlabel\fR label ok, but is not writable\. .RS 4 (error) Tape \fIlabel\fR -is OK, but the write enable test failed. +is OK, but the write enable test failed\. .RE .PP -Tape \fIlabel\fR is writable. +Tape \fIlabel\fR is writable\. .RS 4 (info) Tape \fIlabel\fR -is OK and the write enable test succeeded. +is OK and the write enable test succeeded\. .RE .PP -NOTE: skipping tape\-writable test. +NOTE: skipping tape\-writable test\. .RS 4 (info) The tape write test (see the \fB\-w\fR -option) was not enabled. +option) was not enabled\. .RE .PP WARNING: skipping tape test because amdump or amflush seem to be running, WARNING: if they are not, you must run amcleanup @@ -598,54 +588,54 @@ like either \fBamdump\fR or \fBamflush\fR -were running because a log file or amdump file exists. If they are not running, you probably need to run +were running because a log file or amdump file exists\. If they are not running, you probably need to run \fBamcleanup\fR -to clear up a previous failure. Otherwise, you need to wait until they complete before running -\fBamcheck\fR. +to clear up a previous failure\. Otherwise, you need to wait until they complete before running +\fBamcheck\fR\. .RE .PP NOTE: skipping tape checks .RS 4 (info) The tape tests are being skipped because you used the \fB\-t\fR -command line option. +command line option\. .RE .PP WARNING: \fIcompress\fR is not executable, server\-compression and indexing will not work .RS 4 (warning) Compression program \fIcompress\fR -is not executable, so compression on the tape server host and creating index files will not work. +is not executable, so compression on the tape server host and creating index files will not work\. .RE .PP -Tape \fIlabel\fR label ok. +Tape \fIlabel\fR label ok\. .RS 4 (info) Tape \fIlabel\fR -is OK for the next run. +is OK for the next run\. .RE .PP -Server check took \fIS\fR seconds. +Server check took \fIS\fR seconds\. .RS 4 -(info) Reports how long the tape server host checks took. +(info) Reports how long the tape server host checks took\. .RE .PP ERROR: \fIhost\fR: could not resolve hostname .RS 4 (error) Could not look up client hostname -\fIhost\fR. +\fIhost\fR\. .RE .PP -Client check: \fIH\fR hosts checked in \fIS\fR seconds, \fIN\fR problems found. +Client check: \fIH\fR hosts checked in \fIS\fR seconds, \fIN\fR problems found\. .RS 4 -(info) Reports the number of client hosts checked, how long it took and the number of errors detected. +(info) Reports the number of client hosts checked, how long it took and the number of errors detected\. .RE .PP -WARNING: \fIhost\fR: selfcheck request timed out. Host down? +WARNING: \fIhost\fR: selfcheck request timed out\. Host down? .RS 4 (warning) There was no response from \fIhost\fR -when trying to do the client checks. The host might really be down or it might not be configured properly. +when trying to do the client checks\. The host might really be down or it might not be configured properly\. .RE .PP ERROR: \fIhost\fR NAK: \fImessage\fR @@ -654,7 +644,7 @@ ERROR: \fIhost\fR NAK: \fImessage\fR \fIHost\fR reported a negative acknowledgment error of \fImessage\fR -to the status check request. +to the status check request\. .RE .PP ERROR: \fIhost\fR NAK: [NAK parse failed] @@ -662,18 +652,18 @@ ERROR: \fIhost\fR NAK: [NAK parse failed] (error) \fBAmcheck\fR could not parse the negative acknowledgment error from -\fIhost\fR. There might be an +\fIhost\fR\. There might be an \fIAmanda\fR version mismatch between the host running \fBamcheck\fR and -\fIhost\fR. +\fIhost\fR\. .RE .PP ERROR: \fIhost\fR [mutual\-authentication failed] .RS 4 (error) Kerberos authentication failed while contacting -\fIhost\fR. +\fIhost\fR\. .RE .PP ERROR: \fIhost\fR: \fImessage\fR @@ -681,18 +671,26 @@ ERROR: \fIhost\fR: \fImessage\fR (error) Error \fImessage\fR was reported by the status check on -\fIhost\fR. +\fIhost\fR\. .RE +.SH "EXIT CODE" + +The exit code of \fBamcheck\fR is one of: +.nf + 0 = success + 1 = error +.fi .SH "AUTHOR" .PP James da Silva, - + : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP \fBamanda\fR(8), -\fBamdump\fR(8) +\fBamdump\fR(8), +: http://wiki.zmanda.com diff --git a/man/amcheckdb.8 b/man/amcheckdb.8 index c1b6fc3..754c312 100644 --- a/man/amcheckdb.8 +++ b/man/amcheckdb.8 @@ -1,17 +1,17 @@ .\" Title: amcheckdb .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMCHECKDB" "8" "06/06/2007" "" "" +.TH "AMCHECKDB" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amcheckdb \- check Amanda database for tape consistency +amcheckdb - check Amanda database for tape consistency .SH "SYNOPSIS" .HP 10 \fBamcheckdb\fR \fIconfig\fR @@ -22,45 +22,40 @@ verifies that every tape mentioned in the \fIAmanda\fR database is still valid in the \fItapelist\fR -file. +file\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "EXAMPLE" .PP This shows a normal response: -.sp -.RS 4 .nf # amcheckdb daily -Ready. +Ready\. .fi -.RE .PP This shows tape \fIDMP014\fR is still listed in the database but is no longer listed in the \fItapelist\fR file: -.sp -.RS 4 .nf # amcheckdb daily Tape DMP014 missing in /usr/local/etc/amanda//daily/tapelist -Ready. +Ready\. .fi -.RE .SH "AUTHOR" .PP -Adrian T. Filipi\-Martin : Original text +Adrian T\. Filipi\-Martin : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP \fBamadmin\fR(8), \fBamrmtape\fR(8), -\fBamanda\fR(8) +\fBamanda\fR(8), +: http://wiki.zmanda.com diff --git a/man/amcleanup.8 b/man/amcleanup.8 index 4efa160..04dc0f8 100644 --- a/man/amcleanup.8 +++ b/man/amcleanup.8 @@ -1,20 +1,20 @@ .\" Title: amcleanup .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMCLEANUP" "8" "06/06/2007" "" "" +.TH "AMCLEANUP" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amcleanup \- run the Amanda cleanup process after a failure +amcleanup - run the Amanda cleanup process after a failure .SH "SYNOPSIS" .HP 10 -\fBamcleanup\fR \fIconfig\fR +\fBamcleanup\fR [\fB\-k\fR] [\fB\-v\fR] \fIconfig\fR .SH "DESCRIPTION" .PP \fBAmcleanup\fR @@ -22,65 +22,62 @@ generates the \fI\fIAmanda\fR\fR\fI Mail Report\fR and updates the \fIAmanda\fR -databases after a system failure on a tape server host. This cleanup process is normally done automatically as part of the +databases after a system failure on a tape server host\. This cleanup process is normally done automatically as part of the \fBamdump\fR program, but if \fBamdump\fR cannot complete for some reason (usually because of a tape server host crash), \fBamcleanup\fR -must be run some time later (usually during system boot). +must be run some time later (usually during system boot)\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP \fB\-k\fR .RS 4 -Kill all Amanda processes. +Kill all Amanda processes\. +.RE +.PP +\fB\-v\fR +.RS 4 +Generate verbose output\. .RE .SH "EXAMPLES" .PP This example runs the \fIAmanda\fR -cleanup process by hand after a failure. -.sp -.RS 4 +cleanup process by hand after a failure\. .nf % amcleanup daily .fi -.RE .PP -Putting the following line in a system boot script (e.g. -\fI/etc/rc.local\fR) runs the +Putting the following line in a system boot script (e\.g\. +\fI/etc/rc\.local\fR) runs the \fIAmanda\fR -cleanup process as part of the reboot, eliminating the need to run it by hand. -.sp -.RS 4 +cleanup process as part of the reboot, eliminating the need to run it by hand\. .nf /usr/local/sbin/amcleanup daily .fi -.RE .PP If nothing needs to be done, \fBamcleanup\fR exits normally with the message: -.sp -.RS 4 .nf -amcleanup: no unprocessed logfile to clean up. +amcleanup: no unprocessed logfile to clean up\. .fi -.RE .SH "AUTHOR" .PP James da Silva, -: Original text +: Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP \fBamanda\fR(8), -\fBamdump\fR(8) +\fBamdump\fR(8), +: http://wiki.zmanda.com diff --git a/man/amcrypt-ossl-asym.8 b/man/amcrypt-ossl-asym.8 index ee80955..6971d8d 100644 --- a/man/amcrypt-ossl-asym.8 +++ b/man/amcrypt-ossl-asym.8 @@ -1,17 +1,17 @@ .\" Title: amcrypt-ossl-asym .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMCRYPT\-OSSL\-ASYM" "8" "06/06/2007" "" "" +.TH "AMCRYPT\-OSSL\-ASYM" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amcrypt\-ossl\-asym \- crypt program for Amanda asymmetric data encryption using OpenSSL +amcrypt-ossl-asym - crypt program for Amanda asymmetric data encryption using OpenSSL .SH "SYNOPSIS" .HP 18 \fBamcrypt\-ossl\-asym\fR [\-d] @@ -21,74 +21,70 @@ amcrypt\-ossl\-asym \- crypt program for Amanda asymmetric data encryption using \fBamcrypt\-ossl\-asym\fR uses \fBOpenSSL\fR -to encrypt and decrypt data. OpenSSL is available from -\fIwww.openssl.org\fR\&[1]. OpenSSL offers a wide variety of cipher choices ( +to encrypt and decrypt data\. OpenSSL is available from +www\.openssl\.org\. OpenSSL offers a wide variety of cipher choices ( \fBamcrypt\-ossl\-asym\fR -defaults to 256\-bit AES) and can use hardware cryptographic accelerators on several platforms. +defaults to 256\-bit AES) and can use hardware cryptographic accelerators on several platforms\. .PP \fBamcrypt\-ossl\-asym\fR -will search for the OpenSSL program in the following directories: /bin:/usr/bin:/usr/local/bin:/usr/ssl/bin:/usr/local/ssl/bin. +will search for the OpenSSL program in the following directories: /bin:/usr/bin:/usr/local/bin:/usr/ssl/bin:/usr/local/ssl/bin\. .SH "GENERATING PUBLIC AND PRIVATE KEYS" .PP -RSA keys can be generated with the standard OpenSSL commands, e.g.: -.sp -.RS 4 +RSA keys can be generated with the standard OpenSSL commands, e\.g\.: .nf $ cd /var/lib/amanda -$ openssl genrsa \-aes128 \-out backup\-privkey.pem 1024 +$ openssl genrsa \-aes128 \-out backup\-privkey\.pem 1024 Generating RSA private key, 1024 bit long modulus -[...] -Enter pass phrase for backup\-privkey.pem: \fIENTER YOUR PASS PHRASE\fR -Verifying \- Enter pass phrase for backup\-key.pem: \fIENTER YOUR PASS PHRASE\fR +[\.\.\.] +Enter pass phrase for backup\-privkey\.pem: \fIENTER YOUR PASS PHRASE\fR +Verifying \- Enter pass phrase for backup\-key\.pem: \fIENTER YOUR PASS PHRASE\fR -$ openssl rsa \-in backup\-privkey.pem \-pubout \-out backup\-pubkey.pem -Enter pass phrase for backup\-privkey.pem: \fIENTER YOUR PASS PHRASE\fR +$ openssl rsa \-in backup\-privkey\.pem \-pubout \-out backup\-pubkey\.pem +Enter pass phrase for backup\-privkey\.pem: \fIENTER YOUR PASS PHRASE\fR Writing RSA key - .fi -.RE .PP To generate a private key without a passphrase, omit the \fB\-aes128\fR -option. See +option\. See \fBopenssl_genrsa\fR(1) -for more key generation options. +for more key generation options\. .PP -Note that it is always possible to generate the public key from the private key. +Note that it is always possible to generate the public key from the private key\. .SH "KEY AND PASSPHRASE MANAGEMENT" .PP \fBamcrypt\-ossl\-asym\fR uses the \fIpublic key\fR -to encrypt data. The security of the data does not depend on the confidentiality of the public key. The +to encrypt data\. The security of the data does not depend on the confidentiality of the public key\. The \fIprivate key\fR -is used to decrypt data, and must be protected. Encrypted backup data cannot be recovered without the private key. The private key may optionally be encrypted with a passphrase. +is used to decrypt data, and must be protected\. Encrypted backup data cannot be recovered without the private key\. The private key may optionally be encrypted with a passphrase\. .PP -While the public key must be online at all times to perorm backups, the private key and optional passphrase are only needed to restore data. It is recommended that the latter be stored offline all other times. For example, you could keep the private key on removable media, and copy it into place for a restore; or you could keep the private key online, encrypted with a passphrase that is present only for a restore. +While the public key must be online at all times to perorm backups, the private key and optional passphrase are only needed to restore data\. It is recommended that the latter be stored offline all other times\. For example, you could keep the private key on removable media, and copy it into place for a restore; or you could keep the private key online, encrypted with a passphrase that is present only for a restore\. .PP -OpenSSL's key derivation routines use a salt to guard against dictionary attacks on the pass phrase; still it is important to pick a pass phrase that is hard to guess. The Diceware method (see -\fIwww.diceware.com\fR\&[2]) can be used to create passphrases that are difficult to guess and easy to remember. +OpenSSL\'s key derivation routines use a salt to guard against dictionary attacks on the pass phrase; still it is important to pick a pass phrase that is hard to guess\. The Diceware method (see +www\.diceware\.com) can be used to create passphrases that are difficult to guess and easy to remember\. .SH "FILES" .PP -/var/lib/amanda/backup\-privkey.pem +/var/lib/amanda/backup\-privkey\.pem .RS 4 -File containing the RSA private key. It should not be readable by any user other than the +File containing the RSA private key\. It should not be readable by any user other than the \fIAmanda\fR -user. +user\. .RE .PP -/var/lib/amanda/backup\-pubkey.pem +/var/lib/amanda/backup\-pubkey\.pem .RS 4 -File containing the RSA public key. +File containing the RSA public key\. .RE .PP -/var/lib/amanda/.am_passphrase +/var/lib/amanda/\.am_passphrase .RS 4 -File containing the passphrase. It should not be readable by any user other than the +File containing the passphrase\. It should not be readable by any user other than the \fIAmanda\fR -user. +user\. .RE .SH "SEE ALSO" .PP @@ -96,8 +92,9 @@ user. \fBamanda\fR(8), \fBamanda.conf\fR(5), \fBopenssl\fR(1), -\fBamcrypt\-ossl\fR(8) -.SH "REFERENCES" +\fBamcrypt-ossl\fR(8), +: http://wiki.zmanda.com +.SH "NOTES" .IP " 1." 4 www.openssl.org .RS 4 diff --git a/man/amcrypt-ossl.8 b/man/amcrypt-ossl.8 index c172d97..9e4903c 100644 --- a/man/amcrypt-ossl.8 +++ b/man/amcrypt-ossl.8 @@ -1,17 +1,17 @@ .\" Title: amcrypt-ossl .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMCRYPT\-OSSL" "8" "06/06/2007" "" "" +.TH "AMCRYPT\-OSSL" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amcrypt\-ossl \- crypt program for Amanda symmetric data encryption using OpenSSL +amcrypt-ossl - crypt program for Amanda symmetric data encryption using OpenSSL .SH "SYNOPSIS" .HP 13 \fBamcrypt\-ossl\fR [\-d] @@ -21,31 +21,31 @@ amcrypt\-ossl \- crypt program for Amanda symmetric data encryption using OpenSS \fBamcrypt\-ossl\fR uses \fBOpenSSL\fR -to encrypt and decrypt data. OpenSSL is available from -\fIwww.openssl.org\fR\&[1]. OpenSSL offers a wide variety of cipher choices ( +to encrypt and decrypt data\. OpenSSL is available from +www\.openssl\.org\. OpenSSL offers a wide variety of cipher choices ( \fBamcrypt\-ossl\fR -defaults to 256\-bit AES) and can use hardware cryptographic accelerators on several platforms. +defaults to 256\-bit AES) and can use hardware cryptographic accelerators on several platforms\. .PP \fBamcrypt\-ossl\fR -will search for the OpenSSL program in the following directories: /bin:/usr/bin:/usr/local/bin:/usr/ssl/bin:/usr/local/ssl/bin. +will search for the OpenSSL program in the following directories: /bin:/usr/bin:/usr/local/bin:/usr/ssl/bin:/usr/local/ssl/bin\. .SH "PASSPHRASE MANAGEMENT" .PP \fBamcrypt\-ossl\fR -uses the same pass phrase to encrypt and decrypt data. It is very important to store and protect the pass phrase properly. Encrypted backup data can +uses the same pass phrase to encrypt and decrypt data\. It is very important to store and protect the pass phrase properly\. Encrypted backup data can \fBonly\fR -be recovered with the correct passphrase. +be recovered with the correct passphrase\. .PP -OpenSSL's key derivation routines use a salt to guard against dictionary attacks on the pass phrase; still it is important to pick a pass phrase that is hard to guess. The Diceware method (see -\fIwww.diceware.com\fR\&[2]) can be used to create passphrases that are difficult to guess and easy to remember. +OpenSSL\'s key derivation routines use a salt to guard against dictionary attacks on the pass phrase; still it is important to pick a pass phrase that is hard to guess\. The Diceware method (see +www\.diceware\.com) can be used to create passphrases that are difficult to guess and easy to remember\. .SH "FILES" .PP -/var/lib/amanda/.am_passphrase +/var/lib/amanda/\.am_passphrase .RS 4 -File containing the pass phrase. It should not be readable by any user other than the +File containing the pass phrase\. It should not be readable by any user other than the \fIAmanda\fR -user. +user\. .RE .SH "SEE ALSO" .PP @@ -53,8 +53,9 @@ user. \fBamanda\fR(8), \fBamanda.conf\fR(5), \fBopenssl\fR(1), -\fBamcrypt\-ossl\-asym\fR(8) -.SH "REFERENCES" +\fBamcrypt-ossl-asym\fR(8), +: http://wiki.zmanda.com +.SH "NOTES" .IP " 1." 4 www.openssl.org .RS 4 diff --git a/man/amcrypt.8 b/man/amcrypt.8 index 07fab4a..9b3276f 100644 --- a/man/amcrypt.8 +++ b/man/amcrypt.8 @@ -1,17 +1,17 @@ .\" Title: amcrypt .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMCRYPT" "8" "06/06/2007" "" "" +.TH "AMCRYPT" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amcrypt \- reference crypt program for Amanda symmetric data encryption +amcrypt - reference crypt program for Amanda symmetric data encryption .SH "SYNOPSIS" .HP 8 \fBamcrypt\fR @@ -24,12 +24,12 @@ requires \fBuuencode\fR and \fBgpg\fR -to work. Aespipe is available from -\fI\%http://loop\-aes.sourceforge.net\fR +to work\. Aespipe is available from +: http://loop-aes.sourceforge.net .PP \fBamcrypt\fR -will search for the aespipe program in the following directories: /usr/bin:/usr/local/bin:/sbin:/usr/sbin. +will search for the aespipe program in the following directories: /usr/bin:/usr/local/bin:/sbin:/usr/sbin\. .PP \fBamcrypt\fR @@ -37,37 +37,35 @@ calls \fBamaespipe\fR and pass the \fBpassphrase\fR -through file descriptor 3. The passphrase should be stored in ~amanda/.am_passphrase. +through file descriptor 3\. The passphrase should be stored in ~amanda/\.am_passphrase\. .SH "HOW TO CREATE ENCRYPTION KEYS FOR AMCRYPT" .PP -1. Create 65 random encryption keys and encrypt those keys using gpg. Reading from /dev/random may take indefinitely long if kernel's random entropy pool is empty. If that happens, do some other work on some other console (use keyboard, mouse and disks). +1\. Create 65 random encryption keys and encrypt those keys using gpg\. Reading from /dev/random may take indefinitely long if kernel\'s random entropy pool is empty\. If that happens, do some other work on some other console (use keyboard, mouse and disks)\. .PP -head \-c 2925 /dev/random | uuencode \-m \- | head \-n 66 | tail \-n 65 \e | gpg \-\-symmetric \-a > ~amanda/.gnupg/am_key.gpg +head \-c 2925 /dev/random | uuencode \-m \- | head \-n 66 | tail \-n 65 \e | gpg \-\-symmetric \-a > ~amanda/\.gnupg/am_key\.gpg .PP -This will ask for a passphrase. Remember this passphrase as you will need it in the next step. +This will ask for a passphrase\. Remember this passphrase as you will need it in the next step\. .PP -2. Store the passphrase inside the home\-directory of the AMANDA\-user and protect it with proper permissions: -.sp -.RS 4 +2\. Store the passphrase inside the home\-directory of the AMANDA\-user and protect it with proper permissions: .nf -echo my_secret_passphrase > ~amanda/.am_passphrase -chown amanda:disk ~amanda/.am_passphrase -chmod 700 ~amanda/.am_passphrase +echo my_secret_passphrase > ~amanda/\.am_passphrase +chown amanda:disk ~amanda/\.am_passphrase +chmod 700 ~amanda/\.am_passphrase .fi -.RE .SH "KEY AND PASSPHRASE" .PP \fBamcrypt\fR -uses the same key to encrypt and decrypt data. +uses the same key to encrypt and decrypt data\. .PP -It is very important to store and protect the key and the passphrase properly. Encrypted backup data can +It is very important to store and protect the key and the passphrase properly\. Encrypted backup data can \fBonly\fR -be recovered with the correct key and passphrase. +be recovered with the correct key and passphrase\. .SH "SEE ALSO" .PP \fBamanda\fR(8), \fBamanda.conf\fR(5), \fBaespipe\fR(1), \fBamaespipe\fR(8), -\fBgpg\fR(1) +\fBgpg\fR(1), +: http://wiki.zmanda.com diff --git a/man/amdd.8 b/man/amdd.8 index cb058bc..55382d4 100644 --- a/man/amdd.8 +++ b/man/amdd.8 @@ -1,17 +1,17 @@ .\" Title: amdd .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMDD" "8" "06/06/2007" "" "" +.TH "AMDD" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amdd \- Amanda version of dd +amdd - Amanda version of dd .SH "SYNOPSIS" .HP 5 \fBamdd\fR [\-d] [\fIif=input\fR] [\fIof=output\fR] [\fIbs=blocksize\fR] [\fIskip=count\fR] [\fIcount=count\fR] @@ -21,35 +21,35 @@ amdd \- Amanda version of dd provides just enough of the standard UNIX \fBdd\fR command for the needs of -\fIAmanda\fR. This is handy when doing a full restore and the standard +\fIAmanda\fR\. This is handy when doing a full restore and the standard \fBdd\fR -program has not yet been found. +program has not yet been found\. .PP \fBAmdd\fR also provides access to the \fIAmanda\fR -output drivers that support various tape simulations. This may be used for debugging or to convert from one format to another. +output drivers that support various tape simulations\. This may be used for debugging or to convert from one format to another\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. See the +\fIAmanda\fR\. See the \fBOUTPUT DRIVERS\fR section of \fIamanda(8)\fR for more information on the \fIAmanda\fR -output drivers. +output drivers\. .SH "OPTIONS" .PP \fB\-d\fR .RS 4 -Turn on debugging output. +Turn on debugging output\. .RE .PP \fB\-l\fR\fIlength\fR .RS 4 -Set the output length. If the output driver limits the output size, this controls when end of tape will be simulated. +Set the output length\. If the output driver limits the output size, this controls when end of tape will be simulated\. .sp \fILength\fR may have a multiplier suffix: @@ -61,26 +61,26 @@ b \-> 512 (Blocks) M \-> 1024*1024 (Megabytes) .fi .RE -The default is no multiplier (bytes). +The default is no multiplier (bytes)\. .RE .PP \fBif=\fR\fIinput\fR .RS 4 Input to -\fBdd\fR. Default is stdin. +\fBdd\fR\. Default is stdin\. .RE .PP \fBof=\fR\fIoutput\fR .RS 4 Where to send the output of -\fBdd\fR. Default is stdout. +\fBdd\fR\. Default is stdout\. .RE .PP \fBbs=\fR\fIblocksize\fR .RS 4 -Size of each record. Input records smaller than this will +Size of each record\. Input records smaller than this will \fInot\fR -be padded. Output records will be the same size as the corresponding input record. Default is 512 bytes. +be padded\. Output records will be the same size as the corresponding input record\. Default is 512 bytes\. .sp \fIBlocksize\fR may have a multiplier suffix: @@ -92,28 +92,30 @@ b \-> 512 (Blocks) M \-> 1024*1024 (Megabytes) .fi .RE -The default is no multiplier (bytes). +The default is no multiplier (bytes)\. .RE .PP \fBcount=\fR\fIcount\fR .RS 4 -Number of records to copy. Default is all records until end of file. +Number of records to copy\. Default is all records until end of file\. .RE .PP \fBskip=\fR\fIcount\fR .RS 4 -Number of records to skip before copying input to output. Default is zero. +Number of records to skip before copying input to output\. Default is zero\. .RE .SH "AUTHOR" .PP Marc Mengel -, John R. Jackson - +, John R\. Jackson + : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP -\fBamanda\fR(8) + +\fBamanda\fR(8), +: http://wiki.zmanda.com diff --git a/man/amdump.8 b/man/amdump.8 index 52d0757..90b963c 100644 --- a/man/amdump.8 +++ b/man/amdump.8 @@ -1,17 +1,17 @@ .\" Title: amdump .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMDUMP" "8" "06/06/2007" "" "" +.TH "AMDUMP" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amdump \- back up all disks in an Amanda configuration +amdump - back up all disks in an Amanda configuration .SH "SYNOPSIS" .HP 7 \fBamdump\fR \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] [\-o\ \fIconfigoption\fR]... @@ -20,62 +20,59 @@ amdump \- back up all disks in an Amanda configuration \fBAmdump\fR switches to the appropriate \fIAmanda\fR -configuration directory, e.g. /usr/local/etc/amanda/\fIconfig\fR, then attempts to back up every disk specified by the -\fIamanda.conf\fR -file. +configuration directory, e\.g\. /usr/local/etc/amanda/\fIconfig\fR, then attempts to back up every disk specified by the +\fIamanda\.conf\fR +file\. \fBAmdump\fR is normally run by -\fBcron\fR. +\fBcron\fR\. .PP -You can specify many host/disk expressions, only disks that match an expression will be dumped. All disks are dumped if no expressions are given. +You can specify many host/disk expressions, only disks that match an expression will be dumped\. All disks are dumped if no expressions are given\. .PP If the file /usr/local/etc/amanda/\fIconfig\fR/hold exists, \fBamdump\fR -will wait until it is removed before starting the backups. This allows scheduled backups to be delayed when circumstances warrant, for example, if the tape device is being used for some other purpose. While waiting, +will wait until it is removed before starting the backups\. This allows scheduled backups to be delayed when circumstances warrant, for example, if the tape device is being used for some other purpose\. While waiting, \fBamdump\fR -checks for the hold file every minute. +checks for the hold file every minute\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP \fIhost\fR [\fIdisk\fR]* .RS 4 -Specify the host and disk on which the command will work. +Specify the host and disk on which the command will work\. .RE .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .SH "EXAMPLE" .PP -Here is a typical crontab entry. It runs +Here is a typical crontab entry\. It runs \fBamdump\fR -every weeknight at 1 a.m. as user +every weeknight at 1 a\.m\. as user \fBbin\fR: -.sp -.RS 4 .nf 0 1 * * 1\-5 bin /usr/local/sbin/amdump daily .fi -.RE .PP Please see the \fBcrontab\fR(5) or \fBcrontab\fR(1) -manual page for the correct crontab format for your system. +manual page for the correct crontab format for your system\. .SH "MESSAGES" .PP amdump: waiting for hold file to be removed .RS 4 The "hold" file exists and \fBamdump\fR -is waiting for it to be removed before starting backups. +is waiting for it to be removed before starting backups\. .RE .PP amdump: amdump or amflush is already running, or you must run amcleanup @@ -88,25 +85,38 @@ running, or the remains of a previous incomplete \fBamdump\fR or \fBamflush\fR -run. This run is terminated. If the problem is caused by the remains of a previous run, you must execute +run\. This run is terminated\. If the problem is caused by the remains of a previous run, you must execute \fBamcleanup\fR(8) and then rerun -\fBamdump\fR. +\fBamdump\fR\. .RE +.SH "EXIT CODE" + +The exit code of \fBamdump\fR is the ORed value of: +.nf + 0 = success + 1 = error + 2 = a dle give strange message + 4 = a dle failed + 8 = Don\'t know the status of a dle (RESULT_MISSING in the report) + 16 = tape error or no more tape +.fi .SH "AUTHOR" .PP James da Silva, - + : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP + \fBamanda\fR(8), \fBamcheck\fR(8), \fBamcleanup\fR(8), \fBamrestore\fR(8), \fBamflush\fR(8), -\fBcron\fR(8) +\fBcron\fR(8), +: http://wiki.zmanda.com diff --git a/man/amfetchdump.8 b/man/amfetchdump.8 index f83330c..9035990 100644 --- a/man/amfetchdump.8 +++ b/man/amfetchdump.8 @@ -1,24 +1,24 @@ .\" Title: amfetchdump .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMFETCHDUMP" "8" "06/06/2007" "" "" +.TH "AMFETCHDUMP" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amfetchdump \- extract backup images from multiple Amanda tapes. +amfetchdump - extract backup images from multiple Amanda tapes. .SH "SYNOPSIS" .HP 12 -\fBamfetchdump\fR [\-pcClawns] [\-d\ \fIdevice\fR] [\-O\ \fIdirectory\fR] [\-i\ \fIlogfile\fR] [\-b\ \fIblocksize\fR] \fIconfig\fR \fIhostname\fR [\fIdisk\fR\ [\ \fIdate\fR\ [\ \fIlevel\fR\ [\ \fIhostname\fR\ [...]\ ]\ ]\ ]] [\-o\ \fIconfigoption\fR]... +\fBamfetchdump\fR [\-pcClawns] [\-d\ \fIdevice\fR] [\-O\ \fIdirectory\fR] [\-b\ \fIblocksize\fR] \fIconfig\fR \fIhostname\fR [\fIdisk\fR\ [\ \fIdate\fR\ [\ \fIlevel\fR\ [\ \fIhostname\fR\ [\.\.\.]\ ]\ ]\ ]] [\-o\ \fIconfigoption\fR]... .SH "DESCRIPTION" .PP \fBAmfetchdump\fR -pulls one or more matching dumps from tape or from the holding disk, handling the reassembly of multi\-tape split dump files as well as any tape autochanger operations. +pulls one or more matching dumps from tape or from the holding disk, handling the reassembly of multi\-tape split dump files as well as any tape autochanger operations\. .PP It will automatically use the logs created by \fBamdump\fR(8) @@ -26,7 +26,7 @@ to locate available dumps on tape, in the same way that the \fBfind\fR feature of \fBamadmin\fR(8) -lists available dumps. If these logs are unavailable, it can search tape\-by\-tape to find what it needs, and can generate new logs to serve as an emergency tape inventory. +lists available dumps\. If these logs are unavailable, it can search tape\-by\-tape to find what it needs, and can generate new logs to serve as an emergency tape inventory\. .PP The \fIhostname\fR, @@ -36,111 +36,105 @@ The dump pattern\-matching works as in \fBamrestore\fR(8), with the added requirement that at minimum a \fIhostname\fR -must be specified when not in inventory mode. +must be specified when not in inventory mode\. .PP Unless \fB\-p\fR is used, backup images are extracted to files in the current directory named: .PP -\fIhostname.diskname.datestamp.dumplevel\fR +\fIhostname\.diskname\.datestamp\.dumplevel\fR .SH "OPTIONS" .PP \fB\-p\fR .RS 4 Pipe exactly one complete dump file to -\fIstdout\fR, instead of writing the file to disk. This will restore only the first matching dumpfile (where "first" is determined by the dump log search facility). +\fIstdout\fR, instead of writing the file to disk\. This will restore only the first matching dumpfile (where "first" is determined by the dump log search facility)\. .RE .PP \fB\-d\fR \fIdevice\fR .RS 4 -Restore from this tape device instead of the default. +Restore from this tape device instead of the default\. .RE .PP \fB\-O\fR \fIdirectory\fR .RS 4 -Output restored files to this directory, instead of to the current working directory. +Output restored files to this directory, instead of to the current working directory\. .RE .PP \fB\-c\fR .RS 4 -Compress output, fastest method available. +Compress output, fastest method available\. .RE .PP \fB\-C\fR .RS 4 -Compress output, smallest file size method available. +Compress output, smallest file size method available\. .RE .PP \fB\-l\fR .RS 4 -Leave dumps in the compressed/uncompressed state in which they were found on tape. By default, +Leave dumps in the compressed/uncompressed state in which they were found on tape\. By default, \fBamfetchdump\fR -will automatically uncompress when restoring. +will automatically uncompress when restoring\. .RE .PP \fB\-a\fR .RS 4 -Assume that all tapes are already available, via tape changer or otherwise, instead of prompting the operator to ensure that all tapes are loaded. -.RE -.PP -\fB\-i\fR \fIfilename\fR -.RS 4 -Generate an inventory of all dumps "seen" on the tapes we search, for later use as a log. +Assume that all tapes are already available, via tape changer or otherwise, instead of prompting the operator to ensure that all tapes are loaded\. .RE .PP \fB\-w\fR .RS 4 -Wait to put split dumps together until all chunks have been restored. Normally, +Wait to put split dumps together until all chunks have been restored\. Normally, \fBamfetchdump\fR -will attempt to read pieces of a split file from tape in order, so that it can assemble them simply by appending each file to the first. This option disables the appending behavior, and instead restores each piece as an individual file and reassembles them only after all have been restored. +will attempt to read pieces of a split file from tape in order, so that it can assemble them simply by appending each file to the first\. This option disables the appending behavior, and instead restores each piece as an individual file and reassembles them only after all have been restored\. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR -This requires at least double the size of your dump in free disk space, in order to build the final assembled dumpfile. +Note +This requires at least double the size of your dump in free disk space, in order to build the final assembled dumpfile\. -This behavior is implicitly invoked in circumstances where knowing the location of all dumps on tape in advance is not possible, such as when you are restoring without log files. +This behavior is implicitly invoked in circumstances where knowing the location of all dumps on tape in advance is not possible, such as when you are restoring without log files\. .RE .PP \fB\-n\fR .RS 4 -Do not reassemble split dump files at all, just restore each piece as an individual file. +Do not reassemble split dump files at all, just restore each piece as an individual file\. .RE .PP \fB\-s\fR .RS 4 -Do not fast\-forward straight to needed files on tape. This will slow down most restores substantially. Only use this option if your tape drive does not properly support the fast\-forward operation. +Do not fast\-forward straight to needed files on tape\. This will slow down most restores substantially\. Only use this option if your tape drive does not properly support the fast\-forward operation\. .RE .PP \fB\-b\fR \fIblocksize\fR .RS 4 -Force a particular block size when reading from tapes. This value will usually be autodetected, and should not normally need to be set. +Force a particular block size when reading from tapes\. This value will usually be autodetected, and should not normally need to be set\. .RE .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .SH "EXAMPLES" .PP All the examples here assume your configuration is called -\fISetA\fR. +\fISetA\fR\. .PP -Here's a simple case, restoring all known dumps of the host vanya to the current working directory. +Here\'s a simple case, restoring all known dumps of the host vanya to the current working directory\. .sp .RS 4 .nf $ amfetchdump SetA vanya .fi .RE -.sp .PP -A more likely scenario involves restoring a particular dump from a particular date. We'll pipe this one to +A more likely scenario involves restoring a particular dump from a particular date\. We\'ll pipe this one to \fBGNU\-tar\fR -as well, to automatically extract the dump. +as well, to automatically extract the dump\. .sp .RS 4 .nf @@ -148,51 +142,26 @@ $ amfetchdump \-p SetA vanya /home 20051020 | gtar \-xvpf \- .fi .RE .sp -.PP -In a situation where all of our dump logs have been wiped out, we could also use amfetchdump to inventory our tapes and recreate an imitation of those logs, which we'll send to -\fIstdout\fR -for casual perusal. - -.sp -.RS 4 -.nf -$ amfetchdump \-i \- SetA -.fi -.RE -.sp - -.PP -Note that you can specify a restore while in inventory mode, and -\fBamfetchdump\fR -will continue searching for more dumps from this host even after successfully restoring a dump, inventorying all the while. If your backup searcher has been trashed, this is a handy way to recover what you have. - -.sp -.RS 4 -.nf -$ amfetchdump \-i /var/amanda/log SetA backupserver -.fi -.RE -.sp - .SH "CAVEATS" .PP \fBAmfetchdump\fR -is dependent on accessing your server's config, tape changer, and (normally) dump logs. As such, it's not necessarily the most useful tool when those have all been wiped out and you desperately need to pull things from your tape. Pains have been taken to make it as capable as possible, but for seriously minimialist restores, look to +is dependent on accessing your server\'s config, tape changer, and (normally) dump logs\. As such, it\'s not necessarily the most useful tool when those have all been wiped out and you desperately need to pull things from your tape\. Pains have been taken to make it as capable as possible, but for seriously minimialist restores, look to \fBamrestore\fR(8) or \fBdd\fR(8) -instead. +instead\. .SH "AUTHOR" .PP John Stange, -, National Academies Press +, National Academies Press .PP Ian Turner, -: XML\-conversion +: XML\-conversion .SH "SEE ALSO" .PP \fBamanda\fR(8), \fBamadmin\fR(8), \fBamrestore\fR(8), -\fBtar\fR(1) -\fBrestore\fR(8) +\fBtar\fR(1), +\fBrestore\fR(8), +: http://wiki.zmanda.com diff --git a/man/amflush.8 b/man/amflush.8 index ba1b3e3..7568e40 100644 --- a/man/amflush.8 +++ b/man/amflush.8 @@ -1,17 +1,17 @@ .\" Title: amflush .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMFLUSH" "8" "06/06/2007" "" "" +.TH "AMFLUSH" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amflush \- flush Amanda backup files from holding disk to tape +amflush - flush Amanda backup files from holding disk to tape .SH "SYNOPSIS" .HP 8 \fBamflush\fR [\-b] [\-f] [\-s] [\-D\ \fIdatestamp\fR] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...] [\-o\ \fIconfigoption\fR]... @@ -22,122 +22,131 @@ writes \fIAmanda\fR backups from the holding disks to tape, and updates the \fIAmanda\fR -info database and tapelist accordingly. Backups may stay in a holding disk when something is wrong with the tape at the time +info database and tapelist accordingly\. Backups may stay in a holding disk when something is wrong with the tape at the time \fBamdump\fR -is run. When this happens, the problem must be corrected and +is run\. When this happens, the problem must be corrected and \fBamflush\fR -run by hand. +run by hand\. .SH "OPTIONS" .PP \fB\-b\fR .RS 4 Run \fBamflush\fR -in batch mode. All datestamps are selected unless specified. The flush is started without confirmation. +in batch mode\. All datestamps are selected unless specified\. The flush is started without confirmation\. .RE .PP \fB\-f\fR .RS 4 Run \fBamflush\fR -in foreground. +in foreground\. \fBAmflush\fR -normally detaches itself from the tty and runs as a background process. With the +normally detaches itself from the tty and runs as a background process\. With the \fB\-f\fR option, \fBamflush\fR -stays in the foreground. This is useful if +stays in the foreground\. This is useful if \fBamflush\fR -is run as part of another script that, for example, advances the tape after the flush is completed. +is run as part of another script that, for example, advances the tape after the flush is completed\. .RE .PP \fB\-s\fR .RS 4 -Write log to stdout/stderr instead of the amflush log file. Requires the +Write log to stdout/stderr instead of the amflush log file\. Requires the \fB\-f\fR -option. +option\. .RE .PP \fB\-D datestamp\fR .RS 4 specify a datestamp expression you want to flush, see the "DATESTAMP EXPRESSION" section of \fBamanda\fR(8) -for a description. +for a description\. \fB\-D 20001225\-7\fR -will flush all dumps from 25 december 2000 to 27 december 2000. +will flush all dumps from 25 december 2000 to 27 december 2000\. .RE .PP \fIhost\fR [\fIdisk\fR]* .RS 4 -Specify the host and disk on which the command will work. +Specify the host and disk on which the command will work\. .RE .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .PP -You can specify many host/disk expressions, only disks that match an expression will be flushed. All disks are flushed if no expressions are given. see the "HOST & DISK EXPRESSION" section of +You can specify many host/disk expressions, only disks that match an expression will be flushed\. All disks are flushed if no expressions are given\. see the "HOST & DISK EXPRESSION" section of \fBamanda\fR(8) -for a description. +for a description\. .PP \fBAmflush\fR will look in the holding disks specified by the -\fIamanda.conf\fR +\fIamanda\.conf\fR file in /usr/local/etc/amanda/\fIconfig\fR for any non\-empty \fIAmanda\fR -work directories. It then prompts you to select a directory or to process all of the directories. The work directories in the holding disks are named by the date at the time +work directories\. It then prompts you to select a directory or to process all of the directories\. The work directories in the holding disks are named by the date at the time \fBamdump\fR -was run, e.g. -19910215. +was run, e\.g\. +19910215\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "EXAMPLE" .PP \fBAmflush\fR will search for holding areas associated with the \fIdaily\fR -configuration. After you select which holding area to flush, +configuration\. After you select which holding area to flush, \fBamflush\fR writes the data to tape, updates the databases and sends a mail report similar to -\fBamdump\fR(8). -.sp -.RS 4 +\fBamdump\fR(8)\. .nf % amflush daily -Scanning /amanda\-hold... - 20001113: found \fIAmanda\fR directory. - 20001114: found \fIAmanda\fR directory. +Scanning /amanda\-hold\.\.\. + 20001113: found \fIAmanda\fR directory\. + 20001114: found \fIAmanda\fR directory\. Multiple \fIAmanda\fR directories, please pick one by letter: - A. 20001113 - B. 20001114 -Select directories to flush [A..B]: [ALL] all + A\. 20001113 + B\. 20001114 +Select directories to flush [A\.\.B]: [ALL] all Flushing dumps in 20001113, 20001114, today: 20001117 -to tape drive /dev/rmt/0mn. -Expecting tape DMP014 or a new tape. (The last dumps were to tape DMP013) +to tape drive /dev/rmt/0mn\. +Expecting tape DMP014 or a new tape\. (The last dumps were to tape DMP013) Are you sure you want to do this? yes -Running in background, you can log off now. -You'll get mail when amflush is finished. +Running in background, you can log off now\. +You\'ll get mail when amflush is finished\. +.fi +.SH "EXIT CODE" + +The exit code of \fBamflush\fR is the ORed value of: +.nf + 0 = success + 1 = error + 4 = a dle failed + 8 = Don\'t know the status of a dle (RESULT_MISSING in the report) + 16 = tape error or no more tape .fi -.RE .SH "AUTHOR" .PP James da Silva, - + : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP + \fBamanda\fR(8), -\fBamdump\fR(8) +\fBamdump\fR(8), +: http://wiki.zmanda.com diff --git a/man/amgetconf.8 b/man/amgetconf.8 index b2f6d96..753a845 100644 --- a/man/amgetconf.8 +++ b/man/amgetconf.8 @@ -1,17 +1,17 @@ .\" Title: amgetconf .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMGETCONF" "8" "06/06/2007" "" "" +.TH "AMGETCONF" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amgetconf \- look up amanda.conf variables +amgetconf - look up amanda.conf variables .SH "SYNOPSIS" .HP 10 \fBamgetconf\fR [\fIconfig\fR] [\fI\-\-list\fR] \fIparameter\fR [\-o\ \fIconfigoption\fR]... @@ -19,78 +19,75 @@ amgetconf \- look up amanda.conf variables .PP \fBAmgetconf\fR looks up parameters in -\fIamanda.conf\fR, the +\fIamanda\.conf\fR, the \fIAmanda\fR -configuration file, or from the build and runtime environment, and returns their corresponding value. +configuration file, or from the build and runtime environment, and returns their corresponding value\. .PP If \fIconfig\fR is not specified, \fBamgetconf\fR assumes it is being run from the configuration directory and that -\fIamanda.conf\fR -is present. +\fIamanda\.conf\fR +is present\. .PP If \fIparameter\fR begins with -\fIbuild.\fR, the (case insensitive) string following the period is a build environment variable. Variables without a value (e.g. +\fIbuild\.\fR, the (case insensitive) string following the period is a build environment variable\. Variables without a value (e\.g\. \fIXFSDUMP\fR -on a system that does not support that type of file system) will not report an error and will return an empty string as the value. Flag variables (e.g. +on a system that does not support that type of file system) will not report an error and will return an empty string as the value\. Flag variables (e\.g\. \fIUSE_AMANDAHOSTS\fR) will return 1 -if the flag is set or an empty string if it is not. +if the flag is set or an empty string if it is not\. .PP If \fIparameter\fR begins with -\fIdbopen.\fR, the string following the period is a program name and an +\fIdbopen\.\fR, the string following the period is a program name and an \fIAmanda\fR -debug file will be created for the caller. The name of the file is returned. +debug file will be created for the caller\. The name of the file is returned\. .PP If \fIparameter\fR begins with -\fIdbclose.\fR, the string following the period is a program name previously used with -\fIdbopen.\fR, followed by a colon (:) and the previously opened file name. +\fIdbclose\.\fR, the string following the period is a program name previously used with +\fIdbopen\.\fR, followed by a colon (:) and the previously opened file name\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP \fB\-\-list\fR .RS 4 -The parameter must be 'tapetype', 'dumptype, 'holdingdisk' or 'interface'. It will output, one by line, the list of identifier for the parameter. -.RS 4 +The parameter must be \'tapetype\', \'dumptype, \'holdingdisk\' or \'interface\'\. It will output, one by line, the list of identifier for the parameter\. .PP \-\-list tapetype .RS 4 -Output the list of tapetype, one by line. +Output the list of tapetype, one by line\. .RE .PP \-\-list dumptype .RS 4 -Output the list of dumptype, one by line. +Output the list of dumptype, one by line\. .RE .PP \-\-list holdingdisk .RS 4 -Output the list of holdingdisk, one by line. +Output the list of holdingdisk, one by line\. .RE .PP \-\-list interface .RS 4 -Output the list of interface, one by line. -.RE +Output the list of interface, one by line\. .RE .RE .PP \fBparameter\fR .RS 4 It could be one of the below format: -.RS 4 .PP runtapes .RS 4 @@ -112,12 +109,11 @@ HOLDINGDISK:hd1:use .RS 4 .RE .RE -.RE .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .SH "EXAMPLE" .PP @@ -129,7 +125,6 @@ Find out the path to the log file directory: /usr/local/etc/amanda//daily .fi .RE -.sp .PP Find out the current tape type: .sp @@ -139,25 +134,23 @@ Find out the current tape type: DLT4000\-IV .fi .RE -.sp .PP Find out the default configuration directory: .sp .RS 4 .nf -% amgetconf daily build.CONFIG_DIR +% amgetconf daily build\.CONFIG_DIR /usr/local/etc/amanda/ .fi .RE -.sp .PP Create, use and close a debug file in a script: .sp .RS 4 .nf -% set debug_file = `amgetconf daily dbopen.myscript` +% set debug_file = `amgetconf daily dbopen\.myscript` % echo debug information >> $debug_file -% amgetconf daily dbclose.myscript:$debug_file +% amgetconf daily dbclose\.myscript:$debug_file .fi .RE .sp @@ -167,10 +160,12 @@ amgetconf: no such parameter \fIparam\fR .RS 4 Parameter \fIparam\fR -is not a known keyword (e.g. not a valid -\fIamanda.conf\fR -keyword). +is not a known keyword (e\.g\. not a valid +\fIamanda\.conf\fR +keyword)\. .RE .SH "SEE ALSO" .PP -\fBamanda\fR(8) + +\fBamanda\fR(8), +: http://wiki.zmanda.com diff --git a/man/amlabel.8 b/man/amlabel.8 index 9fdfd0e..f57e013 100644 --- a/man/amlabel.8 +++ b/man/amlabel.8 @@ -1,17 +1,17 @@ .\" Title: amlabel .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMLABEL" "8" "06/06/2007" "" "" +.TH "AMLABEL" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amlabel \- label an Amanda tape +amlabel - label an Amanda tape .SH "SYNOPSIS" .HP 8 \fBamlabel\fR [\-f] \fIconfig\fR \fIlabel\fR [slot\ \fIslot\fR] [\-o\ \fIconfigoption\fR]... @@ -19,60 +19,60 @@ amlabel \- label an Amanda tape .PP All \fIAmanda\fR -tapes must be pre\-labeled before they are used. +tapes must be pre\-labeled before they are used\. \fIAmanda\fR verifies the label in \fBamdump\fR and \fBamflush\fR -before writing to make sure the proper tape is loaded. +before writing to make sure the proper tape is loaded\. .PP \fBAmlabel\fR writes an \fIAmanda\fR label on the tape in the device specified by the -\fIamanda.conf\fR -file in /usr/local/etc/amanda/\fIconfig\fR. +\fIamanda\.conf\fR +file in /usr/local/etc/amanda/\fIconfig\fR\. \fILabel\fR may be any string that does not contain whitespace and that matches the -\fIamanda.conf\fR +\fIamanda\.conf\fR \fBlabelstr\fR -regular expression option. It is up to the system administrator to define a naming convention. +regular expression option\. It is up to the system administrator to define a naming convention\. .PP \fBAmlabel\fR appends the new tape to the \fItapelist\fR file so it will be used by \fIAmanda\fR -before it reuses any other tapes. When you +before it reuses any other tapes\. When you \fBamlabel\fR multiple tapes, they will be used in the order you \fBamlabel\fR -them. +them\. .PP \fBAmlabel\fR will not write the label if the tape contains an active \fIAmanda\fR -tape or if the label specified is on an active tape. The +tape or if the label specified is on an active tape\. The \fB\-f\fR -(force) flag bypasses these verifications. +(force) flag bypasses these verifications\. .PP An optional \fIslot\fR -may be specified after the tape label. If a tape changer is in use, +may be specified after the tape label\. If a tape changer is in use, \fBamlabel\fR -will label the tape in the specified slot instead of the currently loaded tape. +will label the tape in the specified slot instead of the currently loaded tape\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .SH "EXAMPLE" .PP @@ -80,24 +80,18 @@ Write an \fIAmanda\fR label with the string "DMP000" on the tape loaded in the device named in the \fBtapedev\fR -option in /usr/local/etc/amanda/daily/amanda.conf: -.sp -.RS 4 +option in /usr/local/etc/amanda/daily/amanda\.conf: .nf % amlabel daily DMP000 .fi -.RE .PP Label the tape in slot 3 of the currently configured tape changer with the string "DMP003": -.sp -.RS 4 .nf % amlabel daily DMP003 slot 3 .fi -.RE .SH "MESSAGES" .PP -label \fIlabel\fR doesn't match labelstr \fIstr\fR +label \fIlabel\fR doesn\'t match labelstr \fIstr\fR .RS 4 Label \fIlabel\fR @@ -106,7 +100,7 @@ on the command line does not match the regular expression \fIstr\fR from -\fIamanda.conf\fR. +\fIamanda\.conf\fR\. .RE .PP label \fIlabel\fR already on a tape @@ -115,7 +109,7 @@ Label \fIlabel\fR is already listed as an active \fIAmanda\fR -tape. +tape\. .RE .PP no tpchanger specified in \fIpath\fR , so slot command invalid @@ -123,10 +117,10 @@ no tpchanger specified in \fIpath\fR , so slot command invalid The command line has the \fBslot\fR parameter but the -\fIamanda.conf\fR +\fIamanda\.conf\fR file in \fIpath\fR -does not have a tape changer configured. +does not have a tape changer configured\. .RE .PP reading label \fIlabel\fR, tape is in another amanda configuration @@ -137,7 +131,7 @@ tape, but label does not match \fBlabelstr\fR for this configuration so it is probably part of a different \fIAmanda\fR -configuration. +configuration\. .RE .PP reading label \fIlabel\fR, tape is active @@ -146,7 +140,7 @@ Tape \fIlabel\fR appears to already be part of this \fIAmanda\fR -configuration and active, i.e. has valid data on it. +configuration and active, i\.e\. has valid data on it\. .RE .PP no label found, are you sure \fItape\fR is non\-rewinding? @@ -156,18 +150,19 @@ While checking that the label was written correctly, got an error that might be caused by mis\-configuring \fIAmanda\fR with a rewinding tape device name instead of a non\-rewinding device name for -\fItape.\fR +\fItape\.\fR .RE .SH "AUTHOR" .PP James da Silva, -: Original text +: Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP -\fBamanda\fR(8) -\fBamdump\fR(8) -\fBamflush\fR(8) +\fBamanda\fR(8), +\fBamdump\fR(8), +\fBamflush\fR(8), +: http://wiki.zmanda.com diff --git a/man/ammt.8 b/man/ammt.8 index e56e038..1283e23 100644 --- a/man/ammt.8 +++ b/man/ammt.8 @@ -1,17 +1,17 @@ .\" Title: ammt .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMMT" "8" "06/06/2007" "" "" +.TH "AMMT" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -ammt \- Amanda version of mt +ammt - Amanda version of mt .SH "SYNOPSIS" .HP 5 \fBammt\fR [\-d] [\-f | \-t | \fIdevice\fR] \fIcommand\fR [\fIcount\fR] @@ -21,145 +21,143 @@ ammt \- Amanda version of mt provides just enough of the standard UNIX \fBmt\fR command for the needs of -\fIAmanda\fR. This is handy when doing a full restore and the standard +\fIAmanda\fR\. This is handy when doing a full restore and the standard \fBmt\fR -program has not yet been found. +program has not yet been found\. .PP \fBAmmt\fR also provides access to the \fIAmanda\fR -output drivers that support various tape simulations. +output drivers that support various tape simulations\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. See the +\fIAmanda\fR\. See the \fBOUTPUT DRIVERS\fR section of \fIamanda(8)\fR for more information on the \fIAmanda\fR -output drivers. +output drivers\. .SH "OPTIONS" .PP \fB\-d\fR .RS 4 -Turn on debugging output. +Turn on debugging output\. .RE .PP \fB\-f\fR\fI device\fR .RS 4 Access tape device -\fIdevice\fR. If not specified, the +\fIdevice\fR\. If not specified, the \fBTAPE\fR -environment variable is used. +environment variable is used\. .RE .PP \fB\-t\fR\fI device\fR .RS 4 Same as -\fB\-f\fR. +\fB\-f\fR\. .RE .PP \fBcommand\fR\fI count\fR .RS 4 -Which command to issue, and an optional count of operations. +Which command to issue, and an optional count of operations\. .RE .SH "COMMANDS" .PP -Each command may be abbreviated to whatever length makes it unique. +Each command may be abbreviated to whatever length makes it unique\. .PP \fBeof|weof\fR\fI count\fR .RS 4 Write \fIcount\fR -(default: 1) end of file marks (tapemarks). +(default: 1) end of file marks (tapemarks)\. .RE .PP \fBfsf\fR\fI count\fR .RS 4 Skip forward \fIcount\fR -(default: 1) files. +(default: 1) files\. .RE .PP \fBbsf\fR\fI count\fR .RS 4 Skip backward \fIcount\fR -(default: 1) files. +(default: 1) files\. .RE .PP \fBasf\fR\fI count\fR .RS 4 Position to file number \fIcount\fR -(default: 0) where zero is beginning of tape. This is the same as a +(default: 0) where zero is beginning of tape\. This is the same as a \fBrewind\fR followed by a \fBfsf\fR -\fIcount\fR. +\fIcount\fR\. .RE .PP \fBrewind\fR .RS 4 -Rewind to beginning of tape. +Rewind to beginning of tape\. .RE .PP \fBoffline|rewoffl\fR .RS 4 -Rewind to beginning of tape and unload the tape from the drive. +Rewind to beginning of tape and unload the tape from the drive\. .RE .PP \fBstatus\fR .RS 4 -Report status information about the drive. Which data reported, and what it means, depends on the underlying operating system, and may include: -.RS 4 +Report status information about the drive\. Which data reported, and what it means, depends on the underlying operating system, and may include: .PP ONLINE .RS 4 -Indicates the drive is online and ready. +Indicates the drive is online and ready\. .RE .PP OFFLINE .RS 4 -Indicates the drive is offline or not ready. +Indicates the drive is offline or not ready\. .RE .PP BOT .RS 4 -Indicates the drive is at beginning of tape. +Indicates the drive is at beginning of tape\. .RE .PP EOT .RS 4 -Indicates the drive is at end of tape. +Indicates the drive is at end of tape\. .RE .PP PROTECTED .RS 4 -Indicates the tape is write protected. +Indicates the tape is write protected\. .RE .PP ds .RS 4 -Device status. +Device status\. .RE .PP er .RS 4 -Error register. +Error register\. .RE .PP fileno .RS 4 -Current tape file number. +Current tape file number\. .RE .PP blkno .RS 4 -Current tape block number file. -.RE +Current tape block number file\. .RE .RE .sp @@ -167,18 +165,19 @@ Current tape block number file. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR +Note .PP -Many systems only report good data when a tape is in the drive and ready. +Many systems only report good data when a tape is in the drive and ready\. .SH "AUTHOR" .PP Marc Mengel -, John R. Jackson -: Original text +, John R\. Jackson +: Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP -\fBamanda\fR(8) +\fBamanda\fR(8), +: http://wiki.zmanda.com diff --git a/man/amplot.8 b/man/amplot.8 index af60547..6da1ecf 100644 --- a/man/amplot.8 +++ b/man/amplot.8 @@ -1,17 +1,17 @@ .\" Title: amplot .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMPLOT" "8" "06/06/2007" "" "" +.TH "AMPLOT" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amplot \- visualize the behavior of Amanda +amplot - visualize the behavior of Amanda .SH "SYNOPSIS" .HP 7 \fBamplot\fR [\-b] [\-c] [\-e] [\-g] [\-l] [\-p] [\-t\ \fIT\fR] \fIamdump_files\fR @@ -24,85 +24,85 @@ reads an \fBamdump\fR output file that \fIAmanda\fR -generates each run (e.g. -\fIamdump.1\fR) and translates the information into a picture format that may be used to determine how your installation is doing and if any parameters need to be changed. +generates each run (e\.g\. +\fIamdump\.1\fR) and translates the information into a picture format that may be used to determine how your installation is doing and if any parameters need to be changed\. \fBAmplot\fR also prints out \fBamdump\fR -lines that it either does not understand or knows to be warning or error lines and a summary of the start, end and total time for each backup image. +lines that it either does not understand or knows to be warning or error lines and a summary of the start, end and total time for each backup image\. .PP \fBAmplot\fR is a shell script that executes an \fBawk\fR program -(\fIamplot.awk\fR) to scan the +(\fIamplot\.awk\fR) to scan the \fBamdump\fR -output file. It then executes a +output file\. It then executes a \fBgnuplot\fR program -(\fIamplot.g\fR) to generate the graph. The +(\fIamplot\.g\fR) to generate the graph\. The \fBawk\fR program is written in an enhanced version of awk, such as GNU awk (\fIgawk\fR -version 2.15 or later) or -\fBnawk\fR. +version 2\.15 or later) or +\fBnawk\fR\. .PP During execution, \fBamplot\fR generates a few temporary files that \fBgnuplot\fR -uses. These files are deleted at the end of execution. +uses\. These files are deleted at the end of execution\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP \fB\-b\fR .RS 4 Generate b/w postscript file (need -\fB\-p\fR). +\fB\-p\fR)\. .RE .PP \fB\-c\fR .RS 4 Compress \fIamdump_files\fR -after plotting. +after plotting\. .RE .PP \fB\-e\fR .RS 4 -Extend the X (time) axis if needed. +Extend the X (time) axis if needed\. .RE .PP \fB\-g\fR .RS 4 Direct \fIgnuplot\fR -output directly to the X11 display (default). +output directly to the X11 display (default)\. .RE .PP \fB\-p\fR .RS 4 Direct postscript output to file -\fIYYYYMMDD\fR\fI.ps\fR +\fIYYYYMMDD\fR\fI\.ps\fR (opposite of -\fB\-g\fR). +\fB\-g\fR)\. .RE .PP \fB\-l\fR .RS 4 Generate landscape oriented output (needs -\fB\-p\fR). +\fB\-p\fR)\. .RE .PP \fB\-t \fR\fIT\fR .RS 4 Set the right edge of the plot to be \fIT\fR -hours. +hours\. .RE .PP The @@ -111,43 +111,43 @@ may be in various compressed formats (\fIcompress\fR, \fBgzip\fR, \fBpact\fR, -\fBcompact\fR). +\fBcompact\fR)\. .SH "INTERPRETATION" .PP -The figure is divided into a number of regions. There are titles on the top that show important statistical information about the configuration and from this execution of -\fBamdump\fR. In the figure, the X axis is time, with 0 being the moment +The figure is divided into a number of regions\. There are titles on the top that show important statistical information about the configuration and from this execution of +\fBamdump\fR\. In the figure, the X axis is time, with 0 being the moment \fBamdump\fR -was started. The Y axis is divided into 5 regions: +was started\. The Y axis is divided into 5 regions: .PP \fIQUEUES:\fR -How many backups have not been started, how many are waiting on space in the holding disk and how many have been transferred successfully to tape. +How many backups have not been started, how many are waiting on space in the holding disk and how many have been transferred successfully to tape\. .PP \fI%BANDWIDTH:\fR -Percentage of allowed network bandwidth in use. +Percentage of allowed network bandwidth in use\. .PP \fIHOLDING DISK:\fR -The higher line depicts space allocated on the holding disk to backups in progress and completed backups waiting to be written to tape. The lower line depicts the fraction of the holding disk containing completed backups waiting to be written to tape including the file currently being written to tape. The scale is percentage of the holding disk. +The higher line depicts space allocated on the holding disk to backups in progress and completed backups waiting to be written to tape\. The lower line depicts the fraction of the holding disk containing completed backups waiting to be written to tape including the file currently being written to tape\. The scale is percentage of the holding disk\. .PP \fITAPE:\fR -Tape drive usage. +Tape drive usage\. .PP \fI%DUMPERS:\fR -Percentage of active dumpers. +Percentage of active dumpers\. .PP The idle period at the left of the graph is time \fBamdump\fR -is asking the machines how much data they are going to dump. This process can take a while if hosts are down or it takes them a long time to generate estimates. +is asking the machines how much data they are going to dump\. This process can take a while if hosts are down or it takes them a long time to generate estimates\. .SH "AUTHOR" .PP Olafur Gudmundsson -, Trusted Information Systems, formerly at University of Maryland, College Park: Original text +, Trusted Information Systems, formerly at University of Maryland, College Park: Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "BUGS" .PP -Reports lines it does not recognize, mainly error cases but some are legitimate lines the program needs to be taught about. +Reports lines it does not recognize, mainly error cases but some are legitimate lines the program needs to be taught about\. .SH "SEE ALSO" .PP \fBamanda\fR(8), @@ -158,4 +158,5 @@ Reports lines it does not recognize, mainly error cases but some are legitimate \fBgnuplot\fR(1), \fBsh\fR(1), \fBcompress\fR(1), -\fBgzip\fR(1) +\fBgzip\fR(1), +: http://wiki.zmanda.com diff --git a/man/amrecover.8 b/man/amrecover.8 index 083fa49..01608fb 100644 --- a/man/amrecover.8 +++ b/man/amrecover.8 @@ -1,17 +1,17 @@ .\" Title: amrecover .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMRECOVER" "8" "06/06/2007" "" "" +.TH "AMRECOVER" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amrecover \- Amanda index database browser +amrecover - Amanda index database browser .SH "SYNOPSIS" .HP 10 \fBamrecover\fR [\-C\ \fIconfig\fR] [\-s\ \fIindex\-server\fR] [\-t\ \fItape\-server\fR] [\-d\ \fItape\-device\fR] [\-o\ \fIconfigoption\fR]... @@ -20,80 +20,80 @@ amrecover \- Amanda index database browser \fBAmrecover\fR browses the database of \fIAmanda\fR -index files to determine which tapes contain files to recover. Furthermore, it is able to recover files. +index files to determine which tapes contain files to recover\. Furthermore, it is able to recover files\. .PP In order to restore files in place, you must invoke \fBamrecover\fR from the root of the backed up filesystem, or use \fBlcd\fR -to move into that directory, otherwise a directory tree that resembles the backed up filesystem will be created in the current directory. See the examples below for details. +to move into that directory, otherwise a directory tree that resembles the backed up filesystem will be created in the current directory\. See the examples below for details\. .PP Amrecover will read the -\fBamanda\-client.conf\fR +\fBamanda\-client\.conf\fR file and the -\fIconfig\fR\fB/amanda\-client.conf\fR -file. +\fIconfig\fR\fB/amanda\-client\.conf\fR +file\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -\fBNote\fR +Note .PP -The Default values are those set at compile\-time. Use +The Default values are those set at compile\-time\. Use \fBamrestore\fR -to recover client\-encrypted or client\-custom\-compressed tapes. +to recover client\-encrypted or client\-custom\-compressed tapes\. .PP \fB[ \-C ] config\fR .RS 4 \fIAmanda\fR -configuration. +configuration\. .RE .PP \fB\-s index\-server\fR .RS 4 -Host that runs the index daemon. +Host that runs the index daemon\. .RE .PP \fB\-t tape\-server\fR .RS 4 -Host that runs the tape server daemon. +Host that runs the tape server daemon\. .RE .PP \fB\-d tape\-device\fR .RS 4 -Tape device to use on the tape server host. +Tape device to use on the tape server host\. .RE .PP \fB\-o\fR \fIclientconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .SH "COMMANDS" .PP \fBAmrecover\fR -connects to the index server and then presents a command line prompt. Usage is similar to an ftp client. The GNU readline library is used to provide command line history and editing if it was built in to -\fBamrecover\fR. +connects to the index server and then presents a command line prompt\. Usage is similar to an ftp client\. The GNU readline library is used to provide command line history and editing if it was built in to +\fBamrecover\fR\. .PP The purpose of browsing the database is to build up a \fIrestore list\fR -of files to be extracted from the backup system. The following commands are available: +of files to be extracted from the backup system\. The following commands are available: .PP \fBsethost hostname\fR .RS 4 -Specifies which host to look at backup files for (default: the local host). +Specifies which host to look at backup files for (default: the local host)\. .RE .PP \fBsetdate YYYY\-MM\-DD\-HH\-MM[\-SS] | YYYY\-MM\-DD\fR .RS 4 -Set the restore time (default: now). File listing commands only return information on backup images for this day, for the day before with the next lower dump level, and so on, until the most recent level 0 backup on or before the specified date is encountered. +Set the restore time (default: now)\. File listing commands only return information on backup images for this day, for the day before with the next lower dump level, and so on, until the most recent level 0 backup on or before the specified date is encountered\. .sp For example, if: .sp @@ -117,10 +117,9 @@ would yield files from the following days: .fi .RE .sp -Only the most recent version of a file will be presented. +Only the most recent version of a file will be presented\. .sp The following abbreviated date specifications are accepted: -.RS 4 .PP \fB\-\-MM\-DD\fR .RS 4 @@ -132,22 +131,21 @@ dates in the current year dates in the current month of the current year .RE .RE -.RE .PP \fBsetdisk\fR \fIdiskname\fR [\fImountpoint\fR] .RS 4 Specifies which disk to consider (default: the disk holding the working directory where \fBamrecover\fR -is started). It can only be set after the host is set with -\fBsethost\fR. +is started)\. It can only be set after the host is set with +\fBsethost\fR\. \fIDiskname\fR is the device name specified in the -\fIamanda.conf\fR +\fIamanda\.conf\fR or \fIdisklist\fR -configuration file. The disk must be local to the host. If +configuration file\. The disk must be local to the host\. If \fImountpoint\fR -is not specified, all pathnames will be relative to the (unknown) mount point instead of full pathnames. +is not specified, all pathnames will be relative to the (unknown) mount point instead of full pathnames\. .RE .PP \fBlisthost\fR [\fIdiskdevice\fR] @@ -162,84 +160,76 @@ List all \fBdiskname\fR .RE .PP -\fBsettape\fR [[\fIserver\fR]:][\fItapedev\fR|\fIdefault\fR] +\fBsetdevice\fR [[\-h \fItape\-server\fR] \fItapedev\fR] .RS 4 -Specifies the host to use as the tape server, and which of its tape devices to use. If the server is omitted, but the colon is not, the server name reverts to the configure\-time default. If the tape device is omitted, it remains unchanged. To use the default tape device selected by the tape server, the word -\fIdefault\fR -must be specified. If no argument is specified, or the argument is an empty string, no changes occur, and the current settings are displayed. +Specifies the host to use as the tape server, and which of its tape devices to use\. If the server is omitted, the server name reverts to the configure\-time default\. If the tape device is omitted, the default is used\. .sp If you want amrecover to use your changer, the \fItapedev\fR -must be equal to the amrecover_changer setting on the server. -.sp -If you need to change the protocol (tape:, rait:, file:, null:) then you must specify the hostname. +must be equal to the amrecover_changer setting on the server\. .sp -.RS 4 +If you need to change the protocol (tape:, rait:, file:, null:) then you must specify the hostname\. .nf -settape 192.168.0.10:file:/file1 +settape 192\.168\.0\.10:file:/file1 .fi -.RE You can change the tape device when amrecover ask you to load the tape: -.sp -.RS 4 .nf Load tape DMP014 now Continue? [Y/n/t]: t Tape device: server2:/dev/nst2 Continue? [Y/n/t]: Y -Using tape /dev/nst2 from server server2. +Using tape /dev/nst2 from server server2\. .fi .RE -.RE .PP \fBsetmode\fR \fImode\fR .RS 4 -Set the extraction mode for Samba shares. If +Set the extraction mode for Samba shares\. If \fImode\fR is -\fBsmb\fR, shares are sent to the Samba server to be restored back onto the PC. If +\fBsmb\fR, shares are sent to the Samba server to be restored back onto the PC\. If \fImode\fR is -\fBtar\fR, they are extracted on the local machine the same way tar volumes are extracted. +\fBtar\fR, they are extracted on the local machine the same way tar volumes are extracted\. .RE .PP \fBmode\fR .RS 4 -Displays the extracting mode for Samba shares. +Displays the extracting mode for Samba shares\. .RE .PP \fBhistory\fR .RS 4 -Show the backup history of the current host and disk. Dates, levels, tapes and file position on tape of each backup are displayed. +Show the backup history of the current host and disk\. Dates, levels, tapes and file position on tape of each backup are displayed\. .RE .PP \fBpwd\fR .RS 4 -Display the name of the current backup working directory. +Display the name of the current backup working directory\. .RE .PP \fBcd\fR \fIdir\fR .RS 4 Change the backup working directory to -\fIdir.\fR +\fIdir\.\fR If the mount point was specified with -\fBsetdisk\fR, this can be a full pathname or it can be relative to the current backup working directory. If the mount point was not specified, paths are relative to the mount point if they start with "/", otherwise they are relative to the current backup working directory. The +\fBsetdisk\fR, this can be a full pathname or it can be relative to the current backup working directory\. If the mount point was not specified, paths are relative to the mount point if they start with "/", otherwise they are relative to the current backup working directory\. The \fIdir\fR -can be a shell style wildcards. +can be a shell style wildcards\. .RE .PP \fBcdx\fR \fIdir\fR .RS 4 Like the \fBcd\fR -command but allow regular expression. +command but allow regular expression\. .RE .PP \fBlpwd\fR .RS 4 Display the \fBamrecover\fR -working directory. Files will be restored under this directory, relative to the backed up filesystem. +working directory\. Files will be restored under this directory, relative to the backed up filesystem\. .RE .PP \fBlcd\fR \fIpath\fR @@ -247,116 +237,114 @@ working directory. Files will be restored under this directory, relative to the Change the \fBamrecover\fR working directory to -\fIpath\fR. +\fIpath\fR\. .RE .PP \fBls\fR .RS 4 -List the contents of the current backup working directory. See the description of the +List the contents of the current backup working directory\. See the description of the \fBsetdate\fR -command for how the view of the directory is built up. The backup date is shown for each file. +command for how the view of the directory is built up\. The backup date is shown for each file\. .RE .PP -\fBadd\fR \fIitem1 item2 ...\fR +\fBadd\fR \fIitem1 item2 \.\.\.\fR .RS 4 -Add the specified files or directories to the restore list. Each item may have shell style wildcards. +Add the specified files or directories to the restore list\. Each item may have shell style wildcards\. .RE .PP -\fBaddx\fR \fIitem1 item2 ...\fR +\fBaddx\fR \fIitem1 item2 \.\.\.\fR .RS 4 -Add the specified files or directories to the restore list. Each item may be a regular expression. +Add the specified files or directories to the restore list\. Each item may be a regular expression\. .RE .PP -\fBdelete\fR \fIitem1 item2 ...\fR +\fBdelete\fR \fIitem1 item2 \.\.\.\fR .RS 4 -Delete the specified files or directories from the restore list. Each item may have shell style wildcards. +Delete the specified files or directories from the restore list\. Each item may have shell style wildcards\. .RE .PP -\fBdeletex\fR \fIitem1 item2 ...\fR +\fBdeletex\fR \fIitem1 item2 \.\.\.\fR .RS 4 -Delete the specified files or directories from the restore list. Each item may be a regular expression. +Delete the specified files or directories from the restore list\. Each item may be a regular expression\. .RE .PP \fBlist\fR \fIfile\fR .RS 4 -Display the contents of the restore list. If a file name is specified, the restore list is written to that file. This can be used to manually extract the files from the +Display the contents of the restore list\. If a file name is specified, the restore list is written to that file\. This can be used to manually extract the files from the \fIAmanda\fR tapes with -\fBamrestore\fR. +\fBamrestore\fR\. .RE .PP \fBclear\fR .RS 4 -Clear the restore list. +Clear the restore list\. .RE .PP \fBquit\fR .RS 4 -Close the connection to the index server and exit. +Close the connection to the index server and exit\. .RE .PP \fBexit\fR .RS 4 -Close the connection to the index server and exit. +Close the connection to the index server and exit\. .RE .PP \fBextract\fR .RS 4 -Start the extract sequence (see the examples below). Make sure the local working directory is the root of the backed up filesystem, or another directory that will behave like that. Use +Start the extract sequence (see the examples below)\. Make sure the local working directory is the root of the backed up filesystem, or another directory that will behave like that\. Use \fBlpwd\fR to display the local working directory, and \fBlcd\fR -to change it. +to change it\. .RE .PP \fBhelp\fR .RS 4 -Display a brief list of these commands. +Display a brief list of these commands\. .RE .SH "EXAMPLES" .PP The following shows the recovery of an old \fIsyslog\fR -file. -.sp -.RS 4 +file\. .nf # cd /var/log -# ls \-l syslog.7 -syslog.7: No such file or directory +# ls \-l syslog\.7 +syslog\.7: No such file or directory # amrecover -AMRECOVER Version 2.4.2. Contacting server on oops ... -220 oops \fIAmanda\fR index server (2.4.2) ready. +AMRECOVER Version 2\.4\.2\. Contacting server on oops \.\.\. +220 oops \fIAmanda\fR index server (2\.4\.2) ready\. Setting restore date to today (1997\-12\-09) -200 Working date set to 1997\-12\-09. -200 Config set to daily. -200 Dump host set to this\-host.some.org. -$CWD '/var/log' is on disk '/var' mounted at '/var'. -200 Disk set to /var. +200 Working date set to 1997\-12\-09\. +200 Config set to daily\. +200 Dump host set to this\-host\.some\.org\. +$CWD \'/var/log\' is on disk \'/var\' mounted at \'/var\'\. +200 Disk set to /var\. /var/log WARNING: not on root of selected filesystem, check man\-page! amrecover> ls -1997\-12\-09 daemon.log +1997\-12\-09 daemon\.log 1997\-12\-09 syslog 1997\-12\-08 authlog -1997\-12\-08 sysidconfig.log -1997\-12\-08 syslog.0 -1997\-12\-08 syslog.1 -1997\-12\-08 syslog.2 -1997\-12\-08 syslog.3 -1997\-12\-08 syslog.4 -1997\-12\-08 syslog.5 -1997\-12\-08 syslog.6 -1997\-12\-08 syslog.7 -amrecover> add syslog.7 -Added /log/syslog.7 +1997\-12\-08 sysidconfig\.log +1997\-12\-08 syslog\.0 +1997\-12\-08 syslog\.1 +1997\-12\-08 syslog\.2 +1997\-12\-08 syslog\.3 +1997\-12\-08 syslog\.4 +1997\-12\-08 syslog\.5 +1997\-12\-08 syslog\.6 +1997\-12\-08 syslog\.7 +amrecover> add syslog\.7 +Added /log/syslog\.7 amrecover> lpwd /var/log -amrecover> lcd .. +amrecover> lcd \.\. /var amrecover> extract -Extracting files using tape drive /dev/nst0 on host 192.168.0.10 +Extracting files using tape drive /dev/nst0 on host 192\.168\.0\.10 The following tapes are needed: DMP014 @@ -365,46 +353,42 @@ Continue? [Y/n]: y Load tape DMP014 now Continue? [Y/n/t]: y -set owner/mode for '.'? [yn] n +set owner/mode for \'\.\'? [yn] n amrecover> quit -200 Good bye. -# ls \-l syslog.7 +200 Good bye\. +# ls \-l syslog\.7 total 26 -\-rw\-r\-\-r\-\- 1 root other 12678 Oct 14 16:36 syslog.7 +\-rw\-r\-\-r\-\- 1 root other 12678 Oct 14 16:36 syslog\.7 .fi -.RE .PP If you do not want to overwrite existing files, create a subdirectory to run \fBamrecover\fR -from and then move the restored files afterward. -.sp -.RS 4 +from and then move the restored files afterward\. .nf # cd /var -# (umask 077 ; mkdir .restore) -# cd .restore +# (umask 077 ; mkdir \.restore) +# cd \.restore # amrecover -AMRECOVER Version 2.4.2. Contacting server on oops ... -\&... +AMRECOVER Version 2\.4\.2\. Contacting server on oops \.\.\. +\.\.\. amrecover> cd log /var/log amrecover> ls -\&... -amrecover> add syslog.7 -Added /log/syslog.7 +\.\.\. +amrecover> add syslog\.7 +Added /log/syslog\.7 amrecover> lpwd -/var/.restore +/var/\.restore amrecover> extract -Extracting files using tape drive /dev/nst0 on host 192.168.0.10 -\&... +Extracting files using tape drive /dev/nst0 on host 192\.168\.0\.10 +\.\.\. amrecover> quit -200 Good bye. -# mv \-i log/syslog.7 ../log/syslog.7\-restored -# cd .. -# rm \-fr .restore +200 Good bye\. +# mv \-i log/syslog\.7 \.\./log/syslog\.7\-restored +# cd \.\. +# rm \-fr \.restore .fi -.RE .PP If you need to run \fBamrestore\fR @@ -412,44 +396,39 @@ by hand instead of letting \fBamrecover\fR control it, use the \fBlist\fR -command after browsing to display the needed tapes. -.sp -.RS 4 +command after browsing to display the needed tapes\. .nf # cd /var/log # amrecover -AMRECOVER Version 2.4.2. Contacting server on oops ... -\&... +AMRECOVER Version 2\.4\.2\. Contacting server on oops \.\.\. +\.\.\. amrecover> ls -\&... -amrecover> add syslog syslog.6 syslog.7 +\.\.\. +amrecover> add syslog syslog\.6 syslog\.7 Added /log/syslog -Added /log/syslog.6 -Added /log/syslog.7 +Added /log/syslog\.6 +Added /log/syslog\.7 amrecover> list TAPE DMP014 LEVEL 0 DATE 1997\-12\-08 - /log/syslog.7 - /log/syslog.6 + /log/syslog\.7 + /log/syslog\.6 TAPE DMP015 LEVEL 1 DATE 1997\-12\-09 /log/syslog amrecover> quit .fi -.RE .PP The \fBhistory\fR -command shows each tape that has a backup of the current disk along with the date of the backup, the level, the tape label and the file position on the tape. All active tapes are listed, not just back to the most recent full dump. +command shows each tape that has a backup of the current disk along with the date of the backup, the level, the tape label and the file position on the tape\. All active tapes are listed, not just back to the most recent full dump\. .PP -Tape file position zero is a label. The first backup image is in file position one. -.sp -.RS 4 +Tape file position zero is a label\. The first backup image is in file position one\. .nf # cd /var/log # amrecover -AMRECOVER Version 2.4.2. Contacting server on oops ... -\&... +AMRECOVER Version 2\.4\.2\. Contacting server on oops \.\.\. +\.\.\. amrecover> history -200\- Dump history for config "daily" host "this\-host.some.org" disk "/var" +200\- Dump history for config "daily" host "this\-host\.some\.org" disk "/var" 201\- 1997\-12\-09 1 DMP015 9 201\- 1997\-12\-08 1 DMP014 11 201\- 1997\-12\-07 0 DMP013 22 @@ -460,10 +439,9 @@ amrecover> history 201\- 1997\-12\-02 1 DMP008 7 201\- 1997\-12\-01 1 DMP007 9 201\- 1997\-11\-30 1 DMP006 6 -\&... +\.\.\. amrecover> quit .fi -.RE .SH "ENVIRONMENT" .PP \fBPAGER\fR @@ -471,28 +449,29 @@ The \fBls\fR and \fBlist\fR -commands will use $PAGER to display the file lists. Defaults to +commands will use $PAGER to display the file lists\. Defaults to \fImore\fR -if PAGER is not set. +if PAGER is not set\. .PP \fBAMANDA_SERVER\fR -If set, $AMANDA_SERVER will be used as index\-server. The value will take precedence over the compiled default, but will be overridden by the \-s switch. +If set, $AMANDA_SERVER will be used as index\-server\. The value will take precedence over the compiled default, but will be overridden by the \-s switch\. .PP \fBAMANDA_TAPE_SERVER\fR -If set, $AMANDA_TAPE_SERVER will be used as tape\-server. The value will take precedence over the compiled default, but will be overridden by the \-t switch. +If set, $AMANDA_TAPE_SERVER will be used as tape\-server\. The value will take precedence over the compiled default, but will be overridden by the \-t switch\. .SH "AUTHOR" .PP -Alan M. McIvor - +Alan M\. McIvor + : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP \fBamanda\fR(8), -\fBamanda\-client.conf\fR(5), +\fBamanda-client.conf\fR(5), \fBamrestore\fR(8), \fBamfetchdump\fR(8), -\fBreadline\fR(3) +\fBreadline\fR(3), +: http://wiki.zmanda.com diff --git a/man/amreport.8 b/man/amreport.8 index f9b6380..d8feabb 100644 --- a/man/amreport.8 +++ b/man/amreport.8 @@ -1,17 +1,17 @@ .\" Title: amreport .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMREPORT" "8" "06/06/2007" "" "" +.TH "AMREPORT" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amreport \- generate a formatted output of statistics for an Amanda run +amreport - generate a formatted output of statistics for an Amanda run .SH "SYNOPSIS" .HP 9 \fBamreport\fR [\fIconfig\fR] [\-i] [\-M\ \fIaddress\fR] [\-l\ \fIlogfile\fR] [\-f\ \fIoutputfile\fR] [\-p\ \fIpostscriptfile\fR] [\-o\ \fIconfigoption\fR]... @@ -20,22 +20,22 @@ amreport \- generate a formatted output of statistics for an Amanda run \fBAmreport\fR generates a summary report of an \fBamanda\fR(8) -backup run. If no configuration name is specified, amanda.conf is read from the current directory. +backup run\. If no configuration name is specified, amanda\.conf is read from the current directory\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP \fIconfig\fR .RS 4 -Name of the configuration to process. +Name of the configuration to process\. .RE .PP \fB\-i\fR .RS 4 -Don't email the report. +Don\'t email the report\. .RE .PP \fB\-M\fR \fIaddress\fR @@ -45,19 +45,19 @@ Mail the report to instead of the \fBmailto\fR value from -\fIamanda.conf\fR. +\fIamanda\.conf\fR\. .RE .PP \fB\-l\fR \fIlogfile\fR .RS 4 -Name of the log file to parse to generate the report. If a log file is not specified, it defaults to the file: +Name of the log file to parse to generate the report\. If a log file is not specified, it defaults to the file: .RE .PP \fIlogdir\fR/log .PP where \fIlogdir\fR -is the log directory defined in amanda.conf. +is the log directory defined in amanda\.conf\. .PP \fB\-f\fR \fIoutputfile\fR .RS 4 @@ -65,10 +65,10 @@ Normally, \fBamreport\fR sends the report via e\-mail to the \fImailto\fR -user as defined in the amanda.conf file. If +user as defined in the amanda\.conf file\. If \fIoutputfile\fR is specified, then the report is put in -\fIoutputfile\fR. +\fIoutputfile\fR\. .RE .PP \fB\-p\fR \fIpostscriptfile\fR @@ -77,36 +77,36 @@ Send the postscript output to the file \fIpostscriptfile\fR instead of to the \fBlpr\fR(1) -command. This option has an effect only if the +command\. This option has an effect only if the \fIlbl\-templ\fR -directive is specified in amanda.conf. +directive is specified in amanda\.conf\. .RE .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .SH "LABEL PRINTING" .PP \fIAmanda\fR -can print postscript labels describing the contents of tape(s) written in a run. The labels are designed to be folded and inserted into the tape case along with the tape or hole punched and put in a 3\-ring binder. Various label templates are provided to format data for different tape sizes. +can print postscript labels describing the contents of tape(s) written in a run\. The labels are designed to be folded and inserted into the tape case along with the tape or hole punched and put in a 3\-ring binder\. Various label templates are provided to format data for different tape sizes\. .PP -The information printed varies slightly between label templates due to size constraints. Labels contain one line for each host/file\-system pair and may also contain the file number on the tape, the level of the dump, the original size of the dump and the size of the (possibly compressed) tape file. +The information printed varies slightly between label templates due to size constraints\. Labels contain one line for each host/file\-system pair and may also contain the file number on the tape, the level of the dump, the original size of the dump and the size of the (possibly compressed) tape file\. .PP Add the \fIlbl\-templ\fR -parameter to the tapetype definition in amanda.conf to enable labels. If you don't add this line to your tapetype definition, +parameter to the tapetype definition in amanda\.conf to enable labels\. If you don\'t add this line to your tapetype definition, \fBamreport\fR -will not print tape labels. +will not print tape labels\. .PP You may use the -\fIremap='I'>printer\fR -keyword in amanda.conf to print to other than the system default printer. +\fIremap=\'I\'>printer\fR +keyword in amanda\.conf to print to other than the system default printer\. .SH "TEMPLATES" .PP \fIAmanda\fR -provides label templates for the following tape types. These are pretty generic labels and should be easy to customize for other tape types or particular site needs. +provides label templates for the following tape types\. These are pretty generic labels and should be easy to customize for other tape types or particular site needs\. .sp .RS 4 .nf @@ -116,10 +116,21 @@ provides label templates for the following tape types. These are pretty generic * 3\-ring binder .fi .RE -.sp .PP -The 3\-ring binder type is the most generic. It may be used to make a hardcopy log of the tapes. +The 3\-ring binder type is the most generic\. It may be used to make a hardcopy log of the tapes\. +.SH "EXIT CODE" + +The exit code of \fBamreport\fR is the ORed value of: +.nf + 0 = success + 1 = error + 2 = a dle give strange message + 4 = a dle failed + 8 = Don\'t know the status of a dle (RESULT_MISSING in the report) + 16 = tape error or no more tape +.fi .SH "SEE ALSO" .PP \fBamanda\fR(8), -\fBamflush\fR(8) +\fBamflush\fR(8), +: http://wiki.zmanda.com diff --git a/man/amrestore.8 b/man/amrestore.8 index 6a92015..d7617d9 100644 --- a/man/amrestore.8 +++ b/man/amrestore.8 @@ -1,20 +1,20 @@ .\" Title: amrestore .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMRESTORE" "8" "06/06/2007" "" "" +.TH "AMRESTORE" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amrestore \- extract backup images from an Amanda tape +amrestore - extract backup images from an Amanda tape .SH "SYNOPSIS" .HP 10 -\fBamrestore\fR [\-r | \-c | \-C] [\-b | \fIblocksize\fR] [\-f | \fIfileno\fR] [\-l | \fIlabel\fR] [\-p] [\-h] \fItapedevice\fR|\ \fIholdingfile\fR [\fIhostname\fR [\fIdiskname\fR [\fIdatestamp\fR [\fIhostname\fR [\fIdiskname\fR [\fIdatestamp\fR | ...]]]]]] +\fBamrestore\fR [\-r | \-c | \-C] [\-b | \fIblocksize\fR] [\-f | \fIfileno\fR] [\-l | \fIlabel\fR] [\-p] [\-h] \fItapedevice\fR|\ \fIholdingfile\fR [\fIhostname\fR [\fIdiskname\fR [\fIdatestamp\fR [\fIhostname\fR [\fIdiskname\fR [\fIdatestamp\fR | \.\.\.]]]]]] .SH "DESCRIPTION" .PP \fBAmrestore\fR @@ -27,70 +27,70 @@ that match \fIdiskname\fR and \fIdatestamp\fR -patterns given on the command line. The tape or holding file must be in a format written by the +patterns given on the command line\. The tape or holding file must be in a format written by the \fBamdump\fR or \fBamflush\fR -program. +program\. .PP If \fIdiskname\fR is not specified, all backups on the tape for the previous \fIhostname\fR -are candidates. If +are candidates\. If \fIdatestamp\fR is not specified, all backups on the tape for the previous \fIhostname\fR and \fIdiskname\fR -are candidates. If no +are candidates\. If no \fIhostname\fR, \fIdiskname\fR or \fIdatestamp\fR -are specified, every backup on the tape is a candidate. +are specified, every backup on the tape is a candidate\. .PP \fIHostname\fR and \fIdiskname\fR are special expressions described in the "HOST & DISK EXPRESSION" section of -\fBamanda\fR(8). +\fBamanda\fR(8)\. \fIDatestamp\fR are special expression described in the "DATESTAMP EXPRESSION" section of -\fBamanda\fR(8). For example, if +\fBamanda\fR(8)\. For example, if \fIdiskname\fR is "rz[23]a", it would match disks \fBrz2a\fR and -\fBrz3a\fR. +\fBrz3a\fR\. .PP \fIDatestamp\fR is useful if \fBamflush\fR -writes multiple backup runs to a single tape. +writes multiple backup runs to a single tape\. .PP Unless \fB\-p\fR is used, candidate backup images are extracted to files in the current directory named: .PP -\fIhostname.diskname.datestamp.dumplevel\fR +\fIhostname\.diskname\.datestamp\.dumplevel\fR .PP -Amrestore doesn't use a changer, it restore from the tape already loaded in the -\fItapedevice.\fR +Amrestore doesn\'t use a changer, it restore from the tape already loaded in the +\fItapedevice\.\fR .SH "OPTIONS" .PP \fB\-b\fR .RS 4 -Set the blocksize used to read the tape or holding file. All holding files must be read with a blocksize of 32 KBytes. +Set the blocksize used to read the tape or holding file\. All holding files must be read with a blocksize of 32 KBytes\. \fBAmrestore\fR -should normally be able to determine the blocksize for tapes on its own and not need this parameter. +should normally be able to determine the blocksize for tapes on its own and not need this parameter\. .RE .PP -The default is 32 KBytes. +The default is 32 KBytes\. .PP \fB\-f\fR .RS 4 -Do a rewind followed by a fsf before trying to restore an image. +Do a rewind followed by a fsf before trying to restore an image\. .RE .PP \fB\-l\fR @@ -101,108 +101,106 @@ Check if we restoring from the tape with the right .PP \fB\-p\fR .RS 4 -Pipe output. The first matching backup image is sent to standard output, which is normally a pipe to +Pipe output\. The first matching backup image is sent to standard output, which is normally a pipe to \fBrestore\fR or \fBtar\fR, then \fBamrestore\fR -quits. It may be run again to continue selecting backups to process. Make sure you specify the no\-rewind +quits\. It may be run again to continue selecting backups to process\. Make sure you specify the no\-rewind \fItapedevice\fR -when doing this. +when doing this\. .RE .PP Note: \fBrestore\fR -may report "short read" errors when reading from a pipe. Most versions of +may report "short read" errors when reading from a pipe\. Most versions of \fBrestore\fR -support a blocking factor option to let you set the read block size, and you should set it to 2. See the example below. +support a blocking factor option to let you set the read block size, and you should set it to 2\. See the example below\. .PP \fB\-c\fR .RS 4 -Compress output using the fastest method the compression program provides. +Compress output using the fastest method the compression program provides\. \fBAmrestore\fR normally writes output files in a format understood by \fBrestore\fR or -\fBtar\fR, even if the backups on the tape are compressed. With the +\fBtar\fR, even if the backups on the tape are compressed\. With the \fB\-c\fR or \fB\-C\fR option, \fBamrestore\fR -writes all files in compressed format, even if the backups on the tape are not compressed. Output file names will have a -\fB.Z\fR +writes all files in compressed format, even if the backups on the tape are not compressed\. Output file names will have a +\fB\.Z\fR or -\fB.gz\fR +\fB\.gz\fR extension depending on whether \fBcompress\fR or \fBgzip\fR -is the preferred compression program. This option is useful when the current directory disk is small. +is the preferred compression program\. This option is useful when the current directory disk is small\. .RE .PP \fB\-C\fR .RS 4 -Compress output using the best method the compression program provides (may be very CPU intensive). See the notes above about the +Compress output using the best method the compression program provides (may be very CPU intensive)\. See the notes above about the \fB\-c\fR -option. +option\. .RE .PP \fB\-r\fR .RS 4 -Raw output. Backup images are output exactly as they are on the tape, including the +Raw output\. Backup images are output exactly as they are on the tape, including the \fBamdump\fR -headers. Output file names will have a -\fB.RAW\fR -extension. This option is only useful for debugging and other strange circumstances. +headers\. Output file names will have a +\fB\.RAW\fR +extension\. This option is only useful for debugging and other strange circumstances\. .RE .PP \fB\-h\fR .RS 4 -Header output. The tape header block is output at the beginning of each file. This is like +Header output\. The tape header block is output at the beginning of each file\. This is like \fB\-r\fR except \fB\-c\fR or \fB\-C\fR -may also be used to compress the result. +may also be used to compress the result\. \fBAmrecover\fR -uses the header to determine the restore program to use. +uses the header to determine the restore program to use\. .RE .PP -If a header is written (\-r or \-h), only 32 KBytes are output regardless of the tape blocksize. This makes the resulting image usable as a holding file. +If a header is written (\-r or \-h), only 32 KBytes are output regardless of the tape blocksize\. This makes the resulting image usable as a holding file\. .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .SH "EXAMPLES" .PP The following does an interactive restore of disk \fIrz3g\fR from host -\fIseine\fR, to restore particular files. Note the use of the +\fIseine\fR, to restore particular files\. Note the use of the \fBb\fR option to -\fBrestore\fR, which causes it to read in units of two 512\-byte blocks (1 Kbyte) at a time. This helps keep it from complaining about short reads. +\fBrestore\fR, which causes it to read in units of two 512\-byte blocks (1 Kbyte) at a time\. This helps keep it from complaining about short reads\. .sp .RS 4 .nf % amrestore \-p /dev/nrmt9 seine rz3g | restore \-ivbf 2 \- .fi .RE -.sp .PP The next example extracts all backup images for host -\fIseine\fR. This is the usual way to extract all data for a host after a disk crash. +\fIseine\fR\. This is the usual way to extract all data for a host after a disk crash\. .sp .RS 4 .nf % amrestore /dev/nrmt9 seine .fi .RE -.sp .PP If the backup datestamp in the above example is 19910125 @@ -216,11 +214,10 @@ on the tape, these files will be created in the current directory: .sp .RS 4 .nf -seine.rz1a.19910125.0 -seine.rz1g.19910125.0 +seine\.rz1a\.19910125\.0 +seine\.rz1g\.19910125\.0 .fi .RE -.sp .PP You may also use \fBamrestore\fR @@ -228,10 +225,9 @@ to extract a backup image from a holding disk file that has not yet been flushed .sp .RS 4 .nf -% amrestore \-p /amanda/20001119/seine.rz1a.2 | restore \-ivbf 2 \- +% amrestore \-p /amanda/20001119/seine\.rz1a\.2 | restore \-ivbf 2 \- .fi .RE -.sp .PP \fBAmrestore\fR may be used to generate a listing of images on a tape: @@ -242,28 +238,28 @@ may be used to generate a listing of images on a tape: % amrestore \-p /dev/nrmt9 no\-such\-host > /dev/null .fi .RE -.sp .PP This asks \fBamrestore\fR to find images for host -\fBno\-such\-host\fR. It will not find any entries that match, but along the way will report each image it skips. +\fBno\-such\-host\fR\. It will not find any entries that match, but along the way will report each image it skips\. .SH "CAVEATS" .PP \fBGNU\-tar\fR -must be used to restore files from backup images created with the GNUTAR dumptype. Vendor tar programs sometimes fail to read GNU tar images. +must be used to restore files from backup images created with the GNUTAR dumptype\. Vendor tar programs sometimes fail to read GNU tar images\. .SH "AUTHOR" .PP James da Silva, -, University of Maryland, College Park: Original text +, University of Maryland, College Park: Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP \fBamanda\fR(8), \fBamdump\fR(8), \fBamflush\fR(8), -\fBtar\fR(1) -\fBrestore\fR(8) +\fBtar\fR(1), +\fBrestore\fR(8), +: http://wiki.zmanda.com diff --git a/man/amrmtape.8 b/man/amrmtape.8 index 7ed6110..e3f1cf7 100644 --- a/man/amrmtape.8 +++ b/man/amrmtape.8 @@ -1,29 +1,29 @@ .\" Title: amrmtape .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMRMTAPE" "8" "06/06/2007" "" "" +.TH "AMRMTAPE" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amrmtape \- remove a tape from the Amanda database +amrmtape - remove a tape from the Amanda database .SH "SYNOPSIS" .HP 9 \fBamrmtape\fR [\-n] [\-v] [\-q] [\-d] \fIconfig\fR \fIlabel\fR .SH "DESCRIPTION" .PP \fBAmrmtape\fR -invalidates the contents of an existing backup tape in the configuration database. This is meant as a recovery mechanism when a good backup is damaged either by faulty hardware or user error, e.g. the tape is eaten by the drive or is overwritten. +invalidates the contents of an existing backup tape in the configuration database\. This is meant as a recovery mechanism when a good backup is damaged either by faulty hardware or user error, e\.g\. the tape is eaten by the drive or is overwritten\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP \fB\-n\fR @@ -34,23 +34,23 @@ and database files with \fIlabel\fR removed, but leave them in \fI/tmp\fR -and do not update the original copies. +and do not update the original copies\. .RE .PP \fB\-v\fR .RS 4 -List backups of hosts and disks that are being discarded. Enabled by default. +List backups of hosts and disks that are being discarded\. Enabled by default\. .RE .PP \fB\-q\fR .RS 4 Opposite of -\fB\-v\fR. +\fB\-v\fR\. .RE .PP \fB\-d\fR .RS 4 -Run in debugging mode so all executed commands are shown. +Run in debugging mode so all executed commands are shown\. .RE .SH "EXAMPLE" .PP @@ -58,22 +58,20 @@ Remove tape labeled \fIDAILY034\fR from the \fIDailySet1\fR -configuration. -.sp -.RS 4 +configuration\. .nf # amrmtape DailySet1 DAILY034 .fi -.RE .SH "AUTHOR" .PP -Adrian T. Filipi\-Martin -: Original text +Adrian T\. Filipi\-Martin +: Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP \fBamadmin\fR(8), -\fBamanda\fR(8) +\fBamanda\fR(8), +: http://wiki.zmanda.com diff --git a/man/amstatus.8 b/man/amstatus.8 index 7e8fd20..f17d645 100644 --- a/man/amstatus.8 +++ b/man/amstatus.8 @@ -1,20 +1,20 @@ .\" Title: amstatus .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMSTATUS" "8" "06/06/2007" "" "" +.TH "AMSTATUS" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amstatus \- display the state of an Amanda run +amstatus - display the state of an Amanda run .SH "SYNOPSIS" .HP 9 -\fBamstatus\fR [\-\-config] \fIconfig\fR [\-\-file\ \fIamdumpfile\fR] [\-\-summary] [\-\-dumping] [\-\-waitdumping] [\-\-waittaper] [\-\-dumpingtape] [\-\-writingtape] [\-\-finished] [\-\-failed] [\-\-estimate] [\-\-gestimate] [\-\-stats] +\fBamstatus\fR [\-\-config] \fIconfig\fR [\-\-file\ \fIamdumpfile\fR] [\-\-summary] [\-\-dumping] [\-\-waitdumping] [\-\-waittaper] [\-\-dumpingtape] [\-\-writingtape] [\-\-finished] [\-\-failed] [\-\-estimate] [\-\-gestimate] [\-\-stats] [\-\-locale\-independent\-date\-format] .SH "DESCRIPTION" .PP \fBAmstatus\fR @@ -22,23 +22,23 @@ gives the current state of the \fIAmanda\fR run specified by the \fIconfig\fR -configuration. If there is no active +configuration\. If there is no active \fIAmanda\fR -running, it summarizes the result of the last run. It may also be used to summarize the results of a previous run. +running, it summarizes the result of the last run\. It may also be used to summarize the results of a previous run\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP -All options may be abbreviated to the shortest non\-ambiguous sub\-string. If no options are given, everything is displayed. +All options may be abbreviated to the shortest non\-ambiguous sub\-string\. If no options are given, everything is displayed\. .PP \fB[\-\-config] config\fR .RS 4 Specify the \fIAmanda\fR -configuration you want to display the state for. +configuration you want to display the state for\. .RE .PP \fB\-\-file amdumpfile\fR @@ -47,67 +47,83 @@ Specify an alternate file instead of the \fIamdump\fR or \fIamflush\fR -file. +file\. .RE .PP \fB\-\-summary\fR .RS 4 -Display a summary of the state of the run. +Display a summary of the state of the run\. .RE .PP \fB\-\-dumping\fR .RS 4 -Display all partitions that are dumping. +Display all partitions that are dumping\. .RE .PP \fB\-\-waitdumping|wdumping\fR .RS 4 -Display all partitions that are waiting to be dumped. +Display all partitions that are waiting to be dumped\. .RE .PP \fB\-\-waittaper|wtaper\fR .RS 4 -Display all partitions dumped that are waiting to be written to tape. +Display all partitions dumped that are waiting to be written to tape\. .RE .PP \fB\-\-dumpingtape|dtape\fR .RS 4 -Display all partitions that are dumping directly to tape. +Display all partitions that are dumping directly to tape\. .RE .PP \fB\-\-writingtape|wtape\fR .RS 4 -Display all partitions that are writing to tape. +Display all partitions that are writing to tape\. .RE .PP \fB\-\-finished\fR .RS 4 -Display all partitions that are dumped and written to tape. +Display all partitions that are dumped and written to tape\. .RE .PP \fB\-\-failed|error\fR .RS 4 -Display all partitions that failed. +Display all partitions that failed\. .RE .PP \fB\-\-estimate\fR .RS 4 -Display all partitions whose estimate is finished. Works only during the estimate phase. +Display all partitions whose estimate is finished\. Works only during the estimate phase\. .RE .PP \fB\-\-gestimate|gettingestimate\fR .RS 4 -Display all partitions whose estimate is not finished. Works only during the estimate phase. +Display all partitions whose estimate is not finished\. Works only during the estimate phase\. .RE .PP \fB\-\-stats|statistics\fR .RS 4 -Display statistics about active\-time of taper and dumpers. +Display statistics about active\-time of taper and dumpers\. .RE +.PP +\fB\-\-locale\-independent\-date\-format\fR +.RS 4 +Output the date in a locale independent format\. The format is the same executing: date +\'%Y\-%m\-%d %H:%M:%S %Z\' +.RE +.SH "EXIT CODE" + +The exit code of \fBamstatus\fR is the ORed value of: +.nf + 0 = success + 1 = error + 4 = a dle failed + 8 = Don\'t know the status of a dle (RESULT_MISSING in the report) + 16 = tape error or no more tape +.fi .SH "SEE ALSO" .PP \fBamanda\fR(8), \fBamcheck\fR(8), \fBamdump\fR(8), \fBamrestore\fR(8), -\fBamadmin\fR(8) +\fBamadmin\fR(8), +: http://wiki.zmanda.com diff --git a/man/amtape.8 b/man/amtape.8 index 56e5c8a..fcf3296 100644 --- a/man/amtape.8 +++ b/man/amtape.8 @@ -1,67 +1,67 @@ .\" Title: amtape .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMTAPE" "8" "06/06/2007" "" "" +.TH "AMTAPE" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amtape \- user interface to Amanda tape changer controls +amtape - user interface to Amanda tape changer controls .SH "SYNOPSIS" .HP 7 \fBamtape\fR \fIconfig\fR \fIcommand\fR [\fIcommand_options\fR...] [\fB\-o\ \fR\fIconfigoption\fR]... .SH "DESCRIPTION" .PP \fBAmtape\fR -performs tape changer control operations. It uses the underlying tape changer script defined by the +performs tape changer control operations\. It uses the underlying tape changer script defined by the \fBtpchanger\fR option for a particular \fIAmanda\fR configuration as specified by the \fIconfig\fR -argument. +argument\. .PP Tape changers maintain a notion of the \fIcurrent\fR and \fInext\fR -slot for each configuration. These may or may not correspond to an actual physical state of the device, but do tend to minimize searching through the tape storage slots. If the desired tape is in the current slot, it is likely the next tape needed is in the next slot rather than at some random position in the storage slots. +slot for each configuration\. These may or may not correspond to an actual physical state of the device, but do tend to minimize searching through the tape storage slots\. If the desired tape is in the current slot, it is likely the next tape needed is in the next slot rather than at some random position in the storage slots\. .PP See the \fBamanda\fR(8) man page for more details about -\fIAmanda\fR. +\fIAmanda\fR\. .SH "COMMANDS" .PP \fBreset\fR .RS 4 -Reset the tape changer to a known state. The +Reset the tape changer to a known state\. The \fIcurrent\fR slot is set to the \fIfirst\fR -slot. Other device\-specific side effects may occur. Some gravity stackers need to be reset to the top position by hand. This command notifies +slot\. Other device\-specific side effects may occur\. Some gravity stackers need to be reset to the top position by hand\. This command notifies \fIAmanda\fR -the stacker is back in that position. +the stacker is back in that position\. .RE .PP \fBeject\fR .RS 4 -If a tape is loaded in the drive, it is ejected and returned to the slot from which it was loaded. +If a tape is loaded in the drive, it is ejected and returned to the slot from which it was loaded\. .RE .PP \fBclean\fR .RS 4 -If a cleaning tape is defined for the changer, it is used to clean the drive. +If a cleaning tape is defined for the changer, it is used to clean the drive\. .RE .PP \fBshow\fR .RS 4 -Show the contents of all slots. This can be slow. +Show the contents of all slots\. This can be slow\. .RE .PP \fBlabel\fR \fIlabel\fR @@ -69,30 +69,30 @@ Show the contents of all slots. This can be slow. Search for and load the \fIAmanda\fR tape with label -\fIlabel\fR. +\fIlabel\fR\. .RE .PP \fBtaper\fR .RS 4 Perform the \fBtaper\fR -scan algorithm. Load the next tape in the configuration's tape sequence, or a fresh tape with a suitable label. +scan algorithm\. Load the next tape in the configuration\'s tape sequence, or a fresh tape with a suitable label\. .RE .PP \fBdevice\fR .RS 4 Display the name of the current tape device on -\fIstdout\fR. +\fIstdout\fR\. .RE .PP \fBcurrent\fR .RS 4 -Display the current slot. +Display the current slot\. .RE .PP \fBupdate\fR .RS 4 -Update the changer label database, if it has one, to match the tapes now available. +Update the changer label database, if it has one, to match the tapes now available\. .RE .PP \fBslot\fR \fIslot\fR @@ -100,72 +100,73 @@ Update the changer label database, if it has one, to match the tapes now availab Eject any tape in the drive and put it away, then load the tape from slot \fIslot\fR and reset -\fIcurrent\fR. +\fIcurrent\fR\. .RE .PP \fBslot current\fR .RS 4 -Eject any tape in the drive and put it away, then load the tape from the current slot. +Eject any tape in the drive and put it away, then load the tape from the current slot\. .RE .PP \fBslot prev\fR .RS 4 Eject any tape in the drive and put it away, then load the tape from the previous slot and reset -\fIcurrent\fR. +\fIcurrent\fR\. .RE .PP \fBslot next\fR .RS 4 Eject any tape in the drive and put it away, then load the tape from the next slot and reset -\fIcurrent\fR. +\fIcurrent\fR\. .RE .PP \fBslot first\fR .RS 4 Eject any tape in the drive and put it away, then load the tape from the first slot and reset -\fIcurrent\fR. +\fIcurrent\fR\. .RE .PP \fBslot last\fR .RS 4 Eject any tape in the drive and put it away, then load the tape from the last slot and reset -\fIcurrent\fR. +\fIcurrent\fR\. .RE .PP \fBslot advance\fR .RS 4 -Eject any tape in the drive and put it away. Advance +Eject any tape in the drive and put it away\. Advance \fIcurrent\fR -to the next tape, but do not load it. +to the next tape, but do not load it\. .RE .PP \fB\-o\fR \fIconfigoption\fR .RS 4 See the "\fBCONFIGURATION OVERRIDE\fR" section in -\fBamanda\fR(8). +\fBamanda\fR(8)\. .RE .PP This is useful with non\-gravity stackers to unload the last tape used and set up \fIAmanda\fR -for the next run. If you just use -\fBeject\fR, the current tape will be mounted again in the next run, where it will be rejected as being still in use, ejected and the next tape requested. Using +for the next run\. If you just use +\fBeject\fR, the current tape will be mounted again in the next run, where it will be rejected as being still in use, ejected and the next tape requested\. Using \fBslot next\fR followed by \fBeject\fR -does an unnecessary mount. +does an unnecessary mount\. .PP Note: most changers optimize the \fBslot\fR -commands to not eject the loaded tape if it is the one being requested. +commands to not eject the loaded tape if it is the one being requested\. .SH "AUTHOR" .PP James da Silva, - + : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP -\fBamanda\fR(8) +\fBamanda\fR(8), +: http://wiki.zmanda.com diff --git a/man/amtapetype.8 b/man/amtapetype.8 index 0734bf1..a4f0b70 100644 --- a/man/amtapetype.8 +++ b/man/amtapetype.8 @@ -1,17 +1,17 @@ .\" Title: amtapetype .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMTAPETYPE" "8" "06/06/2007" "" "" +.TH "AMTAPETYPE" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amtapetype \- generate a tapetype definition. +amtapetype - generate a tapetype definition. .SH "SYNOPSIS" .HP 11 \fBamtapetype\fR [\-h] [\-c] [\-o] [\-b\ \fIblocksize\fR] \-e\ \fIestsize\fR [\-f\ \fItapedev\fR] [\-t\ \fItypename\fR] @@ -19,24 +19,24 @@ amtapetype \- generate a tapetype definition. .PP \fBamtapetype\fR generates a tapetype entry for -\fIAmanda\fR. +\fIAmanda\fR\. .SH "OPTIONS" .PP \fB\-h\fR .RS 4 -Display an help message. +Display an help message\. .RE .PP \fB\-c\fR .RS 4 -Run only the hardware compression detection heuristic test and stop. This takes a few minutes only. +Run only the hardware compression detection heuristic test and stop\. This takes a few minutes only\. .RE .PP \fB\-o\fR .RS 4 -Overwrite the tape, even if it's an +Overwrite the tape, even if it\'s an \fIAmanda\fR -tape. +tape\. .RE .PP \fB\-b\fR\fI blocksize\fR @@ -51,7 +51,7 @@ estimated tape size (No default!) .PP \fB\-f\fR\fI tapedev\fR .RS 4 -tape device name (default: $TAPE) The device to perform the test. +tape device name (default: $TAPE) The device to perform the test\. .RE .PP \fB\-t\fR\fI typename\fR @@ -69,29 +69,30 @@ Generate a tapetype definition for your tape device: .RE .SH "NOTES" .PP -Hardware compression is detected by measuring the writing speed difference of the tape drive when writing an amount of compressable and uncompresseable data. It does not rely on the status bits of the tape drive or the OS parameters. If your tape drive has very large buffers or is very fast, the program could fail to detect hardware compression status reliably. +Hardware compression is detected by measuring the writing speed difference of the tape drive when writing an amount of compressable and uncompresseable data\. It does not rely on the status bits of the tape drive or the OS parameters\. If your tape drive has very large buffers or is very fast, the program could fail to detect hardware compression status reliably\. .PP -During the first pass, it writes files that are estimated to be 1% of the expected tape capacity. It gets the expected capacity from the \-e command line flag, or defaults to 1 GByte. In a perfect world (which means there is zero chance of this happening with tapes :\-), there would be 100 files and 100 file marks. +During the first pass, it writes files that are estimated to be 1% of the expected tape capacity\. It gets the expected capacity from the \-e command line flag, or defaults to 1 GByte\. In a perfect world (which means there is zero chance of this happening with tapes :\-), there would be 100 files and 100 file marks\. .PP -During the second pass, the file size is cut in half. In that same fairyland world, this means 200 files and 200 file marks. +During the second pass, the file size is cut in half\. In that same fairyland world, this means 200 files and 200 file marks\. .PP -In both passes the total amount of data written is summed as well as the number of file marks written. At the end of the second pass, quoting from the code: +In both passes the total amount of data written is summed as well as the number of file marks written\. At the end of the second pass, quoting from the code: .PP -* Compute the size of a filemark as the difference in data written between pass 1 and pass 2 divided by the difference in number of file marks written between pass 1 and pass 2. ... * +* Compute the size of a filemark as the difference in data written between pass 1 and pass 2 divided by the difference in number of file marks written between pass 1 and pass 2\. \.\.\. * .PP -So if we wrote 1.0 GBytes on the first pass and 100 file marks, and 0.9 GBytes on the second pass with 200 file marks, those additional 100 file marks in the second pass took 0.1 GBytes and therefor a file mark is 0.001 GBytes (1 MByte). +So if we wrote 1\.0 GBytes on the first pass and 100 file marks, and 0\.9 GBytes on the second pass with 200 file marks, those additional 100 file marks in the second pass took 0\.1 GBytes and therefor a file mark is 0\.001 GBytes (1 MByte)\. .PP -Note that if the estimated capacity is wrong, the only thing that happens is a lot more (or less, but unlikely) files, and thus, file marks, get written. But the math still works out the same. The \-e flag is there to keep the number of file marks down because they can be slow (since they force the drive to flush all its buffers to physical media). +Note that if the estimated capacity is wrong, the only thing that happens is a lot more (or less, but unlikely) files, and thus, file marks, get written\. But the math still works out the same\. The \-e flag is there to keep the number of file marks down because they can be slow (since they force the drive to flush all its buffers to physical media)\. .PP -All sorts of things might happen to cause the amount of data written to vary enough to generate a big file mark size guess. A little more "shoe shining" because of the additional file marks (and flushes), dirt left on the heads from the first pass of a brand new tape, the temperature/humidity changed during the multi\-hour run, a different amount of data was written after the last file mark before EOT was reported, etc. +All sorts of things might happen to cause the amount of data written to vary enough to generate a big file mark size guess\. A little more "shoe shining" because of the additional file marks (and flushes), dirt left on the heads from the first pass of a brand new tape, the temperature/humidity changed during the multi\-hour run, a different amount of data was written after the last file mark before EOT was reported, etc\. .PP Note that the file mark size might really be zero for whatever device this is, and it was just the measured capacity variation that caused \fBamtapetype\fR -to think those extra file marks in pass 2 actually took up space. +to think those extra file marks in pass 2 actually took up space\. .PP It also explains why \fBamtapetype\fR -used to sometimes report a negative file mark size if the math happened to end up that way. When that happens now we just report it as zero. +used to sometimes report a negative file mark size if the math happened to end up that way\. When that happens now we just report it as zero\. .SH "SEE ALSO" .PP -\fBamanda\fR(8) +\fBamanda\fR(8), +: http://wiki.zmanda.com diff --git a/man/amtoc.8 b/man/amtoc.8 index 3d010f6..045ff1d 100644 --- a/man/amtoc.8 +++ b/man/amtoc.8 @@ -1,17 +1,17 @@ .\" Title: amtoc .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMTOC" "8" "06/06/2007" "" "" +.TH "AMTOC" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amtoc \- generate TOC (Table Of Contents) for an Amanda run +amtoc - generate TOC (Table Of Contents) for an Amanda run .SH "SYNOPSIS" .HP 6 \fBamtoc\fR [\-a] [\-i] [\-t] [\-f\ \fIfile\fR] [\-s\ \fIsubs\fR] [\-w] [\-\-] \fIlogfile\fR @@ -20,90 +20,81 @@ amtoc \- generate TOC (Table Of Contents) for an Amanda run \fIAmtoc\fR generates a table of contents for an \fIAmanda\fR -run. It's a perl script (if you don't have perl, install it first!). +run\. It\'s a perl script (if you don\'t have perl, install it first!)\. .SH "OPTIONS" .PP \fB\-a\fR .RS 4 The output file name will be -\fIlabel\-of\-the\-tape\fR.toc in the same directory as -\fIlogfile\fR. +\fIlabel\-of\-the\-tape\fR\.toc in the same directory as +\fIlogfile\fR\. .RE .PP \fB\-i\fR .RS 4 Display help about -\fBamtoc\fR. +\fBamtoc\fR\. .RE .PP \fB\-t\fR .RS 4 -Generate the output in tabular form. +Generate the output in tabular form\. .RE .PP \fB\-f file\fR .RS 4 -Write the output to a file ('\-' for stdout). +Write the output to a file (\'\-\' for stdout)\. .RE .PP \fB\-s subs\fR .RS 4 Evaluate the output file name from \fIsubs\fR, with $_ set to -\fIlabel\-of\-the\-tape\fR. The +\fIlabel\-of\-the\-tape\fR\. The \fB\-a\fR option is equivalent to \fB\-s\fR -\fI's/$_/.toc/'\fR. +\fI\'s/$_/\.toc/\'\fR\. .RE .PP \fB\-w\fR .RS 4 -Separate tapes with form\-feeds and display blank lines before totals. +Separate tapes with form\-feeds and display blank lines before totals\. .RE .PP \fB\-\-\fR .RS 4 Marks the last option so the next parameter is the -\fIlogfile\fR. +\fIlogfile\fR\. .RE .PP \fBlogfile\fR .RS 4 -(use '\-' for stdin) +(use \'\-\' for stdin) .RE .SH "OUTPUT FORMAT" .PP The standard output has five fields separated by two spaces: -.sp -.RS 4 .nf # Server:/partition date level size[Kb] 0 daily\-05: 19991005 \- \- 1 cuisun15:/cuisun15/home 19991005 1 96 2 cuinfs:/export/dentiste 19991005 1 96 - ... + \.\.\. 103 cuisg11:/ 19991005 0 4139136 103 total: \- \- 16716288 - - .fi -.RE .PP In tabular format (\-t), this would look like: -.sp -.RS 4 .nf # Server:/partition date lev size[Kb] 0 daily\-05: 19991005 \- \- 1 cuisun15:/cuisun15/home 19991005 1 96 2 cuinfs:/export/dentiste 19991005 1 96 - ... + \.\.\. 103 cuisg11:/ 19991005 0 4139136 103 total: \- \- 16716288 - .fi -.RE .SH "USAGE" .PP The easiest way to use it is to run @@ -112,29 +103,26 @@ right after \fIamdump\fR in the \fIcron job:\fR -.sp -.RS 4 .nf -amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls \-1t $logdir/log.*.[0\-9] | head \-1` ; amtoc \-a $log +amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls \-1t $logdir/log\.*\.[0\-9] | head \-1` ; amtoc \-a $log .fi -.RE -.sp .PP -which will generate /usr/local/etc/amanda//daily/\fItape_label\fR.toc. You may also want to call +which will generate /usr/local/etc/amanda//daily/\fItape_label\fR\.toc\. You may also want to call \fBamtoc\fR after an -\fIamflush\fR. +\fIamflush\fR\. .SH "SEE ALSO" .PP \fBamanda\fR(8), \fBamdump\fR(8), \fBamflush\fR(8), -\fBamgetconf\fR(8), cron, perl +\fBamgetconf\fR(8), cron, perl, +: http://wiki.zmanda.com .SH "AUTHOR" .PP Nicolas Mayencourt -, University of Geneva/Switzerland : Original text +, University of Geneva/Switzerland : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion diff --git a/man/amverify.8 b/man/amverify.8 index 59ca7cd..d9ada11 100644 --- a/man/amverify.8 +++ b/man/amverify.8 @@ -1,17 +1,17 @@ .\" Title: amverify .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMVERIFY" "8" "06/06/2007" "" "" +.TH "AMVERIFY" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amverify \- check an Amanda tape for errors +amverify - check an Amanda tape for errors .SH "SYNOPSIS" .HP 9 \fBamverify\fR \fIconfig\fR [\fIslot\fR\ [\fIruntapes\fR]] @@ -20,44 +20,45 @@ amverify \- check an Amanda tape for errors \fBAmverify\fR reads an Amanda format tape and makes sure each backup image can be processed by \fBamrestore\fR -and, if possible, the appropriate restore program (e.g. -\fBtar\fR). +and, if possible, the appropriate restore program (e\.g\. +\fBtar\fR)\. .PP \fBAmverify\fR runs \fBamrestore\fR -on each file of the tape and pipes the output to a restore program (if available) with an option to create a catalogue of the backup. The catalogue itself is discarded. Only the success or failure of the operation itself is reported. +on each file of the tape and pipes the output to a restore program (if available) with an option to create a catalogue of the backup\. The catalogue itself is discarded\. Only the success or failure of the operation itself is reported\. .PP -If the backup image cannot be processed by the restore program, e.g. if it was written on a different operating system, the image is sent through +If the backup image cannot be processed by the restore program, e\.g\. if it was written on a different operating system, the image is sent through \fBdd\fR -to /dev/null. This still determines if the tape is readable, but does not do any internal consistency check on the image. +to /dev/null\. This still determines if the tape is readable, but does not do any internal consistency check on the image\. .PP If \fIconfig\fR is set up to use a tape changer, the \fIslot\fR -argument may be used to choose the first tape to process. Otherwise, the +argument may be used to choose the first tape to process\. Otherwise, the \fBcurrent\fR -slot is used. +slot is used\. .PP The \fBruntapes\fR -configuration parameter determines how many tapes are processed unless it is specified on the command line. +configuration parameter determines how many tapes are processed unless it is specified on the command line\. .PP See the \fBamanda\fR(8) -man page for more details about Amanda. +man page for more details about Amanda\. .SH "AUTHOR" .PP Axel Zinser - + : Original text .PP -Stefan G. Weichinger, -, maintainer of the +Stefan G\. Weichinger, +, maintainer of the \fIAmanda\fR\-documentation: XML\-conversion .SH "SEE ALSO" .PP \fBamrestore\fR(8), \fBamanda\fR(8), -\fBamverifyrun\fR(8) +\fBamverifyrun\fR(8), +: http://wiki.zmanda.com diff --git a/man/amverifyrun.8 b/man/amverifyrun.8 index 50bb981..8390574 100644 --- a/man/amverifyrun.8 +++ b/man/amverifyrun.8 @@ -1,17 +1,17 @@ .\" Title: amverifyrun .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 06/06/2007 +.\" Generator: DocBook XSL Stylesheets v1.73.2 +.\" Date: 08/22/2008 .\" Manual: .\" Source: .\" -.TH "AMVERIFYRUN" "8" "06/06/2007" "" "" +.TH "AMVERIFYRUN" "8" "08/22/2008" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" -amverifyrun \- check the tapes written by the last Amanda run +amverifyrun - check the tapes written by the last Amanda run .SH "SYNOPSIS" .HP 12 \fBamverifyrun\fR \fIconfig\fR @@ -20,10 +20,11 @@ amverifyrun \- check the tapes written by the last Amanda run \fBAmverifyrun\fR read the log from the last \fIAmanda\fR -run to find the slot of the first tape used and the number of tapes used. It call +run to find the slot of the first tape used and the number of tapes used\. It call \fBamverify\fR -with these argument. +with these argument\. .SH "SEE ALSO" .PP \fBamanda\fR(8), -\fBamverify\fR(8) +\fBamverify\fR(8), +: http://wiki.zmanda.com diff --git a/man/xml-source/amadmin.8.xml b/man/xml-source/amadmin.8.xml index b66f5af..7efd519 100644 --- a/man/xml-source/amadmin.8.xml +++ b/man/xml-source/amadmin.8.xml @@ -176,12 +176,22 @@ The default sort order is hkdlpb. - holding list [-l] [ hostname [ disk [ datestamp [ .. ] ] ] ] + holding list [-l] [-d] [ hostname [ disk [ datestamp [ .. ] ] ] ] List holding files matching the given specification, or all holding files if no specification is provided. With '-l', additional information - (size and level) is provided. + (size, level, and whether the dump is outdated) is provided. With '-d', only + outdated dumps are shown. + + An outdated holding file is one which is not required for a + restore of the most recent dump. Note that + outdated dumps may still be required for restores at earlier dates. + For example, assume that a DLE had a level 0 on Monday, level + 1's Tuesday through Thursday, and a level 2 on Friday. Then the + files required for a restore of Fridays (the most recent) dump + are those from Monday (level 0), Thursday (level 1), and Friday + (level 2). Tuesday and Wednesday's files are outdated. @@ -429,6 +439,8 @@ TOTAL 241 12412187 7316312 731631 (estimated 8 runs per dumpcycle) amcheck8, amdump8, amrestore8, -amfetchdump8 +amfetchdump8, + + diff --git a/man/xml-source/amaespipe.8.xml b/man/xml-source/amaespipe.8.xml index 660f992..b3c87f0 100755 --- a/man/xml-source/amaespipe.8.xml +++ b/man/xml-source/amaespipe.8.xml @@ -45,7 +45,8 @@ the encrypted image. amanda.conf5, aespipe1, amcrypt8, -gpg1 +gpg1, + diff --git a/man/xml-source/amanda-client.conf.5.xml b/man/xml-source/amanda-client.conf.5.xml index 2cf5f38..d110291 100644 --- a/man/xml-source/amanda-client.conf.5.xml +++ b/man/xml-source/amanda-client.conf.5.xml @@ -196,6 +196,8 @@ tcp connection for all data stream. authorization. krb5 to use Kerberos-V authorization. +local, if the client is the server, it +doesn't require authencation setup. rsh to use rsh authorization. ssh to use OpenSSH @@ -390,6 +392,7 @@ Unreserved tcp port that will be used (bsd, bsdudp) amanda.conf5, amcrypt8, aespipe1, + diff --git a/man/xml-source/amanda.8.xml b/man/xml-source/amanda.8.xml index e65d913..383e35a 100644 --- a/man/xml-source/amanda.8.xml +++ b/man/xml-source/amanda.8.xml @@ -176,16 +176,25 @@ - amverify + amcheckdump + options config - amverifyrun + amserverconfig + options config + + + amaddclient + config + options + + @@ -320,9 +329,21 @@ ejecting tapes and scanning the tape storage slots. - amverify + amcheckdump + +Check the results of an &A; dump. + + + + amserverconfig -Check &A; backup tapes for errors. +Program to setup initial &A; configuration. + + + + amaddclient + +Program to add client to an existing &A; configuration. @@ -1221,14 +1242,38 @@ escaped within any component by preceding them with a '\'. CONFIGURATION OVERRIDE -Most command allow to overwrite any configuration parameter on -the command line with the -o option. --o NAME=value -eg. -o runtapes=2 -eg. -o DUMPTYPE:no-compress:compress="server fast" -eg. -o TAPETYPE:HP-DAT:length=2000m -eg. -o INTERFACE:local:use="2000 kbps" +Most commands allow the override of specific +configuration options on the command line, using the -o option. This option has the form -oname=value. +An optional space is allowed after the -o. +Each configuration option should be specified in a separate +command-line option. + +For global options, name is simply the name of the option, e.g., + +amdump -oruntapes=2 + +For options in a named section of the configuration, name has the +form SECTION:section_name:name, +where SECTION is one of TAPETYPE, DUMPTYPE, HOLDINGDISK, or INTERFACE, and +section_name is the name of the tapetype, dumptype, holdingdisk, or interface. +Examples: + +amdump -o TAPETYPE:HP-DAT:length=2000m +amdump -o DUMPTYPE:no-compress:compress="server fast" +amdump -o HOLDINGDISK:hd1:use="-100 mb" +amdump -o INTERFACE:local:use="2000 kbps" + + +Note that configuration overrides are not effective for tape +changers, which supply a tapedev based on their own configuration. In order to +override tapedev, you must also disable any changer: + +amdump -otapedev=/dev/nst1 -otpchanger='' + + @@ -1262,8 +1307,11 @@ the command line with the -o option. amtape8, amtapetype8, amtoc8, -amverify8, -amverifyrun8 +amcheckdump8, +amserverconfig8, +amaddclient8, + + diff --git a/man/xml-source/amanda.conf.5.xml b/man/xml-source/amanda.conf.5.xml index 027a4ab..6b15ca7 100644 --- a/man/xml-source/amanda.conf.5.xml +++ b/man/xml-source/amanda.conf.5.xml @@ -232,15 +232,10 @@ with damaged or misplaced tapes or schedule adjustments that call for slight adj usetimestamps bool - Default: No. -By default, Amanda can only track at most one run per calendar day. When -this option is enabled, however, Amanda can track as many runs as you care -to make. - - -WARNING: This option is not backward-compatible. -Do not enable it if you intend to downgrade your server installation to -Amanda community edition 2.5.0 + Default: Yes. +This option allows Amanda to track multiple runs per calendar +day. The only reason one might disable it is that Amanda versions before 2.5.1 +can't read logfiles written when this option was enabled. @@ -288,6 +283,7 @@ See the option. + tapedev string @@ -323,15 +319,27 @@ option set to - rawtapedev string + device_property string string -Default: -null:. -The path name of the raw tape device. -This is only used if &A; is compiled for Linux machines with floppy tapes -and is needed for QIC volume table operations. +These options can set various device properties, including block size, +maximum volume usage, authentication information, hardware feature support, +and more.Specifics of how properties are used are device-dependent, though +some common properties are supported across multiple device drivers. + + Both strings are quoted; the first string contains the name of +the property to set, and the second contains its value. For example, to set +a fixed block size of 128k, do:device_property "BLOCK_SIZE" "131072" + +The order in which device properties are set is as follows: +Tapetype parameters, including length, blocksize, +readblocksize, file-pad, are translated into device properties and set +accordingly. +Device properties from any device_property configuration directives +are set, in the order they appear in the configuration file. + + tpchanger string @@ -507,15 +515,14 @@ will wait before it fails with a data timeout error. Default: 300 seconds. -Amount of time per disk on a given client that the -planner -step of -amdump -will wait to get the dump size estimates. -For instance, with the default of 300 seconds and four disks on client A, -planner -will wait up to 20 minutes for that machine. -A negative value will be interpreted as a total amount of time to wait +Amount of time per estimate on a given client that the +planner step of +amdump will wait to get the dump size estimates +(note: Amanda runs up to 3 estimates for each DLE). For instance, +with the default of 300 seconds and four DLE's, each estimating level +0 and level 1 on client A, planner +will wait up to 40 minutes for that machine. A negative value will +be interpreted as a total amount of time to wait per client instead of per disk. @@ -542,7 +549,7 @@ How many times the server will resend a REQ packet if it doesn't get the ACK pac netusage int Default: -300 Kbps. +8000 Kbps. The maximum network bandwidth allocated to &A;, in Kbytes per second. See also the interface @@ -764,6 +771,17 @@ The file name for the active tapelist file. &A; maintains this file with information about the active set of tapes. + + + + device_output_buffer_size int + +Default: +640k. +Controls the amount of memory used by &A; +to hold data as it is read from the network or disk before it is written to +the output device. Higher values may be +useful on fast tape drives and optical media. @@ -771,14 +789,11 @@ file. Default: 20. -The number of buffers used by the -taper -process run by -amdump -and -amflush -to hold data as it is read from the network or disk before it is written to tape. -Each buffer is a little larger than 32 KBytes and is held in a shared memory region. +This option is deprecated; use +the device_output_buffer_size directive +instead. tapebufs works the same way, +but the number specified is multiplied by the device blocksize prior +to use. @@ -883,7 +898,9 @@ with one space before it. Default: none. The name of an &A; configuration file to include within the current file. -Useful for sharing dumptypes, tapetypes and interface definitions among several configurations. +Useful for sharing dumptypes, tapetypes and interface definitions among several configurations. +Relative pathnames are relative to the configuration directory. + @@ -968,12 +985,94 @@ Debug level of the taper process + + flush-threshold-dumped int + +Default: 0. + &A; will not begin writing data to a new volume until the amount of + data on the holding disk is at least this percentage of the volume + size. In other words, &A; will not begin until the + inequality h < t × + d is satisfied, + where h is the amount of data on the + holding disk, t is the capacity of a + volume, and d is this parameter, expressed as a + percentage. + Needless to say, your holding disk must be big enough + that this criterion could be satisfied. If the holding disk cannot + be used for a particular dump (because, for example, there is no + remaining holding space) then &A; will disregard the constraint + specified by this setting and start a new volume anyway. Once + writing to a volume has begun, this constraint is not applied unless + and until a new volume is needed. + The value of this parameter may not exceed than that of + the flush-threshold-scheduled + parameter. + + + + + flush-threshold-scheduled int + +Default: 0. + &A; will not begin writing data to a new volume until the sum of the + amount of data on the holding disk and the estimated amount of data + remaining to be dumped during this run is at least this percentage + of the volume size. In other words, &A; will not begin until the + inequality h + s < t × + d is satisfied, + where h is the amount of data on the + holding disk, s is the total amount of + data scheduled for this run but not dumped + yet, t is the capacity of a volume, + and d is this parameter, expressed as a + percentage. + Needless to say, your holding disk must be big enough + that this criterion could be satisfied. If the holding disk cannot + be used for a particular dump (because, for example, there is no + remaining holding space) then &A; will disregard the constraint + specified by this setting and start a new volume anyway. Once + writing to a volume has begun, this constraint is not applied unless + and until a new volume is needed. + The value of this parameter may not be less than that of + the flush-threshold-dumped + or taperflush parameters. + + + + + + taperflush int + +Default: 0. + At the end of a run, &A; will start a new tape to flush remaining + data if there is more data on the holding disk at the end of a run + than this setting allows; the amount is specified as a percentage of + the capacity of a single + volume. In other words, at the end of a run, &A; will begin + a new tape if the + inequality h < t × + f is satisfied, + where h is the amount of data remaining on the + holding disk from this or previous runs, t + is the capacity of a volume, + and f is this parameter, expressed as a + percentage. + The value of this parameter may not exceed that of + the flush-threshold-scheduled + parameter.; autoflush must be set to 'yes' if + taperflush is greater than 0. + + + reserved-udp-port int,int Default: --with-udpportrange or 512,1023. -Reserved udp port that will be used (bsd, bsdudp) +Reserved udp port that will be used (bsd, bsdudp). +Range is inclusive. @@ -982,7 +1081,8 @@ Reserved udp port that will be used (bsd, bsdudp) Default: --with-low-tcpportrange or 512,1023. -Reserved tcp port that will be used (bsdtcp) +Reserved tcp port that will be used (bsdtcp). +Range is inclusive. @@ -990,8 +1090,9 @@ Reserved tcp port that will be used (bsdtcp) unreserved-tcp-port int,int Default: --with-tcpportrange or -1025,65536. -Unreserved tcp port that will be used (bsd, bsdudp) +1024,65535. +Unreserved tcp port that will be used (bsd, bsdudp). +Range is inclusive. @@ -1133,6 +1234,8 @@ tcp connection for all data stream. authorization. krb5 to use Kerberos-V authorization. +local, if the client is the server, it +doesn't require authencation setup. rsh to use rsh authorization. ssh to use OpenSSH @@ -1682,10 +1785,7 @@ The value should be hh*100+mm, e.g. 6:30PM (18:30) would be entered as incronly Only do incremental dumps. amadmin force should be used to tell - &A; that a full dump has been performed off-line, so that it resets to level 1. - It is similar to skip-full, but with incronly full dumps may be scheduled manually. - Unfortunately, it appears that &A; will perform full backups with this configuration, - which is probably a bug. + &A; that a full dump has been performed off-line, so that it resets to level 1. @@ -2003,7 +2103,7 @@ A comment string describing this set of network information. use int Default: -300 Kbps. +8000 Kbps. The speed of the interface in Kbytes per second. @@ -2029,7 +2129,9 @@ At the moment, this is of little use. amanda-client.conf5, amcrypt8, aespipe1, + + diff --git a/man/xml-source/amcheck.8.xml b/man/xml-source/amcheck.8.xml index 4001dfe..0ee87d5 100644 --- a/man/xml-source/amcheck.8.xml +++ b/man/xml-source/amcheck.8.xml @@ -862,6 +862,14 @@ was reported by the status check on +EXIT CODE +The exit code of amcheck is one of: + + 0 = success + 1 = error + + + AUTHOR James da Silva, &email.jds; : Original text &maintainer.sgw;: XML-conversion @@ -869,7 +877,9 @@ was reported by the status check on SEE ALSO amanda8, -amdump8 +amdump8, + + diff --git a/man/xml-source/amcheckdb.8.xml b/man/xml-source/amcheckdb.8.xml index a59a182..7585a8b 100644 --- a/man/xml-source/amcheckdb.8.xml +++ b/man/xml-source/amcheckdb.8.xml @@ -68,7 +68,9 @@ Ready. SEE ALSO amadmin8, amrmtape8, -amanda8 +amanda8, + + diff --git a/man/xml-source/amcleanup.8.xml b/man/xml-source/amcleanup.8.xml index 4d235cf..76c9f1d 100644 --- a/man/xml-source/amcleanup.8.xml +++ b/man/xml-source/amcleanup.8.xml @@ -22,6 +22,8 @@ amcleanup + + config @@ -53,6 +55,12 @@ man page for more details about &A;. Kill all Amanda processes. + + + + Generate verbose output. + + @@ -89,7 +97,9 @@ amcleanup: no unprocessed logfile to clean up. SEE ALSO amanda8, -amdump8 +amdump8, + + diff --git a/man/xml-source/amcrypt-ossl-asym.8.xml b/man/xml-source/amcrypt-ossl-asym.8.xml index 4e039d8..3c2a974 100644 --- a/man/xml-source/amcrypt-ossl-asym.8.xml +++ b/man/xml-source/amcrypt-ossl-asym.8.xml @@ -45,7 +45,7 @@ RSA keys can be generated with the standard OpenSSL commands, e.g.: -$ cd /var/backups +$ cd /var/lib/amanda $ openssl genrsa -aes128 -out backup-privkey.pem 1024 Generating RSA private key, 1024 bit long modulus [...] @@ -100,7 +100,7 @@ Writing RSA key FILES - /var/backups/backup-privkey.pem + /var/lib/amanda/backup-privkey.pem File containing the RSA private key. It should not be readable @@ -109,7 +109,7 @@ Writing RSA key - /var/backups/backup-pubkey.pem + /var/lib/amanda/backup-pubkey.pem File containing the RSA public key. @@ -117,7 +117,7 @@ Writing RSA key - /var/backups/.am_passphrase + /var/lib/amanda/.am_passphrase File containing the passphrase. It should not be readable by @@ -145,7 +145,8 @@ Writing RSA key amcrypt-ossl 8 - + , + diff --git a/man/xml-source/amcrypt-ossl.8.xml b/man/xml-source/amcrypt-ossl.8.xml index c6ced9e..1b6e7a2 100644 --- a/man/xml-source/amcrypt-ossl.8.xml +++ b/man/xml-source/amcrypt-ossl.8.xml @@ -86,7 +86,8 @@ amcrypt-ossl-asym 8 - + , + diff --git a/man/xml-source/amcrypt.8.xml b/man/xml-source/amcrypt.8.xml index 6dc88e6..5d93ea3 100755 --- a/man/xml-source/amcrypt.8.xml +++ b/man/xml-source/amcrypt.8.xml @@ -70,7 +70,8 @@ passphrase. amanda.conf5, aespipe1, amaespipe8, -gpg1 +gpg1, + diff --git a/man/xml-source/amdd.8.xml b/man/xml-source/amdd.8.xml index a75c451..02a206f 100644 --- a/man/xml-source/amdd.8.xml +++ b/man/xml-source/amdd.8.xml @@ -147,7 +147,10 @@ Default is zero. SEE ALSO -amanda8 + + amanda8, + + diff --git a/man/xml-source/amdump.8.xml b/man/xml-source/amdump.8.xml index 740f589..c559cfd 100644 --- a/man/xml-source/amdump.8.xml +++ b/man/xml-source/amdump.8.xml @@ -123,18 +123,33 @@ and then rerun +EXIT CODE +The exit code of amdump is the ORed value of: + + 0 = success + 1 = error + 2 = a dle give strange message + 4 = a dle failed + 8 = Don't know the status of a dle (RESULT_MISSING in the report) + 16 = tape error or no more tape + + + AUTHOR James da Silva, &email.jds; : Original text &maintainer.sgw;: XML-conversion SEE ALSO -amanda8, -amcheck8, -amcleanup8, -amrestore8, -amflush8, -cron8 + + amanda8, + amcheck8, + amcleanup8, + amrestore8, + amflush8, + cron8, + + diff --git a/man/xml-source/amfetchdump.8.xml b/man/xml-source/amfetchdump.8.xml index 8e71722..5a7d120 100644 --- a/man/xml-source/amfetchdump.8.xml +++ b/man/xml-source/amfetchdump.8.xml @@ -24,7 +24,6 @@ -pcClawns -d device -O directory - -i logfile -b blocksize config hostname @@ -122,11 +121,6 @@ restoring. Assume that all tapes are already available, via tape changer or otherwise, instead of prompting the operator to ensure that all tapes are loaded. - - - filename -Generate an inventory of all dumps "seen" on the -tapes we search, for later use as a log. @@ -196,26 +190,6 @@ automatically extract the dump. $ amfetchdump -p SetA vanya /home 20051020 | gtar -xvpf - -In a situation where all of our dump logs have been wiped out, -we could also use amfetchdump to inventory our tapes and recreate an -imitation of those logs, which we'll send to stdout for casual perusal. - - -$ amfetchdump -i - SetA - - - -Note that you can specify a restore while in inventory mode, and -amfetchdump will continue searching for more dumps -from this host even after successfully restoring a dump, inventorying -all the while. If your backup searcher has been trashed, this is a -handy way to recover what you have. - - -$ amfetchdump -i /var/amanda/log SetA backupserver - - CAVEATS @@ -240,8 +214,10 @@ instead. amanda8, amadmin8, amrestore8, -tar1 -restore8 +tar1, +restore8, + + diff --git a/man/xml-source/amflush.8.xml b/man/xml-source/amflush.8.xml index aaa9ed1..24fde4e 100644 --- a/man/xml-source/amflush.8.xml +++ b/man/xml-source/amflush.8.xml @@ -171,14 +171,28 @@ You'll get mail when amflush is finished. +EXIT CODE +The exit code of amflush is the ORed value of: + + 0 = success + 1 = error + 4 = a dle failed + 8 = Don't know the status of a dle (RESULT_MISSING in the report) + 16 = tape error or no more tape + + + AUTHOR James da Silva, &email.jds; : Original text &maintainer.sgw;: XML-conversion SEE ALSO -amanda8, -amdump8 + + amanda8, + amdump8, + + diff --git a/man/xml-source/amgetconf.8.xml b/man/xml-source/amgetconf.8.xml index 1775598..9dab511 100644 --- a/man/xml-source/amgetconf.8.xml +++ b/man/xml-source/amgetconf.8.xml @@ -207,7 +207,10 @@ keyword). SEE ALSO -amanda8 + + amanda8, + + diff --git a/man/xml-source/amlabel.8.xml b/man/xml-source/amlabel.8.xml index c36ee0e..47717a0 100644 --- a/man/xml-source/amlabel.8.xml +++ b/man/xml-source/amlabel.8.xml @@ -184,9 +184,11 @@ instead of a non-rewinding device name for SEE ALSO -amanda8 -amdump8 -amflush8 +amanda8, +amdump8, +amflush8, + + diff --git a/man/xml-source/ammt.8.xml b/man/xml-source/ammt.8.xml index 5604cc7..509eef8 100644 --- a/man/xml-source/ammt.8.xml +++ b/man/xml-source/ammt.8.xml @@ -218,7 +218,9 @@ and may include: SEE ALSO -amanda8 +amanda8, + + diff --git a/man/xml-source/amoverview.8.xml b/man/xml-source/amoverview.8.xml index e2b7a92..910eded 100644 --- a/man/xml-source/amoverview.8.xml +++ b/man/xml-source/amoverview.8.xml @@ -175,7 +175,9 @@ host2 /var 1 1 0 1 1 1 SEE ALSO amadmin8, -amanda8 +amanda8, + + diff --git a/man/xml-source/amplot.8.xml b/man/xml-source/amplot.8.xml index f37a30e..eac7c38 100644 --- a/man/xml-source/amplot.8.xml +++ b/man/xml-source/amplot.8.xml @@ -209,7 +209,9 @@ legitimate lines the program needs to be taught about. gnuplot1, sh1, compress1, -gzip1 +gzip1, + + diff --git a/man/xml-source/amrecover.8.xml b/man/xml-source/amrecover.8.xml index db25f8e..38770b3 100644 --- a/man/xml-source/amrecover.8.xml +++ b/man/xml-source/amrecover.8.xml @@ -203,20 +203,11 @@ mount point instead of full pathnames. - settape [[server]:][tapedev|default] - -Specifies the host to use as the tape server, and which of its tape -devices to use. -If the server is omitted, but the colon is not, the -server name reverts to the configure-time -default. -If the tape device is omitted, it remains unchanged. -To use the default tape device selected by the tape server, the word -default -must be specified. -If no argument is specified, or the argument is an -empty string, no changes occur, and the current settings are -displayed. + setdevice [[-h tape-server] tapedev] + +Specifies the host to use as the tape server, and which of its tape devices to use. +If the server is omitted, the server name reverts to the configure-time default. +If the tape device is omitted, the default is used. If you want amrecover to use your changer, the tapedev @@ -598,7 +589,9 @@ but will be overridden by the -t switch. amanda-client.conf5, amrestore8, amfetchdump8, -readline3 +readline3, + + diff --git a/man/xml-source/amreport.8.xml b/man/xml-source/amreport.8.xml index 70f7474..38e7fbe 100644 --- a/man/xml-source/amreport.8.xml +++ b/man/xml-source/amreport.8.xml @@ -179,9 +179,23 @@ other tape types or particular site needs. It may be used to make a hardcopy log of the tapes. +EXIT CODE +The exit code of amreport is the ORed value of: + + 0 = success + 1 = error + 2 = a dle give strange message + 4 = a dle failed + 8 = Don't know the status of a dle (RESULT_MISSING in the report) + 16 = tape error or no more tape + + + SEE ALSO amanda8, -amflush8 +amflush8, + + diff --git a/man/xml-source/amrestore.8.xml b/man/xml-source/amrestore.8.xml index a63412e..009e7df 100644 --- a/man/xml-source/amrestore.8.xml +++ b/man/xml-source/amrestore.8.xml @@ -341,8 +341,10 @@ College Park: Original text amanda8, amdump8, amflush8, -tar1 -restore8 +tar1, +restore8, + + diff --git a/man/xml-source/amrmtape.8.xml b/man/xml-source/amrmtape.8.xml index 8cedae2..acdcb78 100644 --- a/man/xml-source/amrmtape.8.xml +++ b/man/xml-source/amrmtape.8.xml @@ -100,7 +100,9 @@ configuration. SEE ALSO amadmin8, -amanda8 +amanda8, + + diff --git a/man/xml-source/amstatus.8.xml b/man/xml-source/amstatus.8.xml index 010f599..1073023 100644 --- a/man/xml-source/amstatus.8.xml +++ b/man/xml-source/amstatus.8.xml @@ -37,6 +37,7 @@ --estimate --gestimate --stats + --locale-independent-date-format @@ -142,15 +143,34 @@ Works only during the estimate phase. Display statistics about active-time of taper and dumpers. + + + +Output the date in a locale independent format. The format is the same executing: date +'%Y-%m-%d %H:%M:%S %Z' + + +EXIT CODE +The exit code of amstatus is the ORed value of: + + 0 = success + 1 = error + 4 = a dle failed + 8 = Don't know the status of a dle (RESULT_MISSING in the report) + 16 = tape error or no more tape + + + SEE ALSO amanda8, amcheck8, amdump8, amrestore8, -amadmin8 +amadmin8, + + diff --git a/man/xml-source/amtape.8.xml b/man/xml-source/amtape.8.xml index 497c824..0d65052 100644 --- a/man/xml-source/amtape.8.xml +++ b/man/xml-source/amtape.8.xml @@ -223,7 +223,9 @@ commands to not eject the loaded tape if it is the one being requested. SEE ALSO -amanda8 +amanda8, + + diff --git a/man/xml-source/amtoc.8.xml b/man/xml-source/amtoc.8.xml index 66b3196..b4eb1eb 100644 --- a/man/xml-source/amtoc.8.xml +++ b/man/xml-source/amtoc.8.xml @@ -108,8 +108,7 @@ option is equivalent to OUTPUT FORMAT The standard output has five fields separated by two spaces: - - + # Server:/partition date level size[Kb] 0 daily-05: 19991005 - - 1 cuisun15:/cuisun15/home 19991005 1 96 @@ -117,12 +116,10 @@ option is equivalent to ... 103 cuisg11:/ 19991005 0 4139136 103 total: - - 16716288 - - -In tabular format (-t), this would look like: + +In tabular format (-t), this would look like: - - + # Server:/partition date lev size[Kb] 0 daily-05: 19991005 - - 1 cuisun15:/cuisun15/home 19991005 1 96 @@ -130,8 +127,7 @@ option is equivalent to ... 103 cuisg11:/ 19991005 0 4139136 103 total: - - 16716288 - - + USAGE The easiest way to use it is to run @@ -142,9 +138,9 @@ in the cron job: - + amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls -1t $logdir/log.*.[0-9] | head -1` ; amtoc -a $log - + which will generate /usr/local/etc/amanda//daily/tape_label.toc. You may also want to call @@ -159,7 +155,9 @@ after an amflush8, amgetconf8, cron, -perl +perl, + + AUTHOR diff --git a/man/xml-source/amverify.8.xml b/man/xml-source/amverify.8.xml index 5667381..f68db90 100644 --- a/man/xml-source/amverify.8.xml +++ b/man/xml-source/amverify.8.xml @@ -82,7 +82,9 @@ man page for more details about Amanda. SEE ALSO amrestore8, amanda8, -amverifyrun8 +amverifyrun8, + + diff --git a/man/xml-source/amverifyrun.8.xml b/man/xml-source/amverifyrun.8.xml index 69d23ca..24043a6 100644 --- a/man/xml-source/amverifyrun.8.xml +++ b/man/xml-source/amverifyrun.8.xml @@ -38,7 +38,9 @@ with these argument. SEE ALSO amanda8, -amverify8 +amverify8, + + diff --git a/oldrecover-src/Makefile.am b/oldrecover-src/Makefile.am index 766afd2..8a0472d 100644 --- a/oldrecover-src/Makefile.am +++ b/oldrecover-src/Makefile.am @@ -1,10 +1,16 @@ # Makefile for Amanda file recovery programs. +include $(top_srcdir)/config/automake/installperms.am +include $(top_srcdir)/config/automake/precompile.am + 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@ @@ -12,10 +18,6 @@ LIB_EXTENSION = la sbin_PROGRAMS = amoldrecover -if WANT_RUNTIME_PSEUDO_RELOC -AM_LDFLAGS = -Wl,-enable-runtime-pseudo-reloc -endif - ### # Because libamanda includes routines (e.g. regex) provided by some system # libraries, and because of the way libtool sets up the command line, we @@ -25,8 +27,8 @@ endif LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \ @LEXLIB@ \ - ../client-src/libamclient.$(LIB_EXTENSION) \ $(READLINE_LIBS) \ + ../client-src/libamclient.$(LIB_EXTENSION) \ ../common-src/libamanda.$(LIB_EXTENSION) \ ../gnulib/libgnu.$(LIB_EXTENSION) @@ -42,27 +44,19 @@ AM_YFLAGS = -d # 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 - +INSTALLPERMS_exec = \ + dest=$(sbindir) chown=amanda chmod=o-rwx $(sbin_PROGRAMS) lint: @ f="$(amoldrecover_CSRC)"; \ @@ -71,7 +65,7 @@ lint: (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 --git a/oldrecover-src/Makefile.in b/oldrecover-src/Makefile.in index 448a206..3caa50f 100644 --- a/oldrecover-src/Makefile.in +++ b/oldrecover-src/Makefile.in @@ -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. @@ -16,16 +16,53 @@ # 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 @@ 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 = amoldrecover$(EXEEXT) subdir = oldrecover-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 @@ amoldrecover_OBJECTS = $(am_amoldrecover_OBJECTS) amoldrecover_LDADD = $(LDADD) am__DEPENDENCIES_1 = amoldrecover_DEPENDENCIES = ../common-src/libamanda.$(LIB_EXTENSION) \ + $(am__DEPENDENCIES_1) \ ../client-src/libamclient.$(LIB_EXTENSION) \ - $(am__DEPENDENCIES_1) ../common-src/libamanda.$(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 $@ 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 = $(amoldrecover_SOURCES) DIST_SOURCES = $(amoldrecover_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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ -388,8 +660,8 @@ LIB_EXTENSION = la ### LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \ @LEXLIB@ \ - ../client-src/libamclient.$(LIB_EXTENSION) \ $(READLINE_LIBS) \ + ../client-src/libamclient.$(LIB_EXTENSION) \ ../common-src/libamanda.$(LIB_EXTENSION) \ ../gnulib/libgnu.$(LIB_EXTENSION) @@ -400,11 +672,14 @@ amoldrecover_CSRC = amrecover.c \ amoldrecover_SOURCES = $(amoldrecover_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 @@ $(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 @@ clean-sbinPROGRAMS: uparse.h: uparse.c @if test ! -f $@; then \ rm -f uparse.c; \ - $(MAKE) uparse.c; \ + $(MAKE) $(AM_MAKEFLAGS) uparse.c; \ else :; fi amoldrecover$(EXEEXT): $(amoldrecover_OBJECTS) $(amoldrecover_DEPENDENCIES) @rm -f amoldrecover$(EXEEXT) - $(LINK) $(amoldrecover_LDFLAGS) $(amoldrecover_OBJECTS) $(amoldrecover_LDADD) $(LIBS) + $(LINK) $(amoldrecover_OBJECTS) $(amoldrecover_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -485,51 +760,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 @@ -537,10 +792,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 \ @@ -590,22 +841,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 @@ check: check-am 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 @@ 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 @@ 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 @@ -672,15 +924,25 @@ info: info-am 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 @@ ps: ps-am 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="$(amoldrecover_CSRC)"; \ (cd ../common-src; make listlibsrc); \ @@ -746,7 +1059,7 @@ lint: (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 --git a/oldrecover-src/amrecover.c b/oldrecover-src/amrecover.c index 6b4aaff..43d839d 100644 --- a/oldrecover-src/amrecover.c +++ b/oldrecover-src/amrecover.c @@ -46,7 +46,7 @@ int grab_reply(int show); void sigint_handler(int signum); int main(int argc, char **argv); -#define USAGE "Usage: amoldrecover [[-C] ] [-s ] [-t ] [-d ]\n" +#define USAGE _("Usage: amoldrecover [[-C] ] [-s ] [-t ] [-d ]\n") char *config = NULL; char *server_name = NULL; @@ -86,11 +86,11 @@ get_line(void) fputc('\n', stderr); } if(save_errno != 0) { - fprintf(stderr, "%s: Error reading line from server: %s\n", + g_fprintf(stderr, _("%s: Error reading line from server: %s\n"), get_pname(), strerror(save_errno)); } else { - fprintf(stderr, "%s: Unexpected end of file, check amindexd*debug on server %s\n", + g_fprintf(stderr, _("%s: Unexpected end of file, check amindexd*debug on server %s\n"), get_pname(), server_name); } @@ -295,7 +295,7 @@ guess_disk ( /*NOTREACHED*/ } cwd_length = strlen(cwd); - dbprintf(("guess_disk: " SSIZE_T_FMT ": \"%s\"\n", cwd_length, cwd)); + dbprintf(_("guess_disk: %zu: \"%s\"\n"), cwd_length, cwd); if (open_fstab() == 0) { return -1; @@ -305,11 +305,11 @@ guess_disk ( while (get_fstab_nextentry(&fsent)) { current_length = fsent.mntdir ? strlen(fsent.mntdir) : (size_t)0; - dbprintf(("guess_disk: " SSIZE_T_FMT ": " SSIZE_T_FMT": \"%s\": \"%s\"\n", + dbprintf(_("guess_disk: %zu: %zu: \"%s\": \"%s\"\n"), longest_match, current_length, - fsent.mntdir ? fsent.mntdir : "(mntdir null)", - fsent.fsname ? fsent.fsname : "(fsname null)")); + fsent.mntdir ? fsent.mntdir : _("(mntdir null)"), + fsent.fsname ? fsent.fsname : _("(fsname null)")); if ((current_length > longest_match) && (current_length <= cwd_length) && (strncmp(fsent.mntdir, cwd, current_length) == 0)) @@ -325,9 +325,9 @@ guess_disk ( fsname = newstralloc(fsname,fsent.fsname+strlen(DEV_PREFIX)); } local_disk = is_local_fstype(&fsent); - dbprintf(("guess_disk: local_disk = %d, fsname = \"%s\"\n", + dbprintf(_("guess_disk: local_disk = %d, fsname = \"%s\"\n"), local_disk, - fsname)); + fsname); } } close_fstab(); @@ -347,7 +347,7 @@ guess_disk ( /* have mount point now */ /* disk name may be specified by mount point (logical name) or device name, have to determine */ - printf("Trying disk %s ...\n", *mpt_guess); + g_printf(_("Trying disk %s ...\n"), *mpt_guess); disk_try = stralloc2("DISK ", *mpt_guess); /* try logical name */ if (exchange(disk_try) == -1) exit(1); @@ -358,7 +358,7 @@ guess_disk ( amfree(fsname); return 1; } - printf("Trying disk %s ...\n", fsname); + g_printf(_("Trying disk %s ...\n"), fsname); disk_try = stralloc2("DISK ", fsname); /* try device name */ if (exchange(disk_try) == -1) exit(1); @@ -409,7 +409,15 @@ main( char *service_name; char *line = NULL; struct tm *tm; - 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); @@ -420,17 +428,9 @@ main( 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'; @@ -439,6 +439,8 @@ main( dbrename(config, DBG_SUBDIR_CLIENT); + check_running_as(RUNNING_AS_ROOT); + amfree(server_name); server_name = getenv("AMANDA_SERVER"); if(!server_name) server_name = DEFAULT_SERVER; @@ -449,12 +451,7 @@ main( if(!tape_server_name) tape_server_name = DEFAULT_TAPE_SERVER; tape_server_name = stralloc(tape_server_name); - 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); if (argc > 1 && argv[1][0] != '-') { @@ -498,13 +495,13 @@ main( case 'U': case '?': - (void)printf(USAGE); + (void)g_printf(USAGE); return 0; } } if (optind != argc) { - (void)fprintf(stderr, USAGE); + (void)g_fprintf(stderr, USAGE); exit(1); } @@ -521,16 +518,16 @@ main( 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*/ } service_name = stralloc2("amandaidx", SERVICE_SUFFIX); - printf("AMRECOVER Version %s. Contacting server on %s ...\n", + g_printf(_("AMRECOVER Version %s. Contacting server on %s ...\n"), version(), server_name); if ((sp = getservbyname(service_name, "tcp")) == NULL) { - error("%s/tcp unknown protocol", service_name); + error(_("%s/tcp unknown protocol"), service_name); /*NOTREACHED*/ } amfree(service_name); @@ -541,25 +538,15 @@ main( &my_port, 0); if (server_socket < 0) { - error("cannot connect to %s: %s", server_name, strerror(errno)); + error(_("cannot connect to %s: %s"), server_name, strerror(errno)); /*NOTREACHED*/ } if (my_port >= IPPORT_RESERVED) { aclose(server_socket); - error("did not get a reserved port: %d", my_port); + error(_("did not get a reserved port: %d"), my_port); /*NOTREACHED*/ } -#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); @@ -611,9 +598,9 @@ main( 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); + g_printf(_("Setting restore date to today (%s)\n"), dump_date); line = stralloc2("DATE ", dump_date); if (converse(line) == -1) { aclose(server_socket); @@ -641,20 +628,20 @@ main( { case 1: /* okay, got a guess. Set disk accordingly */ - printf("$CWD '%s' is on disk '%s' mounted at '%s'.\n", + g_printf(_("$CWD '%s' is on disk '%s' mounted at '%s'.\n"), cwd, dn_guess, mpt_guess); set_disk(dn_guess, mpt_guess); set_directory(cwd); if (server_happy() && strcmp(cwd, mpt_guess) != 0) - printf("WARNING: not on root of selected filesystem, check man-page!\n"); + g_printf(_("WARNING: not on root of selected filesystem, check man-page!\n")); amfree(dn_guess); amfree(mpt_guess); break; case 0: - printf("$CWD '%s' is on a network mounted disk\n", + g_printf(_("$CWD '%s' is on a network mounted disk\n"), cwd); - printf("so you must 'sethost' to the server\n"); + g_printf(_("so you must 'sethost' to the server\n")); /* fake an unhappy server */ server_line[0] = '5'; break; @@ -662,7 +649,7 @@ main( case 2: case -1: default: - 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")); /* fake an unhappy server */ server_line[0] = '5'; break; @@ -698,7 +685,7 @@ get_security(void) struct passwd *pwptr; if((pwptr = getpwuid(getuid())) == NULL) { - error("can't get login name for my uid %ld", (long)getuid()); + error(_("can't get login name for my uid %ld"), (long)getuid()); /*NOTREACHED*/ } return stralloc2("SECURITY USER ", pwptr->pw_name); diff --git a/oldrecover-src/display_commands.c b/oldrecover-src/display_commands.c index 2a15332..2cb4f0a 100644 --- a/oldrecover-src/display_commands.c +++ b/oldrecover-src/display_commands.c @@ -97,9 +97,8 @@ add_dir_list_item( { DIR_ITEM *next; - dbprintf(("add_dir_list_item: Adding \"%s\" \"%d\" \"%s\" \"" - OFF_T_FMT "\" \"%s\"\n", - date, level, tape, (OFF_T_FMT_TYPE)fileno, path)); + dbprintf(_("add_dir_list_item: Adding \"%s\" \"%d\" \"%s\" \"%lld\" \"%s\"\n"), + date, level, tape, (long long)fileno, path); next = (DIR_ITEM *)alloc(sizeof(DIR_ITEM)); memset(next, 0, sizeof(DIR_ITEM)); @@ -143,7 +142,7 @@ suck_dir_list_from_server(void) int ch; if (disk_path == NULL) { - printf("Directory must be set before getting listing\n"); + g_printf(_("Directory must be set before getting listing\n")); return; } else if(strcmp(disk_path, "/") == 0) { disk_path_slash = stralloc(disk_path); @@ -169,7 +168,7 @@ suck_dir_list_from_server(void) { amfree(disk_path_slash); l = reply_line(); - printf("%s\n", l); + g_printf("%s\n", l); return; } disk_path_slash_dot = stralloc2(disk_path_slash, "."); @@ -195,7 +194,7 @@ suck_dir_list_from_server(void) l = reply_line(); if (!server_happy()) { - printf("%s\n", l); + g_printf("%s\n", l); continue; } s = l; @@ -207,7 +206,7 @@ suck_dir_list_from_server(void) skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing date field"; + err = _("bad reply: missing date field"); continue; } date = s - 1; @@ -216,14 +215,14 @@ suck_dir_list_from_server(void) skip_whitespace(s, ch); if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) { - err = "bad reply: cannot parse level field"; + err = _("bad reply: cannot parse level field"); continue; } skip_integer(s, ch); skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing tape field"; + err = _("bad reply: missing tape field"); continue; } tape = s - 1; @@ -233,10 +232,10 @@ suck_dir_list_from_server(void) *tape_undo = '\0'; if(am_has_feature(indexsrv_features, fe_amindexd_fileno_in_OLSD)) { - OFF_T_FMT_TYPE fileno_ = (OFF_T_FMT_TYPE)0; + long long fileno_ = (long long)0; skip_whitespace(s, ch); - if(ch == '\0' || sscanf(s - 1, OFF_T_FMT, &fileno_) != 1) { - err = "bad reply: cannot parse fileno field"; + if(ch == '\0' || sscanf(s - 1, "%lld", &fileno_) != 1) { + err = _("bad reply: cannot parse fileno field"); continue; } fileno = (off_t)fileno_; @@ -248,7 +247,7 @@ suck_dir_list_from_server(void) skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing directory field"; + err = _("bad reply: missing directory field"); continue; } qdir = s - 1; @@ -289,7 +288,7 @@ list_directory(void) char *quoted; if (disk_path == NULL) { - printf("Must select a disk before listing files; use the setdisk command.\n"); + g_printf(_("Must select a disk before listing files; use the setdisk command.\n")); return; } @@ -304,7 +303,7 @@ list_directory(void) pager_command = stralloc2(pager, " ; /bin/cat > /dev/null"); if ((fp = popen(pager_command, "w")) == NULL) { - printf("Warning - can't pipe through %s\n", pager); + g_printf(_("Warning - can't pipe through %s\n"), pager); fp = stdout; } amfree(pager_command); @@ -313,7 +312,7 @@ list_directory(void) i++; /* so disk_path != "/" */ for (item = get_dir_list(); item != NULL; item=get_next_dir_item(item)) { quoted = quote_string(item->path + i); - fprintf(fp, "%s %s\n", item->date, quoted); + g_fprintf(fp, "%s %s\n", item->date, quoted); amfree(quoted); } apclose(fp); diff --git a/oldrecover-src/extract_list.c b/oldrecover-src/extract_list.c index a952ac0..61c9a6a 100644 --- a/oldrecover-src/extract_list.c +++ b/oldrecover-src/extract_list.c @@ -30,6 +30,7 @@ */ #include "amanda.h" +#include "conffile.h" #include "version.h" #include "amrecover.h" #include "fileheader.h" @@ -169,7 +170,7 @@ read_buffer( nfound = select(datafd+1, &readset, NULL, NULL, &timeout); if(nfound < 0 ) { /* Select returned an error. */ - fprintf(stderr,"select error: %s\n", strerror(errno)); + g_fprintf(stderr,_("select error: %s\n"), strerror(errno)); size = -1; break; } @@ -178,8 +179,8 @@ read_buffer( /* Select timed out. */ if (timeout_s != 0) { /* Not polling: a real read timeout */ - fprintf(stderr,"timeout waiting for restore\n"); - fprintf(stderr,"increase READ_TIMEOUT in recover-src/extract_list.c if your tape is slow\n"); + g_fprintf(stderr,_("timeout waiting for restore\n")); + g_fprintf(stderr,_("increase READ_TIMEOUT in recover-src/extract_list.c if your tape is slow\n")); } errno = ETIMEDOUT; size = -1; @@ -196,7 +197,7 @@ read_buffer( continue; } if (errno != EPIPE) { - fprintf(stderr, "read_buffer: read error - %s", + g_fprintf(stderr, _("read_buffer: read error - %s"), strerror(errno)); break; } @@ -345,8 +346,8 @@ clean_tape_list( } if (remove_fn2) { - dbprintf(("removing path %s, it is included in %s\n", - fn2->path, fn1->path)); + dbprintf(_("removing path %s, it is included in %s\n"), + fn2->path, fn1->path); ofn2 = fn2; fn2 = fn2->next; amfree(ofn2->path); @@ -360,8 +361,8 @@ clean_tape_list( if(remove_fn1 != 0) { /* fn2->path is always valid */ - /*@i@*/ dbprintf(("removing path %s, it is included in %s\n", - /*@i@*/ fn1->path, fn2->path)); + /*@i@*/ dbprintf(_("removing path %s, it is included in %s\n"), + /*@i@*/ fn1->path, fn2->path); ofn1 = fn1; fn1 = fn1->next; amfree(ofn1->path); @@ -535,9 +536,9 @@ add_glob( char *uqglob = unquote_string(glob); regex = glob_to_regex(uqglob); - dbprintf(("add_glob (%s) -> %s\n", uqglob, regex)); + dbprintf(_("add_glob (%s) -> %s\n"), uqglob, regex); if ((s = validate_regexp(regex)) != NULL) { - printf("%s is not a valid shell wildcard pattern: ", glob); + g_printf(_("%s is not a valid shell wildcard pattern: "), glob); puts(s); } else { /* @@ -565,7 +566,7 @@ add_regex( char *uqregex = unquote_string(regex); if ((s = validate_regexp(uqregex)) != NULL) { - printf("%s is not a valid regular expression: ", regex); + g_printf(_("%s is not a valid regular expression: "), regex); puts(s); } else { add_file(uqregex, regex); @@ -594,12 +595,12 @@ void add_file( int dir_entries; if (disk_path == NULL) { - printf("Must select directory before adding files\n"); + g_printf(_("Must select directory before adding files\n")); return; } memset(&lditem, 0, sizeof(lditem)); /* Prevent use of bogus data... */ - dbprintf(("add_file: Looking for \"%s\"\n", regex)); + dbprintf(_("add_file: Looking for \"%s\"\n"), regex); if(strcmp(regex, "/[/]*$") == 0) { /* "/" behave like "." */ regex = "\\.[/]*$"; @@ -630,8 +631,8 @@ void add_file( path_on_disk_slash = stralloc2(path_on_disk, "/"); - dbprintf(("add_file: Converted path=\"%s\" to path_on_disk=\"%s\"\n", - regex, path_on_disk)); + dbprintf(_("add_file: Converted path=\"%s\" to path_on_disk=\"%s\"\n"), + regex, path_on_disk); found_one = 0; dir_entries = 0; @@ -639,7 +640,7 @@ void add_file( { dir_entries++; quoted = quote_string(ditem->path); - dbprintf(("add_file: Pondering ditem->path=%s\n", quoted)); + dbprintf(_("add_file: Pondering ditem->path=%s\n"), quoted); amfree(quoted); if (match(path_on_disk, ditem->path) || match(path_on_disk_slash, ditem->path)) @@ -652,7 +653,7 @@ void add_file( ditem_path = newstralloc(ditem_path, ditem->path); clean_pathname(ditem_path); - cmd = stralloc2("ORLD ", ditem_path); + cmd = newstralloc2(cmd, "ORLD ", ditem_path); if(send_command(cmd) == -1) { amfree(cmd); amfree(ditem_path); @@ -674,7 +675,7 @@ void add_file( amfree(path_on_disk); amfree(path_on_disk_slash); l = reply_line(); - printf("%s\n", l); + g_printf(_("%s\n"), l); return; } dir_undo = NULL; @@ -705,14 +706,14 @@ void add_file( s = l; if(strncmp_const_skip(l, "201-", s, ch) != 0) { - err = "bad reply: not 201-"; + err = _("bad reply: not 201-"); continue; } ch = *s++; skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing date field"; + err = _("bad reply: missing date field"); continue; } fp = s-1; @@ -723,14 +724,14 @@ void add_file( skip_whitespace(s, ch); if(ch == '\0' || sscanf(s - 1, "%d", &lditem.level) != 1) { - err = "bad reply: cannot parse level field"; + err = _("bad reply: cannot parse level field"); continue; } skip_integer(s, ch); skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing tape field"; + err = _("bad reply: missing tape field"); continue; } fp = s-1; @@ -740,11 +741,11 @@ void add_file( s[-1] = (char)ch; if(am_has_feature(indexsrv_features, fe_amindexd_fileno_in_ORLD)) { - OFF_T_FMT_TYPE fileno_ = (OFF_T_FMT_TYPE)0; + long long fileno_ = (long long)0; skip_whitespace(s, ch); if(ch == '\0' || - sscanf(s - 1, OFF_T_FMT, &fileno_) != 1) { - err = "bad reply: cannot parse fileno field"; + sscanf(s - 1, "%lld", &fileno_) != 1) { + err = _("bad reply: cannot parse fileno field"); continue; } lditem.fileno = (off_t)fileno_; @@ -753,7 +754,7 @@ void add_file( skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing directory field"; + err = _("bad reply: missing directory field"); continue; } dir = s - 1; @@ -764,16 +765,16 @@ void add_file( switch(add_extract_item(&lditem)) { case -1: - printf("System error\n"); - dbprintf(("add_file: (Failed) System error\n")); + g_printf(_("System error\n")); + dbprintf(_("add_file: (Failed) System error\n")); break; case 0: quoted = quote_string(lditem.path); - printf("Added dir %s at date %s\n", + g_printf(_("Added dir %s at date %s\n"), quoted, lditem.date); - dbprintf(("add_file: (Successful) Added dir %s at date %s\n", - quoted, lditem.date)); + dbprintf(_("add_file: (Successful) Added dir %s at date %s\n"), + quoted, lditem.date); amfree(quoted); added=1; break; @@ -791,8 +792,8 @@ void add_file( puts(cmd); } else if(added == 0) { quoted = quote_string(ditem_path); - printf("dir %s already added\n", quoted); - dbprintf(("add_file: dir %s already added\n", quoted)); + g_printf(_("dir %s already added\n"), quoted); + dbprintf(_("add_file: dir %s already added\n"), quoted); amfree(quoted); } } @@ -800,21 +801,21 @@ void add_file( { switch(add_extract_item(ditem)) { case -1: - printf("System error\n"); - dbprintf(("add_file: (Failed) System error\n")); + g_printf(_("System error\n")); + dbprintf(_("add_file: (Failed) System error\n")); break; case 0: quoted = quote_string(ditem->path); - printf("Added file %s\n", quoted); - dbprintf(("add_file: (Successful) Added %s\n", quoted)); + g_printf(_("Added file %s\n"), quoted); + dbprintf(_("add_file: (Successful) Added %s\n"), quoted); amfree(quoted); break; case 1: quoted = quote_string(ditem->path); - printf("File %s already added\n", quoted); - dbprintf(("add_file: file %s already added\n", quoted)); + g_printf(_("File %s already added\n"), quoted); + dbprintf(_("add_file: file %s already added\n"), quoted); amfree(quoted); break; } @@ -829,9 +830,9 @@ void add_file( if(! found_one) { quoted = quote_string(path); - printf("File %s doesn't exist in directory\n", quoted); - dbprintf(("add_file: (Failed) File %s doesn't exist in directory\n", - quoted)); + g_printf(_("File %s doesn't exist in directory\n"), quoted); + dbprintf(_("add_file: (Failed) File %s doesn't exist in directory\n"), + quoted); amfree(quoted); } } @@ -847,9 +848,9 @@ delete_glob( char *uqglob = unquote_string(glob); regex = glob_to_regex(uqglob); - dbprintf(("delete_glob (%s) -> %s\n", uqglob, regex)); + dbprintf(_("delete_glob (%s) -> %s\n"), uqglob, regex); if ((s = validate_regexp(regex)) != NULL) { - printf("\"%s\" is not a valid shell wildcard pattern: ", glob); + g_printf(_("\"%s\" is not a valid shell wildcard pattern: "), glob); puts(s); } else { /* @@ -877,7 +878,7 @@ delete_regex( char *uqregex = unquote_string(regex); if ((s = validate_regexp(regex)) != NULL) { - printf("\"%s\" is not a valid regular expression: ", regex); + g_printf(_("\"%s\" is not a valid regular expression: "), regex); puts(s); } else { delete_file(uqregex, uqregex); @@ -911,12 +912,12 @@ delete_file( char *quoted; if (disk_path == NULL) { - printf("Must select directory before deleting files\n"); + g_printf(_("Must select directory before deleting files\n")); return; } memset(&lditem, 0, sizeof(lditem)); /* Prevent use of bogus data... */ - dbprintf(("delete_file: Looking for \"%s\"\n", path)); + dbprintf(_("delete_file: Looking for \"%s\"\n"), path); if (strcmp(regex, "[^/]*[/]*$") == 0) { /* Looking for * find everything but single . */ @@ -949,13 +950,13 @@ delete_file( path_on_disk_slash = stralloc2(path_on_disk, "/"); - dbprintf(("delete_file: Converted path=\"%s\" to path_on_disk=\"%s\"\n", - regex, path_on_disk)); + dbprintf(_("delete_file: Converted path=\"%s\" to path_on_disk=\"%s\"\n"), + regex, path_on_disk); found_one = 0; for (ditem=get_dir_list(); ditem!=NULL; ditem=get_next_dir_item(ditem)) { quoted = quote_string(ditem->path); - dbprintf(("delete_file: Pondering ditem->path=%s\n", quoted)); + dbprintf(_("delete_file: Pondering ditem->path=%s\n"), quoted); amfree(quoted); if (match(path_on_disk, ditem->path) || match(path_on_disk_slash, ditem->path)) @@ -968,7 +969,7 @@ delete_file( ditem_path = newstralloc(ditem_path, ditem->path); clean_pathname(ditem_path); - cmd = stralloc2("ORLD ", ditem_path); + cmd = newstralloc2(cmd, "ORLD ", ditem_path); if(send_command(cmd) == -1) { amfree(cmd); amfree(ditem_path); @@ -990,7 +991,7 @@ delete_file( amfree(path_on_disk); amfree(path_on_disk_slash); l = reply_line(); - printf("%s\n", l); + g_printf("%s\n", l); return; } deleted=0; @@ -1023,14 +1024,14 @@ delete_file( s = l; if(strncmp_const_skip(l, "201-", s, ch) != 0) { - err = "bad reply: not 201-"; + err = _("bad reply: not 201-"); continue; } ch = *s++; skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing date field"; + err = _("bad reply: missing date field"); continue; } date = s - 1; @@ -1039,14 +1040,14 @@ delete_file( skip_whitespace(s, ch); if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) { - err = "bad reply: cannot parse level field"; + err = _("bad reply: cannot parse level field"); continue; } skip_integer(s, ch); skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing tape field"; + err = _("bad reply: missing tape field"); continue; } tape = s - 1; @@ -1056,11 +1057,11 @@ delete_file( *tape_undo = '\0'; if(am_has_feature(indexsrv_features, fe_amindexd_fileno_in_ORLD)) { - OFF_T_FMT_TYPE fileno_ = (OFF_T_FMT_TYPE)0; + long long fileno_ = (long long)0; skip_whitespace(s, ch); if(ch == '\0' || - sscanf(s - 1, OFF_T_FMT, &fileno_) != 1) { - err = "bad reply: cannot parse fileno field"; + sscanf(s - 1, "%lld", &fileno_) != 1) { + err = _("bad reply: cannot parse fileno field"); continue; } fileno = (off_t)fileno_; @@ -1069,7 +1070,7 @@ delete_file( skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing directory field"; + err = _("bad reply: missing directory field"); continue; } skip_non_whitespace(s, ch); @@ -1082,13 +1083,13 @@ delete_file( lditem.tape = newstralloc(lditem.tape, tape); switch(delete_extract_item(&lditem)) { case -1: - printf("System error\n"); - dbprintf(("delete_file: (Failed) System error\n")); + g_printf(_("System error\n")); + dbprintf(_("delete_file: (Failed) System error\n")); break; case 0: - printf("Deleted dir %s at date %s\n", ditem_path, date); - dbprintf(("delete_file: (Successful) Deleted dir %s at date %s\n", - ditem_path, date)); + g_printf(_("Deleted dir %s at date %s\n"), ditem_path, date); + dbprintf(_("delete_file: (Successful) Deleted dir %s at date %s\n"), + ditem_path, date); deleted=1; break; case 1: @@ -1103,29 +1104,29 @@ delete_file( if (cmd) puts(cmd); } else if(deleted == 0) { - printf("Warning - dir '%s' not on tape list\n", + g_printf(_("Warning - dir '%s' not on tape list\n"), ditem_path); - dbprintf(("delete_file: dir '%s' not on tape list\n", - ditem_path)); + dbprintf(_("delete_file: dir '%s' not on tape list\n"), + ditem_path); } } else { switch(delete_extract_item(ditem)) { case -1: - printf("System error\n"); - dbprintf(("delete_file: (Failed) System error\n")); + g_printf(_("System error\n")); + dbprintf(_("delete_file: (Failed) System error\n")); break; case 0: - printf("Deleted %s\n", ditem->path); - dbprintf(("delete_file: (Successful) Deleted %s\n", - ditem->path)); + g_printf(_("Deleted %s\n"), ditem->path); + dbprintf(_("delete_file: (Successful) Deleted %s\n"), + ditem->path); break; case 1: - printf("Warning - file '%s' not on tape list\n", + g_printf(_("Warning - file '%s' not on tape list\n"), ditem->path); - dbprintf(("delete_file: file '%s' not on tape list\n", - ditem->path)); + dbprintf(_("delete_file: file '%s' not on tape list\n"), + ditem->path); break; } } @@ -1137,9 +1138,9 @@ delete_file( amfree(path_on_disk_slash); if(! found_one) { - printf("File %s doesn't exist in directory\n", path); - dbprintf(("delete_file: (Failed) File %s doesn't exist in directory\n", - path)); + g_printf(_("File %s doesn't exist in directory\n"), path); + dbprintf(_("delete_file: (Failed) File %s doesn't exist in directory\n"), + path); } } @@ -1169,7 +1170,7 @@ display_extract_list( pager_command = stralloc2(pager, " ; /bin/cat > /dev/null"); if ((fp = popen(pager_command, "w")) == NULL) { - printf("Warning - can't pipe through %s\n", pager); + g_printf(_("Warning - can't pipe through %s\n"), pager); fp = stdout; } amfree(pager_command); @@ -1179,7 +1180,7 @@ display_extract_list( uqfile = unquote_string(file); if ((fp = fopen(uqfile, "w")) == NULL) { - printf("Can't open file %s to print extract list into\n", file); + g_printf(_("Can't open file %s to print extract list into\n"), file); amfree(uqfile); return; } @@ -1188,16 +1189,16 @@ display_extract_list( for (this = extract_list; this != NULL; this = this->next) { - fprintf(fp, "TAPE %s LEVEL %d DATE %s\n", + g_fprintf(fp, _("TAPE %s LEVEL %d DATE %s\n"), this->tape, this->level, this->date); for (that = this->files; that != NULL; that = that->next) - fprintf(fp, "\t%s\n", that->path); + g_fprintf(fp, "\t%s\n", that->path); } if (file == NULL) { apclose(fp); } else { - printf("Extract list written to file %s\n", file); + g_printf(_("Extract list written to file %s\n"), file); afclose(fp); } } @@ -1229,15 +1230,15 @@ okay_to_continue( get_tape = 0; while (ret < 0) { if (get_tape) { - prompt = "New tape device [?]: "; + prompt = _("New tape device [?]: "); } else if (allow_tape && allow_skip) { - prompt = "Continue [?/Y/n/s/t]? "; + prompt = _("Continue [?/Y/n/s/t]? "); } else if (allow_tape && !allow_skip) { - prompt = "Continue [?/Y/n/t]? "; + prompt = _("Continue [?/Y/n/t]? "); } else if (allow_retry) { - prompt = "Continue [?/Y/n/r]? "; + prompt = _("Continue [?/Y/n/r]? "); } else { - prompt = "Continue [?/Y/n]? "; + prompt = _("Continue [?/Y/n]? "); } fputs(prompt, stdout); fflush(stdout); fflush(stderr); @@ -1258,17 +1259,17 @@ okay_to_continue( } if (ch == '?') { if (get_tape) { - printf("Enter a new device ([host:]device) or \"default\"\n"); + g_printf(_("Enter a new device ([host:]device) or \"default\"\n")); } else { - printf("Enter \"y\"es to continue, \"n\"o to stop"); + g_printf(_("Enter \"y\"es to continue, \"n\"o to stop")); if(allow_skip) { - printf(", \"s\"kip this tape"); + g_printf(_(", \"s\"kip this tape")); } if(allow_retry) { - printf(" or \"r\"etry this tape"); + g_printf(_(" or \"r\"etry this tape")); } if (allow_tape) { - printf(" or \"t\"ape to change tape drives"); + g_printf(_(" or \"t\"ape to change tape drives")); } putchar('\n'); } @@ -1302,7 +1303,7 @@ send_to_tape_server( if (fullwrite(tss, msg, strlen(msg)) < 0) { - error("Error writing to tape server"); + error(_("Error writing to tape server")); /*NOTREACHED*/ } amfree(msg); @@ -1332,7 +1333,7 @@ extract_files_setup( /* get tape server details */ if ((sp = getservbyname(service_name, "tcp")) == NULL) { - printf("%s/tcp unknown protocol - config error?\n", service_name); + g_printf(_("%s/tcp unknown protocol - config error?\n"), service_name); amfree(service_name); return -1; } @@ -1347,12 +1348,12 @@ extract_files_setup( 0); if (tape_control_sock < 0) { - printf("cannot connect to %s: %s\n", tape_server_name, strerror(errno)); + g_printf(_("cannot connect to %s: %s\n"), tape_server_name, strerror(errno)); return -1; } if (my_port >= IPPORT_RESERVED) { aclose(tape_control_sock); - printf("did not get a reserved port: %u\n", (unsigned)my_port); + g_printf(_("did not get a reserved port: %u\n"), (unsigned)my_port); return -1; } @@ -1431,7 +1432,7 @@ extract_files_setup( tt = newstralloc2(tt, "FEATURES=", our_feature_string); send_to_tape_server(tape_control_sock, tt); if (read(tape_control_sock, buffer, sizeof(buffer)) <= 0) { - error("Could not read features from control socket\n"); + error(_("Could not read features from control socket\n")); /*NOTREACHED*/ } tapesrv_features = am_string_to_feature(buffer); @@ -1446,7 +1447,7 @@ extract_files_setup( am_has_feature(indexsrv_features, fe_amidxtaped_datestamp)) { if(am_has_feature(indexsrv_features, fe_amidxtaped_config)) { - tt = newstralloc2(tt, "CONFIG=", config); + tt = newstralloc2(tt, "CONFIG=", config_name); send_to_tape_server(tape_control_sock, tt); } if(am_has_feature(indexsrv_features, fe_amidxtaped_label) && @@ -1456,7 +1457,7 @@ extract_files_setup( } if(am_has_feature(indexsrv_features, fe_amidxtaped_fsf)) { char v_fsf[100]; - snprintf(v_fsf, 99, OFF_T_FMT, (OFF_T_FMT_TYPE)fsf); + g_snprintf(v_fsf, 99, "%lld", (long long)fsf); tt = newstralloc2(tt, "FSF=",v_fsf); send_to_tape_server(tape_control_sock, tt); } @@ -1490,8 +1491,8 @@ extract_files_setup( send_to_tape_server(tape_control_sock, disk_regex); send_to_tape_server(tape_control_sock, clean_datestamp); - dbprintf(("Started amidxtaped with arguments \"6 -h -p %s %s %s %s\"\n", - dump_device_name, host_regex, disk_regex, clean_datestamp)); + dbprintf(_("Started amidxtaped with arguments \"6 -h -p %s %s %s %s\"\n"), + dump_device_name, host_regex, disk_regex, clean_datestamp); } /* @@ -1508,7 +1509,7 @@ extract_files_setup( nread = read(tape_control_sock, buffer, sizeof(buffer)); if (nread <= 0) { - error("Could not read from control socket: %s\n", + error(_("Could not read from control socket: %s\n"), strerror(errno)); /*NOTREACHED*/ } @@ -1516,7 +1517,7 @@ extract_files_setup( buffer[nread] = '\0'; if (sscanf(buffer, "CONNECT %hu\n", (unsigned short *)&data_port) != 1) { - error("Recieved invalid port number message from control socket: %s\n", + error(_("Recieved invalid port number message from control socket: %s\n"), buffer); /*NOTREACHED*/ } @@ -1528,7 +1529,7 @@ extract_files_setup( &my_data_port, 0); if(tape_data_sock == -1){ - error("Unable to make data connection to server: %s\n", + error(_("Unable to make data connection to server: %s\n"), strerror(errno)); /*NOTREACHED*/ } @@ -1565,16 +1566,17 @@ read_file_header( bytes_read = read_buffer(tapedev, buffer, buflen, READ_TIMEOUT); if(bytes_read < 0) { - error("error reading header (%s), check amidxtaped.*.debug on server", + error(_("error reading header (%s), check amidxtaped.*.debug on server"), strerror(errno)); /*NOTREACHED*/ } if((size_t)bytes_read < buflen) { - fprintf(stderr, "%s: short block %d byte%s\n", - get_pname(), (int)bytes_read, (bytes_read == 1) ? "" : "s"); + g_fprintf(stderr, plural(_("%s: short block %d byte\n"), + _("%s: short block %d bytes\n"), bytes_read), + get_pname(), (int)bytes_read); print_header(stdout, file); - error("Can't read file header"); + error(_("Can't read file header")); /*NOTREACHED*/ } @@ -1618,7 +1620,7 @@ extract_files_child( /* make in_fd be our stdin */ if (dup2(in_fd, STDIN_FILENO) == -1) { - error("dup2 failed in extract_files_child: %s", strerror(errno)); + error(_("dup2 failed in extract_files_child: %s"), strerror(errno)); /*NOTREACHED*/ } @@ -1628,7 +1630,7 @@ extract_files_child( if(file.type != F_DUMPFILE) { print_header(stdout, &file); - error("bad header"); + error(_("bad header")); /*NOTREACHED*/ } @@ -1798,7 +1800,7 @@ extract_files_child( case IS_GNUTAR: case IS_SAMBA_TAR: #ifndef GNUTAR - fprintf(stderr, "warning: GNUTAR program not available.\n"); + g_fprintf(stderr, _("warning: GNUTAR program not available.\n")); cmd = stralloc("tar"); #else cmd = stralloc(GNUTAR); @@ -1828,19 +1830,20 @@ extract_files_child( } #endif if (cmd == NULL) { - fprintf(stderr, "warning: restore program for %s not available.\n", + g_fprintf(stderr, _("warning: restore program for %s not available.\n"), file.program); cmd = stralloc("restore"); } } if (cmd) { - dbprintf(("Exec'ing %s with arguments:\n", cmd)); + dbprintf(_("Exec'ing %s with arguments:\n"), cmd); for (i = 0; i < j; i++) { if( i == passwd_field) - dbprintf(("\tXXXXX\n")); + dbprintf("\tXXXXX\n"); else - dbprintf(("\t%s\n", restore_args[i])); + dbprintf("\t%s\n", restore_args[i]); } + safe_fd(-1, 0); (void)execv(cmd, restore_args); /* only get here if exec failed */ save_errno = errno; @@ -1849,8 +1852,8 @@ extract_files_child( } amfree(restore_args); errno = save_errno; - perror("amrecover couldn't exec"); - fprintf(stderr, " problem executing %s\n", cmd); + perror(_("amrecover couldn't exec")); + g_fprintf(stderr, _(" problem executing %s\n"), cmd); amfree(cmd); } exit(1); @@ -1888,7 +1891,7 @@ writer_intermediary( } if(pipe(child_pipe) == -1) { - error("extract_list - error setting up pipe to extractor: %s\n", + error(_("extract_list - error setting up pipe to extractor: %s\n"), strerror(errno)); /*NOTREACHED*/ } @@ -1904,7 +1907,7 @@ writer_intermediary( /* This is the parent */ if (pid == -1) { - error("writer_intermediary - error forking child"); + error(_("writer_intermediary - error forking child")); /*NOTREACHED*/ } @@ -1924,14 +1927,14 @@ writer_intermediary( nfound = select(max_fd, &selectset, NULL, NULL, &timeout); if(nfound < 0) { - fprintf(stderr,"select error: %s\n", strerror(errno)); + g_fprintf(stderr,_("select error: %s\n"), strerror(errno)); break; } if (nfound == 0) { /* timeout */ - fprintf(stderr, "timeout waiting %d seconds for restore\n", + g_fprintf(stderr, _("timeout waiting %d seconds for restore\n"), READ_TIMEOUT); - fprintf(stderr, "increase READ_TIMEOUT in recover-src/extract_list.c if your tape is slow\n"); + g_fprintf(stderr, _("increase READ_TIMEOUT in recover-src/extract_list.c if your tape is slow\n")); break; } @@ -1941,7 +1944,7 @@ writer_intermediary( case -1: if ((errno != EINTR) && (errno != EAGAIN)) { if (errno != EPIPE) { - fprintf(stderr,"writer ctl fd read error: %s", + g_fprintf(stderr,_("writer ctl fd read error: %s"), strerror(errno)); } FD_CLR(ctl_fd, &readset); @@ -1961,7 +1964,7 @@ writer_intermediary( int done = 0; while (!done) { char *input = NULL; - printf("Please insert tape %s. Continue? [Y|n]: ", + g_printf(_("Please insert tape %s. Continue? [Y|n]: "), desired_tape); fflush(stdout); @@ -1981,7 +1984,7 @@ writer_intermediary( amfree(input); } } else { - fprintf(stderr, "Strange message from tape server: %s", buffer); + g_fprintf(stderr, _("Strange message from tape server: %s"), buffer); break; } } @@ -1995,7 +1998,7 @@ writer_intermediary( case -1: if ((errno != EINTR) && (errno != EAGAIN)) { if (errno != EPIPE) { - fprintf(stderr,"writer data fd read error: %s", + g_fprintf(stderr,_("writer data fd read error: %s"), strerror(errno)); } FD_CLR(data_fd, &readset); @@ -2013,11 +2016,11 @@ writer_intermediary( */ if(fullwrite(child_pipe[1], buffer, (size_t)bytes_read) < 0) { if(errno == EPIPE) { - error("%s: pipe data reader has quit: %s\n", - get_pname(), strerror(errno)); + error(_("pipe data reader has quit: %s\n"), + strerror(errno)); /* NOTREACHED */ } - error("Write error to extract child: %s\n", + error(_("Write error to extract child: %s\n"), strerror(errno)); /* NOTREACHED */ } @@ -2032,7 +2035,7 @@ writer_intermediary( if(WEXITSTATUS(extractor_status) != 0){ int ret = WEXITSTATUS(extractor_status); if(ret == 255) ret = -1; - error("Extractor child exited with status %d\n", ret); + error(_("Extractor child exited with status %d\n"), ret); /*NOTREACHED*/ } @@ -2072,7 +2075,7 @@ extract_files(void) if (!is_extract_list_nonempty()) { - printf("Extract list empty - No files to extract!\n"); + g_printf(_("Extract list empty - No files to extract!\n")); return; } @@ -2090,7 +2093,7 @@ extract_files(void) l = reply_line(); if (!server_happy()) { - printf("%s\n", l); + g_printf("%s\n", l); exit(1); } /* skip reply number */ @@ -2099,7 +2102,7 @@ extract_files(void) if (strcmp(tape_device_name, "/dev/null") == 0) { - printf("amrecover: warning: using %s as the tape device will not work\n", + g_printf(_("amrecover: warning: using %s as the tape device will not work\n"), tape_device_name); } @@ -2107,17 +2110,17 @@ extract_files(void) for (elist = first_tape_list(); elist != NULL; elist = next_tape_list(elist)) if(elist->tape[0]!='/') { if(first) { - printf("\nExtracting files using tape drive %s on host %s.\n", + g_printf(_("\nExtracting files using tape drive %s on host %s.\n"), tape_device_name, tape_server_name); - printf("The following tapes are needed:"); + g_printf(_("The following tapes are needed:")); first=0; } else - printf(" "); + g_printf(" "); tlist = unmarshal_tapelist_str(elist->tape); for( ; tlist != NULL; tlist = tlist->next) - printf(" %s", tlist->label); - printf("\n"); + g_printf(" %s", tlist->label); + g_printf("\n"); amfree(tlist); } first=1; @@ -2125,52 +2128,52 @@ extract_files(void) { if(elist->tape[0]=='/') { if(first) { - printf("\nExtracting files from holding disk on host %s.\n", + g_printf(_("\nExtracting files from holding disk on host %s.\n"), tape_server_name); - printf("The following files are needed:"); + g_printf(_("The following files are needed:")); first=0; } else - printf(" "); + g_printf(" "); tlist = unmarshal_tapelist_str(elist->tape); for( ; tlist != NULL; tlist = tlist->next) - printf(" %s", tlist->label); - printf("\n"); + g_printf(" %s", tlist->label); + g_printf("\n"); amfree(tlist); } } - printf("\n"); + g_printf("\n"); if (getcwd(buf, sizeof(buf)) == NULL) { - perror("extract_list: Current working directory unavailable"); + perror(_("extract_list: Cannot determine current working directory")); exit(1); } - printf("Restoring files into directory %s\n", buf); + g_printf(_("Restoring files into directory %s\n"), buf); #ifdef SAMBA_CLIENT if (samba_extract_method == SAMBA_SMBCLIENT) - printf("(unless it is a Samba backup, that will go through to the SMB server)\n"); + g_printf(_("(unless it is a Samba backup, that will go through to the SMB server)\n")); #endif if (!okay_to_continue(0,0,0)) return; - printf("\n"); + g_printf("\n"); while ((elist = first_tape_list()) != NULL) { if(elist->tape[0]=='/') { dump_device_name = newstralloc(dump_device_name, elist->tape); - printf("Extracting from file "); + g_printf(_("Extracting from file ")); tlist = unmarshal_tapelist_str(dump_device_name); for( ; tlist != NULL; tlist = tlist->next) - printf(" %s", tlist->label); - printf("\n"); + g_printf(" %s", tlist->label); + g_printf("\n"); amfree(tlist); } else { - printf("Extracting files using tape drive %s on host %s.\n", + g_printf(_("Extracting files using tape drive %s on host %s.\n"), tape_device_name, tape_server_name); tlist = unmarshal_tapelist_str(elist->tape); - printf("Load tape %s now\n", tlist->label); + g_printf(_("Load tape %s now\n"), tlist->label); amfree(tlist); otc = okay_to_continue(1,1,0); if (otc == 0) @@ -2186,7 +2189,7 @@ extract_files(void) /* connect to the tape handler daemon on the tape drive server */ if ((tape_control_sock = extract_files_setup(elist->tape, elist->fileno)) == -1) { - fprintf(stderr, "amrecover - can't talk to tape server\n"); + g_fprintf(stderr, _("amrecover - can't talk to tape server\n")); return; } @@ -2201,7 +2204,7 @@ extract_files(void) /* this is the parent */ if (pid == -1) { - perror("extract_list - error forking child"); + perror(_("extract_list - error forking child")); aclose(tape_control_sock); exit(1); } @@ -2212,7 +2215,7 @@ extract_files(void) /* wait for the child process to finish */ if ((pid = waitpid(-1, &child_stat, 0)) == (pid_t)-1) { - perror("extract_list - error waiting for child"); + perror(_("extract_list - error waiting for child")); exit(1); } @@ -2226,13 +2229,13 @@ extract_files(void) } else { - fprintf(stderr, "extract list - unknown child terminated?\n"); + g_fprintf(stderr, _("extract list - unknown child terminated?\n")); exit(1); } if ((WIFEXITED(child_stat) != 0) && (WEXITSTATUS(child_stat) != 0)) { - fprintf(stderr, - "extract_list - child returned non-zero status: %d\n", + g_fprintf(stderr, + _("extract_list - child returned non-zero status: %d\n"), WEXITSTATUS(child_stat)); otc = okay_to_continue(0,0,1); if(otc == 0) diff --git a/oldrecover-src/help.c b/oldrecover-src/help.c index 7bccd5e..bdb3525 100644 --- a/oldrecover-src/help.c +++ b/oldrecover-src/help.c @@ -36,33 +36,33 @@ void help_list(void) { - printf("valid commands are:\n\n"); + g_printf(_("valid commands are:\n\n")); - printf("add path1 ... - add to extraction list (shell wildcards)\n"); - printf("addx path1 ... - add to extraction list (regular expressions)\n"); - printf("cd directory - change cwd on virtual file system (shell wildcards)\n"); - printf("cdx directory - change cwd on virtual file system (regular expressions)\n"); - printf("clear - clear extraction list\n"); - printf("delete path1 ... - delete from extraction list (shell wildcards)\n"); - printf("deletex path1 ... - delete from extraction list (regular expressions)\n"); - printf("extract - extract selected files from tapes\n"); - printf("exit\n"); - printf("help\n"); - printf("history - show dump history of disk\n"); - printf("list [filename] - show extraction list, optionally writing to file\n"); - printf("lcd directory - change cwd on local file system\n"); - printf("ls - list directory on virtual file system\n"); - printf("lpwd - show cwd on local file system\n"); - printf("mode - show the method used to extract SMB shares\n"); - printf("pwd - show cwd on virtual file system\n"); - printf("quit\n"); - printf("listhost - list hosts\n"); - printf("listdisk [diskdevice] - list disks\n"); - printf("setdate {YYYY-MM-DD|--MM-DD|---DD} - set date of look\n"); - printf(" {YYYY-MM-DD-HH-MM-SS} - set date of look\n"); - printf("setdisk diskname [mountpoint] - select disk on dump host\n"); - printf("sethost host - select dump host\n"); - printf("settape [host:][device|default] - select tape server and/or device\n"); - printf("setmode smb|tar - select the method used to extract SMB shares\n"); - printf("\n"); + g_printf(_("add path1 ... - add to extraction list (shell wildcards)\n")); + g_printf(_("addx path1 ... - add to extraction list (regular expressions)\n")); + g_printf(_("cd directory - change cwd on virtual file system (shell wildcards)\n")); + g_printf(_("cdx directory - change cwd on virtual file system (regular expressions)\n")); + g_printf(_("clear - clear extraction list\n")); + g_printf(_("delete path1 ... - delete from extraction list (shell wildcards)\n")); + g_printf(_("deletex path1 ... - delete from extraction list (regular expressions)\n")); + g_printf(_("extract - extract selected files from tapes\n")); + g_printf(_("exit\n")); + g_printf(_("help\n")); + g_printf(_("history - show dump history of disk\n")); + g_printf(_("list [filename] - show extraction list, optionally writing to file\n")); + g_printf(_("lcd directory - change cwd on local file system\n")); + g_printf(_("ls - list directory on virtual file system\n")); + g_printf(_("lpwd - show cwd on local file system\n")); + g_printf(_("mode - show the method used to extract SMB shares\n")); + g_printf(_("pwd - show cwd on virtual file system\n")); + g_printf(_("quit\n")); + g_printf(_("listhost - list hosts\n")); + g_printf(_("listdisk [diskdevice] - list disks\n")); + g_printf(_("setdate {YYYY-MM-DD|--MM-DD|---DD} - set date of look\n")); + g_printf(_(" {YYYY-MM-DD-HH-MM-SS} - set date of look\n")); + g_printf(_("setdisk diskname [mountpoint] - select disk on dump host\n")); + g_printf(_("sethost host - select dump host\n")); + g_printf(_("settape [host:][device|default] - select tape server and/or device\n")); + g_printf(_("setmode smb|tar - select the method used to extract SMB shares\n")); + g_printf(_("\n")); } diff --git a/oldrecover-src/set_commands.c b/oldrecover-src/set_commands.c index 812e181..a0c83ba 100644 --- a/oldrecover-src/set_commands.c +++ b/oldrecover-src/set_commands.c @@ -63,8 +63,8 @@ set_date( } else { - printf("No index records for cwd on new date\n"); - printf("Setting cwd to mount point\n"); + g_printf(_("No index records for cwd on new date\n")); + g_printf(_("Setting cwd to mount point\n")); disk_path = newstralloc(disk_path, "/"); /* fake it */ clear_dir_list(); } @@ -86,7 +86,7 @@ set_host( if (is_extract_list_nonempty()) { - printf("Must clear extract list before changing host\n"); + g_printf(_("Must clear extract list before changing host\n")); return; } @@ -105,7 +105,7 @@ set_host( */ if ((hp = gethostbyname(uqhost)) != NULL) { host = hp->h_name; - printf("Trying host %s ...\n", host); + g_printf(_("Trying host %s ...\n"), host); cmd = newstralloc2(cmd, "HOST ", host); if (converse(cmd) == -1) exit(1); @@ -117,7 +117,7 @@ set_host( { for (hostp = hp->h_aliases; (host = *hostp) != NULL; hostp++) { - printf("Trying host %s ...\n", host); + g_printf(_("Trying host %s ...\n"), host); cmd = newstralloc2(cmd, "HOST ", host); if (converse(cmd) == -1) exit(1); @@ -165,7 +165,7 @@ set_disk( if (is_extract_list_nonempty()) { - printf("Must clear extract list before changing disk\n"); + g_printf(_("Must clear extract list before changing disk\n")); return; } @@ -173,7 +173,7 @@ set_disk( if (mtpt != NULL) { uqmtpt = unquote_string(mtpt); if (*mtpt != '/') { - printf("Mount point \"%s\" invalid - must start with /\n", uqmtpt); + g_printf(_("Mount point \"%s\" invalid - must start with /\n"), uqmtpt); amfree(uqmtpt); return; } @@ -224,8 +224,8 @@ set_disk( } else { - printf("No index records for disk for specified date\n"); - printf("If date correct, notify system administrator\n"); + g_printf(_("No index records for disk for specified date\n")); + g_printf(_("If date correct, notify system administrator\n")); disk_path = newstralloc(disk_path, "/"); /* fake it */ clear_dir_list(); } @@ -279,15 +279,15 @@ cd_glob( char *path_on_disk = NULL; if (disk_name == NULL) { - printf("Must select disk before changing directory\n"); + g_printf(_("Must select disk before changing directory\n")); return; } uqglob = unquote_string(glob); regex = glob_to_regex(uqglob); - dbprintf(("cd_glob (%s) -> %s\n", uqglob, regex)); + dbprintf(_("cd_glob (%s) -> %s\n"), uqglob, regex); if ((s = validate_regexp(regex)) != NULL) { - printf("\"%s\" is not a valid shell wildcard pattern: ", glob); + g_printf(_("\"%s\" is not a valid shell wildcard pattern: "), glob); puts(s); amfree(regex); return; @@ -331,13 +331,13 @@ cd_regex( char *path_on_disk = NULL; if (disk_name == NULL) { - printf("Must select disk before changing directory\n"); + g_printf(_("Must select disk before changing directory\n")); return; } uqregex = unquote_string(regex); if ((s = validate_regexp(uqregex)) != NULL) { - printf("\"%s\" is not a valid regular expression: ", uqregex); + g_printf(_("\"%s\" is not a valid regular expression: "), uqregex); amfree(uqregex); puts(s); return; @@ -410,7 +410,7 @@ cd_dir( set_directory(dir); } else { - printf("Too many directory\n"); + g_printf(_("Too many directory\n")); } amfree(dir); } @@ -432,7 +432,7 @@ set_directory( } if (disk_name == NULL) { - printf("Must select disk before setting directory\n"); + g_printf(_("Must select disk before setting directory\n")); return; /*NOTREACHED*/ } @@ -452,7 +452,7 @@ set_directory( { if (strncmp(mount_point, ldir, strlen(mount_point)) != 0) { - printf("Invalid directory - Can't cd outside mount point \"%s\"\n", + g_printf(_("Invalid directory - Can't cd outside mount point \"%s\"\n"), mount_point); amfree(ldir); return; @@ -488,7 +488,7 @@ set_directory( if (strcmp(dp, "..") == 0) { if (strcmp(new_dir, "/") == 0) { /* at top of disk */ - printf("Invalid directory - Can't cd outside mount point \"%s\"\n", + g_printf(_("Invalid directory - Can't cd outside mount point \"%s\"\n"), mount_point); /*@ignore@*/ amfree(new_dir); @@ -532,7 +532,7 @@ set_directory( } else { - printf("Invalid directory - %s\n", dir); + g_printf(_("Invalid directory - %s\n"), dir); } /*@ignore@*/ @@ -547,13 +547,13 @@ void show_directory(void) { if (mount_point == NULL || disk_path == NULL) - printf("Must select disk first\n"); + g_printf(_("Must select disk first\n")); else if (strcmp(mount_point, "/") == 0) - printf("%s\n", disk_path); + g_printf("%s\n", disk_path); else if (strcmp(disk_path, "/") == 0) - printf("%s\n", mount_point); + g_printf("%s\n", mount_point); else - printf("%s%s\n", mount_point, disk_path); + g_printf("%s%s\n", mount_point, disk_path); } @@ -596,14 +596,14 @@ set_tape( } if (tape_device_name) - printf ("Using tape \"%s\"", tape_device_name); + g_printf (_("Using tape \"%s\""), tape_device_name); else - printf ("Using default tape"); + g_printf (_("Using default tape")); if (tape_server_name) - printf (" from server %s.\n", tape_server_name); + g_printf (_(" from server %s.\n"), tape_server_name); else - printf (".\nTape server unspecified, assumed to be %s.\n", + g_printf (_(".\nTape server unspecified, assumed to be %s.\n"), server_name); } @@ -613,11 +613,11 @@ set_mode( { #ifdef SAMBA_CLIENT if (mode == SAMBA_SMBCLIENT) { - printf ("SAMBA dumps will be extracted using smbclient\n"); + g_printf (_("SAMBA dumps will be extracted using smbclient\n")); samba_extract_method = SAMBA_SMBCLIENT; } else { if (mode == SAMBA_TAR) { - printf ("SAMBA dumps will be extracted as TAR dumps\n"); + g_printf (_("SAMBA dumps will be extracted as TAR dumps\n")); samba_extract_method = SAMBA_TAR; } } @@ -630,12 +630,12 @@ void show_mode(void) { #ifdef SAMBA_CLIENT - printf ("SAMBA dumps are extracted "); + g_printf (_("SAMBA dumps are extracted ")); if (samba_extract_method == SAMBA_TAR) { - printf (" as TAR dumps\n"); + g_printf (_(" as TAR dumps\n")); } else { - printf ("using smbclient\n"); + g_printf (_("using smbclient\n")); } #endif /* SAMBA_CLIENT */ } diff --git a/oldrecover-src/uparse.c b/oldrecover-src/uparse.c index e4dc87a..0de18c5 100644 --- a/oldrecover-src/uparse.c +++ b/oldrecover-src/uparse.c @@ -1835,6 +1835,6 @@ void yyerror( char * s) { - printf("%s\n", s); + g_printf("%s\n", s); } diff --git a/oldrecover-src/uparse.y b/oldrecover-src/uparse.y index 3700981..6166db2 100644 --- a/oldrecover-src/uparse.y +++ b/oldrecover-src/uparse.y @@ -177,5 +177,5 @@ void yyerror( char * s) { - printf("%s\n", s); + g_printf("%s\n", s); } diff --git a/oldrecover-src/uscan.c b/oldrecover-src/uscan.c index 0535822..01f7936 100644 --- a/oldrecover-src/uscan.c +++ b/oldrecover-src/uscan.c @@ -1,31 +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 -#include +#include +#include +#include +/* 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 . 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 +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 +#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 @@ -34,34 +95,17 @@ #if __STDC__ -#define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#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 @@ -76,80 +120,75 @@ * 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; @@ -186,12 +225,16 @@ struct yy_buffer_state */ 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 @@ -205,28 +248,38 @@ struct yy_buffer_state * 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 @@ -234,66 +287,92 @@ static int yy_start = 0; /* start state number */ */ 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 ); -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 ) +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); -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 )); +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) -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 * )); +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 ); + +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] = +/* 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[131] = { 0, 0, 0, 0, 0, 41, 40, 39, 38, 34, 38, 38, 22, 38, 38, 38, 38, 38, 38, 38, 38, @@ -311,7 +390,7 @@ static yyconst short int yy_accept[131] = 3, 6, 7, 38, 2, 1, 33, 38, 32, 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, @@ -343,14 +422,14 @@ static yyconst int yy_ec[256] = 4, 4, 4, 4, 4 } ; -static yyconst int yy_meta[30] = +static yyconst flex_int32_t yy_meta[30] = { 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 } ; -static yyconst short int yy_base[135] = +static yyconst flex_int16_t yy_base[135] = { 0, 0, 0, 25, 26, 161, 162, 30, 0, 162, 154, 30, 0, 146, 25, 144, 129, 25, 28, 136, 128, @@ -369,7 +448,7 @@ static yyconst short int yy_base[135] = 76, 79, 84, 87 } ; -static yyconst short int yy_def[135] = +static yyconst flex_int16_t yy_def[135] = { 0, 130, 1, 131, 131, 130, 130, 130, 132, 130, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, @@ -388,7 +467,7 @@ static yyconst short int yy_def[135] = 130, 130, 130, 130 } ; -static yyconst short int yy_nxt[192] = +static yyconst flex_int16_t yy_nxt[192] = { 0, 6, 7, 7, 8, 9, 10, 11, 12, 8, 13, 8, 14, 15, 16, 17, 8, 8, 18, 19, 8, @@ -414,7 +493,7 @@ static yyconst short int yy_nxt[192] = } ; -static yyconst short int yy_chk[192] = +static yyconst flex_int16_t yy_chk[192] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -443,6 +522,9 @@ static yyconst short int yy_chk[192] = 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. */ @@ -452,7 +534,6 @@ static char *yy_last_accepting_cpos; #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 +590,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 597 "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 +#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. @@ -521,65 +647,30 @@ static char *string_buf = NULL; #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 )); -#endif +extern int yywrap (void ); #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 -#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. */ @@ -588,7 +679,6 @@ YY_MALLOC_DECL #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(). @@ -601,9 +691,10 @@ YY_MALLOC_DECL */ #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; \ @@ -613,9 +704,22 @@ YY_MALLOC_DECL 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();" - @@ -636,12 +740,18 @@ YY_MALLOC_DECL #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. @@ -658,12 +768,14 @@ YY_MALLOC_DECL #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" @@ -671,18 +783,18 @@ YY_DECL /* literal keyword tokens */ -#line 675 "uscan.c" +#line 787 "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; @@ -690,34 +802,36 @@ YY_DECL 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 ) { @@ -734,24 +848,22 @@ 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: @@ -930,13 +1042,14 @@ YY_RULE_SETUP #line 114 "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: +/* rule 35 can match eol */ YY_RULE_SETUP #line 122 "uscan.l" { @@ -977,6 +1090,7 @@ YY_RULE_SETUP /* whitespace */ case 39: +/* rule 39 can match eol */ YY_RULE_SETUP #line 152 "uscan.l" ; /* whitespace */ @@ -995,7 +1109,7 @@ YY_RULE_SETUP #line 165 "uscan.l" ECHO; YY_BREAK -#line 999 "uscan.c" +#line 1113 "uscan.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(quotedpath): yyterminate(); @@ -1003,26 +1117,26 @@ case YY_STATE_EOF(quotedpath): 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 @@ -1032,13 +1146,13 @@ case YY_STATE_EOF(quotedpath): * 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 @@ -1051,30 +1165,30 @@ case YY_STATE_EOF(quotedpath): 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 @@ -1085,7 +1199,7 @@ case YY_STATE_EOF(quotedpath): * 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; @@ -1093,30 +1207,30 @@ case YY_STATE_EOF(quotedpath): 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; @@ -1127,8 +1241,7 @@ case YY_STATE_EOF(quotedpath): "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 * @@ -1137,21 +1250,20 @@ case YY_STATE_EOF(quotedpath): * 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. @@ -1171,34 +1283,30 @@ static int yy_get_next_buffer() /* 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 ) { @@ -1211,8 +1319,7 @@ static int yy_get_next_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. */ @@ -1222,35 +1329,35 @@ static int yy_get_next_buffer() 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; } } @@ -1258,32 +1365,31 @@ static int yy_get_next_buffer() 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 ) { @@ -1295,30 +1401,23 @@ static yy_state_type yy_get_previous_state() } 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 ) { @@ -1330,81 +1429,73 @@ yy_state_type yy_current_state; yy_is_jam = (yy_current_state == 130); 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() @@ -1418,16 +1509,16 @@ static int input() */ /* 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(); @@ -1437,90 +1528,92 @@ static int input() } 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()" ); @@ -1529,75 +1622,75 @@ int size; /* 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; @@ -1614,29 +1707,121 @@ YY_BUFFER_STATE b; 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()" ); @@ -1650,56 +1835,51 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + yy_switch_to_buffer(b ); 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()" ); @@ -1709,148 +1889,196 @@ int len; 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; +} + +void yyset_debug (int bdebug ) +{ + yy_flex_debug = bdebug ; +} -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) +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 @@ -1859,28 +2087,19 @@ yy_size_t size; * 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" -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif #line 165 "uscan.l" + int process_line( char * line) @@ -1959,11 +2178,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; @@ -1974,3 +2193,4 @@ yywrap(void) { return 1; } + diff --git a/oldrecover-src/uscan.l b/oldrecover-src/uscan.l index 69674ce..e5d7fdd 100644 --- a/oldrecover-src/uscan.l +++ b/oldrecover-src/uscan.l @@ -113,7 +113,7 @@ mode { return MODE; } \" { 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); @@ -242,11 +242,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; diff --git a/recover-src/Makefile.am b/recover-src/Makefile.am index ac37b73..5face92 100644 --- a/recover-src/Makefile.am +++ b/recover-src/Makefile.am @@ -1,10 +1,16 @@ # Makefile for Amanda file recovery programs. +include $(top_srcdir)/config/automake/installperms.am +include $(top_srcdir)/config/automake/precompile.am + 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@ @@ -12,10 +18,6 @@ LIB_EXTENSION = la sbin_PROGRAMS = amrecover -if WANT_RUNTIME_PSEUDO_RELOC -AM_LDFLAGS = -Wl,-enable-runtime-pseudo-reloc -endif - ### # Because libamanda includes routines (e.g. regex) provided by some system # libraries, and because of the way libtool sets up the command line, we @@ -25,10 +27,10 @@ endif 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 \ @@ -42,27 +44,18 @@ AM_YFLAGS = -d # 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 - +INSTALLPERMS_exec = \ + dest=$(sbindir) chown=amanda chmod=o-rwx $(sbin_PROGRAMS) lint: @f="$(amrecover_CSRC)"; \ @@ -71,7 +64,7 @@ lint: (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 --git a/recover-src/Makefile.in b/recover-src/Makefile.in index a317695..7936f29 100644 --- a/recover-src/Makefile.in +++ b/recover-src/Makefile.in @@ -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. @@ -16,16 +16,53 @@ # 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 @@ 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,25 +207,29 @@ amrecover_OBJECTS = $(am_amrecover_OBJECTS) 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) @@ -129,9 +242,9 @@ 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@ @@ -146,7 +259,13 @@ 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 +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,52 +302,162 @@ 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@ @@ -237,7 +465,8 @@ 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 +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 +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 +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 +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 @@ -388,10 +664,10 @@ LIB_EXTENSION = la ### 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 \ @@ -400,11 +676,14 @@ amrecover_CSRC = amrecover.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 +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 +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 +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 @@ -537,10 +796,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 \ @@ -590,22 +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 +875,7 @@ check: check-am 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 +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 +915,7 @@ 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 @@ -672,15 +928,25 @@ info: info-am 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 +967,95 @@ ps: ps-am 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); \ @@ -746,7 +1063,7 @@ lint: (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 --git a/recover-src/amrecover.c b/recover-src/amrecover.c index 7752ee6..fc4d36d 100644 --- a/recover-src/amrecover.c +++ b/recover-src/amrecover.c @@ -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 @@ int grab_reply(int show); void sigint_handler(int signum); int main(int argc, char **argv); -#define USAGE "Usage: amrecover [[-C] ] [-s ] [-t ] [-d ] [-o ]*\n" +#define USAGE _("Usage: amrecover [[-C] ] [-s ] [-t ] [-d ] [-o ]*\n") -char *config = NULL; char *server_name = NULL; int server_socket; char *server_line = NULL; @@ -110,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 @@ 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); @@ -340,84 +346,74 @@ main( 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 */ @@ -426,14 +422,14 @@ main( 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); @@ -447,25 +443,30 @@ main( 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)); @@ -483,7 +484,7 @@ main( 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*/ } @@ -492,14 +493,13 @@ main( /* 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*/ } @@ -510,11 +510,11 @@ main( 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); } @@ -543,7 +543,7 @@ main( { 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); @@ -561,17 +561,17 @@ main( 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); @@ -583,9 +583,9 @@ main( 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")); } @@ -599,6 +599,7 @@ main( 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 +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, " "); @@ -642,25 +643,25 @@ amindexd_response( 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++) { @@ -678,9 +679,11 @@ bad_nak: */ 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; } @@ -697,22 +700,16 @@ bad_nak: 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; } } @@ -725,10 +722,10 @@ bad_nak: 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'; @@ -736,25 +733,21 @@ bad_nak: 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 } /* @@ -765,9 +758,9 @@ bad_nak: 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; } } @@ -778,9 +771,9 @@ bad_nak: 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; } } @@ -790,7 +783,7 @@ bad_nak: * 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; } @@ -800,11 +793,9 @@ bad_nak: 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 --git a/recover-src/amrecover.h b/recover-src/amrecover.h index 5accbb7..a1652e6 100644 --- a/recover-src/amrecover.h +++ b/recover-src/amrecover.h @@ -88,6 +88,7 @@ extern void cd_glob(char *dir); extern void cd_regex(char *dir); extern void cd_dir(char *dir, char *default_dir); extern void set_tape(char *tape); +extern void set_device(char *host, char *device); extern void show_directory(void); extern void set_mode(int mode); extern void show_mode(void); diff --git a/recover-src/display_commands.c b/recover-src/display_commands.c index 826c4ce..92a9e7d 100644 --- a/recover-src/display_commands.c +++ b/recover-src/display_commands.c @@ -99,9 +99,8 @@ add_dir_list_item( { DIR_ITEM *next; - dbprintf(("add_dir_list_item: Adding \"%s\" \"%d\" \"%s\" \"" - OFF_T_FMT "\" \"%s\"\n", - date, level, tape, (OFF_T_FMT_TYPE)fileno, path)); + dbprintf(_("add_dir_list_item: Adding \"%s\" \"%d\" \"%s\" \"%lld\" \"%s\"\n"), + date, level, tape, (long long)fileno, path); next = (DIR_ITEM *)alloc(sizeof(DIR_ITEM)); memset(next, 0, sizeof(DIR_ITEM)); @@ -146,7 +145,7 @@ suck_dir_list_from_server(void) char *qdisk_path; if (disk_path == NULL) { - printf("Directory must be set before getting listing\n"); + g_printf(_("Directory must be set before getting listing\n")); return; } else if(strcmp(disk_path, "/") == 0) { disk_path_slash = stralloc(disk_path); @@ -174,7 +173,7 @@ suck_dir_list_from_server(void) { amfree(disk_path_slash); l = reply_line(); - printf("%s\n", l); + g_printf("%s\n", l); return; } disk_path_slash_dot = stralloc2(disk_path_slash, "."); @@ -200,18 +199,18 @@ suck_dir_list_from_server(void) l = reply_line(); if (!server_happy()) { - printf("%s\n", l); + g_printf("%s\n", l); continue; } s = l; if (strncmp_const_skip(l, "201-", s, ch) != 0) { - err = "bad reply: not 201-"; + err = _("bad reply: not 201-"); continue; } ch = *s++; skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing date field"; + err = _("bad reply: missing date field"); continue; } date = s - 1; @@ -220,14 +219,14 @@ suck_dir_list_from_server(void) skip_whitespace(s, ch); if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) { - err = "bad reply: cannot parse level field"; + err = _("bad reply: cannot parse level field"); continue; } skip_integer(s, ch); skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing tape field"; + err = _("bad reply: missing tape field"); continue; } tape = s - 1; @@ -237,10 +236,10 @@ suck_dir_list_from_server(void) *tape_undo = '\0'; if(am_has_feature(indexsrv_features, fe_amindexd_fileno_in_OLSD)) { - OFF_T_FMT_TYPE fileno_ = (OFF_T_FMT_TYPE)0; + long long fileno_ = (long long)0; skip_whitespace(s, ch); - if(ch == '\0' || sscanf(s - 1, OFF_T_FMT, &fileno_) != 1) { - err = "bad reply: cannot parse fileno field"; + if(ch == '\0' || sscanf(s - 1, "%lld", &fileno_) != 1) { + err = _("bad reply: cannot parse fileno field"); continue; } fileno = (off_t)fileno_; @@ -252,7 +251,7 @@ suck_dir_list_from_server(void) skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing directory field"; + err = _("bad reply: missing directory field"); continue; } qdir = s - 1; @@ -293,7 +292,7 @@ list_directory(void) char *quoted; if (disk_path == NULL) { - printf("Must select a disk before listing files; use the setdisk command.\n"); + g_printf(_("Must select a disk before listing files; use the setdisk command.\n")); return; } @@ -308,7 +307,7 @@ list_directory(void) pager_command = stralloc2(pager, " ; /bin/cat > /dev/null"); if ((fp = popen(pager_command, "w")) == NULL) { - printf("Warning - can't pipe through %s\n", pager); + g_printf(_("Warning - can't pipe through %s\n"), pager); fp = stdout; } amfree(pager_command); @@ -317,7 +316,7 @@ list_directory(void) i++; /* so disk_path != "/" */ for (item = get_dir_list(); item != NULL; item=get_next_dir_item(item)) { quoted = quote_string(item->path + i); - fprintf(fp, "%s %s\n", item->date, quoted); + g_fprintf(fp, "%s %s\n", item->date, quoted); amfree(quoted); } apclose(fp); diff --git a/recover-src/extract_list.c b/recover-src/extract_list.c index e46eb76..afb6278 100644 --- a/recover-src/extract_list.c +++ b/recover-src/extract_list.c @@ -188,7 +188,7 @@ read_buffer( nfound = select(datafd+1, &readset, NULL, NULL, &timeout); if(nfound < 0 ) { /* Select returned an error. */ - fprintf(stderr,"select error: %s\n", strerror(errno)); + g_fprintf(stderr,_("select error: %s\n"), strerror(errno)); size = -1; break; } @@ -197,8 +197,8 @@ read_buffer( /* Select timed out. */ if (timeout_s != 0) { /* Not polling: a real read timeout */ - fprintf(stderr,"timeout waiting for restore\n"); - fprintf(stderr,"increase READ_TIMEOUT in recover-src/extract_list.c if your tape is slow\n"); + g_fprintf(stderr,_("timeout waiting for restore\n")); + g_fprintf(stderr,_("increase READ_TIMEOUT in recover-src/extract_list.c if your tape is slow\n")); } errno = ETIMEDOUT; size = -1; @@ -215,7 +215,7 @@ read_buffer( continue; } if (errno != EPIPE) { - fprintf(stderr, "read_buffer: read error - %s", + g_fprintf(stderr, _("read_buffer: read error - %s"), strerror(errno)); break; } @@ -364,8 +364,8 @@ clean_tape_list( } if (remove_fn2) { - dbprintf(("removing path %s, it is included in %s\n", - fn2->path, fn1->path)); + dbprintf(_("removing path %s, it is included in %s\n"), + fn2->path, fn1->path); ofn2 = fn2; fn2 = fn2->next; amfree(ofn2->path); @@ -379,8 +379,8 @@ clean_tape_list( if(remove_fn1 != 0) { /* fn2->path is always valid */ - /*@i@*/ dbprintf(("removing path %s, it is included in %s\n", - /*@i@*/ fn1->path, fn2->path)); + /*@i@*/ dbprintf(_("removing path %s, it is included in %s\n"), + /*@i@*/ fn1->path, fn2->path); ofn1 = fn1; fn1 = fn1->next; amfree(ofn1->path); @@ -450,7 +450,7 @@ do_unlink_list(void) for (ul = unlink_list; ul != NULL; ul = ul->next) { if (unlink(ul->path) < 0) { - fprintf(stderr,"Can't unlink %s: %s\n", ul->path, strerror(errno)); + g_fprintf(stderr,_("Can't unlink %s: %s\n"), ul->path, strerror(errno)); ret = 0; } } @@ -500,14 +500,14 @@ check_file_overwrite( if (lstat(path, &stat_buf) == 0) { if(!S_ISDIR(stat_buf.st_mode)) { if (add_to_unlink_list(path)) { - printf("WARNING: %s is not a directory, " - "it will be deleted.\n", + g_printf(_("WARNING: %s is not a directory, " + "it will be deleted.\n"), path); } } } else if (errno != ENOENT) { - printf("Can't stat %s: %s\n", path, strerror(errno)); + g_printf(_("Can't stat %s: %s\n"), path, strerror(errno)); } *s = '/'; s++; @@ -524,20 +524,20 @@ check_file_overwrite( if (lstat(filename, &stat_buf) == 0) { if(S_ISDIR(stat_buf.st_mode)) { if(!is_empty_dir(filename)) { - printf("WARNING: All existing files in %s " - "will be deleted.\n", filename); + g_printf(_("WARNING: All existing files in %s " + "will be deleted.\n"), filename); } } else if(S_ISREG(stat_buf.st_mode)) { - printf("WARNING: Existing file %s will be overwritten\n", + g_printf(_("WARNING: Existing file %s will be overwritten\n"), filename); } else { if (add_to_unlink_list(filename)) { - printf("WARNING: Existing entry %s will be deleted\n", + g_printf(_("WARNING: Existing entry %s will be deleted\n"), filename); } } } else if (errno != ENOENT) { - printf("Can't stat %s: %s\n", filename, strerror(errno)); + g_printf(_("Can't stat %s: %s\n"), filename, strerror(errno)); } amfree(filename); } @@ -691,9 +691,9 @@ add_glob( char *uqglob = unquote_string(glob); regex = glob_to_regex(uqglob); - dbprintf(("add_glob (%s) -> %s\n", uqglob, regex)); + dbprintf(_("add_glob (%s) -> %s\n"), uqglob, regex); if ((s = validate_regexp(regex)) != NULL) { - printf("%s is not a valid shell wildcard pattern: ", glob); + g_printf(_("%s is not a valid shell wildcard pattern: "), glob); puts(s); } else { /* @@ -721,7 +721,7 @@ add_regex( char *uqregex = unquote_string(regex); if ((s = validate_regexp(uqregex)) != NULL) { - printf("\"%s\" is not a valid regular expression: ", regex); + g_printf(_("\"%s\" is not a valid regular expression: "), regex); puts(s); } else { add_file(uqregex, regex); @@ -751,12 +751,12 @@ add_file( int dir_entries; if (disk_path == NULL) { - printf("Must select directory before adding files\n"); + g_printf(_("Must select directory before adding files\n")); return; } memset(&lditem, 0, sizeof(lditem)); /* Prevent use of bogus data... */ - dbprintf(("add_file: Looking for \"%s\"\n", regex)); + dbprintf(_("add_file: Looking for \"%s\"\n"), regex); if(strcmp(regex, "/[/]*$") == 0) { /* "/" behave like "." */ regex = "\\.[/]*$"; @@ -785,8 +785,8 @@ add_file( amfree(clean_disk_path); } - dbprintf(("add_file: Converted path=\"%s\" to path_on_disk=\"%s\"\n", - regex, path_on_disk)); + dbprintf(_("add_file: Converted path=\"%s\" to path_on_disk=\"%s\"\n"), + regex, path_on_disk); found_one = 0; dir_entries = 0; @@ -794,7 +794,7 @@ add_file( { dir_entries++; quoted = quote_string(ditem->path); - dbprintf(("add_file: Pondering ditem->path=%s\n", quoted)); + dbprintf(_("add_file: Pondering ditem->path=%s\n"), quoted); amfree(quoted); if (match(path_on_disk, ditem->path)) { @@ -807,7 +807,7 @@ add_file( clean_pathname(ditem_path); qditem_path = quote_string(ditem_path); - cmd = stralloc2("ORLD ", qditem_path); + cmd = newstralloc2(cmd, "ORLD ", qditem_path); amfree(qditem_path); if(send_command(cmd) == -1) { amfree(cmd); @@ -827,7 +827,7 @@ add_file( amfree(ditem_path); amfree(path_on_disk); l = reply_line(); - printf("%s\n", l); + g_printf("%s\n", l); return; } dir_undo = NULL; @@ -857,14 +857,14 @@ add_file( s = l; if(strncmp_const_skip(l, "201-", s, ch) != 0) { - err = "bad reply: not 201-"; + err = _("bad reply: not 201-"); continue; } ch = *s++; skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing date field"; + err = _("bad reply: missing date field"); continue; } fp = s-1; @@ -875,14 +875,14 @@ add_file( skip_whitespace(s, ch); if(ch == '\0' || sscanf(s - 1, "%d", &lditem.level) != 1) { - err = "bad reply: cannot parse level field"; + err = _("bad reply: cannot parse level field"); continue; } skip_integer(s, ch); skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing tape field"; + err = _("bad reply: missing tape field"); continue; } fp = s-1; @@ -892,11 +892,11 @@ add_file( s[-1] = (char)ch; if(am_has_feature(indexsrv_features, fe_amindexd_fileno_in_ORLD)) { - OFF_T_FMT_TYPE fileno_ = (OFF_T_FMT_TYPE)0; + long long fileno_ = (long long)0; skip_whitespace(s, ch); if(ch == '\0' || - sscanf(s - 1, OFF_T_FMT, &fileno_) != 1) { - err = "bad reply: cannot parse fileno field"; + sscanf(s - 1, "%lld", &fileno_) != 1) { + err = _("bad reply: cannot parse fileno field"); continue; } lditem.fileno = (off_t)fileno_; @@ -905,7 +905,7 @@ add_file( skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing directory field"; + err = _("bad reply: missing directory field"); continue; } dir = s - 1; @@ -916,16 +916,16 @@ add_file( switch(add_extract_item(&lditem)) { case -1: - printf("System error\n"); - dbprintf(("add_file: (Failed) System error\n")); + g_printf(_("System error\n")); + dbprintf(_("add_file: (Failed) System error\n")); break; case 0: quoted = quote_string(lditem.path); - printf("Added dir %s at date %s\n", + g_printf(_("Added dir %s at date %s\n"), quoted, lditem.date); - dbprintf(("add_file: (Successful) Added dir %s at date %s\n", - quoted, lditem.date)); + dbprintf(_("add_file: (Successful) Added dir %s at date %s\n"), + quoted, lditem.date); amfree(quoted); added=1; break; @@ -943,8 +943,8 @@ add_file( puts(cmd); } else if(added == 0) { quoted = quote_string(ditem_path); - printf("dir %s already added\n", quoted); - dbprintf(("add_file: dir %s already added\n", quoted)); + g_printf(_("dir %s already added\n"), quoted); + dbprintf(_("add_file: dir %s already added\n"), quoted); amfree(quoted); } } @@ -952,21 +952,21 @@ add_file( { switch(add_extract_item(ditem)) { case -1: - printf("System error\n"); - dbprintf(("add_file: (Failed) System error\n")); + g_printf(_("System error\n")); + dbprintf(_("add_file: (Failed) System error\n")); break; case 0: quoted = quote_string(ditem->path); - printf("Added file %s\n", quoted); - dbprintf(("add_file: (Successful) Added %s\n", quoted)); + g_printf(_("Added file %s\n"), quoted); + dbprintf(_("add_file: (Successful) Added %s\n"), quoted); amfree(quoted); break; case 1: quoted = quote_string(ditem->path); - printf("File %s already added\n", quoted); - dbprintf(("add_file: file %s already added\n", quoted)); + g_printf(_("File %s already added\n"), quoted); + dbprintf(_("add_file: file %s already added\n"), quoted); amfree(quoted); } } @@ -983,9 +983,9 @@ add_file( if(! found_one) { quoted = quote_string(path); - printf("File %s doesn't exist in directory\n", quoted); - dbprintf(("add_file: (Failed) File %s doesn't exist in directory\n", - quoted)); + g_printf(_("File %s doesn't exist in directory\n"), quoted); + dbprintf(_("add_file: (Failed) File %s doesn't exist in directory\n"), + quoted); amfree(quoted); } } @@ -1001,9 +1001,9 @@ delete_glob( char *uqglob = unquote_string(glob); regex = glob_to_regex(uqglob); - dbprintf(("delete_glob (%s) -> %s\n", uqglob, regex)); + dbprintf(_("delete_glob (%s) -> %s\n"), uqglob, regex); if ((s = validate_regexp(regex)) != NULL) { - printf("\"%s\" is not a valid shell wildcard pattern: ", glob); + g_printf(_("\"%s\" is not a valid shell wildcard pattern: "), glob); puts(s); } else { /* @@ -1031,7 +1031,7 @@ delete_regex( char *uqregex = unquote_string(regex); if ((s = validate_regexp(regex)) != NULL) { - printf("\"%s\" is not a valid regular expression: ", regex); + g_printf(_("\"%s\" is not a valid regular expression: "), regex); puts(s); } else { delete_file(uqregex, uqregex); @@ -1065,12 +1065,12 @@ delete_file( char *quoted; if (disk_path == NULL) { - printf("Must select directory before deleting files\n"); + g_printf(_("Must select directory before deleting files\n")); return; } memset(&lditem, 0, sizeof(lditem)); /* Prevent use of bogus data... */ - dbprintf(("delete_file: Looking for \"%s\"\n", path)); + dbprintf(_("delete_file: Looking for \"%s\"\n"), path); if (strcmp(regex, "[^/]*[/]*$") == 0) { /* Looking for * find everything but single . */ @@ -1101,13 +1101,13 @@ delete_file( amfree(clean_disk_path); } - dbprintf(("delete_file: Converted path=\"%s\" to path_on_disk=\"%s\"\n", - regex, path_on_disk)); + dbprintf(_("delete_file: Converted path=\"%s\" to path_on_disk=\"%s\"\n"), + regex, path_on_disk); found_one = 0; for (ditem=get_dir_list(); ditem!=NULL; ditem=get_next_dir_item(ditem)) { quoted = quote_string(ditem->path); - dbprintf(("delete_file: Pondering ditem->path=%s\n", quoted)); + dbprintf(_("delete_file: Pondering ditem->path=%s\n"), quoted); amfree(quoted); if (match(path_on_disk, ditem->path)) { @@ -1120,7 +1120,7 @@ delete_file( clean_pathname(ditem_path); qditem_path = quote_string(ditem_path); - cmd = stralloc2("ORLD ", qditem_path); + cmd = newstralloc2(cmd, "ORLD ", qditem_path); amfree(qditem_path); if(send_command(cmd) == -1) { amfree(cmd); @@ -1140,7 +1140,7 @@ delete_file( amfree(ditem_path); amfree(path_on_disk); l = reply_line(); - printf("%s\n", l); + g_printf("%s\n", l); return; } deleted=0; @@ -1172,14 +1172,14 @@ delete_file( s = l; if(strncmp_const_skip(l, "201-", s, ch) != 0) { - err = "bad reply: not 201-"; + err = _("bad reply: not 201-"); continue; } ch = *s++; skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing date field"; + err = _("bad reply: missing date field"); continue; } date = s - 1; @@ -1188,14 +1188,14 @@ delete_file( skip_whitespace(s, ch); if(ch == '\0' || sscanf(s - 1, "%d", &level) != 1) { - err = "bad reply: cannot parse level field"; + err = _("bad reply: cannot parse level field"); continue; } skip_integer(s, ch); skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing tape field"; + err = _("bad reply: missing tape field"); continue; } tape = s - 1; @@ -1205,11 +1205,11 @@ delete_file( *tape_undo = '\0'; if(am_has_feature(indexsrv_features, fe_amindexd_fileno_in_ORLD)) { - OFF_T_FMT_TYPE fileno_ = (OFF_T_FMT_TYPE)0; + long long fileno_ = (long long)0; skip_whitespace(s, ch); if(ch == '\0' || - sscanf(s - 1, OFF_T_FMT, &fileno_) != 1) { - err = "bad reply: cannot parse fileno field"; + sscanf(s - 1, "%lld", &fileno_) != 1) { + err = _("bad reply: cannot parse fileno field"); continue; } fileno = (off_t)fileno_; @@ -1218,7 +1218,7 @@ delete_file( skip_whitespace(s, ch); if(ch == '\0') { - err = "bad reply: missing directory field"; + err = _("bad reply: missing directory field"); continue; } skip_non_whitespace(s, ch); @@ -1231,13 +1231,13 @@ delete_file( lditem.tape = newstralloc(lditem.tape, tape); switch(delete_extract_item(&lditem)) { case -1: - printf("System error\n"); - dbprintf(("delete_file: (Failed) System error\n")); + g_printf(_("System error\n")); + dbprintf(_("delete_file: (Failed) System error\n")); break; case 0: - printf("Deleted dir %s at date %s\n", ditem_path, date); - dbprintf(("delete_file: (Successful) Deleted dir %s at date %s\n", - ditem_path, date)); + g_printf(_("Deleted dir %s at date %s\n"), ditem_path, date); + dbprintf(_("delete_file: (Successful) Deleted dir %s at date %s\n"), + ditem_path, date); deleted=1; break; case 1: @@ -1252,29 +1252,29 @@ delete_file( if (cmd) puts(cmd); } else if(deleted == 0) { - printf("Warning - dir '%s' not on tape list\n", + g_printf(_("Warning - dir '%s' not on tape list\n"), ditem_path); - dbprintf(("delete_file: dir '%s' not on tape list\n", - ditem_path)); + dbprintf(_("delete_file: dir '%s' not on tape list\n"), + ditem_path); } } else { switch(delete_extract_item(ditem)) { case -1: - printf("System error\n"); - dbprintf(("delete_file: (Failed) System error\n")); + g_printf(_("System error\n")); + dbprintf(_("delete_file: (Failed) System error\n")); break; case 0: - printf("Deleted %s\n", ditem->path); - dbprintf(("delete_file: (Successful) Deleted %s\n", - ditem->path)); + g_printf(_("Deleted %s\n"), ditem->path); + dbprintf(_("delete_file: (Successful) Deleted %s\n"), + ditem->path); break; case 1: - printf("Warning - file '%s' not on tape list\n", + g_printf(_("Warning - file '%s' not on tape list\n"), ditem->path); - dbprintf(("delete_file: file '%s' not on tape list\n", - ditem->path)); + dbprintf(_("delete_file: file '%s' not on tape list\n"), + ditem->path); break; } } @@ -1285,9 +1285,9 @@ delete_file( amfree(path_on_disk); if(! found_one) { - printf("File %s doesn't exist in directory\n", path); - dbprintf(("delete_file: (Failed) File %s doesn't exist in directory\n", - path)); + g_printf(_("File %s doesn't exist in directory\n"), path); + dbprintf(_("delete_file: (Failed) File %s doesn't exist in directory\n"), + path); } } @@ -1317,7 +1317,7 @@ display_extract_list( pager_command = stralloc2(pager, " ; /bin/cat > /dev/null"); if ((fp = popen(pager_command, "w")) == NULL) { - printf("Warning - can't pipe through %s\n", pager); + g_printf(_("Warning - can't pipe through %s\n"), pager); fp = stdout; } amfree(pager_command); @@ -1327,7 +1327,7 @@ display_extract_list( uqfile = unquote_string(file); if ((fp = fopen(uqfile, "w")) == NULL) { - printf("Can't open file %s to print extract list into\n", file); + g_printf(_("Can't open file %s to print extract list into\n"), file); amfree(uqfile); return; } @@ -1336,16 +1336,16 @@ display_extract_list( for (this = extract_list; this != NULL; this = this->next) { - fprintf(fp, "TAPE %s LEVEL %d DATE %s\n", + g_fprintf(fp, _("TAPE %s LEVEL %d DATE %s\n"), this->tape, this->level, this->date); for (that = this->files; that != NULL; that = that->next) - fprintf(fp, "\t%s\n", that->path); + g_fprintf(fp, "\t%s\n", that->path); } if (file == NULL) { apclose(fp); } else { - printf("Extract list written to file %s\n", file); + g_printf(_("Extract list written to file %s\n"), file); afclose(fp); } } @@ -1393,20 +1393,20 @@ okay_to_continue( char *line = NULL; char *s; char *prompt; - int get_tape; + int get_device; - get_tape = 0; + get_device = 0; while (ret < 0) { - if (get_tape) { - prompt = "New tape device [?]: "; + if (get_device) { + prompt = _("New device name [?]: "); } else if (allow_tape && allow_skip) { - prompt = "Continue [?/Y/n/s/t]? "; + prompt = _("Continue [?/Y/n/s/d]? "); } else if (allow_tape && !allow_skip) { - prompt = "Continue [?/Y/n/t]? "; + prompt = _("Continue [?/Y/n/d]? "); } else if (allow_retry) { - prompt = "Continue [?/Y/n/r]? "; + prompt = _("Continue [?/Y/n/r]? "); } else { - prompt = "Continue [?/Y/n]? "; + prompt = _("Continue [?/Y/n]? "); } fputs(prompt, stdout); fflush(stdout); fflush(stderr); @@ -1414,40 +1414,53 @@ okay_to_continue( if ((line = agets(stdin)) == NULL) { putchar('\n'); clearerr(stdin); - if (get_tape) { - get_tape = 0; + if (get_device) { + get_device = 0; continue; } ret = 0; break; } + dbprintf("User prompt: '%s'; response: '%s'\n", prompt, line); + s = line; while ((ch = *s++) != '\0' && isspace(ch)) { (void)ch; /* Quiet empty loop compiler warning */ } if (ch == '?') { - if (get_tape) { - printf("Enter a new device ([host:]device) or \"default\"\n"); + if (get_device) { + g_printf(_("Enter a new device name or \"default\"\n")); } else { - printf("Enter \"y\"es to continue, \"n\"o to stop"); + g_printf(_("Enter \"y\"es to continue, \"n\"o to stop")); if(allow_skip) { - printf(", \"s\"kip this tape"); + g_printf(_(", \"s\"kip this tape")); } if(allow_retry) { - printf(" or \"r\"etry this tape"); + g_printf(_(" or \"r\"etry this tape")); } if (allow_tape) { - printf(" or \"t\"ape to change tape drives"); + g_printf(_(" or \"d\" to change to a new device")); } putchar('\n'); } - } else if (get_tape) { - set_tape(s - 1); - get_tape = 0; + } else if (get_device) { + char *tmp = stralloc(tape_server_name); + + if (strncmp_const(s - 1, "default") == 0) { + set_device(tmp, NULL); /* default device, existing host */ + } else if (s[-1] != '\0') { + set_device(tmp, s - 1); /* specified device, existing host */ + } else { + g_printf(_("No change.\n")); + } + + amfree(tmp); + + get_device = 0; } else if (ch == '\0' || ch == 'Y' || ch == 'y') { ret = 1; - } else if (allow_tape && (ch == 'T' || ch == 't')) { - get_tape = 1; + } else if (allow_tape && (ch == 'D' || ch == 'd' || ch == 'T' || ch == 't')) { + get_device = 1; /* ('T' and 't' are for backward-compatibility) */ } else if (ch == 'N' || ch == 'n') { ret = 0; } else if (allow_retry && (ch == 'R' || ch == 'r')) { @@ -1471,7 +1484,7 @@ send_to_tape_server( if (security_stream_write(stream, msg, strlen(msg)) < 0) { - error("Error writing to tape server"); + error(_("Error writing to tape server")); exit(101); /*NOTREACHED*/ } @@ -1496,7 +1509,7 @@ extract_files_setup( amidxtaped_secdrv = security_getdriver(authopt); if (amidxtaped_secdrv == NULL) { - error("no '%s' security driver available for host '%s'", + error(_("no '%s' security driver available for host '%s'"), authopt, tape_server_name); } @@ -1582,7 +1595,7 @@ extract_files_setup( if(strncmp_const(amidxtaped_line,"FEATURES=") == 0) { tapesrv_features = am_string_to_feature(amidxtaped_line+9); } else { - fprintf(stderr, "amrecover - expecting FEATURES line from amidxtaped\n"); + g_fprintf(stderr, _("amrecover - expecting FEATURES line from amidxtaped\n")); stop_amidxtaped(); amfree(disk_regex); amfree(host_regex); @@ -1600,7 +1613,7 @@ extract_files_setup( am_has_feature(indexsrv_features, fe_amidxtaped_datestamp)) { if(am_has_feature(indexsrv_features, fe_amidxtaped_config)) { - tt = newstralloc2(tt, "CONFIG=", config); + tt = newstralloc2(tt, "CONFIG=", config_name); send_to_tape_server(amidxtaped_streams[CTLFD].fd, tt); } if(am_has_feature(indexsrv_features, fe_amidxtaped_label) && @@ -1610,7 +1623,7 @@ extract_files_setup( } if(am_has_feature(indexsrv_features, fe_amidxtaped_fsf)) { char v_fsf[100]; - snprintf(v_fsf, 99, OFF_T_FMT, (OFF_T_FMT_TYPE)fsf); + g_snprintf(v_fsf, 99, "%lld", (long long)fsf); tt = newstralloc2(tt, "FSF=",v_fsf); send_to_tape_server(amidxtaped_streams[CTLFD].fd, tt); } @@ -1644,8 +1657,8 @@ extract_files_setup( send_to_tape_server(amidxtaped_streams[CTLFD].fd, disk_regex); send_to_tape_server(amidxtaped_streams[CTLFD].fd, clean_datestamp); - dbprintf(("Started amidxtaped with arguments \"6 -h -p %s %s %s %s\"\n", - dump_device_name, host_regex, disk_regex, clean_datestamp)); + dbprintf(_("Started amidxtaped with arguments \"6 -h -p %s %s %s %s\"\n"), + dump_device_name, host_regex, disk_regex, clean_datestamp); } amfree(disk_regex); @@ -1670,16 +1683,17 @@ read_file_header( ssize_t bytes_read; bytes_read = read_buffer(tapedev, buffer, buflen, READ_TIMEOUT); if(bytes_read < 0) { - error("error reading header (%s), check amidxtaped.*.debug on server", + error(_("error reading header (%s), check amidxtaped.*.debug on server"), strerror(errno)); /*NOTREACHED*/ } if((size_t)bytes_read < buflen) { - fprintf(stderr, "%s: short block %d byte%s\n", - get_pname(), (int)bytes_read, (bytes_read == 1) ? "" : "s"); + g_fprintf(stderr, plural(_("%s: short block %d byte\n"), + _("%s: short block %d bytes\n"), bytes_read), + get_pname(), (int)bytes_read); print_header(stdout, file); - error("Can't read file header"); + error(_("Can't read file header")); /*NOTREACHED*/ } @@ -1724,7 +1738,7 @@ extract_files_child( /* make in_fd be our stdin */ if (dup2(in_fd, STDIN_FILENO) == -1) { - error("dup2 failed in extract_files_child: %s", strerror(errno)); + error(_("dup2 failed in extract_files_child: %s"), strerror(errno)); /*NOTREACHED*/ } @@ -1734,7 +1748,7 @@ extract_files_child( if(file.type != F_DUMPFILE) { print_header(stdout, &file); - error("bad header"); + error(_("bad header")); /*NOTREACHED*/ } @@ -1862,7 +1876,7 @@ extract_files_child( restore_args[j++] = stralloc(file.dumper); restore_args[j++] = stralloc("restore"); restore_args[j++] = stralloc("--config"); - restore_args[j++] = stralloc(config); + restore_args[j++] = stralloc(config_name); restore_args[j++] = stralloc("--disk"); restore_args[j++] = stralloc(file.disk); break; @@ -1919,7 +1933,7 @@ extract_files_child( case IS_GNUTAR: case IS_SAMBA_TAR: #ifndef GNUTAR - fprintf(stderr, "warning: GNUTAR program not available.\n"); + g_fprintf(stderr, _("warning: GNUTAR program not available.\n")); cmd = stralloc("tar"); #else cmd = stralloc(GNUTAR); @@ -1949,7 +1963,7 @@ extract_files_child( } #endif if (cmd == NULL) { - fprintf(stderr, "warning: restore program for %s not available.\n", + g_fprintf(stderr, _("warning: restore program for %s not available.\n"), file.program); cmd = stralloc("restore"); } @@ -1959,13 +1973,14 @@ extract_files_child( break; } if (cmd) { - dbprintf(("Exec'ing %s with arguments:\n", cmd)); + dbprintf(_("Exec'ing %s with arguments:\n"), cmd); for (i = 0; i < j; i++) { if( i == passwd_field) - dbprintf(("\tXXXXX\n")); + dbprintf("\tXXXXX\n"); else - dbprintf(("\t%s\n", restore_args[i])); + dbprintf(_("\t%s\n"), restore_args[i]); } + safe_fd(-1, 0); (void)execv(cmd, restore_args); /* only get here if exec failed */ save_errno = errno; @@ -1974,8 +1989,8 @@ extract_files_child( } amfree(restore_args); errno = save_errno; - perror("amrecover couldn't exec"); - fprintf(stderr, " problem executing %s\n", cmd); + perror(_("amrecover couldn't exec")); + g_fprintf(stderr, _(" problem executing %s\n"), cmd); amfree(cmd); } exit(1); @@ -1996,7 +2011,7 @@ writer_intermediary( amwait_t extractor_status; if(pipe(child_pipe) == -1) { - error("extract_list - error setting up pipe to extractor: %s\n", + error(_("extract_list - error setting up pipe to extractor: %s\n"), strerror(errno)); /*NOTREACHED*/ } @@ -2012,7 +2027,7 @@ writer_intermediary( /* This is the parent */ if (pid == -1) { - printf("writer_intermediary - error forking child"); + g_printf(_("writer_intermediary - error forking child")); return -1; } @@ -2027,7 +2042,8 @@ writer_intermediary( /* if prompted for a tape, relay said prompt to the user */ if(sscanf(amidxtaped_line, "FEEDME %132s\n", desired_tape) == 1) { int done; - printf("Load tape %s now\n", desired_tape); + g_printf(_("Load tape %s now\n"), desired_tape); + dbprintf(_("Requesting tape %s from user\n"), desired_tape); done = okay_to_continue(am_has_feature(indexsrv_features, fe_amrecover_feedme_tape), 0, 0); @@ -2045,9 +2061,9 @@ writer_intermediary( break; } } else if(strncmp_const(amidxtaped_line, "MESSAGE ") == 0) { - printf("%s\n",&amidxtaped_line[8]); + g_printf("%s\n",&amidxtaped_line[8]); } else { - fprintf(stderr, "Strange message from tape server: %s", + g_fprintf(stderr, _("Strange message from tape server: %s"), amidxtaped_line); break; } @@ -2061,7 +2077,7 @@ writer_intermediary( if(WEXITSTATUS(extractor_status) != 0){ int ret = WEXITSTATUS(extractor_status); if(ret == 255) ret = -1; - printf("Extractor child exited with status %d\n", ret); + g_printf(_("Extractor child exited with status %d\n"), ret); return -1; } return(0); @@ -2090,7 +2106,7 @@ void extract_files(void) { EXTRACT_LIST *elist; - char cwd[STR_SIZE]; + char * cwd; char *l; int first; int otc; @@ -2098,7 +2114,7 @@ extract_files(void) if (!is_extract_list_nonempty()) { - printf("Extract list empty - No files to extract!\n"); + g_printf(_("Extract list empty - No files to extract!\n")); return; } @@ -2116,7 +2132,7 @@ extract_files(void) l = reply_line(); if (!server_happy()) { - printf("%s\n", l); + g_printf("%s\n", l); exit(1); } /* skip reply number */ @@ -2125,7 +2141,7 @@ extract_files(void) if (strcmp(tape_device_name, "/dev/null") == 0) { - printf("amrecover: warning: using %s as the tape device will not work\n", + g_printf(_("amrecover: warning: using %s as the tape device will not work\n"), tape_device_name); } @@ -2133,17 +2149,17 @@ extract_files(void) for (elist = first_tape_list(); elist != NULL; elist = next_tape_list(elist)) { if(elist->tape[0]!='/') { if(first) { - printf("\nExtracting files using tape drive %s on host %s.\n", + g_printf(_("\nExtracting files using tape drive %s on host %s.\n"), tape_device_name, tape_server_name); - printf("The following tapes are needed:"); + g_printf(_("The following tapes are needed:")); first=0; } else - printf(" "); + g_printf(" "); tlist = unmarshal_tapelist_str(elist->tape); for(a_tlist = tlist ; a_tlist != NULL; a_tlist = a_tlist->next) - printf(" %s", a_tlist->label); - printf("\n"); + g_printf(" %s", a_tlist->label); + g_printf("\n"); free_tapelist(tlist); } } @@ -2151,41 +2167,46 @@ extract_files(void) for (elist = first_tape_list(); elist != NULL; elist = next_tape_list(elist)) { if(elist->tape[0]=='/') { if(first) { - printf("\nExtracting files from holding disk on host %s.\n", + g_printf(_("\nExtracting files from holding disk on host %s.\n"), tape_server_name); - printf("The following files are needed:"); + g_printf(_("The following files are needed:")); first=0; } else - printf(" "); + g_printf(" "); tlist = unmarshal_tapelist_str(elist->tape); for(a_tlist = tlist; a_tlist != NULL; a_tlist = a_tlist->next) - printf(" %s", a_tlist->label); - printf("\n"); + g_printf(" %s", a_tlist->label); + g_printf("\n"); free_tapelist(tlist); } } - printf("\n"); + g_printf("\n"); - if (getcwd(cwd, sizeof(cwd)) == NULL) { - perror("extract_list: Current working directory unavailable"); + cwd = g_get_current_dir(); + if (cwd == NULL) { + perror(_("extract_list: Current working directory unavailable")); exit(1); } - printf("Restoring files into directory %s\n", cwd); + g_printf(_("Restoring files into directory %s\n"), cwd); check_file_overwrite(cwd); #ifdef SAMBA_CLIENT if (samba_extract_method == SAMBA_SMBCLIENT) - printf("(unless it is a Samba backup, that will go through to the SMB server)\n"); + g_printf(_("(unless it is a Samba backup, that will go through to the SMB server)\n")); #endif - if (!okay_to_continue(0,0,0)) + dbprintf(_("Checking with user before restoring into directory %s\n"), cwd); + if (!okay_to_continue(0,0,0)) { + amfree(cwd); return; - printf("\n"); + } + g_printf("\n"); if (!do_unlink_list()) { - fprintf(stderr, "Can't recover because I can't cleanup the cwd (%s)\n", + g_fprintf(stderr, _("Can't recover because I can't cleanup the cwd (%s)\n"), cwd); + amfree(cwd); return; } free_unlink_list(); @@ -2194,18 +2215,19 @@ extract_files(void) { if(elist->tape[0]=='/') { dump_device_name = newstralloc(dump_device_name, elist->tape); - printf("Extracting from file "); + g_printf(_("Extracting from file ")); tlist = unmarshal_tapelist_str(dump_device_name); for(a_tlist = tlist; a_tlist != NULL; a_tlist = a_tlist->next) - printf(" %s", a_tlist->label); - printf("\n"); + g_printf(" %s", a_tlist->label); + g_printf("\n"); free_tapelist(tlist); } else { - printf("Extracting files using tape drive %s on host %s.\n", + g_printf(_("Extracting files using tape drive %s on host %s.\n"), tape_device_name, tape_server_name); tlist = unmarshal_tapelist_str(elist->tape); - printf("Load tape %s now\n", tlist->label); + g_printf(_("Load tape %s now\n"), tlist->label); + dbprintf(_("Requesting tape %s from user\n"), tlist->label); free_tapelist(tlist); otc = okay_to_continue(1,1,0); if (otc == 0) @@ -2221,7 +2243,8 @@ extract_files(void) /* connect to the tape handler daemon on the tape drive server */ if ((extract_files_setup(elist->tape, elist->fileno)) == -1) { - fprintf(stderr, "amrecover - can't talk to tape server: %s\n",errstr); + g_fprintf(stderr, _("amrecover - can't talk to tape server: %s\n"), + errstr); return; } @@ -2253,8 +2276,7 @@ amidxtaped_response( memset(ports, -1, SIZEOF(ports)); 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; } @@ -2262,7 +2284,7 @@ amidxtaped_response( 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, " "); @@ -2282,14 +2304,14 @@ bad_nak: } 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++) { @@ -2308,7 +2330,7 @@ bad_nak: if (strcmp(tok, "ERROR") == 0) { tok = strtok(NULL, "\n"); if (tok == NULL) - tok = "[bogus error packet]"; + tok = _("[bogus error packet]"); errstr = newstralloc(errstr, tok); *response_error = 2; return; @@ -2326,22 +2348,16 @@ bad_nak: for (i = 0; i < NSTREAMS; i++) { tok = strtok(NULL, " "); if (tok == NULL || strcmp(tok, amidxtaped_streams[i].name) != 0) { - extra = vstralloc("CONNECT token is \"", + extra = vstrallocf(_("CONNECT token is \"%s\": expected \"%s\""), tok ? tok : "(null)", - "\": expected \"", - amidxtaped_streams[i].name, - "\"", - NULL); + amidxtaped_streams[i].name); goto parse_error; } tok = strtok(NULL, " \n"); if (tok == NULL || sscanf(tok, "%d", &ports[i]) != 1) { - extra = vstralloc("CONNECT ", + extra = vstrallocf(_("CONNECT %s token is \"%s\": expected a port number"), amidxtaped_streams[i].name, - " token is \"", - tok ? tok : "(null)", - "\": expected a port number", - NULL); + tok ? tok : "(null)"); goto parse_error; } } @@ -2354,7 +2370,7 @@ bad_nak: if (strcmp(tok, "OPTIONS") == 0) { tok = strtok(NULL, "\n"); if (tok == NULL) { - extra = stralloc("OPTIONS token is missing"); + extra = stralloc(_("OPTIONS token is missing")); goto parse_error; } /* @@ -2365,7 +2381,7 @@ bad_nak: am_release_feature_set(their_features); if((their_features = am_string_to_feature(tok)) == NULL) { errstr = newvstralloc(errstr, - "OPTIONS: bad features value: ", + _("OPTIONS: bad features value: "), tok, NULL); goto parse_error; @@ -2377,10 +2393,8 @@ bad_nak: 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; */ } @@ -2392,11 +2406,12 @@ bad_nak: if (ports[i] == -1) continue; amidxtaped_streams[i].fd = security_stream_client(sech, ports[i]); - dbprintf(("amidxtaped_streams[%d].fd = %p\n",i, amidxtaped_streams[i].fd)); + dbprintf(_("amidxtaped_streams[%d].fd = %p\n"),i, amidxtaped_streams[i].fd); if (amidxtaped_streams[i].fd == NULL) { - errstr = newvstralloc(errstr, - "[could not connect ", amidxtaped_streams[i].name, " stream: ", - security_geterror(sech), "]", NULL); + errstr = newvstrallocf(errstr,\ + _("[could not connect %s stream: %s]"), + amidxtaped_streams[i].name, + security_geterror(sech)); goto connect_error; } } @@ -2407,9 +2422,10 @@ bad_nak: if (amidxtaped_streams[i].fd == NULL) continue; if (security_stream_auth(amidxtaped_streams[i].fd) < 0) { - errstr = newvstralloc(errstr, - "[could not authenticate ", amidxtaped_streams[i].name, " stream: ", - security_stream_geterror(amidxtaped_streams[i].fd), "]", NULL); + errstr = newvstrallocf(errstr, + _("[could not authenticate %s stream: %s]"), + amidxtaped_streams[i].name, + security_stream_geterror(amidxtaped_streams[i].fd)); goto connect_error; } } @@ -2419,11 +2435,11 @@ bad_nak: * them, complain. */ if (amidxtaped_streams[CTLFD].fd == NULL) { - errstr = newstralloc(errstr, "[couldn't open CTL streams]"); + errstr = newvstrallocf(errstr, _("[couldn't open CTL streams]")); goto connect_error; } if (amidxtaped_streams[DATAFD].fd == NULL) { - errstr = newstralloc(errstr, "[couldn't open DATA streams]"); + errstr = newvstrallocf(errstr, _("[couldn't open DATA streams]")); goto connect_error; } @@ -2432,11 +2448,13 @@ bad_nak: return; parse_error: - errstr = newvstralloc(errstr, - "[parse of reply message failed: ", - extra ? extra : "(no additional information)", - "]", - NULL); + if (extra) { + errstr = newvstrallocf(errstr, + _("[parse of reply message failed: %s]"), extra); + } else { + errstr = newvstrallocf(errstr, + _("[parse of reply message failed: (no additional information)")); + } amfree(extra); *response_error = 2; return; @@ -2517,7 +2535,7 @@ read_amidxtaped_data( fd = *(int *)cookie; if (size < 0) { - errstr = newstralloc2(errstr, "amidxtaped read: ", + errstr = newstralloc2(errstr, _("amidxtaped read: "), security_stream_geterror(amidxtaped_streams[DATAFD].fd)); return; } diff --git a/recover-src/help.c b/recover-src/help.c index 0269015..ecab737 100644 --- a/recover-src/help.c +++ b/recover-src/help.c @@ -36,33 +36,33 @@ void help_list(void) { - printf("valid commands are:\n\n"); + g_printf(_("valid commands are:\n\n")); - printf("add path1 ... - add to extraction list (shell wildcards)\n"); - printf("addx path1 ... - add to extraction list (regular expressions)\n"); - printf("cd directory - change cwd on virtual file system (shell wildcards)\n"); - printf("cdx directory - change cwd on virtual file system (regular expressions)\n"); - printf("clear - clear extraction list\n"); - printf("delete path1 ... - delete from extraction list (shell wildcards)\n"); - printf("deletex path1 ... - delete from extraction list (regular expressions)\n"); - printf("extract - extract selected files from tapes\n"); - printf("exit\n"); - printf("help\n"); - printf("history - show dump history of disk\n"); - printf("list [filename] - show extraction list, optionally writing to file\n"); - printf("lcd directory - change cwd on local file system\n"); - printf("ls - list directory on virtual file system\n"); - printf("lpwd - show cwd on local file system\n"); - printf("mode - show the method used to extract SMB shares\n"); - printf("pwd - show cwd on virtual file system\n"); - printf("quit\n"); - printf("listhost - list hosts\n"); - printf("listdisk [diskdevice] - list disks\n"); - printf("setdate {YYYY-MM-DD|--MM-DD|---DD} - set date of look\n"); - printf(" {YYYY-MM-DD-HH-MM-SS} - set date of look\n"); - printf("setdisk diskname [mountpoint] - select disk on dump host\n"); - printf("sethost host - select dump host\n"); - printf("settape [host:][device|default] - select tape server and/or device\n"); - printf("setmode smb|tar - select the method used to extract SMB shares\n"); - printf("\n"); + g_printf(_("add path1 ... - add to extraction list (shell wildcards)\n")); + g_printf(_("addx path1 ... - add to extraction list (regular expressions)\n")); + g_printf(_("cd directory - change cwd on virtual file system (shell wildcards)\n")); + g_printf(_("cdx directory - change cwd on virtual file system (regular expressions)\n")); + g_printf(_("clear - clear extraction list\n")); + g_printf(_("delete path1 ... - delete from extraction list (shell wildcards)\n")); + g_printf(_("deletex path1 ... - delete from extraction list (regular expressions)\n")); + g_printf(_("extract - extract selected files from tapes\n")); + g_printf(_("exit\n")); + g_printf(_("help\n")); + g_printf(_("history - show dump history of disk\n")); + g_printf(_("list [filename] - show extraction list, optionally writing to file\n")); + g_printf(_("lcd directory - change cwd on local file system\n")); + g_printf(_("ls - list directory on virtual file system\n")); + g_printf(_("lpwd - show cwd on local file system\n")); + g_printf(_("mode - show the method used to extract SMB shares\n")); + g_printf(_("pwd - show cwd on virtual file system\n")); + g_printf(_("quit\n")); + g_printf(_("listhost - list hosts\n")); + g_printf(_("listdisk [diskdevice] - list disks\n")); + g_printf(_("setdate {YYYY-MM-DD|--MM-DD|---DD} - set date of look\n")); + g_printf(_(" {YYYY-MM-DD-HH-MM-SS} - set date of look\n")); + g_printf(_("setdisk diskname [mountpoint] - select disk on dump host\n")); + g_printf(_("sethost host - select dump host\n")); + g_printf(_("setdevice [[-h host] device] - select tape server and/or device\n")); + g_printf(_("setmode smb|tar - select the method used to extract SMB shares\n")); + g_printf("\n"); } diff --git a/recover-src/set_commands.c b/recover-src/set_commands.c index 194e88d..2f659ae 100644 --- a/recover-src/set_commands.c +++ b/recover-src/set_commands.c @@ -66,8 +66,8 @@ set_date( } else { - printf("No index records for cwd on new date\n"); - printf("Setting cwd to mount point\n"); + g_printf(_("No index records for cwd on new date\n")); + g_printf(_("Setting cwd to mount point\n")); disk_path = newstralloc(disk_path, "/"); /* fake it */ clear_dir_list(); } @@ -89,7 +89,7 @@ set_host( if (is_extract_list_nonempty()) { - printf("Must clear extract list before changing host\n"); + g_printf(_("Must clear extract list before changing host\n")); return; } @@ -112,7 +112,7 @@ set_host( if (!found_host) { if ((hp = gethostbyname(uqhost)) != NULL) { host = hp->h_name; - printf("Trying host %s ...\n", host); + g_printf(_("Trying host %s ...\n"), host); cmd = newstralloc2(cmd, "HOST ", host); if (converse(cmd) == -1) exit(1); @@ -129,7 +129,7 @@ set_host( if (hp) { for (hostp = hp->h_aliases; (host = *hostp) != NULL; hostp++) { - printf(_("Trying host %s ...\n"), host); + g_printf(_("Trying host %s ...\n"), host); cmd = newstralloc2(cmd, "HOST ", host); if (converse(cmd) == -1) exit(1); @@ -142,38 +142,22 @@ set_host( } } - /* - * gethostbyname() will not return a canonical name for a host with no - * IPv4 addresses, so use getaddrinfo() (if supported) - */ -#ifdef WORKING_IPV6 + /* Try looking up the canonical name of the host */ if (!found_host) { - struct addrinfo hints; - struct addrinfo *gaires = NULL; - int res; - - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = 0; - hints.ai_protocol = 0; - hints.ai_addrlen = 0; - hints.ai_addr = NULL; - hints.ai_canonname = NULL; - hints.ai_next = NULL; - if ((res = getaddrinfo(uqhost, NULL, &hints, &gaires)) == 0) { - if (gaires && (host = gaires->ai_canonname)) { - printf(_("Trying host %s ...\n"), host); - cmd = newstralloc2(cmd, "HOST ", host); - if (converse(cmd) == -1) - exit(1); - if(server_happy()) - found_host = 1; - } - } + char *canonname; + int result; - if (gaires) freeaddrinfo(gaires); + result = resolve_hostname(uqhost, 0, NULL, &canonname); + if (result == 0 && canonname) { + host = canonname; + g_printf(_("Trying host %s ...\n"), host); + cmd = newstralloc2(cmd, "HOST ", host); + if (converse(cmd) == -1) + exit(1); + if(server_happy()) + found_host = 1; + } } -#endif if(found_host) { dump_hostname = newstralloc(dump_hostname, host); @@ -209,7 +193,7 @@ set_disk( if (is_extract_list_nonempty()) { - printf("Must clear extract list before changing disk\n"); + g_printf(_("Must clear extract list before changing disk\n")); return; } @@ -217,7 +201,7 @@ set_disk( if (mtpt != NULL) { uqmtpt = unquote_string(mtpt); if (*mtpt != '/') { - printf("Mount point \"%s\" invalid - must start with /\n", uqmtpt); + g_printf(_("Mount point \"%s\" invalid - must start with /\n"), uqmtpt); amfree(uqmtpt); return; } @@ -270,8 +254,8 @@ set_disk( } else { - printf("No index records for disk for specified date\n"); - printf("If date correct, notify system administrator\n"); + g_printf(_("No index records for disk for specified date\n")); + g_printf(_("If date correct, notify system administrator\n")); disk_path = newstralloc(disk_path, "/"); /* fake it */ clear_dir_list(); } @@ -327,15 +311,15 @@ cd_glob( char *path_on_disk = NULL; if (disk_name == NULL) { - printf("Must select disk before changing directory\n"); + g_printf(_("Must select disk before changing directory\n")); return; } uqglob = unquote_string(glob); regex = glob_to_regex(uqglob); - dbprintf(("cd_glob (%s) -> %s\n", uqglob, regex)); + dbprintf(_("cd_glob (%s) -> %s\n"), uqglob, regex); if ((s = validate_regexp(regex)) != NULL) { - printf("\"%s\" is not a valid shell wildcard pattern: ", glob); + g_printf(_("\"%s\" is not a valid shell wildcard pattern: "), glob); puts(s); amfree(regex); return; @@ -374,18 +358,33 @@ cd_regex( char * regex) { char *s; + char *uq_orig_regex; char *uqregex; + int len_uqregex; char *path_on_disk = NULL; if (disk_name == NULL) { - printf("Must select disk before changing directory\n"); + g_printf(_("Must select disk before changing directory\n")); return; } - uqregex = unquote_string(regex); + uq_orig_regex = unquote_string(regex); + uqregex = stralloc(uq_orig_regex); + + /* Add a terminating '/' if it is not there, maybe before a '$' */ + len_uqregex = strlen(uqregex); + if (uqregex[len_uqregex-1] == '$') { + if (uqregex[len_uqregex-2] != '/') { + uqregex[len_uqregex-1] = '\0'; + strappend(uqregex, "/$"); + } + } else if (uqregex[len_uqregex-1] != '/') { + //uqregex[len_uqregex-1] = '\0'; + strappend(uqregex, "/"); + } if ((s = validate_regexp(uqregex)) != NULL) { - printf("\"%s\" is not a valid regular expression: ", uqregex); + g_printf(_("\"%s\" is not a valid regular expression: "), uq_orig_regex); amfree(uqregex); puts(s); return; @@ -393,17 +392,18 @@ cd_regex( /* convert path (assumed in cwd) to one on disk */ if (strcmp(disk_path, "/") == 0) - path_on_disk = stralloc2("/", regex); + path_on_disk = stralloc2("/", uqregex); else { char *clean_disk_path = clean_regex(disk_path); path_on_disk = vstralloc(clean_disk_path, "/", regex, NULL); amfree(clean_disk_path); } - cd_dir(path_on_disk, uqregex); + cd_dir(path_on_disk, uq_orig_regex); amfree(path_on_disk); amfree(uqregex); + amfree(uq_orig_regex); } void @@ -411,22 +411,16 @@ cd_dir( char * path_on_disk, char * default_dir) { - char *path_on_disk_slash = NULL; char *dir = NULL; char *s; - int nb_found; size_t i; DIR_ITEM *ditem; - path_on_disk_slash = stralloc2(path_on_disk, "/"); - if ((s = validate_regexp(path_on_disk_slash)) != NULL) { - amfree(path_on_disk_slash); - } - if ((s = validate_regexp(path_on_disk)) != NULL) { - path_on_disk = NULL; + set_directory(default_dir); + return; } nb_found = 0; @@ -434,8 +428,7 @@ cd_dir( for (ditem=get_dir_list(); ditem!=NULL && nb_found <= 1; ditem=get_next_dir_item(ditem)) { - if ((path_on_disk && match(path_on_disk, ditem->path)) - || (path_on_disk_slash && match(path_on_disk_slash, ditem->path))) + if (match(path_on_disk, ditem->path)) { i = strlen(ditem->path); if((i > 0 && ditem->path[i-1] == '/') @@ -457,7 +450,6 @@ cd_dir( } } } - amfree(path_on_disk_slash); if(nb_found==0) { set_directory(default_dir); @@ -466,7 +458,7 @@ cd_dir( set_directory(dir); } else { - printf("Too many directory\n"); + g_printf(_("Too many directories\n")); } amfree(dir); } @@ -489,7 +481,7 @@ set_directory( } if (disk_name == NULL) { - printf("Must select disk before setting directory\n"); + g_printf(_("Must select disk before setting directory\n")); return; /*NOTREACHED*/ } @@ -509,7 +501,7 @@ set_directory( { if (strncmp(mount_point, ldir, strlen(mount_point)) != 0) { - printf("Invalid directory - Can't cd outside mount point \"%s\"\n", + g_printf(_("Invalid directory - Can't cd outside mount point \"%s\"\n"), mount_point); amfree(ldir); return; @@ -545,7 +537,7 @@ set_directory( if (strcmp(dp, "..") == 0) { if (strcmp(new_dir, "/") == 0) { /* at top of disk */ - printf("Invalid directory - Can't cd outside mount point \"%s\"\n", + g_printf(_("Invalid directory - Can't cd outside mount point \"%s\"\n"), mount_point); /*@ignore@*/ amfree(new_dir); @@ -591,7 +583,7 @@ set_directory( } else { - printf("Invalid directory - %s\n", dir); + g_printf(_("Invalid directory - %s\n"), dir); } /*@ignore@*/ @@ -606,41 +598,48 @@ void show_directory(void) { if (mount_point == NULL || disk_path == NULL) - printf("Must select disk first\n"); + g_printf(_("Must select disk first\n")); else if (strcmp(mount_point, "/") == 0) - printf("%s\n", disk_path); + g_printf("%s\n", disk_path); else if (strcmp(disk_path, "/") == 0) - printf("%s\n", mount_point); + g_printf("%s\n", mount_point); else - printf("%s%s\n", mount_point, disk_path); + g_printf("%s%s\n", mount_point, disk_path); } -/* set the tape server and device */ +/* set the tape server and device (deprecated version) */ void set_tape( char * tape) { char *uqtape = unquote_string(tape); char *tapedev = strchr(uqtape, ':'); + char *host = NULL; + + g_printf(_("NOTE: 'settape' is deprecated; use setdevice instead.\n")); if (tapedev) { + /* This command is deprecated because this parsing is going to fall + * behind the list of available device names at some point, or to shadow + * an interesting hostname (wouldn't 'tape' be a good name for a + * tape server?) */ if (tapedev != uqtape) { if((strchr(tapedev+1, ':') == NULL) && - (strncmp(uqtape, "null:", 5) == 0 || - strncmp(uqtape, "rait:", 5) == 0 || - strncmp(uqtape, "file:", 5) == 0 || - strncmp(uqtape, "tape:", 5) == 0)) { + (strncmp_const(uqtape, "null:") == 0 || + strncmp_const(uqtape, "rait:") == 0 || + strncmp_const(uqtape, "file:") == 0 || + strncmp_const(uqtape, "s3:") == 0 || + strncmp_const(uqtape, "tape:") == 0)) { tapedev = uqtape; } else { *tapedev = '\0'; - tape_server_name = newstralloc(tape_server_name, uqtape); + host = stralloc(uqtape); ++tapedev; } - } else { /* reset server_name if start with : */ - amfree(tape_server_name); + } else { ++tapedev; } } else @@ -649,20 +648,42 @@ set_tape( if (tapedev[0]) { if (strcmp(tapedev, "default") == 0) - amfree(tape_device_name); - else - tape_device_name = newstralloc(tape_device_name, tapedev); + tapedev = NULL; } + /* call out to the new version */ + set_device(host, tapedev); + + amfree(host); + amfree(uqtape); +} + +/* set the tape server and device, for real */ +void +set_device( + char * host, + char * device) +{ + if (host) + tape_server_name = newstralloc(tape_server_name, host); + else + amfree(tape_server_name); + + if (device) + tape_device_name = newstralloc(tape_device_name, device); + else + amfree(tape_device_name); + + /* print the current status */ if (tape_device_name) - printf ("Using tape \"%s\"", tape_device_name); + g_printf (_("Using tape \"%s\""), tape_device_name); else - printf ("Using default tape"); + g_printf (_("Using default tape")); if (tape_server_name) - printf (" from server %s.\n", tape_server_name); + g_printf (_(" from server %s.\n"), tape_server_name); else - printf (".\nTape server unspecified, assumed to be %s.\n", + g_printf (_(".\nTape server unspecified, assumed to be %s.\n"), server_name); } @@ -672,11 +693,11 @@ set_mode( { #ifdef SAMBA_CLIENT if (mode == SAMBA_SMBCLIENT) { - printf ("SAMBA dumps will be extracted using smbclient\n"); + g_printf (_("SAMBA dumps will be extracted using smbclient\n")); samba_extract_method = SAMBA_SMBCLIENT; } else { if (mode == SAMBA_TAR) { - printf ("SAMBA dumps will be extracted as TAR dumps\n"); + g_printf (_("SAMBA dumps will be extracted as TAR dumps\n")); samba_extract_method = SAMBA_TAR; } } @@ -689,12 +710,12 @@ void show_mode(void) { #ifdef SAMBA_CLIENT - printf ("SAMBA dumps are extracted "); + g_printf (_("SAMBA dumps are extracted ")); if (samba_extract_method == SAMBA_TAR) { - printf (" as TAR dumps\n"); + g_printf (_(" as TAR dumps\n")); } else { - printf ("using smbclient\n"); + g_printf (_("using smbclient\n")); } #endif /* SAMBA_CLIENT */ } diff --git a/recover-src/uparse.c b/recover-src/uparse.c index 9a2010a..c8e30a0 100644 --- a/recover-src/uparse.c +++ b/recover-src/uparse.c @@ -73,27 +73,29 @@ SETDATE = 262, SETTAPE = 263, SETMODE = 264, - CD = 265, - CDX = 266, - QUIT = 267, - DHIST = 268, - LS = 269, - ADD = 270, - ADDX = 271, - EXTRACT = 272, - LIST = 273, - DELETE = 274, - DELETEX = 275, - PWD = 276, - CLEAR = 277, - HELP = 278, - LCD = 279, - LPWD = 280, - MODE = 281, - SMB = 282, - TAR = 283, - PATH = 284, - DATE = 285 + SETDEVICE = 265, + CD = 266, + CDX = 267, + QUIT = 268, + DHIST = 269, + LS = 270, + ADD = 271, + ADDX = 272, + EXTRACT = 273, + DASH_H = 274, + LIST = 275, + DELETE = 276, + DELETEX = 277, + PWD = 278, + CLEAR = 279, + HELP = 280, + LCD = 281, + LPWD = 282, + MODE = 283, + SMB = 284, + TAR = 285, + PATH = 286, + DATE = 287 }; #endif /* Tokens. */ @@ -104,27 +106,29 @@ #define SETDATE 262 #define SETTAPE 263 #define SETMODE 264 -#define CD 265 -#define CDX 266 -#define QUIT 267 -#define DHIST 268 -#define LS 269 -#define ADD 270 -#define ADDX 271 -#define EXTRACT 272 -#define LIST 273 -#define DELETE 274 -#define DELETEX 275 -#define PWD 276 -#define CLEAR 277 -#define HELP 278 -#define LCD 279 -#define LPWD 280 -#define MODE 281 -#define SMB 282 -#define TAR 283 -#define PATH 284 -#define DATE 285 +#define SETDEVICE 265 +#define CD 266 +#define CDX 267 +#define QUIT 268 +#define DHIST 269 +#define LS 270 +#define ADD 271 +#define ADDX 272 +#define EXTRACT 273 +#define DASH_H 274 +#define LIST 275 +#define DELETE 276 +#define DELETEX 277 +#define PWD 278 +#define CLEAR 279 +#define HELP 280 +#define LCD 281 +#define LPWD 282 +#define MODE 283 +#define SMB 284 +#define TAR 285 +#define PATH 286 +#define DATE 287 @@ -169,7 +173,7 @@ typedef union YYSTYPE int subtok; } /* Line 187 of yacc.c. */ -#line 173 "uparse.c" +#line 177 "uparse.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -182,7 +186,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 186 "uparse.c" +#line 190 "uparse.c" #ifdef short # undef short @@ -395,22 +399,22 @@ union yyalloc #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 55 +#define YYFINAL 58 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 45 +#define YYLAST 50 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 31 +#define YYNTOKENS 33 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 16 /* YYNRULES -- Number of rules. */ -#define YYNRULES 49 +#define YYNRULES 52 /* YYNRULES -- Number of states. */ -#define YYNSTATES 61 +#define YYNSTATES 66 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 285 +#define YYMAXUTOK 287 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -446,7 +450,7 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30 + 25, 26, 27, 28, 29, 30, 31, 32 }; #if YYDEBUG @@ -456,26 +460,28 @@ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 24, 26, 29, 31, 34, 37, 41, - 44, 47, 49, 52, 55, 58, 61, 63, 65, 68, - 70, 72, 74, 76, 78, 81, 84, 86, 89, 92, - 94, 97, 100, 102, 105, 108, 110, 112, 115, 117 + 44, 47, 49, 52, 57, 59, 62, 65, 68, 71, + 73, 75, 78, 80, 82, 84, 86, 88, 91, 94, + 96, 99, 102, 104, 107, 110, 112, 115, 118, 120, + 122, 125, 127 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 32, 0, -1, 33, -1, 34, -1, 35, -1, 36, - -1, 38, -1, 40, -1, 42, -1, 44, -1, 45, - -1, 46, -1, -1, 3, -1, 4, 29, -1, 4, - -1, 7, 30, -1, 5, 29, -1, 6, 29, 29, - -1, 6, 29, -1, 8, 29, -1, 8, -1, 10, - 29, -1, 11, 29, -1, 9, 27, -1, 9, 28, - -1, 13, -1, 14, -1, 18, 29, -1, 18, -1, - 21, -1, 22, -1, 26, -1, 12, -1, 15, 37, - -1, 37, 29, -1, 29, -1, 16, 39, -1, 39, - 29, -1, 29, -1, 19, 41, -1, 41, 29, -1, - 29, -1, 20, 43, -1, 43, 29, -1, 29, -1, - 25, -1, 24, 29, -1, 23, -1, 17, -1 + 34, 0, -1, 35, -1, 36, -1, 37, -1, 38, + -1, 40, -1, 42, -1, 44, -1, 46, -1, 47, + -1, 48, -1, -1, 3, -1, 4, 31, -1, 4, + -1, 7, 32, -1, 5, 31, -1, 6, 31, 31, + -1, 6, 31, -1, 8, 31, -1, 8, -1, 10, + 31, -1, 10, 19, 31, 31, -1, 10, -1, 11, + 31, -1, 12, 31, -1, 9, 29, -1, 9, 30, + -1, 14, -1, 15, -1, 20, 31, -1, 20, -1, + 23, -1, 24, -1, 28, -1, 13, -1, 16, 39, + -1, 39, 31, -1, 31, -1, 17, 41, -1, 41, + 31, -1, 31, -1, 21, 43, -1, 43, 31, -1, + 31, -1, 22, 45, -1, 45, 31, -1, 31, -1, + 27, -1, 26, 31, -1, 25, -1, 18, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -483,9 +489,10 @@ static const yytype_uint8 yyrline[] = { 0, 65, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 100, 108, 109, 110, 111, - 112, 113, 114, 118, 122, 126, 127, 131, 135, 136, - 140, 144, 145, 149, 153, 154, 158, 159, 166, 170 + 91, 92, 93, 94, 95, 96, 97, 98, 103, 111, + 112, 113, 114, 115, 116, 117, 121, 125, 129, 130, + 134, 138, 139, 143, 147, 148, 152, 156, 157, 161, + 162, 169, 173 }; #endif @@ -495,13 +502,14 @@ static const yytype_uint8 yyrline[] = static const char *const yytname[] = { "$end", "error", "$undefined", "LISTHOST", "LISTDISK", "SETHOST", - "SETDISK", "SETDATE", "SETTAPE", "SETMODE", "CD", "CDX", "QUIT", "DHIST", - "LS", "ADD", "ADDX", "EXTRACT", "LIST", "DELETE", "DELETEX", "PWD", - "CLEAR", "HELP", "LCD", "LPWD", "MODE", "SMB", "TAR", "PATH", "DATE", - "$accept", "ucommand", "set_command", "display_command", "quit_command", - "add_command", "add_path", "addx_command", "addx_path", "delete_command", - "delete_path", "deletex_command", "deletex_path", "local_command", - "help_command", "extract_command", 0 + "SETDISK", "SETDATE", "SETTAPE", "SETMODE", "SETDEVICE", "CD", "CDX", + "QUIT", "DHIST", "LS", "ADD", "ADDX", "EXTRACT", "DASH_H", "LIST", + "DELETE", "DELETEX", "PWD", "CLEAR", "HELP", "LCD", "LPWD", "MODE", + "SMB", "TAR", "PATH", "DATE", "$accept", "ucommand", "set_command", + "display_command", "quit_command", "add_command", "add_path", + "addx_command", "addx_path", "delete_command", "delete_path", + "deletex_command", "deletex_path", "local_command", "help_command", + "extract_command", 0 }; #endif @@ -513,18 +521,19 @@ static const yytype_uint16 yytoknum[] = 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285 + 285, 286, 287 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 31, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 34, 34, 34, 34, - 34, 34, 34, 35, 36, 37, 37, 38, 39, 39, - 40, 41, 41, 42, 43, 43, 44, 44, 45, 46 + 0, 33, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, + 36, 36, 36, 36, 36, 36, 37, 38, 39, 39, + 40, 41, 41, 42, 43, 43, 44, 45, 45, 46, + 46, 47, 48 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -532,9 +541,10 @@ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 1, 2, 2, 3, 2, - 2, 1, 2, 2, 2, 2, 1, 1, 2, 1, - 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, - 2, 2, 1, 2, 2, 1, 1, 2, 1, 1 + 2, 1, 2, 4, 1, 2, 2, 2, 2, 1, + 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, + 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, + 2, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -542,41 +552,41 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 12, 13, 15, 0, 0, 0, 21, 0, 0, 0, - 33, 26, 27, 0, 0, 49, 29, 0, 0, 30, - 31, 48, 0, 46, 32, 0, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 14, 17, 19, 16, - 20, 24, 25, 22, 23, 36, 34, 39, 37, 28, - 42, 40, 45, 43, 47, 1, 18, 35, 38, 41, - 44 + 12, 13, 15, 0, 0, 0, 21, 0, 24, 0, + 0, 36, 29, 30, 0, 0, 52, 32, 0, 0, + 33, 34, 51, 0, 49, 35, 0, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 14, 17, 19, + 16, 20, 27, 28, 0, 22, 25, 26, 39, 37, + 42, 40, 31, 45, 43, 48, 46, 50, 1, 18, + 0, 38, 41, 44, 47, 23 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 25, 26, 27, 28, 29, 46, 30, 48, 31, - 51, 32, 53, 33, 34, 35 + -1, 26, 27, 28, 29, 30, 49, 31, 51, 32, + 54, 33, 56, 34, 35, 36 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -6 +#define YYPACT_NINF -16 static const yytype_int8 yypact[] = { - -3, -6, -5, -1, 0, 1, 3, -2, 4, 5, - -6, -6, -6, 6, 7, -6, 8, 9, 10, -6, - -6, -6, 11, -6, -6, 27, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, 12, -6, - -6, -6, -6, -6, -6, -6, 13, -6, 14, -6, - -6, 15, -6, 16, -6, -6, -6, -6, -6, -6, - -6 + -3, -16, -15, -1, 0, 1, 3, -2, 7, 4, + 5, -16, -16, -16, 6, 8, -16, 9, 10, 11, + -16, -16, -16, 12, -16, -16, 29, -16, -16, -16, + -16, -16, -16, -16, -16, -16, -16, -16, -16, 13, + -16, -16, -16, -16, 14, -16, -16, -16, -16, 15, + -16, 16, -16, -16, 17, -16, 18, -16, -16, -16, + 19, -16, -16, -16, -16, -16 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6 + -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, + -16, -16, -16, -16, -16, -16 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -587,19 +597,21 @@ static const yytype_int8 yypgoto[] = static const yytype_uint8 yytable[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 36, 41, 42, 55, 37, 38, - 0, 39, 40, 43, 44, 45, 47, 49, 50, 52, - 54, 56, 57, 58, 59, 60 + 11, 12, 13, 14, 15, 16, 37, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 44, 42, 43, 58, + 38, 39, 0, 40, 41, 46, 47, 48, 45, 50, + 52, 53, 55, 57, 59, 60, 61, 62, 63, 64, + 65 }; static const yytype_int8 yycheck[] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 29, 27, 28, 0, 29, 29, - -1, 30, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29 + 13, 14, 15, 16, 17, 18, 31, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 19, 29, 30, 0, + 31, 31, -1, 32, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -607,12 +619,12 @@ static const yytype_int8 yycheck[] = static const yytype_uint8 yystos[] = { 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, - 38, 40, 42, 44, 45, 46, 29, 29, 29, 30, - 29, 27, 28, 29, 29, 29, 37, 29, 39, 29, - 29, 41, 29, 43, 29, 0, 29, 29, 29, 29, - 29 + 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 34, 35, 36, 37, + 38, 40, 42, 44, 46, 47, 48, 31, 31, 31, + 32, 31, 29, 30, 19, 31, 31, 31, 31, 39, + 31, 41, 31, 31, 43, 31, 45, 31, 0, 31, + 31, 31, 31, 31, 31, 31 }; #define yyerrok (yyerrstatus = 0) @@ -1478,21 +1490,36 @@ yyreduce: case 21: #line 92 "uparse.y" - { set_tape(""); } + { set_tape("default"); } break; case 22: #line 93 "uparse.y" - { cd_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } + { set_device(NULL, (yyvsp[(2) - (2)].strval)); } break; case 23: #line 94 "uparse.y" - { cd_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } + { set_device((yyvsp[(3) - (4)].strval), (yyvsp[(4) - (4)].strval)); } break; case 24: #line 95 "uparse.y" + { set_device(NULL, NULL); } + break; + + case 25: +#line 96 "uparse.y" + { cd_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } + break; + + case 26: +#line 97 "uparse.y" + { cd_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } + break; + + case 27: +#line 98 "uparse.y" { #ifdef SAMBA_CLIENT set_mode(SAMBA_SMBCLIENT); @@ -1500,8 +1527,8 @@ yyreduce: } break; - case 25: -#line 100 "uparse.y" + case 28: +#line 103 "uparse.y" { #ifdef SAMBA_CLIENT set_mode(SAMBA_TAR); @@ -1509,112 +1536,112 @@ yyreduce: } break; - case 26: -#line 108 "uparse.y" + case 29: +#line 111 "uparse.y" { list_disk_history(); } break; - case 27: -#line 109 "uparse.y" + case 30: +#line 112 "uparse.y" { list_directory(); } break; - case 28: -#line 110 "uparse.y" + case 31: +#line 113 "uparse.y" { display_extract_list((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; - case 29: -#line 111 "uparse.y" + case 32: +#line 114 "uparse.y" { display_extract_list(NULL); } break; - case 30: -#line 112 "uparse.y" + case 33: +#line 115 "uparse.y" { show_directory(); } break; - case 31: -#line 113 "uparse.y" + case 34: +#line 116 "uparse.y" { clear_extract_list(); } break; - case 32: -#line 114 "uparse.y" + case 35: +#line 117 "uparse.y" { show_mode (); } break; - case 33: -#line 118 "uparse.y" + case 36: +#line 121 "uparse.y" { quit(); } break; - case 35: -#line 126 "uparse.y" + case 38: +#line 129 "uparse.y" { add_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; - case 36: -#line 127 "uparse.y" + case 39: +#line 130 "uparse.y" { add_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; - case 38: -#line 135 "uparse.y" + case 41: +#line 138 "uparse.y" { add_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; - case 39: -#line 136 "uparse.y" + case 42: +#line 139 "uparse.y" { add_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; - case 41: -#line 144 "uparse.y" + case 44: +#line 147 "uparse.y" { delete_glob((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; - case 42: -#line 145 "uparse.y" + case 45: +#line 148 "uparse.y" { delete_glob((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; - case 44: -#line 153 "uparse.y" + case 47: +#line 156 "uparse.y" { delete_regex((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; - case 45: -#line 154 "uparse.y" + case 48: +#line 157 "uparse.y" { delete_regex((yyvsp[(1) - (1)].strval)); amfree((yyvsp[(1) - (1)].strval)); } break; - case 46: -#line 158 "uparse.y" - { char buf[STR_SIZE]; puts(getcwd(buf, sizeof(buf))); } + case 49: +#line 161 "uparse.y" + { char * buf= g_get_current_dir(); puts(buf); free(buf); } break; - case 47: -#line 159 "uparse.y" + case 50: +#line 162 "uparse.y" { local_cd((yyvsp[(2) - (2)].strval)); amfree((yyvsp[(2) - (2)].strval)); } break; - case 48: -#line 166 "uparse.y" + case 51: +#line 169 "uparse.y" { help_list(); } break; - case 49: -#line 170 "uparse.y" + case 52: +#line 173 "uparse.y" { extract_files(); } break; /* Line 1267 of yacc.c. */ -#line 1618 "uparse.c" +#line 1645 "uparse.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1828,13 +1855,13 @@ yyreturn: } -#line 174 "uparse.y" +#line 177 "uparse.y" void yyerror( char * s) { - printf("%s\n", s); + g_printf("%s\n", s); } diff --git a/recover-src/uparse.h b/recover-src/uparse.h index d813294..3d33acd 100644 --- a/recover-src/uparse.h +++ b/recover-src/uparse.h @@ -46,27 +46,29 @@ SETDATE = 262, SETTAPE = 263, SETMODE = 264, - CD = 265, - CDX = 266, - QUIT = 267, - DHIST = 268, - LS = 269, - ADD = 270, - ADDX = 271, - EXTRACT = 272, - LIST = 273, - DELETE = 274, - DELETEX = 275, - PWD = 276, - CLEAR = 277, - HELP = 278, - LCD = 279, - LPWD = 280, - MODE = 281, - SMB = 282, - TAR = 283, - PATH = 284, - DATE = 285 + SETDEVICE = 265, + CD = 266, + CDX = 267, + QUIT = 268, + DHIST = 269, + LS = 270, + ADD = 271, + ADDX = 272, + EXTRACT = 273, + DASH_H = 274, + LIST = 275, + DELETE = 276, + DELETEX = 277, + PWD = 278, + CLEAR = 279, + HELP = 280, + LCD = 281, + LPWD = 282, + MODE = 283, + SMB = 284, + TAR = 285, + PATH = 286, + DATE = 287 }; #endif /* Tokens. */ @@ -77,27 +79,29 @@ #define SETDATE 262 #define SETTAPE 263 #define SETMODE 264 -#define CD 265 -#define CDX 266 -#define QUIT 267 -#define DHIST 268 -#define LS 269 -#define ADD 270 -#define ADDX 271 -#define EXTRACT 272 -#define LIST 273 -#define DELETE 274 -#define DELETEX 275 -#define PWD 276 -#define CLEAR 277 -#define HELP 278 -#define LCD 279 -#define LPWD 280 -#define MODE 281 -#define SMB 282 -#define TAR 283 -#define PATH 284 -#define DATE 285 +#define SETDEVICE 265 +#define CD 266 +#define CDX 267 +#define QUIT 268 +#define DHIST 269 +#define LS 270 +#define ADD 271 +#define ADDX 272 +#define EXTRACT 273 +#define DASH_H 274 +#define LIST 275 +#define DELETE 276 +#define DELETEX 277 +#define PWD 278 +#define CLEAR 279 +#define HELP 280 +#define LCD 281 +#define LPWD 282 +#define MODE 283 +#define SMB 284 +#define TAR 285 +#define PATH 286 +#define DATE 287 @@ -112,7 +116,7 @@ typedef union YYSTYPE int subtok; } /* Line 1489 of yacc.c. */ -#line 116 "uparse.h" +#line 120 "uparse.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/recover-src/uparse.y b/recover-src/uparse.y index 6be3562..72ae6eb 100644 --- a/recover-src/uparse.y +++ b/recover-src/uparse.y @@ -48,8 +48,8 @@ extern char * yytext; /* literal keyword tokens */ -%token LISTHOST LISTDISK SETHOST SETDISK SETDATE SETTAPE SETMODE -%token CD CDX QUIT DHIST LS ADD ADDX EXTRACT +%token LISTHOST LISTDISK SETHOST SETDISK SETDATE SETTAPE SETMODE SETDEVICE +%token CD CDX QUIT DHIST LS ADD ADDX EXTRACT DASH_H %token LIST DELETE DELETEX PWD CLEAR HELP LCD LPWD MODE SMB TAR /* typed tokens */ @@ -89,7 +89,10 @@ set_command: | SETDISK PATH PATH { set_disk($2, $3); amfree($2); amfree($3); } | SETDISK PATH { set_disk($2, NULL); amfree($2); } | SETTAPE PATH { set_tape($2); amfree($2); } - | SETTAPE { set_tape(""); } + | SETTAPE { set_tape("default"); } + | SETDEVICE PATH { set_device(NULL, $2); } + | SETDEVICE DASH_H PATH PATH { set_device($3, $4); } + | SETDEVICE { set_device(NULL, NULL); } | CD PATH { cd_glob($2); amfree($2); } | CDX PATH { cd_regex($2); amfree($2); } | SETMODE SMB { @@ -155,7 +158,7 @@ deletex_path: ; local_command: - LPWD { char buf[STR_SIZE]; puts(getcwd(buf, sizeof(buf))); } + LPWD { char * buf= g_get_current_dir(); puts(buf); free(buf); } | LCD PATH { local_cd($2); amfree($2); @@ -177,5 +180,5 @@ void yyerror( char * s) { - printf("%s\n", s); + g_printf("%s\n", s); } diff --git a/recover-src/uscan.c b/recover-src/uscan.c index 2b8045f..07965af 100644 --- a/recover-src/uscan.c +++ b/recover-src/uscan.c @@ -1,31 +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 -#include +#include +#include +#include +/* 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 . 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 +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 +#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 @@ -34,34 +95,17 @@ #if __STDC__ -#define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#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 @@ -76,80 +120,75 @@ * 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; @@ -186,12 +225,16 @@ struct yy_buffer_state */ 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 @@ -205,28 +248,38 @@ struct yy_buffer_state * 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 @@ -234,84 +287,111 @@ static int yy_start = 0; /* start state number */ */ 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, @@ -325,8 +405,8 @@ static yyconst int yy_ec[256] = 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, @@ -343,106 +423,109 @@ static yyconst int yy_ec[256] = 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. */ @@ -452,7 +535,6 @@ static char *yy_last_accepting_cpos; #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 @@ 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 +#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. @@ -521,65 +648,30 @@ static char *string_buf = NULL; #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 -#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. */ @@ -588,7 +680,6 @@ YY_MALLOC_DECL #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(). @@ -601,9 +692,10 @@ YY_MALLOC_DECL */ #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; \ @@ -613,9 +705,22 @@ YY_MALLOC_DECL 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();" - @@ -636,12 +741,18 @@ YY_MALLOC_DECL #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. @@ -658,12 +769,14 @@ YY_MALLOC_DECL #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" @@ -671,18 +784,18 @@ YY_DECL /* 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; @@ -690,68 +803,68 @@ YY_DECL 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,182 @@ YY_RULE_SETUP 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; @@ -965,9 +1092,9 @@ YY_RULE_SETUP /* file names */ -case 38: +case 40: YY_RULE_SETUP -#line 143 "uscan.l" +#line 145 "uscan.l" { yylval.strval = stralloc(yytext); return PATH; @@ -976,9 +1103,10 @@ YY_RULE_SETUP /* whitespace */ -case 39: +case 41: +/* rule 41 can match eol */ YY_RULE_SETUP -#line 152 "uscan.l" +#line 154 "uscan.l" ; /* whitespace */ YY_BREAK @@ -990,12 +1118,12 @@ YY_RULE_SETUP . { 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(); @@ -1003,26 +1131,26 @@ case YY_STATE_EOF(quotedpath): 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 @@ -1032,13 +1160,13 @@ case YY_STATE_EOF(quotedpath): * 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 @@ -1051,30 +1179,30 @@ case YY_STATE_EOF(quotedpath): 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 @@ -1085,7 +1213,7 @@ case YY_STATE_EOF(quotedpath): * 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; @@ -1093,30 +1221,30 @@ case YY_STATE_EOF(quotedpath): 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; @@ -1127,8 +1255,7 @@ case YY_STATE_EOF(quotedpath): "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 * @@ -1137,21 +1264,20 @@ case YY_STATE_EOF(quotedpath): * 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. @@ -1171,34 +1297,30 @@ static int yy_get_next_buffer() /* 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 ) { @@ -1211,8 +1333,7 @@ static int yy_get_next_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. */ @@ -1222,35 +1343,35 @@ static int yy_get_next_buffer() 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; } } @@ -1258,153 +1379,137 @@ static int yy_get_next_buffer() 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() @@ -1418,16 +1523,16 @@ static int input() */ /* 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(); @@ -1437,90 +1542,92 @@ static int input() } 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()" ); @@ -1529,75 +1636,75 @@ int size; /* 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; @@ -1614,29 +1721,121 @@ YY_BUFFER_STATE b; 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()" ); @@ -1650,56 +1849,51 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + yy_switch_to_buffer(b ); 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()" ); @@ -1709,148 +1903,196 @@ int len; 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 @@ -1859,17 +2101,16 @@ yy_size_t size; * 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() @@ -1959,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 +2216,4 @@ yywrap(void) return 1; } + diff --git a/recover-src/uscan.l b/recover-src/uscan.l index fbd97a2..8c86297 100644 --- a/recover-src/uscan.l +++ b/recover-src/uscan.l @@ -75,6 +75,8 @@ setdisk { return SETDISK; } setdate { return SETDATE; } setmode { return SETMODE; } settape { return SETTAPE; } +setdevice { return SETDEVICE; } +-h { return DASH_H; } cd { return CD; } cdx { return CDX; } quit { return QUIT; } @@ -113,7 +115,7 @@ mode { return MODE; } \" { 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); @@ -242,11 +244,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; diff --git a/restore-src/Makefile.am b/restore-src/Makefile.am index f12bdbf..fa14e25 100644 --- a/restore-src/Makefile.am +++ b/restore-src/Makefile.am @@ -1,21 +1,27 @@ # Makefile for Amanda restore programs. +include $(top_srcdir)/config/automake/installperms.am +include $(top_srcdir)/config/automake/precompile.am + 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 sbin_PROGRAMS = amrestore amfetchdump -libexec_PROGRAMS = amidxtaped +amlibexec_PROGRAMS = amidxtaped ### # Because libamanda includes routines (e.g. regex) provided by some system @@ -40,31 +46,17 @@ amfetchdump_SOURCES = amfetchdump.c 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 -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 +INSTALLPERMS_exec = \ + dest=$(sbindir) chown=amanda $(sbin_PROGRAMS) \ + dest=$(amlibexecdir) chown=amanda $(amlibexec_PROGRAMS) 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`; \ @@ -73,7 +65,7 @@ lint: (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 --git a/restore-src/Makefile.in b/restore-src/Makefile.in index ec68cbe..3f73d54 100644 --- a/restore-src/Makefile.in +++ b/restore-src/Makefile.in @@ -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. @@ -16,17 +16,54 @@ # 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 @@ 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 @@ 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 @@ 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) \ @@ -153,9 +265,9 @@ 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@ @@ -170,7 +282,13 @@ 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 +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,52 +325,162 @@ 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@ @@ -261,7 +488,8 @@ 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 +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 +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 +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 +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 +702,19 @@ amfetchdump_SOURCES = amfetchdump.c 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 +743,66 @@ $(top_srcdir)/configure: $(am__configure_deps) 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 +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 +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 +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 +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 +954,8 @@ check-am: all-am 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 +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 +1004,26 @@ info: info-am 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 +1044,89 @@ ps: ps-am 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`; \ @@ -806,7 +1135,7 @@ lint: (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 --git a/restore-src/amfetchdump.c b/restore-src/amfetchdump.c index 2253b60..bdeb114 100644 --- a/restore-src/amfetchdump.c +++ b/restore-src/amfetchdump.c @@ -30,7 +30,6 @@ */ #include "amanda.h" -#include "tapeio.h" #include "fileheader.h" #include "util.h" #include "restore.h" @@ -39,6 +38,7 @@ #include "find.h" #include "changer.h" #include "logfile.h" +#include "cmdline.h" #define CREAT_MODE 0640 @@ -56,8 +56,7 @@ typedef struct needed_tapes_s { /* local functions */ -void errexit(void); -tapelist_t *list_needed_tapes(match_list_t *match_list); +tapelist_t *list_needed_tapes(GSList *dumpspecs, int only_one); void usage(void); int main(int argc, char **argv); @@ -66,17 +65,6 @@ static pid_t parent_pid = -1; static void cleanup(void); -/* - * Do exit(2) after an error, rather than exit(1). - */ - -void -errexit(void) -{ - exit(2); -} - - /* * Print usage message and terminate. */ @@ -84,22 +72,22 @@ errexit(void) void usage(void) { - fprintf(stderr, "Usage: amfetchdump [options] config hostname [diskname [datestamp [level [hostname [diskname [datestamp [level ... ]]]]]]] [-o configoption]*\n\n"); - fprintf(stderr, "Goes and grabs a dump from tape, moving tapes around and assembling parts as\n"); - fprintf(stderr, "necessary. Files are restored to the current directory, unless otherwise\nspecified.\n\n"); - fprintf(stderr, " -p Pipe exactly *one* complete dumpfile to stdout, instead of to disk.\n"); - fprintf(stderr, " -O Restore files to this directory.\n"); - fprintf(stderr, " -d Force restoration from a particular tape device.\n"); - fprintf(stderr, " -c Compress output, fastest method available.\n"); - fprintf(stderr, " -C Compress output, best filesize method available.\n"); - fprintf(stderr, " -l Leave dumps (un)compressed, whichever way they were originally on tape.\n"); - fprintf(stderr, " -a Assume all tapes are available via changer, do not prompt for initial load.\n"); - fprintf(stderr, " -i Search through tapes and write out an inventory while we\n restore. Useful only if normal logs are unavailable.\n"); - fprintf(stderr, " -w Wait to put split dumps together until all chunks have been restored.\n"); - fprintf(stderr, " -n Do not reassemble split dumpfiles.\n"); - fprintf(stderr, " -k Skip the rewind/label read when reading a new tape.\n"); - fprintf(stderr, " -s Do not use fast forward to skip files we won't restore. Use only if fsf\n causes your tapes to skip too far.\n"); - fprintf(stderr, " -b Force a particular block size (default is 32kb).\n"); + g_fprintf(stderr, _("Usage: amfetchdump [options] config hostname [diskname [datestamp [level [hostname [diskname [datestamp [level ... ]]]]]]] [-o configoption]*\n\n")); + g_fprintf(stderr, _("Goes and grabs a dump from tape, moving tapes around and assembling parts as\n")); + g_fprintf(stderr, _("necessary. Files are restored to the current directory, unless otherwise\nspecified.\n\n")); + g_fprintf(stderr, _(" -p Pipe exactly *one* complete dumpfile to stdout, instead of to disk.\n")); + g_fprintf(stderr, _(" -O Restore files to this directory.\n")); + g_fprintf(stderr, _(" -d Force restoration from a particular tape device.\n")); + g_fprintf(stderr, _(" -c Compress output, fastest method available.\n")); + g_fprintf(stderr, _(" -C Compress output, best filesize method available.\n")); + g_fprintf(stderr, _(" -l Leave dumps (un)compressed, whichever way they were originally on tape.\n")); + g_fprintf(stderr, _(" -a Assume all tapes are available via changer, do not prompt for initial load.\n")); + g_fprintf(stderr, _(" -i Search through tapes and write out an inventory while we\n restore. Useful only if normal logs are unavailable.\n")); + g_fprintf(stderr, _(" -w Wait to put split dumps together until all chunks have been restored.\n")); + g_fprintf(stderr, _(" -n Do not reassemble split dumpfiles.\n")); + g_fprintf(stderr, _(" -k Skip the rewind/label read when reading a new tape.\n")); + g_fprintf(stderr, _(" -s Do not use fast forward to skip files we won't restore. Use only if fsf\n causes your tapes to skip too far.\n")); + g_fprintf(stderr, _(" -b Force a particular block size (default is 32kb).\n")); exit(1); } @@ -110,129 +98,141 @@ usage(void) */ tapelist_t * list_needed_tapes( - match_list_t * match_list) + GSList * dumpspecs, + int only_one) { needed_tape_t *needed_tapes = NULL, *curtape = NULL; disklist_t diskqp; - match_list_t *me = NULL; find_result_t *alldumps = NULL; + find_result_t *curmatch = NULL; + find_result_t *matches = NULL; tapelist_t *tapes = NULL; int numtapes = 0; char *conf_diskfile, *conf_tapelist; /* For disks and tape lists */ - conf_diskfile = getconf_str(CNF_DISKFILE); - conf_tapelist = getconf_str(CNF_TAPELIST); - 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, &diskqp) != 0) { - error("could not load disklist \"%s\"", conf_diskfile); + error(_("could not load disklist \"%s\""), conf_diskfile); /*NOTREACHED*/ } - if (*conf_tapelist == '/') { - conf_tapelist = stralloc(conf_tapelist); - } else { - conf_tapelist = stralloc2(config_dir, conf_tapelist); - } + amfree(conf_diskfile); + + 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_diskfile); amfree(conf_tapelist); /* Grab a find_output_t of all logged dumps */ - alldumps = find_dump(1, &diskqp); + alldumps = find_dump(&diskqp); free_disklist(&diskqp); if(alldumps == NULL){ - fprintf(stderr, "No dump records found\n"); + g_fprintf(stderr, _("No dump records found\n")); exit(1); } - + /* Compare all known dumps to our match list, note what we'll need */ - for(me = match_list; me; me = me->next) { - find_result_t *curmatch = NULL; - find_result_t *matches = NULL; - - matches = dumps_match(alldumps, me->hostname, me->diskname, - me->datestamp, me->level, 1); - sort_find_result("Dhklp", &matches); - for(curmatch = matches; curmatch; curmatch = curmatch->next){ - int havetape = 0; - if(strcmp("OK", curmatch->status)){ - fprintf(stderr,"Dump %s %s %s %d had status '%s', skipping\n", - curmatch->timestamp, curmatch->hostname, - curmatch->diskname, curmatch->level, - curmatch->status); - continue; + matches = dumps_match_dumpspecs(alldumps, dumpspecs, 1); + sort_find_result("Dhklp", &matches); + for(curmatch = matches; curmatch; curmatch = curmatch->next) { + int havetape = 0; + int have_part = 0; + + /* keep only first dump if only_one */ + if (only_one && + curmatch != matches && + (strcmp(curmatch->hostname, matches->hostname) || + strcmp(curmatch->diskname, matches->diskname) || + strcmp(curmatch->timestamp, matches->timestamp) || + curmatch->level != matches->level)) { + continue; + } + if(strcmp("OK", curmatch->status)){ + g_fprintf(stderr,_("Dump %s %s %s %d had status '%s', skipping\n"), + curmatch->timestamp, curmatch->hostname, + curmatch->diskname, curmatch->level, + curmatch->status); + continue; + } + /* check if we already have that part */ + for(curtape = needed_tapes; curtape; curtape = curtape->next) { + find_result_t *rsttemp = NULL; + for(rsttemp = curtape->files; + rsttemp; + rsttemp=rsttemp->next) { + if (!strcmp(rsttemp->partnum, curmatch->partnum) && + !strcmp(rsttemp->hostname, curmatch->hostname) && + !strcmp(rsttemp->diskname, curmatch->diskname) && + !strcmp(rsttemp->timestamp, curmatch->timestamp) && + rsttemp->level == curmatch->level) { + have_part = 1; + } } - for(curtape = needed_tapes; curtape; curtape = curtape->next) { - if(!strcmp(curtape->label, curmatch->label)){ - find_result_t *rsttemp = NULL; - find_result_t *rstfile = alloc(SIZEOF(find_result_t)); - int keep = 1; + } + if (have_part) + continue; - memcpy(rstfile, curmatch, SIZEOF(find_result_t)); + for(curtape = needed_tapes; curtape; curtape = curtape->next) { + if (!strcmp(curtape->label, curmatch->label)) { + find_result_t *rsttemp = NULL; + find_result_t *rstfile; + int keep = 1; - havetape = 1; + havetape = 1; - for(rsttemp = curtape->files; + for(rsttemp = curtape->files; rsttemp; rsttemp=rsttemp->next){ - if(rstfile->filenum == rsttemp->filenum){ - fprintf(stderr, "Seeing multiple entries for tape " - "%s file " OFF_T_FMT ", using most recent\n", + if(curmatch->filenum == rsttemp->filenum){ + g_fprintf(stderr, _("Seeing multiple entries for tape " + "%s file %lld, using most recent\n"), curtape->label, - (OFF_T_FMT_TYPE)rstfile->filenum); - keep = 0; - } + (long long)curmatch->filenum); + keep = 0; } - if(!keep){ - amfree(rstfile); - break; - } - rstfile->next = curtape->files; - - if(curmatch->filenum < 1) curtape->isafile = 1; - else curtape->isafile = 0; - curtape->files = rstfile; + } + if(!keep){ break; } - } - if(!havetape){ - find_result_t *rstfile = alloc(SIZEOF(find_result_t)); - needed_tape_t *newtape = - alloc(SIZEOF(needed_tape_t)); + + rstfile = alloc(SIZEOF(find_result_t)); memcpy(rstfile, curmatch, SIZEOF(find_result_t)); - rstfile->next = NULL; - newtape->files = rstfile; - if(curmatch->filenum < 1) newtape->isafile = 1; - else newtape->isafile = 0; - newtape->label = curmatch->label; - if(needed_tapes){ - needed_tapes->prev->next = newtape; - newtape->prev = needed_tapes->prev; - needed_tapes->prev = newtape; - } - else{ - needed_tapes = newtape; - needed_tapes->prev = needed_tapes; - } - newtape->next = NULL; - numtapes++; -#if 0 -// free_find_result(rstfile); -#endif - } /* if(!havetape) */ + rstfile->next = curtape->files; + + if (curmatch->filenum < 1) + curtape->isafile = 1; + else curtape->isafile = 0; + curtape->files = rstfile; + break; + } + } + if (!havetape) { + find_result_t *rstfile = alloc(SIZEOF(find_result_t)); + needed_tape_t *newtape = alloc(SIZEOF(needed_tape_t)); + memcpy(rstfile, curmatch, SIZEOF(find_result_t)); + rstfile->next = NULL; + newtape->files = rstfile; + if(curmatch->filenum < 1) newtape->isafile = 1; + else newtape->isafile = 0; + newtape->label = curmatch->label; + if (needed_tapes){ + needed_tapes->prev->next = newtape; + newtape->prev = needed_tapes->prev; + needed_tapes->prev = newtape; + } else { + needed_tapes = newtape; + needed_tapes->prev = needed_tapes; + } + newtape->next = NULL; + numtapes++; + } /* if(!havetape) */ - } /* for(curmatch = matches ... */ - } /* for(me = match_list ... */ + } /* for(curmatch = matches ... */ if(numtapes == 0){ - fprintf(stderr, "No matching dumps found\n"); + g_fprintf(stderr, _("No matching dumps found\n")); exit(1); /* NOTREACHED */ } @@ -242,11 +242,11 @@ list_needed_tapes( find_result_t *curfind = NULL; for(curfind = curtape->files; curfind; curfind = curfind->next) { tapes = append_to_tapelist(tapes, curtape->label, - curfind->filenum, curtape->isafile); + curfind->filenum, -1, curtape->isafile); } } - fprintf(stderr, "%d tape(s) needed for restoration\n", numtapes); + g_fprintf(stderr, _("%d tape(s) needed for restoration\n"), numtapes); return(tapes); } @@ -263,26 +263,27 @@ main( { extern int optind; int opt; - char *errstr; - match_list_t *match_list = NULL; - match_list_t *me = NULL; + GSList *dumpspecs = NULL; int fd; - char *config_name = NULL; - char *conffile = NULL; tapelist_t *needed_tapes = NULL; char *e; - int arg_state; rst_flags_t *rst_flags; -#ifdef FORCE_USERID - struct passwd *pwent; -#endif - int new_argc, my_argc; - char **new_argv, **my_argv; + int minimum_arguments; + 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"); for(fd = 3; fd < (int)FD_SETSIZE; fd++) { /* * Make sure nobody spoofs us with a lot of extra open files - * that would cause an open we do to get a very high file + * that would cause a successful open to get a very high file * descriptor, which in turn might be used as an index into * an array (e.g. an fd_set). */ @@ -291,53 +292,20 @@ main( set_pname("amfetchdump"); - dbopen(DBG_SUBDIR_SERVER); - -#ifdef FORCE_USERID - - /* we'd rather not run as root */ - - if(client_uid == (uid_t) -1 && (pwent = getpwnam(CLIENT_LOGIN)) != NULL) { - client_uid = pwent->pw_uid; - client_gid = pwent->pw_gid; - endpwent(); - } - 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 */ - /* Don't die when child closes pipe */ signal(SIGPIPE, SIG_IGN); - erroutput_type = ERR_INTERACTIVE; - - onerror(errexit); - - parse_conf(argc, argv, &new_argc, &new_argv); - my_argc = new_argc; - my_argv = new_argv; + dbopen(DBG_SUBDIR_SERVER); - if(my_argc <= 1) { - usage(); - /*NOTREACHED*/ - } + erroutput_type = ERR_INTERACTIVE; + error_exit_status = 2; rst_flags = new_rst_flags(); rst_flags->wait_tape_prompt = 1; /* handle options */ - while( (opt = getopt(my_argc, my_argv, "alht:scCpb:nwi:d:O:")) != -1) { + cfg_ovr = new_config_overwrites(argc/2); + while( (opt = getopt(argc, argv, "alht:scCpb:nwi:d:O:o:")) != -1) { switch(opt) { case 'b': rst_flags->blocksize = (ssize_t)strtol(optarg, &e, 10); @@ -346,11 +314,11 @@ main( } else if(*e == 'm' || *e == 'M') { rst_flags->blocksize *= 1024 * 1024; } else if(*e != '\0') { - error("invalid blocksize value \"%s\"", optarg); + error(_("invalid blocksize value \"%s\""), optarg); /*NOTREACHED*/ } if(rst_flags->blocksize < DISK_BLOCK_BYTES) { - error("minimum block size is %dk", DISK_BLOCK_BYTES / 1024); + error(_("minimum block size is %dk"), DISK_BLOCK_BYTES / 1024); /*NOTREACHED*/ } break; @@ -361,7 +329,7 @@ main( rst_flags->compress = 1; rst_flags->comp_type = COMPRESS_BEST_OPT; break; - case 'p': rst_flags->pipe_to_fd = fileno(stdout); break; + case 'p': rst_flags->pipe_to_fd = STDOUT_FILENO; break; case 's': rst_flags->fsf = (off_t)0; break; case 'l': rst_flags->leave_comp = 1; break; case 'i': rst_flags->inventory_log = stralloc(optarg); break; @@ -369,6 +337,7 @@ main( case 'w': rst_flags->delay_assemble = 1; break; case 'a': rst_flags->wait_tape_prompt = 0; break; case 'h': rst_flags->headers = 1; break; + case 'o': add_config_overwrite_opt(cfg_ovr, optarg); break; default: usage(); /*NOTREACHED*/ @@ -381,14 +350,14 @@ main( rst_flags->inline_assemble = 0; rst_flags->leave_comp = 1; if(rst_flags->compress){ - error("Cannot force compression when doing inventory/search"); + error(_("Cannot force compression when doing inventory/search")); /*NOTREACHED*/ } - fprintf(stderr, "Doing inventory/search, dumps will not be uncompressed or assembled on-the-fly.\n"); + g_fprintf(stderr, _("Doing inventory/search, dumps will not be uncompressed or assembled on-the-fly.\n")); } else{ if(rst_flags->delay_assemble){ - fprintf(stderr, "Using -w, split dumpfiles will *not* be automatically uncompressed.\n"); + g_fprintf(stderr, _("Using -w, split dumpfiles will *not* be automatically uncompressed.\n")); } } @@ -398,128 +367,62 @@ main( /*NOTREACHED*/ } - config_name = my_argv[optind++]; - 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*/ + if (rst_flags->inventory_log) { + minimum_arguments = 1; + } else { + minimum_arguments = 2; } - amfree(conffile); - - dbrename(config_name, DBG_SUBDIR_SERVER); - - if((my_argc - optind) < 1 && !rst_flags->inventory_log){ - fprintf(stderr, "Not enough arguments\n\n"); + + if(argc - optind < minimum_arguments) { usage(); /*NOTREACHED*/ } -#define ARG_GET_HOST 0 -#define ARG_GET_DISK 1 -#define ARG_GET_DATE 2 -#define ARG_GET_LEVL 3 - - arg_state = ARG_GET_HOST; - while(optind < my_argc) { - switch(arg_state) { - case ARG_GET_HOST: - /* - * New host/disk/date/level set, so allocate a match_list. - */ - me = alloc(SIZEOF(*me)); - me->hostname = my_argv[optind++]; - me->diskname = ""; - me->datestamp = ""; - me->level = ""; - me->next = match_list; - match_list = me; - if(me->hostname[0] != '\0' - && (errstr=validate_regexp(me->hostname)) != NULL) { - fprintf(stderr, "%s: bad hostname regex \"%s\": %s\n", - get_pname(), me->hostname, errstr); - usage(); - /*NOTREACHED*/ - } - arg_state = ARG_GET_DISK; - break; - case ARG_GET_DISK: - me->diskname = my_argv[optind++]; - if(me->diskname[0] != '\0' - && (errstr=validate_regexp(me->diskname)) != NULL) { - fprintf(stderr, "%s: bad diskname regex \"%s\": %s\n", - get_pname(), me->diskname, errstr); - usage(); - /*NOTREACHED*/ - } - arg_state = ARG_GET_DATE; - break; - case ARG_GET_DATE: - me->datestamp = my_argv[optind++]; - if(me->datestamp[0] != '\0' - && (errstr=validate_regexp(me->datestamp)) != NULL) { - fprintf(stderr, "%s: bad datestamp regex \"%s\": %s\n", - get_pname(), me->datestamp, errstr); - usage(); - /*NOTREACHED*/ - } - arg_state = ARG_GET_LEVL; - break; - case ARG_GET_LEVL: - me->level = my_argv[optind++]; - if(me->level[0] != '\0' - && (errstr=validate_regexp(me->level)) != NULL) { - fprintf(stderr, "%s: bad level regex \"%s\": %s\n", - get_pname(), me->level, errstr); - usage(); - /*NOTREACHED*/ - } - arg_state = ARG_GET_HOST; - break; - } - } + config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL, argv[optind++]); + apply_config_overwrites(cfg_ovr); - /* XXX I don't think this can happen */ - if(match_list == NULL && !rst_flags->inventory_log) { - match_list = alloc(SIZEOF(*match_list)); - match_list->hostname = ""; - match_list->diskname = ""; - match_list->datestamp = ""; - match_list->level = ""; - match_list->next = NULL; - } + check_running_as(RUNNING_AS_DUMPUSER); + + dbrename(config_name, DBG_SUBDIR_SERVER); + + dumpspecs = cmdline_parse_dumpspecs(argc - optind, argv + optind, + CMDLINE_PARSE_DATESTAMP | + CMDLINE_PARSE_LEVEL | + CMDLINE_EMPTY_TO_WILDCARD); /* * We've been told explicitly to go and search through the tapes the hard * way. */ if(rst_flags->inventory_log){ - fprintf(stderr, "Beginning tape-by-tape search.\n"); - search_tapes(stderr, stdin, 1, NULL, match_list, rst_flags, NULL); + g_fprintf(stderr, _("Beginning tape-by-tape search.\n")); + search_tapes(stderr, stdin, rst_flags->alt_tapedev == NULL, + NULL, dumpspecs, rst_flags, NULL); exit(0); } /* Decide what tapes we'll need */ - needed_tapes = list_needed_tapes(match_list); + needed_tapes = list_needed_tapes(dumpspecs, + rst_flags->pipe_to_fd == STDOUT_FILENO); parent_pid = getpid(); atexit(cleanup); get_lock = lock_logfile(); /* config is loaded, should be ok here */ if(get_lock == 0) { - error("%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"), rst_conf_logfile); } - search_tapes(NULL, stdin, 1, needed_tapes, match_list, rst_flags, NULL); + search_tapes(NULL, stdin, rst_flags->alt_tapedev == NULL, + needed_tapes, dumpspecs, rst_flags, NULL); cleanup(); - free_match_list(match_list); + dumpspec_list_free(dumpspecs); if(rst_flags->inline_assemble || rst_flags->delay_assemble) flush_open_outputs(1, NULL); else flush_open_outputs(0, NULL); free_rst_flags(rst_flags); - free_new_argv(new_argc, new_argv); return(0); } diff --git a/restore-src/amidxtaped.c b/restore-src/amidxtaped.c index 2e7492c..7b82c68 100644 --- a/restore-src/amidxtaped.c +++ b/restore-src/amidxtaped.c @@ -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 @@ 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 @@ 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); @@ -125,7 +123,7 @@ get_client_line(FILE *in) */ strappend(line, "\n"); } - dbprintf(("%s: > %s\n", debug_prefix_time(NULL), line)); + dbprintf("> %s\n", line); return line; } @@ -153,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; } @@ -162,7 +160,7 @@ get_client_line_fd( 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 @@ void 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*/ } @@ -214,19 +211,19 @@ check_security_buffer( 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 @@ 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; @@ -252,9 +249,16 @@ main( 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(); @@ -320,42 +324,22 @@ main( (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*/ @@ -390,39 +374,32 @@ main( 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); @@ -445,9 +422,9 @@ main( 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); } @@ -455,22 +432,23 @@ main( 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; } } @@ -485,20 +463,14 @@ main( } 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, @@ -507,20 +479,34 @@ main( 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(); @@ -528,7 +514,7 @@ main( /* 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 */ @@ -556,23 +542,22 @@ main( 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*/ } @@ -587,8 +572,7 @@ main( 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); @@ -597,11 +581,11 @@ main( (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); } @@ -610,14 +594,14 @@ main( 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); @@ -627,11 +611,7 @@ main( 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 --git a/restore-src/amrestore.c b/restore-src/amrestore.c index d0a6435..0e1b4b6 100644 --- a/restore-src/amrestore.c +++ b/restore-src/amrestore.c @@ -24,7 +24,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: amrestore.c,v 1.63 2006/07/25 18:58:10 martinea Exp $ + * $Id: amrestore.c 6512 2007-05-24 17:00:24Z ian $ * * retrieves files from an amanda tape */ @@ -40,34 +40,14 @@ #include "amanda.h" #include "util.h" -#include "tapeio.h" #include "fileheader.h" #include "restore.h" +#include "conffile.h" +#include "device.h" +#include "cmdline.h" #define CREAT_MODE 0640 -static off_t file_number; -static pid_t comp_enc_pid = -1; -static int tapedev; -static off_t filefsf = (off_t)-1; - -/* local functions */ - -static void errexit(void); -static void usage(void); -int main(int argc, char **argv); - -/* - * Do exit(2) after an error, rather than exit(1). - */ - -static void -errexit(void) -{ - exit(2); -} - - /* * Print usage message and terminate. */ @@ -75,12 +55,85 @@ errexit(void) static void usage(void) { - error("Usage: amrestore [-b blocksize] [-r|-c] [-p] [-h] [-f fileno] " + error(_("Usage: amrestore [-b blocksize] [-r|-c] [-p] [-h] [-f fileno] " "[-l label] tape-device|holdingfile [hostname [diskname [datestamp " - "[hostname [diskname [datestamp ... ]]]]]]"); + "[hostname [diskname [datestamp ... ]]]]]]")); /*NOTREACHED*/ } +/* Checks if the given tape device is actually a holding disk file. We + accomplish this by stat()ing the file; if it is a regular file, we + assume (somewhat dangerously) that it's a holding disk file. If + it doesn't exist or is not a regular file, we assume it's a device + name. + + Returns TRUE if we suspect the device is a holding disk, FALSE + otherwise. */ +static gboolean check_device_type(char * device_name) { + struct stat stat_buf; + int result; + + result = stat(device_name, &stat_buf); + + return !((result != 0 || !S_ISREG(stat_buf.st_mode))); +} + +static void handle_holding_disk_restore(char * filename, rst_flags_t * flags, + GSList * dumpspecs) { + dumpfile_t this_header; + tapelist_t this_disk; + + bzero(&this_disk, sizeof(this_disk)); + this_disk.label = filename; + + if (!restore_holding_disk(stderr, flags, NULL, &this_disk, NULL, + dumpspecs, &this_header, NULL)) { + g_fprintf(stderr, "%s did not match requested host.\n", filename); + return; + } +} + +static void handle_tape_restore(char * device_name, rst_flags_t * flags, + GSList * dumpspecs, char * check_label) { + Device * device; + ReadLabelStatusFlags read_label_status; + + dumpfile_t first_restored_file; + + device_api_init(); + + fh_init(&first_restored_file); + + device = device_open(device_name); + if (device == NULL) { + error("Could not open device.\n"); + } + + device_set_startup_properties_from_config(device); + read_label_status = device_read_label(device); + if (read_label_status != READ_LABEL_STATUS_SUCCESS) { + char * errstr = + g_english_strjoinv_and_free + (g_flags_nick_to_strv(read_label_status, + READ_LABEL_STATUS_FLAGS_TYPE), "or"); + error("Error reading volume label: %s.\n", errstr); + } + + g_assert(device->volume_label != NULL); + + if (!device_start(device, ACCESS_READ, NULL, NULL)) { + error("Could not open device %s for reading.\n", device_name); + } + + if (check_label != NULL && strcmp(check_label, + device->volume_label) != 0) { + error("Wrong label: Expected %s, found %s.\n", + check_label, device->volume_label); + } + + search_a_tape(device, stderr, flags, NULL, NULL, dumpspecs, + NULL, &first_restored_file, 0, NULL); +} /* * Parses command line, then loops through all files on tape, restoring @@ -94,29 +147,23 @@ main( { extern int optind; int opt; - char *errstr; - int isafile; - struct stat stat_tape; - dumpfile_t file; - char *filename = NULL; + int holding_disk_mode; char *tapename = NULL; - struct match_list { - char *hostname; - char *diskname; - char *datestamp; - struct match_list *next; - } *match_list = NULL, *me = NULL; - int found_match; - int arg_state; - amwait_t compress_status; - int r = 0; char *e; - char *err; char *label = NULL; rst_flags_t *rst_flags; - int count_error; long tmplong; - ssize_t read_result; + GSList *dumpspecs; + 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); @@ -128,14 +175,14 @@ main( signal(SIGPIPE, SIG_IGN); erroutput_type = ERR_INTERACTIVE; - - onerror(errexit); + error_exit_status = 2; rst_flags = new_rst_flags(); rst_flags->inline_assemble = 0; + cfg_ovr = new_config_overwrites(argc/2); /* handle options */ - while( (opt = getopt(argc, argv, "b:cCd:rphf:l:")) != -1) { + while( (opt = getopt(argc, argv, "b:cCd:rphf:l:o:")) != -1) { switch(opt) { case 'b': tmplong = strtol(optarg, &e, 10); @@ -145,21 +192,18 @@ main( } else if(*e == 'm' || *e == 'M') { rst_flags->blocksize *= 1024 * 1024; } else if(*e != '\0') { - error("invalid rst_flags->blocksize value \"%s\"", optarg); + error(_("invalid blocksize value \"%s\""), optarg); /*NOTREACHED*/ } if(rst_flags->blocksize < DISK_BLOCK_BYTES) { - error("minimum block size is %dk", DISK_BLOCK_BYTES / 1024); - /*NOTREACHED*/ - } - if(rst_flags->blocksize > MAX_TAPE_BLOCK_KB * 1024) { - fprintf(stderr,"maximum block size is %dk, using it\n", - MAX_TAPE_BLOCK_KB); - rst_flags->blocksize = MAX_TAPE_BLOCK_KB * 1024; + error(_("minimum block size is %dk"), DISK_BLOCK_BYTES / 1024); /*NOTREACHED*/ } break; case 'c': rst_flags->compress = 1; break; + case 'o': + add_config_overwrite_opt(cfg_ovr, optarg); + break; case 'C': rst_flags->compress = 1; rst_flags->comp_type = COMPRESS_BEST_OPT; @@ -167,13 +211,12 @@ main( case 'r': rst_flags->raw = 1; break; case 'p': rst_flags->pipe_to_fd = fileno(stdout); break; case 'h': rst_flags->headers = 1; break; - case 'f': - filefsf = (off_t)OFF_T_STRTOL(optarg, &e, 10); + case 'f': rst_flags->fsf = (off_t)OFF_T_STRTOL(optarg, &e, 10); /*@ignore@*/ if(*e != '\0') { - error("invalid fileno value \"%s\"", optarg); - /*NOTREACHED*/ - } + error(_("invalid fileno value \"%s\""), optarg); + g_assert_not_reached(); + } /*@end@*/ break; case 'l': @@ -184,249 +227,48 @@ main( } } + /* initialize a generic configuration without reading anything */ + config_init(CONFIG_INIT_CLIENT, NULL); + apply_config_overwrites(cfg_ovr); + if(rst_flags->compress && rst_flags->raw) { - fprintf(stderr, - "Cannot specify both -r (raw) and -c (compressed) output.\n"); + g_fprintf(stderr, + _("Cannot specify both -r (raw) and -c (compressed) output.\n")); usage(); } if(optind >= argc) { - fprintf(stderr, "%s: Must specify tape-device or holdingfile\n", + g_fprintf(stderr, _("%s: Must specify tape-device or holdingfile\n"), get_pname()); usage(); } tapename = argv[optind++]; -#define ARG_GET_HOST 0 -#define ARG_GET_DISK 1 -#define ARG_GET_DATE 2 - - arg_state = ARG_GET_HOST; - while(optind < argc) { - switch(arg_state) { - case ARG_GET_HOST: - /* - * This is a new host/disk/date triple, so allocate a match_list. - */ - me = alloc(SIZEOF(*me)); - me->hostname = argv[optind++]; - me->diskname = ""; - me->datestamp = ""; - me->next = match_list; - match_list = me; - if(me->hostname[0] != '\0' - && (errstr=validate_regexp(me->hostname)) != NULL) { - fprintf(stderr, "%s: bad hostname regex \"%s\": %s\n", - get_pname(), me->hostname, errstr); - usage(); - } - arg_state = ARG_GET_DISK; - break; - case ARG_GET_DISK: - me->diskname = argv[optind++]; - if(me->diskname[0] != '\0' - && (errstr=validate_regexp(me->diskname)) != NULL) { - fprintf(stderr, "%s: bad diskname regex \"%s\": %s\n", - get_pname(), me->diskname, errstr); - usage(); - } - arg_state = ARG_GET_DATE; - break; - case ARG_GET_DATE: - me->datestamp = argv[optind++]; - if(me->datestamp[0] != '\0' - && (errstr=validate_regexp(me->datestamp)) != NULL) { - fprintf(stderr, "%s: bad datestamp regex \"%s\": %s\n", - get_pname(), me->datestamp, errstr); - usage(); - } - arg_state = ARG_GET_HOST; - break; - } - } - if(match_list == NULL) { - match_list = alloc(SIZEOF(*match_list)); - match_list->hostname = ""; - match_list->diskname = ""; - match_list->datestamp = ""; - match_list->next = NULL; - } + dumpspecs = cmdline_parse_dumpspecs(argc - optind, argv + optind, + CMDLINE_PARSE_DATESTAMP | + CMDLINE_EMPTY_TO_WILDCARD); - if(tape_stat(tapename,&stat_tape)!=0) { - error("could not stat %s: %s", tapename, strerror(errno)); - /*NOTREACHED*/ - } - isafile=S_ISREG((stat_tape.st_mode)); + holding_disk_mode = check_device_type(tapename); - if(label) { - if(isafile) { - fprintf(stderr,"%s: ignoring -l flag when restoring from a file.\n", + if (holding_disk_mode) { + if (label) { + g_fprintf(stderr,_("%s: ignoring -l flag when restoring from a file.\n"), get_pname()); - } - else { - if((err = tape_rewind(tapename)) != NULL) { - error("Could not rewind device '%s': %s", tapename, err); - /*NOTREACHED*/ - } - if ((tapedev = tape_open(tapename, 0)) == -1) {; - error("Could not open device '%s': %s", tapename, err); - /*NOTREACHED*/ - } - read_file_header(&file, tapedev, isafile, rst_flags); - if(file.type != F_TAPESTART) { - fprintf(stderr,"Not an amanda tape\n"); - exit (1); - } - if(strcmp(label, file.name) != 0) { - fprintf(stderr,"Wrong label: '%s'\n", file.name); - exit (1); - } - tapefd_close(tapedev); - if((err = tape_rewind(tapename)) != NULL) { - error("Could not rewind device '%s': %s", tapename, err); - /*NOTREACHED*/ - } - } - } - file_number = (off_t)0; - if(filefsf != (off_t)-1) { - if(isafile) { - fprintf(stderr,"%s: ignoring -f flag when restoring from a file.\n", + } + + if (rst_flags->fsf > 0) { + g_fprintf(stderr, + "%s: ignoring -f flag when restoring from a file.\n", get_pname()); - } - else { - if((err = tape_rewind(tapename)) != NULL) { - error("Could not rewind device '%s': %s", tapename, err); - /*NOTREACHED*/ - } - if((err = tape_fsf(tapename, filefsf)) != NULL) { - error("Could not fsf device '%s': %s", tapename, err); - /*NOTREACHED*/ - } - file_number = filefsf; - } - } + } - if(isafile) { - tapedev = open(tapename, O_RDWR); + handle_holding_disk_restore(tapename, rst_flags, dumpspecs); } else { - tapedev = tape_open(tapename, 0); - } - if(tapedev < 0) { - error("could not open %s: %s", tapename, strerror(errno)); - /*NOTREACHED*/ - } - - read_result = read_file_header(&file, tapedev, isafile, rst_flags); - if(file.type != F_TAPESTART && !isafile && filefsf == (off_t)-1) { - fprintf(stderr, "%s: WARNING: not at start of tape, file numbers will be offset\n", - get_pname()); + handle_tape_restore(tapename, rst_flags, dumpspecs, label); } - count_error = 0; - while(count_error < 10) { - if(file.type == F_TAPEEND) break; - found_match = 0; - if(file.type == F_DUMPFILE || file.type == F_SPLIT_DUMPFILE) { - amfree(filename); - filename = make_filename(&file); - for(me = match_list; me; me = me->next) { - if(disk_match(&file,me->datestamp,me->hostname,me->diskname,"") != 0) { - found_match = 1; - break; - } - } - fprintf(stderr, "%s: " OFF_T_FMT ": %s ", - get_pname(), - (OFF_T_FMT_TYPE)file_number, - found_match ? "restoring" : "skipping"); - if(file.type != F_DUMPFILE && file.type != F_SPLIT_DUMPFILE) { - print_header(stderr, &file); - } else { - fprintf(stderr, "%s\n", filename); - } - } - if(found_match) { - count_error=0; - read_result = restore(&file, filename, - tapedev, isafile, rst_flags); - if(comp_enc_pid > 0) { - waitpid(comp_enc_pid, &compress_status, 0); - comp_enc_pid = -1; - } - if(rst_flags->pipe_to_fd != -1) { - file_number++; /* for the last message */ - break; - } - } - if(isafile) { - break; - } - /* - * Note that at this point we know we are working with a tape, - * not a holding disk file, so we can call the tape functions - * without checking. - */ - if(read_result == 0) { - /* - * If the last read got EOF, how to get to the next - * file depends on how the tape device driver is acting. - * If it is BSD-like, we do not really need to do anything. - * If it is Sys-V-like, we need to either fsf or close/open. - * The good news is, a close/open works in either case, - * so that's what we do. - */ - tapefd_close(tapedev); - if((tapedev = tape_open(tapename, 0)) < 0) { - error("could not open %s: %s", tapename, strerror(errno)); - /*NOTREACHED*/ - } - count_error++; - } else { - /* - * If the last read got something (even an error), we can - * do an fsf to get to the next file. - */ - if(tapefd_fsf(tapedev, (off_t)1) < 0) { - error("could not fsf %s: %s", tapename, strerror(errno)); - /*NOTREACHED*/ - } - count_error=0; - } - file_number++; - read_result = read_file_header(&file, tapedev, isafile, rst_flags); - } - if(isafile) { - close(tapedev); - } else { - /* - * See the notes above about advancing to the next file. - */ - if(read_result == 0) { - tapefd_close(tapedev); - if((tapedev = tape_open(tapename, 0)) < 0) { - error("could not open %s: %s", tapename, strerror(errno)); - /*NOTREACHED*/ - } - } else { - if(tapefd_fsf(tapedev, (off_t)1) < 0) { - error("could not fsf %s: %s", tapename, strerror(errno)); - /*NOTREACHED*/ - } - } - tapefd_close(tapedev); - } + dumpspec_list_free(dumpspecs); - if((read_result <= 0 || file.type == F_TAPEEND) && !isafile) { - fprintf(stderr, "%s: " OFF_T_FMT ": reached ", - get_pname(), (OFF_T_FMT_TYPE)file_number); - if(read_result <= 0) { - fprintf(stderr, "end of information\n"); - } else { - print_header(stderr,&file); - } - r = 1; - } - return r; + return 0; } diff --git a/restore-src/restore.c b/restore-src/restore.c index 9cede42..130d08e 100644 --- a/restore-src/restore.c +++ b/restore-src/restore.c @@ -24,13 +24,12 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: restore.c,v 1.52 2006/08/23 11:41:54 martinea Exp $ + * $Id: restore.c 6512 2007-05-24 17:00:24Z ian $ * * retrieves files from an amanda tape */ #include "amanda.h" -#include "tapeio.h" #include "util.h" #include "restore.h" #include "find.h" @@ -38,24 +37,35 @@ #include "logfile.h" #include "fileheader.h" #include "arglist.h" +#include "cmdline.h" #include +#include -#define LOAD_STOP -1 -#define LOAD_CHANGER -2 +#include +#include +#include + +typedef enum { + LOAD_NEXT = 1, /* An unknown new slot has been loaded. */ + LOAD_CHANGER = -2, /* The requested slot has been loaded. */ + LOAD_STOP = -1, /* The search is complete. */ +} LoadStatus; + +typedef enum { + RESTORE_STATUS_NEXT_FILE, + RESTORE_STATUS_NEXT_TAPE, + RESTORE_STATUS_STOP +} RestoreFileStatus; int file_number; /* stuff we're stuck having global */ -static size_t blocksize = (size_t)SSIZE_MAX; -static char *cur_tapedev = NULL; -static char *searchlabel = NULL; static int backwards; static int exitassemble = 0; -static int tapefd; char *rst_conf_logdir = NULL; char *rst_conf_logfile = NULL; -char *curslot = NULL; +static char *curslot = NULL; typedef struct open_output_s { struct open_output_s *next; @@ -70,43 +80,39 @@ typedef struct dumplist_s { dumpfile_t *file; } dumplist_t; -typedef struct seentapes_s { +struct seentapes_s { struct seentapes_s *next; char *slotstr; char *label; dumplist_t *files; -} seentapes_t; +}; static open_output_t *open_outputs = NULL; static dumplist_t *alldumps_list = NULL; /* local functions */ -static ssize_t get_block(int tapefd, char *buffer, int isafile); static void append_file_to_fd(char *filename, int fd); static int headers_equal(dumpfile_t *file1, dumpfile_t *file2, int ignore_partnums); static int already_have_dump(dumpfile_t *file); static void handle_sigint(int sig); static int scan_init(void *ud, int rc, int ns, int bk, int s); +static Device * conditional_device_open(char * tapedev, FILE * orompt_out, + rst_flags_t * flags, + am_feature_t * their_features, + tapelist_t * desired_tape); int loadlabel_slot(void *ud, int rc, char *slotstr, char *device); -void drain_file(int tapefd, rst_flags_t *flags); char *label_of_current_slot(char *cur_tapedev, FILE *prompt_out, int *tapefd, dumpfile_t *file, rst_flags_t *flags, am_feature_t *their_features, ssize_t *read_result, tapelist_t *desired_tape); -int load_next_tape(char **cur_tapedev, FILE *prompt_out, int backwards, +LoadStatus load_next_tape(char **cur_tapedev, FILE *prompt_out, int backwards, rst_flags_t *flags, am_feature_t *their_features, tapelist_t *desired_tape); -int load_manual_tape(char **cur_tapedev, FILE *prompt_out, FILE *prompt_in, +LoadStatus load_manual_tape(char **cur_tapedev, FILE *prompt_out, FILE *prompt_in, rst_flags_t *flags, am_feature_t *their_features, tapelist_t *desired_tape); -void search_a_tape(char *cur_tapedev, FILE *prompt_out, rst_flags_t *flags, - am_feature_t *their_features, tapelist_t *desired_tape, - int isafile, match_list_t *match_list, - seentapes_t *tape_seen, dumpfile_t *file, - dumpfile_t *prev_rst_file, dumpfile_t *tapestart, - int slot_num, ssize_t *read_result); /* * We might want to flush any open dumps and unmerged splits before exiting @@ -126,16 +132,11 @@ handle_sigint( int lock_logfile(void) { - rst_conf_logdir = getconf_str(CNF_LOGDIR); - if (*rst_conf_logdir == '/') { - rst_conf_logdir = stralloc(rst_conf_logdir); - } else { - rst_conf_logdir = stralloc2(config_dir, rst_conf_logdir); - } + rst_conf_logdir = config_dir_relative(getconf_str(CNF_LOGDIR)); rst_conf_logfile = vstralloc(rst_conf_logdir, "/log", NULL); if (access(rst_conf_logfile, F_OK) == 0) { - dbprintf(("%s exists: amdump or amflush is already running, " - "or you must run amcleanup\n", rst_conf_logfile)); + dbprintf(_("%s exists: amdump or amflush is already running, " + "or you must run amcleanup\n"), rst_conf_logfile); return 0; } log_add(L_INFO, get_pname()); @@ -191,73 +192,34 @@ already_have_dump( static void append_file_to_fd( char * filename, - int fd) + int write_fd) { - ssize_t bytes_read; - ssize_t s; - off_t wc = (off_t)0; - char *buffer; + int read_fd; - if(blocksize == SIZE_MAX) - blocksize = DISK_BLOCK_BYTES; - buffer = alloc(blocksize); - - if((tapefd = open(filename, O_RDONLY)) == -1) { - error("can't open %s: %s", filename, strerror(errno)); + read_fd = robust_open(filename, O_RDONLY, 0); + if (read_fd < 0) { + error(_("can't open %s: %s"), filename, strerror(errno)); /*NOTREACHED*/ } - for (;;) { - bytes_read = get_block(tapefd, buffer, 1); /* same as isafile = 1 */ - if(bytes_read < 0) { - error("read error: %s", strerror(errno)); - /*NOTREACHED*/ - } - - if (bytes_read == 0) - break; - - s = fullwrite(fd, buffer, (size_t)bytes_read); - if (s < bytes_read) { - fprintf(stderr,"Error (%s) offset " OFF_T_FMT "+" OFF_T_FMT ", wrote " OFF_T_FMT "\n", - strerror(errno), (OFF_T_FMT_TYPE)wc, - (OFF_T_FMT_TYPE)bytes_read, (OFF_T_FMT_TYPE)s); - if (s < 0) { - if((errno == EPIPE) || (errno == ECONNRESET)) { - error("%s: pipe reader has quit in middle of file.", - get_pname()); - /*NOTREACHED*/ - } - error("restore: write error = %s", strerror(errno)); - /*NOTREACHED*/ - } - error("Short write: wrote " SSIZE_T_FMT " bytes expected " SSIZE_T_FMT ".", s, bytes_read); - /*NOTREACHCED*/ - } - wc += (off_t)bytes_read; + if (!do_consumer_producer_queue(fd_read_producer, GINT_TO_POINTER(read_fd), + fd_write_consumer, + GINT_TO_POINTER(write_fd))) { + error("Error copying data from file \"%s\" to fd %d.\n", + filename, write_fd); + g_assert_not_reached(); } - amfree(buffer); - aclose(tapefd); + aclose(read_fd); } -/* - * Tape changer support routines, stolen brazenly from amtape - */ +/* A user_init function for changer_find(). See changer.h for + documentation. */ static int -scan_init( - void * ud, - int rc, - int ns, - int bk, - int s) -{ - (void)ud; /* Quiet unused parameter warning */ - (void)ns; /* Quiet unused parameter warning */ - (void)s; /* Quiet unused parameter warning */ - +scan_init(G_GNUC_UNUSED void * ud, int rc, G_GNUC_UNUSED int ns, + int bk, G_GNUC_UNUSED int s) { if(rc) { - error("could not get changer info: %s", changer_resultstr); + error(_("could not get changer info: %s"), changer_resultstr); /*NOTREACHED*/ } backwards = bk; @@ -265,63 +227,91 @@ scan_init( return 0; } +typedef struct { + char ** cur_tapedev; + char * searchlabel; +} loadlabel_data; + +/* DANGER WILL ROBINSON: This function references globals: + char * curslot; + */ int -loadlabel_slot( - void * ud, - int rc, - char * slotstr, - char * device) +loadlabel_slot(void * datap, + int rc, + char * slotstr, + char * device_name) { - char *errstr; - char *datestamp = NULL; - char *label = NULL; + loadlabel_data * data = (loadlabel_data*)datap; + Device * device; + ReadLabelStatusFlags label_status; - (void)ud; /* Quiet unused parameter warning */ + g_return_val_if_fail(rc > 1 || device_name != NULL, 0); + g_return_val_if_fail(slotstr != NULL, 0); + + amfree(curslot); if(rc > 1) { - error("could not load slot %s: %s", slotstr, changer_resultstr); - /*NOTREACHED*/ - } else if(rc == 1) { - fprintf(stderr, "%s: slot %s: %s\n", + error(_("could not load slot %s: %s"), slotstr, changer_resultstr); + g_assert_not_reached(); + } + + if(rc == 1) { + g_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 { - if(strlen(datestamp)>8) - fprintf(stderr, "%s: slot %s: date %-14s label %s", - get_pname(), slotstr, datestamp, label); - 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); - } - amfree(cur_tapedev); - curslot = newstralloc(curslot, slotstr); - amfree(datestamp); - amfree(label); - if(device) - cur_tapedev = stralloc(device); - return 1; - } + return 0; + } + + device = device_open(device_name); + if (device == NULL) { + g_fprintf(stderr, "%s: slot %s: Could not open device.\n", + get_pname(), slotstr); + return 0; } - amfree(datestamp); - amfree(label); - amfree(cur_tapedev); - curslot = newstralloc(curslot, slotstr); - if(!device) return(1); - cur_tapedev = stralloc(device); + 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 %s: Error reading tape label:\n" + "%s: slot %s: %s\n", + get_pname(), slotstr, get_pname(), slotstr, errstr); + g_object_unref(device); + return 0; + } - return 0; + g_assert(device->volume_label != NULL); + if (device->volume_label == NULL) { + g_fprintf(stderr, "%s: slot %s: Could not read tape label.\n", + get_pname(), slotstr); + g_object_unref(device); + return 0; + } + + if (!device_start(device, ACCESS_READ, NULL, NULL)) { + g_fprintf(stderr, "%s: slot %s: Could not open device for reading.\n", + get_pname(), slotstr); + return 0; + } + + g_fprintf(stderr, "%s: slot %s: time %-14s label %s", + get_pname(), slotstr, device->volume_time, device->volume_label); + + if(strcmp(device->volume_label, data->searchlabel) != 0) { + g_fprintf(stderr, " (wrong tape)\n"); + g_object_unref(device); + return 0; + } + + g_fprintf(stderr, " (exact label match)\n"); + + g_object_unref(device); + curslot = newstralloc(curslot, slotstr); + amfree(*(data->cur_tapedev)); + *(data->cur_tapedev) = stralloc(device_name); + return 1; } @@ -389,7 +379,7 @@ flush_open_outputs( amwait_t compress_status; if(!only_file){ - fprintf(stderr, "\n"); + g_fprintf(stderr, "\n"); } /* @@ -421,7 +411,7 @@ flush_open_outputs( if(cur_file->partnum < 1) cur_find_res->partnum = stralloc("--"); else{ char part_str[NUM_STR_SIZE]; - snprintf(part_str, SIZEOF(part_str), "%d", cur_file->partnum); + g_snprintf(part_str, SIZEOF(part_str), "%d", cur_file->partnum); cur_find_res->partnum = stralloc(part_str); } cur_find_res->user_ptr = (void*)cur_out; @@ -458,11 +448,11 @@ flush_open_outputs( cur_filename = make_filename(cur_file); main_filename = make_filename(main_file); - fprintf(stderr, "Merging %s with %s\n", + g_fprintf(stderr, _("Merging %s with %s\n"), cur_filename, main_filename); append_file_to_fd(cur_filename, outfd); if(unlink(cur_filename) < 0){ - fprintf(stderr, "Failed to unlink %s: %s\n", + g_fprintf(stderr, _("Failed to unlink %s: %s\n"), cur_filename, strerror(errno)); } amfree(cur_filename); @@ -479,7 +469,7 @@ flush_open_outputs( char *cur_filename = make_filename(cur_file); open(cur_filename, O_RDWR|O_APPEND); if (outfd < 0) { - error("Couldn't open %s for appending: %s", + error(_("Couldn't open %s for appending: %s"), cur_filename, strerror(errno)); /*NOTREACHED*/ } @@ -541,21 +531,21 @@ make_filename( char *pad = NULL; size_t padlen = 0; - snprintf(number, SIZEOF(number), "%d", file->dumplevel); - snprintf(part, SIZEOF(part), "%d", file->partnum); + g_snprintf(number, SIZEOF(number), "%d", file->dumplevel); + g_snprintf(part, SIZEOF(part), "%d", file->partnum); if(file->totalparts < 0) { - snprintf(totalparts, SIZEOF(totalparts), "UNKNOWN"); + g_snprintf(totalparts, SIZEOF(totalparts), "UNKNOWN"); } else { - snprintf(totalparts, SIZEOF(totalparts), "%d", file->totalparts); + g_snprintf(totalparts, SIZEOF(totalparts), "%d", file->totalparts); } padlen = strlen(totalparts) + 1 - strlen(part); pad = alloc(padlen); memset(pad, '0', padlen); pad[padlen - 1] = '\0'; - snprintf(part, SIZEOF(part), "%s%d", pad, file->partnum); + g_snprintf(part, SIZEOF(part), "%s%d", pad, file->partnum); sfn = sanitise_filename(file->disk); fn = vstralloc(file->name, @@ -574,32 +564,19 @@ make_filename( return fn; } - -/* - * XXX Making this thing a lib functiong broke a lot of assumptions everywhere, - * but I think I've found them all. Maybe. Damn globals all over the place. - */ - -static ssize_t -get_block( - int tapefd, - char * buffer, - int isafile) -{ - if(isafile) - return (fullread(tapefd, buffer, blocksize)); - - return(tapefd_read(tapefd, buffer, blocksize)); -} - -/* - * Returns 1 if the current dump file matches the hostname and diskname +/* Returns 1 if the dump file matches the hostname and diskname * regular expressions given on the command line, 0 otherwise. As a - * special case, empty regexs are considered equivalent to ".*": they - * match everything. + * special case, empty regexs and NULLs are considered equivalent to + * ".*": they match everything. + * + * @param file: the file to examine + * @param datestamp: the datestamp regex, or NULL for any + * @param hostname: the hostname regex, or NULL for any + * @param diskname: the diskname regex, or NULL for any + * @param level: the level regex, or NULL for any + * @returns: 1 if the dump file matches */ - -int +static int disk_match( dumpfile_t *file, char * datestamp, @@ -608,84 +585,62 @@ disk_match( char * level) { char level_str[NUM_STR_SIZE]; - snprintf(level_str, SIZEOF(level_str), "%d", file->dumplevel); + g_snprintf(level_str, SIZEOF(level_str), "%d", file->dumplevel); if(file->type != F_DUMPFILE && file->type != F_SPLIT_DUMPFILE) return 0; - if((*hostname == '\0' || match_host(hostname, file->name)) && - (*diskname == '\0' || match_disk(diskname, file->disk)) && - (*datestamp == '\0' || match_datestamp(datestamp, file->datestamp)) && - (*level == '\0' || match_level(level, level_str))) + if((!hostname || *hostname == '\0' || match_host(hostname, file->name)) && + (!diskname || *diskname == '\0' || match_disk(diskname, file->disk)) && + (!datestamp || *datestamp == '\0' || match_datestamp(datestamp, file->datestamp)) && + (!level || *level == '\0' || match_level(level, level_str))) return 1; else return 0; } - /* - * Reads the first block of a tape file. + * Reads the first block of a holding disk file. */ -ssize_t -read_file_header( - dumpfile_t * file, - int tapefd, - int isafile, - rst_flags_t * flags) +static gboolean +read_holding_disk_header( + dumpfile_t * file, + int tapefd, + rst_flags_t * flags) { ssize_t bytes_read; char *buffer; - + size_t blocksize; + if(flags->blocksize > 0) - blocksize = (size_t)flags->blocksize; - else if(blocksize == (size_t)SSIZE_MAX) - blocksize = DISK_BLOCK_BYTES; + blocksize = (size_t)flags->blocksize; + else + blocksize = DISK_BLOCK_BYTES; buffer = alloc(blocksize); - bytes_read = get_block(tapefd, buffer, isafile); + bytes_read = fullread(tapefd, buffer, blocksize); if(bytes_read < 0) { - fprintf(stderr, "%s: error reading file header: %s\n", + g_fprintf(stderr, _("%s: error reading file header: %s\n"), get_pname(), strerror(errno)); file->type = F_UNKNOWN; } else if((size_t)bytes_read < DISK_BLOCK_BYTES) { if(bytes_read == 0) { - fprintf(stderr, "%s: missing file header block\n", get_pname()); + g_fprintf(stderr, _("%s: missing file header block\n"), get_pname()); } else { - fprintf(stderr, "%s: short file header block: " OFF_T_FMT " byte%s\n", - get_pname(), (OFF_T_FMT_TYPE)bytes_read, (bytes_read == 1) ? "" : "s"); + g_fprintf(stderr, + plural(_("%s: short file header block: %zd byte"), + _("%s: short file header block: %zd bytes\n"), + bytes_read), + get_pname(), (size_t)bytes_read); } file->type = F_UNKNOWN; } else { - parse_file_header(buffer, file, (size_t)bytes_read); + parse_file_header(buffer, file, (size_t)bytes_read); } amfree(buffer); - return bytes_read; -} - - -void -drain_file( - int tapefd, - rst_flags_t * flags) -{ - ssize_t bytes_read; - char *buffer; - - if(flags->blocksize) - blocksize = (size_t)flags->blocksize; - else if(blocksize == (size_t)SSIZE_MAX) - blocksize = DISK_BLOCK_BYTES; - buffer = alloc(blocksize); - - do { - bytes_read = get_block(tapefd, buffer, 0); - if(bytes_read < 0) { - error("drain read error: %s", strerror(errno)); - /*NOTREACHED*/ - } - } while (bytes_read > 0); - - amfree(buffer); + return (file->type != F_UNKNOWN && + file->type != F_EMPTY && + file->type != F_WEIRD); } /* @@ -697,16 +652,12 @@ drain_file( * piped to restore). */ -ssize_t -restore( - dumpfile_t * file, - char * filename, - int tapefd, - int isafile, - rst_flags_t * flags) + +/* FIXME: Mondo function that needs refactoring. */ +void restore(RestoreSource * source, + rst_flags_t * flags) { int dest = -1, out; - ssize_t s; int file_is_compressed; int is_continuation = 0; int check_for_aborted = 0; @@ -717,50 +668,46 @@ restore( char *buffer; int need_compress=0, need_uncompress=0, need_decrypt=0; int stage=0; - ssize_t bytes_read; struct pipeline { int pipe[2]; } pipes[3]; + char * filename; + + filename = make_filename(source->header); memset(pipes, -1, SIZEOF(pipes)); - if(flags->blocksize) - blocksize = (size_t)flags->blocksize; - else if(blocksize == (size_t)SSIZE_MAX) - blocksize = DISK_BLOCK_BYTES; - - if(already_have_dump(file)){ - char *filename = make_filename(file); - fprintf(stderr, " *** Duplicate file %s, one is probably an aborted write\n", filename); - amfree(filename); + + if(already_have_dump(source->header)){ + g_fprintf(stderr, _(" *** Duplicate file %s, one is probably an aborted write\n"), filename); check_for_aborted = 1; } /* store a shorthand record of this dump */ - tempdump = alloc(SIZEOF(dumplist_t)); - tempdump->file = alloc(SIZEOF(dumpfile_t)); + tempdump = malloc(SIZEOF(dumplist_t)); + tempdump->file = malloc(SIZEOF(dumpfile_t)); tempdump->next = NULL; - memcpy(tempdump->file, file, SIZEOF(dumpfile_t)); + memcpy(tempdump->file, source->header, SIZEOF(dumpfile_t)); /* * If we're appending chunked files to one another, and if this is a * continuation of a file we just restored, and we've still got the * output handle from that previous restore, we're golden. Phew. */ - if(flags->inline_assemble && file->type == F_SPLIT_DUMPFILE){ + if(flags->inline_assemble && source->header->type == F_SPLIT_DUMPFILE){ myout = open_outputs; while(myout != NULL){ if(myout->file->type == F_SPLIT_DUMPFILE && - headers_equal(file, myout->file, 1)){ - if(file->partnum == myout->lastpartnum + 1){ + headers_equal(source->header, myout->file, 1)){ + if(source->header->partnum == myout->lastpartnum + 1){ is_continuation = 1; break; } } myout = myout->next; } - if(myout != NULL) myout->lastpartnum = file->partnum; - else if(file->partnum != 1){ - fprintf(stderr, "%s: Chunk out of order, will save to disk and append to output.\n", get_pname()); + if(myout != NULL) myout->lastpartnum = source->header->partnum; + else if(source->header->partnum != 1){ + g_fprintf(stderr, _("%s: Chunk out of order, will save to disk and append to output.\n"), get_pname()); flags->pipe_to_fd = -1; flags->compress = 0; flags->leave_comp = 1; @@ -779,17 +726,18 @@ restore( if(is_continuation && flags->pipe_to_fd == -1){ char *filename; filename = make_filename(myout->file); - fprintf(stderr, "%s: appending to %s\n", get_pname(), + g_fprintf(stderr, _("%s: appending to %s\n"), get_pname(), filename); amfree(filename); } /* adjust compression flag */ - file_is_compressed = file->compressed; - if(!flags->compress && file_is_compressed && !known_compress_type(file)) { - fprintf(stderr, - "%s: unknown compression suffix %s, can't uncompress\n", - get_pname(), file->comp_suffix); + file_is_compressed = source->header->compressed; + if(!flags->compress && file_is_compressed && + !known_compress_type(source->header)) { + g_fprintf(stderr, + _("%s: unknown compression suffix %s, can't uncompress\n"), + get_pname(), source->header->comp_suffix); flags->compress = 1; } @@ -799,12 +747,12 @@ restore( out = myout->outfd; } else { if(flags->pipe_to_fd != -1) { - dest = flags->pipe_to_fd; /* standard output */ + dest = flags->pipe_to_fd; } else { char *filename_ext = NULL; if(flags->compress) { - filename_ext = file_is_compressed ? file->comp_suffix + filename_ext = file_is_compressed ? source->header->comp_suffix : COMPRESS_SUFFIX; } else if(flags->raw) { filename_ext = ".RAW"; @@ -823,7 +771,7 @@ restore( tmp_filename = vstralloc(final_filename, ".tmp", NULL); if((dest = open(tmp_filename, (O_CREAT | O_RDWR | O_TRUNC), CREAT_MODE)) < 0) { - error("could not create output file %s: %s", + error(_("could not create output file %s: %s"), tmp_filename, strerror(errno)); /*NOTREACHED*/ } @@ -845,8 +793,9 @@ restore( dumpfile_t tmp_hdr; if(flags->compress && !file_is_compressed) { - file->compressed = 1; - snprintf(file->uncompress_cmd, SIZEOF(file->uncompress_cmd), + source->header->compressed = 1; + g_snprintf(source->header->uncompress_cmd, + SIZEOF(source->header->uncompress_cmd), " %s %s |", UNCOMPRESS_PATH, #ifdef UNCOMPRESS_OPT UNCOMPRESS_OPT @@ -854,63 +803,67 @@ restore( "" #endif ); - strncpy(file->comp_suffix, + strncpy(source->header->comp_suffix, COMPRESS_SUFFIX, - SIZEOF(file->comp_suffix)-1); - file->comp_suffix[SIZEOF(file->comp_suffix)-1] = '\0'; + SIZEOF(source->header->comp_suffix)-1); + source->header->comp_suffix[SIZEOF(source->header->comp_suffix)-1] + = '\0'; } - memcpy(&tmp_hdr, file, SIZEOF(dumpfile_t)); + memcpy(&tmp_hdr, source->header, SIZEOF(dumpfile_t)); /* remove CONT_FILENAME from header */ - memset(file->cont_filename,'\0',SIZEOF(file->cont_filename)); - file->blocksize = DISK_BLOCK_BYTES; + memset(source->header->cont_filename, '\0', + SIZEOF(source->header->cont_filename)); + source->header->blocksize = DISK_BLOCK_BYTES; /* * Dumb down split file headers as well, so that older versions of * things like amrecover won't gag on them. */ - if(file->type == F_SPLIT_DUMPFILE && flags->mask_splits){ - file->type = F_DUMPFILE; + if(source->header->type == F_SPLIT_DUMPFILE && flags->mask_splits){ + source->header->type = F_DUMPFILE; } buffer = alloc(DISK_BLOCK_BYTES); - build_header(buffer, file, DISK_BLOCK_BYTES); + buffer = build_header(source->header, DISK_BLOCK_BYTES); - if((w = fullwrite(out, buffer, DISK_BLOCK_BYTES)) != DISK_BLOCK_BYTES) { + if((w = fullwrite(out, buffer, + DISK_BLOCK_BYTES)) != DISK_BLOCK_BYTES) { if(w < 0) { - error("write error: %s", strerror(errno)); + error(_("write error: %s"), strerror(errno)); /*NOTREACHED*/ } else { - error("write error: " SSIZE_T_FMT " instead of %d", w, DISK_BLOCK_BYTES); + error(_("write error: %zd instead of %d"), w, DISK_BLOCK_BYTES); /*NOTREACHED*/ } } amfree(buffer); - - memcpy(file, &tmp_hdr, SIZEOF(dumpfile_t)); + memcpy(source->header, &tmp_hdr, SIZEOF(dumpfile_t)); } /* find out if compression or uncompression is needed here */ if(flags->compress && !file_is_compressed && !is_continuation && !flags->leave_comp - && (flags->inline_assemble || file->type != F_SPLIT_DUMPFILE)) + && (flags->inline_assemble || + source->header->type != F_SPLIT_DUMPFILE)) need_compress=1; if(!flags->raw && !flags->compress && file_is_compressed && !is_continuation && !flags->leave_comp && (flags->inline_assemble - || file->type != F_SPLIT_DUMPFILE)) + || source->header->type != F_SPLIT_DUMPFILE)) need_uncompress=1; - if(!flags->raw && file->encrypted && !is_continuation - && (flags->inline_assemble || file->type != F_SPLIT_DUMPFILE)) + if(!flags->raw && source->header->encrypted && !is_continuation && + (flags->inline_assemble || source->header->type != F_SPLIT_DUMPFILE)) { need_decrypt=1; + } /* Setup pipes for decryption / compression / uncompression */ stage = 0; if (need_decrypt) { if (pipe(&pipes[stage].pipe[0]) < 0) { - error("error [pipe[%d]: %s]", stage, strerror(errno)); + error(_("error [pipe[%d]: %s]"), stage, strerror(errno)); /*NOTREACHED*/ } stage++; @@ -918,7 +871,7 @@ restore( if (need_compress || need_uncompress) { if (pipe(&pipes[stage].pipe[0]) < 0) { - error("error [pipe[%d]: %s]", stage, strerror(errno)); + error(_("error [pipe[%d]: %s]"), stage, strerror(errno)); /*NOTREACHED*/ } stage++; @@ -932,7 +885,7 @@ restore( if(need_decrypt) { switch(myout->comp_enc_pid = fork()) { case -1: - error("could not fork for decrypt: %s", strerror(errno)); + error(_("could not fork for decrypt: %s"), strerror(errno)); /*NOTREACHED*/ default: @@ -943,28 +896,32 @@ restore( case 0: if(dup2(pipes[stage].pipe[0], 0) == -1) { - error("error decrypt stdin [dup2 %d %d: %s]", stage, + error(_("error decrypt stdin [dup2 %d %d: %s]"), stage, pipes[stage].pipe[0], strerror(errno)); /*NOTREACHED*/ } if(dup2(pipes[stage+1].pipe[1], 1) == -1) { - error("error decrypt stdout [dup2 %d %d: %s]", stage + 1, + error(_("error decrypt stdout [dup2 %d %d: %s]"), stage + 1, pipes[stage+1].pipe[1], strerror(errno)); /*NOTREACHED*/ } safe_fd(-1, 0); - if (*file->srv_encrypt) { - (void) execlp(file->srv_encrypt, file->srv_encrypt, - file->srv_decrypt_opt, (char *)NULL); - error("could not exec %s: %s", file->srv_encrypt, strerror(errno)); - /*NOTREACHED*/ - } else if (*file->clnt_encrypt) { - (void) execlp(file->clnt_encrypt, file->clnt_encrypt, - file->clnt_decrypt_opt, (char *)NULL); - error("could not exec %s: %s", file->clnt_encrypt, strerror(errno)); - /*NOTREACHED*/ + if (source->header->srv_encrypt[0] != '\0') { + (void) execlp(source->header->srv_encrypt, + source->header->srv_encrypt, + source->header->srv_decrypt_opt, NULL); + error("could not exec %s: %s", + source->header->srv_encrypt, strerror(errno)); + g_assert_not_reached(); + } else if (source->header->clnt_encrypt[0] != '\0') { + (void) execlp(source->header->clnt_encrypt, + source->header->clnt_encrypt, + source->header->clnt_decrypt_opt, NULL); + error("could not exec %s: %s", + source->header->clnt_encrypt, strerror(errno)); + g_assert_not_reached(); } } } @@ -975,7 +932,7 @@ restore( */ switch(myout->comp_enc_pid = fork()) { case -1: - error("could not fork for %s: %s", COMPRESS_PATH, strerror(errno)); + error(_("could not fork for %s: %s"), COMPRESS_PATH, strerror(errno)); /*NOTREACHED*/ default: @@ -986,13 +943,13 @@ restore( case 0: if(dup2(pipes[stage].pipe[0], 0) == -1) { - error("error compress stdin [dup2 %d %d: %s]", stage, + error(_("error compress stdin [dup2 %d %d: %s]"), stage, pipes[stage].pipe[0], strerror(errno)); /*NOTREACHED*/ } if(dup2(pipes[stage+1].pipe[1], 1) == -1) { - error("error compress stdout [dup2 %d %d: %s]", stage + 1, + error(_("error compress stdout [dup2 %d %d: %s]"), stage + 1, pipes[stage+1].pipe[1], strerror(errno)); /*NOTREACHED*/ } @@ -1002,7 +959,7 @@ restore( safe_fd(-1, 0); (void) execlp(COMPRESS_PATH, COMPRESS_PATH, flags->comp_type, (char *)0); - error("could not exec %s: %s", COMPRESS_PATH, strerror(errno)); + error(_("could not exec %s: %s"), COMPRESS_PATH, strerror(errno)); /*NOTREACHED*/ } } else if(need_uncompress) { @@ -1019,7 +976,7 @@ restore( */ switch(myout->comp_enc_pid = fork()) { case -1: - error("could not fork for %s: %s", + error(_("could not fork for %s: %s"), UNCOMPRESS_PATH, strerror(errno)); /*NOTREACHED*/ @@ -1031,115 +988,93 @@ restore( case 0: if(dup2(pipes[stage].pipe[0], 0) == -1) { - error("error uncompress stdin [dup2 %d %d: %s]", stage, + error(_("error uncompress stdin [dup2 %d %d: %s]"), stage, pipes[stage].pipe[0], strerror(errno)); /*NOTREACHED*/ } if(dup2(pipes[stage+1].pipe[1], 1) == -1) { - error("error uncompress stdout [dup2 %d %d: %s]", stage + 1, + error(_("error uncompress stdout [dup2 %d %d: %s]"), stage + 1, pipes[stage+1].pipe[1], strerror(errno)); /*NOTREACHED*/ } safe_fd(-1, 0); - if (*file->srvcompprog) { - (void) execlp(file->srvcompprog, file->srvcompprog, "-d", - (char *)NULL); - error("could not exec %s: %s", file->srvcompprog, - strerror(errno)); - /*NOTREACHED*/ - } else if (*file->clntcompprog) { - (void) execlp(file->clntcompprog, file->clntcompprog, "-d", - (char *)NULL); - error("could not exec %s: %s", file->clntcompprog, - strerror(errno)); - /*NOTREACHED*/ + if (source->header->srvcompprog[0] != '\0') { + (void) execlp(source->header->srvcompprog, + source->header->srvcompprog, "-d", NULL); + error("could not exec %s: %s", source->header->srvcompprog, + strerror(errno)); + g_assert_not_reached(); + } else if (source->header->clntcompprog[0] != '\0') { + (void) execlp(source->header->clntcompprog, + source->header->clntcompprog, "-d", NULL); + error("could not exec %s: %s", source->header->clntcompprog, + strerror(errno)); + g_assert_not_reached(); } else { (void) execlp(UNCOMPRESS_PATH, UNCOMPRESS_PATH, #ifdef UNCOMPRESS_OPT UNCOMPRESS_OPT, #endif (char *)NULL); - error("could not exec %s: %s", UNCOMPRESS_PATH, strerror(errno)); + error(_("could not exec %s: %s"), UNCOMPRESS_PATH, strerror(errno)); /*NOTREACHED*/ } } } /* copy the rest of the file from tape to the output */ - if(flags->blocksize > 0) - blocksize = (size_t)flags->blocksize; - else if(blocksize == SIZE_MAX) - blocksize = DISK_BLOCK_BYTES; - buffer = alloc(blocksize); - - do { - bytes_read = get_block(tapefd, buffer, isafile); - if(bytes_read < 0) { - error("restore read error: %s", strerror(errno)); - /*NOTREACHED*/ - } - - if(bytes_read > 0) { - if((s = fullwrite(pipes[0].pipe[1], buffer, (size_t)bytes_read)) < 0) { - if ((errno == EPIPE) || (errno == ECONNRESET)) { - /* - * reading program has ended early - * e.g: bzip2 closes pipe when it - * trailing garbage after EOF - */ - break; - } - error("restore: write error: %s", strerror(errno)); - /* NOTREACHED */ - } else if (s < bytes_read) { - error("restore: wrote " SSIZE_T_FMT " of " SSIZE_T_FMT " bytes: %s", - s, bytes_read, strerror(errno)); - /* NOTREACHED */ - } - } - else if(isafile) { + if (source->restore_mode == HOLDING_MODE) { + dumpfile_t file; + int fd = source->u.holding_fd; + memcpy(& file, source->header, sizeof(file)); + for (;;) { + do_consumer_producer_queue(fd_read_producer, + GINT_TO_POINTER(fd), + fd_write_consumer, + GINT_TO_POINTER(pipes[0].pipe[1])); /* * See if we need to switch to the next file in a holding restore */ - if(file->cont_filename[0] == '\0') { + if(file.cont_filename[0] == '\0') { break; /* no more files */ } - aclose(tapefd); - if((tapefd = open(file->cont_filename, O_RDONLY)) == -1) { - char *cont_filename = strrchr(file->cont_filename,'/'); + aclose(fd); + if((fd = open(file.cont_filename, O_RDONLY)) == -1) { + char *cont_filename = + strrchr(file.cont_filename,'/'); if(cont_filename) { cont_filename++; - if((tapefd = open(cont_filename,O_RDONLY)) == -1) { - error("can't open %s: %s", file->cont_filename, + if((fd = open(cont_filename,O_RDONLY)) == -1) { + error(_("can't open %s: %s"), file.cont_filename, strerror(errno)); /*NOTREACHED*/ } else { - fprintf(stderr, "cannot open %s: %s\n", - file->cont_filename, strerror(errno)); - fprintf(stderr, "using %s\n", + g_fprintf(stderr, _("cannot open %s: %s\n"), + file.cont_filename, strerror(errno)); + g_fprintf(stderr, _("using %s\n"), cont_filename); } } else { - error("can't open %s: %s", file->cont_filename, + error(_("can't open %s: %s"), file.cont_filename, strerror(errno)); /*NOTREACHED*/ } } - bytes_read = read_file_header(file, tapefd, isafile, flags); - if(file->type != F_DUMPFILE && file->type != F_CONT_DUMPFILE - && file->type != F_SPLIT_DUMPFILE) { - fprintf(stderr, "unexpected header type: "); - print_header(stderr, file); + read_holding_disk_header(&file, fd, flags); + if(file.type != F_DUMPFILE && file.type != F_CONT_DUMPFILE + && file.type != F_SPLIT_DUMPFILE) { + g_fprintf(stderr, _("unexpected header type: ")); + print_header(stderr, source->header); exit(2); } - } - } while (bytes_read > 0); - - amfree(buffer); + } + } else { + device_read_to_fd(source->u.device, pipes[0].pipe[1]); + } if(!flags->inline_assemble) { if(out != dest) @@ -1147,7 +1082,7 @@ restore( } if(!is_continuation){ if(tmp_filename && stat(tmp_filename, &statinfo) < 0){ - error("Can't stat the file I just created (%s)!", tmp_filename); + error(_("Can't stat the file I just created (%s)!"), tmp_filename); /*NOTREACHED*/ } else { statinfo.st_size = (off_t)0; @@ -1159,12 +1094,13 @@ restore( if(oldstat.st_size <= statinfo.st_size){ dumplist_t *prev_fileentry = NULL; open_output_t *prev_out = NULL; - fprintf(stderr, "Newer restore is larger, using that\n"); + g_fprintf(stderr, _("Newer restore is larger, using that\n")); /* nuke the old dump's entry in alldump_list */ for(fileentry=alldumps_list; fileentry->next; fileentry=fileentry->next){ - if(headers_equal(file, fileentry->file, 0)){ + if(headers_equal(source->header, + fileentry->file, 0)){ if(prev_fileentry){ prev_fileentry->next = fileentry->next; } @@ -1178,7 +1114,7 @@ restore( } myout = open_outputs; while(myout != NULL){ - if(headers_equal(file, myout->file, 0)){ + if(headers_equal(source->header, myout->file, 0)){ if(myout->outfd >= 0) aclose(myout->outfd); if(prev_out){ @@ -1193,20 +1129,21 @@ restore( } } else{ - fprintf(stderr, "Older restore is larger, using that\n"); + g_fprintf(stderr, _("Older restore is larger, using that\n")); if (tmp_filename) unlink(tmp_filename); amfree(tempdump->file); amfree(tempdump); amfree(tmp_filename); amfree(final_filename); - return (bytes_read); + amfree(filename); + return; } } } if(tmp_filename && final_filename && - rename(tmp_filename, final_filename) < 0) { - error("Can't rename %s to %s: %s", + rename(tmp_filename, final_filename) < 0) { + error(_("Can't rename %s to %s: %s"), tmp_filename, final_filename, strerror(errno)); /*NOTREACHED*/ } @@ -1222,11 +1159,11 @@ restore( if(!is_continuation){ oldout = alloc(SIZEOF(open_output_t)); oldout->file = alloc(SIZEOF(dumpfile_t)); - memcpy(oldout->file, file, SIZEOF(dumpfile_t)); + memcpy(oldout->file, source->header, SIZEOF(dumpfile_t)); if(flags->inline_assemble) oldout->outfd = pipes[0].pipe[1]; else oldout->outfd = -1; oldout->comp_enc_pid = -1; - oldout->lastpartnum = file->partnum; + oldout->lastpartnum = source->header->partnum; oldout->next = open_outputs; open_outputs = oldout; } @@ -1239,76 +1176,66 @@ restore( else { alldumps_list = tempdump; } - - return (bytes_read); } /* return NULL if the label is not the expected one */ -/* return the label if it is the expected one, and set *tapefd to a */ -/* file descriptor to the tapedev */ -char * -label_of_current_slot( - char *cur_tapedev, - FILE *prompt_out, - int *tapefd, - dumpfile_t *file, - rst_flags_t *flags, - am_feature_t *their_features, - ssize_t *read_result, - tapelist_t *desired_tape) +/* returns a Device handle if it is the expected one. */ +/* FIXME: Was label_of_current_slot */ +static Device * +conditional_device_open(char *tapedev, + FILE *prompt_out, + rst_flags_t *flags, + am_feature_t *their_features, + tapelist_t *desired_tape) { - struct stat stat_tape; - char *label = NULL; - int wrongtape = 0; - char *err; + Device * rval; - if (!cur_tapedev) { + if (tapedev == NULL) { send_message(prompt_out, flags, their_features, - "no tapedev specified"); - } else if (tape_stat(cur_tapedev, &stat_tape) !=0 ) { - send_message(prompt_out, flags, their_features, - "could not stat '%s': %s", - cur_tapedev, strerror(errno)); - wrongtape = 1; - } else if((err = tape_rewind(cur_tapedev)) != NULL) { + _("Volume labeled '%s' not found."), desired_tape->label); + return NULL; + } + + rval = device_open(tapedev); + if (rval == NULL) { send_message(prompt_out, flags, their_features, - "Could not rewind device '%s': %s", - cur_tapedev, err); - wrongtape = 1; - /* err should not be freed */ - } else if((*tapefd = tape_open(cur_tapedev, 0)) < 0){ - send_message(prompt_out, flags, their_features, - "could not open tape device %s: %s", - cur_tapedev, strerror(errno)); - wrongtape = 1; + "Error opening device '%s'.", + tapedev); + return NULL; } - if (!wrongtape) { - *read_result = read_file_header(file, *tapefd, 0, flags); - if (file->type != F_TAPESTART) { - send_message(prompt_out, flags, their_features, - "Not an amanda tape"); - tapefd_close(*tapefd); - } else { - if (flags->check_labels && desired_tape && - strcmp(file->name, desired_tape->label) != 0) { - send_message(prompt_out, flags, their_features, - "Label mismatch, got %s and expected %s", - file->name, desired_tape->label); - tapefd_close(*tapefd); - } - else { - label = stralloc(file->name); - } - } + device_set_startup_properties_from_config(rval); + device_read_label(rval); + + if (rval->volume_label == NULL) { + send_message(prompt_out, flags, their_features, + "Not an amanda tape"); + g_object_unref(rval); + return NULL; + } + + if (!device_start(rval, ACCESS_READ, NULL, NULL)) { + send_message(prompt_out, flags, their_features, + "Colud not open device %s for reading.\n", + tapedev); + return NULL; } - return label; + + if (flags->check_labels && desired_tape && + strcmp(rval->volume_label, desired_tape->label) != 0) { + send_message(prompt_out, flags, their_features, + "Label mismatch, got %s and expected %s", + rval->volume_label, desired_tape->label); + g_object_unref(rval); + return NULL; + } + + return rval; } -/* return >0 the number of slot move */ -/* return LOAD_STOP if the search must be stopped */ -/* return LOAD_CHANGER if the changer search the library */ -int +/* Do the right thing to try and load the next required tape. See + LoadStatus above for return value meaning. */ +LoadStatus load_next_tape( char **cur_tapedev, FILE *prompt_out, @@ -1317,350 +1244,685 @@ load_next_tape( am_feature_t *their_features, tapelist_t *desired_tape) { - int ret = -1; - if (desired_tape) { send_message(prompt_out, flags, their_features, - "Looking for tape %s...", + _("Looking for tape %s..."), desired_tape->label); if (backwards) { - searchlabel = desired_tape->label; - changer_find(NULL, scan_init, loadlabel_slot, + loadlabel_data data; + data.cur_tapedev = cur_tapedev; + data.searchlabel = desired_tape->label; + changer_find(&data, scan_init, loadlabel_slot, desired_tape->label); - ret = LOAD_CHANGER; + return LOAD_CHANGER; } else { amfree(curslot); changer_loadslot("next", &curslot, cur_tapedev); - ret = 1; + return LOAD_NEXT; } } else { assert(!flags->amidxtaped); amfree(curslot); changer_loadslot("next", &curslot, cur_tapedev); - ret = 1; + return LOAD_NEXT; } - return ret; + + g_assert_not_reached(); } -/* return 0 a new tape is loaded */ -/* return -1 no new tape */ -int +/* will never return LOAD_CHANGER. */ +LoadStatus load_manual_tape( - char **cur_tapedev, + char **tapedev_ptr, FILE *prompt_out, FILE *prompt_in, rst_flags_t *flags, am_feature_t *their_features, tapelist_t *desired_tape) { - int ret = 0; char *input = NULL; if (flags->amidxtaped) { if (their_features && am_has_feature(their_features, fe_amrecover_FEEDME)) { - fprintf(prompt_out, "FEEDME %s\r\n", + g_fprintf(prompt_out, "FEEDME %s\r\n", desired_tape->label); fflush(prompt_out); input = agets(prompt_in);/* Strips \n but not \r */ if(!input) { - error("Connection lost with amrecover"); + error(_("Connection lost with amrecover")); /*NOTREACHED*/ } else if (strcmp("OK\r", input) == 0) { } else if (strncmp("TAPE ", input, 5) == 0) { - amfree(*cur_tapedev); - *cur_tapedev = alloc(1025); - if (sscanf(input, "TAPE %1024s\r", *cur_tapedev) != 1) { - error("Got bad response from amrecover: %s", input); + amfree(*tapedev_ptr); + *tapedev_ptr = alloc(1025); + if (sscanf(input, "TAPE %1024s\r", *tapedev_ptr) != 1) { + error(_("Got bad response from amrecover: %s"), input); /*NOTREACHED*/ } } else { send_message(prompt_out, flags, their_features, - "Got bad response from amrecover: %s", input); - error("Got bad response from amrecover: %s", input); + _("Got bad response from amrecover: %s"), input); + error(_("Got bad response from amrecover: %s"), input); /*NOTREACHED*/ } } else { send_message(prompt_out, flags, their_features, - "Client doesn't support fe_amrecover_FEEDME"); - error("Client doesn't support fe_amrecover_FEEDME"); + _("Client doesn't support fe_amrecover_FEEDME")); + error(_("Client doesn't support fe_amrecover_FEEDME")); /*NOTREACHED*/ } } else { if (desired_tape) { - fprintf(prompt_out, - "Insert tape labeled %s in device %s \n" - "and press enter, ^D to finish reading tapes\n", - desired_tape->label, *cur_tapedev); + g_fprintf(prompt_out, + _("Insert tape labeled %s in device %s \n" + "and press enter, ^D to finish reading tapes\n"), + desired_tape->label, *tapedev_ptr); } else { - fprintf(prompt_out,"Insert a tape to search and press " - "enter, ^D to finish reading tapes\n"); + g_fprintf(prompt_out,_("Insert a tape to search and press " + "enter, ^D to finish reading tapes\n")); } fflush(prompt_out); if((input = agets(prompt_in)) == NULL) - ret = -1; + return LOAD_STOP; } amfree(input); - return ret; + return LOAD_NEXT; } +/* Search a seen-tapes list for a particular name, to see if we've already + * processed this tape. Returns TRUE if this label has already been seen. */ +static gboolean check_volume_seen(seentapes_t * list, char * label) { + seentapes_t * cur_tape; + for (cur_tape = list; cur_tape != NULL; cur_tape = cur_tape->next) { + if (strcmp(cur_tape->label, label) == 0) { + return TRUE; + } + } + return FALSE; +} -void -search_a_tape( - char *cur_tapedev, - FILE *prompt_out, - rst_flags_t *flags, - am_feature_t *their_features, - tapelist_t *desired_tape, - int isafile, - match_list_t *match_list, - seentapes_t *tape_seen, - dumpfile_t *file, - dumpfile_t *prev_rst_file, - dumpfile_t *tapestart, - int slot_num, - ssize_t *read_result) -{ +/* Add a volume to the seen tapes list. */ +static void record_seen_volume(seentapes_t ** list, char * label, + char * slotstr) { + seentapes_t * new_entry; + + if (list == NULL) + return; + + new_entry = malloc(sizeof(seentapes_t)); + new_entry->label = stralloc(label); + if (slotstr == NULL) { + new_entry->slotstr = NULL; + } else { + new_entry->slotstr = stralloc(slotstr); + } + new_entry->files = NULL; + new_entry->next = *list; + *list = new_entry; +} + +/* Record a specific dump on a volume. */ +static void record_seen_dump(seentapes_t * volume, dumpfile_t * header) { + dumplist_t * this_dump; + + if (volume == NULL) + return; + + this_dump = malloc(sizeof(*this_dump)); + this_dump->file = g_memdup(header, sizeof(*header)); + this_dump->next = NULL; + if (volume->files) { + dumplist_t * tmp_dump = volume->files; + while (tmp_dump->next != NULL) { + tmp_dump = tmp_dump->next; + } + tmp_dump->next = this_dump; + } else { + volume->files = this_dump; + } +} + +static void print_tape_inventory(FILE * logstream, seentapes_t * tape_seen, + char * timestamp, char * label, + int tape_count) { + char * logline; + dumplist_t * fileentry; + + logline = log_genstring(L_START, "taper", + "datestamp %s label %s tape %d", + timestamp, label, tape_count); + fputs(logline, logstream); + amfree(logline); + for(fileentry=tape_seen->files; fileentry; fileentry=fileentry->next){ + switch (fileentry->file->type) { + case F_DUMPFILE: + logline = log_genstring(L_SUCCESS, "taper", + "%s %s %s %d [faked log entry]", + fileentry->file->name, + fileentry->file->disk, + fileentry->file->datestamp, + fileentry->file->dumplevel); + break; + case F_SPLIT_DUMPFILE: + logline = log_genstring(L_CHUNK, "taper", + "%s %s %s %d %d [faked log entry]", + fileentry->file->name, + fileentry->file->disk, + fileentry->file->datestamp, + fileentry->file->partnum, + fileentry->file->dumplevel); + break; + default: + break; + } + if(logline != NULL){ + fputs(logline, logstream); + amfree(logline); + fflush(logstream); + } + } +} + +/* Check if the given header matches the given dumpspecs. Returns + TRUE if dumpspecs is NULL and false if the header is NULL. Returns + true if the header matches the match list. */ +static gboolean run_dumpspecs(GSList * dumpspecs, + dumpfile_t * header) { + dumpspec_t *ds; + + if (dumpspecs == NULL) + return TRUE; + if (header == NULL) + return FALSE; + + while (dumpspecs) { + ds = (dumpspec_t *)dumpspecs->data; + if (disk_match(header, ds->datestamp, ds->host, + ds->disk, ds->level) != 0) { + return TRUE; + } + dumpspecs = dumpspecs->next; + } + + return FALSE; +} + +/* A wrapper around restore() above. This function does some extra + checking to seek to the file in question and ensure that we really, + really want to use it. + + The next_file argument provides instruction on what to do if the + requested file does not exist on the volume: If next_file is NULL + then if the requested file is missing the function will return + RESTORE_STATUS_NEXT_FILE. If next_file is not NULL then the first + extant file whose number is equal to or greater than file_num will + be attempted. *next_file will be filled in with the number of the + file following the one that was attempted. */ +static RestoreFileStatus +try_restore_single_file(Device * device, int file_num, int* next_file, + FILE * prompt_out, + rst_flags_t * flags, + am_feature_t * their_features, + dumpfile_t * first_restored_file, + GSList * dumpspecs, + seentapes_t * tape_seen) { + RestoreSource source; + source.u.device = device; + source.restore_mode = DEVICE_MODE; + + source.header = device_seek_file(device, file_num); + + if (source.header == NULL) { + /* This definitely indicates an error. */ + send_message(prompt_out, flags, their_features, + "Could not seek device %s to file %d.", + device->device_name, file_num); + return RESTORE_STATUS_NEXT_TAPE; + } else if (source.header->type == F_TAPEEND) { + amfree(source.header); + return RESTORE_STATUS_NEXT_TAPE; + } else if (device->file != file_num) { + if (next_file == NULL) { + send_message(prompt_out, flags, their_features, + "Requested file %d does not exist.", + file_num); + return RESTORE_STATUS_NEXT_FILE; + } else { + send_message(prompt_out, flags, their_features, + "Skipped from file %d to file %d.", + file_num, device->file); + file_num = device->file; + } + } + + if (next_file != NULL) { + *next_file = file_num + 1; + } + + g_return_val_if_fail(source.header->type == F_DUMPFILE || + source.header->type == F_CONT_DUMPFILE || + source.header->type == F_SPLIT_DUMPFILE, + RESTORE_STATUS_NEXT_FILE); + + + if (!run_dumpspecs(dumpspecs, source.header)) { + if(!flags->amidxtaped) { + g_fprintf(prompt_out, "%s: %d: skipping ", + get_pname(), file_num); + print_header(prompt_out, source.header); + } + return RESTORE_STATUS_NEXT_FILE; + } + + if (first_restored_file != NULL && + first_restored_file->type != F_UNKNOWN && + !headers_equal(first_restored_file, source.header, 1) && + (flags->pipe_to_fd == fileno(stdout))) { + return RESTORE_STATUS_STOP; + } + + if (!flags->amidxtaped) { + g_fprintf(stderr, "%s: %d: restoring ", + get_pname(), file_num); + print_header(stderr, source.header); + } + record_seen_dump(tape_seen, source.header); + restore(&source, flags); + if (first_restored_file) { + memcpy(first_restored_file, source.header, sizeof(dumpfile_t)); + } + return RESTORE_STATUS_NEXT_FILE; +} + +/* This function handles processing of a particular tape or holding + disk file. It returns TRUE if it is useful to load another tape.*/ + +gboolean +search_a_tape(Device * device, + FILE *prompt_out, /* Where to send any prompts */ + rst_flags_t *flags, /* Restore options. */ + am_feature_t *their_features, + tapelist_t *desired_tape, /* A list of desired tape files */ + GSList *dumpspecs, /* What disks to restore. */ + seentapes_t **tape_seen, /* Where to record data on + this tape. */ + /* May be NULL. If zeroed, will be filled in with the + first restored file. If already filled in, then we + may only restore other files from the same dump. */ + dumpfile_t * first_restored_file, + int tape_count, + FILE * logstream) { + seentapes_t * tape_seen_head = NULL; + RestoreSource source; off_t filenum; - dumplist_t *fileentry = NULL; + int tapefile_idx = -1; int i; - char *logline = NULL; - FILE *logstream = NULL; - off_t fsf_by; + RestoreFileStatus restore_status = RESTORE_STATUS_NEXT_TAPE; + + source.restore_mode = DEVICE_MODE; + source.u.device = device; filenum = (off_t)0; if(desired_tape && desired_tape->numfiles > 0) tapefile_idx = 0; if (desired_tape) { - dbprintf(("search_a_tape: desired_tape=%p label=%s\n", - desired_tape, desired_tape->label)); - dbprintf(("tape: numfiles = %d\n", desired_tape->numfiles)); + dbprintf(_("search_a_tape: desired_tape=%p label=%s\n"), + desired_tape, desired_tape->label); + dbprintf(_("tape: numfiles = %d\n"), desired_tape->numfiles); for (i=0; i < desired_tape->numfiles; i++) { - dbprintf(("tape: files[%d] = " OFF_T_FMT "\n", - i, (OFF_T_FMT_TYPE)desired_tape->files[i])); + dbprintf(_("tape: files[%d] = %lld\n"), + i, (long long)desired_tape->files[i]); } } else { - dbprintf(("search_a_tape: no desired_tape\n")); + dbprintf(_("search_a_tape: no desired_tape\n")); + } + dbprintf(_("current tapefile_idx = %d\n"), tapefile_idx); + + if (tape_seen) { + if (check_volume_seen(*tape_seen, device->volume_label)) { + send_message(prompt_out, flags, their_features, + "Skipping repeat tape %s in slot %s", + device->volume_label, curslot); + return TRUE; + } + record_seen_volume(tape_seen, device->volume_label, curslot); + tape_seen_head = *tape_seen; } - dbprintf(("current tapefile_idx = %d\n", tapefile_idx)); - /* if we know where we're going, fastforward there */ - if(flags->fsf && !isafile){ - /* If we have a tapelist entry, filenums will be store there */ - if(tapefile_idx >= 0) { - fsf_by = desired_tape->files[tapefile_idx]; - } else { - /* - * older semantics assume we're restoring one file, with the fsf - * flag being the filenum on tape for said file - */ - fsf_by = (flags->fsf == 0) ? (off_t)0 : (off_t)1; - } - if(fsf_by > (off_t)0){ - if(tapefd_rewind(tapefd) < 0) { - send_message(prompt_out, flags, their_features, - "Could not rewind device %s: %s", - cur_tapedev, strerror(errno)); - error("Could not rewind device %s: %s", - cur_tapedev, strerror(errno)); - /*NOTREACHED*/ - } + if (desired_tape && desired_tape->numfiles > 0) { + /* Iterate the tape list, handle each file in order. */ + int file_index; + for (file_index = 0; file_index < desired_tape->numfiles; + file_index ++) { + int file_num = desired_tape->files[file_index]; + restore_status = try_restore_single_file(device, file_num, NULL, + prompt_out, flags, + their_features, + first_restored_file, + NULL, tape_seen_head); + if (restore_status != RESTORE_STATUS_NEXT_FILE) + break; + } + } else if(flags->fsf && flags->amidxtaped) { + /* Restore a single file, then quit. */ + restore_status = + try_restore_single_file(device, flags->fsf, NULL, prompt_out, flags, + their_features, first_restored_file, + dumpspecs, tape_seen_head); + } else { + /* Search the tape from beginning to end. */ + int file_num; - if(tapefd_fsf(tapefd, fsf_by) < 0) { - send_message(prompt_out, flags, their_features, - "Could not fsf device %s by " OFF_T_FMT ": %s", - cur_tapedev, (OFF_T_FMT_TYPE)fsf_by, - strerror(errno)); - error("Could not fsf device %s by " OFF_T_FMT ": %s", - cur_tapedev, (OFF_T_FMT_TYPE)fsf_by, - strerror(errno)); - /*NOTREACHED*/ - } - else { - filenum = fsf_by; - } - *read_result = read_file_header(file, tapefd, isafile, flags); + if (flags->fsf > 0) { + file_num = flags->fsf; + } else { + file_num = 1; + } + + if (!flags->amidxtaped) { + g_fprintf(prompt_out, "Restoring from tape %s starting with file %d.\n", + device->volume_label, file_num); + fflush(prompt_out); } + + for (;;) { + restore_status = + try_restore_single_file(device, file_num, &file_num, + prompt_out, flags, + their_features, first_restored_file, + dumpspecs, tape_seen_head); + if (restore_status != RESTORE_STATUS_NEXT_FILE) + break; + } } + + /* spit out our accumulated list of dumps, if we're inventorying */ + if (logstream != NULL) { + print_tape_inventory(logstream, tape_seen_head, device->volume_time, + device->volume_label, tape_count); + } + return (restore_status != RESTORE_STATUS_STOP); +} - while((file->type == F_TAPESTART || file->type == F_DUMPFILE || - file->type == F_SPLIT_DUMPFILE) && - (tapefile_idx < 0 || tapefile_idx < desired_tape->numfiles)) { - int found_match = 0; - match_list_t *me; - dumplist_t *tempdump = NULL; - - /* store record of this dump for inventorying purposes */ - tempdump = alloc(SIZEOF(dumplist_t)); - tempdump->file = alloc(SIZEOF(dumpfile_t)); - tempdump->next = NULL; - memcpy(tempdump->file, &file, SIZEOF(dumpfile_t)); - if(tape_seen->files){ - fileentry = tape_seen->files; - while (fileentry->next != NULL) - fileentry = fileentry->next; - fileentry->next = tempdump; - } - else { - tape_seen->files = tempdump; +static void free_seen_tapes(seentapes_t * seentapes) { + while (seentapes != NULL) { + seentapes_t *tape_seen = seentapes; + seentapes = seentapes->next; + while(tape_seen->files != NULL) { + dumplist_t *temp_dump = tape_seen->files; + tape_seen->files = temp_dump->next; + amfree(temp_dump->file); + amfree(temp_dump); } + amfree(tape_seen->label); + amfree(tape_seen->slotstr); + amfree(tape_seen); + + } +} - /* see if we need to restore the thing */ - if(isafile) - found_match = 1; - else if(tapefile_idx >= 0){ /* do it by explicit file #s */ - if(filenum == desired_tape->files[tapefile_idx]){ - found_match = 1; - tapefile_idx++; - } - } - else{ /* search and match headers */ - for(me = match_list; me; me = me->next) { - if(disk_match(file, me->datestamp, me->hostname, - me->diskname, me->level) != 0){ - found_match = 1; - break; - } - } - } +/* Spit out a list of expected tapes, so people with manual changers know + what to load */ +static void print_expected_tape_list(FILE* prompt_out, FILE* prompt_in, + tapelist_t *tapelist, + rst_flags_t * flags) { + tapelist_t * cur_volume; + + g_fprintf(prompt_out, "The following tapes are needed:"); + for(cur_volume = tapelist; cur_volume != NULL; + cur_volume = cur_volume->next){ + g_fprintf(prompt_out, " %s", cur_volume->label); + } + g_fprintf(prompt_out, "\n"); + fflush(prompt_out); + if(flags->wait_tape_prompt){ + char *input = NULL; + g_fprintf(prompt_out,"Press enter when ready\n"); + fflush(prompt_out); + input = agets(prompt_in); + amfree(input); + g_fprintf(prompt_out, "\n"); + fflush(prompt_out); + } +} - if(found_match){ - char *filename = make_filename(file); +/* Restore a single holding-disk file. We will fill in this_header + with the header from this restore (if it is not null), and in the + stdout-pipe case, we abort according to last_header. Returns TRUE + if the restore should continue, FALSE if we are done. */ +gboolean restore_holding_disk(FILE * prompt_out, + rst_flags_t * flags, + am_feature_t * features, + tapelist_t * file, + seentapes_t ** seen, + GSList * dumpspecs, + dumpfile_t * this_header, + dumpfile_t * last_header) { + RestoreSource source; + gboolean read_result; + dumpfile_t header; + + source.header = &header; + source.restore_mode = HOLDING_MODE; + source.u.holding_fd = robust_open(file->label, 0, 0); + if (source.u.holding_fd < 0) { + send_message(prompt_out, flags, features, + "could not open %s: %s", + file->label, strerror(errno)); + return TRUE; + } - fprintf(stderr, "%s: " OFF_T_FMT ": restoring ", - get_pname(), (OFF_T_FMT_TYPE)filenum); - print_header(stderr, file); - *read_result = restore(file, filename, tapefd, isafile, flags); - filenum++; - amfree(filename); - } + g_fprintf(stderr, "Reading %s from fd %d\n", + file->label, source.u.holding_fd); + + read_result = read_holding_disk_header(source.header, + source.u.holding_fd, flags); + if (!read_result) { + send_message(prompt_out, flags, features, + "Invalid header reading %s.", + file->label); + aclose(source.u.holding_fd); + return TRUE; + } - /* advance to the next file, fast-forwarding where reasonable */ - if (!isafile) { - if (*read_result == 0) { - tapefd_close(tapefd); - if((tapefd = tape_open(cur_tapedev, 0)) < 0) { - send_message(prompt_out, flags, their_features, - "could not open %s: %s", - cur_tapedev, strerror(errno)); - error("could not open %s: %s", - cur_tapedev, strerror(errno)); - /*NOTREACHED*/ - } - /* if the file is not what we're looking for fsf to next one */ - } - else if (!found_match) { - if (tapefd_fsf(tapefd, (off_t)1) < 0) { - send_message(prompt_out, flags, their_features, - "Could not fsf device %s: %s", - cur_tapedev, strerror(errno)); - error("Could not fsf device %s: %s", - cur_tapedev, strerror(errno)); - /*NOTREACHED*/ - } - filenum ++; - } - else if (flags->fsf && (tapefile_idx >= 0) && - (tapefile_idx < desired_tape->numfiles)) { - fsf_by = desired_tape->files[tapefile_idx] - filenum; - if (fsf_by > (off_t)0) { - if(tapefd_fsf(tapefd, fsf_by) < 0) { - send_message(prompt_out, flags, their_features, - "Could not fsf device %s by " - OFF_T_FMT ": %s", - cur_tapedev, (OFF_T_FMT_TYPE)fsf_by, - strerror(errno)); - error("Could not fsf device %s by " OFF_T_FMT ": %s", - cur_tapedev, (OFF_T_FMT_TYPE)fsf_by, - strerror(errno)); - /*NOTREACHED*/ - } - filenum = desired_tape->files[tapefile_idx]; - } - } - } /* !isafile */ + if (!run_dumpspecs(dumpspecs, source.header)) { + return FALSE; + } - memcpy(prev_rst_file, file, SIZEOF(dumpfile_t)); - - if(isafile) - break; - *read_result = read_file_header(file, tapefd, isafile, flags); + if (last_header != NULL && !flags->amidxtaped && + flags->pipe_to_fd == STDOUT_FILENO && + last_header->type != F_UNKNOWN && + !headers_equal(last_header, source.header, 1)) { + return FALSE; + } else if (this_header != NULL) { + memcpy(this_header, source.header, sizeof(*this_header)); + } - /* only restore a single dump, if piping to stdout */ - if (!headers_equal(prev_rst_file, file, 1) && - (flags->pipe_to_fd == fileno(stdout)) && found_match) { - break; - } - } /* while we keep seeing headers */ + if (seen != NULL) { + record_seen_volume(seen, file->label, ""); + record_seen_dump(*seen, source.header); + } - if (!isafile) { - if (file->type == F_EMPTY) { - aclose(tapefd); - if((tapefd = tape_open(cur_tapedev, 0)) < 0) { - send_message(prompt_out, flags, their_features, - "could not open %s: %s", - cur_tapedev, strerror(errno)); - error("could not open %s: %s", - cur_tapedev, strerror(errno)); - /*NOTREACHED*/ - } - } else { - if (tapefd_fsf(tapefd, (off_t)1) < 0) { - send_message(prompt_out, flags, their_features, - "could not fsf %s: %s", - cur_tapedev, strerror(errno));; - error("could not fsf %s: %s", - cur_tapedev, strerror(errno)); - /*NOTREACHED*/ - } - } + print_header(stderr, source.header); + + restore(&source, flags); + aclose(source.u.holding_fd); + return TRUE; +} + +/* Ask for a specific manual tape. If we find the right one, then open it + * and return a Device handle. If not, return NULL. Pass a device name, but + * it might be overridden. */ +static Device* manual_find_tape(char ** cur_tapedev, tapelist_t * cur_volume, + FILE * prompt_out, FILE * prompt_in, + rst_flags_t * flags, + am_feature_t * features) { + LoadStatus status = LOAD_NEXT; + Device * rval; + + for (;;) { + status = load_manual_tape(cur_tapedev, prompt_out, prompt_in, + flags, features, cur_volume); + + if (status == LOAD_STOP) + return NULL; + + rval = conditional_device_open(*cur_tapedev, prompt_out, flags, + features, cur_volume); + if (rval != NULL) + return rval; } - tapefd_close(tapefd); +} - /* spit out our accumulated list of dumps, if we're inventorying */ - if (logstream) { - logline = log_genstring(L_START, "taper", - "datestamp %s label %s tape %d", - tapestart->datestamp, tapestart->name, - slot_num); - fprintf(logstream, "%s", logline); - for(fileentry=tape_seen->files; fileentry; fileentry=fileentry->next){ - logline = NULL; - switch (fileentry->file->type) { - case F_DUMPFILE: - logline = log_genstring(L_SUCCESS, "taper", - "%s %s %s %d [faked log entry]", - fileentry->file->name, - fileentry->file->disk, - fileentry->file->datestamp, - fileentry->file->dumplevel); - break; - case F_SPLIT_DUMPFILE: - logline = log_genstring(L_CHUNK, "taper", - "%s %s %s %d %d [faked log entry]", - fileentry->file->name, - fileentry->file->disk, - fileentry->file->datestamp, - fileentry->file->partnum, - fileentry->file->dumplevel); - break; - default: - break; +/* If we have a tapelist, then we mandate restoring in tapelist + order. The logic is simple: Get the next tape, and deal with it, + then move on to the next one. */ +static void +restore_from_tapelist(FILE * prompt_out, + FILE * prompt_in, + tapelist_t * tapelist, + GSList * dumpspecs, + rst_flags_t * flags, + am_feature_t * features, + char * cur_tapedev, + gboolean use_changer, + FILE * logstream) { + tapelist_t * cur_volume; + dumpfile_t first_restored_file; + seentapes_t * seentapes = NULL; + + fh_init(&first_restored_file); + + for(cur_volume = tapelist; cur_volume != NULL; + cur_volume = cur_volume->next){ + if (cur_volume->isafile) { + /* Restore from holding disk; just go. */ + if (first_restored_file.type == F_UNKNOWN) { + if (!restore_holding_disk(prompt_out, flags, + features, cur_volume, &seentapes, + NULL, NULL, &first_restored_file)) { + break; + } + } else { + restore_holding_disk(prompt_out, flags, features, + cur_volume, &seentapes, + NULL, &first_restored_file, NULL); } - if(logline){ - fprintf(logstream, "%s", logline); - amfree(logline); - fflush(logstream); + if (flags->pipe_to_fd == fileno(stdout)) { + break; } + } else { + Device * device = NULL; + if (use_changer) { + char * tapedev = NULL; + loadlabel_data data; + data.cur_tapedev = &tapedev; + data.searchlabel = cur_volume->label; + changer_find(&data, scan_init, loadlabel_slot, + cur_volume->label); + device = conditional_device_open(tapedev, prompt_out, + flags, features, + cur_volume); + amfree(tapedev); + } + + if (device == NULL) + device = manual_find_tape(&cur_tapedev, cur_volume, prompt_out, + prompt_in, flags, features); + + if (device == NULL) + break; + + if (use_changer) { + g_fprintf(stderr, "Scanning volume %s (slot %s)\n", + device->volume_label, + curslot); + } else { + g_fprintf(stderr, "Scanning volume %s\n", + device->volume_label); + } + + if (!search_a_tape(device, prompt_out, flags, features, + cur_volume, dumpspecs, &seentapes, + &first_restored_file, 0, logstream)) { + g_object_unref(device); + break; + } + g_object_unref(device); + } + } + + free_seen_tapes(seentapes); +} + +/* This function works when we are operating without a tapelist + (regardless of whether or not we have a changer). This only happens + when we are using amfetchdump without dump logs, but in the future + may include amrestore as well. The philosophy is to keep loading + tapes until we run out. */ +static void +restore_without_tapelist(FILE * prompt_out, + FILE * prompt_in, + GSList * dumpspecs, + rst_flags_t * flags, + am_feature_t * features, + char * cur_tapedev, + /* -1 if no changer. */ + int slot_count, + FILE * logstream) { + int cur_slot = 1; + seentapes_t * seentapes; + int tape_count = 0; + dumpfile_t first_restored_file; + + fh_init(&first_restored_file); + + /* This loop also aborts if we run out of manual tapes, or + encounter a changer error. */ + for (;;) { + Device * device = NULL; + if (slot_count > 0) { + while (cur_slot < slot_count && device == NULL) { + amfree(curslot); + changer_loadslot("next", &curslot, &cur_tapedev); + device = conditional_device_open(cur_tapedev, prompt_out, + flags, features, + NULL); + amfree(cur_tapedev); + cur_slot ++; + } + if (cur_slot >= slot_count) + break; + + g_fprintf(stderr, "Scanning %s (slot %s)\n", device->volume_label, + curslot); + } else { + device = manual_find_tape(&cur_tapedev, NULL, prompt_out, + prompt_in, flags, features); } + + if (device == NULL) + break;; + + if (!search_a_tape(device, prompt_out, flags, features, + NULL, dumpspecs, &seentapes, &first_restored_file, + tape_count, logstream)) { + g_object_unref(device); + break; + } + g_object_unref(device); + tape_count ++; } + + free_seen_tapes(seentapes); } /* @@ -1671,40 +1933,25 @@ search_a_tape( * tapes to search (rather than "everything I can find"), which in turn can * optionally list specific files to restore. */ -void + void search_tapes( FILE * prompt_out, - FILE *prompt_in, + FILE * prompt_in, int use_changer, tapelist_t * tapelist, - match_list_t * match_list, + GSList * dumpspecs, rst_flags_t * flags, am_feature_t * their_features) { - int have_changer = 1; - int slot_num = -1; + char *cur_tapedev; int slots = -1; FILE *logstream = NULL; tapelist_t *desired_tape = NULL; struct sigaction act, oact; - ssize_t read_result; - int slot; - char *label = NULL; - seentapes_t *seentapes = NULL; - int ret; - - if(!prompt_out) prompt_out = stderr; - dbprintf(("search_tapes(prompt_out=%d, prompt_in=%d, use_changer=%d, " - "tapelist=%p, " - "match_list=%p, flags=%p, features=%p)\n", - fileno(prompt_out), fileno(prompt_in), use_changer, tapelist, - match_list, flags, their_features)); + device_api_init(); - if(flags->blocksize) - blocksize = (size_t)flags->blocksize; - else if(blocksize == (size_t)SSIZE_MAX) - blocksize = DISK_BLOCK_BYTES; + if(!prompt_out) prompt_out = stderr; /* Don't die when child closes pipe */ signal(SIGPIPE, SIG_IGN); @@ -1714,7 +1961,7 @@ search_tapes( sigemptyset(&act.sa_mask); act.sa_flags = 0; if(sigaction(SIGINT, &act, &oact) != 0){ - error("error setting SIGINT handler: %s", strerror(errno)); + error(_("error setting SIGINT handler: %s"), strerror(errno)); /*NOTREACHED*/ } if(flags->delay_assemble || flags->inline_assemble) exitassemble = 1; @@ -1724,61 +1971,42 @@ search_tapes( if(flags->inventory_log) { if(!strcmp(flags->inventory_log, "-")) logstream = stdout; else if((logstream = fopen(flags->inventory_log, "w+")) == NULL) { - error("Couldn't open log file %s for writing: %s", + error(_("Couldn't open log file %s for writing: %s"), flags->inventory_log, strerror(errno)); /*NOTREACHED*/ } } /* Suss what tape device we're using, whether there's a changer, etc. */ - if(!use_changer || (have_changer = changer_init()) == 0) { + if (use_changer) { + use_changer = changer_init(); + } + if (!use_changer) { + cur_tapedev = NULL; if (flags->alt_tapedev) { cur_tapedev = stralloc(flags->alt_tapedev); } else if(!cur_tapedev) { cur_tapedev = getconf_str(CNF_TAPEDEV); if (cur_tapedev == NULL) { - error("No tapedev specified"); + error(_("No tapedev specified")); } } /* XXX oughta complain if no config is loaded */ - fprintf(stderr, "%s: Using tapedev %s\n", get_pname(), cur_tapedev); - have_changer = 0; - } else if (have_changer != 1) { - error("changer initialization failed: %s", strerror(errno)); - /*NOTREACHED*/ + g_fprintf(stderr, _("%s: Using tapedev %s\n"), get_pname(), cur_tapedev); } else{ /* good, the changer works, see what it can do */ amfree(curslot); changer_info(&slots, &curslot, &backwards); } - if(tapelist && !flags->amidxtaped){ - slots = num_entries(tapelist); - /* - Spit out a list of expected tapes, so people with manual changers know - what to load - */ - fprintf(prompt_out, "The following tapes are needed:"); - for(desired_tape = tapelist; desired_tape != NULL; - desired_tape = desired_tape->next){ - fprintf(prompt_out, " %s", desired_tape->label); - } - fprintf(prompt_out, "\n"); - fflush(prompt_out); - if(flags->wait_tape_prompt){ - char *input = NULL; - fprintf(prompt_out,"Press enter when ready\n"); - fflush(prompt_out); - input = agets(prompt_in); - amfree(input); - fprintf(prompt_out, "\n"); - fflush(prompt_out); - } + if (tapelist && !flags->amidxtaped) { + print_expected_tape_list(prompt_out, prompt_in, tapelist, flags); } desired_tape = tapelist; - if(use_changer && !cur_tapedev) { /* load current slot */ + if (use_changer) { /* load current slot */ amfree(curslot); + cur_tapedev = NULL; changer_loadslot("current", &curslot, &cur_tapedev); } @@ -1794,155 +2022,15 @@ search_tapes( * (obnoxious, isn't this?) */ - do { /* all desired tape */ - seentapes_t *tape_seen = NULL; - dumpfile_t file, tapestart, prev_rst_file; - int isafile = 0; - read_result = 0; - - slot_num = 0; - - memset(&file, 0, SIZEOF(file)); - - if (desired_tape && desired_tape->isafile) { - isafile = 1; - if ((tapefd = open(desired_tape->label, 0)) == -1) { - send_message(prompt_out, flags, their_features, - "could not open %s: %s", - desired_tape->label, strerror(errno)); - continue; - } - fprintf(stderr, "Reading %s to fd %d\n", - desired_tape->label, tapefd); - - read_result = read_file_header(&file, tapefd, 1, flags); - label = stralloc(desired_tape->label); - } else { - /* check current_slot */ - label = label_of_current_slot(cur_tapedev, prompt_out, - &tapefd, &file, flags, - their_features, &read_result, - desired_tape); - while (label==NULL && slot_num < slots && - use_changer) { - /* - * If we have an incorrect tape loaded, go try to find - * the right one - * (or just see what the next available one is). - */ - slot = load_next_tape(&cur_tapedev, prompt_out, - backwards, flags, - their_features, desired_tape); - if(slot == LOAD_STOP) { - slot_num = slots; - amfree(label); - } else { - if (slot == LOAD_CHANGER) - slot_num = slots; - else /* slot > 0 */ - slot_num += slot; - - /* check current_slot */ - label = label_of_current_slot(cur_tapedev, prompt_out, - &tapefd, &file, flags, - their_features, &read_result, - desired_tape); - } - } - - if (label == NULL) { - ret = load_manual_tape(&cur_tapedev, prompt_out, prompt_in, - flags, - their_features, desired_tape); - if (ret == 0) { - label = label_of_current_slot(cur_tapedev, prompt_out, - &tapefd, &file, flags, - their_features, &read_result, - desired_tape); - } - } - - if (label) - memcpy(&tapestart, &file, SIZEOF(dumpfile_t)); - } - - if (!label) - continue; - - /* - * Skip this tape if we did it already. Note that this would let - * duplicate labels through, so long as they were in the same slot. - * I'm over it, are you? - */ - if (!isafile) { - for (tape_seen = seentapes; tape_seen; - tape_seen = tape_seen->next) { - if (!strcmp(tape_seen->label, label) && - !strcmp(tape_seen->slotstr, curslot)){ - send_message(prompt_out, flags, their_features, - "Saw repeat tape %s in slot %s", - label, curslot); - amfree(label); - break; - } - } - } - - if(!label) - continue; - - if(!curslot) - curslot = stralloc(""); - - if(!isafile){ - fprintf(stderr, "Scanning %s (slot %s)\n", label, curslot); - fflush(stderr); - } - - tape_seen = alloc(SIZEOF(seentapes_t)); - memset(tape_seen, '\0', SIZEOF(seentapes_t)); - - tape_seen->label = label; - tape_seen->slotstr = stralloc(curslot); - tape_seen->next = seentapes; - tape_seen->files = NULL; - seentapes = tape_seen; - - /* - * Start slogging through the tape itself. If our tapelist (if we - * have one) contains a list of files to restore, obey that instead - * of checking for matching headers on all files. - */ - - search_a_tape(cur_tapedev, prompt_out, flags, their_features, - desired_tape, isafile, match_list, tape_seen, - &file, &prev_rst_file, &tapestart, slot_num, - &read_result); - - fprintf(stderr, "%s: Search of %s complete\n", - get_pname(), tape_seen->label); - if (desired_tape) desired_tape = desired_tape->next; - - /* only restore a single dump, if piping to stdout */ - if (!headers_equal(&prev_rst_file, &file, 1) && - flags->pipe_to_fd == fileno(stdout)) - break; - - } while (desired_tape); - - while (seentapes != NULL) { - seentapes_t *tape_seen = seentapes; - seentapes = seentapes->next; - while(tape_seen->files != NULL) { - dumplist_t *temp_dump = tape_seen->files; - tape_seen->files = temp_dump->next; - amfree(temp_dump->file); - amfree(temp_dump); - } - amfree(tape_seen->label); - amfree(tape_seen->slotstr); - amfree(tape_seen); - + if (tapelist) { + restore_from_tapelist(prompt_out, prompt_in, tapelist, dumpspecs, + flags, their_features, cur_tapedev, use_changer, + logstream); + } else { + restore_without_tapelist(prompt_out, prompt_in, dumpspecs, flags, + their_features, cur_tapedev, + (use_changer ? slots : -1), + logstream); } if(logstream && logstream != stderr && logstream != stdout){ @@ -1964,7 +2052,7 @@ new_rst_flags(void) memset(flags, 0, SIZEOF(rst_flags_t)); - flags->fsf = 1; + flags->fsf = 0; flags->comp_type = COMPRESS_FAST_OPT; flags->inline_assemble = 1; flags->pipe_to_fd = -1; @@ -1986,7 +2074,7 @@ check_rst_flags( if(!flags) return(-1); if(flags->compress && flags->leave_comp){ - fprintf(stderr, "Cannot specify 'compress output' and 'leave compression alone' together\n"); + g_fprintf(stderr, _("Cannot specify 'compress output' and 'leave compression alone' together\n")); ret = -1; } @@ -1994,28 +2082,28 @@ check_rst_flags( struct stat statinfo; if(flags->pipe_to_fd != -1){ - fprintf(stderr, "Specifying output directory and piping output are mutually exclusive\n"); + g_fprintf(stderr, _("Specifying output directory and piping output are mutually exclusive\n")); ret = -1; } if(stat(flags->restore_dir, &statinfo) < 0){ - fprintf(stderr, "Cannot stat restore target dir '%s': %s\n", + g_fprintf(stderr, _("Cannot stat restore target dir '%s': %s\n"), flags->restore_dir, strerror(errno)); ret = -1; } if((statinfo.st_mode & S_IFMT) != S_IFDIR){ - fprintf(stderr, "'%s' is not a directory\n", flags->restore_dir); + g_fprintf(stderr, _("'%s' is not a directory\n"), flags->restore_dir); ret = -1; } } if((flags->pipe_to_fd != -1 || flags->compress) && (flags->delay_assemble || !flags->inline_assemble)){ - fprintf(stderr, "Split dumps *must* be automatically reassembled when piping output or compressing/uncompressing\n"); + g_fprintf(stderr, _("Split dumps *must* be automatically reassembled when piping output or compressing/uncompressing\n")); ret = -1; } if(flags->delay_assemble && flags->inline_assemble){ - fprintf(stderr, "Inline split assembling and delayed assembling are mutually exclusive\n"); + g_fprintf(stderr, _("Inline split assembling and delayed assembling are mutually exclusive\n")); ret = -1; } @@ -2039,29 +2127,6 @@ free_rst_flags( } -/* - * Clean up after a match_list_t - */ -void -free_match_list( - match_list_t * match_list) -{ - match_list_t *me; - match_list_t *prev = NULL; - - for(me = match_list; me; me = me->next){ - /* XXX freeing these is broken? can't work out why */ -/* amfree(me->hostname); - amfree(me->diskname); - amfree(me->datestamp); - amfree(me->level); */ - amfree(prev); - prev = me; - } - amfree(prev); -} - - printf_arglist_function3( void send_message, FILE *, prompt_out, @@ -2073,13 +2138,13 @@ printf_arglist_function3( char linebuf[STR_SIZE]; arglist_start(argp, format); - vsnprintf(linebuf, SIZEOF(linebuf)-1, format, argp); + g_vsnprintf(linebuf, SIZEOF(linebuf)-1, format, argp); arglist_end(argp); - fprintf(stderr,"%s\n", linebuf); + g_fprintf(stderr,"%s\n", linebuf); if (flags->amidxtaped && their_features && am_has_feature(their_features, fe_amrecover_message)) { - fprintf(prompt_out, "MESSAGE %s\r\n", linebuf); + g_fprintf(prompt_out, "MESSAGE %s\r\n", linebuf); fflush(prompt_out); } } diff --git a/restore-src/restore.h b/restore-src/restore.h index ae11c8c..0277577 100644 --- a/restore-src/restore.h +++ b/restore-src/restore.h @@ -35,17 +35,10 @@ #include "fileheader.h" #include "tapelist.h" #include "amfeatures.h" +#include "device.h" #define CREAT_MODE 0640 -typedef struct match_list_s { - char *hostname; - char *diskname; - char *datestamp; - char *level; - struct match_list_s *next; -} match_list_t; - typedef struct rst_flags_s { unsigned int inline_assemble:1; unsigned int delay_assemble:1; @@ -67,27 +60,49 @@ typedef struct rst_flags_s { char *inventory_log; } rst_flags_t; +typedef struct { + enum { HOLDING_MODE, DEVICE_MODE} restore_mode; + dumpfile_t * header; + union { + int holding_fd; + Device * device; + } u; +} RestoreSource; + +typedef struct seentapes_s seentapes_t; + char *make_filename(dumpfile_t *file); -int disk_match(dumpfile_t *file, char *datestamp, - char *hostname, char *diskname, char *level); ssize_t read_file_header(dumpfile_t *file, int tapefd, int isafile, rst_flags_t *flags); -ssize_t restore(dumpfile_t *file, char *filename, int tapefd, int isafile, - rst_flags_t *flags); +void restore(RestoreSource * source, rst_flags_t * flags); +gboolean restore_holding_disk(FILE * prompt_out, + rst_flags_t * flags, + am_feature_t * features, + tapelist_t * file, + seentapes_t ** seen, + GSList * dumpspecs, + dumpfile_t * this_header, + dumpfile_t * last_header); + +gboolean search_a_tape(Device * device, FILE *prompt_out, rst_flags_t *flags, + am_feature_t *their_features, + tapelist_t *desired_tape, GSList *dumpspecs, + seentapes_t **tape_seen, + dumpfile_t * first_restored_file, int tape_count, + FILE * logstream); + void flush_open_outputs(int reassemble, dumpfile_t *only_file); void search_tapes(FILE *prompt_out, FILE *prompt_in, int use_changer, - tapelist_t *tapelist, match_list_t *restorethese, + tapelist_t *tapelist, GSList *dumpspecs, rst_flags_t *flags, am_feature_t *their_features); int have_all_parts(dumpfile_t *file, int upto); rst_flags_t *new_rst_flags(void); int check_rst_flags(rst_flags_t *flags); void free_rst_flags(rst_flags_t *flags); -void free_match_list(match_list_t *match_list); int lock_logfile(void); void send_message(FILE *prompt_out, rst_flags_t *flags, - am_feature_t *their_features, char * format, ...); - /* __attribute__ ((format (printf, 4, 5))); */ - + am_feature_t *their_features, + char * format, ...) G_GNUC_PRINTF(4,5); #endif /* RESTORE_H */ diff --git a/server-src/Makefile.am b/server-src/Makefile.am index c883daf..0a03c66 100644 --- a/server-src/Makefile.am +++ b/server-src/Makefile.am @@ -1,40 +1,73 @@ # Makefile for Amanda server programs. +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_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@ +AM_CFLAGS = $(AMANDA_WARNING_CFLAGS) +AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS) + +LINT=$(AMLINT) +LINTFLAGS=$(AMLINTFLAGS) + +amlib_LTLIBRARIES = libamserver.la -lib_LTLIBRARIES = libamserver.la -LIB_EXTENSION = la +sbin_PROGRAMS = amadmin amcheck \ + amflush amgetconf amlabel \ + amtape amreport -sbin_PROGRAMS = amadmin amcheck amflush \ - amgetconf amlabel amtape \ - amreport +noinst_PROGRAMS = taper_source_test -libexec_PROGRAMS = amindexd amlogroll amtrmidx \ +amlibexec_PROGRAMS = amindexd amlogroll amtrmidx \ amtrmlog driver dumper \ planner taper amcleanupdisk \ chunker -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 - -libamserver_la_LDFLAGS= -release $(VERSION) +# 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) ### # Because libamanda includes routines (e.g. regex) provided by some system @@ -43,41 +76,52 @@ libamserver_la_LDFLAGS= -release $(VERSION) # 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 -SUFFIXES = .sh .pl +taper_LDADD = $(LDADD) \ + ../amandad-src/libamandad.la -.pl: - cat $< > $@ - chmod a+x $@ - -test -z "$(PERL)" || $(PERL) -c -w -W -t -T $@ +taper_source_test_LDADD = $(LDADD) \ + ../amandad-src/libamandad.la -.sh: - cat $< > $@ - chmod a+x $@ +amindexd_LDADD = $(LDADD) \ + ../amandad-src/libamandad.la # there are used for testing only: TEST_PROGS = diskfile infofile EXTRA_PROGRAMS = $(TEST_PROGS) -CLEANFILES = *.test.c $(sbin_SCRIPTS) +CLEANFILES += *.test.c amindexd_CSRC = amindexd.c disk_history.c list_dir.c amindexd_SOURCES = disk_history.h list_dir.h $(amindexd_CSRC) @@ -86,58 +130,16 @@ 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 - -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 -## ## -## enterprise version will install dumper/planner suid ## -## ## - - @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; \ - fi; \ - done + taperscan.h taper-disk-port-source.h \ + taper-mem-port-source.h taper-file-source.h \ + taper-port-source.h taper-source.h 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 \ @@ -153,7 +155,7 @@ lint: (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 --git a/server-src/Makefile.in b/server-src/Makefile.in index 1b30e78..0651b1a 100644 --- a/server-src/Makefile.in +++ b/server-src/Makefile.in @@ -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. @@ -16,18 +16,137 @@ # 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,305 +161,309 @@ 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 @@ -351,9 +474,9 @@ 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@ @@ -368,7 +491,13 @@ 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 +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,52 +534,162 @@ 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@ @@ -459,7 +697,8 @@ 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 +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 +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 +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 +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 @@ -623,46 +949,69 @@ libamserver_la_LDFLAGS = -release $(VERSION) # 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 +1040,73 @@ $(top_srcdir)/configure: $(am__configure_deps) 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 +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 +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 +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 +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; \ @@ -1027,14 +1359,20 @@ distdir: $(DISTFILES) || 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 +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 +1425,27 @@ info: info-am 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 +1466,163 @@ ps: ps-am 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 \ @@ -1199,7 +1638,7 @@ lint: (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 --git a/server-src/amadmin.c b/server-src/amadmin.c index 526434c..9acacbc 100644 --- a/server-src/amadmin.c +++ b/server-src/amadmin.c @@ -40,6 +40,7 @@ #include "holding.h" #include "find.h" #include "util.h" +#include "timestamp.h" disklist_t diskq; @@ -78,7 +79,6 @@ void disklist(int argc, char **argv); void disklist_one(disk_t *dp); void show_version(int argc, char **argv); static void show_config(int argc, char **argv); -static void check_dumpuser(void); static char *conf_tapelist = NULL; static char *displayunit; @@ -90,50 +90,48 @@ static const struct { const char *usage; } cmdtab[] = { { "version", show_version, - "\t\t\t\t\t# Show version info." }, + T_("\t\t\t\t\t# Show version info.") }, { "config", show_config, - "\t\t\t\t\t# Show configuration." }, + T_("\t\t\t\t\t# Show configuration.") }, { "force", force, - " [ []* ]+\t\t# Force level 0 at next run." }, + T_(" [ []* ]+\t\t# Force level 0 at next run.") }, { "unforce", unforce, - " [ []* ]+\t# Clear force command." }, + T_(" [ []* ]+\t# Clear force command.") }, { "force-bump", force_bump, - " [ []* ]+\t# Force bump at next run." }, + T_(" [ []* ]+\t# Force bump at next run.") }, { "force-no-bump", force_no_bump, - " [ []* ]+\t# Force no-bump at next run." }, + T_(" [ []* ]+\t# Force no-bump at next run.") }, { "unforce-bump", unforce_bump, - " [ []* ]+\t# Clear bump command." }, + T_(" [ []* ]+\t# Clear bump command.") }, { "disklist", disklist, - " [ []* ]*\t# Debug disklist entries." }, + T_(" [ []* ]*\t# Debug disklist entries.") }, { "reuse", reuse, - " ...\t\t # re-use this tape." }, + T_(" ...\t\t # re-use this tape.") }, { "no-reuse", noreuse, - " ...\t # never re-use this tape." }, + T_(" ...\t # never re-use this tape.") }, { "find", find, - " [ []* ]*\t # Show which tapes these dumps are on." }, + T_(" [ []* ]*\t # Show which tapes these dumps are on.") }, { "holding", holding, - " {list [ -l ] |delete} [ [ [ [ .. ] ] ] ]+\t # Show or delete holding disk contents." }, + T_(" {list [ -l ] |delete} [ [ [ [ .. ] ] ] ]+\t # Show or delete holding disk contents.") }, { "delete", delete, - " [ []* ]+ # Delete from database." }, + T_(" [ []* ]+ # Delete from database.") }, { "info", info, - " [ []* ]*\t # Show current info records." }, + T_(" [ []* ]*\t # Show current info records.") }, { "due", due, - " [ []* ]*\t # Show due date." }, + T_(" [ []* ]*\t # Show due date.") }, { "balance", balance, - " [-days ]\t\t # Show nightly dump size balance." }, + T_(" [--days ]\t\t # Show nightly dump size balance.") }, { "tape", tape, - " [-days ]\t\t # Show which tape is due next." }, + T_(" [--days ]\t\t # Show which tape is due next.") }, { "bumpsize", bumpsize, - "\t\t\t # Show current bump thresholds." }, + T_("\t\t\t # Show current bump thresholds.") }, { "export", export_db, - " [ []* ]* # Export curinfo database to stdout." }, + T_(" [ []* ]* # Export curinfo database to stdout.") }, { "import", import_db, - "\t\t\t\t # Import curinfo database from stdin." }, + T_("\t\t\t\t # Import curinfo database from stdin.") }, }; #define NCMDS (int)(sizeof(cmdtab) / sizeof(cmdtab[0])) -static char *conffile; - int main( int argc, @@ -142,80 +140,63 @@ main( int i; char *conf_diskfile; char *conf_infofile; - unsigned long malloc_hist_1, malloc_size_1; - unsigned long malloc_hist_2, malloc_size_2; - 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(); set_pname("amadmin"); - dbopen(DBG_SUBDIR_SERVER); - /* Don't die when child closes pipe */ signal(SIGPIPE, SIG_IGN); - malloc_size_1 = malloc_inuse(&malloc_hist_1); + dbopen(DBG_SUBDIR_SERVER); erroutput_type = ERR_INTERACTIVE; - parse_conf(argc, argv, &new_argc, &new_argv); + cfg_ovr = extract_commandline_config_overwrites(&argc, &argv); - if(new_argc < 3) usage(); + if(argc < 3) usage(); - if(strcmp(new_argv[2],"version") == 0) { - show_version(new_argc, new_argv); + if(strcmp(argv[2],"version") == 0) { + show_version(argc, argv); goto done; } - config_name = new_argv[1]; - - 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[1]); + apply_config_overwrites(cfg_ovr); dbrename(config_name, DBG_SUBDIR_SERVER); - report_bad_conf_arg(); - - check_dumpuser(); + check_running_as(RUNNING_AS_DUMPUSER); - 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, &diskq) < 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*/ } - conf_infofile = getconf_str(CNF_INFOFILE); - if (*conf_infofile == '/') { - conf_infofile = stralloc(conf_infofile); - } else { - conf_infofile = stralloc2(config_dir, conf_infofile); - } + /* conf_tapelist is not freed yet -- it may be used to write the + * tapelist later. */ + + 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); @@ -224,33 +205,22 @@ main( unitdivisor = getconf_unit_divisor(); for (i = 0; i < NCMDS; i++) - if (strcmp(new_argv[2], cmdtab[i].name) == 0) { - (*cmdtab[i].fn)(new_argc, new_argv); + if (strcmp(argv[2], cmdtab[i].name) == 0) { + (*cmdtab[i].fn)(argc, argv); break; } if (i == NCMDS) { - fprintf(stderr, "%s: unknown command \"%s\"\n", new_argv[0], new_argv[2]); + g_fprintf(stderr, _("%s: unknown command \"%s\"\n"), argv[0], argv[2]); usage(); } - free_new_argv(new_argc, new_argv); - close_infofile(); clear_tapelist(); amfree(conf_tapelist); - amfree(config_dir); done: - 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); - } - - amfree(conffile); free_disklist(&diskq); - free_server_config(); dbclose(); return 0; } @@ -261,11 +231,11 @@ usage(void) { int i; - fprintf(stderr, "\nUsage: %s%s {} [-o configoption]* ...\n", + g_fprintf(stderr, _("\nUsage: %s%s {} [-o configoption]* ...\n"), get_pname(), versionsuffix()); - fprintf(stderr, " Valid s are:\n"); + g_fprintf(stderr, _(" Valid s are:\n")); for (i = 0; i < NCMDS; i++) - fprintf(stderr, "\t%s%s\n", cmdtab[i].name, cmdtab[i].usage); + g_fprintf(stderr, "\t%s%s\n", cmdtab[i].name, _(cmdtab[i].usage)); exit(1); } @@ -280,17 +250,25 @@ seqdatestr( int seq) { static char str[16]; - static char *dow[7] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; + static char *dow[7] = { + T_("Sun"), + T_("Mon"), + T_("Tue"), + T_("Wed"), + T_("Thu"), + T_("Fri"), + T_("Sat") + }; time_t t = today + seq*SECS_PER_DAY; struct tm *tm; tm = localtime(&t); if (tm) - snprintf(str, SIZEOF(str), - "%2d/%02d %3s", tm->tm_mon+1, tm->tm_mday, dow[tm->tm_wday]); + g_snprintf(str, SIZEOF(str), + "%2d/%02d %3s", tm->tm_mon+1, tm->tm_mday, _(dow[tm->tm_wday])); else - strcpy(str, "BAD DATE"); + strcpy(str, _("BAD DATE")); return str; } @@ -312,40 +290,6 @@ next_level0( return dp->dumpcycle - days_diff(info->inf[0].date, today); } -static void -check_dumpuser(void) -{ - static int been_here = 0; - uid_t uid_me; - uid_t uid_dumpuser; - char *dumpuser; - struct passwd *pw; - - if (been_here) { - return; - } - 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("ERROR: running as user \"%s\" instead of \"%s\"", - pw->pw_name, dumpuser); - /*NOTREACHED*/ - } - been_here = 1; - return; -} - /* ----------------------------------------------- */ void @@ -360,14 +304,14 @@ diskloop( char *errstr; if(argc < 4) { - fprintf(stderr,"%s: expecting \"%s [ []* ]+\"\n", + g_fprintf(stderr,_("%s: expecting \"%s [ []* ]+\"\n"), get_pname(), cmdname); usage(); } errstr = match_disklist(&diskq, argc-3, argv+3); if (errstr) { - printf("%s", errstr); + g_printf("%s", errstr); amfree(errstr); } @@ -378,7 +322,7 @@ diskloop( } } if(count==0) { - fprintf(stderr,"%s: no disk matched\n",get_pname()); + g_fprintf(stderr,_("%s: no disk matched\n"),get_pname()); } } @@ -393,21 +337,23 @@ force_one( char *diskname = dp->name; info_t info; -#if TEXTDB - check_dumpuser(); -#endif get_info(hostname, diskname, &info); SET(info.command, FORCE_FULL); if (ISSET(info.command, FORCE_BUMP)) { CLR(info.command, FORCE_BUMP); - printf("%s: WARNING: %s:%s FORCE_BUMP command was cleared.\n", + g_printf(_("%s: WARNING: %s:%s FORCE_BUMP command was cleared.\n"), get_pname(), hostname, diskname); } if(put_info(hostname, diskname, &info) == 0) { - printf("%s: %s:%s is set to a forced level 0 at next run.\n", - get_pname(), hostname, diskname); + if (dp->strategy == DS_INCRONLY) { + g_printf(_("%s: %s:%s, full dump done offline, next dump will be at level 1.\n"), + get_pname(), hostname, diskname); + } else { + g_printf(_("%s: %s:%s is set to a forced level 0 at next run.\n"), + get_pname(), hostname, diskname); + } } else { - fprintf(stderr, "%s: %s:%s could not be forced.\n", + g_fprintf(stderr, _("%s: %s:%s could not be forced.\n"), get_pname(), hostname, diskname); } } @@ -435,21 +381,18 @@ unforce_one( get_info(hostname, diskname, &info); if (ISSET(info.command, FORCE_FULL)) { -#if TEXTDB - check_dumpuser(); -#endif CLR(info.command, FORCE_FULL); if(put_info(hostname, diskname, &info) == 0){ - printf("%s: force command for %s:%s cleared.\n", + g_printf(_("%s: force command for %s:%s cleared.\n"), get_pname(), hostname, diskname); } else { - fprintf(stderr, - "%s: force command for %s:%s could not be cleared.\n", + g_fprintf(stderr, + _("%s: force command for %s:%s could not be cleared.\n"), get_pname(), hostname, diskname); } } else { - printf("%s: no force command outstanding for %s:%s, unchanged.\n", + g_printf(_("%s: no force command outstanding for %s:%s, unchanged.\n"), get_pname(), hostname, diskname); } } @@ -474,26 +417,23 @@ force_bump_one( char *diskname = dp->name; info_t info; -#if TEXTDB - check_dumpuser(); -#endif get_info(hostname, diskname, &info); SET(info.command, FORCE_BUMP); if (ISSET(info.command, FORCE_NO_BUMP)) { CLR(info.command, FORCE_NO_BUMP); - printf("%s: WARNING: %s:%s FORCE_NO_BUMP command was cleared.\n", + g_printf(_("%s: WARNING: %s:%s FORCE_NO_BUMP command was cleared.\n"), get_pname(), hostname, diskname); } if (ISSET(info.command, FORCE_FULL)) { CLR(info.command, FORCE_FULL); - printf("%s: WARNING: %s:%s FORCE_FULL command was cleared.\n", + g_printf(_("%s: WARNING: %s:%s FORCE_FULL command was cleared.\n"), get_pname(), hostname, diskname); } if(put_info(hostname, diskname, &info) == 0) { - printf("%s: %s:%s is set to bump at next run.\n", + g_printf(_("%s: %s:%s is set to bump at next run.\n"), get_pname(), hostname, diskname); } else { - fprintf(stderr, "%s: %s:%s could not be forced to bump.\n", + g_fprintf(stderr, _("%s: %s:%s could not be forced to bump.\n"), get_pname(), hostname, diskname); } } @@ -519,21 +459,18 @@ force_no_bump_one( char *diskname = dp->name; info_t info; -#if TEXTDB - check_dumpuser(); -#endif get_info(hostname, diskname, &info); SET(info.command, FORCE_NO_BUMP); if (ISSET(info.command, FORCE_BUMP)) { CLR(info.command, FORCE_BUMP); - printf("%s: WARNING: %s:%s FORCE_BUMP command was cleared.\n", + g_printf(_("%s: WARNING: %s:%s FORCE_BUMP command was cleared.\n"), get_pname(), hostname, diskname); } if(put_info(hostname, diskname, &info) == 0) { - printf("%s: %s:%s is set to not bump at next run.\n", + g_printf(_("%s: %s:%s is set to not bump at next run.\n"), get_pname(), hostname, diskname); } else { - fprintf(stderr, "%s: %s:%s could not be force to not bump.\n", + g_fprintf(stderr, _("%s: %s:%s could not be force to not bump.\n"), get_pname(), hostname, diskname); } } @@ -561,20 +498,17 @@ unforce_bump_one( get_info(hostname, diskname, &info); if (ISSET(info.command, FORCE_BUMP|FORCE_NO_BUMP)) { -#if TEXTDB - check_dumpuser(); -#endif CLR(info.command, FORCE_BUMP|FORCE_NO_BUMP); if(put_info(hostname, diskname, &info) == 0) { - printf("%s: bump command for %s:%s cleared.\n", + g_printf(_("%s: bump command for %s:%s cleared.\n"), get_pname(), hostname, diskname); } else { - fprintf(stderr, "%s: %s:%s bump command could not be cleared.\n", + g_fprintf(stderr, _("%s: %s:%s bump command could not be cleared.\n"), get_pname(), hostname, diskname); } } else { - printf("%s: no bump command outstanding for %s:%s, unchanged.\n", + g_printf(_("%s: no bump command outstanding for %s:%s, unchanged.\n"), get_pname(), hostname, diskname); } } @@ -600,31 +534,30 @@ reuse( int count; if(argc < 4) { - fprintf(stderr,"%s: expecting \"reuse ...\"\n", + g_fprintf(stderr,_("%s: expecting \"reuse ...\"\n"), get_pname()); usage(); } - check_dumpuser(); for(count=3; count< argc; count++) { tp = lookup_tapelabel(argv[count]); if ( tp == NULL) { - fprintf(stderr, "reuse: tape label %s not found in tapelist.\n", + g_fprintf(stderr, _("reuse: tape label %s not found in tapelist.\n"), argv[count]); continue; } if( tp->reuse == 0 ) { tp->reuse = 1; - printf("%s: marking tape %s as reusable.\n", + g_printf(_("%s: marking tape %s as reusable.\n"), get_pname(), argv[count]); } else { - fprintf(stderr, "%s: tape %s already reusable.\n", + g_fprintf(stderr, _("%s: tape %s already reusable.\n"), get_pname(), argv[count]); } } if(write_tapelist(conf_tapelist)) { - error("could not write tapelist \"%s\"", conf_tapelist); + error(_("could not write tapelist \"%s\""), conf_tapelist); /*NOTREACHED*/ } } @@ -638,31 +571,30 @@ noreuse( int count; if(argc < 4) { - fprintf(stderr,"%s: expecting \"no-reuse ...\"\n", + g_fprintf(stderr,_("%s: expecting \"no-reuse ...\"\n"), get_pname()); usage(); } - check_dumpuser(); for(count=3; count< argc; count++) { tp = lookup_tapelabel(argv[count]); if ( tp == NULL) { - fprintf(stderr, "no-reuse: tape label %s not found in tapelist.\n", + g_fprintf(stderr, _("no-reuse: tape label %s not found in tapelist.\n"), argv[count]); continue; } if( tp->reuse == 1 ) { tp->reuse = 0; - printf("%s: marking tape %s as not reusable.\n", + g_printf(_("%s: marking tape %s as not reusable.\n"), get_pname(), argv[count]); } else { - fprintf(stderr, "%s: tape %s already not reusable.\n", + g_fprintf(stderr, _("%s: tape %s already not reusable.\n"), get_pname(), argv[count]); } } if(write_tapelist(conf_tapelist)) { - error("could not write tapelist \"%s\"", conf_tapelist); + error(_("could not write tapelist \"%s\""), conf_tapelist); /*NOTREACHED*/ } } @@ -681,18 +613,18 @@ delete_one( info_t info; if(get_info(hostname, diskname, &info)) { - printf("%s: %s:%s NOT currently in database.\n", + g_printf(_("%s: %s:%s NOT currently in database.\n"), get_pname(), hostname, diskname); return; } deleted++; if(del_info(hostname, diskname)) { - error("couldn't delete %s:%s from database: %s", + error(_("couldn't delete %s:%s from database: %s"), hostname, diskname, strerror(errno)); /*NOTREACHED*/ } else { - printf("%s: %s:%s deleted from curinfo database.\n", + g_printf(_("%s: %s:%s deleted from curinfo database.\n"), get_pname(), hostname, diskname); } } @@ -706,8 +638,8 @@ delete( diskloop(argc, argv, "delete", delete_one); if(deleted) - printf( - "%s: NOTE: you'll have to remove these from the disklist yourself.\n", + g_printf( + _("%s: NOTE: you'll have to remove these from the disklist yourself.\n"), get_pname()); } @@ -724,44 +656,42 @@ info_one( get_info(dp->host->hostname, dp->name, &info); - printf("\nCurrent info for %s %s:\n", dp->host->hostname, dp->name); + g_printf(_("\nCurrent info for %s %s:\n"), dp->host->hostname, dp->name); if (ISSET(info.command, FORCE_FULL)) - printf(" (Forcing to level 0 dump at next run)\n"); + g_printf(_(" (Forcing to level 0 dump at next run)\n")); if (ISSET(info.command, FORCE_BUMP)) - printf(" (Forcing bump at next run)\n"); + g_printf(_(" (Forcing bump at next run)\n")); if (ISSET(info.command, FORCE_NO_BUMP)) - printf(" (Forcing no-bump at next run)\n"); - printf(" Stats: dump rates (kps), Full: %5.1lf, %5.1lf, %5.1lf\n", + g_printf(_(" (Forcing no-bump at next run)\n")); + g_printf(_(" Stats: dump rates (kps), Full: %5.1lf, %5.1lf, %5.1lf\n"), info.full.rate[0], info.full.rate[1], info.full.rate[2]); - printf(" Incremental: %5.1lf, %5.1lf, %5.1lf\n", + g_printf(_(" Incremental: %5.1lf, %5.1lf, %5.1lf\n"), info.incr.rate[0], info.incr.rate[1], info.incr.rate[2]); - printf(" compressed size, Full: %5.1lf%%,%5.1lf%%,%5.1lf%%\n", + g_printf(_(" compressed size, Full: %5.1lf%%,%5.1lf%%,%5.1lf%%\n"), info.full.comp[0]*100, info.full.comp[1]*100, info.full.comp[2]*100); - printf(" Incremental: %5.1lf%%,%5.1lf%%,%5.1lf%%\n", + g_printf(_(" Incremental: %5.1lf%%,%5.1lf%%,%5.1lf%%\n"), info.incr.comp[0]*100, info.incr.comp[1]*100, info.incr.comp[2]*100); - printf(" Dumps: lev datestmp tape file origK compK secs\n"); + g_printf(_(" Dumps: lev datestmp tape file origK compK secs\n")); for(lev = 0, sp = &info.inf[0]; lev < 9; lev++, sp++) { if(sp->date < (time_t)0 && sp->label[0] == '\0') continue; tm = localtime(&sp->date); if (tm) { - printf(" %d %04d%02d%02d %-15s " - OFF_T_FMT " " OFF_T_FMT " " OFF_T_FMT " " TIME_T_FMT "\n", + g_printf(_(" %d %04d%02d%02d %-15s %lld %lld %lld %jd\n"), lev, tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, sp->label, - (OFF_T_FMT_TYPE)sp->filenum, - (OFF_T_FMT_TYPE)sp->size, - (OFF_T_FMT_TYPE)sp->csize, - (TIME_T_FMT_TYPE)sp->secs); + (long long)sp->filenum, + (long long)sp->size, + (long long)sp->csize, + (intmax_t)sp->secs); } else { - printf(" %d BAD-DATE %-15s " - OFF_T_FMT " " OFF_T_FMT " " OFF_T_FMT " " TIME_T_FMT "\n", + g_printf(_(" %d BAD-DATE %-15s %lld %lld %lld %jd\n"), lev, sp->label, - (OFF_T_FMT_TYPE)sp->filenum, - (OFF_T_FMT_TYPE)sp->size, - (OFF_T_FMT_TYPE)sp->csize, - (TIME_T_FMT_TYPE)sp->secs); + (long long)sp->filenum, + (long long)sp->size, + (long long)sp->csize, + (intmax_t)sp->secs); } } } @@ -793,20 +723,20 @@ due_one( hp = dp->host; if(get_info(hp->hostname, dp->name, &info)) { - printf("new disk %s:%s ignored.\n", hp->hostname, dp->name); + g_printf(_("new disk %s:%s ignored.\n"), hp->hostname, dp->name); } else { days = next_level0(dp, &info); if(days < 0) { - printf("Overdue %2d day%s %s:%s\n", + g_printf(_("Overdue %2d day%s %s:%s\n"), -days, (-days == 1) ? ": " : "s:", hp->hostname, dp->name); } else if(days == 0) { - printf("Due today: %s:%s\n", hp->hostname, dp->name); + g_printf(_("Due today: %s:%s\n"), hp->hostname, dp->name); } else { - printf("Due in %2d day%s %s:%s\n", days, + g_printf(_("Due in %2d day%s %s:%s\n"), days, (days == 1) ? ": " : "s:", hp->hostname, dp->name); } @@ -835,14 +765,17 @@ tape( int argc, char ** argv) { - tape_t *tp, *lasttp; - int runtapes, i, j; - int nb_days = 1; + int nb_days = 1; + int runtapes; + tape_t *tp; + int i, j; + int skip; + int nb_new_tape; if(argc > 4 && strcmp(argv[3],"--days") == 0) { nb_days = atoi(argv[4]); if(nb_days < 1) { - printf("days must be an integer bigger than 0\n"); + g_printf(_("days must be an integer bigger than 0\n")); return; } if (nb_days > 10000) @@ -851,54 +784,41 @@ tape( runtapes = getconf_int(CNF_RUNTAPES); tp = lookup_last_reusable_tape(0); + skip = 0; for ( j=0 ; j < nb_days ; j++ ) { + nb_new_tape=0; for ( i=0 ; i < runtapes ; i++ ) { if(i==0) - printf("The next Amanda run should go onto "); - else - printf(" "); + g_fprintf(stdout, _("The next Amanda run should go onto ")); if(tp != NULL) { - printf("tape %s or a new tape.\n", tp->label); + if (nb_new_tape > 0) { + if (nb_new_tape == 1) + g_fprintf(stdout, _("1 new tape.\n")); + else + g_fprintf(stdout, _("%d new tapes.\n"), nb_new_tape); + g_fprintf(stdout, " "); + nb_new_tape = 0; + } + g_fprintf(stdout, _("tape %s or a new tape.\n"), tp->label); + if (i < runtapes-1) + g_fprintf(stdout, " "); } else { - if (runtapes - i == 1) - printf("1 new tape.\n"); - else - printf("%d new tapes.\n", runtapes - i); - i = runtapes; + nb_new_tape++; } - - tp = lookup_last_reusable_tape(i + 1); - } - } - lasttp = lookup_tapepos(lookup_nb_tape()); - i = runtapes; - if(lasttp && i > 0 && strcmp(lasttp->datestamp,"0") == 0) { - int c = 0; - while(lasttp && i > 0 && strcmp(lasttp->datestamp,"0") == 0) { - c++; - lasttp = lasttp->prev; - i--; - } - lasttp = lookup_tapepos(lookup_nb_tape()); - i = runtapes; - if(c == 1) { - printf("The next new tape already labelled is: %s.\n", - lasttp->label); + skip++; + + tp = lookup_last_reusable_tape(skip); } - else { - printf("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) { - printf(", %s", lasttp->label); - lasttp = lasttp->prev; - c--; - } - printf(".\n"); + if (nb_new_tape > 0) { + if (nb_new_tape == 1) + g_fprintf(stdout, _("1 new tape.\n")); + else + g_fprintf(stdout, _("%d new tapes.\n"), nb_new_tape); } } + + print_new_tapes(stdout, nb_days * runtapes); } /* ----------------------------------------------- */ @@ -959,7 +879,7 @@ balance( for(dp = diskq.head; dp != NULL; dp = dp->next) { if(get_info(dp->host->hostname, dp->name, &info)) { - printf("new disk %s:%s ignored.\n", dp->host->hostname, dp->name); + g_printf(_("new disk %s:%s ignored.\n"), dp->host->hostname, dp->name); continue; } if (dp->strategy == DS_NOFULL) { @@ -1016,7 +936,7 @@ balance( } if(sp[total].outsize == (off_t)0 && sp[later].outsize == (off_t)0) { - printf("\nNo data to report on yet.\n"); + g_printf(_("\nNo data to report on yet.\n")); amfree(sp); return; } @@ -1031,9 +951,9 @@ balance( } empty_day = 0; - printf("\n due-date #fs orig %cB out %cB balance\n", + g_printf(_("\n due-date #fs orig %cB out %cB balance\n"), displayunit[0], displayunit[0]); - printf("----------------------------------------------\n"); + g_printf("----------------------------------------------\n"); for(seq = 0; seq < later; seq++) { if(sp[seq].disks == 0 && ((seq > 0 && sp[seq-1].disks == 0) || @@ -1042,56 +962,61 @@ balance( } else { if(empty_day > 0) { - printf("\n"); + g_printf("\n"); empty_day = 0; } - printf("%-9.9s %3d " OFF_T_FMT " " OFF_T_FMT " ", + g_printf(_("%-9.9s %3d %10lld %10lld "), seqdatestr(seq), sp[seq].disks, - (OFF_T_FMT_TYPE)sp[seq].origsize, - (OFF_T_FMT_TYPE)sp[seq].outsize); - if(!sp[seq].outsize) printf(" --- \n"); - else printf("%+8.1lf%%\n", + (long long)sp[seq].origsize, + (long long)sp[seq].outsize); + if(!sp[seq].outsize) g_printf(" --- \n"); + else g_printf(_("%+8.1lf%%\n"), (((double)sp[seq].outsize - (double)balanced) * 100.0 / (double)balanced)); } } if(sp[later].disks != 0) { - printf("later %3d " OFF_T_FMT " " OFF_T_FMT " ", + g_printf(_("later %3d %10lld %10lld "), sp[later].disks, - (OFF_T_FMT_TYPE)sp[later].origsize, - (OFF_T_FMT_TYPE)sp[later].outsize); - if(!sp[later].outsize) printf(" --- \n"); - else printf("%+8.1lf%%\n", + (long long)sp[later].origsize, + (long long)sp[later].outsize); + if(!sp[later].outsize) g_printf(" --- \n"); + else g_printf(_("%+8.1lf%%\n"), (((double)sp[later].outsize - (double)balanced) * 100.0 / (double)balanced)); } - printf("----------------------------------------------\n"); - printf("TOTAL %3d " OFF_T_FMT " " OFF_T_FMT " " OFF_T_FMT "\n", + g_printf("----------------------------------------------\n"); + g_printf(_("TOTAL %3d %10lld %10lld %9lld\n"), sp[total].disks, - (OFF_T_FMT_TYPE)sp[total].origsize, - (OFF_T_FMT_TYPE)sp[total].outsize, - (OFF_T_FMT_TYPE)total_balanced); + (long long)sp[total].origsize, + (long long)sp[total].outsize, + (long long)total_balanced); if (sp[balance].origsize != sp[total].origsize || sp[balance].outsize != sp[total].outsize || balanced != total_balanced) { - printf("BALANCED " OFF_T_FMT " " OFF_T_FMT " " OFF_T_FMT "\n", - (OFF_T_FMT_TYPE)sp[balance].origsize, - (OFF_T_FMT_TYPE)sp[balance].outsize, - (OFF_T_FMT_TYPE)balanced); + g_printf(_("BALANCED %10lld %10lld %9lld\n"), + (long long)sp[balance].origsize, + (long long)sp[balance].outsize, + (long long)balanced); } if (sp[distinct].disks != sp[total].disks) { - printf("DISTINCT %3d " OFF_T_FMT " " OFF_T_FMT "\n", + g_printf(_("DISTINCT %3d %10lld %10lld\n"), sp[distinct].disks, - (OFF_T_FMT_TYPE)sp[distinct].origsize, - (OFF_T_FMT_TYPE)sp[distinct].outsize); + (long long)sp[distinct].origsize, + (long long)sp[distinct].outsize); } - printf(" (estimated %d run%s per dumpcycle)\n", - runs_per_cycle, (runs_per_cycle == 1) ? "" : "s"); + g_printf(plural(_(" (estimated %d run per dumpcycle)\n"), + _(" (estimated %d runs per dumpcycle)\n"), + runs_per_cycle), + runs_per_cycle); if (overdue) { - printf(" (%d filesystem%s overdue, the most being overdue %d day%s)\n", - overdue, (overdue == 1) ? "" : "s", - max_overdue, (max_overdue == 1) ? "" : "s"); + g_printf(plural(_(" (%d filesystem overdue."), + _(" (%d filesystems overdue."), overdue), + overdue); + g_printf(plural(_(" The most being overdue %d day.)\n"), + _(" The most being overdue %d days.)\n"), max_overdue), + max_overdue); } amfree(sp); } @@ -1110,8 +1035,8 @@ find( char *errstr; if(argc < 3) { - fprintf(stderr, - "%s: expecting \"find [--sort ] [hostname []]*\"\n", + g_fprintf(stderr, + _("%s: expecting \"find [--sort ] [hostname []]*\"\n"), get_pname()); usage(); } @@ -1129,6 +1054,8 @@ find( case 'K': case 'd': case 'D': + case 'f': + case 'F': case 'l': case 'L': case 'p': @@ -1142,8 +1069,8 @@ find( if(valid_sort) { sort_order = newstralloc(sort_order, argv[4]); } else { - printf("Invalid sort order: %s\n", argv[4]); - printf("Use default sort order: %s\n", sort_order); + g_printf(_("Invalid sort order: %s\n"), argv[4]); + g_printf(_("Use default sort order: %s\n"), sort_order); } start_argc=6; } else { @@ -1151,20 +1078,20 @@ find( } errstr = match_disklist(&diskq, argc-(start_argc-1), argv+(start_argc-1)); if (errstr) { - printf("%s", errstr); + g_printf("%s", errstr); amfree(errstr); } - output_find = find_dump(1, &diskq); + output_find = find_dump(&diskq); if(argc-(start_argc-1) > 0) { free_find_result(&output_find); errstr = match_disklist(&diskq, argc-(start_argc-1), argv+(start_argc-1)); if (errstr) { - printf("%s", errstr); + g_printf("%s", errstr); amfree(errstr); } - output_find = find_dump(0, NULL); + output_find = find_dump(NULL); } sort_find_result(sort_order, &output_find); @@ -1177,62 +1104,47 @@ find( /* ------------------------ */ -static sl_t * +static GSList * get_file_list( int argc, char **argv, int allow_empty) { - sl_t * file_list = NULL; - dumpspec_list_t * dumplist; - - if (argc > 0) { - dumplist = cmdline_parse_dumpspecs(argc, argv); - if (!dumplist) { - fprintf(stderr, _("Could not get dump list\n")); - return NULL; - } + GSList * file_list = NULL; + GSList * dumplist; + int flags; - file_list = cmdline_match_holding(dumplist); - dumpspec_free_list(dumplist); - } else if (allow_empty) { - /* just list all of them */ - file_list = holding_get_files(NULL, NULL, 1); - } + flags = CMDLINE_PARSE_DATESTAMP; + if (allow_empty) flags |= CMDLINE_EMPTY_TO_WILDCARD; + dumplist = cmdline_parse_dumpspecs(argc, argv, flags); + + file_list = cmdline_match_holding(dumplist); + dumpspec_list_free(dumplist); return file_list; } +/* Given a file header, find the history element in curinfo most likely + * corresponding to that dump (this is not an exact science). + * + * @param info: the info_t element for this DLE + * @param file: the header of the file + * @returns: index of the matching history element, or -1 if not found + */ static int -remove_holding_file_from_catalog( - char *filename) +holding_file_find_history( + info_t *info, + dumpfile_t *file) { - static int warnings_printed; /* only print once per invocation */ - char *host; - char *disk; - int level; - char *datestamp; - info_t info; int matching_hist_idx = -1; - history_t matching_hist; /* will be a copy */ int nhist; int i; - if (!holding_file_read_header(filename, &host, &disk, &level, &datestamp)) { - printf(_("Could not read holding file %s\n"), filename); - return 0; - } - - if (get_info(host, disk, &info) == -1) { - printf(_("WARNING: No curinfo record for %s:%s\n"), host, disk); - return 1; /* not an error */ - } - /* Begin by trying to find the history element matching this dump. * The datestamp on the dump is for the entire run of amdump, while the * 'date' in the history element of 'info' is the time the dump itself * began. A matching history element, then, is the earliest element - * with a 'date' equal to or later than the date of the dumpfile. + * with a 'date' equal to or later than the date of the dumpfile. * * We compare using formatted datestamps; even using seconds since epoch, * we would still face timezone issues, and have to do a reverse (timezone @@ -1240,27 +1152,96 @@ remove_holding_file_from_catalog( */ /* get to the end of the history list and search backward */ - for (nhist = 0; info.history[nhist].level > -1; nhist++) /* empty loop */; + for (nhist = 0; info->history[nhist].level > -1; nhist++) /* empty loop */; for (i = nhist-1; i > -1; i--) { - char *info_datestamp = construct_timestamp(&info.history[i].date); - int order = strcmp(datestamp, info_datestamp); + char *info_datestamp = get_timestamp_from_time(info->history[i].date); + int order = strcmp(file->datestamp, info_datestamp); amfree(info_datestamp); if (order <= 0) { /* only a match if the levels are equal */ - if (info.history[i].level == level) { + if (info->history[i].level == file->dumplevel) { matching_hist_idx = i; - matching_hist = info.history[matching_hist_idx]; } break; } } + return matching_hist_idx; +} + +/* A holding file is 'outdated' if a subsequent dump of the same DLE was made + * at the same level or a lower leve; for example, a level 2 dump is outdated if + * there is a subsequent level 2, or a subsequent level 0. + * + * @param file: the header of the file + * @returns: true if the file is outdated + */ +static int +holding_file_is_outdated( + dumpfile_t *file) +{ + info_t info; + int matching_hist_idx; + + if (get_info(file->name, file->disk, &info) == -1) { + return 0; /* assume it's not outdated */ + } + + /* if the last level is less than the level of this dump, then + * it's outdated */ + if (info.last_level < file->dumplevel) + return 1; + + /* otherwise, we need to see if this dump is the last at its level */ + matching_hist_idx = holding_file_find_history(&info, file); if (matching_hist_idx == -1) { - printf(_("WARNING: No dump matching %s found in curinfo.\n"), filename); - return 1; /* not an error */ + return 0; /* assume it's not outdated */ } + /* compare the date of the history element with the most recent date + * for this level. If they match, then this is the last dump at this + * level, and we checked above for more recent lower-level dumps, so + * the dump is not outdated. */ + if (info.history[matching_hist_idx].date == + info.inf[info.history[matching_hist_idx].level].date) { + return 0; + } else { + return 1; + } +} + +static int +remove_holding_file_from_catalog( + char *filename) +{ + static int warnings_printed; /* only print once per invocation */ + dumpfile_t file; + info_t info; + int matching_hist_idx = -1; + history_t matching_hist; /* will be a copy */ + int i; + + if (!holding_file_get_dumpfile(filename, &file)) { + g_printf(_("Could not read holding file %s\n"), filename); + return 0; + } + + if (get_info(file.name, file.disk, &info) == -1) { + g_printf(_("WARNING: No curinfo record for %s:%s\n"), file.name, file.disk); + return 1; /* not an error */ + } + + matching_hist_idx = holding_file_find_history(&info, &file); + + if (matching_hist_idx == -1) { + g_printf(_("WARNING: No dump matching %s found in curinfo.\n"), filename); + return 1; /* not an error */ + } + + /* make a copy */ + matching_hist = info.history[matching_hist_idx]; + /* Remove the history element itself before doing the stats */ for (i = matching_hist_idx; i <= NB_HISTORY; i++) { info.history[i] = info.history[i+1]; @@ -1297,10 +1278,10 @@ remove_holding_file_from_catalog( * or lower */ info.last_level = matching_hist.level; if (info.last_level == 0) { - printf(_("WARNING: Deleting the most recent full dump; forcing a full dump at next run.\n")); + g_printf(_("WARNING: Deleting the most recent full dump; forcing a full dump at next run.\n")); SET(info.command, FORCE_FULL); } else { - printf(_("WARNING: Deleting the most recent level %d dump; forcing a level %d dump or \nWARNING: lower at next run.\n"), + g_printf(_("WARNING: Deleting the most recent level %d dump; forcing a level %d dump or \nWARNING: lower at next run.\n"), info.last_level, info.last_level); SET(info.command, FORCE_NO_BUMP); } @@ -1311,15 +1292,15 @@ remove_holding_file_from_catalog( char *datestamp; if (info.history[i].level <= matching_hist.level) break; - datestamp = construct_timestamp(&info.history[i].date); - printf(_("WARNING: Level %d dump made %s can no longer be accurately restored.\n"), + datestamp = get_timestamp_from_time(info.history[i].date); + g_printf(_("WARNING: Level %d dump made %s can no longer be accurately restored.\n"), info.history[i].level, datestamp); amfree(datestamp); warnings_printed = 1; } if (warnings_printed) - printf(_("WARNING: (note, dates shown above are for dumps, and may be later than the\nWARNING: corresponding run date)\n")); + g_printf(_("WARNING: (note, dates shown above are for dumps, and may be later than the\nWARNING: corresponding run date)\n")); } /* recalculate consecutive_runs based on the history: find the first run @@ -1335,26 +1316,25 @@ remove_holding_file_from_catalog( /* this function doesn't touch the performance stats */ /* write out the changes */ - if (put_info(host, disk, &info) == -1) { - printf(_("Could not write curinfo record for %s:%s\n"), host, disk); + if (put_info(file.name, file.disk, &info) == -1) { + g_printf(_("Could not write curinfo record for %s:%s\n"), file.name, file.disk); return 0; } return 1; } + void holding( int argc, char ** argv) { - sl_t *file_list; - sle_t *h; + GSList *file_list; + GSList *li; enum { HOLDING_USAGE, HOLDING_LIST, HOLDING_DELETE } action = HOLDING_USAGE; - char *host; - char *disk; - char *datestamp; - int level; int long_list = 0; + int outdated_list = 0; + dumpfile_t file; if (argc < 4) action = HOLDING_USAGE; @@ -1363,63 +1343,85 @@ holding( else if (strcmp(argv[3], "delete") == 0 && argc > 4) action = HOLDING_DELETE; - holding_set_verbosity(1); - switch (action) { case HOLDING_USAGE: - fprintf(stderr, - _("%s: expecting \"holding list [-l]\" or \"holding delete [ .. ]\"\n"), + g_fprintf(stderr, + _("%s: expecting \"holding list [-l] [-d]\" or \"holding delete [ .. ]\"\n"), get_pname()); usage(); return; case HOLDING_LIST: argc -= 4; argv += 4; - if (argc && strcmp(argv[0], "-l") == 0) { - argc--; argv++; - long_list = 1; - } + while (argc && argv[0][0] == '-') { + switch (argv[0][1]) { + case 'l': + long_list = 1; + break; + case 'd': /* have to use '-d', and not '-o', because of parse_config */ + outdated_list = 1; + break; + default: + g_fprintf(stderr, _("Unknown option -%c\n"), argv[0][1]); + usage(); + return; + } + argc--; argv++; + } - file_list = get_file_list(argc, argv, 1); + /* header */ if (long_list) { - printf("%-10s %-2s %s\n", "size (kB)", "lv", "dump specification"); + g_printf("%-10s %-2s %-4s %s\n", + _("size (kB)"), _("lv"), _("outd"), _("dump specification")); } - for (h = file_list->first; h != NULL; h = h->next) { + + file_list = get_file_list(argc, argv, 1); + for (li = file_list; li != NULL; li = li->next) { char *dumpstr; - if (!holding_file_read_header(h->name, &host, &disk, &level, &datestamp)) { - fprintf(stderr, _("Error reading %s\n"), h->name); + int is_outdated; + + if (!holding_file_get_dumpfile((char *)li->data, &file)) { + g_fprintf(stderr, _("Error reading %s\n"), (char *)li->data); continue; } - dumpstr = cmdline_format_dumpspec_components(host, disk, datestamp); - if (long_list) { - printf("%-10"OFF_T_RFMT" %-2d %s\n", - (OFF_T_FMT_TYPE)holding_file_size(h->name, 0), level, dumpstr); - } else { - printf("%s\n", dumpstr); - } + is_outdated = holding_file_is_outdated(&file); + + dumpstr = cmdline_format_dumpspec_components(file.name, file.disk, file.datestamp, NULL); + /* only print this entry if we're printing everything, or if it's outdated and + * we're only printing outdated files (-o) */ + if (!outdated_list || is_outdated) { + if (long_list) { + g_printf("%-10lld %-2d %-4s %s\n", + (long long)holding_file_size((char *)li->data, 0), + file.dumplevel, + is_outdated? " *":"", + dumpstr); + } else { + g_printf("%s\n", dumpstr); + } + } amfree(dumpstr); } - free_sl(file_list); + g_slist_free_full(file_list); break; - + case HOLDING_DELETE: argc -= 4; argv += 4; file_list = get_file_list(argc, argv, 0); - for (h = file_list->first; h != NULL; h = h->next) { - fprintf(stderr, _("Deleting '%s'\n"), h->name); + for (li = file_list; li != NULL; li = li->next) { + g_fprintf(stderr, _("Deleting '%s'\n"), (char *)li->data); /* remove it from the catalog */ - if (!remove_holding_file_from_catalog(h->name)) + if (!remove_holding_file_from_catalog((char *)li->data)) exit(1); /* unlink it */ - if (!holding_file_unlink(h->name)) { - /* holding_file_unlink printed an error message */ - exit(1); + if (!holding_file_unlink((char *)li->data)) { + error(_("Could not delete '%s'"), (char *)li->data); } } - free_sl(file_list); + g_slist_free_full(file_list); break; } } @@ -1454,32 +1456,32 @@ bumpsize( (void)argc; /* Quiet unused parameter warning */ (void)argv; /* Quiet unused parameter warning */ - printf("Current bump parameters:\n"); + g_printf(_("Current bump parameters:\n")); if(conf_bumppercent == 0) { - printf(" bumpsize %5d KB\t- minimum savings (threshold) to bump level 1 -> 2\n", + g_printf(_(" bumpsize %5d KB\t- minimum savings (threshold) to bump level 1 -> 2\n"), getconf_int(CNF_BUMPSIZE)); - printf(" bumpdays %5d\t- minimum days at each level\n", + g_printf(_(" bumpdays %5d\t- minimum days at each level\n"), getconf_int(CNF_BUMPDAYS)); - printf(" bumpmult %5.5lg\t- threshold = bumpsize * bumpmult**(level-1)\n\n", + g_printf(_(" bumpmult %5.5lg\t- threshold = bumpsize * bumpmult**(level-1)\n\n"), conf_bumpmult); - printf(" Bump -> To Threshold\n"); + g_printf(_(" Bump -> To Threshold\n")); for(l = 1; l < 9; l++) - printf("\t%d -> %d %9d KB\n", l, l+1, bump_thresh(l)); + g_printf(_("\t%d -> %d %9d KB\n"), l, l+1, bump_thresh(l)); putchar('\n'); } else { double bumppercent = (double)conf_bumppercent; - printf(" bumppercent %3d %%\t- minimum savings (threshold) to bump level 1 -> 2\n", + g_printf(_(" bumppercent %3d %%\t- minimum savings (threshold) to bump level 1 -> 2\n"), conf_bumppercent); - printf(" bumpdays %5d\t- minimum days at each level\n", + g_printf(_(" bumpdays %5d\t- minimum days at each level\n"), getconf_int(CNF_BUMPDAYS)); - printf(" bumpmult %5.5lg\t- threshold = disk_size * bumppercent * bumpmult**(level-1)\n\n", + g_printf(_(" bumpmult %5.5lg\t- threshold = disk_size * bumppercent * bumpmult**(level-1)\n\n"), conf_bumpmult); - printf(" Bump -> To Threshold\n"); + g_printf(_(" Bump -> To Threshold\n")); for(l = 1; l < 9; l++) { - printf("\t%d -> %d %7.2lf %%\n", l, l+1, bumppercent); + g_printf(_("\t%d -> %d %7.2lf %%\n"), l, l+1, bumppercent); bumppercent *= conf_bumpmult; if(bumppercent >= 100.000) { bumppercent = 100.0;} } @@ -1501,23 +1503,23 @@ export_db( char hostname[MAX_HOSTNAME_LENGTH+1]; int i; - printf("CURINFO Version %s CONF %s\n", version(), getconf_str(CNF_ORG)); + g_printf(_("CURINFO Version %s CONF %s\n"), version(), getconf_str(CNF_ORG)); curtime = time(0); if(gethostname(hostname, SIZEOF(hostname)-1) == -1) { - error("could not determine host name: %s\n", strerror(errno)); + error(_("could not determine host name: %s\n"), strerror(errno)); /*NOTREACHED*/ } hostname[SIZEOF(hostname)-1] = '\0'; - printf("# Generated by:\n# host: %s\n# date: %s", + g_printf(_("# Generated by:\n# host: %s\n# date: %s"), hostname, ctime(&curtime)); - printf("# command:"); + g_printf(_("# command:")); for(i = 0; i < argc; i++) - printf(" %s", argv[i]); + g_printf(_(" %s"), argv[i]); - printf("\n# This file can be merged back in with \"amadmin import\".\n"); - printf("# Edit only with care.\n"); + g_printf(_("\n# This file can be merged back in with \"amadmin import\".\n")); + g_printf(_("# Edit only with care.\n")); if(argc >= 4) diskloop(argc, argv, "export", export_one); @@ -1533,42 +1535,42 @@ export_one( int i,l; if(get_info(dp->host->hostname, dp->name, &info)) { - fprintf(stderr, "Warning: no curinfo record for %s:%s\n", + g_fprintf(stderr, _("Warning: no curinfo record for %s:%s\n"), dp->host->hostname, dp->name); return; } - printf("host: %s\ndisk: %s\n", dp->host->hostname, dp->name); - printf("command: %u\n", info.command); - printf("last_level: %d\n",info.last_level); - printf("consecutive_runs: %d\n",info.consecutive_runs); - printf("full-rate:"); - for(i=0;ihost->hostname, dp->name); + g_printf(_("command: %u\n"), info.command); + g_printf(_("last_level: %d\n"),info.last_level); + g_printf(_("consecutive_runs: %d\n"),info.consecutive_runs); + g_printf(_("full-rate:")); + for(i=0;i -1;l++) { - printf("history: %d " OFF_T_FMT " " OFF_T_FMT " " TIME_T_FMT "\n", + g_printf(_("history: %d %lld %lld %jd\n"), info.history[l].level, - (OFF_T_FMT_TYPE)info.history[l].size, - (OFF_T_FMT_TYPE)info.history[l].csize, - (TIME_T_FMT_TYPE)info.history[l].date); + (long long)info.history[l].size, + (long long)info.history[l].csize, + (intmax_t)info.history[l].date); } - printf("//\n"); + g_printf("//\n"); } /* ----------------------------------------------- */ @@ -1598,7 +1600,7 @@ import_db( /* process header line */ if((line = agets(stdin)) == NULL) { - fprintf(stderr, "%s: empty input.\n", get_pname()); + g_fprintf(stderr, _("%s: empty input.\n"), get_pname()); return; } @@ -1654,13 +1656,13 @@ import_db( (vers_min != VERSION_MINOR)? vers_min > VERSION_MINOR : vers_patch > VERSION_PATCH; if(newer) - fprintf(stderr, - "%s: WARNING: input is from newer Amanda version: %d.%d.%d.\n", + g_fprintf(stderr, + _("%s: WARNING: input is from newer Amanda version: %d.%d.%d.\n"), get_pname(), vers_maj, vers_min, vers_patch); /*@end@*/ if(strcmp(org, getconf_str(CNF_ORG)) != 0) { - fprintf(stderr, "%s: WARNING: input is from different org: %s\n", + g_fprintf(stderr, _("%s: WARNING: input is from different org: %s\n"), get_pname(), org); } @@ -1674,9 +1676,9 @@ import_db( bad_header: /*@i@*/ amfree(line); - fprintf(stderr, "%s: bad CURINFO header line in input: %s.\n", + g_fprintf(stderr, _("%s: bad CURINFO header line in input: %s.\n"), get_pname(), hdr); - fprintf(stderr, " Was the input in \"amadmin export\" format?\n"); + g_fprintf(stderr, _(" Was the input in \"amadmin export\" format?\n")); return; } @@ -1687,19 +1689,14 @@ import_one(void) info_t info; stats_t onestat; int rc, level; - time_t onedate; - time_t *onedate_p = &onedate; char *line = NULL; char *s, *fp; int ch; int nb_history, i; char *hostname = NULL; char *diskname = NULL; - time_t *secs_p; - -#if TEXTDB - check_dumpuser(); -#endif + long long off_t_tmp; + long long time_t_tmp; memset(&info, 0, SIZEOF(info_t)); @@ -1815,39 +1812,40 @@ import_one(void) 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) { goto parse_err; } + 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) { goto parse_err; } + 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, "%lld", &time_t_tmp) != 1) { goto parse_err; } + 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 *)onedate_p) != 1) { + if(ch == '\0' || sscanf(s - 1, "%lld", &time_t_tmp) != 1) { goto parse_err; } + /* time_t not guarranteed to be long */ + /*@i1@*/ 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) { goto parse_err; } + onestat.filenum = (off_t)off_t_tmp; skip_integer(s, ch); skip_whitespace(s, ch); @@ -1861,8 +1859,6 @@ import_one(void) } } - /* time_t not guarranteed to be long */ - /*@i1@*/ onestat.date = onedate; if(level < 0 || level > 9) goto parse_err; info.inf[level] = onestat; @@ -1873,8 +1869,6 @@ import_one(void) } while(1) { history_t onehistory; - time_t date; - time_t *date_p = &date; if(line[0] == '/' && line[1] == '/') { info.history[nb_history].level = -2; @@ -1895,26 +1889,26 @@ import_one(void) 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) { 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) { 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), "%lld", &time_t_tmp) != 1) { break; } + /* time_t not guarranteed to be long */ + /*@i1@*/ onehistory.date = (time_t)time_t_tmp; skip_integer(s, ch); - /*@i1@*/onehistory.date = date; /* time_t not guarranteed to be long */ info.history[nb_history++] = onehistory; amfree(line); @@ -1925,7 +1919,7 @@ import_one(void) /* got a full record, now write it out to the database */ if(put_info(hostname, diskname, &info)) { - fprintf(stderr, "%s: error writing record for %s:%s\n", + g_fprintf(stderr, _("%s: error writing record for %s:%s\n"), get_pname(), hostname, diskname); } amfree(hostname); @@ -1936,14 +1930,14 @@ import_one(void) /*@i@*/ amfree(line); amfree(hostname); amfree(diskname); - fprintf(stderr, "%s: parse error reading import record.\n", get_pname()); + g_fprintf(stderr, _("%s: parse error reading import record.\n"), get_pname()); return 0; shortfile_err: /*@i@*/ amfree(line); amfree(hostname); amfree(diskname); - fprintf(stderr, "%s: short file reading import record.\n", get_pname()); + g_fprintf(stderr, _("%s: short file reading import record.\n"), get_pname()); return 0; } @@ -1969,7 +1963,7 @@ impget_line(void) /* otherwise, a blank line, so keep going */ } if(ferror(stdin)) { - fprintf(stderr, "%s: reading stdin: %s\n", + g_fprintf(stderr, _("%s: reading stdin: %s\n"), get_pname(), strerror(errno)); } return NULL; @@ -1982,174 +1976,174 @@ disklist_one( disk_t * dp) { am_host_t *hp; - interface_t *ip; + netif_t *ip; sle_t *excl; hp = dp->host; ip = hp->netif; - printf("line %d:\n", dp->line); + g_printf("line %d:\n", dp->line); - printf(" host %s:\n", hp->hostname); - printf(" interface %s\n", - ip->name[0] ? ip->name : "default"); - printf(" disk %s:\n", dp->name); - if(dp->device) printf(" device %s\n", dp->device); + g_printf(" host %s:\n", hp->hostname); + g_printf(" interface %s\n", + interface_name(ip->config)[0] ? interface_name(ip->config) : "default"); + g_printf(" disk %s:\n", dp->name); + if(dp->device) g_printf(" device %s\n", dp->device); - printf(" program \"%s\"\n", dp->program); + g_printf(" program \"%s\"\n", dp->program); if(dp->exclude_file != NULL && dp->exclude_file->nb_element > 0) { - printf(" exclude file"); + g_printf(" exclude file"); for(excl = dp->exclude_file->first; excl != NULL; excl = excl->next) { - printf(" \"%s\"", excl->name); + g_printf(" \"%s\"", excl->name); } - printf("\n"); + g_printf("\n"); } if(dp->exclude_list != NULL && dp->exclude_list->nb_element > 0) { - printf(" exclude list"); - if(dp->exclude_optional) printf(" optional"); + g_printf(" exclude list"); + if(dp->exclude_optional) g_printf(" optional"); for(excl = dp->exclude_list->first; excl != NULL; excl = excl->next) { - printf(" \"%s\"", excl->name); + g_printf(" \"%s\"", excl->name); } - printf("\n"); + g_printf("\n"); } if(dp->include_file != NULL && dp->include_file->nb_element > 0) { - printf(" include file"); + g_printf(" include file"); for(excl = dp->include_file->first; excl != NULL; excl = excl->next) { - printf(" \"%s\"", excl->name); + g_printf(" \"%s\"", excl->name); } - printf("\n"); + g_printf("\n"); } if(dp->include_list != NULL && dp->include_list->nb_element > 0) { - printf(" include list"); - if(dp->include_optional) printf(" optional"); + g_printf(" include list"); + if(dp->include_optional) g_printf(" optional"); for(excl = dp->include_list->first; excl != NULL; excl = excl->next) { - printf(" \"%s\"", excl->name); + g_printf(" \"%s\"", excl->name); } - printf("\n"); + g_printf("\n"); } - printf(" priority %d\n", dp->priority); - printf(" dumpcycle %d\n", dp->dumpcycle); - printf(" maxdumps %d\n", dp->maxdumps); - printf(" maxpromoteday %d\n", dp->maxpromoteday); + g_printf(" priority %d\n", dp->priority); + g_printf(" dumpcycle %d\n", dp->dumpcycle); + g_printf(" maxdumps %d\n", dp->maxdumps); + g_printf(" maxpromoteday %d\n", dp->maxpromoteday); if(dp->bumppercent > 0) { - printf(" bumppercent %d\n", dp->bumppercent); + g_printf(" bumppercent %d\n", dp->bumppercent); } else { - printf(" bumpsize " OFF_T_FMT "\n", - (OFF_T_FMT_TYPE)dp->bumpsize); + g_printf(" bumpsize %lld\n", + (long long)dp->bumpsize); } - printf(" bumpdays %d\n", dp->bumpdays); - printf(" bumpmult %lf\n", dp->bumpmult); + g_printf(" bumpdays %d\n", dp->bumpdays); + g_printf(" bumpmult %lf\n", dp->bumpmult); - printf(" strategy "); + g_printf(" strategy "); switch(dp->strategy) { case DS_SKIP: - printf("SKIP\n"); + g_printf("SKIP\n"); break; case DS_STANDARD: - printf("STANDARD\n"); + g_printf("STANDARD\n"); break; case DS_NOFULL: - printf("NOFULL\n"); + g_printf("NOFULL\n"); break; case DS_NOINC: - printf("NOINC\n"); + g_printf("NOINC\n"); break; case DS_HANOI: - printf("HANOI\n"); + g_printf("HANOI\n"); break; case DS_INCRONLY: - printf("INCRONLY\n"); + g_printf("INCRONLY\n"); break; } - printf(" ignore %s\n", (dp->ignore? "YES" : "NO")); - printf(" estimate "); + g_printf(" ignore %s\n", (dp->ignore? "YES" : "NO")); + g_printf(" estimate "); switch(dp->estimate) { case ES_CLIENT: - printf("CLIENT\n"); + g_printf("CLIENT\n"); break; case ES_SERVER: - printf("SERVER\n"); + g_printf("SERVER\n"); break; case ES_CALCSIZE: - printf("CALCSIZE\n"); + g_printf("CALCSIZE\n"); break; } - printf(" compress "); + g_printf(" compress "); switch(dp->compress) { case COMP_NONE: - printf("NONE\n"); + g_printf("NONE\n"); break; case COMP_FAST: - printf("CLIENT FAST\n"); + g_printf("CLIENT FAST\n"); break; case COMP_BEST: - printf("CLIENT BEST\n"); + g_printf("CLIENT BEST\n"); break; case COMP_SERVER_FAST: - printf("SERVER FAST\n"); + g_printf("SERVER FAST\n"); break; case COMP_SERVER_BEST: - printf("SERVER BEST\n"); + g_printf("SERVER BEST\n"); break; } if(dp->compress != COMP_NONE) { - printf(" comprate %.2lf %.2lf\n", + g_printf(" comprate %.2lf %.2lf\n", dp->comprate[0], dp->comprate[1]); } - printf(" encrypt "); + g_printf(" encrypt "); switch(dp->encrypt) { case ENCRYPT_NONE: - printf("NONE\n"); + g_printf("NONE\n"); break; case ENCRYPT_CUST: - printf("CLIENT\n"); + g_printf("CLIENT\n"); break; case ENCRYPT_SERV_CUST: - printf("SERVER\n"); + g_printf("SERVER\n"); break; } - printf(" auth %s\n", dp->security_driver); - printf(" kencrypt %s\n", (dp->kencrypt? "YES" : "NO")); - printf(" amandad_path %s\n", dp->amandad_path); - printf(" client_username %s\n", dp->client_username); - printf(" ssh_keys %s\n", dp->ssh_keys); + g_printf(" auth %s\n", dp->security_driver); + g_printf(" kencrypt %s\n", (dp->kencrypt? "YES" : "NO")); + g_printf(" amandad_path %s\n", dp->amandad_path); + g_printf(" client_username %s\n", dp->client_username); + g_printf(" ssh_keys %s\n", dp->ssh_keys); - printf(" holdingdisk "); + g_printf(" holdingdisk "); switch(dp->to_holdingdisk) { case HOLD_NEVER: - printf("NEVER\n"); + g_printf("NEVER\n"); break; case HOLD_AUTO: - printf("AUTO\n"); + g_printf("AUTO\n"); break; case HOLD_REQUIRED: - printf("REQUIRED\n"); + g_printf("REQUIRED\n"); break; } - printf(" record %s\n", (dp->record? "YES" : "NO")); - printf(" index %s\n", (dp->index? "YES" : "NO")); - printf(" starttime %04d\n", (int)dp->starttime); + g_printf(" record %s\n", (dp->record? "YES" : "NO")); + g_printf(" index %s\n", (dp->index? "YES" : "NO")); + g_printf(" starttime %04d\n", (int)dp->starttime); if(dp->tape_splitsize > (off_t)0) { - printf(" tape_splitsize " OFF_T_FMT "\n", - (OFF_T_FMT_TYPE)dp->tape_splitsize); + g_printf(" tape_splitsize %lld\n", + (long long)dp->tape_splitsize); } if(dp->split_diskbuffer) { - printf(" split_diskbuffer %s\n", dp->split_diskbuffer); + g_printf(" split_diskbuffer %s\n", dp->split_diskbuffer); } if(dp->fallback_splitsize > (off_t)0) { - printf(" fallback_splitsize " OFF_T_FMT "Mb\n", - (OFF_T_FMT_TYPE)(dp->fallback_splitsize / (off_t)1024)); + g_printf(" fallback_splitsize %lldMb\n", + (long long)(dp->fallback_splitsize / (off_t)1024)); } - printf(" skip-incr %s\n", (dp->skip_incr? "YES" : "NO")); - printf(" skip-full %s\n", (dp->skip_full? "YES" : "NO")); - printf(" spindle %d\n", dp->spindle); + g_printf(" skip-incr %s\n", (dp->skip_incr? "YES" : "NO")); + g_printf(" skip-full %s\n", (dp->skip_full? "YES" : "NO")); + g_printf(" spindle %d\n", dp->spindle); - printf("\n"); + g_printf("\n"); } void @@ -2177,16 +2171,14 @@ show_version( (void)argv; /* Quiet unused parameter warning */ for(i = 0; version_info[i] != NULL; i++) - printf("%s", version_info[i]); + g_printf("%s", version_info[i]); } void show_config( - int argc, - char **argv) + int argc G_GNUC_UNUSED, + char **argv G_GNUC_UNUSED) { - argc = argc; - argv = argv; - dump_configuration(conffile); + dump_configuration(); } diff --git a/server-src/amcheck.c b/server-src/amcheck.c index 4498cd7..fa2a8aa 100644 --- a/server-src/amcheck.c +++ b/server-src/amcheck.c @@ -31,10 +31,10 @@ #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 @@ #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 @@ 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
] [host [disk]* ]* [-o configoption]*", versionsuffix()); + error(_("Usage: amcheck%s [-am] [-w] [-sclt] [-M
] [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 @@ 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); @@ -122,18 +134,14 @@ main( 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; @@ -147,11 +155,12 @@ main( /* 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*/ @@ -159,7 +168,8 @@ main( #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 @@ -169,7 +179,8 @@ main( 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 @@ -182,6 +193,8 @@ main( break; case 'w': overwrite = 1; break; + case 'o': add_config_overwrite_opt(cfg_ovr, optarg); + break; case 't': do_tapechk = 1; break; case '?': @@ -189,8 +202,8 @@ main( 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) { @@ -201,27 +214,20 @@ main( 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) @@ -229,58 +235,59 @@ main( 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(); @@ -297,7 +304,7 @@ main( /* 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 */ @@ -308,7 +315,7 @@ main( /* 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 */ @@ -346,14 +353,11 @@ main( 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); @@ -364,43 +368,33 @@ main( 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 @@ -419,22 +413,20 @@ main( 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 @@ -475,13 +467,13 @@ main( 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*/ } } @@ -489,7 +481,7 @@ main( 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)) { @@ -502,22 +494,12 @@ main( 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) { @@ -525,7 +507,7 @@ main( 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*/ } } @@ -539,13 +521,38 @@ main( /* --------------------------------------------------- */ -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( @@ -562,76 +569,199 @@ 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)); @@ -646,57 +776,52 @@ start_server_check( 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); } /* @@ -706,30 +831,32 @@ start_server_check( /* * 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 { @@ -744,8 +871,9 @@ start_server_check( } 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); } } @@ -758,19 +886,15 @@ start_server_check( */ 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 */ @@ -783,45 +907,49 @@ start_server_check( } 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); @@ -830,89 +958,92 @@ start_server_check( 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); } } @@ -929,22 +1060,17 @@ start_server_check( 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); @@ -954,7 +1080,7 @@ start_server_check( 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); } } @@ -963,18 +1089,21 @@ start_server_check( 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); @@ -993,86 +1122,15 @@ start_server_check( } 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")); } /* @@ -1100,83 +1158,73 @@ start_server_check( 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 { @@ -1184,10 +1232,8 @@ start_server_check( } amfree(quoted); } -#endif for(dp = hostp->disks; dp != NULL; dp = dp->hostnext) { disk = sanitise_filename(dp->name); -#if TEXTDB if(hostinfodir) { char *quotedif; @@ -1197,39 +1243,42 @@ start_server_check( 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; } @@ -1237,28 +1286,28 @@ start_server_check( 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; @@ -1274,22 +1323,23 @@ start_server_check( 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; @@ -1304,20 +1354,21 @@ start_server_check( 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; } @@ -1328,26 +1379,33 @@ start_server_check( 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; } } @@ -1366,20 +1424,11 @@ start_server_check( } 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 +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); } @@ -1449,40 +1498,46 @@ start_host( 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=" : "", @@ -1524,45 +1579,64 @@ start_host( 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 && @@ -1573,21 +1647,28 @@ start_host( 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++; } } @@ -1612,8 +1693,10 @@ start_host( } } 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 ", @@ -1671,12 +1754,12 @@ start_host( 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 +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: @@ -1713,13 +1796,13 @@ start_client_checks( 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(); @@ -1736,22 +1819,15 @@ start_client_checks( 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 +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; @@ -1784,7 +1860,7 @@ handle_result( } #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 @@ -1804,8 +1880,9 @@ handle_result( 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")); } } @@ -1827,7 +1904,7 @@ handle_result( 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); @@ -1837,7 +1914,7 @@ handle_result( 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; @@ -1847,8 +1924,7 @@ handle_result( * 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) { @@ -1859,4 +1935,7 @@ handle_result( 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 --git a/server-src/amcheckdb.sh.in b/server-src/amcheckdb.sh.in deleted file mode 100644 index ff1f63e..0000000 --- a/server-src/amcheckdb.sh.in +++ /dev/null @@ -1,87 +0,0 @@ -#! @SHELL@ -# -# check tapelist against database and vice versa -# - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -ConfigDir=@CONFIG_DIR@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -Program=`basename $0` - -log () { - echo 1>&2 "$@" - return 0 -} - -Config=$1 -if [ "$Config" = "" ]; then - log "usage: ${Program} " - exit 1 -fi -shift; - -# -# Check if the configuration directory exists. Make sure that the -# necessary files can be found, such as amanda.conf and tapelist. -# -if [ ! -d ${ConfigDir}/${Config} ]; then - log "${Program}: configuration directory ${ConfigDir}/${Config} does not exist." - exit 1 -fi -(cd ${ConfigDir}/${Config} >/dev/null 2>&1) || exit $? -cd ${ConfigDir}/${Config} -if [ ! -r amanda.conf ]; then - log "${Program}: amanda.conf not found or is not readable in ${ConfigDir}." - exit 1 -fi - -# Get the location and name of the tapelist filename. If tapelist is not -# specified in the amanda.conf file, then use tapelist in the config -# directory. -TapeList=`amgetconf${SUF} $Config tapelist "@$"` -if [ ! "$TapeList" ]; then - TapeList="$ConfigDir/$Config/tapelist" -fi -if [ ! -r $TapeList ]; then - log "${Program}: $TapeList not found or is not readable." - exit 1 -fi - -Amadmin=$sbindir/amadmin$SUF - -[ ! -x $Amadmin ] \ - && echo "$Amadmin not found or not executable" >&2 \ - && exit 1 - -$Amadmin $Config export "$@"\ - | grep "^stats: " \ - | while read LINE; do - [ "$LINE" = "" ] && continue - set $LINE - echo $8 - done \ - | sort -u \ - | while read TAPE; do - [ "$TAPE" = "" ] && continue - grep " $TAPE " $TapeList 2>/dev/null >/dev/null - [ $? != 0 ] \ - && echo "Tape $TAPE missing in $TapeList" - done - -echo "Ready." - -exit 0 diff --git a/server-src/amcleanup.sh.in b/server-src/amcleanup.sh.in deleted file mode 100644 index cd60001..0000000 --- a/server-src/amcleanup.sh.in +++ /dev/null @@ -1,328 +0,0 @@ -#!@SHELL@ -# -# 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. -# -# Author: James da Silva, Systems Design and Analysis Group -# Computer Science Department -# University of Maryland at College Park -# - -# -# amcleanup.sh - clean up and generate a report after a crash. - -# try to hit all the possibilities here -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libexecdir=@libexecdir@ -sbindir=@sbindir@ - -confdir=@CONFIG_DIR@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = yes; then - SUF=-@VERSION@ -else - SUF= -fi - -if test -h /proc/1/exe ; then - if test $# -ge 2 && test "$1" = "-k" ; then - KILL_ENABLE=1 - conf=$2 - shift - shift - elif test $# -ge 1 ; then - KILL_ENABLE=0 - conf=$1 - shift; - else - echo "Usage: amcleanup [-k] conf" - exit 1 - fi -else - if test $# -lt 1 ; then - echo "Usage: amcleanup conf" - exit 1 - else - conf=$1 - shift - KILL_ENABLE=0 - fi -fi - -if test ! -d $confdir/$conf ; then - echo "amcleanup: could not cd into $confdir/$conf" - exit 1 -fi - -cd $confdir/$conf - -logdir=`amgetconf$SUF $conf logdir "$@"` -rc=$? -if test $rc -ne 0 ; then - echo "amcleanup: 'amgetconf$SUF logdir' exited with status: $rc" 1>&2 - exit 1 -fi -logfile=$logdir/log -errfile=$logdir/amdump -erramflush=$logdir/amflush -tapecycle=`amgetconf$SUF $conf tapecycle "$@"` -rc=$? -if test $rc -ne 0 ; then - echo "amcleanup: 'amgetconf$SUF tapecycle' exited with status: $rc " 1>&2 - exit 1 -fi -dumpuser=`amgetconf$SUF $conf dumpuser "$@"` -rc=$? -if test $rc -ne 0 ; then - echo "amcleanup: 'amgetconf$SUF $conf dumpuser' exited with status: $rc" 1>&2 - exit 1 -fi - -# Check for running processes which should not be -# running right now. -if test ${KILL_ENABLE} -eq 1 ; then - if test -h /proc/1/exe ; then - USER_PROCESS_NAMES="\ - @libexecdir@/amandad \ - @libexecdir@/amcleanupdisk \ - @libexecdir@/amidxtaped \ - @libexecdir@/amindexd \ - @libexecdir@/amlogroll \ - @libexecdir@/amtrmidx \ - @libexecdir@/amtrmlog \ - @libexecdir@/chg-chio \ - @libexecdir@/chg-chs \ - @libexecdir@/chg-disk \ - @libexecdir@/chg-iomega \ - @libexecdir@/chg-juke \ - @libexecdir@/chg-manual \ - @libexecdir@/chg-mcutil \ - @libexecdir@/chg-mtx \ - @libexecdir@/chg-multi \ - @libexecdir@/chg-null \ - @libexecdir@/chg-rait \ - @libexecdir@/chg-rth \ - @libexecdir@/chg-scsi \ - @libexecdir@/chg-zd-mtx \ - @libexecdir@/chunker \ - @libexecdir@/driver \ - @libexecdir@/generic-dumper \ - @libexecdir@/gnutar \ - @libexecdir@/noop \ - @libexecdir@/patch-system \ - @libexecdir@/selfcheck \ - @libexecdir@/sendbackup \ - @libexecdir@/sendsize \ - @libexecdir@/star \ - @libexecdir@/taper \ - @libexecdir@/versionsuffix \ - @sbindir@/amaddclient \ - @sbindir@/amadmin \ - @sbindir@/amaespipe \ - @sbindir@/amcheckdb \ - @sbindir@/amcrypt \ - @sbindir@/amcryptsimple \ - @sbindir@/amdd \ - @sbindir@/amdump \ - @sbindir@/amfetchdump \ - @sbindir@/amflush \ - @sbindir@/amgetconf \ - @sbindir@/amgpgcrypt \ - @sbindir@/amlabel \ - @sbindir@/ammt \ - @sbindir@/amoverview \ - @sbindir@/amplot \ - @sbindir@/amrecover \ - @sbindir@/amreport \ - @sbindir@/amrestore \ - @sbindir@/amrmtape \ - @sbindir@/amserverconfig \ - @sbindir@/amstatus \ - @sbindir@/amtape \ - @sbindir@/amtapetype \ - @sbindir@/amtoc \ - @sbindir@/amverify \ - @sbindir@/amverifyrun" - - ROOT_PROCESS_NAMES="\ - @libexecdir@/calcsize \ - @libexecdir@/killpgrp \ - @libexecdir@/rundump \ - @libexecdir@/runtar \ - @libexecdir@/dumper \ - @libexecdir@/planner \ - @sbindir@/amcheck" - - PREVIOUS_DIR="`pwd`" - cd /proc - PIDS_FOUND=0 - KEEP_CHECKING=1 - while test ${KEEP_CHECKING} -ne 0 ; do - PIDS_THIS_PASS=0 - for search_user in ${dumpuser} root ; do - if test "${search_user}" = "${dumpuser}" ; then - PROCESS_NAMES=${USER_PROCESS_NAMES} - elif test "${search_user}" = "root" ; then - PROCESS_NAMES=${ROOT_PROCESS_NAMES} - fi - for search_pid in [0-9]* ; do - for search_name in ${PROCESS_NAMES} ; do - ls -l /proc/${search_pid}/exe 2>/dev/null | grep ${search_name} >/dev/null - match_name=$? - pid_uid="`cat /proc/${search_pid}/status 2>/dev/null | grep Uid | awk '//{split($_,i); print i[2]}'`" - if test ${match_name} -eq 0 && test "${pid_uid}" = "${search_user}" ; then - echo "amcleanup: Process ${search_name} found running at pid #${search_pid}." - kill_pid=${search_pid} - kill_name=${search_name} - PIDS_FOUND=`expr ${PIDS} + 1` - PIDS_THIS_PASS=1 - break - else - kill_pid="" - continue - fi - done - if test ! -z "${kill_pid}" ; then - if test -d /proc/${kill_pid} ; then - echo "amcleanup: Sending process ${kill_pid} the TERM signal." - kill TERM -- ${kill_pid} - sleep 5 - if test -d /proc/${kill_pid} ; then - echo "amcleanup: Sending process ${kill_pid} the KILL signal." - kill KILL -- ${kill_pid} - fi - sleep 5 - if test -d /proc/${kill_pid} ; then - echo "amcleanup: Process ${kill_pid} did not respond to the KILL signal (and may be hung)!" 1>&2 - KILL_FAILURES=`expr ${KILL_FAILURES} + 1` - fi - else - echo "amcleanup: Process ${kill_pid} no longer running. Skipping..." - fi - fi - done - done - if test ${PIDS_THIS_PASS} -eq 0 ; then - KEEP_CHECKING=0 - else - KEEP_CHECKING=1 - fi - done - if test ${PIDS_FOUND} -gt 0 ; then - echo "amcleanup: ${PIDS_FOUND} Amanda processes were found running." - echo "amcleanup: ${KILL_FAILURES} processes failed to terminate." - else - echo "amcleanup: No Amanda processes were found running." - fi - cd "${PREVIOUS_DIR}" - fi -fi - -retstatus=0 -if test -f $logfile ; then - echo "amcleanup: processing outstanding log file." - exec /dev/null 2>&1 - amreport$SUF $conf "$@" - rc=$? - if test $rc -ne 0 ; then - echo "amcleanup: amreport exited with status: $rc" 1>&2 - retstatus=`expr $retstatus + 1` - fi - - # Roll the log file to its datestamped name. - amlogroll$SUF $conf "$@" - rc=$? - if test $rc -ne 0 ; then - echo "acmleanup: amlogroll exited with status: $rc" 1>&2 - retstatus=`expr $retstatus + 2` - fi - - # Trim the index file to those for dumps that still exist. - amtrmidx$SUF $conf "$@" - rc=$? - if test $rc -ne 0 ; then - echo "amcleanup: amtrmidx exited with status: $rc" 1>&2 - retstatus=`expr $retstatus + 4` - fi - -else - echo "amcleanup: no unprocessed logfile to clean up." -fi - -if test -f $errfile ; then - # if log was found, this will have been directed to /dev/null, - # which is fine. - echo "amcleanup: $errfile exists, renaming it." - - # Keep debug log through the tapecycle plus a couple days - maxdays=`expr $tapecycle + 2` - - days=1 - # First, find out the last existing errfile, - # to avoid ``infinite'' loops if tapecycle is infinite - while test $days -lt $maxdays && test -f $errfile.$days ; do - days=`expr $days + 1` - done - # Now, renumber the existing log files - while test $days -ge 2 ; do - ndays=`expr $days - 1` - mv $errfile.$ndays $errfile.$days - days=$ndays - done - mv $errfile $errfile.1 -fi - -if test -f $erramflush ; then - # if log was found, this will have been directed to /dev/null, - # which is fine. - echo "amcleanup: $erramflush exists, renaming it." - - # Keep debug log through the tapecycle plus a couple days - maxdays=`expr $tapecycle + 2` - - days=1 - # First, find out the last existing erramflush, - # to avoid ``infinite'' loops if tapecycle is infinite - while test $days -lt $maxdays && test -f $erramflush.$days ; do - days=`expr $days + 1` - done - # Now, renumber the existing log files - while test $days -ge 2 ; do - ndays=`expr $days - 1` - mv $erramflush.$ndays $erramflush.$days - days=$ndays - done - mv $erramflush $erramflush.1 -fi - -$libexecdir/amcleanupdisk $conf "$@" -rc=$? -if test $rc -ne 0 ; then - echo "amcleanup: amcleanupdisk exited with status: $rc" 1>&2 - retstatus=`expr $retstatus + 8` -fi - -exit $retstatus diff --git a/server-src/amcleanupdisk.c b/server-src/amcleanupdisk.c index 924e3cd..a67154c 100644 --- a/server-src/amcleanupdisk.c +++ b/server-src/amcleanupdisk.c @@ -24,7 +24,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: amcleanupdisk.c,v 1.22 2006/07/25 18:27:57 martinea Exp $ + * $Id: amcleanupdisk.c 7238 2007-07-06 20:03:37Z dustin $ */ #include "amanda.h" @@ -36,202 +36,112 @@ #include "infofile.h" #include "server_util.h" -sl_t *holding_list; -char *datestamp; +/* Utility funcitons */ -/* local functions */ -int main(int argc, char **argv); -void check_holdingdisk(char *diskdir, char *datestamp); -void check_disks(void); - -int -main( - int main_argc, - char ** main_argv) +/* Call open_diskfile() with the diskfile from the configuration + */ +static void +init_diskfile(void) { - struct passwd *pw; - char *dumpuser; - disklist_t diskq; - char *conffile; - char *conf_diskfile; - char *conf_infofile; - - safe_fd(-1, 0); - safe_cd(); - - set_pname("amcleanupdisk"); - - dbopen(DBG_SUBDIR_SERVER); - - /* Don't die when child closes pipe */ - signal(SIGPIPE, SIG_IGN); - - if(main_argc < 2) { - error("Usage: amcleanupdisk%s ", versionsuffix()); - /*NOTREACHED*/ - } - - config_name = main_argv[1]; + char *conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE)); + disklist_t diskq; /* never used, but required by read_diskfile */ - 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); - - dbrename(config_name, DBG_SUBDIR_SERVER); - - conf_diskfile = getconf_str(CNF_DISKFILE); - if (*conf_diskfile == '/') { - conf_diskfile = stralloc(conf_diskfile); - } else { - conf_diskfile = stralloc2(config_dir, conf_diskfile); - } if (read_diskfile(conf_diskfile, &diskq) < 0) { - error("could not load disklist %s", conf_diskfile); + error(_("could not load disklist %s"), conf_diskfile); /*NOTREACHED*/ } amfree(conf_diskfile); +} - conf_infofile = getconf_str(CNF_INFOFILE); - if (*conf_infofile == '/') { - conf_infofile = stralloc(conf_infofile); - } else { - conf_infofile = stralloc2(config_dir, conf_infofile); - } +/* Call open_infofile() with the infofile from the configuration + */ +static void +init_infofile(void) +{ + char *conf_infofile = config_dir_relative(getconf_str(CNF_INFOFILE)); if (open_infofile(conf_infofile) < 0) { - error("could not open info db \"%s\"", conf_infofile); + error(_("could not open info db \"%s\""), conf_infofile); /*NOTREACHED*/ } amfree(conf_infofile); +} - datestamp = construct_datestamp(NULL); +/* A callback for holding_cleanup to mark corrupt DLEs with force_no_bump + * for their next run. + * + * @param hostname: hostname of DLE + * @param disk: disk of DLE + */ +static void +corrupt_dle( + char *hostname, + char *disk) +{ + info_t info; - dumpuser = getconf_str(CNF_DUMPUSER); - if((pw = getpwnam(dumpuser)) == NULL) { - error("dumpuser %s not found in password file", dumpuser); - /*NOTREACHED*/ - } + dbprintf(_("Corrupted dump of DLE %s:%s found; setting force-no-bump.\n"), + hostname, disk); - if(pw->pw_uid != getuid()) { - error("must run amcleanupdisk as user %s", dumpuser); - /*NOTREACHED*/ + get_info(hostname, disk, &info); + info.command &= ~FORCE_BUMP; + info.command |= FORCE_NO_BUMP; + if(put_info(hostname, disk, &info)) { + dbprintf(_("could not put info record for %s:%s: %s"), + hostname, disk, strerror(errno)); } - - holding_list = pick_all_datestamp(1); - - check_disks(); - - close_infofile(); - - free_sl(holding_list); - holding_list = NULL; - amfree(config_dir); - return 0; } - -void -check_holdingdisk( - char * diskdir, - char * datestamp) +int +main( + int argc, + char ** argv) { - DIR *workdir; - struct dirent *entry; - char *dirname = NULL; - char *tmpname = NULL; - char *destname = NULL; - char *hostname = NULL; - char *diskname = NULL; - disk_t *dp; - filetype_t filetype; - info_t info; - int level; - size_t dl, l; + FILE *verbose_output = 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"); - dirname = vstralloc(diskdir, "/", datestamp, NULL); - dl = strlen(dirname); + safe_fd(-1, 0); + safe_cd(); + + set_pname("amcleanupdisk"); + + dbopen(DBG_SUBDIR_SERVER); - if((workdir = opendir(dirname)) == NULL) { - amfree(dirname); - return; + if(argc < 2) { + error(_("Usage: amcleanupdisk%s "), versionsuffix()); + /*NOTREACHED*/ } - while((entry = readdir(workdir)) != NULL) { - if(is_dot_or_dotdot(entry->d_name)) { - continue; - } - - if((l = strlen(entry->d_name)) < 7 ) { - continue; - } - - if(strncmp(&entry->d_name[l-4],".tmp",4) != 0) { - continue; - } - - tmpname = newvstralloc(tmpname, - dirname, "/", entry->d_name, - NULL); - - destname = newstralloc(destname, tmpname); - destname[dl + 1 + l - 4] = '\0'; - - amfree(hostname); - amfree(diskname); - filetype = holding_file_read_header(tmpname, &hostname, &diskname, &level, NULL); - amfree(tmpname); - if(filetype != F_DUMPFILE) { - continue; - } - - dp = lookup_disk(hostname, diskname); - - if (dp == NULL) { - continue; - } - - if(level < 0 || level > 9) { - continue; - } - - if(rename_tmp_holding(destname, 0)) { - get_info(dp->host->hostname, dp->name, &info); - info.command &= ~FORCE_BUMP; - info.command |= FORCE_NO_BUMP; - if(put_info(dp->host->hostname, dp->name, &info)) { - error("could not put info record for %s:%s: %s", - dp->host->hostname, dp->name, strerror(errno)); - /*NOTREACHED*/ - } - } else { - fprintf(stderr,"rename_tmp_holding(%s) failed\n", destname); - } + /* parse options */ + if (argc >= 2 && strcmp(argv[1], "-v") == 0) { + verbose_output = stderr; + cfg_opt = argv[2]; + } else { + cfg_opt = argv[1]; } - closedir(workdir); - /* try to zap the potentially empty working dir */ - /* ignore any errors -- it either works or it doesn't */ - (void) rmdir(dirname); + config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL, + cfg_opt); - amfree(diskname); - amfree(hostname); - amfree(destname); - amfree(dirname); -} + check_running_as(RUNNING_AS_DUMPUSER); + dbrename(config_name, DBG_SUBDIR_SERVER); -void -check_disks(void) -{ - holdingdisk_t *hdisk; - sle_t *dir; + init_diskfile(); + init_infofile(); - for(dir = holding_list->first; dir !=NULL; dir = dir->next) { - for(hdisk = getconf_holdingdisks(); hdisk != NULL; hdisk = hdisk->next) - check_holdingdisk(holdingdisk_get_diskdir(hdisk), dir->name); - } + /* actually perform the cleanup */ + holding_cleanup(corrupt_dle, verbose_output); + + close_infofile(); + return 0; } + diff --git a/server-src/amdump.sh b/server-src/amdump.sh index 70a0a7f..803adcc 100644 --- a/server-src/amdump.sh +++ b/server-src/amdump.sh @@ -51,11 +51,7 @@ fi if [ $# -lt 1 ] then -<<<<<<< HEAD:server-src/amdump.sh.in - echo "Usage: amdump config [host [disk...]...]" 1>&2 -======= echo `_ 'Usage: %s config [host [disk...]...]' "$0"` 1>&2 ->>>>>>> upstream:server-src/amdump.sh exit 1 fi @@ -63,11 +59,7 @@ exit_status=0; conf=$1 if [ ! -d $confdir/$conf ]; then -<<<<<<< HEAD:server-src/amdump.sh.in - echo "amdump$SUF: could not find directory $confdir/$conf" 1>&2 -======= echo `_ '%s: could not find directory %s' "amdump$SUF" "$confdir/$conf"` 1>&2 ->>>>>>> upstream:server-src/amdump.sh exit 1 fi shift @@ -92,15 +84,6 @@ if [ $? -ne 0 ]; then fi fi -<<<<<<< HEAD:server-src/amdump.sh.in -#if [ $runuser != $dumpuser ]; then -# echo "amdump: must be run as user $dumpuser, not $runuser" 1>&2 -# exit 1 -#fi - -if test -f hold; then - echo "amdump: waiting for hold file to be removed" 1>&2 -======= if [ $runuser != $dumpuser ]; then echo `_ '%s: must be run as user %s, not %s' "$0" "$dumpuser" "$runuser"` 1>&2 exit 1 @@ -108,18 +91,13 @@ fi if test -f hold; then echo `_ '%s: waiting for hold file to be removed' "$0"` 1>&2 ->>>>>>> upstream:server-src/amdump.sh while test -f hold; do sleep 60 done fi if test -f $errfile || test -f $logdir/log; then -<<<<<<< HEAD:server-src/amdump.sh.in - echo "amdump: amdump or amflush is already running, or you must run amcleanup" 1>&2 -======= echo `_ '%s: amdump or amflush is already running, or you must run amcleanup' "$0"` 1>&2 ->>>>>>> upstream:server-src/amdump.sh exit 1 fi @@ -134,15 +112,6 @@ exit_code=$? exec >$errfile 1>&2 exit_code=$? [ $exit_code -ne 0 ] && exit_status=$exit_code -<<<<<<< HEAD:server-src/amdump.sh.in -echo "amdump: start at `date`" -echo "amdump: datestamp `date +%Y%m%d`" -echo "amdump: starttime `date +%Y%m%d%H%M%S`" -$libexecdir/planner$SUF $conf "$@" | $libexecdir/driver$SUF $conf "$@" -exit_code=$? -[ $exit_code -ne 0 ] && exit_status=$exit_code -echo "amdump: end at `date`" -======= gdate=`date +'%a %b %e %H:%M:%S %Z %YAAAAA%Y%m%dBBBBB%Y%m%d%H%M%SCCCCC%Y-%m-%d %H:%M:%S %Z'` @@ -167,7 +136,6 @@ $amlibexecdir/planner$SUF $conf --starttime $date_starttime "$@" | $amlibexecdir exit_code=$? [ $exit_code -ne 0 ] && exit_status=$exit_code printf '%s: end at %s\n' "amdump" "`date`" ->>>>>>> upstream:server-src/amdump.sh # Send out a report on the dumps. $sbindir/amreport$SUF $conf "$@" @@ -175,29 +143,17 @@ exit_code=$? [ $exit_code -ne 0 ] && exit_status=$exit_code # Roll the log file to its datestamped name. -<<<<<<< HEAD:server-src/amdump.sh.in -$libexecdir/amlogroll$SUF $conf "$@" -======= $amlibexecdir/amlogroll$SUF $conf "$@" ->>>>>>> upstream:server-src/amdump.sh exit_code=$? [ $exit_code -ne 0 ] && exit_status=$exit_code # Trim the log file to those for dumps that still exist. -<<<<<<< HEAD:server-src/amdump.sh.in -$libexecdir/amtrmlog$SUF $conf "$@" -======= $amlibexecdir/amtrmlog$SUF $conf "$@" ->>>>>>> upstream:server-src/amdump.sh exit_code=$? [ $exit_code -ne 0 ] && exit_status=$exit_code # Trim the index file to those for dumps that still exist. -<<<<<<< HEAD:server-src/amdump.sh.in -$libexecdir/amtrmidx$SUF $conf "$@" -======= $amlibexecdir/amtrmidx$SUF $conf "$@" ->>>>>>> upstream:server-src/amdump.sh exit_code=$? [ $exit_code -ne 0 ] && exit_status=$exit_code diff --git a/server-src/amdump.sh.in b/server-src/amdump.sh.in deleted file mode 100644 index 25471a5..0000000 --- a/server-src/amdump.sh.in +++ /dev/null @@ -1,162 +0,0 @@ -#!@SHELL@ -# -# 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. -# -# Author: James da Silva, Systems Design and Analysis Group -# Computer Science Department -# University of Maryland at College Park -# - -# -# amdump: Manage running one night's Amanda dump run. -# - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -confdir=@CONFIG_DIR@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH - -USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" -if test "$USE_VERSION_SUFFIXES" = "yes"; then - SUF="-@VERSION@" -else - SUF= -fi - -if [ $# -lt 1 ] -then - echo "Usage: amdump config [host [disk...]...]" 1>&2 - exit 1 -fi - -exit_status=0; - -conf=$1 -if [ ! -d $confdir/$conf ]; then - echo "amdump$SUF: could not find directory $confdir/$conf" 1>&2 - exit 1 -fi -shift - -cd $confdir/$conf || exit 1 - -logdir=`amgetconf$SUF $conf logdir "$@"` -[ $? -ne 0 ] && exit 1 -errfile=$logdir/amdump -tapecycle=`amgetconf$SUF $conf tapecycle "$@"` -[ $? -ne 0 ] && exit 1 -dumpuser=`amgetconf$SUF $conf dumpuser "$@"` -[ $? -ne 0 ] && exit 1 - -runuser=`{ whoami ; } 2>/dev/null` -if [ $? -ne 0 ]; then - idinfo=`{ id ; } 2>/dev/null` - if [ $? -ne 0 ]; then - runuser=${LOGNAME:-"??unknown??"} - else - runuser=`echo $idinfo | sed -e 's/).*//' -e 's/^.*(//'` - fi -fi - -#if [ $runuser != $dumpuser ]; then -# echo "amdump: must be run as user $dumpuser, not $runuser" 1>&2 -# exit 1 -#fi - -if test -f hold; then - echo "amdump: waiting for hold file to be removed" 1>&2 - while test -f hold; do - sleep 60 - done -fi - -if test -f $errfile || test -f $logdir/log; then - echo "amdump: amdump or amflush is already running, or you must run amcleanup" 1>&2 - exit 1 -fi - -umask 077 - -exit_code=0 -# Plan and drive the dumps. -#exec $errfile 2>&1 -touch $errfile -exit_code=$? -[ $exit_code -ne 0 ] && exit_status=$exit_code -exec >$errfile 1>&2 -exit_code=$? -[ $exit_code -ne 0 ] && exit_status=$exit_code -echo "amdump: start at `date`" -echo "amdump: datestamp `date +%Y%m%d`" -echo "amdump: starttime `date +%Y%m%d%H%M%S`" -$libexecdir/planner$SUF $conf "$@" | $libexecdir/driver$SUF $conf "$@" -exit_code=$? -[ $exit_code -ne 0 ] && exit_status=$exit_code -echo "amdump: end at `date`" - -# Send out a report on the dumps. -$sbindir/amreport$SUF $conf "$@" -exit_code=$? -[ $exit_code -ne 0 ] && exit_status=$exit_code - -# Roll the log file to its datestamped name. -$libexecdir/amlogroll$SUF $conf "$@" -exit_code=$? -[ $exit_code -ne 0 ] && exit_status=$exit_code - -# Trim the log file to those for dumps that still exist. -$libexecdir/amtrmlog$SUF $conf "$@" -exit_code=$? -[ $exit_code -ne 0 ] && exit_status=$exit_code - -# Trim the index file to those for dumps that still exist. -$libexecdir/amtrmidx$SUF $conf "$@" -exit_code=$? -[ $exit_code -ne 0 ] && exit_status=$exit_code - -# Keep a debug log through the tapecycle plus a couple of days. -maxdays=`expr $tapecycle + 2` -days=1 -# First, find out the last existing errfile, -# to avoid ``infinite'' loops if tapecycle is infinite -while [ $days -lt $maxdays ] && [ -f $errfile.$days ]; do - days=`expr $days + 1` -done -# Now, renumber the existing log files -while [ $days -ge 2 ]; do - ndays=`expr $days - 1` - mv $errfile.$ndays $errfile.$days - exit_code=$? - echo $exit_code - [ $exit_code -ne 0 ] && exit_status=$exit_code - days=$ndays -done -mv $errfile $errfile.1 -exit_code=$? -[ $exit_code -ne 0 ] && exit_status=$exit_code - -exit $exit_status diff --git a/server-src/amflush.c b/server-src/amflush.c index 5b9e644..4515e67 100644 --- a/server-src/amflush.c +++ b/server-src/amflush.c @@ -39,6 +39,7 @@ #include "holding.h" #include "driverio.h" #include "server_util.h" +#include "timestamp.h" static char *conf_logdir; FILE *driver_stream; @@ -48,12 +49,11 @@ char *logroll_program; char *datestamp; char *amflush_timestamp; char *amflush_datestamp; -sl_t *datestamp_list; /* local functions */ -int main(int main_argc, char **main_argv); void flush_holdingdisk(char *diskdir, char *datestamp); -void confirm(void); +static GSList * pick_datestamp(void); +void confirm(GSList *datestamp_list); void redirect_stderr(void); void detach(void); void run_dumps(void); @@ -61,17 +61,14 @@ static int get_letter_from_user(void); int main( - int main_argc, - char ** main_argv) + int argc, + char ** argv) { int foreground; int batch; int redirect; - struct passwd *pw; - char *dumpuser; char **datearg = NULL; int nb_datearg = 0; - char *conffile; char *conf_diskfile; char *conf_tapelist; char *conf_logfile; @@ -83,29 +80,39 @@ main( amwait_t exitcode; int opt; dumpfile_t file; - sl_t *holding_list=NULL; - sle_t *holding_file; + GSList *holding_list=NULL, *holding_file; int driver_pipe[2]; char date_string[100]; + char date_string_standard[100]; time_t today; - int new_argc, my_argc; - char **new_argv, **my_argv; char *errstr; struct tm *tm; char *tapedev; char *tpchanger; char *qdisk, *qhname; + GSList *datestamp_list = NULL; + config_overwrites_t *cfg_ovr; + char **config_options; + + /* + * 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("amflush"); - dbopen(DBG_SUBDIR_SERVER); - /* Don't die when child closes pipe */ signal(SIGPIPE, SIG_IGN); + dbopen(DBG_SUBDIR_SERVER); + erroutput_type = ERR_INTERACTIVE; foreground = 0; batch = 0; @@ -113,11 +120,8 @@ main( /* process arguments */ - parse_conf(main_argc, main_argv, &new_argc, &new_argv); - my_argc = new_argc; - my_argv = new_argv; - - while((opt = getopt(my_argc, my_argv, "bfsD:")) != EOF) { + cfg_ovr = new_config_overwrites(argc/2); + while((opt = getopt(argc, argv, "bfso:D:")) != EOF) { switch(opt) { case 'b': batch = 1; break; @@ -125,10 +129,12 @@ main( break; case 's': redirect = 0; break; + case 'o': add_config_overwrite_opt(cfg_ovr, optarg); + break; case 'D': if (datearg == NULL) datearg = alloc(21*SIZEOF(char *)); if(nb_datearg == 20) { - fprintf(stderr,"maximum of 20 -D arguments.\n"); + g_fprintf(stderr,_("maximum of 20 -D arguments.\n")); exit(1); } datearg[nb_datearg++] = stralloc(optarg); @@ -136,145 +142,120 @@ main( break; } } + argc -= optind, argv += optind; + if(!foreground && !redirect) { - fprintf(stderr,"Can't redirect to stdout/stderr if not in forground.\n"); + g_fprintf(stderr,_("Can't redirect to stdout/stderr if not in forground.\n")); exit(1); } - my_argc -= optind, my_argv += optind; - - if(my_argc < 1) { - error("Usage: amflush%s [-b] [-f] [-s] [-D date]* [host [disk]* ]* [-o configoption]*", versionsuffix()); + if(argc < 1) { + error(_("Usage: amflush%s [-b] [-f] [-s] [-D date]* [host [disk]* ]* [-o configoption]*"), versionsuffix()); /*NOTREACHED*/ } - config_name = my_argv[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*/ - } - amfree(conffile); + config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL, + argv[0]); + 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); - } + conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE)); if (read_diskfile(conf_diskfile, &diskq) < 0) { - error("could not read disklist file \"%s\"", conf_diskfile); + error(_("could not read disklist file \"%s\""), conf_diskfile); /*NOTREACHED*/ } - errstr = match_disklist(&diskq, my_argc-1, my_argv+1); + errstr = match_disklist(&diskq, argc-1, argv+1); if (errstr) { - printf("%s",errstr); + g_printf(_("%s"),errstr); amfree(errstr); } 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_usetimestamps = getconf_boolean(CNF_USETIMESTAMPS); - amflush_datestamp = construct_datestamp(NULL); + amflush_datestamp = get_datestamp_from_time(0); if(conf_usetimestamps == 0) { amflush_timestamp = stralloc(amflush_datestamp); } else { - amflush_timestamp = construct_timestamp(NULL); - } - - dumpuser = getconf_str(CNF_DUMPUSER); - if((pw = getpwnam(dumpuser)) == NULL) { - error("dumpuser %s not found in password file", dumpuser); - /*NOTREACHED*/ - } - if(pw->pw_uid != getuid()) { - error("must run amflush as user %s", dumpuser); - /*NOTREACHED*/ + amflush_timestamp = get_timestamp_from_time(0); } - 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)); conf_logfile = vstralloc(conf_logdir, "/log", NULL); if (access(conf_logfile, F_OK) == 0) { - error("%s exists: amdump or amflush is already running, or you must run amcleanup", conf_logfile); + error(_("%s exists: amdump or amflush is already running, or you must run amcleanup"), conf_logfile); /*NOTREACHED*/ } amfree(conf_logfile); - driver_program = vstralloc(libexecdir, "/", "driver", versionsuffix(), + driver_program = vstralloc(amlibexecdir, "/", "driver", versionsuffix(), NULL); reporter_program = vstralloc(sbindir, "/", "amreport", versionsuffix(), NULL); - logroll_program = vstralloc(libexecdir, "/", "amlogroll", versionsuffix(), + logroll_program = vstralloc(amlibexecdir, "/", "amlogroll", versionsuffix(), NULL); tapedev = getconf_str(CNF_TAPEDEV); tpchanger = getconf_str(CNF_TPCHANGER); if (tapedev == NULL && tpchanger == NULL) { - error("No tapedev or tpchanger specified"); + error(_("No tapedev or tpchanger specified")); } + /* if dates were specified (-D), then use match_datestamp + * against the list of all datestamps to turn that list + * into a set of existing datestamps (basically, evaluate the + * expressions into actual datestamps) */ if(datearg) { - sle_t *dir, *next_dir; + GSList *all_datestamps; + GSList *datestamp; int i, ok; - datestamp_list = pick_all_datestamp(1); - for(dir = datestamp_list->first; dir != NULL;) { - next_dir = dir->next; + all_datestamps = holding_get_all_datestamps(); + for(datestamp = all_datestamps; datestamp != NULL; datestamp = datestamp->next) { ok = 0; for(i=0; iname); + ok = match_datestamp(datearg[i], (char *)datestamp->data); } - if(ok == 0) { /* remove dir */ - remove_sl(datestamp_list, dir); - } - dir = next_dir; + if (ok) + datestamp_list = g_slist_insert_sorted(datestamp_list, + stralloc((char *)datestamp->data), + g_compare_strings); } + g_slist_free_full(all_datestamps); } else { + /* otherwise, in batch mode, use all datestamps */ if(batch) { - datestamp_list = pick_all_datestamp(1); + datestamp_list = holding_get_all_datestamps(); } + /* or allow the user to pick datestamps */ else { - datestamp_list = pick_datestamp(1); + datestamp_list = pick_datestamp(); } } - if(is_empty_sl(datestamp_list)) { - printf("Could not find any Amanda directories to flush.\n"); + if(!datestamp_list) { + g_printf(_("Could not find any Amanda directories to flush.\n")); exit(1); } - holding_list = holding_get_files_for_flush(datestamp_list, 1); - if(holding_list->first == NULL) { - printf("Could not find any valid dump image, check directory.\n"); + holding_list = holding_get_files_for_flush(datestamp_list); + if (holding_list == NULL) { + g_printf(_("Could not find any valid dump image, check directory.\n")); exit(1); } - if(!batch) confirm(); + if(!batch) confirm(datestamp_list); for(dp = diskq.head; dp != NULL; dp = dp->next) { if(dp->todo) { @@ -286,8 +267,8 @@ main( } if(!foreground) { /* write it before redirecting stdout */ - puts("Running in background, you can log off now."); - puts("You'll get mail when amflush is finished."); + puts(_("Running in background, you can log off now.")); + puts(_("You'll get mail when amflush is finished.")); } if(redirect) redirect_stderr(); @@ -298,18 +279,22 @@ main( set_logerror(logerror); today = time(NULL); tm = localtime(&today); - if (tm) + if (tm) { strftime(date_string, 100, "%a %b %e %H:%M:%S %Z %Y", tm); - else - error("BAD DATE"); /* should never happen */ - fprintf(stderr, "amflush: start at %s\n", date_string); - fprintf(stderr, "amflush: datestamp %s\n", amflush_timestamp); - fprintf(stderr, "amflush: starttime %s\n", construct_timestamp(NULL)); - log_add(L_START, "date %s", amflush_timestamp); + strftime(date_string_standard, 100, "%Y-%m-%d %H:%M:%S %Z", tm); + } else { + error(_("BAD DATE")); /* should never happen */ + } + g_fprintf(stderr, _("amflush: start at %s\n"), date_string); + g_fprintf(stderr, _("amflush: datestamp %s\n"), amflush_timestamp); + g_fprintf(stderr, _("amflush: starttime %s\n"), amflush_timestamp); + g_fprintf(stderr, _("amflush: starttime-locale-independent %s\n"), + date_string_standard); + log_add(L_START, _("date %s"), amflush_timestamp); /* START DRIVER */ if(pipe(driver_pipe) == -1) { - error("error [opening pipe to driver: %s]", strerror(errno)); + error(_("error [opening pipe to driver: %s]"), strerror(errno)); /*NOTREACHED*/ } if((driver_pid = fork()) == 0) { @@ -318,30 +303,33 @@ main( */ dup2(driver_pipe[0], 0); close(driver_pipe[1]); - execle(driver_program, - "driver", config_name, "nodump", (char *)0, - safe_env()); - error("cannot exec %s: %s", driver_program, strerror(errno)); + config_options = get_config_options(3); + config_options[0] = "driver"; + config_options[1] = config_name; + config_options[2] = "nodump"; + safe_fd(-1, 0); + execve(driver_program, config_options, safe_env()); + error(_("cannot exec %s: %s"), driver_program, strerror(errno)); /*NOTREACHED*/ } else if(driver_pid == -1) { - error("cannot fork for %s: %s", driver_program, strerror(errno)); + error(_("cannot fork for %s: %s"), driver_program, strerror(errno)); /*NOTREACHED*/ } driver_stream = fdopen(driver_pipe[1], "w"); if (!driver_stream) { - error("Can't fdopen: %s", strerror(errno)); + error(_("Can't fdopen: %s"), strerror(errno)); /*NOTREACHED*/ } - fprintf(driver_stream, "DATE %s\n", amflush_timestamp); - for(holding_file=holding_list->first; holding_file != NULL; + g_fprintf(driver_stream, "DATE %s\n", amflush_timestamp); + 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; } @@ -353,15 +341,15 @@ main( if (dp->todo == 0) continue; qdisk = quote_string(file.disk); - qhname = quote_string(holding_file->name); - fprintf(stderr, + qhname = quote_string((char *)holding_file->data); + g_fprintf(stderr, "FLUSH %s %s %s %d %s\n", file.name, qdisk, file.datestamp, file.dumplevel, qhname); - fprintf(driver_stream, + g_fprintf(driver_stream, "FLUSH %s %s %s %d %s\n", file.name, qdisk, @@ -371,8 +359,8 @@ main( amfree(qdisk); amfree(qhname); } - fprintf(stderr, "ENDFLUSH\n"); fflush(stderr); - fprintf(driver_stream, "ENDFLUSH\n"); fflush(driver_stream); + g_fprintf(stderr, "ENDFLUSH\n"); fflush(stderr); + g_fprintf(driver_stream, "ENDFLUSH\n"); fflush(driver_stream); fclose(driver_stream); /* WAIT DRIVER */ @@ -381,7 +369,7 @@ main( if(errno == EINTR) { continue; } else { - error("wait for %s: %s", driver_program, strerror(errno)); + error(_("wait for %s: %s"), driver_program, strerror(errno)); /*NOTREACHED*/ } } else if (pid == driver_pid) { @@ -389,9 +377,9 @@ main( } } - free_sl(datestamp_list); + g_slist_free_full(datestamp_list); datestamp_list = NULL; - free_sl(holding_list); + g_slist_free_full(holding_list); holding_list = NULL; if(redirect) { /* rename errfile */ @@ -410,31 +398,31 @@ main( /* First, find out the last existing errfile, */ /* to avoid ``infinite'' loops if tapecycle is infinite */ - snprintf(number,100,"%d",days); + g_snprintf(number,100,"%d",days); errfilex = newvstralloc(errfilex, errfile, ".", number, NULL); while ( days < maxdays && stat(errfilex,&stat_buf)==0) { days++; - snprintf(number,100,"%d",days); + g_snprintf(number,100,"%d",days); errfilex = newvstralloc(errfilex, errfile, ".", number, NULL); } - snprintf(number,100,"%d",days); + g_snprintf(number,100,"%d",days); errfilex = newvstralloc(errfilex, errfile, ".", number, NULL); nerrfilex = NULL; while (days > 1) { amfree(nerrfilex); nerrfilex = errfilex; days--; - snprintf(number,100,"%d",days); + g_snprintf(number,100,"%d",days); errfilex = vstralloc(errfile, ".", number, NULL); if (rename(errfilex, nerrfilex) != 0) { - error("cannot rename \"%s\" to \"%s\": %s", + error(_("cannot rename \"%s\" to \"%s\": %s"), errfilex, nerrfilex, strerror(errno)); /*NOTREACHED*/ } } errfilex = newvstralloc(errfilex, errfile, ".1", NULL); if (rename(errfile,errfilex) != 0) { - error("cannot rename \"%s\" to \"%s\": %s", + error(_("cannot rename \"%s\" to \"%s\": %s"), errfilex, nerrfilex, strerror(errno)); /*NOTREACHED*/ } @@ -453,13 +441,15 @@ main( /* * This is the child process. */ - execle(reporter_program, - "amreport", config_name, (char *)0, - safe_env()); - error("cannot exec %s: %s", reporter_program, strerror(errno)); + config_options = get_config_options(2); + config_options[0] = "amreport"; + config_options[1] = config_name; + safe_fd(-1, 0); + execve(reporter_program, config_options, safe_env()); + error(_("cannot exec %s: %s"), reporter_program, strerror(errno)); /*NOTREACHED*/ } else if(reporter_pid == -1) { - error("cannot fork for %s: %s", reporter_program, strerror(errno)); + error(_("cannot fork for %s: %s"), reporter_program, strerror(errno)); /*NOTREACHED*/ } while(1) { @@ -467,7 +457,7 @@ main( if(errno == EINTR) { continue; } else { - error("wait for %s: %s", reporter_program, strerror(errno)); + error(_("wait for %s: %s"), reporter_program, strerror(errno)); /*NOTREACHED*/ } } else if (pid == reporter_pid) { @@ -479,10 +469,12 @@ main( * Call amlogroll to rename the log file to its datestamped version. * Since we exec at this point, our exit code will be that of amlogroll. */ - execle(logroll_program, - "amlogroll", config_name, (char *)0, - safe_env()); - error("cannot exec %s: %s", logroll_program, strerror(errno)); + config_options = get_config_options(2); + config_options[0] = "amlogroll"; + config_options[1] = config_name; + safe_fd(-1, 0); + execve(logroll_program, config_options, safe_env()); + error(_("cannot exec %s: %s"), logroll_program, strerror(errno)); /*NOTREACHED*/ return 0; /* keep the compiler happy */ } @@ -512,43 +504,129 @@ get_letter_from_user(void) return r; } +/* Allow the user to select a set of datestamps from those in + * holding disks. The result can be passed to + * holding_get_files_for_flush. If less than two dates are + * available, then no user interaction takes place. + * + * @returns: a new GSList listing the selected datestamps + */ +static GSList * +pick_datestamp(void) +{ + GSList *datestamp_list; + GSList *r_datestamp_list = NULL; + GSList *ds; + char **datestamps = NULL; + int i; + char *answer = NULL; + char *a = NULL; + int ch = 0; + char max_char = '\0', chupper = '\0'; + + datestamp_list = holding_get_all_datestamps(); + + if(g_slist_length(datestamp_list) < 2) { + return datestamp_list; + } else { + datestamps = alloc(g_slist_length(datestamp_list) * SIZEOF(char *)); + for(ds = datestamp_list, i=0; ds != NULL; ds = ds->next,i++) { + datestamps[i] = (char *)ds->data; /* borrowing reference */ + } + + while(1) { + puts(_("\nMultiple Amanda runs in holding disks; please pick one by letter:")); + for(ds = datestamp_list, max_char = 'A'; + ds != NULL && max_char <= 'Z'; + ds = ds->next, max_char++) { + g_printf(" %c. %s\n", max_char, (char *)ds->data); + } + max_char--; + g_printf(_("Select datestamps to flush [A..%c or for all]: "), max_char); + fflush(stdout); fflush(stderr); + amfree(answer); + if ((answer = agets(stdin)) == NULL) { + clearerr(stdin); + continue; + } + + if (*answer == '\0' || strncasecmp(answer, "ALL", 3) == 0) { + break; + } + + a = answer; + while ((ch = *a++) != '\0') { + if (!isspace(ch)) + break; + } + + /* rewrite the selected list into r_datestamp_list, then copy it over + * to datestamp_list */ + do { + if (isspace(ch) || ch == ',') { + continue; + } + chupper = (char)toupper(ch); + if (chupper < 'A' || chupper > max_char) { + g_slist_free_full(r_datestamp_list); + r_datestamp_list = NULL; + break; + } + r_datestamp_list = g_slist_append(r_datestamp_list, + stralloc(datestamps[chupper - 'A'])); + } while ((ch = *a++) != '\0'); + if (r_datestamp_list && ch == '\0') { + g_slist_free_full(datestamp_list); + datestamp_list = r_datestamp_list; + break; + } + } + } + amfree(datestamps); /* references in this array are borrowed */ + amfree(answer); + + return datestamp_list; +} + /* * confirm before detaching and running */ void -confirm(void) +confirm(GSList *datestamp_list) { tape_t *tp; char *tpchanger; - sle_t *dir; + GSList *datestamp; int ch; char *extra; - printf("\nToday is: %s\n",amflush_datestamp); - printf("Flushing dumps in"); + g_printf(_("\nToday is: %s\n"),amflush_datestamp); + g_printf(_("Flushing dumps from")); extra = ""; - for(dir = datestamp_list->first; dir != NULL; dir = dir->next) { - printf("%s %s", extra, dir->name); + for(datestamp = datestamp_list; datestamp != NULL; datestamp = datestamp->next) { + g_printf("%s %s", extra, (char *)datestamp->data); extra = ","; } tpchanger = getconf_str(CNF_TPCHANGER); if(*tpchanger != '\0') { - printf(" using tape changer \"%s\".\n", tpchanger); + g_printf(_(" using tape changer \"%s\".\n"), tpchanger); } else { - printf(" to tape drive \"%s\".\n", getconf_str(CNF_TAPEDEV)); + g_printf(_(" to tape drive \"%s\".\n"), getconf_str(CNF_TAPEDEV)); } - printf("Expecting "); + g_printf(_("Expecting ")); tp = lookup_last_reusable_tape(0); - if(tp != NULL) printf("tape %s or ", tp->label); - printf("a new tape."); + if(tp != NULL) + g_printf(_("tape %s or "), tp->label); + g_printf(_("a new tape.")); tp = lookup_tapepos(1); - if(tp != NULL) printf(" (The last dumps were to tape %s)", tp->label); + if(tp != NULL) + g_printf(_(" (The last dumps were to tape %s)"), tp->label); while (1) { - printf("\nAre you sure you want to do this [yN]? "); + g_printf(_("\nAre you sure you want to do this [yN]? ")); if((ch = get_letter_from_user()) == 'Y') { return; } else if (ch == 'N' || ch == '\0' || ch == EOF) { @@ -559,7 +637,7 @@ confirm(void) } } - printf("Ok, quitting. Run amflush again when you are ready.\n"); + g_printf(_("Ok, quitting. Run amflush again when you are ready.\n")); exit(1); } @@ -572,7 +650,7 @@ redirect_stderr(void) fflush(stdout); fflush(stderr); errfile = vstralloc(conf_logdir, "/amflush", NULL); if((fderr = open(errfile, O_WRONLY| O_CREAT | O_TRUNC, 0600)) == -1) { - error("could not open %s: %s", errfile, strerror(errno)); + error(_("could not open %s: %s"), errfile, strerror(errno)); /*NOTREACHED*/ } dup2(fderr,1); @@ -588,7 +666,7 @@ detach(void) fflush(stdout); fflush(stderr); if((fd = open("/dev/null", O_RDWR, 0666)) == -1) { - error("could not open /dev/null: %s", strerror(errno)); + error(_("could not open /dev/null: %s"), strerror(errno)); /*NOTREACHED*/ } @@ -597,7 +675,7 @@ detach(void) switch(fork()) { case -1: - error("could not fork: %s", strerror(errno)); + error(_("could not fork: %s"), strerror(errno)); /*NOTREACHED*/ case 0: diff --git a/server-src/amfreetapes.sh.in b/server-src/amfreetapes.sh.in deleted file mode 100644 index d734d17..0000000 --- a/server-src/amfreetapes.sh.in +++ /dev/null @@ -1,94 +0,0 @@ -#! @SHELL@ -# -# ICEM internal :-) -# - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -sbindir=@sbindir@ -libexecdir=@libexecdir@ - -ConfigDir=@CONFIG_DIR@ - -PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb -export PATH - -Program=`basename $0` - -log () { - echo 1>&2 "$@" - return 0 -} - -Config=$1 -if [ "$Config" = "" ]; then - log "usage: ${Program} " - exit 1 -fi -VOLHEADER=$2 -if [ "$VOLHEADER" = "" ]; then - log "usage: ${Program} " - exit 1 -fi - -# -# Check if the configuration directory exists. Make sure that the -# necessary files can be found, such as amanda.conf and tapelist. -# -if [ ! -d ${ConfigDir}/${Config} ]; then - log "${Program}: configuration directory ${ConfigDir}/${Config} does not exist." - exit 1 -fi -(cd ${ConfigDir}/${Config} >/dev/null 2>&1) || exit $? -cd ${ConfigDir}/${Config} -if [ ! -r amanda.conf ]; then - log "${Program}: amanda.conf not found or is not readable in ${ConfigDir}." - exit 1 -fi - -# Get the location and name of the tapelist filename. If tapelist is not -# specified in the amanda.conf file, then use tapelist in the config -# directory. -TapeList=`amgetconf${SUF} tapelist` -if [ ! "$TapeList" ]; then - TapeList="$ConfigDir/$Config/tapelist" -fi -if [ ! -r $TapeList ]; then - log "${Program}: $TapeList not found or is not readable." - exit 1 -fi - -AllTapeList="${TapeList}.all" - -[ ! -f $AllTapeList ] \ - && echo "no tapelist $AllTapeList found" >&2 \ - && cat $TapeList | sed 's/^.* //' | sort -u > $AllTapeList \ - && echo "$AllTapeList created" >&2 - -cat $TapeList | sed 's/^.* //' > $AllTapeList.n -cat $AllTapeList >> $AllTapeList.n -sort -u $AllTapeList.n > $AllTapeList && rm -f $AllTapeList.n - -MAXTAPE=`cat $AllTapeList | sed "s/^$VOLHEADER//" | sort -n | tail -1` -NEXTTAPE=`expr $MAXTAPE + 1` -echo "last Tape is ${VOLHEADER}${MAXTAPE}" >&2 - -I=1 -while [ $I -le $MAXTAPE ]; do - WRITTEN=`grep "${VOLHEADER}${I}\$" $TapeList` - EXISTS=`grep "${VOLHEADER}${I}\$" $AllTapeList` - if [ "$EXISTS" = "" -a "$WRITTEN" = "" ]; then - echo "missing tape ${VOLHEADER}${I}" >&2 - echo "${VOLHEADER}${I}" >> $AllTapeList \ - && echo "added ${VOLHEADER}${I} to $AllTapeList" >&2 - elif [ "$EXISTS" = "" -a "$WRITTEN" != "" ]; then - echo "tape written, but not existing: ${VOLHEADER}${I}" >&2 - elif [ "$EXISTS" != "" -a "$WRITTEN" = "" ]; then - echo "free tape: ${VOLHEADER}${I}" >&2 - fi - I=`expr $I + 1` -done - -echo "next tape is ${VOLHEADER}${NEXTTAPE}" >&2 - -exit 0 diff --git a/server-src/amindex.c b/server-src/amindex.c index d703618..7c52bd3 100644 --- a/server-src/amindex.c +++ b/server-src/amindex.c @@ -64,7 +64,7 @@ getindexfname( datebuf[SIZEOF(datebuf)-1] = '\0'; dc = datebuf; - snprintf(level_str, SIZEOF(level_str), "%d", level); + g_snprintf(level_str, SIZEOF(level_str), "%d", level); } host = sanitise_filename(host); @@ -72,12 +72,7 @@ getindexfname( disk = sanitise_filename(disk); } - 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)); /* * Note: vstralloc() will stop at the first NULL, which might be * "disk" or "dc" (datebuf) rather than the full file name. @@ -126,7 +121,7 @@ getoldindexfname( datebuf[SIZEOF(datebuf)-1] = '\0'; dc = datebuf; - snprintf(level_str, SIZEOF(level_str), "%d", level); + g_snprintf(level_str, SIZEOF(level_str), "%d", level); } host = old_sanitise_filename(host); @@ -134,12 +129,7 @@ getoldindexfname( disk = old_sanitise_filename(disk); } - 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)); /* * Note: vstralloc() will stop at the first NULL, which might be * "disk" or "dc" (datebuf) rather than the full file name. diff --git a/server-src/amindexd.c b/server-src/amindexd.c index 951151b..920da30 100644 --- a/server-src/amindexd.c +++ b/server-src/amindexd.c @@ -56,6 +56,7 @@ #include "util.h" #include "amandad.h" #include "pipespawn.h" +#include "sockaddr-util.h" #include @@ -100,15 +101,12 @@ static char *amandad_auth = NULL; static FILE *cmdin; static FILE *cmdout; -static void reply(int, char *, ...) - __attribute__ ((format (printf, 2, 3))); -static void lreply(int, char *, ...) - __attribute__ ((format (printf, 2, 3))); -static void fast_lreply(int, char *, ...) - __attribute__ ((format (printf, 2, 3))); +static void reply(int, char *, ...) G_GNUC_PRINTF(2, 3); +static void lreply(int, char *, ...) G_GNUC_PRINTF(2, 3); +static void fast_lreply(int, char *, ...) G_GNUC_PRINTF(2, 3); static am_host_t *is_dump_host_valid(char *); static int is_disk_valid(char *); -static int is_config_valid(char *); +static int check_and_load_config(char *); static int build_disk_table(void); static int disk_history_list(void); static int is_dir_valid_opaque(char *); @@ -133,8 +131,7 @@ remove_files( REMOVE_ITEM *prev; while(remove) { - dbprintf(("%s: removing index file: %s\n", - debug_prefix_time(NULL), remove->filename)); + dbprintf(_("removing index file: %s\n"), remove->filename); unlink(remove->filename); amfree(remove->filename); prev = remove; @@ -159,7 +156,6 @@ uncompress_file( int indexfd; int nullfd; int debugfd; - int debugnullfd; char line[STR_SIZE]; FILE *pipe_stream; pid_t pid_gzip; @@ -185,12 +181,10 @@ uncompress_file( * Check that compressed file exists manually. */ if (stat(filename_gz, &statbuf) < 0) { - *emsg = newvstralloc(*emsg, "Compressed file '", - filename_gz, - "' is inaccessable: ", - strerror(errno), - NULL); - dbprintf(("%s\n",*emsg)); + *emsg = newvstrallocf(*emsg, + _("Compressed file '%s' is inaccessable: %s"), + filename_gz, strerror(errno)); + dbprintf("%s\n",*emsg); amfree(filename); return NULL; } @@ -201,25 +195,22 @@ uncompress_file( # define PARAM_UNCOMPRESS_OPT skip_argument #endif - debugfd = dbfd(); - debugnullfd = 0; - if(debugfd < 0) { - debugfd = open("/dev/null", O_WRONLY); - debugnullfd = 1; - } - nullfd = open("/dev/null", O_RDONLY); + indexfd = open(filename,O_WRONLY|O_CREAT, 0600); if (indexfd == -1) { - *emsg = newvstralloc(*emsg, "Can't open '", - filename, "' for writting: ", - strerror(errno), - NULL); - dbprintf(("%s\n",*emsg)); + *emsg = newvstrallocf(*emsg, _("Can't open '%s' for writting: %s"), + filename, strerror(errno)); + dbprintf("%s\n",*emsg); amfree(filename); return NULL; } + /* just use our stderr directly for the pipe's stderr; in + * main() we send stderr to the debug file, or /dev/null + * if debugging is disabled */ + debugfd = STDERR_FILENO; + /* start the uncompress process */ putenv(stralloc("LC_ALL=C")); pid_gzip = pipespawn(UNCOMPRESS_PATH, STDOUT_PIPE, @@ -230,20 +221,18 @@ uncompress_file( pipe_stream = fdopen(pipe_from_gzip,"r"); if(pipe_stream == NULL) { - *emsg = newvstralloc(*emsg, "Can't fdopen pipe from gzip: ", - strerror(errno), - NULL); - dbprintf(("%s\n",*emsg)); + *emsg = newvstrallocf(*emsg, _("Can't fdopen pipe from gzip: %s"), + strerror(errno)); + dbprintf("%s\n",*emsg); amfree(filename); return NULL; } /* start the sort process */ + putenv(stralloc("LC_ALL=C")); pid_sort = pipespawn(SORT_PATH, STDIN_PIPE, &pipe_to_sort, &indexfd, &debugfd, SORT_PATH, NULL); - if (debugnullfd == 1) - aclose(debugfd); aclose(indexfd); /* send all ouput from uncompress process to sort process */ @@ -261,26 +250,26 @@ uncompress_file( aclose(pipe_to_sort); if (waitpid(pid_gzip, &wait_status, 0) < 0) { if (!WIFEXITED(wait_status)) { - dbprintf(("Uncompress exited with signal %d", - WTERMSIG(wait_status))); + dbprintf(_("Uncompress exited with signal %d"), + WTERMSIG(wait_status)); } else if (WEXITSTATUS(wait_status) != 0) { - dbprintf(("Uncompress exited with status %d", - WEXITSTATUS(wait_status))); + dbprintf(_("Uncompress exited with status %d"), + WEXITSTATUS(wait_status)); } else { - dbprintf(("Uncompres returned negative value: %s", - strerror(errno))); + dbprintf(_("Uncompres returned negative value: %s"), + strerror(errno)); } } - if (waitpid(pid_sort, &wait_status, 0)) { + if (waitpid(pid_sort, &wait_status, 0) < 0) { if (!WIFEXITED(wait_status)) { - dbprintf(("Sort exited with signal %d", - WTERMSIG(wait_status))); + dbprintf(_("Sort exited with signal %d"), + WTERMSIG(wait_status)); } else if (WEXITSTATUS(wait_status) != 0) { - dbprintf(("Sort exited with status %d", - WEXITSTATUS(wait_status))); + dbprintf(_("Sort exited with status %d"), + WEXITSTATUS(wait_status)); } else { - dbprintf(("Sort returned negative value: %s", - strerror(errno))); + dbprintf(_("Sort returned negative value: %s"), + strerror(errno)); } } @@ -291,7 +280,7 @@ uncompress_file( uncompress_remove = remove_file; } else if(!S_ISREG((stat_filename.st_mode))) { amfree(*emsg); - *emsg = vstralloc("\"", filename, "\" is not a regular file", NULL); + *emsg = vstrallocf(_("\"%s\" is not a regular file"), filename); errno = -1; amfree(filename); amfree(cmd); @@ -329,7 +318,7 @@ process_ls_dump( filename_gz = get_index_name(dump_hostname, dump_item->hostname, disk_name, dump_item->date, dump_item->level); if (filename_gz == NULL) { - *emsg = stralloc("index file not found"); + *emsg = stralloc(_("index file not found")); amfree(filename_gz); return -1; } @@ -342,7 +331,7 @@ process_ls_dump( if((fp = fopen(filename,"r"))==0) { amfree(*emsg); - *emsg = stralloc(strerror(errno)); + *emsg = vstrallocf("%s", strerror(errno)); amfree(dir_slash); return -1; } @@ -390,7 +379,7 @@ printf_arglist_function1(static void reply, int, n, char *, fmt) while(1) { arglist_start(args, fmt); - len = vsnprintf(reply_buffer, reply_buffer_size, fmt, args); + len = g_vsnprintf(reply_buffer, reply_buffer_size, fmt, args); arglist_end(args); if (len > -1 && (size_t)len < reply_buffer_size-1) @@ -401,21 +390,19 @@ printf_arglist_function1(static void reply, int, n, char *, fmt) reply_buffer = alloc(reply_buffer_size); } - if (fprintf(cmdout,"%03d %s\r\n", n, reply_buffer) < 0) + if (g_fprintf(cmdout,"%03d %s\r\n", n, reply_buffer) < 0) { - dbprintf(("%s: ! error %d (%s) in printf\n", - debug_prefix_time(NULL), errno, strerror(errno))); + dbprintf(_("! error %d (%s) in printf\n"), errno, strerror(errno)); uncompress_remove = remove_files(uncompress_remove); exit(1); } if (fflush(cmdout) != 0) { - dbprintf(("%s: ! error %d (%s) in fflush\n", - debug_prefix_time(NULL), errno, strerror(errno))); + dbprintf(_("! error %d (%s) in fflush\n"), errno, strerror(errno)); uncompress_remove = remove_files(uncompress_remove); exit(1); } - dbprintf(("%s: < %03d %s\n", debug_prefix_time(NULL), n, reply_buffer)); + dbprintf(_("< %03d %s\n"), n, reply_buffer); } /* send one line of a multi-line response */ @@ -429,7 +416,7 @@ printf_arglist_function1(static void lreply, int, n, char *, fmt) while(1) { arglist_start(args, fmt); - len = vsnprintf(reply_buffer, reply_buffer_size, fmt, args); + len = g_vsnprintf(reply_buffer, reply_buffer_size, fmt, args); arglist_end(args); if (len > -1 && (size_t)len < reply_buffer_size-1) @@ -440,22 +427,22 @@ printf_arglist_function1(static void lreply, int, n, char *, fmt) reply_buffer = alloc(reply_buffer_size); } - if (fprintf(cmdout,"%03d-%s\r\n", n, reply_buffer) < 0) + if (g_fprintf(cmdout,"%03d-%s\r\n", n, reply_buffer) < 0) { - dbprintf(("%s: ! error %d (%s) in printf\n", - debug_prefix_time(NULL), errno, strerror(errno))); + dbprintf(_("! error %d (%s) in printf\n"), + errno, strerror(errno)); uncompress_remove = remove_files(uncompress_remove); exit(1); } if (fflush(cmdout) != 0) { - dbprintf(("%s: ! error %d (%s) in fflush\n", - debug_prefix_time(NULL), errno, strerror(errno))); + dbprintf(_("! error %d (%s) in fflush\n"), + errno, strerror(errno)); uncompress_remove = remove_files(uncompress_remove); exit(1); } - dbprintf(("%s: < %03d-%s\n", debug_prefix_time(NULL), n, reply_buffer)); + dbprintf("< %03d-%s\n", n, reply_buffer); } @@ -470,7 +457,7 @@ printf_arglist_function1(static void fast_lreply, int, n, char *, fmt) while(1) { arglist_start(args, fmt); - len = vsnprintf(reply_buffer, reply_buffer_size, fmt, args); + len = g_vsnprintf(reply_buffer, reply_buffer_size, fmt, args); arglist_end(args); if (len > -1 && (size_t)len < reply_buffer_size-1) @@ -481,15 +468,15 @@ printf_arglist_function1(static void fast_lreply, int, n, char *, fmt) reply_buffer = alloc(reply_buffer_size); } - if (fprintf(cmdout,"%03d-%s\r\n", n, reply_buffer) < 0) + if (g_fprintf(cmdout,"%03d-%s\r\n", n, reply_buffer) < 0) { - dbprintf(("%s: ! error %d (%s) in printf\n", - debug_prefix_time(NULL), errno, strerror(errno))); + dbprintf(_("! error %d (%s) in printf\n"), + errno, strerror(errno)); uncompress_remove = remove_files(uncompress_remove); exit(1); } - dbprintf(("%s: < %03d-%s\n", debug_prefix_time(NULL), n, reply_buffer)); + dbprintf("< %03d-%s\n", n, reply_buffer); } /* see if hostname is valid */ @@ -505,14 +492,14 @@ is_dump_host_valid( disk_t *diskp; if (config_name == NULL) { - reply(501, "Must set config before setting host."); + reply(501, _("Must set config before setting host.")); return NULL; } /* check that the config actually handles that host */ ihost = lookup_host(host); if(ihost == NULL) { - reply(501, "Host %s is not in your disklist.", host); + reply(501, _("Host %s is not in your disklist."), host); return NULL; } @@ -528,7 +515,8 @@ is_dump_host_valid( } } - reply(501, "No index records for host: %s. Have you enabled indexing?", host); + reply(501, _("No index records for host: %s. Have you enabled indexing?"), + host); return NULL; } @@ -541,11 +529,11 @@ is_disk_valid( char *qdisk; if (config_name == NULL) { - reply(501, "Must set config,host before setting disk."); + reply(501, _("Must set config,host before setting disk.")); return -1; } else if (dump_hostname == NULL) { - reply(501, "Must set host before setting disk."); + reply(501, _("Must set host before setting disk.")); return -1; } @@ -553,7 +541,7 @@ is_disk_valid( idisk = lookup_disk(dump_hostname, disk); if(idisk == NULL) { qdisk = quote_string(disk); - reply(501, "Disk %s:%s is not in your disklist.", dump_hostname, qdisk); + reply(501, _("Disk %s:%s is not in your disklist."), dump_hostname, qdisk); amfree(qdisk); return -1; } @@ -561,7 +549,7 @@ is_disk_valid( /* assume an index dir already */ if (get_index_dir(dump_hostname, idisk->hostname, disk) == 0) { qdisk = quote_string(disk); - reply(501, "No index records for disk: %s. Invalid?", qdisk); + reply(501, _("No index records for disk: %s. Invalid?"), qdisk); amfree(qdisk); return -1; } @@ -571,10 +559,9 @@ is_disk_valid( static int -is_config_valid( +check_and_load_config( char * config) { - char *conffile; char *conf_diskfile; char *conf_tapelist; char *conf_indexdir; @@ -582,58 +569,42 @@ is_config_valid( /* check that the config actually exists */ if (config == NULL) { - reply(501, "Must set config first."); + reply(501, _("Must set config first.")); return -1; } - /* read conffile */ - conffile = stralloc2(config_dir, CONFFILE_NAME); - if (read_conffile(conffile)) { - reply(501, "Could not read config file %s!", conffile); - amfree(conffile); + /* (re-)initialize configuration with the new config name */ + if (!config_init(CONFIG_INIT_EXPLICIT_NAME, config)) { + reply(501, _("Could not read config file for %s!"), config); return -1; } - amfree(conffile); - conf_diskfile = getconf_str(CNF_DISKFILE); - if (*conf_diskfile == '/') { - conf_diskfile = stralloc(conf_diskfile); - } else { - conf_diskfile = stralloc2(config_dir, conf_diskfile); - } + check_running_as(RUNNING_AS_DUMPUSER_PREFERRED); + + conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE)); if (read_diskfile(conf_diskfile, &disk_list) < 0) { - reply(501, "Could not read disk file %s!", conf_diskfile); + reply(501, _("Could not read disk file %s!"), conf_diskfile); amfree(conf_diskfile); return -1; } 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)) { - reply(501, "Could not read tapelist file %s!", conf_tapelist); + reply(501, _("Could not read tapelist file %s!"), conf_tapelist); amfree(conf_tapelist); return -1; } amfree(conf_tapelist); - dbrename(config, DBG_SUBDIR_SERVER); + dbrename(config_name, DBG_SUBDIR_SERVER); - output_find = find_dump(1, &disk_list); + output_find = find_dump(&disk_list); sort_find_result("DLKHpB", &output_find); - 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)); if (stat (conf_indexdir, &dir_stat) != 0 || !S_ISDIR(dir_stat.st_mode)) { - reply(501, "Index directory %s does not exist", conf_indexdir); + reply(501, _("Index directory %s does not exist"), conf_indexdir); amfree(conf_indexdir); return -1; } @@ -654,15 +625,15 @@ build_disk_table(void) find_result_t *find_output; if (config_name == NULL) { - reply(590, "Must set config,host,disk before building disk table"); + reply(590, _("Must set config,host,disk before building disk table")); return -1; } else if (dump_hostname == NULL) { - reply(590, "Must set host,disk before building disk table"); + reply(590, _("Must set host,disk before building disk table")); return -1; } else if (disk_name == NULL) { - reply(590, "Must set disk before building disk table"); + reply(590, _("Must set disk before building disk table")); return -1; } @@ -678,8 +649,30 @@ build_disk_table(void) strcmp(disk_name , find_output->diskname) == 0 && strcmp("OK" , find_output->status) == 0) { int partnum = -1; - if(strcmp("--", find_output->partnum)){ + int maxpart = -1; + if (strcmp("1/1", find_output->partnum) == 0) { + partnum = -1; + } else if (strcmp("1/-1", find_output->partnum) == 0) { + if (find_output->next && + strcmp(dump_hostname, find_output->next->hostname) == 0 && + strcmp(disk_name, find_output->next->diskname) == 0 && + strcmp(find_output->timestamp, + find_output->next->timestamp) == 0 && + strcmp("OK", find_output->next->status) == 0 && + strcmp("2/-1", find_output->next->partnum) == 0) { + partnum = 1; + } + else { + partnum = -1; + } + } else if (strcmp("--", find_output->partnum)) { + char *c; partnum = atoi(find_output->partnum); + c = strchr(find_output->partnum,'/'); + if (c) + maxpart = atoi(c+1); + else + maxpart = -1; } /* * The sort order puts holding disk entries first. We want to @@ -693,20 +686,31 @@ build_disk_table(void) partnum == last_partnum && last_filenum == 0) { continue; } + /* ignore duplicate partnum */ + if(last_timestamp && + strcmp(find_output->timestamp, last_timestamp) == 0 && + find_output->level == last_level && + partnum == last_partnum) { + continue; + } last_timestamp = find_output->timestamp; last_filenum = find_output->filenum; last_level = find_output->level; last_partnum = partnum; date = amindexd_nicedate(find_output->timestamp); add_dump(find_output->hostname, date, find_output->level, - find_output->label, find_output->filenum, partnum); - dbprintf(("%s: - %s %d %s " OFF_T_FMT " %d\n", - debug_prefix_time(NULL), date, find_output->level, + find_output->label, find_output->filenum, partnum, + maxpart); + dbprintf("- %s %d %s %lld %d %d\n", + date, find_output->level, find_output->label, - (OFF_T_FMT_TYPE)find_output->filenum, - partnum)); + (long long)find_output->filenum, + partnum, maxpart); } } + + clean_dump(); + return 0; } @@ -718,19 +722,19 @@ disk_history_list(void) char date[20]; if (config_name == NULL) { - reply(502, "Must set config,host,disk before listing history"); + reply(502, _("Must set config,host,disk before listing history")); return -1; } else if (dump_hostname == NULL) { - reply(502, "Must set host,disk before listing history"); + reply(502, _("Must set host,disk before listing history")); return -1; } else if (disk_name == NULL) { - reply(502, "Must set disk before listing history"); + reply(502, _("Must set disk before listing history")); return -1; } - lreply(200, " Dump history for config \"%s\" host \"%s\" disk %s", + lreply(200, _(" Dump history for config \"%s\" host \"%s\" disk %s"), config_name, dump_hostname, qdisk_name); for (item=first_dump(); item!=NULL; item=next_dump(item)){ @@ -745,13 +749,13 @@ disk_history_list(void) lreply(201, " %s %d %s", date, item->level, tapelist_str); } else{ - lreply(201, " %s %d %s " OFF_T_FMT, date, item->level, - tapelist_str, (OFF_T_FMT_TYPE)item->file); + lreply(201, " %s %d %s %lld", date, item->level, + tapelist_str, (long long)item->file); } amfree(tapelist_str); } - reply(200, "Dump history for config \"%s\" host \"%s\" disk %s", + reply(200, _("Dump history for config \"%s\" host \"%s\" disk %s"), config_name, dump_hostname, qdisk_name); return 0; @@ -778,19 +782,19 @@ is_dir_valid_opaque( static char *emsg = NULL; if (config_name == NULL || dump_hostname == NULL || disk_name == NULL) { - reply(502, "Must set config,host,disk before asking about directories"); + reply(502, _("Must set config,host,disk before asking about directories")); return -1; } else if (dump_hostname == NULL) { - reply(502, "Must set host,disk before asking about directories"); + reply(502, _("Must set host,disk before asking about directories")); return -1; } else if (disk_name == NULL) { - reply(502, "Must set disk before asking about directories"); + reply(502, _("Must set disk before asking about directories")); return -1; } else if (target_date == NULL) { - reply(502, "Must set date before asking about directories"); + reply(502, _("Must set date before asking about directories")); return -1; } /* scan through till we find first dump on or before date */ @@ -801,7 +805,7 @@ is_dir_valid_opaque( if (item == NULL) { /* no dump for given date */ - reply(500, "No dumps available on or before date \"%s\"", target_date); + reply(500, _("No dumps available on or before date \"%s\""), target_date); return -1; } @@ -824,16 +828,16 @@ is_dir_valid_opaque( return -1; } if((filename = uncompress_file(filename_gz, &emsg)) == NULL) { - reply(599, "System error %s", emsg); + reply(599, _("System error %s"), emsg); amfree(filename_gz); amfree(emsg); amfree(ldir); return -1; } amfree(filename_gz); - dbprintf(("%s: f %s\n", debug_prefix_time(NULL), filename)); + dbprintf("f %s\n", filename); if ((fp = fopen(filename, "r")) == NULL) { - reply(599, "System error %s", strerror(errno)); + reply(599, _("System error %s"), strerror(errno)); amfree(filename); amfree(ldir); return -1; @@ -862,7 +866,7 @@ is_dir_valid_opaque( amfree(filename); amfree(ldir); - reply(500, "\"%s\" is an invalid directory", dir); + reply(500, _("\"%s\" is an invalid directory"), dir); return -1; } @@ -886,19 +890,19 @@ opaque_ls( clear_dir_list(); if (config_name == NULL) { - reply(502, "Must set config,host,disk before listing a directory"); + reply(502, _("Must set config,host,disk before listing a directory")); return -1; } else if (dump_hostname == NULL) { - reply(502, "Must set host,disk before listing a directory"); + reply(502, _("Must set host,disk before listing a directory")); return -1; } else if (disk_name == NULL) { - reply(502, "Must set disk before listing a directory"); + reply(502, _("Must set disk before listing a directory")); return -1; } else if (target_date == NULL) { - reply(502, "Must set date before listing a directory"); + reply(502, _("Must set date before listing a directory")); return -1; } @@ -910,13 +914,13 @@ opaque_ls( if (dump_item == NULL) { /* no dump for given date */ - reply(500, "No dumps available on or before date \"%s\"", target_date); + reply(500, _("No dumps available on or before date \"%s\""), target_date); return -1; } /* get data from that dump */ if (process_ls_dump(dir, dump_item, recursive, &emsg) == -1) { - reply(599, "System error %s", emsg); + reply(599, _("System error %s"), emsg); amfree(emsg); return -1; } @@ -929,7 +933,7 @@ opaque_ls( { last_level = dump_item->level; if (process_ls_dump(dir, dump_item, recursive, &emsg) == -1) { - reply(599, "System error %s", emsg); + reply(599, _("System error %s"), emsg); amfree(emsg); return -1; } @@ -937,7 +941,7 @@ opaque_ls( } /* return the information to the caller */ - lreply(200, " Opaque list of %s", dir); + lreply(200, _(" Opaque list of %s"), dir); for(level=0; level<=9; level++) { for (dir_item = get_dir_list(); dir_item != NULL; dir_item = dir_item->next) { @@ -946,8 +950,8 @@ opaque_ls( if (!am_has_feature(their_features, marshall_feature) && (num_entries(dir_item->dump->tapes) > 1 || dir_item->dump->tapes->numfiles > 1)) { - fast_lreply(501, " ERROR: Split dumps not supported" - " with old version of amrecover."); + fast_lreply(501, _(" ERROR: Split dumps not supported" + " with old version of amrecover.")); break; } else { @@ -956,7 +960,7 @@ opaque_ls( } } } - reply(200, " Opaque list of %s", dir); + reply(200, _(" Opaque list of %s"), dir); clear_dir_list(); return 0; @@ -987,11 +991,11 @@ void opaque_ls_one( fe_amindexd_fileno_in_OLSD)) || (recursive && am_has_feature(their_features, fe_amindexd_fileno_in_ORLD))) { - fast_lreply(201, " %s %d %s " OFF_T_FMT " %s", + fast_lreply(201, " %s %d %s %lld %s", date, dir_item->dump->level, tapelist_str, - (OFF_T_FMT_TYPE)dir_item->dump->file, + (long long)dir_item->dump->file, qpath); } else { @@ -1018,38 +1022,35 @@ tapedev_is(void) /* check state okay to do this */ if (config_name == NULL) { - reply(501, "Must set config before asking about tapedev."); + reply(501, _("Must set config before asking about tapedev.")); return -1; } /* use amrecover_changer if possible */ if ((result = getconf_str(CNF_AMRECOVER_CHANGER)) != NULL && *result != '\0') { - dbprintf(("%s: tapedev_is amrecover_changer: %s\n", - debug_prefix_time(NULL), result)); + dbprintf(_("tapedev_is amrecover_changer: %s\n"), result); reply(200, result); return 0; } /* use changer if possible */ if ((result = getconf_str(CNF_TPCHANGER)) != NULL && *result != '\0') { - dbprintf(("%s: tapedev_is tpchanger: %s\n", - debug_prefix_time(NULL), result)); + dbprintf(_("tapedev_is tpchanger: %s\n"), result); reply(200, result); return 0; } /* get tapedev value */ if ((result = getconf_str(CNF_TAPEDEV)) != NULL && *result != '\0') { - dbprintf(("%s: tapedev_is tapedev: %s\n", - debug_prefix_time(NULL), result)); + dbprintf(_("tapedev_is tapedev: %s\n"), result); reply(200, result); return 0; } - dbprintf(("%s: No tapedev or tpchanger in config site.\n", - debug_prefix_time(NULL))); - reply(501, "Tapedev or tpchanger not set in config file."); + dbprintf(_("No tapedev or tpchanger in config site.\n")); + + reply(501, _("Tapedev or tpchanger not set in config file.")); return -1; } @@ -1062,15 +1063,15 @@ are_dumps_compressed(void) /* check state okay to do this */ if (config_name == NULL) { - reply(501, "Must set config,host,disk name before asking about dumps."); + reply(501, _("Must set config,host,disk name before asking about dumps.")); return -1; } else if (dump_hostname == NULL) { - reply(501, "Must set host,disk name before asking about dumps."); + reply(501, _("Must set host,disk name before asking about dumps.")); return -1; } else if (disk_name == NULL) { - reply(501, "Must set disk name before asking about dumps."); + reply(501, _("Must set disk name before asking about dumps.")); return -1; } @@ -1083,7 +1084,7 @@ are_dumps_compressed(void) } if (diskp == NULL) { - reply(501, "Couldn't find host/disk in disk file."); + reply(501, _("Couldn't find host/disk in disk file.")); return -1; } @@ -1105,8 +1106,8 @@ main( char *s; int ch; char *cmd_undo, cmd_undo_ch; - socklen_t socklen; - struct sockaddr_storage his_addr; + socklen_t_equiv socklen; + sockaddr_union his_addr; char *arg = NULL; char *cmd; size_t len; @@ -1114,6 +1115,16 @@ main( char *errstr = NULL; char *pgm = "amindexd"; /* in case argv[0] is not set */ char his_hostname[MAX_HOSTNAME_LENGTH]; + 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(DATA_FD_OFFSET, 2); safe_cd(); @@ -1137,43 +1148,18 @@ main( /* Don't die when child closes pipe */ signal(SIGPIPE, SIG_IGN); -#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 */ - dbopen(DBG_SUBDIR_SERVER); - dbprintf(("%s: version %s\n", get_pname(), version())); + dbprintf(_("version %s\n"), version()); if(argv == NULL) { error("argv == NULL\n"); } if (! (argc >= 1 && 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")); } - { - int db_fd = dbfd(); - if(db_fd != -1) { - dup2(db_fd, 2); - } - } + debug_dup_stderr_to_debug(); /* initialize */ @@ -1202,14 +1188,13 @@ main( } if (argc > 0) { - config_name = stralloc(*argv); - config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL); + cfg_opt = *argv; argc--; argv++; } if(gethostname(local_hostname, SIZEOF(local_hostname)-1) == -1) { - error("gethostname: %s", strerror(errno)); + error(_("gethostname: %s"), strerror(errno)); /*NOTREACHED*/ } local_hostname[SIZEOF(local_hostname)-1] = '\0'; @@ -1226,7 +1211,7 @@ main( /* who are we talking to? */ socklen = sizeof (his_addr); if (getpeername(0, (struct sockaddr *)&his_addr, &socklen) == -1) - error("getpeername: %s", strerror(errno)); + error(_("getpeername: %s"), strerror(errno)); /* Try a reverse (IP->hostname) resolution, and fail if it does * not work -- this is a basic security check */ @@ -1260,16 +1245,16 @@ main( if(amandad_auth && g_options->auth) { if(strcasecmp(amandad_auth, g_options->auth) != 0) { - printf("ERROR recover program ask for auth=%s while amindexd is configured for '%s'\n", + g_printf(_("ERROR recover program ask for auth=%s while amindexd is configured for '%s'\n"), g_options->auth, amandad_auth); - error("amindexd: ERROR recover program ask for auth=%s while amindexd is configured for '%s'", + error(_("amindexd: ERROR recover program ask for auth=%s while amindexd is configured for '%s'"), g_options->auth, amandad_auth); /*NOTREACHED*/ } } /* send the REP packet */ - printf("CONNECT MESG %d\n", DATA_FD_OFFSET); - printf("\n"); + g_printf("CONNECT MESG %d\n", DATA_FD_OFFSET); + g_printf("\n"); fflush(stdin); fflush(stdout); fclose(stdin); @@ -1297,11 +1282,11 @@ main( our_features = am_init_feature_set(); their_features = am_set_default_feature_set(); - if (config_name != NULL && is_config_valid(config_name) != -1) { + if (cfg_opt != NULL && check_and_load_config(cfg_opt) != -1) { /* load the config */ return 1; } - reply(220, "%s AMANDA index server (%s) ready.", local_hostname, + reply(220, _("%s AMANDA index server (%s) ready."), local_hostname, version()); user_validated = from_amandad; @@ -1313,18 +1298,15 @@ main( while(1) { if((part = agets(cmdin)) == 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: ? unexpected EOF\n", - debug_prefix_time(NULL))); + dbprintf(_("? unexpected EOF\n")); } if(line) { - dbprintf(("%s: ? unprocessed input:\n", - debug_prefix_time(NULL))); - dbprintf(("-----\n")); - dbprintf(("? %s\n", line)); - dbprintf(("-----\n")); + dbprintf(_("? unprocessed input:\n")); + dbprintf("-----\n"); + dbprintf("? %s\n", line); + dbprintf("-----\n"); } amfree(line); amfree(part); @@ -1350,7 +1332,7 @@ main( strappend(line, "\n"); } - dbprintf(("%s: > %s\n", debug_prefix_time(NULL), line)); + dbprintf("> %s\n", line); if (arg != NULL) amfree(arg); @@ -1359,7 +1341,7 @@ main( skip_whitespace(s, ch); if(ch == '\0') { - reply(500, "Command not recognised/incorrect: %s", line); + reply(500, _("Command not recognised/incorrect: %s"), line); amfree(line); continue; } @@ -1382,18 +1364,18 @@ main( if (!user_validated && strcmp(cmd, "SECURITY") == 0 && arg) { user_validated = amindexd_debug || check_security( - (struct sockaddr_storage *)&his_addr, + (sockaddr_union *)&his_addr, arg, 0, &errstr); if(user_validated) { - reply(200, "Access OK"); + reply(200, _("Access OK")); amfree(line); continue; } } if (!user_validated) { /* don't tell client the reason, just log it to debug log */ - reply(500, "Access not allowed"); + reply(500, _("Access not allowed")); if (errstr) { - dbprintf(("%s: %s\n", debug_prefix_time(NULL), errstr)); + dbprintf("%s\n", errstr); } break; } @@ -1408,7 +1390,7 @@ main( if ((lhost = is_dump_host_valid(arg)) != NULL) { dump_hostname = newstralloc(dump_hostname, lhost->hostname); - reply(200, "Dump host set to %s.", dump_hostname); + reply(200, _("Dump host set to %s."), dump_hostname); amfree(qdisk_name); /* invalidate any value */ amfree(disk_name); /* invalidate any value */ } @@ -1420,10 +1402,10 @@ main( found = 0; s[-1] = '\0'; if (config_name == NULL) { - reply(501, "Must set config before listhost"); + reply(501, _("Must set config before listhost")); } else { - lreply(200, " List hosts for config %s", config_name); + lreply(200, _(" List hosts for config %s"), config_name); for (disk = disk_list.head; disk!=NULL; disk = disk->next) { found = 0; for (diskdup = disk_list.head; diskdup!=disk; diskdup = diskdup->next) { @@ -1438,10 +1420,10 @@ main( } } if(nbhost > 0) { - reply(200, " List hosts for config %s", config_name); + reply(200, _(" List hosts for config %s"), config_name); } else { - reply(200, "No hosts for config %s", config_name); + reply(200, _("No hosts for config %s"), config_name); } } s[-1] = (char)ch; @@ -1451,7 +1433,7 @@ main( disk_name = newstralloc(disk_name, arg); qdisk_name = quote_string(disk_name); if (build_disk_table() != -1) { - reply(200, "Disk set to %s.", qdisk_name); + reply(200, _("Disk set to %s."), qdisk_name); } } s[-1] = (char)ch; @@ -1461,13 +1443,13 @@ main( int nbdisk = 0; s[-1] = '\0'; if (config_name == NULL) { - reply(501, "Must set config, host before listdisk"); + reply(501, _("Must set config, host before listdisk")); } else if (dump_hostname == NULL) { - reply(501, "Must set host before listdisk"); + reply(501, _("Must set host before listdisk")); } else if(arg) { - lreply(200, " List of disk for device %s on host %s", arg, + lreply(200, _(" List of disk for device %s on host %s"), arg, dump_hostname); for (disk = disk_list.head; disk!=NULL; disk = disk->next) { @@ -1481,16 +1463,16 @@ main( } } if(nbdisk > 0) { - reply(200, "List of disk for device %s on host %s", arg, + reply(200, _("List of disk for device %s on host %s"), arg, dump_hostname); } else { - reply(200, "No disk for device %s on host %s", arg, + reply(200, _("No disk for device %s on host %s"), arg, dump_hostname); } } else { - lreply(200, " List of disk for host %s", dump_hostname); + lreply(200, _(" List of disk for host %s"), dump_hostname); for (disk = disk_list.head; disk!=NULL; disk = disk->next) { if(strcasecmp(disk->host->hostname, dump_hostname) == 0) { qname = quote_string(disk->name); @@ -1500,28 +1482,21 @@ main( } } if(nbdisk > 0) { - reply(200, "List of disk for host %s", dump_hostname); + reply(200, _("List of disk for host %s"), dump_hostname); } else { - reply(200, "No disk for host %s", dump_hostname); + reply(200, _("No disk for host %s"), dump_hostname); } } s[-1] = (char)ch; } else if (strcmp(cmd, "SCNF") == 0 && arg) { s[-1] = '\0'; - amfree(config_name); - amfree(config_dir); - config_name = newstralloc(config_name, arg); - config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL); - if (is_config_valid(arg) != -1) { + if (check_and_load_config(arg) != -1) { /* try to load the new config */ amfree(dump_hostname); /* invalidate any value */ amfree(qdisk_name); /* invalidate any value */ amfree(disk_name); /* invalidate any value */ - reply(200, "Config set to %s.", config_name); - } else { - amfree(config_name); - amfree(config_dir); - } + reply(200, _("Config set to %s."), config_name); + } /* check_and_load_config replies with any failure messages */ s[-1] = (char)ch; } else if (strcmp(cmd, "FEATURES") == 0 && arg) { char *our_feature_string = NULL; @@ -1540,13 +1515,13 @@ main( } else if (strcmp(cmd, "DATE") == 0 && arg) { s[-1] = '\0'; target_date = newstralloc(target_date, arg); - reply(200, "Working date set to %s.", target_date); + reply(200, _("Working date set to %s."), target_date); s[-1] = (char)ch; } else if (strcmp(cmd, "DHST") == 0) { (void)disk_history_list(); } else if (strcmp(cmd, "OISD") == 0 && arg) { if (is_dir_valid_opaque(arg) != -1) { - reply(200, "\"%s\" is a valid directory", arg); + reply(200, _("\"%s\" is a valid directory"), arg); } } else if (strcmp(cmd, "OLSD") == 0 && arg) { (void)opaque_ls(arg,0); @@ -1558,7 +1533,7 @@ main( (void)are_dumps_compressed(); } else { *cmd_undo = cmd_undo_ch; /* restore the command line */ - reply(500, "Command not recognised/incorrect: %s", cmd); + reply(500, _("Command not recognised/incorrect: %s"), cmd); } amfree(line); } @@ -1566,7 +1541,7 @@ main( uncompress_remove = remove_files(uncompress_remove); free_find_result(&output_find); - reply(200, "Good bye."); + reply(200, _("Good bye.")); dbclose(); return 0; } @@ -1589,7 +1564,7 @@ amindexd_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 { @@ -1600,7 +1575,7 @@ amindexd_nicedate( 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); } @@ -1628,9 +1603,9 @@ clean_backslash( s++; s1 = s+1; s2 = s+2; - if (*s != '\0' && isdigit(*s) && - *s1 != '\0' && isdigit(*s1) && - *s2 != '\0' && isdigit(*s2)) { + if (*s != '\0' && isdigit((int)*s) && + *s1 != '\0' && isdigit((int)*s1) && + *s2 != '\0' && isdigit((int)*s2)) { /* this is \000, an octal value */ i = ((*s)-'0')*64 + ((*s1)-'0')*8 + ((*s2)-'0'); *p++ = i; diff --git a/server-src/amlabel.c b/server-src/amlabel.c index 1ead3ae..651e6b6 100644 --- a/server-src/amlabel.c +++ b/server-src/amlabel.c @@ -31,62 +31,68 @@ #include "amanda.h" #include "conffile.h" #include "tapefile.h" -#include "tapeio.h" #include "changer.h" - -#ifdef HAVE_LIBVTBLC -#include -#endif /* HAVE_LIBVTBLC */ +#include +#include +#include /* local functions */ int main(int argc, char **argv); -void usage(void); -void -usage(void) -{ - fprintf(stderr, "Usage: %s [-f]